Issue |
132084
|
Summary |
[ms] [llvm-ml] Allow size directives on register operands
|
Labels |
new issue
|
Assignees |
|
Reporter |
MisterDA
|
```asm
.CODE
mov rsp, r11
mov qword ptr rsp, r11
mov rsp, qword ptr r11
mov qword ptr rsp, qword ptr r11
END
```
```console
$ ml64 -nologo -Cp -c -Fo test.obj -W3 test.asm
Assembling: test.asm
$ objdump -D --section='.text$mn' test.obj
test.obj: file format pe-x86-64
Disassembly of section .text$mn:
0000000000000000 <.text$mn>:
0: 49 8b e3 mov %r11,%rsp
3: 49 8b e3 mov %r11,%rsp
6: 49 8b e3 mov %r11,%rsp
9: 49 8b e3 mov %r11,%rsp
$ llvm-ml -m64 -nologo -c -Fo test.obj test.asm
test.asm:3:23: error: expected memory operand after 'ptr', found register operand instead
mov qword ptr rsp, r11
^
test.asm:4:28: error: expected memory operand after 'ptr', found register operand instead
mov rsp, qword ptr r11
^
test.asm:5:23: error: expected memory operand after 'ptr', found register operand instead
mov qword ptr rsp, qword ptr r11
^
```
Not sure if the size directive is needed here or not, but LLVM exits with a error. Microsoft's ml64 accepts the move register-to-register with a size directive.
cc @ericastor
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs