diff options
| author | Cherry Zhang <cherryyz@google.com> | 2018-12-25 19:36:25 -0500 |
|---|---|---|
| committer | Cherry Zhang <cherryyz@google.com> | 2018-12-27 00:07:53 +0000 |
| commit | 6a64efc25004175e198e75191e215a7b1a08a2fa (patch) | |
| tree | 9ded95e599a0c400f6d9de324c2bb5c1587a89b7 /src/syscall/exec_linux.go | |
| parent | bfaf11c158b5ccd7db3c43727357b8b1071d7fde (diff) | |
| download | go-6a64efc25004175e198e75191e215a7b1a08a2fa.tar.xz | |
cmd/compile: fix MIPS SGTconst-with-shift rules
(SGTconst [c] (SRLconst _ [d])) && 0 <= int32(c) && uint32(d) <= 31 && 1<<(32-uint32(d)) <= int32(c) -> (MOVWconst [1])
This rule is problematic. 1<<(32-uint32(d)) <= int32(c) meant to
say that it is true if c is greater than the largest possible
value of the right shift. But when d==1, 1<<(32-1) is negative
and results in the wrong comparison.
Rewrite the rules in a more direct way.
Fixes #29402.
Change-Id: I5940fc9538d9bc3a4bcae8aa34672867540dc60e
Reviewed-on: https://go-review.googlesource.com/c/155798
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/syscall/exec_linux.go')
0 files changed, 0 insertions, 0 deletions
