Skip to content

Commit

Permalink
Rollup merge of rust-lang#39472 - est31:unadjusted_only_for_win, r=na…
Browse files Browse the repository at this point in the history
…gisa

Don't use "unadjusted" ABI on non windows platforms

We introduced the unadjusted ABI to work around wrong
(buggy) ABI expectations by LLVM on Windows [1].
Therefore, it should be solely used on Windows and not
on other platforms, like right now is the case.

[1]: see this comment for details rust-lang#38482 (comment)
  • Loading branch information
frewsxcv authored Feb 5, 2017
2 parents 388db66 + 3c16139 commit ddd01e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libcompiler_builtins/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,17 +652,17 @@ pub mod reimpls {
}

#[export_name="__fixunssfti"]
pub extern "unadjusted" fn f32_as_u128(a: f32) -> u128 {
pub extern $unadj fn f32_as_u128(a: f32) -> u128 {
float_as_unsigned!(a, f32, u128)
}

#[export_name="__fixdfti"]
pub extern "unadjusted" fn f64_as_i128(a: f64) -> i128 {
pub extern $unadj fn f64_as_i128(a: f64) -> i128 {
float_as_signed!(a, f64, i128)
}

#[export_name="__fixsfti"]
pub extern "unadjusted" fn f32_as_i128(a: f32) -> i128 {
pub extern $unadj fn f32_as_i128(a: f32) -> i128 {
float_as_signed!(a, f32, i128)
}

Expand Down

0 comments on commit ddd01e0

Please sign in to comment.