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

Side by Side Diff: src/compiler/ia32/code-generator-ia32.cc

Issue 1075103002: [x86] Support immediate indices for StoreWriteBarrier. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | src/compiler/ia32/instruction-selector-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/ia32/assembler-ia32.h" 10 #include "src/ia32/assembler-ia32.h"
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 } 783 }
784 case kIA32Push: 784 case kIA32Push:
785 if (HasImmediateInput(instr, 0)) { 785 if (HasImmediateInput(instr, 0)) {
786 __ push(i.InputImmediate(0)); 786 __ push(i.InputImmediate(0));
787 } else { 787 } else {
788 __ push(i.InputOperand(0)); 788 __ push(i.InputOperand(0));
789 } 789 }
790 break; 790 break;
791 case kIA32StoreWriteBarrier: { 791 case kIA32StoreWriteBarrier: {
792 Register object = i.InputRegister(0); 792 Register object = i.InputRegister(0);
793 Register index = i.InputRegister(1);
794 Register value = i.InputRegister(2); 793 Register value = i.InputRegister(2);
795 __ mov(Operand(object, index, times_1, 0), value);
796 __ lea(index, Operand(object, index, times_1, 0));
797 SaveFPRegsMode mode = 794 SaveFPRegsMode mode =
798 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; 795 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs;
799 __ RecordWrite(object, index, value, mode); 796 if (HasImmediateInput(instr, 1)) {
797 int index = i.InputInt32(1);
798 Register scratch = i.TempRegister(1);
799 __ mov(Operand(object, index), value);
800 __ RecordWriteContextSlot(object, index, value, scratch, mode);
801 } else {
802 Register index = i.InputRegister(1);
803 __ mov(Operand(object, index, times_1, 0), value);
804 __ lea(index, Operand(object, index, times_1, 0));
805 __ RecordWrite(object, index, value, mode);
806 }
800 break; 807 break;
801 } 808 }
802 case kCheckedLoadInt8: 809 case kCheckedLoadInt8:
803 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_b); 810 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_b);
804 break; 811 break;
805 case kCheckedLoadUint8: 812 case kCheckedLoadUint8:
806 ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_b); 813 ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_b);
807 break; 814 break;
808 case kCheckedLoadInt16: 815 case kCheckedLoadInt16:
809 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_w); 816 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_w);
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 } 1444 }
1438 } 1445 }
1439 MarkLazyDeoptSite(); 1446 MarkLazyDeoptSite();
1440 } 1447 }
1441 1448
1442 #undef __ 1449 #undef __
1443 1450
1444 } // namespace compiler 1451 } // namespace compiler
1445 } // namespace internal 1452 } // namespace internal
1446 } // namespace v8 1453 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/ia32/instruction-selector-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698