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

Side by Side Diff: src/compiler/wasm-linkage.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/ia32/code-generator-ia32.cc ('k') | test/cctest/compiler/test-run-native-calls.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/assembler.h" 5 #include "src/assembler.h"
6 #include "src/macro-assembler.h" 6 #include "src/macro-assembler.h"
7 7
8 #include "src/wasm/wasm-module.h" 8 #include "src/wasm/wasm-module.h"
9 9
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 int offset = -1 - stack_offset; 192 int offset = -1 - stack_offset;
193 stack_offset += Words(type); 193 stack_offset += Words(type);
194 return stackloc(offset); 194 return stackloc(offset);
195 } 195 }
196 } 196 }
197 } 197 }
198 bool IsFloatingPoint(LocalType type) { 198 bool IsFloatingPoint(LocalType type) {
199 return type == kAstF32 || type == kAstF64; 199 return type == kAstF32 || type == kAstF64;
200 } 200 }
201 int Words(LocalType type) { 201 int Words(LocalType type) {
202 // The code generation for pushing parameters on the stack does not 202 if (kPointerSize < 8 && (type == kAstI64 || type == kAstF64)) {
203 // distinguish between float32 and float64. Therefore also float32 needs
204 // two words.
205 if (kPointerSize < 8 &&
206 (type == kAstI64 || type == kAstF64 || type == kAstF32)) {
207 return 2; 203 return 2;
208 } 204 }
209 return 1; 205 return 1;
210 } 206 }
211 }; 207 };
212 } // namespace 208 } // namespace
213 209
214 static Allocator GetReturnRegisters() { 210 static Allocator GetReturnRegisters() {
215 #ifdef GP_RETURN_REGISTERS 211 #ifdef GP_RETURN_REGISTERS
216 static const Register kGPReturnRegisters[] = {GP_RETURN_REGISTERS}; 212 static const Register kGPReturnRegisters[] = {GP_RETURN_REGISTERS};
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 descriptor->CalleeSavedFPRegisters(), // callee-saved fp regs 375 descriptor->CalleeSavedFPRegisters(), // callee-saved fp regs
380 descriptor->flags(), // flags 376 descriptor->flags(), // flags
381 descriptor->debug_name()); 377 descriptor->debug_name());
382 378
383 return descriptor; 379 return descriptor;
384 } 380 }
385 381
386 } // namespace wasm 382 } // namespace wasm
387 } // namespace internal 383 } // namespace internal
388 } // namespace v8 384 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | test/cctest/compiler/test-run-native-calls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698