File tree Expand file tree Collapse file tree 8 files changed +16
-17
lines changed Expand file tree Collapse file tree 8 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,7 @@ pub fn skip_sys_checks(test_name: &str) -> bool {
4343 return true ;
4444 }
4545
46- if cfg ! ( all( target_arch = "x86" , not( target_feature = "sse" ) ) )
47- && X86_NO_SSE_SKIPPED . contains ( & test_name)
48- {
46+ if cfg ! ( x86_no_sse) && X86_NO_SSE_SKIPPED . contains ( & test_name) {
4947 return true ;
5048 }
5149
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ macro_rules! float_sum {
111111 }
112112}
113113
114- #[ cfg( not( all ( target_arch = "x86" , not ( target_feature = "sse" ) ) ) ) ]
114+ #[ cfg( not( x86_no_sse ) ) ]
115115mod float_addsub {
116116 use super :: * ;
117117
@@ -122,7 +122,7 @@ mod float_addsub {
122122}
123123
124124#[ cfg( f128_enabled) ]
125- #[ cfg( not( all ( target_arch = "x86" , not ( target_feature = "sse" ) ) ) ) ]
125+ #[ cfg( not( x86_no_sse ) ) ]
126126#[ cfg( not( any( target_arch = "powerpc" , target_arch = "powerpc64" ) ) ) ]
127127mod float_addsub_f128 {
128128 use super :: * ;
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ macro_rules! float {
138138 } ;
139139}
140140
141- #[ cfg( not( all ( target_arch = "x86" , not ( target_feature = "sse" ) ) ) ) ]
141+ #[ cfg( not( x86_no_sse ) ) ]
142142mod float_div {
143143 use super :: * ;
144144
Original file line number Diff line number Diff line change 11#![ allow( unused_macros) ]
22#![ cfg_attr( f128_enabled, feature( f128) ) ]
3- #![ cfg( not( all( target_arch = "x86" , not( target_feature = "sse" ) ) ) ) ]
43
4+ #[ cfg_attr( x86_no_sse, allow( unused) ) ]
55use builtins_test:: * ;
66
77// This is approximate because of issues related to
@@ -52,6 +52,7 @@ macro_rules! pow {
5252 } ;
5353}
5454
55+ #[ cfg( not( x86_no_sse) ) ] // FIXME(i586): failure for powidf2
5556pow ! {
5657 f32 , 1e-4 , __powisf2, all( ) ;
5758 f64 , 1e-12 , __powidf2, all( ) ;
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ macro_rules! float_mul {
113113 } ;
114114}
115115
116- #[ cfg( not( all ( target_arch = "x86" , not ( target_feature = "sse" ) ) ) ) ]
116+ #[ cfg( not( x86_no_sse ) ) ]
117117mod float_mul {
118118 use super :: * ;
119119
@@ -126,7 +126,7 @@ mod float_mul {
126126}
127127
128128#[ cfg( f128_enabled) ]
129- #[ cfg( not( all ( target_arch = "x86" , not ( target_feature = "sse" ) ) ) ) ]
129+ #[ cfg( not( x86_no_sse ) ) ]
130130#[ cfg( not( any( target_arch = "powerpc" , target_arch = "powerpc64" ) ) ) ]
131131mod float_mul_f128 {
132132 use super :: * ;
Original file line number Diff line number Diff line change @@ -106,13 +106,6 @@ fn configure_libm(target: &Target) {
106106 println ! ( "cargo:rustc-cfg=optimizations_enabled" ) ;
107107 }
108108
109- // Config shorthands
110- println ! ( "cargo:rustc-check-cfg=cfg(x86_no_sse)" ) ;
111- if target. arch == "x86" && !target. features . iter ( ) . any ( |f| f == "sse" ) {
112- // Shorthand to detect i586 targets
113- println ! ( "cargo:rustc-cfg=x86_no_sse" ) ;
114- }
115-
116109 println ! (
117110 "cargo:rustc-env=CFG_CARGO_FEATURES={:?}" ,
118111 target. cargo_features
Original file line number Diff line number Diff line change @@ -100,6 +100,13 @@ pub fn configure_aliases(target: &Target) {
100100 println ! ( "cargo:rustc-cfg=thumb_1" )
101101 }
102102
103+ // Config shorthands
104+ println ! ( "cargo:rustc-check-cfg=cfg(x86_no_sse)" ) ;
105+ if target. arch == "x86" && !target. features . iter ( ) . any ( |f| f == "sse" ) {
106+ // Shorthand to detect i586 targets
107+ println ! ( "cargo:rustc-cfg=x86_no_sse" ) ;
108+ }
109+
103110 /* Not all backends support `f16` and `f128` to the same level on all architectures, so we
104111 * need to disable things if the compiler may crash. See configuration at:
105112 * * https://github.com/rust-lang/rust/blob/c65dccabacdfd6c8a7f7439eba13422fdd89b91e/compiler/rustc_codegen_llvm/src/llvm_util.rs#L367-L432
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ mod tests {
195195
196196 #[ test]
197197 // FIXME(correctness): inaccurate results on i586
198- #[ cfg_attr( all ( target_arch = "x86" , not ( target_feature = "sse" ) ) , ignore) ]
198+ #[ cfg_attr( x86_no_sse , ignore) ]
199199 fn test_near_pi ( ) {
200200 let arg = 3.141592025756836 ;
201201 let arg = force_eval ! ( arg) ;
You can’t perform that action at this time.
0 commit comments