1
0
mirror of https://github.com/golang/go synced 2024-11-17 08:14:48 -07:00

cmd/compile: remove auxSymInt32

We never used it, might as well get rid of it.

Change-Id: I5c23c93e90173bff9ac1fc1b8ae1e2025215d6eb
Reviewed-on: https://go-review.googlesource.com/c/go/+/191938
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
Keith Randall 2019-08-27 15:06:07 -07:00 committed by Keith Randall
parent a8c2e5c6ad
commit b91b3d9c31
4 changed files with 3 additions and 11 deletions

View File

@ -155,12 +155,6 @@ func checkFunc(f *Func) {
case auxSymOff, auxSymValAndOff, auxTypSize: case auxSymOff, auxSymValAndOff, auxTypSize:
canHaveAuxInt = true canHaveAuxInt = true
canHaveAux = true canHaveAux = true
case auxSymInt32:
if v.AuxInt != int64(int32(v.AuxInt)) {
f.Fatalf("bad int32 AuxInt value for %v", v)
}
canHaveAuxInt = true
canHaveAux = true
case auxCCop: case auxCCop:
if _, ok := v.Aux.(Op); !ok { if _, ok := v.Aux.(Op); !ok {
f.Fatalf("bad type %T for CCop in %v", v.Aux, v) f.Fatalf("bad type %T for CCop in %v", v.Aux, v)

View File

@ -908,14 +908,14 @@ func parseValue(val string, arch arch, loc string) (op opData, oparch, typ, auxi
// Sanity check aux, auxint. // Sanity check aux, auxint.
if auxint != "" { if auxint != "" {
switch op.aux { switch op.aux {
case "Bool", "Int8", "Int16", "Int32", "Int64", "Int128", "Float32", "Float64", "SymOff", "SymValAndOff", "SymInt32", "TypSize": case "Bool", "Int8", "Int16", "Int32", "Int64", "Int128", "Float32", "Float64", "SymOff", "SymValAndOff", "TypSize":
default: default:
log.Fatalf("%s: op %s %s can't have auxint", loc, op.name, op.aux) log.Fatalf("%s: op %s %s can't have auxint", loc, op.name, op.aux)
} }
} }
if aux != "" { if aux != "" {
switch op.aux { switch op.aux {
case "String", "Sym", "SymOff", "SymValAndOff", "SymInt32", "Typ", "TypSize", "CCop": case "String", "Sym", "SymOff", "SymValAndOff", "Typ", "TypSize", "CCop":
default: default:
log.Fatalf("%s: op %s %s can't have aux", loc, op.name, op.aux) log.Fatalf("%s: op %s %s can't have aux", loc, op.name, op.aux)
} }

View File

@ -83,8 +83,6 @@ const (
auxTyp // aux is a type auxTyp // aux is a type
auxTypSize // aux is a type, auxInt is a size, must have Aux.(Type).Size() == AuxInt auxTypSize // aux is a type, auxInt is a size, must have Aux.(Type).Size() == AuxInt
auxCCop // aux is a ssa.Op that represents a flags-to-bool conversion (e.g. LessThan) auxCCop // aux is a ssa.Op that represents a flags-to-bool conversion (e.g. LessThan)
auxSymInt32 // aux is a symbol, auxInt is a 32-bit integer
) )
// A SymEffect describes the effect that an SSA Value has on the variable // A SymEffect describes the effect that an SSA Value has on the variable

View File

@ -183,7 +183,7 @@ func (v *Value) auxString() string {
if v.Aux != nil { if v.Aux != nil {
return fmt.Sprintf(" {%v}", v.Aux) return fmt.Sprintf(" {%v}", v.Aux)
} }
case auxSymOff, auxSymInt32, auxTypSize: case auxSymOff, auxTypSize:
s := "" s := ""
if v.Aux != nil { if v.Aux != nil {
s = fmt.Sprintf(" {%v}", v.Aux) s = fmt.Sprintf(" {%v}", v.Aux)