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

Unified Diff: src/compiler/wasm-linkage.cc

Issue 2410673002: [Turbofan] Add concept of FP register aliasing on ARM 32. (Closed)
Patch Set: Add a TODO. Created 4 years, 2 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 | « src/compiler/register-allocator.cc ('k') | src/machine-type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-linkage.cc
diff --git a/src/compiler/wasm-linkage.cc b/src/compiler/wasm-linkage.cc
index 5dfcbcc552c5c08844954d84412a380cbafa7a57..a41c93ca35cd4da655110c3ae73ce3c5029590f0 100644
--- a/src/compiler/wasm-linkage.cc
+++ b/src/compiler/wasm-linkage.cc
@@ -178,6 +178,17 @@ struct Allocator {
// Allocate a floating point register/stack location.
if (fp_offset < fp_count) {
DoubleRegister reg = fp_regs[fp_offset++];
+#if V8_TARGET_ARCH_ARM
+ // Allocate floats using a double register, but modify the code to
+ // reflect how ARM FP registers alias.
+ // TODO(bbudge) Modify wasm linkage to allow use of all float regs.
+ if (type == kAstF32) {
+ int float_reg_code = reg.code() * 2;
+ DCHECK(float_reg_code < RegisterConfiguration::kMaxFPRegisters);
+ return regloc(DoubleRegister::from_code(float_reg_code),
+ MachineTypeFor(type));
+ }
+#endif
return regloc(reg, MachineTypeFor(type));
} else {
int offset = -1 - stack_offset;
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | src/machine-type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698