1
0
mirror of https://github.com/golang/go synced 2024-11-24 06:40:17 -07:00

cmd/compile: mark NOT as an op that doesn't clobber flags on i386/AMD64

NOT does not affect any FLAGS register values on i386/AMD64 so we do not
need to mark it as an Op that clobbers them.

Change-Id: I6d99cad49cfa2568b01e58190256582b18fb3b7b
Reviewed-on: https://go-review.googlesource.com/c/go/+/354831
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
Jake Ciolek 2021-10-09 17:57:06 +02:00 committed by Josh Bleecher Snyder
parent eba91e83b0
commit ba2c9fef03
3 changed files with 3 additions and 6 deletions

View File

@ -298,7 +298,7 @@ func init() {
// unary ops
{name: "NEGL", argLength: 1, reg: gp11, asm: "NEGL", resultInArg0: true, clobberFlags: true}, // -arg0
{name: "NOTL", argLength: 1, reg: gp11, asm: "NOTL", resultInArg0: true, clobberFlags: true}, // ^arg0
{name: "NOTL", argLength: 1, reg: gp11, asm: "NOTL", resultInArg0: true}, // ^arg0
{name: "BSFL", argLength: 1, reg: gp11, asm: "BSFL", clobberFlags: true}, // arg0 # of low-order zeroes ; undef if zero
{name: "BSFW", argLength: 1, reg: gp11, asm: "BSFW", clobberFlags: true}, // arg0 # of low-order zeroes ; undef if zero

View File

@ -513,8 +513,8 @@ func init() {
{name: "NEGQ", argLength: 1, reg: gp11, asm: "NEGQ", resultInArg0: true, clobberFlags: true}, // -arg0
{name: "NEGL", argLength: 1, reg: gp11, asm: "NEGL", resultInArg0: true, clobberFlags: true}, // -arg0
{name: "NOTQ", argLength: 1, reg: gp11, asm: "NOTQ", resultInArg0: true, clobberFlags: true}, // ^arg0
{name: "NOTL", argLength: 1, reg: gp11, asm: "NOTL", resultInArg0: true, clobberFlags: true}, // ^arg0
{name: "NOTQ", argLength: 1, reg: gp11, asm: "NOTQ", resultInArg0: true}, // ^arg0
{name: "NOTL", argLength: 1, reg: gp11, asm: "NOTL", resultInArg0: true}, // ^arg0
// BS{F,R}Q returns a tuple [result, flags]
// result is undefined if the input is zero.

View File

@ -4733,7 +4733,6 @@ var opcodeTable = [...]opInfo{
name: "NOTL",
argLen: 1,
resultInArg0: true,
clobberFlags: true,
asm: x86.ANOTL,
reg: regInfo{
inputs: []inputInfo{
@ -10777,7 +10776,6 @@ var opcodeTable = [...]opInfo{
name: "NOTQ",
argLen: 1,
resultInArg0: true,
clobberFlags: true,
asm: x86.ANOTQ,
reg: regInfo{
inputs: []inputInfo{
@ -10792,7 +10790,6 @@ var opcodeTable = [...]opInfo{
name: "NOTL",
argLen: 1,
resultInArg0: true,
clobberFlags: true,
asm: x86.ANOTL,
reg: regInfo{
inputs: []inputInfo{