avoid confusion between macro & variable use_idiv_instructions (ARM backend)

This commit is contained in:
Nguyen Anh Quynh
2016-01-18 23:53:50 +08:00
parent d9249b91c2
commit 3b52af4fbd
14 changed files with 16 additions and 15 deletions

View File

@ -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) {

View File

@ -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