From 8f581cc917f2b5984e00dc51671168f2c377b1c1 Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Sat, 4 Mar 2017 11:08:14 +0200 Subject: [PATCH] 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... --- src/libcompiler_builtins/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libcompiler_builtins/lib.rs b/src/libcompiler_builtins/lib.rs index 482d70895ff89..fb42b915c7694 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)) } }