@@ -10,7 +10,6 @@ use std::fs::{self, File};
1010use rayon:: prelude:: * ;
1111
1212use crate :: common:: cli:: ProcessedCli ;
13- use crate :: common:: compare:: compare_outputs;
1413use crate :: common:: gen_c:: { write_main_cpp, write_mod_cpp} ;
1514use crate :: common:: gen_rust:: {
1615 compile_rust_programs, write_bin_cargo_toml, write_lib_cargo_toml, write_lib_rs, write_main_rs,
@@ -28,7 +27,17 @@ pub struct ArmArchitectureTest {
2827}
2928
3029impl SupportedArchitectureTest for ArmArchitectureTest {
31- fn create ( cli_options : ProcessedCli ) -> Box < Self > {
30+ type IntrinsicImpl = ArmIntrinsicType ;
31+
32+ fn cli_options ( & self ) -> & ProcessedCli {
33+ & self . cli_options
34+ }
35+
36+ fn intrinsics ( & self ) -> & [ Intrinsic < ArmIntrinsicType > ] {
37+ & self . intrinsics
38+ }
39+
40+ fn create ( cli_options : ProcessedCli ) -> Self {
3241 let a32 = cli_options. target . contains ( "v7" ) ;
3342 let mut intrinsics = get_neon_intrinsics ( & cli_options. filename , & cli_options. target )
3443 . expect ( "Error parsing input file" ) ;
@@ -50,10 +59,10 @@ impl SupportedArchitectureTest for ArmArchitectureTest {
5059 . collect :: < Vec < _ > > ( ) ;
5160 intrinsics. dedup ( ) ;
5261
53- Box :: new ( Self {
62+ Self {
5463 intrinsics,
5564 cli_options,
56- } )
65+ }
5766 }
5867
5968 fn build_c_file ( & self ) -> bool {
@@ -177,22 +186,4 @@ impl SupportedArchitectureTest for ArmArchitectureTest {
177186
178187 compile_rust_programs ( toolchain, target, linker)
179188 }
180-
181- fn compare_outputs ( & self ) -> bool {
182- if self . cli_options . toolchain . is_some ( ) {
183- let intrinsics_name_list = self
184- . intrinsics
185- . iter ( )
186- . map ( |i| i. name . clone ( ) )
187- . collect :: < Vec < _ > > ( ) ;
188-
189- compare_outputs (
190- & intrinsics_name_list,
191- & self . cli_options . runner ,
192- & self . cli_options . target ,
193- )
194- } else {
195- true
196- }
197- }
198189}
0 commit comments