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

Unified Diff: runtime/platform/utils.h

Issue 267793005: Use xorps xmm1, xmm1 to creat a 0.0 cconstant. Add to utils a bitwise double test. (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 | « no previous file | runtime/vm/disassembler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/utils.h
===================================================================
--- runtime/platform/utils.h (revision 35714)
+++ runtime/platform/utils.h (working copy)
@@ -179,6 +179,12 @@
static uint16_t HostToLittleEndian16(uint16_t host_value);
static uint32_t HostToLittleEndian32(uint32_t host_value);
static uint64_t HostToLittleEndian64(uint64_t host_value);
+
+ static bool DoublesBitEqual(const double a, const double b) {
+ const int64_t* a_i = reinterpret_cast<const int64_t*>(&a);
zra 2014/05/02 23:19:08 bit_cast<int64_t, double>(a) is what we've been us
srdjan 2014/05/02 23:33:47 Done.
+ const int64_t* b_i = reinterpret_cast<const int64_t*>(&b);
+ return (*a_i == *b_i);
+ }
};
} // namespace dart
« no previous file with comments | « no previous file | runtime/vm/disassembler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698