Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

xacquire/xrelease parsed improperly #30053

Open Quuxplusone opened 7 years ago

Quuxplusone commented 7 years ago
Bugzilla Link PR31080
Status NEW
Importance P normal
Reported by Keno Fischer (keno@alumni.harvard.edu)
Reported on 2016-11-20 18:08:02 -0800
Last modified on 2018-01-19 01:40:57 -0800
Version 3.9
Hardware PC All
CC andrew.v.tischenko@gmail.com, craig.topper@gmail.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks PR10988
Blocked by
See also
$ llvm-mc
xrelease lock subq $1,4(%rip)
    .text
<stdin>:1:15: error: unexpected token in argument list
xrelease lock subq $1,4(%rip)
              ^

gcc accepts this fine. For now treating is as a separate instruction with ; works, but seems a little wrong.

xrelease; lock subq $1,4(%rip)
Quuxplusone commented 6 years ago
Hi,
I checked this issue with the current trunk: everythig works perfectly:

atischenko@ip-172-31-21-62:~/workspaces/trunk/build/bin$ cat test.s
xrelease lock subq $1,4(%rip);

atischenko@ip-172-31-21-62:~/workspaces/trunk/build/bin$ llvm-mc -show-encoding
test.s
        .text
        xrelease                        # encoding: [0xf3]
        lock            subq    $1, 4(%rip) # encoding: [0xf0,0x48,0x83,0x2d,0x03,0x00,0x00,0x00,0x01]

atischenko@ip-172-31-21-62:~/workspaces/trunk/build/bin$ cat test.txt
0xf3, 0xf0,0x48,0x83,0x2d,0x03,0x00,0x00,0x00,0x01

atischenko@ip-172-31-21-62:~/workspaces/trunk/build/bin$ llvm-mc -disassemble
test.txt
        .text
        xrelease
        lock
        subq    $1, 3(%rip)

As you see both assembler and dissassembler produce correct results.
It seems we should close the bug, right?