[llvm] r193593 - AArch64: add 'a' inline asm operand modifier
Tim Northover
tnorthover at apple.com
Tue Oct 29 01:22:34 PDT 2013
Author: tnorthover
Date: Tue Oct 29 03:22:33 2013
New Revision: 193593
URL: http://llvm.org/viewvc/llvm-project?rev=193593&view=rev
Log:
AArch64: add 'a' inline asm operand modifier
This is used in the Linux kernel, and effectively just means "print an
address".
Modified:
llvm/trunk/lib/Target/AArch64/AArch64AsmPrinter.cpp
llvm/trunk/test/CodeGen/AArch64/inline-asm-modifiers.ll
Modified: llvm/trunk/lib/Target/AArch64/AArch64AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64AsmPrinter.cpp?rev=193593&r1=193592&r2=193593&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64AsmPrinter.cpp Tue Oct 29 03:22:33 2013
@@ -230,6 +230,8 @@ bool AArch64AsmPrinter::PrintAsmOperand(
// Output bits 23:12 of symbolic address with appropriate :hi12: relocation
// modifier (currently only for TLS local exec).
return printSymbolicAddress(MI->getOperand(OpNum), true, "hi12", O);
+ case 'a':
+ return PrintAsmMemoryOperand(MI, OpNum, AsmVariant, ExtraCode, O);
}
Modified: llvm/trunk/test/CodeGen/AArch64/inline-asm-modifiers.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/inline-asm-modifiers.ll?rev=193593&r1=193592&r2=193593&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/inline-asm-modifiers.ll (original)
+++ llvm/trunk/test/CodeGen/AArch64/inline-asm-modifiers.ll Tue Oct 29 03:22:33 2013
@@ -107,3 +107,12 @@ define void @test_inline_modifier_c() no
ret void
}
+
+define void @test_inline_modifier_a() nounwind {
+; CHECK-LABEL: test_inline_modifier_a:
+ call void asm sideeffect "prfm pldl1keep, ${0:a}", "r"(i32* @var_simple)
+; CHECK: adrp [[VARHI:x[0-9]+]], var_simple
+; CHECK: add x[[VARADDR:[0-9]+]], [[VARHI]], #:lo12:var_simple
+; CHECK: prfm pldl1keep, [x[[VARADDR]]]
+ ret void
+}
More information about the llvm-commits
mailing list