diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-11-14 22:28:39 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-11-14 22:28:39 +0000 |
commit | 7996b157240dec6b0ee19207135f69d2eb8c4151 (patch) | |
tree | 4c1acfc93e1c3b4d4fdc8a2b2e18a94d464081da /llvm/lib | |
parent | e5dc7550a5d1d40caf873bce0f064a820a3bb5a2 (diff) | |
download | bcm5719-llvm-7996b157240dec6b0ee19207135f69d2eb8c4151.tar.gz bcm5719-llvm-7996b157240dec6b0ee19207135f69d2eb8c4151.zip |
ARM assembly parsing type suffix options for VLDR/VSTR.
rdar://10435076
llvm-svn: 144575
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ARM/ARMInstrFormats.td | 19 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMInstrVFP.td | 9 |
2 files changed, 28 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrFormats.td b/llvm/lib/Target/ARM/ARMInstrFormats.td index 12cb4640f69..6d5b6a46157 100644 --- a/llvm/lib/Target/ARM/ARMInstrFormats.td +++ b/llvm/lib/Target/ARM/ARMInstrFormats.td @@ -1991,3 +1991,22 @@ class NVDupLane<bits<4> op19_16, bit op6, dag oops, dag iops, 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>; +} + diff --git a/llvm/lib/Target/ARM/ARMInstrVFP.td b/llvm/lib/Target/ARM/ARMInstrVFP.td index 22a464e50cd..06cb79a50b3 100644 --- a/llvm/lib/Target/ARM/ARMInstrVFP.td +++ b/llvm/lib/Target/ARM/ARMInstrVFP.td @@ -1172,3 +1172,12 @@ def : VFP2InstAlias<"vstr$p $Dd, $addr", (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)>; |