compile failure on ARMv7 hosts when compiled for thumb if --enable-debug

Bug #870990 reported by Peter Maydell on 2011-10-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro QEMU
Fix Released

Bug Description

QEMU won't compile if you configure --enable-debug and gcc is building in Thumb2.

This is because we have picked r7 as the TCG_AREG0 (fixed register for holding the CPU environment pointer), which clashes with its use as the frame pointer in Thumb. (ARM compilation is fine because the frame pointer is a different register there.)

We could fix this by forcing -fomit-frame-pointer when compiling the relevant source files (which is what we do on x86 where register pressure forces us to use EBP for AREG0) but it would be much better to just move AREG0 to something else. We can use r6 if we want to stick with a low-reg, or move up to r8 if we think a high-reg likely to be a better choice.

 * compile with both r6 and r8, and do a trivial benchmarking run
 * submit patch (before the upstream 1.0 freeze!)

NB: AREG0 is set in two places that need to stay in sync: dyngen-exec.h and tcg/arm/tcg-target.h

Peter Maydell (pmaydell) on 2011-10-08
Changed in qemu-linaro:
status: New → Confirmed
Peter Maydell (pmaydell) wrote :
Changed in qemu-linaro:
milestone: none → 2012.01
status: Confirmed → In Progress
Peter Maydell (pmaydell) on 2012-01-04
Changed in qemu-linaro:
status: In Progress → Fix Committed
Peter Maydell (pmaydell) on 2012-01-12
Changed in qemu-linaro:
status: Fix Committed → Fix Released
Changed in qemu:
status: New → Fix Committed
Peter Maydell (pmaydell) on 2012-07-10
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints