Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: src/ia32/lithium-codegen-ia32.cc

Issue 19956002: Support double allocations when folding allocation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698