From 3b52af4fbd736b9e4d8c54f91c6c8c3ad28cf0d9 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Mon, 18 Jan 2016 23:53:50 +0800 Subject: [PATCH] avoid confusion between macro & variable use_idiv_instructions (ARM backend) --- qemu/aarch64.h | 2 +- qemu/arm.h | 2 +- qemu/header_gen.py | 2 +- qemu/m68k.h | 2 +- qemu/mips.h | 2 +- qemu/mips64.h | 2 +- qemu/mips64el.h | 2 +- qemu/mipsel.h | 2 +- qemu/powerpc.h | 2 +- qemu/sparc.h | 2 +- qemu/sparc64.h | 2 +- qemu/tcg/arm/tcg-target.c | 4 ++-- qemu/tcg/arm/tcg-target.h | 3 ++- qemu/x86_64.h | 2 +- 14 files changed, 16 insertions(+), 15 deletions(-) diff --git a/qemu/aarch64.h b/qemu/aarch64.h index 0dfd1931..7c0b593f 100644 --- a/qemu/aarch64.h +++ b/qemu/aarch64.h @@ -1,7 +1,7 @@ /* Autogen header for Unicorn Engine - DONOT MODIFY */ #ifndef UNICORN_AUTOGEN_AARCH64_H #define UNICORN_AUTOGEN_AARCH64_H -#define use_idiv_instructions use_idiv_instructions_aarch64 +#define use_idiv_instructions_rt use_idiv_instructions_rt_aarch64 #define tcg_target_deposit_valid tcg_target_deposit_valid_aarch64 #define helper_power_down helper_power_down_aarch64 #define check_exit_request check_exit_request_aarch64 diff --git a/qemu/arm.h b/qemu/arm.h index 5938d7b1..fd18ecfa 100644 --- a/qemu/arm.h +++ b/qemu/arm.h @@ -1,7 +1,7 @@ /* Autogen header for Unicorn Engine - DONOT MODIFY */ #ifndef UNICORN_AUTOGEN_ARM_H #define UNICORN_AUTOGEN_ARM_H -#define use_idiv_instructions use_idiv_instructions_arm +#define use_idiv_instructions_rt use_idiv_instructions_rt_arm #define tcg_target_deposit_valid tcg_target_deposit_valid_arm #define helper_power_down helper_power_down_arm #define check_exit_request check_exit_request_arm diff --git a/qemu/header_gen.py b/qemu/header_gen.py index 83fcccfb..18abed71 100644 --- a/qemu/header_gen.py +++ b/qemu/header_gen.py @@ -7,7 +7,7 @@ import sys symbols = ( - 'use_idiv_instructions', + 'use_idiv_instructions_rt', 'tcg_target_deposit_valid', 'helper_power_down', 'check_exit_request', diff --git a/qemu/m68k.h b/qemu/m68k.h index 3b5455eb..368c49ab 100644 --- a/qemu/m68k.h +++ b/qemu/m68k.h @@ -1,7 +1,7 @@ /* Autogen header for Unicorn Engine - DONOT MODIFY */ #ifndef UNICORN_AUTOGEN_M68K_H #define UNICORN_AUTOGEN_M68K_H -#define use_idiv_instructions use_idiv_instructions_m68k +#define use_idiv_instructions_rt use_idiv_instructions_rt_m68k #define tcg_target_deposit_valid tcg_target_deposit_valid_m68k #define helper_power_down helper_power_down_m68k #define check_exit_request check_exit_request_m68k diff --git a/qemu/mips.h b/qemu/mips.h index f441daaa..1ef669f0 100644 --- a/qemu/mips.h +++ b/qemu/mips.h @@ -1,7 +1,7 @@ /* Autogen header for Unicorn Engine - DONOT MODIFY */ #ifndef UNICORN_AUTOGEN_MIPS_H #define UNICORN_AUTOGEN_MIPS_H -#define use_idiv_instructions use_idiv_instructions_mips +#define use_idiv_instructions_rt use_idiv_instructions_rt_mips #define tcg_target_deposit_valid tcg_target_deposit_valid_mips #define helper_power_down helper_power_down_mips #define check_exit_request check_exit_request_mips diff --git a/qemu/mips64.h b/qemu/mips64.h index e408f320..2d8328a7 100644 --- a/qemu/mips64.h +++ b/qemu/mips64.h @@ -1,7 +1,7 @@ /* Autogen header for Unicorn Engine - DONOT MODIFY */ #ifndef UNICORN_AUTOGEN_MIPS64_H #define UNICORN_AUTOGEN_MIPS64_H -#define use_idiv_instructions use_idiv_instructions_mips64 +#define use_idiv_instructions_rt use_idiv_instructions_rt_mips64 #define tcg_target_deposit_valid tcg_target_deposit_valid_mips64 #define helper_power_down helper_power_down_mips64 #define check_exit_request check_exit_request_mips64 diff --git a/qemu/mips64el.h b/qemu/mips64el.h index 0995c023..f2cd15cd 100644 --- a/qemu/mips64el.h +++ b/qemu/mips64el.h @@ -1,7 +1,7 @@ /* Autogen header for Unicorn Engine - DONOT MODIFY */ #ifndef UNICORN_AUTOGEN_MIPS64EL_H #define UNICORN_AUTOGEN_MIPS64EL_H -#define use_idiv_instructions use_idiv_instructions_mips64el +#define use_idiv_instructions_rt use_idiv_instructions_rt_mips64el #define tcg_target_deposit_valid tcg_target_deposit_valid_mips64el #define helper_power_down helper_power_down_mips64el #define check_exit_request check_exit_request_mips64el diff --git a/qemu/mipsel.h b/qemu/mipsel.h index 70623980..e3ee9cde 100644 --- a/qemu/mipsel.h +++ b/qemu/mipsel.h @@ -1,7 +1,7 @@ /* Autogen header for Unicorn Engine - DONOT MODIFY */ #ifndef UNICORN_AUTOGEN_MIPSEL_H #define UNICORN_AUTOGEN_MIPSEL_H -#define use_idiv_instructions use_idiv_instructions_mipsel +#define use_idiv_instructions_rt use_idiv_instructions_rt_mipsel #define tcg_target_deposit_valid tcg_target_deposit_valid_mipsel #define helper_power_down helper_power_down_mipsel #define check_exit_request check_exit_request_mipsel diff --git a/qemu/powerpc.h b/qemu/powerpc.h index cf72f56c..e450421e 100644 --- a/qemu/powerpc.h +++ b/qemu/powerpc.h @@ -1,7 +1,7 @@ /* Autogen header for Unicorn Engine - DONOT MODIFY */ #ifndef UNICORN_AUTOGEN_POWERPC_H #define UNICORN_AUTOGEN_POWERPC_H -#define use_idiv_instructions use_idiv_instructions_powerpc +#define use_idiv_instructions_rt use_idiv_instructions_rt_powerpc #define tcg_target_deposit_valid tcg_target_deposit_valid_powerpc #define helper_power_down helper_power_down_powerpc #define check_exit_request check_exit_request_powerpc diff --git a/qemu/sparc.h b/qemu/sparc.h index 86139dd5..4f719a70 100644 --- a/qemu/sparc.h +++ b/qemu/sparc.h @@ -1,7 +1,7 @@ /* Autogen header for Unicorn Engine - DONOT MODIFY */ #ifndef UNICORN_AUTOGEN_SPARC_H #define UNICORN_AUTOGEN_SPARC_H -#define use_idiv_instructions use_idiv_instructions_sparc +#define use_idiv_instructions_rt use_idiv_instructions_rt_sparc #define tcg_target_deposit_valid tcg_target_deposit_valid_sparc #define helper_power_down helper_power_down_sparc #define check_exit_request check_exit_request_sparc diff --git a/qemu/sparc64.h b/qemu/sparc64.h index e35b3a6f..7dd7376c 100644 --- a/qemu/sparc64.h +++ b/qemu/sparc64.h @@ -1,7 +1,7 @@ /* Autogen header for Unicorn Engine - DONOT MODIFY */ #ifndef UNICORN_AUTOGEN_SPARC64_H #define UNICORN_AUTOGEN_SPARC64_H -#define use_idiv_instructions use_idiv_instructions_sparc64 +#define use_idiv_instructions_rt use_idiv_instructions_rt_sparc64 #define tcg_target_deposit_valid tcg_target_deposit_valid_sparc64 #define helper_power_down helper_power_down_sparc64 #define check_exit_request check_exit_request_sparc64 diff --git a/qemu/tcg/arm/tcg-target.c b/qemu/tcg/arm/tcg-target.c index cabbd1f1..93dfaab3 100644 --- a/qemu/tcg/arm/tcg-target.c +++ b/qemu/tcg/arm/tcg-target.c @@ -57,7 +57,7 @@ static int arm_arch = __ARM_ARCH; #define use_armv7_instructions (__ARM_ARCH >= 7 || arm_arch >= 7) #ifndef use_idiv_instructions -bool use_idiv_instructions; +bool use_idiv_instructions_rt; #endif /* ??? Ought to think about changing CONFIG_SOFTMMU to always defined. */ @@ -1984,7 +1984,7 @@ static void tcg_target_init(TCGContext *s) #ifndef use_idiv_instructions { unsigned long hwcap = qemu_getauxval(AT_HWCAP); - use_idiv_instructions = (hwcap & HWCAP_ARM_IDIVA) != 0; + use_idiv_instructions_rt = (hwcap & HWCAP_ARM_IDIVA) != 0; } #endif if (__ARM_ARCH < 7) { diff --git a/qemu/tcg/arm/tcg-target.h b/qemu/tcg/arm/tcg-target.h index 1c719e28..a6ea9763 100644 --- a/qemu/tcg/arm/tcg-target.h +++ b/qemu/tcg/arm/tcg-target.h @@ -52,7 +52,8 @@ typedef enum { #ifdef __ARM_ARCH_EXT_IDIV__ #define use_idiv_instructions 1 #else -extern bool use_idiv_instructions; +extern bool use_idiv_instructions_rt; +#define use_idiv_instructions use_idiv_instructions_rt #endif diff --git a/qemu/x86_64.h b/qemu/x86_64.h index a692a8d6..deee37e8 100644 --- a/qemu/x86_64.h +++ b/qemu/x86_64.h @@ -1,7 +1,7 @@ /* Autogen header for Unicorn Engine - DONOT MODIFY */ #ifndef UNICORN_AUTOGEN_X86_64_H #define UNICORN_AUTOGEN_X86_64_H -#define use_idiv_instructions use_idiv_instructions_x86_64 +#define use_idiv_instructions_rt use_idiv_instructions_rt_x86_64 #define tcg_target_deposit_valid tcg_target_deposit_valid_x86_64 #define helper_power_down helper_power_down_x86_64 #define check_exit_request check_exit_request_x86_64