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

Unified Diff: runtime/vm/simulator_mips.h

Issue 14672037: Implements FPU compare and branching for MIPS simulator, assembler, disassembler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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_mips.cc ('k') | runtime/vm/simulator_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_mips.h
===================================================================
--- runtime/vm/simulator_mips.h (revision 22705)
+++ runtime/vm/simulator_mips.h (working copy)
@@ -61,6 +61,26 @@
int32_t get_hi_register() const { return hi_reg_; }
int32_t get_lo_register() const { return lo_reg_; }
+ int32_t get_fcsr_condition_bit(int32_t cc) const {
+ if (cc == 0) {
+ return 23;
+ } else {
+ return 24 + cc;
+ }
+ }
+
+ void set_fcsr_bit(uint32_t cc, bool value) {
+ if (value) {
+ fcsr_ |= (1 << cc);
+ } else {
+ fcsr_ &= ~(1 << cc);
+ }
+ }
+
+ bool test_fcsr_bit(uint32_t cc) {
+ return fcsr_ & (1 << cc);
+ }
+
// Accessor to the internal simulator stack top.
uword StackTop() const;
@@ -109,6 +129,7 @@
int32_t registers_[kNumberOfCpuRegisters];
int32_t fregisters_[kNumberOfFRegisters];
+ int32_t fcsr_;
uword pc_;
// Simulator support.
« no previous file with comments | « runtime/vm/disassembler_mips.cc ('k') | runtime/vm/simulator_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698