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

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 12207063: Fix DoubleStackSlot-to-DoubleStackSlot moves on ia32. Unify platform-independent code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/lithium.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 // Stack slots not implemented, use ToMemOperand instead. 521 // Stack slots not implemented, use ToMemOperand instead.
522 UNREACHABLE(); 522 UNREACHABLE();
523 return Operand(0); 523 return Operand(0);
524 } 524 }
525 525
526 526
527 MemOperand LCodeGen::ToMemOperand(LOperand* op) const { 527 MemOperand LCodeGen::ToMemOperand(LOperand* op) const {
528 ASSERT(!op->IsRegister()); 528 ASSERT(!op->IsRegister());
529 ASSERT(!op->IsDoubleRegister()); 529 ASSERT(!op->IsDoubleRegister());
530 ASSERT(op->IsStackSlot() || op->IsDoubleStackSlot()); 530 ASSERT(op->IsStackSlot() || op->IsDoubleStackSlot());
531 int index = op->index(); 531 return MemOperand(fp, StackSlotOffset(op->index()));
532 if (index >= 0) {
533 // Local or spill slot. Skip the frame pointer, function, and
534 // context in the fixed part of the frame.
535 return MemOperand(fp, -(index + 3) * kPointerSize);
536 } else {
537 // Incoming parameter. Skip the return address.
538 return MemOperand(fp, -(index - 1) * kPointerSize);
539 }
540 } 532 }
541 533
542 534
543 MemOperand LCodeGen::ToHighMemOperand(LOperand* op) const { 535 MemOperand LCodeGen::ToHighMemOperand(LOperand* op) const {
544 ASSERT(op->IsDoubleStackSlot()); 536 ASSERT(op->IsDoubleStackSlot());
545 int index = op->index(); 537 return MemOperand(fp, StackSlotOffset(op->index()) + kPointerSize);
546 if (index >= 0) {
547 // Local or spill slot. Skip the frame pointer, function, context,
548 // and the first word of the double in the fixed part of the frame.
549 return MemOperand(fp, -(index + 3) * kPointerSize + kPointerSize);
550 } else {
551 // Incoming parameter. Skip the return address and the first word of
552 // the double.
553 return MemOperand(fp, -(index - 1) * kPointerSize + kPointerSize);
554 }
555 } 538 }
556 539
557 540
558 void LCodeGen::WriteTranslation(LEnvironment* environment, 541 void LCodeGen::WriteTranslation(LEnvironment* environment,
559 Translation* translation, 542 Translation* translation,
560 int* arguments_index, 543 int* arguments_index,
561 int* arguments_count) { 544 int* arguments_count) {
562 if (environment == NULL) return; 545 if (environment == NULL) return;
563 546
564 // The translation includes one command per value in the environment. 547 // The translation includes one command per value in the environment.
(...skipping 5262 matching lines...) Expand 10 before | Expand all | Expand 10 after
5827 __ Subu(scratch, result, scratch); 5810 __ Subu(scratch, result, scratch);
5828 __ lw(result, FieldMemOperand(scratch, 5811 __ lw(result, FieldMemOperand(scratch,
5829 FixedArray::kHeaderSize - kPointerSize)); 5812 FixedArray::kHeaderSize - kPointerSize));
5830 __ bind(&done); 5813 __ bind(&done);
5831 } 5814 }
5832 5815
5833 5816
5834 #undef __ 5817 #undef __
5835 5818
5836 } } // namespace v8::internal 5819 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lithium.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698