[llvm-bugs] [Bug 51929] New: [arm][thumb2][integrated as] incorrect padding at end of code sequence

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 21 12:10:55 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51929

            Bug ID: 51929
           Summary: [arm][thumb2][integrated as] incorrect padding at end
                    of code sequence
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: ndesaulniers at google.com
                CC: kristof.beyls at arm.com, llvm-bugs at lists.llvm.org,
                    natechancellor at gmail.com, rengolin at gmail.com,
                    smithp352 at googlemail.com, srhines at google.com,
                    Ties.Stuij at arm.com
            Blocks: 4068

Via: https://github.com/ClangBuiltLinux/linux/issues/1447

$ clang --target=arm-linux-gnueabi -Wa,-mthumb tlb-v7.s -o clang.o
-Wa,-march=armv7-a -c

and

$ clang --target=arm-linux-gnueabi -Wa,-mthumb tlb-v7.s -o gas.o
-Wa,-march=armv7-a -c -fno-integrated-as

produce different output given the input:

.align 0
mov pc, lr

ie.

$ llvm-objdump -dr clang.o  | tail -n2
00000000 <$t.0>:
       0: f7 46         mov     pc, lr
$ llvm-objdump -dr gas.o  | tail -n3
00000000 <$t>:
       0: f7 46         mov     pc, lr
       2: 00 bf         nop


This looks somewhat related perhaps to
https://bugs.llvm.org/show_bug.cgi?id=48512.  Looking throught GAS' issue
tracker, I think this might be the equivalent bug.

https://sourceware.org/bugzilla/show_bug.cgi?id=12931

This difference in behavior seems to be causing a boot failure for THUMB2 linux
kernels assembled with Clang in QEMU 6.2.0+.


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=4068
[Bug 4068] [Meta] Compiling the Linux kernel with clang
-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210921/57ef2260/attachment.html>


More information about the llvm-bugs mailing list