[llvm-commits] [llvm] r74988 - in /llvm/trunk/lib/Target/ARM: ARM.td ARMInstrFormats.td ARMInstrInfo.h
Evan Cheng
evan.cheng at apple.com
Tue Jul 7 18:46:36 PDT 2009
Author: evancheng
Date: Tue Jul 7 20:46:35 2009
New Revision: 74988
URL: http://llvm.org/viewvc/llvm-project?rev=74988&view=rev
Log:
Add a Thumb2 instruction flag to that indicates whether the instruction can be transformed to 16-bit variant.
Modified:
llvm/trunk/lib/Target/ARM/ARM.td
llvm/trunk/lib/Target/ARM/ARMInstrFormats.td
llvm/trunk/lib/Target/ARM/ARMInstrInfo.h
Modified: llvm/trunk/lib/Target/ARM/ARM.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARM.td?rev=74988&r1=74987&r2=74988&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARM.td (original)
+++ llvm/trunk/lib/Target/ARM/ARM.td Tue Jul 7 20:46:35 2009
@@ -131,13 +131,13 @@
let TSFlagsFields = ["AddrModeBits",
"SizeFlag",
"IndexModeBits",
- "isUnaryDataProc",
- "Form"];
+ "Form",
+ "isUnaryDataProc"];
let TSFlagsShifts = [0,
4,
7,
9,
- 10];
+ 15];
}
//===----------------------------------------------------------------------===//
Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrFormats.td?rev=74988&r1=74987&r2=74988&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrFormats.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrFormats.td Tue Jul 7 20:46:35 2009
@@ -54,9 +54,16 @@
def NEONSetLnFrm : Format<26>;
def NEONDupFrm : Format<27>;
-// Misc flag for data processing instructions that indicates whether
+// Misc flags.
+
// the instruction has a Rn register operand.
-class UnaryDP { bit isUnaryDataProc = 1; }
+// UnaryDP - Indicates this is a unary data processing instruction, i.e.
+// it doesn't have a Rn operand.
+class UnaryDP { bit isUnaryDataProc = 1; }
+
+// Xform16Bit - Indicates this Thumb2 instruction may be transformed into
+// a 16-bit Thumb instruction if certain conditions are met.
+class Xform16Bit { bit canXformTo16Bit = 1; }
//===----------------------------------------------------------------------===//
// ARM Instruction flags. These need to match ARMInstrInfo.h.
@@ -130,6 +137,7 @@
// Attributes specific to ARM instructions...
//
bit isUnaryDataProc = 0;
+ bit canXformTo16Bit = 0;
let Constraints = cstr;
}
Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.h?rev=74988&r1=74987&r2=74988&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrInfo.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.h Tue Jul 7 20:46:35 2009
@@ -66,17 +66,10 @@
IndexModePost = 2,
//===------------------------------------------------------------------===//
- // Misc flags.
-
- // UnaryDP - Indicates this is a unary data processing instruction, i.e.
- // it doesn't have a Rn operand.
- UnaryDP = 1 << 9,
-
- //===------------------------------------------------------------------===//
// Instruction encoding formats.
//
- FormShift = 10,
- FormMask = 0x1f << FormShift,
+ FormShift = 9,
+ FormMask = 0x3f << FormShift,
// Pseudo instructions
Pseudo = 0 << FormShift,
@@ -127,6 +120,17 @@
NEONDupFrm = 27 << FormShift,
//===------------------------------------------------------------------===//
+ // Misc flags.
+
+ // UnaryDP - Indicates this is a unary data processing instruction, i.e.
+ // it doesn't have a Rn operand.
+ UnaryDP = 1 << 15,
+
+ // Xform16Bit - Indicates this Thumb2 instruction may be transformed into
+ // a 16-bit Thumb instruction if certain conditions are met.
+ Xform16Bit = 1 << 16,
+
+ //===------------------------------------------------------------------===//
// Field shifts - such shifts are used to set field while generating
// machine instructions.
M_BitShift = 5,
More information about the llvm-commits
mailing list