internal/abi, runtime, cmd: merge PCDATA_* and FUNCDATA_* consts into internal/abi

We also rename the constants related to unsafe-points: currently, they
follow the same naming scheme as the PCDATA table indexes, but are not
PCDATA table indexes.

For #59670.

Change-Id: I06529fecfae535be5fe7d9ac56c886b9106c74fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/485497
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Austin Clements <austin@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
Austin Clements 2023-04-17 16:50:00 -04:00 committed by Gopher Robot
parent 2668a190ba
commit 7843ca83e7
21 changed files with 120 additions and 162 deletions

View file

@ -6,9 +6,9 @@ package obj
import (
"bytes"
"cmd/internal/objabi"
"cmd/internal/src"
"fmt"
"internal/abi"
"internal/buildcfg"
"io"
"strings"
@ -313,7 +313,7 @@ func writeDconv(w io.Writer, p *Prog, a *Addr, abiDetail bool) {
}
case TYPE_TEXTSIZE:
if a.Val.(int32) == objabi.ArgsSizeUnknown {
if a.Val.(int32) == abi.ArgsSizeUnknown {
fmt.Fprintf(w, "$%d", a.Offset)
} else {
fmt.Fprintf(w, "$%d-%d", a.Offset, a.Val.(int32))