Commit 2511cf03 authored by Keith Randall's avatar Keith Randall

[dev.ssa] cmd/compile/internal/ssa: make SETEQF and SETNEF clobber flags

They do an AND or an OR internally, so they clobber flags.

Fixes #12441

Change-Id: I6c843bd268496bc13fc7e3c561d76619e961e8ad
Reviewed-on: https://go-review.googlesource.com/14180Reviewed-by: default avatarTodd Neal <todd@tneal.org>
parent 6411533e
......@@ -112,7 +112,7 @@ func init() {
gp1flags = regInfo{inputs: []regMask{gpsp}, outputs: flagsonly}
flagsgp = regInfo{inputs: flagsonly, outputs: gponly}
readflags = regInfo{inputs: flagsonly, outputs: gponly}
flagsgpax = regInfo{inputs: flagsonly, clobbers: ax, outputs: []regMask{gp &^ ax}}
flagsgpax = regInfo{inputs: flagsonly, clobbers: ax | flags, outputs: []regMask{gp &^ ax}}
gpload = regInfo{inputs: []regMask{gpspsb, 0}, outputs: gponly}
gploadidx = regInfo{inputs: []regMask{gpspsb, gpsp, 0}, outputs: gponly}
......
......@@ -2502,7 +2502,7 @@ var opcodeTable = [...]opInfo{
inputs: []inputInfo{
{0, 8589934592}, // .FLAGS
},
clobbers: 1, // .AX
clobbers: 8589934593, // .AX .FLAGS
outputs: []regMask{
65518, // .CX .DX .BX .BP .SI .DI .R8 .R9 .R10 .R11 .R12 .R13 .R14 .R15
},
......@@ -2515,7 +2515,7 @@ var opcodeTable = [...]opInfo{
inputs: []inputInfo{
{0, 8589934592}, // .FLAGS
},
clobbers: 1, // .AX
clobbers: 8589934593, // .AX .FLAGS
outputs: []regMask{
65518, // .CX .DX .BX .BP .SI .DI .R8 .R9 .R10 .R11 .R12 .R13 .R14 .R15
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment