Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 38d2011d0b736badcf452b9254febc7ef6d1fa38..8315d8209a451496bbd69179564b37448ce07e1e 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -4334,7 +4334,16 @@ void LCodeGen::DoCallRuntime(LCallRuntime* instr) { |
void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { |
Register result = ToRegister(instr->result()); |
Register base = ToRegister(instr->base_object()); |
- __ lea(result, Operand(base, instr->offset())); |
+ int offset = instr->offset(); |
+ if (instr->hydrogen()->MustAllocateDoubleAligned()) { |
+ ASSERT(kPointerAlignment * 2 == kDoubleAlignment); |
+ Label aligned; |
+ __ test(base, Immediate(kDoubleAlignmentMask)); |
+ __ j(zero, &aligned, Label::kNear); |
Michael Starzinger
2013/07/22 19:46:56
This is a NOP. The jump at runtime does not affect
|
+ offset += (kDoubleSize / 2); |
+ __ bind(&aligned); |
+ } |
+ __ lea(result, Operand(base, offset)); |
} |