forked from OSchip/llvm-project
[WebAssembly] Use the new offset syntax for memory operands in inline asm.
llvm-svn: 255788
This commit is contained in:
parent
88a7a2eac7
commit
e2831b4e27
|
@ -260,7 +260,9 @@ bool WebAssemblyAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
|
|||
report_fatal_error("There are no defined alternate asm variants");
|
||||
|
||||
if (!ExtraCode) {
|
||||
OS << regToString(MI->getOperand(OpNo));
|
||||
// TODO: For now, we just hard-code 0 as the constant offset; teach
|
||||
// SelectInlineAsmMemoryOperand how to do address mode matching.
|
||||
OS << "0(" + regToString(MI->getOperand(OpNo)) + ')';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ entry:
|
|||
; CHECK-LABEL: bar:
|
||||
; CHECK-NEXT: .param i32, i32{{$}}
|
||||
; CHECK-NEXT: #APP{{$}}
|
||||
; CHECK-NEXT: # $1 = bbb($0){{$}}
|
||||
; CHECK-NEXT: # 0($1) = bbb(0($0)){{$}}
|
||||
; CHECK-NEXT: #NO_APP{{$}}
|
||||
; CHECK-NEXT: return{{$}}
|
||||
define void @bar(i32* %r, i32* %s) {
|
||||
|
|
Loading…
Reference in New Issue