diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-12-19 18:31:43 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-12-19 18:31:43 +0000 |
commit | eeaf1c1636c664c707fd9ecc96916fd20ddf137a (patch) | |
tree | 809eef62cdd7e6b7be15aacd3633de179f1e6864 /lib/Target/ARM/AsmParser | |
parent | 3346dcef02a5b43bbd03d0b84803b60b4b77bf63 (diff) | |
download | external_llvm-eeaf1c1636c664c707fd9ecc96916fd20ddf137a.zip external_llvm-eeaf1c1636c664c707fd9ecc96916fd20ddf137a.tar.gz external_llvm-eeaf1c1636c664c707fd9ecc96916fd20ddf137a.tar.bz2 |
ARM NEON relax parse time diagnostics for alignment specifiers.
There's more variation that we need to handle. Error checking will need
to be on operand predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146884 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/AsmParser')
-rw-r--r-- | lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index cd86065..912a82e 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -361,7 +361,7 @@ class ARMOperand : public MCParsedAsmOperand { ARM_AM::ShiftOpc ShiftType; // Shift type for OffsetReg unsigned ShiftImm; // shift for OffsetReg. unsigned Alignment; // 0 = no alignment specified - // n = alignment in bytes (8, 16, or 32) + // n = alignment in bytes (2, 4, 8, 16, or 32) unsigned isNegative : 1; // Negated OffsetReg? (~'U' bit) } Memory; @@ -3954,7 +3954,10 @@ parseMemory(SmallVectorImpl<MCParsedAsmOperand*> &Operands) { unsigned Align = 0; switch (CE->getValue()) { default: - return Error(E, "alignment specifier must be 64, 128, or 256 bits"); + return Error(E, + "alignment specifier must be 16, 32, 64, 128, or 256 bits"); + case 16: Align = 2; break; + case 32: Align = 4; break; case 64: Align = 8; break; case 128: Align = 16; break; case 256: Align = 32; break; |