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

Side by Side Diff: src/compiler/x64/code-generator-x64.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
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/scopes.h" 10 #include "src/scopes.h"
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 } else { 1098 } else {
1099 if (instr->InputAt(0)->IsRegister()) { 1099 if (instr->InputAt(0)->IsRegister()) {
1100 __ pushq(i.InputRegister(0)); 1100 __ pushq(i.InputRegister(0));
1101 } else { 1101 } else {
1102 __ pushq(i.InputOperand(0)); 1102 __ pushq(i.InputOperand(0));
1103 } 1103 }
1104 } 1104 }
1105 break; 1105 break;
1106 case kX64StoreWriteBarrier: { 1106 case kX64StoreWriteBarrier: {
1107 Register object = i.InputRegister(0); 1107 Register object = i.InputRegister(0);
1108 Register index = i.InputRegister(1);
1109 Register value = i.InputRegister(2); 1108 Register value = i.InputRegister(2);
1110 __ movq(Operand(object, index, times_1, 0), value);
1111 __ leaq(index, Operand(object, index, times_1, 0));
1112 SaveFPRegsMode mode = 1109 SaveFPRegsMode mode =
1113 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; 1110 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs;
1114 __ RecordWrite(object, index, value, mode); 1111 if (HasImmediateInput(instr, 1)) {
1112 int index = i.InputInt32(1);
1113 Register scratch = i.TempRegister(1);
1114 __ movq(Operand(object, index), value);
1115 __ RecordWriteContextSlot(object, index, value, scratch, mode);
1116 } else {
1117 Register index = i.InputRegister(1);
1118 __ movq(Operand(object, index, times_1, 0), value);
1119 __ leaq(index, Operand(object, index, times_1, 0));
1120 __ RecordWrite(object, index, value, mode);
1121 }
1115 break; 1122 break;
1116 } 1123 }
1117 case kCheckedLoadInt8: 1124 case kCheckedLoadInt8:
1118 ASSEMBLE_CHECKED_LOAD_INTEGER(movsxbl); 1125 ASSEMBLE_CHECKED_LOAD_INTEGER(movsxbl);
1119 break; 1126 break;
1120 case kCheckedLoadUint8: 1127 case kCheckedLoadUint8:
1121 ASSEMBLE_CHECKED_LOAD_INTEGER(movzxbl); 1128 ASSEMBLE_CHECKED_LOAD_INTEGER(movzxbl);
1122 break; 1129 break;
1123 case kCheckedLoadInt16: 1130 case kCheckedLoadInt16:
1124 ASSEMBLE_CHECKED_LOAD_INTEGER(movsxwl); 1131 ASSEMBLE_CHECKED_LOAD_INTEGER(movsxwl);
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 } 1606 }
1600 } 1607 }
1601 MarkLazyDeoptSite(); 1608 MarkLazyDeoptSite();
1602 } 1609 }
1603 1610
1604 #undef __ 1611 #undef __
1605 1612
1606 } // namespace internal 1613 } // namespace internal
1607 } // namespace compiler 1614 } // namespace compiler
1608 } // namespace v8 1615 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698