@@ -60,9 +60,6 @@ macro_rules! public_test_dep {
60
60
/// the specified ABI everywhere else.
61
61
/// * `unadjusted_on_win64` - like `aapcs_on_arm` this switches to the
62
62
/// `"unadjusted"` abi on Win64 and the specified abi elsewhere.
63
- /// * `win64_128bit_abi_hack` - this attribute is used for 128-bit integer
64
- /// intrinsics where the ABI is slightly tweaked on Windows platforms, but
65
- /// it's a normal ABI elsewhere for returning a 128 bit integer.
66
63
/// * `arm_aeabi_alias` - handles the "aliasing" of various intrinsics on ARM
67
64
/// their otherwise typical names to other prefixed ones.
68
65
/// * `ppc_alias` - changes the name of the symbol on PowerPC platforms without
@@ -231,51 +228,6 @@ macro_rules! intrinsics {
231
228
intrinsics!( $( $rest) * ) ;
232
229
) ;
233
230
234
- // Some intrinsics on win64 which return a 128-bit integer have an.. unusual
235
- // calling convention. That's managed here with this "abi hack" which alters
236
- // the generated symbol's ABI.
237
- //
238
- // This will still define a function in this crate with the given name and
239
- // signature, but the actual symbol for the intrinsic may have a slightly
240
- // different ABI on win64.
241
- (
242
- #[ win64_128bit_abi_hack]
243
- $( #[ $( $attr: tt) * ] ) *
244
- pub extern $abi: tt fn $name: ident( $( $argname: ident: $ty: ty) ,* ) $( -> $ret: ty) ? {
245
- $( $body: tt) *
246
- }
247
-
248
- $( $rest: tt) *
249
- ) => (
250
- #[ cfg( all( any( windows, target_os = "uefi" ) , target_arch = "x86_64" ) ) ]
251
- $( #[ $( $attr) * ] ) *
252
- pub extern $abi fn $name( $( $argname: $ty) ,* ) $( -> $ret) ? {
253
- $( $body) *
254
- }
255
-
256
- #[ cfg( all( any( windows, target_os = "uefi" ) , target_arch = "x86_64" , not( feature = "mangled-names" ) ) ) ]
257
- mod $name {
258
- #[ no_mangle]
259
- #[ cfg_attr( not( all( windows, target_env = "gnu" ) ) , linkage = "weak" ) ]
260
- extern $abi fn $name( $( $argname: $ty) ,* )
261
- -> $crate:: macros:: win64_128bit_abi_hack:: U64x2
262
- {
263
- let e: $( $ret) ? = super :: $name( $( $argname) ,* ) ;
264
- $crate:: macros:: win64_128bit_abi_hack:: U64x2 :: from( e)
265
- }
266
- }
267
-
268
- #[ cfg( not( all( any( windows, target_os = "uefi" ) , target_arch = "x86_64" ) ) ) ]
269
- intrinsics! {
270
- $( #[ $( $attr) * ] ) *
271
- pub extern $abi fn $name( $( $argname: $ty) ,* ) $( -> $ret) ? {
272
- $( $body) *
273
- }
274
- }
275
-
276
- intrinsics!( $( $rest) * ) ;
277
- ) ;
278
-
279
231
// `arm_aeabi_alias` would conflict with `f16_apple_{arg,ret}_abi` not handled here. Avoid macro ambiguity by combining in a
280
232
// single `#[]`.
281
233
(
@@ -576,26 +528,3 @@ macro_rules! intrinsics {
576
528
intrinsics!( $( $rest) * ) ;
577
529
) ;
578
530
}
579
-
580
- // Hack for LLVM expectations for ABI on windows. This is used by the
581
- // `#[win64_128bit_abi_hack]` attribute recognized above
582
- #[ cfg( all( any( windows, target_os = "uefi" ) , target_pointer_width = "64" ) ) ]
583
- pub mod win64_128bit_abi_hack {
584
- #[ repr( simd) ]
585
- pub struct U64x2 ( [ u64 ; 2 ] ) ;
586
-
587
- impl From < i128 > for U64x2 {
588
- fn from ( i : i128 ) -> U64x2 {
589
- use crate :: int:: DInt ;
590
- let j = i as u128 ;
591
- U64x2 ( [ j. lo ( ) , j. hi ( ) ] )
592
- }
593
- }
594
-
595
- impl From < u128 > for U64x2 {
596
- fn from ( i : u128 ) -> U64x2 {
597
- use crate :: int:: DInt ;
598
- U64x2 ( [ i. lo ( ) , i. hi ( ) ] )
599
- }
600
- }
601
- }
0 commit comments