Skip to content

Commit

Permalink
cmd/asm: delete Addr.Reg2
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
josharian committed May 30, 2015
1 parent 2286e45 commit 4ed7d06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/cmd/asm/internal/asm/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 0 additions & 1 deletion src/cmd/internal/obj/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ed7d06

Please sign in to comment.