cmd/internal/obj: make arm64 use RegTo2 instead of a full fledged Addr To2

It shrinks Prog type from 448 bytes down to 376 bytes on amd64.

It also makes sense, because I don't know of any modern architecture
that have instructions which can write to two destinations, none of
which is a register (even x86 doesn't have such instructions).

Change-Id: I3061f1c9ac93d79ee2b92ecb9049641d0e0f6300
Reviewed-on: https://go-review.googlesource.com/10330
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Shenghou Ma 2015-05-21 17:51:34 -04:00 committed by Minux Ma
parent 4e4c1f9c4d
commit 0f27b91522
6 changed files with 11 additions and 11 deletions

View file

@ -206,7 +206,6 @@ type Prog struct {
From Addr
From3 Addr
To Addr
To2 Addr
Opt interface{}
Forwd *Prog
Pcond *Prog
@ -217,6 +216,7 @@ type Prog struct {
Spadj int32
As int16
Reg int16
RegTo2 int16 // 2nd register output operand
Mark uint16
Optab uint16
Scond uint8