]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: cull some dead arch-specific Ops
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 13 Feb 2017 05:11:16 +0000 (21:11 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 13 Feb 2017 18:19:24 +0000 (18:19 +0000)
Change-Id: Iee7daa5b91b7896ce857321e307f2ee47b7f095f
Reviewed-on: https://go-review.googlesource.com/36906
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/fmt.go
src/cmd/compile/internal/gc/opnames.go
src/cmd/compile/internal/gc/racewalk.go
src/cmd/compile/internal/gc/syntax.go

index cd976f0321707c030348de7f856ceb83c372c210..0f8e4795e6a9adb854ae19c3b69ba3b2d83d777e 100644 (file)
@@ -163,7 +163,6 @@ var goopnames = []string{
        OCOM:      "^",
        OCONTINUE: "continue",
        OCOPY:     "copy",
-       ODEC:      "--",
        ODELETE:   "delete",
        ODEFER:    "defer",
        ODIV:      "/",
@@ -175,7 +174,6 @@ var goopnames = []string{
        OGT:       ">",
        OIF:       "if",
        OIMAG:     "imag",
-       OINC:      "++",
        OIND:      "*",
        OLEN:      "len",
        OLE:       "<=",
index 25e3c660d745c33b0a7be1941e5bbb8d172c2c75..8524015c90dd6b5cb31d30933364d542210f35f6 100644 (file)
@@ -152,15 +152,8 @@ var opnames = []string{
        OVARKILL:         "VARKILL",
        OVARLIVE:         "VARLIVE",
        OINDREGSP:        "INDREGSP",
-       OCMP:             "CMP",
-       ODEC:             "DEC",
-       OINC:             "INC",
-       OEXTEND:          "EXTEND",
        OHMUL:            "HMUL",
-       ORROTC:           "RROTC",
        ORETJMP:          "RETJMP",
-       OPS:              "PS",
-       OPC:              "PC",
        OGETG:            "GETG",
        OEND:             "END",
 }
index f9a897c20ce4ecc233d6016b2f2be30c325f5dc1..d6c4501ee7b75db79170317a9ca535565523564b 100644 (file)
@@ -369,11 +369,6 @@ func instrumentnode(np **Node, init *Nodes, wr int, skip int) {
 
                goto ret
 
-               // impossible nodes: only appear in backend.
-       case ORROTC, OEXTEND:
-               yyerror("instrument: %v cannot exist now", n.Op)
-               goto ret
-
        case OGETG:
                yyerror("instrument: OGETG can happen only in runtime which we don't instrument")
                goto ret
index abc0e02aee6d644f4c0b4a7c19de09262c96e6d3..b2dce1527a2c8edda8c0d01ee5065585929af4ae 100644 (file)
@@ -494,15 +494,8 @@ const (
        OINDREGSP   // offset plus indirect of REGSP, such as 8(SP).
 
        // arch-specific opcodes
-       OCMP    // compare: ACMP.
-       ODEC    // decrement: ADEC.
-       OINC    // increment: AINC.
-       OEXTEND // extend: ACWD/ACDQ/ACQO.
        OHMUL   // high mul: AMUL/AIMUL for unsigned/signed (OMUL uses AIMUL for both).
-       ORROTC  // right rotate-carry: ARCR.
        ORETJMP // return to other function
-       OPS     // compare parity set (for x86 NaN check)
-       OPC     // compare parity clear (for x86 NaN check)
        OGETG   // runtime.getg() (read g pointer)
 
        OEND