File tree Expand file tree Collapse file tree 5 files changed +9
-15
lines changed
crates/intrinsic-test/src Expand file tree Collapse file tree 5 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -186,8 +186,11 @@ case "${TARGET}" in
186
186
;;
187
187
188
188
x86_64-unknown-linux-gnu* )
189
+ # `CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER` is not necessary for `intrinsic-test`
190
+ # because the binary needs to run directly on the host.
191
+ # Since the same cannot be assigned an empty string, `"eval"` is used instead.
189
192
CPPFLAGS=" ${TEST_CPPFLAGS} " RUSTFLAGS=" ${HOST_RUSTFLAGS} " RUST_LOG=warn \
190
- CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER=" true " \
193
+ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER=" eval " \
191
194
cargo run " ${INTRINSIC_TEST} " " ${PROFILE} " \
192
195
--bin intrinsic-test -- intrinsics_data/x86-intel.xml \
193
196
--runner " ${TEST_RUNNER} " \
Original file line number Diff line number Diff line change @@ -36,8 +36,6 @@ impl SupportedArchitectureTest for ArmArchitectureTest {
36
36
"cstring" ,
37
37
"iomanip" ,
38
38
"sstream" ,
39
- "cstddef" ,
40
- "cstdint" ,
41
39
"arm_neon.h" ,
42
40
"arm_acle.h" ,
43
41
"arm_fp16.h" ,
Original file line number Diff line number Diff line change @@ -106,6 +106,8 @@ where
106
106
loads : u32 ,
107
107
) -> std:: io:: Result < ( ) > {
108
108
for arg in self . iter ( ) . filter ( |& arg| !arg. has_constraint ( ) ) {
109
+ // Setting the variables on an aligned boundary to make it easier to pick
110
+ // functions (of a specific architecture) that would help load the values.
109
111
writeln ! (
110
112
w,
111
113
"{indentation}alignas(64) const {ty} {name}_vals[] = {values};" ,
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ pub fn generate_rust_test_loop<T: IntrinsicTypeDefinition>(
190
190
w : & mut impl std:: io:: Write ,
191
191
intrinsic : & Intrinsic < T > ,
192
192
indentation : Indentation ,
193
- specializations : & [ Vec < i64 > ] ,
193
+ specializations : & [ Vec < i32 > ] ,
194
194
passes : u32 ,
195
195
) -> std:: io:: Result < ( ) > {
196
196
let intrinsic_name = & intrinsic. name ;
@@ -255,15 +255,15 @@ pub fn generate_rust_test_loop<T: IntrinsicTypeDefinition>(
255
255
/// Generate the specializations (unique sequences of const-generic arguments) for this intrinsic.
256
256
fn generate_rust_specializations < ' a > (
257
257
constraints : & mut impl Iterator < Item = impl Iterator < Item = i64 > > ,
258
- ) -> Vec < Vec < i64 > > {
258
+ ) -> Vec < Vec < i32 > > {
259
259
let mut specializations = vec ! [ vec![ ] ] ;
260
260
261
261
for constraint in constraints {
262
262
specializations = constraint
263
263
. flat_map ( |right| {
264
264
specializations. iter ( ) . map ( move |left| {
265
265
let mut left = left. clone ( ) ;
266
- left. push ( i64 :: try_from ( right) . unwrap ( ) ) ;
266
+ left. push ( i32 :: try_from ( right) . unwrap ( ) ) ;
267
267
left
268
268
} )
269
269
} )
Original file line number Diff line number Diff line change 1
1
use std:: fs:: File ;
2
- use std:: io:: { self , Write } ;
3
2
4
3
use rayon:: prelude:: * ;
5
4
@@ -77,14 +76,6 @@ pub trait SupportedArchitectureTest {
77
76
if let Some ( cpp_compiler) = cpp_compiler_wrapped. as_ref ( ) {
78
77
let output = cpp_compiler
79
78
. compile_object_file ( & format ! ( "mod_{i}.cpp" ) , & format ! ( "mod_{i}.o" ) ) ?;
80
- if !output. status . success ( ) {
81
- io:: stdout ( )
82
- . write_all ( & output. stdout )
83
- . expect ( "Failed to write to stdout!" ) ;
84
- io:: stderr ( )
85
- . write_all ( & output. stderr )
86
- . expect ( "Failed to write to stderr!" ) ;
87
- }
88
79
assert ! ( output. status. success( ) , "{output:?}" ) ;
89
80
}
90
81
You can’t perform that action at this time.
0 commit comments