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

2019-04-02 Thread Andrey Ryabinin
On 4/1/19 11:57 AM, George Spelvin wrote: > Double-word sign-extending shifts by a variable amount are a > non-trivial amount of code and complexity. Doing signed long shifts > before the cast to (s_max) greatly simplifies the object code. > > (Yes, I know "signed" is redundant. It's there

[PATCH] ubsan: Avoid unnecessary 128-bit shifts

2019-04-01 Thread George Spelvin
Double-word sign-extending shifts by a variable amount are a non-trivial amount of code and complexity. Doing signed long shifts before the cast to (s_max) greatly simplifies the object code. (Yes, I know "signed" is redundant. It's there for emphasis.) The complex issue raised by this patch