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

Side by Side Diff: test/cctest/wasm/test-run-wasm-64.cc

Issue 2685583003: [wasm] Do not use setjmp/longjmp in cctests. (Closed)
Patch Set: Turn off signalling NaN tests in the simulator Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/wasm/wasm-macro-gen.h" 10 #include "src/wasm/wasm-macro-gen.h"
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 BUILD(r, WASM_I64_REINTERPRET_F64( 1312 BUILD(r, WASM_I64_REINTERPRET_F64(
1313 WASM_LOAD_MEM(MachineType::Float64(), WASM_ZERO))); 1313 WASM_LOAD_MEM(MachineType::Float64(), WASM_ZERO)));
1314 1314
1315 FOR_INT32_INPUTS(i) { 1315 FOR_INT32_INPUTS(i) {
1316 int64_t expected = static_cast<int64_t>(*i) * 0x300010001; 1316 int64_t expected = static_cast<int64_t>(*i) * 0x300010001;
1317 r.module().WriteMemory(&memory[0], expected); 1317 r.module().WriteMemory(&memory[0], expected);
1318 CHECK_EQ(expected, r.Call()); 1318 CHECK_EQ(expected, r.Call());
1319 } 1319 }
1320 } 1320 }
1321 1321
1322 // Do not run this test in a simulator because of signalling NaN issues on ia32.
1323 #if (V8_HOST_ARCH_IA32 || V8_HOST_ARCH_X64) && \
Rodolph Perfetta (ARM) 2017/02/08 01:40:55 This test will only run on ia32 or x64 now, if you
ahaas 2017/02/08 09:11:46 Thanks, I was not aware of this flag.
1324 (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64)
1325
1322 WASM_EXEC_TEST(SignallingNanSurvivesI64ReinterpretF64) { 1326 WASM_EXEC_TEST(SignallingNanSurvivesI64ReinterpretF64) {
1323 REQUIRE(I64ReinterpretF64); 1327 REQUIRE(I64ReinterpretF64);
1324 WasmRunner<int64_t> r(execution_mode); 1328 WasmRunner<int64_t> r(execution_mode);
1325 BUILD(r, WASM_I64_REINTERPRET_F64(WASM_SEQ(kExprF64Const, 0x00, 0x00, 0x00, 1329 BUILD(r, WASM_I64_REINTERPRET_F64(WASM_SEQ(kExprF64Const, 0x00, 0x00, 0x00,
1326 0x00, 0x00, 0x00, 0xf4, 0x7f))); 1330 0x00, 0x00, 0x00, 0xf4, 0x7f)));
1327 1331
1328 // This is a signalling nan. 1332 // This is a signalling nan.
1329 CHECK_EQ(0x7ff4000000000000, r.Call()); 1333 CHECK_EQ(0x7ff4000000000000, r.Call());
1330 } 1334 }
1335 #endif
1331 1336
1332 WASM_EXEC_TEST(F64ReinterpretI64) { 1337 WASM_EXEC_TEST(F64ReinterpretI64) {
1333 REQUIRE(F64ReinterpretI64); 1338 REQUIRE(F64ReinterpretI64);
1334 WasmRunner<int64_t, int64_t> r(execution_mode); 1339 WasmRunner<int64_t, int64_t> r(execution_mode);
1335 int64_t* memory = r.module().AddMemoryElems<int64_t>(8); 1340 int64_t* memory = r.module().AddMemoryElems<int64_t>(8);
1336 1341
1337 BUILD(r, WASM_STORE_MEM(MachineType::Float64(), WASM_ZERO, 1342 BUILD(r, WASM_STORE_MEM(MachineType::Float64(), WASM_ZERO,
1338 WASM_F64_REINTERPRET_I64(WASM_GET_LOCAL(0))), 1343 WASM_F64_REINTERPRET_I64(WASM_GET_LOCAL(0))),
1339 WASM_GET_LOCAL(0)); 1344 WASM_GET_LOCAL(0));
1340 1345
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 r.module().AddMemoryElems<int64_t>(8); 1646 r.module().AddMemoryElems<int64_t>(8);
1642 1647
1643 BUILD(r, kExprI64Const, 0x00, // -- 1648 BUILD(r, kExprI64Const, 0x00, // --
1644 kExprI32ConvertI64, // -- 1649 kExprI32ConvertI64, // --
1645 kExprI64Const, 0x00, // -- 1650 kExprI64Const, 0x00, // --
1646 kExprI64StoreMem, 0x03, 0x00, // -- 1651 kExprI64StoreMem, 0x03, 0x00, // --
1647 kExprI32Const, 0x00); // -- 1652 kExprI32Const, 0x00); // --
1648 1653
1649 r.Call(); 1654 r.Call();
1650 } 1655 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698