@@ -239,83 +239,47 @@ intrinsics! {
239
239
// use Win64 ABI rather than unadjusted ABI. Pick the correct ABI based on the
240
240
// llvm14-builtins-abi target feature.
241
241
242
- #[ cfg( target_feature = "llvm14-builtins-abi" ) ]
243
242
intrinsics ! {
243
+ #[ cfg_attr( not( target_feature = "llvm14-builtins-abi" ) , unadjusted_on_win64) ]
244
244
pub extern "C" fn __floattisf( i: i128 ) -> f32 {
245
245
int_to_float( i)
246
246
}
247
247
248
+ #[ cfg_attr( not( target_feature = "llvm14-builtins-abi" ) , unadjusted_on_win64) ]
248
249
pub extern "C" fn __floattidf( i: i128 ) -> f64 {
249
250
int_to_float( i)
250
251
}
251
252
253
+ #[ cfg_attr( not( target_feature = "llvm14-builtins-abi" ) , unadjusted_on_win64) ]
252
254
pub extern "C" fn __floatuntisf( i: u128 ) -> f32 {
253
255
int_to_float( i)
254
256
}
255
257
258
+ #[ cfg_attr( not( target_feature = "llvm14-builtins-abi" ) , unadjusted_on_win64) ]
256
259
pub extern "C" fn __floatuntidf( i: u128 ) -> f64 {
257
260
int_to_float( i)
258
261
}
259
262
260
- #[ win64_128bit_abi_hack]
263
+ #[ cfg_attr( target_feature = "llvm14-builtins-abi" , win64_128bit_abi_hack) ]
264
+ #[ cfg_attr( not( target_feature = "llvm14-builtins-abi" ) , unadjusted_on_win64) ]
261
265
pub extern "C" fn __fixsfti( f: f32 ) -> i128 {
262
266
float_to_int( f)
263
267
}
264
268
265
- #[ win64_128bit_abi_hack]
269
+ #[ cfg_attr( target_feature = "llvm14-builtins-abi" , win64_128bit_abi_hack) ]
270
+ #[ cfg_attr( not( target_feature = "llvm14-builtins-abi" ) , unadjusted_on_win64) ]
266
271
pub extern "C" fn __fixdfti( f: f64 ) -> i128 {
267
272
float_to_int( f)
268
273
}
269
274
270
- #[ win64_128bit_abi_hack]
275
+ #[ cfg_attr( target_feature = "llvm14-builtins-abi" , win64_128bit_abi_hack) ]
276
+ #[ cfg_attr( not( target_feature = "llvm14-builtins-abi" ) , unadjusted_on_win64) ]
271
277
pub extern "C" fn __fixunssfti( f: f32 ) -> u128 {
272
278
float_to_int( f)
273
279
}
274
280
275
- #[ win64_128bit_abi_hack]
276
- pub extern "C" fn __fixunsdfti( f: f64 ) -> u128 {
277
- float_to_int( f)
278
- }
279
- }
280
-
281
- #[ cfg( not( target_feature = "llvm14-builtins-abi" ) ) ]
282
- intrinsics ! {
283
- #[ unadjusted_on_win64]
284
- pub extern "C" fn __floattisf( i: i128 ) -> f32 {
285
- int_to_float( i)
286
- }
287
-
288
- #[ unadjusted_on_win64]
289
- pub extern "C" fn __floattidf( i: i128 ) -> f64 {
290
- int_to_float( i)
291
- }
292
-
293
- #[ unadjusted_on_win64]
294
- pub extern "C" fn __floatuntisf( i: u128 ) -> f32 {
295
- int_to_float( i)
296
- }
297
-
298
- #[ unadjusted_on_win64]
299
- pub extern "C" fn __floatuntidf( i: u128 ) -> f64 {
300
- int_to_float( i)
301
- }
302
-
303
- #[ unadjusted_on_win64]
304
- pub extern "C" fn __fixsfti( f: f32 ) -> i128 {
305
- float_to_int( f)
306
- }
307
-
308
- #[ unadjusted_on_win64]
309
- pub extern "C" fn __fixdfti( f: f64 ) -> i128 {
310
- float_to_int( f)
311
- }
312
-
313
- #[ unadjusted_on_win64]
314
- pub extern "C" fn __fixunssfti( f: f32 ) -> u128 {
315
- float_to_int( f)
316
- }
317
-
318
- #[ unadjusted_on_win64]
281
+ #[ cfg_attr( target_feature = "llvm14-builtins-abi" , win64_128bit_abi_hack) ]
282
+ #[ cfg_attr( not( target_feature = "llvm14-builtins-abi" ) , unadjusted_on_win64) ]
319
283
pub extern "C" fn __fixunsdfti( f: f64 ) -> u128 {
320
284
float_to_int( f)
321
285
}
0 commit comments