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

Unified Diff: runtime/vm/flow_graph_compiler.h

Issue 13801014: Fix bug in ParallelMoveResolver::EmitSwap: implement swaps of FPU spill slots. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix typo Created 7 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
Index: runtime/vm/flow_graph_compiler.h
diff --git a/runtime/vm/flow_graph_compiler.h b/runtime/vm/flow_graph_compiler.h
index f141fd18bc1e1d991133e9e4fe711fe6595153f2..a473f41e7db84cd58a83463a1f34bdbfa87a5712 100644
--- a/runtime/vm/flow_graph_compiler.h
+++ b/runtime/vm/flow_graph_compiler.h
@@ -31,6 +31,47 @@ class ParallelMoveResolver : public ValueObject {
void EmitNativeCode(ParallelMoveInstr* parallel_move);
private:
+ class ScratchFpuRegisterScope : public ValueObject {
+ public:
+ ScratchFpuRegisterScope(ParallelMoveResolver* resolver,
+ FpuRegister blocked);
+ ~ScratchFpuRegisterScope();
+
+ FpuRegister reg() const { return reg_; }
+
+ private:
+ ParallelMoveResolver* resolver_;
+ FpuRegister reg_;
+ bool spilled_;
+ };
+
+ class ScratchRegisterScope : public ValueObject {
+ public:
+ ScratchRegisterScope(ParallelMoveResolver* resolver, Register blocked);
+ ~ScratchRegisterScope();
+
+ Register reg() const { return reg_; }
+
+ private:
+ ParallelMoveResolver* resolver_;
+ Register reg_;
+ bool spilled_;
+ };
+
+
+ bool IsScratchLocation(Location loc);
+ intptr_t AllocateScratchRegister(Location::Kind kind,
+ intptr_t blocked,
+ intptr_t register_count,
+ bool* spilled);
+
+ void SpillScratch(Register reg);
+ void RestoreScratch(Register reg);
+ void SpillFpuScratch(FpuRegister reg);
+ void RestoreFpuScratch(FpuRegister reg);
+
+ // friend class ScratchXmmRegisterScope;
+
// Build the initial list of moves.
void BuildInitialMoveList(ParallelMoveInstr* parallel_move);

Powered by Google App Engine
This is Rietveld 408576698