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

Unified Diff: crosstest/test_cast.cpp

Issue 1273153002: Subzero. Native 64-bit int arithmetic on x86-64. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fixes tests & make format Created 5 years, 4 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 | « crosstest/test_calling_conv_main.cpp ('k') | crosstest/test_cast_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crosstest/test_cast.cpp
diff --git a/crosstest/test_cast.cpp b/crosstest/test_cast.cpp
index 629832017ca9e531288f800137bb91b2b6cff0ce..a2668f8208a6d3d0714419307e4f0b829280161e 100644
--- a/crosstest/test_cast.cpp
+++ b/crosstest/test_cast.cpp
@@ -16,6 +16,7 @@
#include <stdint.h>
#include "test_cast.h"
+#include "xdefs.h"
template <typename FromType, typename ToType>
ToType __attribute__((noinline)) cast(FromType a) {
@@ -38,8 +39,8 @@ template <typename ToType> class Caster {
static ToType f(uint16_t a) { return cast<uint16_t, ToType>(a); }
static ToType f(int32_t a) { return cast<int32_t, ToType>(a); }
static ToType f(uint32_t a) { return cast<uint32_t, ToType>(a); }
- static ToType f(int64_t a) { return cast<int64_t, ToType>(a); }
- static ToType f(uint64_t a) { return cast<uint64_t, ToType>(a); }
+ static ToType f(int64 a) { return cast<int64, ToType>(a); }
+ static ToType f(uint64 a) { return cast<uint64, ToType>(a); }
static ToType f(float a) { return cast<float, ToType>(a); }
static ToType f(double a) { return cast<double, ToType>(a); }
};
@@ -56,8 +57,8 @@ template class Caster<int16_t>;
template class Caster<uint16_t>;
template class Caster<int32_t>;
template class Caster<uint32_t>;
-template class Caster<int64_t>;
-template class Caster<uint64_t>;
+template class Caster<int64>;
+template class Caster<uint64>;
template class Caster<float>;
template class Caster<double>;
@@ -67,8 +68,8 @@ template class Caster<double>;
double makeBitCasters() {
double Result = 0;
Result += castBits<uint32_t, float>(0);
- Result += castBits<uint64_t, double>(0);
+ Result += castBits<uint64, double>(0);
Result += castBits<float, uint32_t>(0);
- Result += castBits<double, uint64_t>(0);
+ Result += castBits<double, uint64>(0);
return Result;
}
« no previous file with comments | « crosstest/test_calling_conv_main.cpp ('k') | crosstest/test_cast_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698