[LLVMbugs] [Bug 13259] New: ARM Assembler does not support [pc, #offset] syntax for Thumb narrow LDR instructions.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 3 08:04:29 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13259

             Bug #: 13259
           Summary: ARM Assembler does not support [pc, #offset] syntax
                    for Thumb narrow LDR instructions.
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: richard.barton at arm.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


LDR <Rn>,[pc, #0] 

Should form a valid syntax for a pc-relative load. Currently the Thumb
assembler only generates the wide encoding for this instruction, when the
narrow encoding should be available.

Reproduce with:

echo "LDR r0,[pc, #4]" | ./llvm-oss/build-dbg/bin/llvm-mc -triple thumbv7
-show-encoding -show-inst

MC appears to treat immediates as offsets form the pc in this context (which I
think is more than a little questionable). Assembling "LDR r0,#4" gives the
narrow encoding.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list