Index: src/arm/assembler-arm.cc |
diff --git a/src/arm/assembler-arm.cc b/src/arm/assembler-arm.cc |
index c3f9ab0b9b2501997a7f83d154b1607c6fad6ca3..7c674af9a60e5298e0352185c7976679709d6ca6 100644 |
--- a/src/arm/assembler-arm.cc |
+++ b/src/arm/assembler-arm.cc |
@@ -417,11 +417,11 @@ const Instr kPopRegPattern = |
// mov lr, pc |
const Instr kMovLrPc = al | MOV | kRegister_pc_Code | kRegister_lr_Code * B12; |
// ldr rd, [pc, #offset] |
-const Instr kLdrPCMask = 15 * B24 | 7 * B20 | 15 * B16; |
-const Instr kLdrPCPattern = 5 * B24 | L | kRegister_pc_Code * B16; |
+const Instr kLdrPCImmedMask = 15 * B24 | 7 * B20 | 15 * B16; |
+const Instr kLdrPCImmedPattern = 5 * B24 | L | kRegister_pc_Code * B16; |
// ldr rd, [pp, #offset] |
-const Instr kLdrPpMask = 15 * B24 | 7 * B20 | 15 * B16; |
-const Instr kLdrPpPattern = 5 * B24 | L | kRegister_r8_Code * B16; |
+const Instr kLdrPpImmedMask = 15 * B24 | 7 * B20 | 15 * B16; |
+const Instr kLdrPpImmedPattern = 5 * B24 | L | kRegister_r8_Code * B16; |
// vldr dd, [pc, #offset] |
const Instr kVldrDPCMask = 15 * B24 | 3 * B20 | 15 * B16 | 15 * B8; |
const Instr kVldrDPCPattern = 13 * B24 | L | kRegister_pc_Code * B16 | 11 * B8; |
@@ -639,6 +639,15 @@ Register Assembler::GetRm(Instr instr) { |
} |
+Instr Assembler::GetConsantPoolLoadPattern() { |
+ if (FLAG_enable_ool_constant_pool) { |
+ return kLdrPpImmedPattern; |
+ } else { |
+ return kLdrPCImmedPattern; |
+ } |
+} |
+ |
+ |
bool Assembler::IsPush(Instr instr) { |
return ((instr & ~kRdMask) == kPushRegPattern); |
} |
@@ -672,14 +681,14 @@ bool Assembler::IsLdrRegFpNegOffset(Instr instr) { |
bool Assembler::IsLdrPcImmediateOffset(Instr instr) { |
// Check the instruction is indeed a |
// ldr<cond> <Rd>, [pc +/- offset_12]. |
- return (instr & kLdrPCMask) == kLdrPCPattern; |
+ return (instr & kLdrPCImmedMask) == kLdrPCImmedPattern; |
} |
bool Assembler::IsLdrPpImmediateOffset(Instr instr) { |
// Check the instruction is indeed a |
// ldr<cond> <Rd>, [pp +/- offset_12]. |
- return (instr & kLdrPpMask) == kLdrPpPattern; |
+ return (instr & kLdrPpImmedMask) == kLdrPpImmedPattern; |
} |
@@ -697,6 +706,20 @@ bool Assembler::IsVldrDPpImmediateOffset(Instr instr) { |
} |
+bool Assembler::IsBlxReg(Instr instr) { |
+ // Check the instruction is indeed a |
+ // blxcc <Rm> |
+ return (instr & kBlxRegMask) == kBlxRegPattern; |
+} |
+ |
+ |
+bool Assembler::IsBlxIp(Instr instr) { |
+ // Check the instruction is indeed a |
+ // blx ip |
+ return instr == kBlxIp; |
+} |
+ |
+ |
bool Assembler::IsTstImmediate(Instr instr) { |
return (instr & (B27 | B26 | I | kOpCodeMask | S | kRdMask)) == |
(I | TST | S); |