Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

[x86 assembler] Instruction silently fails #13644

Open Quuxplusone opened 12 years ago

Quuxplusone commented 12 years ago
Bugzilla Link PR13603
Status NEW
Importance P normal
Reported by Zoxc (zoxc32@gmail.com)
Reported on 2012-08-14 10:11:44 -0700
Last modified on 2018-03-20 09:32:03 -0700
Version 3.1
Hardware PC Windows NT
CC grosbach@apple.com, llvm-bugs@lists.llvm.org, rafael@espindo.la
Fixed by commit(s)
Attachments test.ll (382 bytes, application/octet-stream)
Blocks
Blocked by
See also

Created attachment 9052 Test bitcode

When compiling the attached bitcode with llc -filetype=obj test.ll, the inline assembly disappears. It shows up with llc -filetype=asm test.ll and compiles using GNU as.

Quuxplusone commented 12 years ago

Attached test.ll (382 bytes, application/octet-stream): Test bitcode

Quuxplusone commented 12 years ago
"mov %gs:($56), %rsp" is not valid syntax. 'as' fails with:
$ as asm.s
asm.s:9:32-bit absolute addressing is not supported for x86-64
asm.s:9:cannot do signed 4 byte relocation

The problem here is that the x86 integrated assembler is just quietly
discarding the instruction rather than issuing a diagnostic.
Quuxplusone commented 12 years ago

My assembler (GNU assembler 2.22) just links to '$56'.