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

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

Issue 2024443002: Turbofan: Modify WASM linkage to store floats using only 4 bytes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments. Created 4 years, 6 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 | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/wasm-linkage.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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 } else { 1223 } else {
1224 __ lea(i.OutputRegister(), i.MemoryOperand()); 1224 __ lea(i.OutputRegister(), i.MemoryOperand());
1225 } 1225 }
1226 } else { 1226 } else {
1227 __ lea(i.OutputRegister(), i.MemoryOperand()); 1227 __ lea(i.OutputRegister(), i.MemoryOperand());
1228 } 1228 }
1229 break; 1229 break;
1230 } 1230 }
1231 case kIA32PushFloat32: 1231 case kIA32PushFloat32:
1232 if (instr->InputAt(0)->IsFPRegister()) { 1232 if (instr->InputAt(0)->IsFPRegister()) {
1233 __ sub(esp, Immediate(kDoubleSize)); 1233 __ sub(esp, Immediate(kFloatSize));
1234 __ movss(Operand(esp, 0), i.InputDoubleRegister(0)); 1234 __ movss(Operand(esp, 0), i.InputDoubleRegister(0));
1235 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); 1235 frame_access_state()->IncreaseSPDelta(kFloatSize / kPointerSize);
1236 } else if (HasImmediateInput(instr, 0)) { 1236 } else if (HasImmediateInput(instr, 0)) {
1237 __ Move(kScratchDoubleReg, i.InputDouble(0)); 1237 __ Move(kScratchDoubleReg, i.InputDouble(0));
1238 __ sub(esp, Immediate(kDoubleSize)); 1238 __ sub(esp, Immediate(kDoubleSize));
1239 __ movss(Operand(esp, 0), kScratchDoubleReg); 1239 __ movss(Operand(esp, 0), kScratchDoubleReg);
1240 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); 1240 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize);
1241 } else { 1241 } else {
1242 __ movsd(kScratchDoubleReg, i.InputOperand(0)); 1242 __ movsd(kScratchDoubleReg, i.InputOperand(0));
1243 __ sub(esp, Immediate(kDoubleSize)); 1243 __ sub(esp, Immediate(kDoubleSize));
1244 __ movss(Operand(esp, 0), kScratchDoubleReg); 1244 __ movss(Operand(esp, 0), kScratchDoubleReg);
1245 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); 1245 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize);
(...skipping 11 matching lines...) Expand all
1257 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); 1257 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize);
1258 } else { 1258 } else {
1259 __ movsd(kScratchDoubleReg, i.InputOperand(0)); 1259 __ movsd(kScratchDoubleReg, i.InputOperand(0));
1260 __ sub(esp, Immediate(kDoubleSize)); 1260 __ sub(esp, Immediate(kDoubleSize));
1261 __ movsd(Operand(esp, 0), kScratchDoubleReg); 1261 __ movsd(Operand(esp, 0), kScratchDoubleReg);
1262 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); 1262 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize);
1263 } 1263 }
1264 break; 1264 break;
1265 case kIA32Push: 1265 case kIA32Push:
1266 if (instr->InputAt(0)->IsFPRegister()) { 1266 if (instr->InputAt(0)->IsFPRegister()) {
1267 __ sub(esp, Immediate(kDoubleSize)); 1267 __ sub(esp, Immediate(kFloatSize));
1268 __ movsd(Operand(esp, 0), i.InputDoubleRegister(0)); 1268 __ movsd(Operand(esp, 0), i.InputDoubleRegister(0));
1269 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); 1269 frame_access_state()->IncreaseSPDelta(kFloatSize / kPointerSize);
1270 } else if (HasImmediateInput(instr, 0)) { 1270 } else if (HasImmediateInput(instr, 0)) {
1271 __ push(i.InputImmediate(0)); 1271 __ push(i.InputImmediate(0));
1272 frame_access_state()->IncreaseSPDelta(1); 1272 frame_access_state()->IncreaseSPDelta(1);
1273 } else { 1273 } else {
1274 __ push(i.InputOperand(0)); 1274 __ push(i.InputOperand(0));
1275 frame_access_state()->IncreaseSPDelta(1); 1275 frame_access_state()->IncreaseSPDelta(1);
1276 } 1276 }
1277 break; 1277 break;
1278 case kIA32Poke: { 1278 case kIA32Poke: {
1279 int const slot = MiscField::decode(instr->opcode()); 1279 int const slot = MiscField::decode(instr->opcode());
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1957 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 1957 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
1958 __ Nop(padding_size); 1958 __ Nop(padding_size);
1959 } 1959 }
1960 } 1960 }
1961 1961
1962 #undef __ 1962 #undef __
1963 1963
1964 } // namespace compiler 1964 } // namespace compiler
1965 } // namespace internal 1965 } // namespace internal
1966 } // namespace v8 1966 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/wasm-linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698