Remove restriction on NEON alignment values. Some of the NEON ld/st
authorBob Wilson <bob.wilson@apple.com>
Wed, 14 Jul 2010 23:54:43 +0000 (23:54 +0000)
committerBob Wilson <bob.wilson@apple.com>
Wed, 14 Jul 2010 23:54:43 +0000 (23:54 +0000)
instructions use different values (e.g., 2-byte or 4-byte alignment).
Also fix ARMInstPrinter to print these alignments as bits instead of bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108386 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMAddressingModes.h
lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp

index d316b13e04884ac9015d7abd392eb841b9f08c71..92a13f1d751ca09d734ba147487983310f8939cb 100644 (file)
@@ -519,9 +519,8 @@ namespace ARM_AM {
   //
   // This is stored in two operands [regaddr, align].  The first is the
   // address register.  The second operand is the value of the alignment
-  // specifier to use or zero if no explicit alignment.
-  // Valid alignments are: 0, 8, 16, and 32 bytes, depending on the specific
-  // instruction.
+  // specifier in bytes or zero if no explicit alignment.
+  // Valid alignments depend on the specific instruction.
 
   //===--------------------------------------------------------------------===//
   // NEON Modified Immediates
index 6a40cf3602e97ba0606f976a940d8e3a8d3a1a00..946f4744f5bbce7baf61291da650507429ef0803 100644 (file)
@@ -602,12 +602,8 @@ void ARMAsmPrinter::printAddrMode6Operand(const MachineInstr *MI, int Op,
 
   O << "[" << getRegisterName(MO1.getReg());
   if (MO2.getImm()) {
-    unsigned Align = MO2.getImm();
-    assert((Align == 8 || Align == 16 || Align == 32) &&
-           "unexpected NEON load/store alignment");
-    Align <<= 3;
     // FIXME: Both darwin as and GNU as violate ARM docs here.
-    O << ", :" << Align;
+    O << ", :" << (MO2.getImm() << 3);
   }
   O << "]";
 }
index 170819ad4f06ada2a316642bf7609b6417ca4b33..edc934549b288f3406d7a864bf8246572d5db03a 100644 (file)
@@ -442,7 +442,7 @@ void ARMInstPrinter::printAddrMode6Operand(const MCInst *MI, unsigned OpNum,
   O << "[" << getRegisterName(MO1.getReg());
   if (MO2.getImm()) {
     // FIXME: Both darwin as and GNU as violate ARM docs here.
-    O << ", :" << MO2.getImm();
+    O << ", :" << (MO2.getImm() << 3);
   }
   O << "]";
 }