aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
diff options
context:
space:
mode:
authorHao Liu <Hao.Liu@arm.com>2013-11-05 03:39:32 +0000
committerHao Liu <Hao.Liu@arm.com>2013-11-05 03:39:32 +0000
commit591c2f738a3e12026ff5504a486d54fc21fb3049 (patch)
tree6909db3910a1e52022a3166d0b2d7648269f5bc3 /lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
parent8263dcdf23bc534405745959c97cbfd562362458 (diff)
downloadexternal_llvm-591c2f738a3e12026ff5504a486d54fc21fb3049.zip
external_llvm-591c2f738a3e12026ff5504a486d54fc21fb3049.tar.gz
external_llvm-591c2f738a3e12026ff5504a486d54fc21fb3049.tar.bz2
Implement AArch64 post-index vector load/store multiple N-element structure class SIMD(lselem-post).
Including following 14 instructions: 4 ld1 insts: post-index load multiple 1-element structure to sequential 1/2/3/4 registers. ld2/ld3/ld4: post-index load multiple N-element structure to sequential N registers (N=2,3,4). 4 st1 insts: post-index store multiple 1-element structure from sequential 1/2/3/4 registers. st2/st3/st4: post-index store multiple N-element structure from sequential N registers (N = 2,3,4). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194043 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp')
-rw-r--r--lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
index 1f7a7d8..da5dd93 100644
--- a/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ b/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -815,6 +815,17 @@ public:
return true;
}
+ // if value == N, return true
+ template<int N>
+ bool isExactImm() const {
+ if (!isImm()) return false;
+
+ const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
+ if (!CE) return false;
+
+ return CE->getValue() == N;
+ }
+
static AArch64Operand *CreateImmWithLSL(const MCExpr *Val,
unsigned ShiftAmount,
bool ImplicitAmount,