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

Unified Diff: runtime/vm/flow_graph_compiler_arm64.cc

Issue 262793006: Uses double load/store on arm64, enables tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/disassembler_arm64.cc ('k') | runtime/vm/guard_field_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_arm64.cc
===================================================================
--- runtime/vm/flow_graph_compiler_arm64.cc (revision 35689)
+++ runtime/vm/flow_graph_compiler_arm64.cc (working copy)
@@ -1128,7 +1128,20 @@
// This function must be in sync with FlowGraphCompiler::RecordSafepoint and
// FlowGraphCompiler::SlowPathEnvironmentFor.
void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
- // TODO(zra): Save live FPU Registers.
+ // TODO(vegorov): consider saving only caller save (volatile) registers.
+ const intptr_t fpu_regs_count = locs->live_registers()->FpuRegisterCount();
+ if (fpu_regs_count > 0) {
+ // Store fpu registers with the lowest register number at the lowest
+ // address.
+ for (intptr_t reg_idx = kNumberOfVRegisters - 1;
+ reg_idx >= 0; --reg_idx) {
+ VRegister fpu_reg = static_cast<VRegister>(reg_idx);
+ if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) {
+ // TODO(zra): Save the whole V register.
+ __ PushDouble(fpu_reg);
+ }
+ }
+ }
// Store general purpose registers with the highest register number at the
// lowest address.
@@ -1151,7 +1164,17 @@
}
}
- // TODO(zra): Restore live FPU registers.
+ const intptr_t fpu_regs_count = locs->live_registers()->FpuRegisterCount();
+ if (fpu_regs_count > 0) {
+ // Fpu registers have the lowest register number at the lowest address.
+ for (intptr_t reg_idx = 0; reg_idx < kNumberOfVRegisters; ++reg_idx) {
+ VRegister fpu_reg = static_cast<VRegister>(reg_idx);
+ if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) {
+ // TODO(zra): Restore the whole V register.
+ __ PopDouble(fpu_reg);
+ }
+ }
+ }
}
« no previous file with comments | « runtime/vm/disassembler_arm64.cc ('k') | runtime/vm/guard_field_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698