mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 03:53:04 +02:00
Add support for the 'H' modifier.
llvm-svn: 122667
This commit is contained in:
parent
c3dd871e95
commit
55f7a5057d
@ -302,6 +302,9 @@ void X86AsmPrinter::printLeaMemReference(const MachineInstr *MI, unsigned Op,
|
|||||||
printSymbolOperand(MI->getOperand(Op+3), O);
|
printSymbolOperand(MI->getOperand(Op+3), O);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Modifier && strcmp(Modifier, "H") == 0)
|
||||||
|
O << "+8";
|
||||||
|
|
||||||
if (HasParenPart) {
|
if (HasParenPart) {
|
||||||
assert(IndexReg.getReg() != X86::ESP &&
|
assert(IndexReg.getReg() != X86::ESP &&
|
||||||
"X86 doesn't allow scaling by ESP");
|
"X86 doesn't allow scaling by ESP");
|
||||||
@ -458,6 +461,9 @@ bool X86AsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
|
|||||||
case 'q': // Print SImode register
|
case 'q': // Print SImode register
|
||||||
// These only apply to registers, ignore on mem.
|
// These only apply to registers, ignore on mem.
|
||||||
break;
|
break;
|
||||||
|
case 'H':
|
||||||
|
printMemReference(MI, OpNo, O, "H");
|
||||||
|
return false;
|
||||||
case 'P': // Don't print @PLT, but do print as memory.
|
case 'P': // Don't print @PLT, but do print as memory.
|
||||||
printMemReference(MI, OpNo, O, "no-rip");
|
printMemReference(MI, OpNo, O, "no-rip");
|
||||||
return false;
|
return false;
|
||||||
|
12
test/CodeGen/X86/inline-asm-h.ll
Normal file
12
test/CodeGen/X86/inline-asm-h.ll
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
; RUN: llc -march=x86-64 < %s | FileCheck %s
|
||||||
|
|
||||||
|
@foobar = common global i32 0, align 4
|
||||||
|
|
||||||
|
define void @zed() nounwind {
|
||||||
|
entry:
|
||||||
|
call void asm "movq %mm2,${0:H}", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* @foobar) nounwind
|
||||||
|
ret void
|
||||||
|
}
|
||||||
|
|
||||||
|
; CHECK: zed
|
||||||
|
; CHECK: movq %mm2,foobar+8(%rip)
|
Loading…
Reference in New Issue
Block a user