@@ -6511,12 +6511,16 @@ def test_neon_wasm_simd(self):
65116511 @requires_native_clang
65126512 @no_safe_heap ('has unaligned 64-bit operations in wasm' )
65136513 @no_ubsan ('test contains UB' )
6514- def test_sse1 (self ):
6514+ @parameterized ({
6515+ '' : ([],),
6516+ 'nontrapping' : (['-mnontrapping-fptoint' ],)
6517+ })
6518+ def test_sse1 (self , args ):
65156519 src = test_file ('sse/test_sse1.cpp' )
65166520 self .run_process ([shared .CLANG_CXX , src , '-msse' , '-o' , 'test_sse1' , '-D_CRT_SECURE_NO_WARNINGS=1' ] + clang_native .get_clang_native_args (), stdout = PIPE )
65176521 native_result = self .run_process ('./test_sse1' , stdout = PIPE ).stdout
65186522
6519- self .emcc_args += ['-I' + test_file ('sse' ), '-msse' ]
6523+ self .emcc_args += ['-I' + test_file ('sse' ), '-msse' ] + args
65206524 self .maybe_closure ()
65216525
65226526 self .do_runf (src , native_result )
@@ -6528,14 +6532,18 @@ def test_sse1(self):
65286532 @is_slow_test
65296533 @no_ubsan ('https://github.com/emscripten-core/emscripten/issues/19688' )
65306534 @no_asan ('local count too large' )
6531- def test_sse2 (self ):
6535+ @parameterized ({
6536+ '' : ([],),
6537+ 'nontrapping' : (['-mnontrapping-fptoint' ],)
6538+ })
6539+ def test_sse2 (self , args ):
65326540 if self .is_wasm64 ():
65336541 self .require_node_canary ()
65346542 src = test_file ('sse/test_sse2.cpp' )
65356543 self .run_process ([shared .CLANG_CXX , src , '-msse2' , '-Wno-argument-outside-range' , '-o' , 'test_sse2' , '-D_CRT_SECURE_NO_WARNINGS=1' ] + clang_native .get_clang_native_args (), stdout = PIPE )
65366544 native_result = self .run_process ('./test_sse2' , stdout = PIPE ).stdout
65376545
6538- self .emcc_args += ['-I' + test_file ('sse' ), '-msse2' , '-Wno-argument-outside-range' , '-sSTACK_SIZE=1MB' ]
6546+ self .emcc_args += ['-I' + test_file ('sse' ), '-msse2' , '-Wno-argument-outside-range' , '-sSTACK_SIZE=1MB' ] + args
65396547 self .maybe_closure ()
65406548 self .do_runf (src , native_result )
65416549
@@ -6587,8 +6595,8 @@ def test_sse4_1(self):
65876595 @wasm_simd
65886596 @requires_native_clang
65896597 @parameterized ({
6590- '' : (False ,),
6591- '2' : (True ,)
6598+ '' : (False ,),
6599+ '2' : (True ,)
65926600 })
65936601 def test_sse4 (self , use_4_2 ):
65946602 msse4 = '-msse4.2' if use_4_2 else '-msse4'
@@ -6606,12 +6614,16 @@ def test_sse4(self, use_4_2):
66066614 @is_slow_test
66076615 @no_asan ('local count too large' )
66086616 @no_ubsan ('local count too large' )
6609- def test_avx (self ):
6617+ @parameterized ({
6618+ '' : ([],),
6619+ 'nontrapping' : (['-mnontrapping-fptoint' ],)
6620+ })
6621+ def test_avx (self , args ):
66106622 src = test_file ('sse/test_avx.cpp' )
66116623 self .run_process ([shared .CLANG_CXX , src , '-mavx' , '-Wno-argument-outside-range' , '-Wpedantic' , '-o' , 'test_avx' , '-D_CRT_SECURE_NO_WARNINGS=1' ] + clang_native .get_clang_native_args (), stdout = PIPE )
66126624 native_result = self .run_process ('./test_avx' , stdout = PIPE ).stdout
66136625
6614- self .emcc_args += ['-I' + test_file ('sse' ), '-mavx' , '-Wno-argument-outside-range' , '-sSTACK_SIZE=1MB' ]
6626+ self .emcc_args += ['-I' + test_file ('sse' ), '-mavx' , '-Wno-argument-outside-range' , '-sSTACK_SIZE=1MB' ] + args
66156627 self .maybe_closure ()
66166628 self .do_runf (src , native_result )
66176629
0 commit comments