[llvm-bugs] [Bug 37289] New: Randomly emitted all-zeros or all-ones XMM constants generate invalid code (x86-64, MCJIT, small code model)
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Apr 29 15:31:18 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37289
Bug ID: 37289
Summary: Randomly emitted all-zeros or all-ones XMM constants
generate invalid code (x86-64, MCJIT, small code
model)
Product: libraries
Version: 6.0
Hardware: PC
OS: Linux
Status: NEW
Severity: release blocker
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: nekotekina at gmail.com
CC: llvm-bugs at lists.llvm.org
Example of the faulty instruction (crashes with access violation):
0: c5 c9 74 2c 25 b0 0a 00 00 vpcmpeqb xmm5,xmm6,XMMWORD PTR ds:0xab0
I'm not completely sure what's going on, but I think it's supposed to emit
RIP-relative address location. But instead, it uses ds segment register, which
is assumed to be zero.
I noticed that the constant in question is all zeros or all ones. They are
usually generated by PXOR or PCMPEQD-alike idiom.
Attachment contains ELF file produced by MCJIT, with broken function.
--
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/20180429/90ed8a9d/attachment.html>
More information about the llvm-bugs
mailing list