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 {
43
43
return true ;
44
44
}
45
45
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) {
49
47
return true ;
50
48
}
51
49
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ macro_rules! float_sum {
111
111
}
112
112
}
113
113
114
- #[ cfg( not( all ( target_arch = "x86" , not ( target_feature = "sse" ) ) ) ) ]
114
+ #[ cfg( not( x86_no_sse ) ) ]
115
115
mod float_addsub {
116
116
use super :: * ;
117
117
@@ -122,7 +122,7 @@ mod float_addsub {
122
122
}
123
123
124
124
#[ cfg( f128_enabled) ]
125
- #[ cfg( not( all ( target_arch = "x86" , not ( target_feature = "sse" ) ) ) ) ]
125
+ #[ cfg( not( x86_no_sse ) ) ]
126
126
#[ cfg( not( any( target_arch = "powerpc" , target_arch = "powerpc64" ) ) ) ]
127
127
mod float_addsub_f128 {
128
128
use super :: * ;
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ macro_rules! float {
138
138
} ;
139
139
}
140
140
141
- #[ cfg( not( all ( target_arch = "x86" , not ( target_feature = "sse" ) ) ) ) ]
141
+ #[ cfg( not( x86_no_sse ) ) ]
142
142
mod float_div {
143
143
use super :: * ;
144
144
Original file line number Diff line number Diff line change 1
1
#![ allow( unused_macros) ]
2
2
#![ cfg_attr( f128_enabled, feature( f128) ) ]
3
- #![ cfg( not( all( target_arch = "x86" , not( target_feature = "sse" ) ) ) ) ]
4
3
4
+ #[ cfg_attr( x86_no_sse, allow( unused) ) ]
5
5
use builtins_test:: * ;
6
6
7
7
// This is approximate because of issues related to
@@ -52,6 +52,7 @@ macro_rules! pow {
52
52
} ;
53
53
}
54
54
55
+ #[ cfg( not( x86_no_sse) ) ] // FIXME(i586): failure for powidf2
55
56
pow ! {
56
57
f32 , 1e-4 , __powisf2, all( ) ;
57
58
f64 , 1e-12 , __powidf2, all( ) ;
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ macro_rules! float_mul {
113
113
} ;
114
114
}
115
115
116
- #[ cfg( not( all ( target_arch = "x86" , not ( target_feature = "sse" ) ) ) ) ]
116
+ #[ cfg( not( x86_no_sse ) ) ]
117
117
mod float_mul {
118
118
use super :: * ;
119
119
@@ -126,7 +126,7 @@ mod float_mul {
126
126
}
127
127
128
128
#[ cfg( f128_enabled) ]
129
- #[ cfg( not( all ( target_arch = "x86" , not ( target_feature = "sse" ) ) ) ) ]
129
+ #[ cfg( not( x86_no_sse ) ) ]
130
130
#[ cfg( not( any( target_arch = "powerpc" , target_arch = "powerpc64" ) ) ) ]
131
131
mod float_mul_f128 {
132
132
use super :: * ;
Original file line number Diff line number Diff line change @@ -106,13 +106,6 @@ fn configure_libm(target: &Target) {
106
106
println ! ( "cargo:rustc-cfg=optimizations_enabled" ) ;
107
107
}
108
108
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
-
116
109
println ! (
117
110
"cargo:rustc-env=CFG_CARGO_FEATURES={:?}" ,
118
111
target. cargo_features
Original file line number Diff line number Diff line change @@ -100,6 +100,13 @@ pub fn configure_aliases(target: &Target) {
100
100
println ! ( "cargo:rustc-cfg=thumb_1" )
101
101
}
102
102
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
+
103
110
/* Not all backends support `f16` and `f128` to the same level on all architectures, so we
104
111
* need to disable things if the compiler may crash. See configuration at:
105
112
* * 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 {
195
195
196
196
#[ test]
197
197
// 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) ]
199
199
fn test_near_pi ( ) {
200
200
let arg = 3.141592025756836 ;
201
201
let arg = force_eval ! ( arg) ;
You can’t perform that action at this time.
0 commit comments