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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/ia32/instruction-selector-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ia32/code-generator-ia32.cc
diff --git a/src/compiler/ia32/code-generator-ia32.cc b/src/compiler/ia32/code-generator-ia32.cc
index 7ec7eba8111f51012561545c8547822258134412..586d5488e906c6c3777b8b2704b974671c32c205 100644
--- a/src/compiler/ia32/code-generator-ia32.cc
+++ b/src/compiler/ia32/code-generator-ia32.cc
@@ -790,13 +790,20 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
break;
case kIA32StoreWriteBarrier: {
Register object = i.InputRegister(0);
- Register index = i.InputRegister(1);
Register value = i.InputRegister(2);
- __ mov(Operand(object, index, times_1, 0), value);
- __ lea(index, Operand(object, index, times_1, 0));
SaveFPRegsMode mode =
frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs;
- __ RecordWrite(object, index, value, mode);
+ if (HasImmediateInput(instr, 1)) {
+ int index = i.InputInt32(1);
+ Register scratch = i.TempRegister(1);
+ __ mov(Operand(object, index), value);
+ __ RecordWriteContextSlot(object, index, value, scratch, mode);
+ } else {
+ Register index = i.InputRegister(1);
+ __ mov(Operand(object, index, times_1, 0), value);
+ __ lea(index, Operand(object, index, times_1, 0));
+ __ RecordWrite(object, index, value, mode);
+ }
break;
}
case kCheckedLoadInt8:
« 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