Closed Bug 917064 Opened 11 years ago Closed 11 years ago

ARM: enable HWCAP_ARMv7 when on qemu

Categories

(Core :: JavaScript Engine, defect)

ARM
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: luke, Assigned: luke)

Details

Attachments

(1 file)

Currently, when run on qemu, all the HWCAP flags are unset because getFlags() sees the host's /proc/self/auxv.
Attachment #805702 - Flags: review?(mrosenberg)
It might fail on real devices that simply have not mounted /proc/
or mounted it elsewhere.

This has been a requested feature for some time and my attempts
are in bug 857071.

The original patch in bug 857071 allowed the cpu features to be set by
an environment variable.  It was rejected.

It would also be nice to start some automated testing on the ARMv6 builds
because they are in bad shape at present.  I guess qemu is not useful
without this patch because of the poor state of the ARMv6 paths.  Most of
the problems seem to be related to the constant pools.
Attachment #805702 - Flags: review?(mrosenberg) → review+
You might want to consider making the setting of all the options
conditional on an environment variable.  This could be easily set
in the js script that calls qemu and would provide a way to
explicitly inform the js shell that it is running under qemu.
I think you already have some patches in progress to do that.  How about if I replace the current 'flags = ...' with

#if defined(__ARM_ARCH-7__) || defined(__ARM_ARCH_7A__)
flags = HWCAP_ARMv7;
isSet = true;
#endif

?
(In reply to Luke Wagner [:luke] from comment #4)
> I think you already have some patches in progress to do that.  How about if
> I replace the current 'flags = ...' with
> 
> #if defined(__ARM_ARCH-7__) || defined(__ARM_ARCH_7A__)
> flags = HWCAP_ARMv7;
> isSet = true;
> #endif
> 
> ?

Yes, that will enable the use of the MOVWT instruction and it should
work much better under qemu.  The non-ARMv6 build is already compiled
to exploit ARMv7 specific instructions so hard coding this here seems
ok.
Summary: ARM: enable all the HWCAP_* flags when on qemu → ARM: enable HWCAP_ARMv7 when on qemu
https://hg.mozilla.org/mozilla-central/rev/e4cc83c9a88f
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: