[llvm-bugs] [Bug 27081] New: invalid instruction generated for atomic store of __int128 on aarch64
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Mar 25 17:58:56 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27081
Bug ID: 27081
Summary: invalid instruction generated for atomic store of
__int128 on aarch64
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: AArch64
Assignee: unassignedbugs at nondot.org
Reporter: yyc1992 at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
The following program generates an invalid instruction on llvm trunk.
```
#include <atomic>
#include <stdint.h>
std::atomic<__int128> a;
__attribute__((noinline)) void f(int64_t v)
{
a.store(v);
}
int main()
{
f(1);
return 0;
}
```
The assembly is
```
0000000000400610 <_Z1fl>:
400610: 90000089 adrp x9, 410000 <__FRAME_END__+0xf8a0>
400614: 937ffc08 asr x8, x0, #63
400618: 91278129 add x9, x9, #0x9e0
40061c: c87ffd3f ldaxp xzr, xzr, [x9]
400620: c82aa120 stlxp w10, x0, x8, [x9]
400624: 35ffffca cbnz w10, 40061c <_Z1fl+0xc>
400628: d65f03c0 ret
```
And the `ldaxp` instruction raise a SIGILL.
(GCC raises a linker error in this case...)
--
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/20160326/cb4ae115/attachment-0001.html>
More information about the llvm-bugs
mailing list