kwiberg
64208e5523
Fix UBSan errors (left shift of negative value)
...
I've settled on replacing x << n with x * (1 << n); this gets rid of
the "left shift of negative value" warning, but will still trigger
undefined behavior if the multiplication overflows. It also still
looks like a left shift, which is good for the readability of the
fixed-point code.
(The compiler is smart enough to recognize that the
multiplication+shift is just a shift, for both variable and constant
shift amounts, so the generated code should not change.)
BUG=chromium:603491
Review-Url: https://codereview.webrtc.org/1989803002
Cr-Commit-Position: refs/heads/master@{#12845}
2016-05-23 10:28:35 +00:00
..
2015-04-02 04:59:44 +00:00
2015-06-12 01:19:37 +00:00
2014-10-28 13:05:43 +00:00
2015-06-12 01:19:37 +00:00
2015-10-29 10:31:11 +00:00
2015-10-29 10:31:11 +00:00
2015-08-24 21:52:45 +00:00
2015-08-24 21:52:45 +00:00
2016-05-17 17:56:48 +00:00
2015-08-24 21:52:45 +00:00
2015-08-24 21:52:45 +00:00
2016-05-23 10:28:35 +00:00
2015-06-11 19:56:03 +00:00
2014-09-04 13:28:48 +00:00
2013-03-12 17:45:41 +00:00
2016-05-23 10:28:35 +00:00
2016-05-17 17:56:48 +00:00
2015-03-13 12:59:36 +00:00
2013-04-09 00:28:06 +00:00
2016-05-17 17:56:48 +00:00
2014-09-04 13:28:48 +00:00
2014-07-21 16:43:13 +00:00
2015-06-15 06:57:00 +00:00
2016-05-17 17:56:48 +00:00
2016-05-23 10:28:35 +00:00
2014-06-10 18:13:15 +00:00
2015-03-13 12:59:36 +00:00
2016-05-17 17:56:48 +00:00
2015-04-02 04:59:44 +00:00
2015-03-13 12:59:36 +00:00
2015-10-29 10:31:11 +00:00
2016-05-17 17:56:48 +00:00
2015-10-28 17:17:50 +00:00
2015-08-24 21:52:45 +00:00
2015-08-31 18:44:05 +00:00
2015-04-01 09:43:22 +00:00
2016-05-23 10:28:35 +00:00
2014-07-21 16:43:13 +00:00
2015-10-28 17:17:50 +00:00
2015-04-10 06:06:46 +00:00
2015-05-06 08:39:37 +00:00
2013-04-09 00:28:06 +00:00
2014-09-04 13:28:48 +00:00
2014-04-14 20:08:03 +00:00
2016-05-17 17:56:48 +00:00
2015-10-28 17:17:50 +00:00
2015-10-28 17:17:50 +00:00
2015-08-24 21:52:45 +00:00
2015-10-28 17:17:50 +00:00
2015-08-24 21:52:45 +00:00
2015-08-24 21:52:45 +00:00
2016-03-18 05:17:21 +00:00
2013-04-09 00:28:06 +00:00
2014-09-04 13:28:48 +00:00
2013-04-09 00:28:06 +00:00
2014-09-04 13:28:48 +00:00
2014-10-07 00:21:02 +00:00
2013-04-09 00:28:06 +00:00
2014-09-04 13:28:48 +00:00
2015-08-24 21:52:45 +00:00
2015-04-21 23:52:26 +00:00
2015-05-06 02:25:20 +00:00
2015-05-06 08:39:37 +00:00
2016-05-17 17:56:48 +00:00
2016-05-23 10:28:35 +00:00