Reviewers: Benedikt Meurer,
Message:
Benedikt, please take a look.
This was causing flakyness on the optimize-for-size bot, where it was more
likely to try to decode a function with a code-age prologue - but it was
probably also an issue even on non-optimize-for-size code, just seen less
often.
Description:
Avoid trying to decode the raw inline constant which is part of the aged
code
prologue.
BUG=3007
LOG=N
Please review this at https://codereview.chromium.org/88303003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+11, -0 lines):
M src/arm/constants-arm.h
M src/arm/disasm-arm.cc
Index: src/arm/constants-arm.h
diff --git a/src/arm/constants-arm.h b/src/arm/constants-arm.h
index
703613932cd064f34dbf5773acdb4acd3daf43d4..78bb66c49fe315cbda1e10bd1a9aa6f8f2e0ad38
100644
--- a/src/arm/constants-arm.h
+++ b/src/arm/constants-arm.h
@@ -50,6 +50,9 @@ inline int DecodeConstantPoolLength(int instr) {
return ((instr >> 4) & 0xfff0) | (instr & 0xf);
}
+// Used in code age prologue - ldr(pc, MemOperand(pc, -4))
+const int kCodeAgeJumpInstruction = 0xe51ff004;
+
// Number of registers in normal ARM mode.
const int kNumRegisters = 16;
Index: src/arm/disasm-arm.cc
diff --git a/src/arm/disasm-arm.cc b/src/arm/disasm-arm.cc
index
acffaa3f230ac5fe9fb639a34e0dbec3dc5cdc3c..49e4126b32685d8329ed5fbe4b16f1103b92d192
100644
--- a/src/arm/disasm-arm.cc
+++ b/src/arm/disasm-arm.cc
@@ -1679,6 +1679,14 @@ int Decoder::InstructionDecode(byte* instr_ptr) {
"constant pool begin (length %d)",
DecodeConstantPoolLength(instruction_bits));
return Instruction::kInstrSize;
+ } else if (instruction_bits == kCodeAgeJumpInstruction) {
+ // The code age prologue has a constant immediatly following the jump
+ // instruction.
+ Instruction* target = Instruction::At(instr_ptr +
Instruction::kInstrSize);
+ DecodeType2(instr);
+ OS::SNPrintF(out_buffer_ + out_buffer_pos_,
+ " (0x%08x)", target->InstructionBits());
+ return 2 * Instruction::kInstrSize;
}
switch (instr->TypeValue()) {
case 0:
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.