diff options
| author | Simonas Kazlauskas <git@kazlauskas.me> | 2017-03-04 11:08:14 +0200 |
|---|---|---|
| committer | Simonas Kazlauskas <git@kazlauskas.me> | 2017-03-04 11:28:58 +0200 |
| commit | 8f581cc917f2b5984e00dc51671168f2c377b1c1 (patch) | |
| tree | 0f03e55b9a692c9eec4725a4876525a2d2e7b60a /src/libcompiler_builtins | |
| parent | f0b514524fed8c8cca369a51feece8be50f8b82b (diff) | |
| download | rust-8f581cc917f2b5984e00dc51671168f2c377b1c1.tar.gz rust-8f581cc917f2b5984e00dc51671168f2c377b1c1.zip | |
Fix personality_fn within the compiler_builtins
compiler_builtins may not have any unwinding within it to link correctly. This is notoriously finicky, and this small piece of change removes yet another case where personality function happens to get introduced. Side note: I do remember solving the exact same thing before. I wonder why it has reappered...
Diffstat (limited to 'src/libcompiler_builtins')
| -rw-r--r-- | src/libcompiler_builtins/lib.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libcompiler_builtins/lib.rs b/src/libcompiler_builtins/lib.rs index 482d70895ff..fb42b915c76 100644 --- a/src/libcompiler_builtins/lib.rs +++ b/src/libcompiler_builtins/lib.rs @@ -402,15 +402,16 @@ pub mod reimpls { } trait AbsExt: Sized { - fn uabs(self) -> u128 { - self.iabs() as u128 - } + fn uabs(self) -> u128; fn iabs(self) -> i128; } impl AbsExt for i128 { + fn uabs(self) -> u128 { + self.iabs() as u128 + } fn iabs(self) -> i128 { - let s = self >> 127; + let s = self.wrapping_shr(127); ((self ^ s).wrapping_sub(s)) } } |
