[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: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v3 08/14] tcg-arm: Make use of conditional availability of opcodes for divide |
Date: |
Thu, 4 Jul 2013 18:39:06 +0100 |
On 4 July 2013 18:33, Richard Henderson <address@hidden> wrote:
> On 07/04/2013 04:02 AM, Peter Maydell wrote:
>>> + 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)
Yes, but the two bits are still separate values:
#define HWCAP_IDIVA (1 << 17)
#define HWCAP_IDIVT (1 << 18)
Presumably the HWCAP_IDIV is if you want to check that you
have full division support via
(hwcap & HWCAP_IDIV) == HWCAP_IDIV
We could do that if you prefer; it would be effectively
the same as just testing the IDIVA bit though.
-- PMM
- [Qemu-devel] [PATCH v3 04/14] tcg-ppc: Don't implement rem, (continued)
- [Qemu-devel] [PATCH v3 04/14] tcg-ppc: Don't implement rem, Richard Henderson, 2013/07/03
- [Qemu-devel] [PATCH v3 05/14] tcg-ppc64: Don't implement rem, Richard Henderson, 2013/07/03
- [Qemu-devel] [PATCH v3 06/14] tcg: Allow non-constant control macros, Richard Henderson, 2013/07/03
- [Qemu-devel] [PATCH v3 07/14] tcg: Simplify logic using TCG_OPF_NOT_PRESENT, Richard Henderson, 2013/07/03
- [Qemu-devel] [PATCH v3 08/14] tcg-arm: Make use of conditional availability of opcodes for divide, Richard Henderson, 2013/07/03
- [Qemu-devel] [PATCH v3 09/14] tcg-arm: Simplify logic in detecting the ARM ISA in use, Richard Henderson, 2013/07/03
[Qemu-devel] [PATCH v3 10/14] tcg-arm: Use AT_PLATFORM to detect the host ISA, Richard Henderson, 2013/07/03
[Qemu-devel] [PATCH v3 11/14] tcg: Fix high_pc fields in .debug_info, Richard Henderson, 2013/07/03
[Qemu-devel] [PATCH v3 12/14] tcg: Move the CIE and FDE header definitions to common code, Richard Henderson, 2013/07/03
[Qemu-devel] [PATCH v3 13/14] tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size, Richard Henderson, 2013/07/03