qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 08/14] tcg-arm: Make use of conditional avail


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v3 08/14] tcg-arm: Make use of conditional availability of opcodes for divide
Date: Thu, 04 Jul 2013 10:33:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

On 07/04/2013 04:02 AM, Peter Maydell wrote:
> 
> My ARM system doesn't have a sys/auxv.h, which renders most of this patch
> a bit moot (and certainly untestable :-)). Do newer glibc have this?

glibc 2.16 has this.

I've also got another pending patch set that implements getauxval inside
qemu if it's not present in the system library.  Which means that we can
eliminate some of the ifdefery seen here.

>> +        unsigned long hwcap = getauxval(AT_HWCAP);
>> +        use_idiv_instructions = hwcap & (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT);
> 
> Doesn't this mean we'll try to use the ARM division
> insns even if the CPU only supports the Thumb encodings?
> I think you should only be testing for whether HWCAP_ARM_IDIVA
> is set.

I suppose.  Though later kernels have actually merged these bits:

uapi/asm/hwcap.h:27:#define HWCAP_IDIV  (HWCAP_IDIVA | HWCAP_IDIVT)


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]