ARM assembly parsing type suffix options for VLDR/VSTR.

rdar://10435076

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144575 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2011-11-14 22:28:39 +00:00
parent f7228f7038
commit 02e3d9268f
2 changed files with 28 additions and 0 deletions

View File

@ -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>;
}

View File

@ -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)>;