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

Unified Diff: runtime/vm/simulator_arm.h

Issue 17742003: Fixes floating point bug in ARM simulator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_arm.h
===================================================================
--- runtime/vm/simulator_arm.h (revision 24471)
+++ runtime/vm/simulator_arm.h (working copy)
@@ -51,6 +51,14 @@
void set_dregister(DRegister reg, double value);
double get_dregister(DRegister reg) const;
+ // When moving integer (rather than floating point) values to/from
+ // the FPU registers, use the _bits calls to avoid gcc taking liberties with
+ // integers that map to such things as NaN floating point values.
+ void set_sregister_bits(SRegister reg, int32_t value);
+ int32_t get_sregister_bits(SRegister reg) const;
+ void set_dregister_bits(DRegister reg, int64_t value);
+ int64_t get_dregister_bits(DRegister reg) const;
+
// Accessor to the internal simulator stack top.
uword StackTop() const;
@@ -119,8 +127,8 @@
// VFP state.
union { // S and D register banks are overlapping.
- float sregisters_[kNumberOfSRegisters];
- double dregisters_[kNumberOfDRegisters];
+ int32_t sregisters_[kNumberOfSRegisters];
+ int64_t dregisters_[kNumberOfDRegisters];
};
bool fp_n_flag_;
bool fp_z_flag_;
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698