diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-04-05 18:02:46 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-04-05 18:02:46 +0000 |
commit | 12bb2958c4f335e79c831136d2dfed9f375f06ff (patch) | |
tree | 0e9ada67af72b66390e64077919fb8570cfea8c7 /lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp | |
parent | b26d8d7c493ec773661c1d3a7863f798f3786e40 (diff) | |
download | external_llvm-12bb2958c4f335e79c831136d2dfed9f375f06ff.zip external_llvm-12bb2958c4f335e79c831136d2dfed9f375f06ff.tar.gz external_llvm-12bb2958c4f335e79c831136d2dfed9f375f06ff.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp')
-rw-r--r-- | lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp index f080fa8..fc2aa75 100644 --- a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp +++ b/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"; |