cmd/compile: simplify obj.ProgInfo and extract from obj.Prog

Updates #16357.

Change-Id: Ia837dd44bad76931baa9469e64371bc253d6694b
Reviewed-on: https://go-review.googlesource.com/29219
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Matthew Dempsky 2016-09-15 01:42:58 -07:00
parent 404ae84aa2
commit e6134702bb
18 changed files with 103 additions and 641 deletions

View file

@ -229,8 +229,6 @@ type Prog struct {
Tt uint8
Isize uint8 // size of the instruction in bytes (x86 only)
Mode int8
Info ProgInfo
}
// From3Type returns From3.Type, or TYPE_NONE when From3 is nil.
@ -249,17 +247,6 @@ func (p *Prog) From3Offset() int64 {
return p.From3.Offset
}
// ProgInfo holds information about the instruction for use
// by clients such as the compiler. The exact meaning of this
// data is up to the client and is not interpreted by the cmd/internal/obj/... packages.
type ProgInfo struct {
_ struct{} // to prevent unkeyed literals. Trailing zero-sized field will take space.
Flags uint32 // flag bits
Reguse uint64 // registers implicitly used by this instruction
Regset uint64 // registers implicitly set by this instruction
Regindex uint64 // registers used by addressing mode
}
// An As denotes an assembler opcode.
// There are some portable opcodes, declared here in package obj,
// that are common to all architectures.