summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-04-05 18:02:46 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-04-05 18:02:46 +0000
commit33d3a9fadcad11503fe51b4a0196d1dd1ab93a87 (patch)
tree12ccf1bf48ab3e6a17b545d6a1b3f47ebe2f591a /llvm/lib/Target
parent7692db3ea231754886d220dc2e60a9fac4c71e68 (diff)
downloadbcm5719-llvm-33d3a9fadcad11503fe51b4a0196d1dd1ab93a87.tar.gz
bcm5719-llvm-33d3a9fadcad11503fe51b4a0196d1dd1ab93a87.zip
Constants with multiple encodings (ARM):
An alternative syntax is available for a modified immediate constant that permits the programmer to specify the encoding directly. In this syntax, #<const> is instead written as #<byte>,#<rot>, where: <byte> is the numeric value of abcdefgh, in the range 0-255 <rot> is twice the numeric value of rotation, an even number in the range 0-30. llvm-svn: 128897
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
index f080fa81e94..fc2aa7526b7 100644
--- a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
+++ b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
@@ -136,9 +136,10 @@ static void printSOImm(raw_ostream &O, int64_t V, raw_ostream *CommentStream,
unsigned Rot = ARM_AM::getSOImmValRot(V);
// Print low-level immediate formation info, per
- // A5.1.3: "Data-processing operands - Immediate".
+ // A5.2.3: Data-processing (immediate), and
+ // A5.2.4: Modified immediate constants in ARM instructions
if (Rot) {
- O << "#" << Imm << ", " << Rot;
+ O << "#" << Imm << ", #" << Rot;
// Pretty printed version.
if (CommentStream)
*CommentStream << (int)ARM_AM::rotr32(Imm, Rot) << "\n";
OpenPOWER on IntegriCloud