File tree Expand file tree Collapse file tree 5 files changed +150
-68
lines changed
stdarch/crates/intrinsic-test Expand file tree Collapse file tree 5 files changed +150
-68
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ version = "0.1.0"
44authors = [" Jamie Cunliffe <Jamie.Cunliffe@arm.com>" ,
55 " James McGregor <James.McGregor2@arm.com" ,
66 " Adam Gemmell <Adam.Gemmell@arm.com" ,
7- " Jacob Bramley <jacob.bramley@arm.com>" ]
7+ " Jacob Bramley <jacob.bramley@arm.com>" ,
8+ " James Barford-Evans <james.barford-evans@arm.com>"
9+ ]
810license = " MIT OR Apache-2.0"
911edition = " 2024"
1012
Original file line number Diff line number Diff line change @@ -209,13 +209,13 @@ impl ArgumentList {
209209 /// Creates a line for each argument that initializes the argument from an array `[arg]_vals` at
210210 /// an offset `i` using a load intrinsic, in C.
211211 /// e.g `uint8x8_t a = vld1_u8(&a_vals[i]);`
212- pub fn load_values_c ( & self , indentation : Indentation , p64_armv7_workaround : bool ) -> String {
212+ pub fn load_values_c ( & self , indentation : Indentation , target : & str ) -> String {
213213 self . iter ( )
214214 . filter_map ( |arg| {
215215 // The ACLE doesn't support 64-bit polynomial loads on Armv7
216216 // This and the cast are a workaround for this
217217 let armv7_p64 = if let TypeKind :: Poly = arg. ty . kind ( ) {
218- p64_armv7_workaround
218+ target . contains ( "v7" )
219219 } else {
220220 false
221221 } ;
@@ -226,7 +226,7 @@ impl ArgumentList {
226226 ty = arg. to_c_type( ) ,
227227 name = arg. name,
228228 load = if arg. is_simd( ) {
229- arg. ty. get_load_function( p64_armv7_workaround )
229+ arg. ty. get_load_function( target )
230230 } else {
231231 "*" . to_string( )
232232 } ,
@@ -258,7 +258,7 @@ impl ArgumentList {
258258 name = arg. name,
259259 vals_name = arg. rust_vals_array_name( ) ,
260260 load = if arg. is_simd( ) {
261- arg. ty. get_load_function( false )
261+ arg. ty. get_load_function( "__" )
262262 } else {
263263 "*" . to_string( )
264264 } ,
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ impl Intrinsic {
9191 indentation : Indentation ,
9292 additional : & str ,
9393 passes : u32 ,
94- p64_armv7_workaround : bool ,
94+ target : & str ,
9595 ) -> String {
9696 let body_indentation = indentation. nested ( ) ;
9797 format ! (
@@ -100,9 +100,7 @@ impl Intrinsic {
100100 {body_indentation}auto __return_value = {intrinsic_call}({args});\n \
101101 {print_result}\n \
102102 {indentation}}}",
103- loaded_args = self
104- . arguments
105- . load_values_c( body_indentation, p64_armv7_workaround) ,
103+ loaded_args = self . arguments. load_values_c( body_indentation, target) ,
106104 intrinsic_call = self . name,
107105 args = self . arguments. as_call_param_c( ) ,
108106 print_result = self . print_result_c( body_indentation, additional)
You can’t perform that action at this time.
0 commit comments