[llvm-bugs] [Bug 50147] New: missing mflr/mtlr (link register save/restore) when using inline asm w/ "lr" clobber
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 27 13:45:51 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50147
Bug ID: 50147
Summary: missing mflr/mtlr (link register save/restore) when
using inline asm w/ "lr" clobber
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: PowerPC
Assignee: unassignedbugs at nondot.org
Reporter: ndesaulniers at google.com
CC: llvm-bugs at lists.llvm.org, natechancellor at gmail.com,
nemanja.i.ibm at gmail.com, srhines at google.com,
ulrich.weigand at de.ibm.com, uweigand at de.ibm.com
Blocks: 4068
example:
void foo (void) {
asm ("":::"lr");
}
powerpc64le-linux-gnu-gcc -O2:
foo:
mflr 0
std 0,16(1)
ld 0,16(1)
mtlr 0
blr
clang --target=powerpc64le-linux-gnu -O2:
foo:
blr
This is causing ppc32 Linux kernels to hang when powering down, resulting in CI
failures, as reported by Nathan Chancellor and debugged by Christophe Leroy in
https://lists.ozlabs.org/pipermail/linuxppc-dev/2021-April/228246.html.
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/20210427/e03de2bd/attachment.html>
More information about the llvm-bugs
mailing list