[llvm-commits] [llvm] r144575 - in /llvm/trunk/lib/Target/ARM: ARMInstrFormats.td ARMInstrVFP.td
Jim Grosbach
grosbach at apple.com
Mon Nov 14 14:28:39 PST 2011
Author: grosbach
Date: Mon Nov 14 16:28:39 2011
New Revision: 144575
URL: http://llvm.org/viewvc/llvm-project?rev=144575&view=rev
Log:
ARM assembly parsing type suffix options for VLDR/VSTR.
rdar://10435076
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrFormats.td
llvm/trunk/lib/Target/ARM/ARMInstrVFP.td
Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrFormats.td?rev=144575&r1=144574&r2=144575&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrFormats.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrFormats.td Mon Nov 14 16:28:39 2011
@@ -1991,3 +1991,22 @@
class NEONFPPat<dag pattern, dag result> : Pat<pattern, result> {
list<Predicate> Predicates = [HasNEON,UseNEONForFP];
}
+
+// VFP/NEON Instruction aliases for type suffices.
+class VFPDataTypeInstAlias<string opc, string dt, string asm, dag Result> :
+ InstAlias<!strconcat(opc, dt, asm), Result>;
+multiclass VFPDT32InstAlias<string opc, string asm, dag Result> {
+ def I32 : VFPDataTypeInstAlias<opc, ".i32", asm, Result>;
+ def S32 : VFPDataTypeInstAlias<opc, ".s32", asm, Result>;
+ def U32 : VFPDataTypeInstAlias<opc, ".u32", asm, Result>;
+ def F32 : VFPDataTypeInstAlias<opc, ".f32", asm, Result>;
+ def F : VFPDataTypeInstAlias<opc, ".f", asm, Result>;
+}
+multiclass VFPDT64InstAlias<string opc, string asm, dag Result> {
+ def I64 : VFPDataTypeInstAlias<opc, ".i64", asm, Result>;
+ def S64 : VFPDataTypeInstAlias<opc, ".s64", asm, Result>;
+ def U64 : VFPDataTypeInstAlias<opc, ".u64", asm, Result>;
+ def F64 : VFPDataTypeInstAlias<opc, ".f64", asm, Result>;
+ def D : VFPDataTypeInstAlias<opc, ".d", asm, Result>;
+}
+
Modified: llvm/trunk/lib/Target/ARM/ARMInstrVFP.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrVFP.td?rev=144575&r1=144574&r2=144575&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrVFP.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrVFP.td Mon Nov 14 16:28:39 2011
@@ -1172,3 +1172,12 @@
(VSTRD DPR:$Dd, addrmode5:$addr, pred:$p)>;
def : VFP2InstAlias<"vstr$p $Sd, $addr",
(VSTRS SPR:$Sd, addrmode5:$addr, pred:$p)>;
+// The suffix can also by typed.
+defm : VFPDT32InstAlias<"vldr$p", "$Sd, $addr",
+ (VLDRS SPR:$Sd, addrmode5:$addr, pred:$p)>;
+defm : VFPDT32InstAlias<"vstr$p", "$Sd, $addr",
+ (VSTRS SPR:$Sd, addrmode5:$addr, pred:$p)>;
+defm : VFPDT64InstAlias<"vldr$p", "$Dd, $addr",
+ (VLDRD DPR:$Dd, addrmode5:$addr, pred:$p)>;
+defm : VFPDT64InstAlias<"vstr$p", "$Dd, $addr",
+ (VSTRD DPR:$Dd, addrmode5:$addr, pred:$p)>;
More information about the llvm-commits
mailing list