Reviewers: Benedikt Meurer,
Description:
Do not rely on actual NaN value for testing extractps.
BUG=cctest/test-assembler-ia32/AssemblerIa32Extractps,
cctest/test-assembler-x64/AssemblerX64Extractps
Please review this at https://codereview.chromium.org/26704004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+8, -2 lines):
M test/cctest/test-assembler-ia32.cc
M test/cctest/test-assembler-x64.cc
Index: test/cctest/test-assembler-ia32.cc
diff --git a/test/cctest/test-assembler-ia32.cc
b/test/cctest/test-assembler-ia32.cc
index
c9ff3c12d26d84aebc70eb9308fbbf7e55608b17..4d2251ae1aed267a86b3ab0cbc5c0eee4181de4c
100644
--- a/test/cctest/test-assembler-ia32.cc
+++ b/test/cctest/test-assembler-ia32.cc
@@ -591,7 +591,10 @@ TEST(AssemblerIa32Extractps) {
#endif
F4 f = FUNCTION_CAST<F4>(Code::cast(code)->entry());
- CHECK_EQ(0x7FF80000, f(OS::nan_value()));
+ uint64_t value1 = V8_2PART_UINT64_C(0x12345678, 87654321);
+ CHECK_EQ(0x12345678, f(uint64_to_double(value1)));
+ uint64_t value2 = V8_2PART_UINT64_C(0x87654321, 12345678);
+ CHECK_EQ(0x87654321, f(uint64_to_double(value2)));
}
Index: test/cctest/test-assembler-x64.cc
diff --git a/test/cctest/test-assembler-x64.cc
b/test/cctest/test-assembler-x64.cc
index
ca49dfd96ad12f29f2d1b17b532462db03a0c319..ce258ba5b6cfcc42ffac1b45c74c2b92f1d7617b
100644
--- a/test/cctest/test-assembler-x64.cc
+++ b/test/cctest/test-assembler-x64.cc
@@ -516,7 +516,10 @@ TEST(AssemblerX64Extractps) {
#endif
F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
- CHECK_EQ(0x7FF80000, f(OS::nan_value()));
+ uint64_t value1 = V8_2PART_UINT64_C(0x12345678, 87654321);
+ CHECK_EQ(0x12345678, f(uint64_to_double(value1)));
+ uint64_t value2 = V8_2PART_UINT64_C(0x87654321, 12345678);
+ CHECK_EQ(0x87654321, f(uint64_to_double(value2)));
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.