[Bug target/55019] New: Incorrectly use live argument register to save high register in thumb1 prologue

terry.guo at arm dot com gcc-bugzilla@gcc.gnu.org
Mon Oct 22 09:43:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55019

             Bug #: 55019
           Summary: Incorrectly use live argument register to save high
                    register in thumb1 prologue
    Classification: Unclassified
           Product: gcc
           Version: 4.7.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: terry.guo@arm.com


When run 4.7 regression test on cortex-m0 with options "-mthumb -mcpu=cortex-m0
-O1 -funroll-loops", case gcc.dg/torture/builtin-complex-1.c will fail due to
the corruption of argument register as shown in below:

compare:
    push    {r3, r4, r6, lr}
    mov    r6, fp
    mov    r4, sl
    mov    r3, r9    <<-- r3 is clobbered
    push    {r3, r4, r6}
    mov    r6, r8
    push    {r6}
    mov    fp, r0
    mov    sl, r1
    mov    r9, r2
    mov    r8, r3  <<-- wrong value is used



More information about the Gcc-bugs mailing list