summaryrefslogtreecommitdiff
path: root/lib/Target
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-11-14 23:03:21 +0000
committerJim Grosbach <grosbach@apple.com>2011-11-14 23:03:21 +0000
commitffc658b056b7cc0b3f6a2626694b6a4216ed728d (patch)
treeebe680a03750316ed3c572177cd1306a4c0fd173 /lib/Target
parent88990248d3bfb2f265fcf27f8a032ac0eb14d09f (diff)
downloadllvm-ffc658b056b7cc0b3f6a2626694b6a4216ed728d.tar.gz
llvm-ffc658b056b7cc0b3f6a2626694b6a4216ed728d.tar.bz2
llvm-ffc658b056b7cc0b3f6a2626694b6a4216ed728d.tar.xz
ARM VLDR/VSTR instructions don't need a size suffix.
Canonicallize on the non-suffixed form, but continue to accept assembly that has any correctly sized type suffix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144583 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/ARM/ARMInstrFormats.td2
-rw-r--r--lib/Target/ARM/ARMInstrVFP.td27
2 files changed, 11 insertions, 18 deletions
diff --git a/lib/Target/ARM/ARMInstrFormats.td b/lib/Target/ARM/ARMInstrFormats.td
index 6d5b6a4615..841ca741fd 100644
--- a/lib/Target/ARM/ARMInstrFormats.td
+++ b/lib/Target/ARM/ARMInstrFormats.td
@@ -1996,6 +1996,7 @@ class NEONFPPat<dag pattern, dag result> : Pat<pattern, result> {
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 _32 : VFPDataTypeInstAlias<opc, ".32", asm, Result>;
def I32 : VFPDataTypeInstAlias<opc, ".i32", asm, Result>;
def S32 : VFPDataTypeInstAlias<opc, ".s32", asm, Result>;
def U32 : VFPDataTypeInstAlias<opc, ".u32", asm, Result>;
@@ -2003,6 +2004,7 @@ multiclass VFPDT32InstAlias<string opc, string asm, dag Result> {
def F : VFPDataTypeInstAlias<opc, ".f", asm, Result>;
}
multiclass VFPDT64InstAlias<string opc, string asm, dag Result> {
+ def _64 : VFPDataTypeInstAlias<opc, ".64", asm, Result>;
def I64 : VFPDataTypeInstAlias<opc, ".i64", asm, Result>;
def S64 : VFPDataTypeInstAlias<opc, ".s64", asm, Result>;
def U64 : VFPDataTypeInstAlias<opc, ".u64", asm, Result>;
diff --git a/lib/Target/ARM/ARMInstrVFP.td b/lib/Target/ARM/ARMInstrVFP.td
index 06cb79a50b..488c508cc6 100644
--- a/lib/Target/ARM/ARMInstrVFP.td
+++ b/lib/Target/ARM/ARMInstrVFP.td
@@ -69,11 +69,11 @@ def vfp_f64imm : Operand<f64>,
let canFoldAsLoad = 1, isReMaterializable = 1 in {
def VLDRD : ADI5<0b1101, 0b01, (outs DPR:$Dd), (ins addrmode5:$addr),
- IIC_fpLoad64, "vldr", ".64\t$Dd, $addr",
+ IIC_fpLoad64, "vldr", "\t$Dd, $addr",
[(set DPR:$Dd, (f64 (load addrmode5:$addr)))]>;
def VLDRS : ASI5<0b1101, 0b01, (outs SPR:$Sd), (ins addrmode5:$addr),
- IIC_fpLoad32, "vldr", ".32\t$Sd, $addr",
+ IIC_fpLoad32, "vldr", "\t$Sd, $addr",
[(set SPR:$Sd, (load addrmode5:$addr))]> {
// Some single precision VFP instructions may be executed on both NEON and VFP
// pipelines.
@@ -83,11 +83,11 @@ def VLDRS : ASI5<0b1101, 0b01, (outs SPR:$Sd), (ins addrmode5:$addr),
} // End of 'let canFoldAsLoad = 1, isReMaterializable = 1 in'
def VSTRD : ADI5<0b1101, 0b00, (outs), (ins DPR:$Dd, addrmode5:$addr),
- IIC_fpStore64, "vstr", ".64\t$Dd, $addr",
+ IIC_fpStore64, "vstr", "\t$Dd, $addr",
[(store (f64 DPR:$Dd), addrmode5:$addr)]>;
def VSTRS : ASI5<0b1101, 0b00, (outs), (ins SPR:$Sd, addrmode5:$addr),
- IIC_fpStore32, "vstr", ".32\t$Sd, $addr",
+ IIC_fpStore32, "vstr", "\t$Sd, $addr",
[(store SPR:$Sd, addrmode5:$addr)]> {
// Some single precision VFP instructions may be executed on both NEON and VFP
// pipelines.
@@ -1163,21 +1163,12 @@ def FCONSTS : VFPAI<(outs SPR:$Sd), (ins vfp_f32imm:$imm),
def : VFP2InstAlias<"fmstat${p}", (FMSTAT pred:$p)>;
-// The size suffix is optional for VLDR/VSTR
-def : VFP2InstAlias<"vldr$p $Dd, $addr",
- (VLDRD DPR:$Dd, addrmode5:$addr, pred:$p)>;
-def : VFP2InstAlias<"vldr$p $Sd, $addr",
- (VLDRS SPR:$Sd, addrmode5:$addr, pred:$p)>;
-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",
+// VLDR/VSTR accept an optional type suffix.
+defm : VFPDT32InstAlias<"vldr${p}", "$Sd, $addr",
(VLDRS SPR:$Sd, addrmode5:$addr, pred:$p)>;
-defm : VFPDT32InstAlias<"vstr$p", "$Sd, $addr",
+defm : VFPDT32InstAlias<"vstr${p}", "$Sd, $addr",
(VSTRS SPR:$Sd, addrmode5:$addr, pred:$p)>;
-defm : VFPDT64InstAlias<"vldr$p", "$Dd, $addr",
+defm : VFPDT64InstAlias<"vldr${p}", "$Dd, $addr",
(VLDRD DPR:$Dd, addrmode5:$addr, pred:$p)>;
-defm : VFPDT64InstAlias<"vstr$p", "$Dd, $addr",
+defm : VFPDT64InstAlias<"vstr${p}", "$Dd, $addr",
(VSTRD DPR:$Dd, addrmode5:$addr, pred:$p)>;