Index: src/arm/constants-arm.h |
diff --git a/src/arm/constants-arm.h b/src/arm/constants-arm.h |
index 4fa49e3d3c4e3dbc91d013be18f82901b0f2f269..a569383f24f70920fa55a02415277d0783595d65 100644 |
--- a/src/arm/constants-arm.h |
+++ b/src/arm/constants-arm.h |
@@ -84,9 +84,18 @@ namespace v8 { |
namespace internal { |
// Constant pool marker. |
-const int kConstantPoolMarkerMask = 0xffe00000; |
-const int kConstantPoolMarker = 0x0c000000; |
-const int kConstantPoolLengthMask = 0x001ffff; |
+// Use UDF, the permanently undefined instruction. |
+const int kConstantPoolMarkerMask = 0xfff000f0; |
+const int kConstantPoolMarker = 0xe7f000f0; |
+const int kConstantPoolLengthMaxMask = 0xffff; |
+inline int EncodeConstantPoolLength(int length) { |
+ ASSERT((length & kConstantPoolLengthMaxMask) == length); |
+ return ((length & 0xfff0) << 4) | (length & 0xf); |
+} |
+inline int DecodeConstantPoolLength(int instr) { |
+ ASSERT((instr & kConstantPoolMarkerMask) == kConstantPoolMarker); |
+ return ((instr >> 4) & 0xfff0) | (instr & 0xf); |
+} |
// Number of registers in normal ARM mode. |
const int kNumRegisters = 16; |