diff options
author | Hao Liu <Hao.Liu@arm.com> | 2013-10-10 17:00:52 +0000 |
---|---|---|
committer | Hao Liu <Hao.Liu@arm.com> | 2013-10-10 17:00:52 +0000 |
commit | 6a5a667517160ca1b557002a29d08868ae029451 (patch) | |
tree | ab7bac232ae99d6b321cad35b0d0a5d8fbd39fcf /lib/Target/AArch64/Utils/AArch64BaseInfo.h | |
parent | 812ddcc50f8bc3ec6ce115863ff2263815906aaf (diff) | |
download | external_llvm-6a5a667517160ca1b557002a29d08868ae029451.zip external_llvm-6a5a667517160ca1b557002a29d08868ae029451.tar.gz external_llvm-6a5a667517160ca1b557002a29d08868ae029451.tar.bz2 |
Implement AArch64 vector load/store multiple N-element structure class SIMD(lselem).
Including following 14 instructions:
4 ld1 insts: load multiple 1-element structure to sequential 1/2/3/4 registers.
ld2/ld3/ld4: load multiple N-element structure to sequential N registers (N=2,3,4).
4 st1 insts: store multiple 1-element structure from sequential 1/2/3/4 registers.
st2/st3/st4: store multiple N-element structure from sequential N registers (N = 2,3,4).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/Utils/AArch64BaseInfo.h')
-rw-r--r-- | lib/Target/AArch64/Utils/AArch64BaseInfo.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/Target/AArch64/Utils/AArch64BaseInfo.h b/lib/Target/AArch64/Utils/AArch64BaseInfo.h index e675efc..7db5238 100644 --- a/lib/Target/AArch64/Utils/AArch64BaseInfo.h +++ b/lib/Target/AArch64/Utils/AArch64BaseInfo.h @@ -306,6 +306,50 @@ namespace A64SE { }; } +namespace A64Layout { + enum VectorLayout { + Invalid = -1, + _8B, + _4H, + _2S, + _1D, + + _16B, + _8H, + _4S, + _2D + }; +} + +inline static const char * +A64VectorLayoutToString(A64Layout::VectorLayout Layout) { + switch (Layout) { + case A64Layout::_8B: return ".8b"; + case A64Layout::_4H: return ".4h"; + case A64Layout::_2S: return ".2s"; + case A64Layout::_1D: return ".1d"; + case A64Layout::_16B: return ".16b"; + case A64Layout::_8H: return ".8h"; + case A64Layout::_4S: return ".4s"; + case A64Layout::_2D: return ".2d"; + default: llvm_unreachable("Unknown Vector Layout"); + } +} + +inline static A64Layout::VectorLayout +A64StringToVectorLayout(StringRef LayoutStr) { + return StringSwitch<A64Layout::VectorLayout>(LayoutStr) + .Case(".8b", A64Layout::_8B) + .Case(".4h", A64Layout::_4H) + .Case(".2s", A64Layout::_2S) + .Case(".1d", A64Layout::_1D) + .Case(".16b", A64Layout::_16B) + .Case(".8h", A64Layout::_8H) + .Case(".4s", A64Layout::_4S) + .Case(".2d", A64Layout::_2D) + .Default(A64Layout::Invalid); +} + namespace A64SysReg { enum SysRegROValues { MDCCSR_EL0 = 0x9808, // 10 011 0000 0001 000 |