translate-all: remove superfluous #ifdef FOO || 1
PATCH 1/1 translate-all: remove superfluous #ifdef FOO || 1
It always evaluates to true.
Signed-off-by Emilio G. Cota <[email protected]>
--- translate-all.c | 4 ---- 1 file changed, 4 deletions(-)
translate-all.c +0 -4
@@ -1334,8 +1334,6 @@ static inline void tb_alloc_page(TranslationBlock *tb, p->first_tb = (TranslationBlock *)((uintptr_t )tb | n);invalidate_page_bitmap (p); -#if defined(TARGET_HAS_SMC) || 1 -#if defined(CONFIG_USER_ONLY )if (p->flags &PAGE_WRITE ) {target_ulong addr;
@@ -1371,8 +1369,6 @@ static inline void tb_alloc_page(TranslationBlock *tb, tlb_protect_code(page_addr); }#endif - -#endif /* TARGET_HAS_SMC */ }/* add a new TB and link it to the physical page tables. phys_page2 is
Signature · 1 line
1.9.1
Quoted 22 lines · Emilio G. Cota
It always evaluates to true.
Signed-off-by Emilio G. Cota <[email protected]>--- translate-all.c | 4 ---- 1 file changed, 4 deletions(-)translate-all.c +0
-2@@ -1334,8 +1334,6 @@ static inline void tb_alloc_page(TranslationBlock *tb, p->first_tb = (TranslationBlock *)((uintptr_t )tb | n);invalidate_page_bitmap (p); -#if defined(TARGET_HAS_SMC) || 1 -#if defined(CONFIG_USER_ONLY )if (p->flags &PAGE_WRITE ) {target_ulong addr;
translate-all.c static inline void tb_alloc_page(TranslationBlock *tb, · line 1374
Quoted 8 lines
translate-all.c +0
-2@@ -1371,8 +1369,6 @@ static inline void tb_alloc_page(TranslationBlock *tb, tlb_protect_code(page_addr); }#endif - -#endif /* TARGET_HAS_SMC */ }/* add a new TB and link it to the physical page tables. phys_page2 is
You are removing the last use of TARGET_HAS_SMC, please remove the definition as well.
Paolo
PATCH 1/1 target-i386: remove superfluous TARGET_HAS_SMC macro
Suggested-by Paolo Bonzini <[email protected]>
Signed-off-by Emilio G. Cota <[email protected]>
--- target-i386/cpu.h | 2 -- translate-all.c | 4 ---- 2 files changed, 6 deletions(-)
target-i386/cpu.h +0 -2
@@ -31,8 +31,6 @@/* Maximum instruction code size */ #define TARGET_MAX_INSN_SIZE 16 -/* target supports implicit self modifying code */ -#define TARGET_HAS_SMC /* support for self modifying code even if the modified instruction is close to the modifying instruction */ #define TARGET_HAS_PRECISE_SMC
translate-all.c +0 -4
@@ -1334,8 +1334,6 @@ static inline void tb_alloc_page(TranslationBlock *tb, p->first_tb = (TranslationBlock *)((uintptr_t )tb | n);invalidate_page_bitmap (p); -#if defined(TARGET_HAS_SMC) || 1 -#if defined(CONFIG_USER_ONLY )if (p->flags &PAGE_WRITE ) {target_ulong addr;
@@ -1371,8 +1369,6 @@ static inline void tb_alloc_page(TranslationBlock *tb, tlb_protect_code(page_addr); }#endif - -#endif /* TARGET_HAS_SMC */ }/* add a new TB and link it to the physical page tables. phys_page2 is
Signature · 1 line
1.9.1
Re: [Qemu-devel] [PATCH] target-i386: remove superfluous TARGET_HAS_SMC macro
Quoted 35 lines · Emilio G. Cota
Suggested-by Paolo Bonzini <[email protected]>Signed-off-by Emilio G. Cota <[email protected]>--- target-i386/cpu.h | 2 -- translate-all.c | 4 ---- 2 files changed, 6 deletions(-)target-i386/cpu.h +0
-2@@ -31,8 +31,6 @@/* Maximum instruction code size */ #define TARGET_MAX_INSN_SIZE 16 -/* target supports implicit self modifying code */ -#define TARGET_HAS_SMC /* support for self modifying code even if the modified instruction is close to the modifying instruction */ #define TARGET_HAS_PRECISE_SMC translate-all.c +0
-2@@ -1334,8 +1334,6 @@ static inline void tb_alloc_page(TranslationBlock *tb, p->first_tb = (TranslationBlock *)((uintptr_t )tb | n);invalidate_page_bitmap (p); -#if defined(TARGET_HAS_SMC) || 1 -#if defined(CONFIG_USER_ONLY )if (p->flags &PAGE_WRITE ) {target_ulong addr;
translate-all.c static inline void tb_alloc_page(TranslationBlock *tb, · line 1374
Quoted 8 lines
translate-all.c +0
-2@@ -1371,8 +1369,6 @@ static inline void tb_alloc_page(TranslationBlock *tb, tlb_protect_code(page_addr); }#endif - -#endif /* TARGET_HAS_SMC */ }/* add a new TB and link it to the physical page tables. phys_page2 is
Reviewed-by Paolo Bonzini <[email protected]>
Michael Tokarev
AppliedRe: [Qemu-devel] [PATCH] target-i386: remove superfluous TARGET_HAS_SMC macro
In reply to Emilio G. CotaApplied to -trivial, thanks!
/mjt