Index: src/ppc/lithium-codegen-ppc.cc |
diff --git a/src/ppc/lithium-codegen-ppc.cc b/src/ppc/lithium-codegen-ppc.cc |
index 207075534c32ce0e32851eb5a1b3708ed9157f29..c404ff246e99fc32db8c8278ab991546986b0a79 100644 |
--- a/src/ppc/lithium-codegen-ppc.cc |
+++ b/src/ppc/lithium-codegen-ppc.cc |
@@ -50,8 +50,15 @@ bool LCodeGen::GenerateCode() { |
// the frame (that is done in GeneratePrologue). |
FrameScope frame_scope(masm_, StackFrame::NONE); |
- return GeneratePrologue() && GenerateBody() && GenerateDeferredCode() && |
- GenerateJumpTable() && GenerateSafepointTable(); |
+ bool rc = GeneratePrologue() && GenerateBody() && GenerateDeferredCode() && |
+ GenerateJumpTable() && GenerateSafepointTable(); |
+#ifdef DEBUG |
+ if (!rc) { |
+ // Avoid DCHECK(!is_linked()) failure in ~Label() |
+ masm()->EmitConstantPool(); |
+ } |
+#endif |
+ return rc; |
} |
@@ -372,6 +379,8 @@ bool LCodeGen::GenerateJumpTable() { |
__ Jump(ip); |
} |
+ masm()->EmitConstantPool(); |
+ |
// The deoptimization jump table is the last part of the instruction |
// sequence. Mark the generated code as done unless we bailed out. |
if (!is_aborted()) status_ = DONE; |
@@ -2885,7 +2894,7 @@ void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { |
Register map = temp; |
__ LoadP(map, FieldMemOperand(object, HeapObject::kMapOffset)); |
{ |
- // Block constant pool emission to ensure the positions of instructions are |
+ // Block trampoline emission to ensure the positions of instructions are |
// as expected by the patcher. See InstanceofStub::Generate(). |
Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); |
__ bind(deferred->map_check()); // Label for calculating code patching. |
@@ -2896,7 +2905,7 @@ void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { |
__ mov(ip, Operand(cell)); |
__ LoadP(ip, FieldMemOperand(ip, Cell::kValueOffset)); |
__ cmp(map, ip); |
- __ bne(&cache_miss); |
+ __ bc_short(ne, &cache_miss); |
// We use Factory::the_hole_value() on purpose instead of loading from the |
// root array to force relocation to be able to later patch |
// with true or false. |