This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -64,12 +64,28 @@ pub(crate) fn clif_int_or_float_cast(
64
64
} ,
65
65
) ;
66
66
67
- return fx. lib_call (
68
- & name,
69
- vec ! [ AbiParam :: new( types:: I128 ) ] ,
70
- vec ! [ AbiParam :: new( to_ty) ] ,
71
- & [ from] ,
72
- ) [ 0 ] ;
67
+ if fx. tcx . sess . target . is_like_windows {
68
+ let arg_place = CPlace :: new_stack_slot (
69
+ fx,
70
+ fx. layout_of ( if from_signed { fx. tcx . types . i128 } else { fx. tcx . types . u128 } ) ,
71
+ ) ;
72
+ let arg_ptr = arg_place. to_ptr ( ) ;
73
+ arg_ptr. store ( fx, from, MemFlags :: trusted ( ) ) ;
74
+ let args = [ arg_ptr. get_addr ( fx) ] ;
75
+ return fx. lib_call (
76
+ & name,
77
+ vec ! [ AbiParam :: new( fx. pointer_type) ] ,
78
+ vec ! [ AbiParam :: new( to_ty) ] ,
79
+ & args,
80
+ ) [ 0 ] ;
81
+ } else {
82
+ return fx. lib_call (
83
+ & name,
84
+ vec ! [ AbiParam :: new( types:: I128 ) ] ,
85
+ vec ! [ AbiParam :: new( to_ty) ] ,
86
+ & [ from] ,
87
+ ) [ 0 ] ;
88
+ }
73
89
}
74
90
75
91
// int-like -> float
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
188
188
}
189
189
190
190
fn target_features ( & self , _sess : & Session , _allow_unstable : bool ) -> Vec < rustc_span:: Symbol > {
191
- vec ! [ ]
191
+ vec ! [ Symbol :: intern ( "llvm14-builtins-abi" ) ]
192
192
}
193
193
194
194
fn print_version ( & self ) {
You can’t perform that action at this time.
0 commit comments