]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/asm: delete Addr.Reg2
authorJosh Bleecher Snyder <josharian@gmail.com>
Fri, 29 May 2015 17:33:39 +0000 (10:33 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Sat, 30 May 2015 02:47:25 +0000 (02:47 +0000)
That which cannot happen has not happened.

No immediate changes to Addr or Prog size.

Change-Id: I4cb9315f2c9f5f92eda340bfc4abb46395fa467f
Reviewed-on: https://go-review.googlesource.com/10513
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/asm/internal/asm/parse.go
src/cmd/internal/obj/link.go

index 6b67451d5f456f8acdacab3b2ecd97c4b66994c8..7d03c5c18064b8228954be4252a9cb53d7aad5ea 100644 (file)
@@ -311,10 +311,8 @@ func (p *Parser) operand(a *obj.Addr) bool {
                        a.Reg = r1
                        if r2 != 0 {
                                // Form is R1:R2. It is on RHS and the second register
-                               // needs to go into the LHS. This is a horrible hack. TODO.
-                               // TODO: If we never see this again, can delete Addr.Reg2.
-                               panic("cannot happen")
-                               a.Reg2 = r2
+                               // needs to go into the LHS.
+                               panic("cannot happen (Addr.Reg2)")
                        }
                }
                // fmt.Printf("REG %s\n", obj.Dconv(&emptyProg, 0, a))
index 542421b835f0c2de0540434b1a799bda20ac3e3c..d984516ed7f6c2abb433db1a4df928b57db5ba58 100644 (file)
@@ -146,7 +146,6 @@ import "encoding/binary"
 type Addr struct {
        Type   int16
        Reg    int16
-       Reg2   int16 // RHS of register pair. AX:DX (386)
        Index  int16
        Scale  int16 // Sometimes holds a register.
        Name   int8