Re: [PATCH v3] ubsan: Avoid unnecessary 128-bit shifts

2019-04-09 Thread Heiko Carstens
On Fri, Apr 05, 2019 at 01:58:53AM +, George Spelvin wrote: > If CONFIG_ARCH_SUPPORTS_INT128, s_max is 128 bits, and variable > sign-extending shifts of such a double-word data type are a non-trivial > amount of code and complexity. Do a single-word sign-extension *before* > the cast to (s_max

[PATCH v3] ubsan: Avoid unnecessary 128-bit shifts

2019-04-04 Thread George Spelvin
If CONFIG_ARCH_SUPPORTS_INT128, s_max is 128 bits, and variable sign-extending shifts of such a double-word data type are a non-trivial amount of code and complexity. Do a single-word sign-extension *before* the cast to (s_max), greatly simplifying the object code. Rasmus Villemoes suggested usin