mirror of
https://github.com/golang/go
synced 2024-11-18 03:04:45 -07:00
cmd/vet: power64 is now ppc64
This was missed when we did the rename months ago because cmd/vet did not live in the main tree. Now vet's asmdecl checks will apply to ppc64 assembly too. Change-Id: I687cba89fef702f29dd118de76a7ca1041c414f6 Reviewed-on: https://go-review.googlesource.com/13677 Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
parent
5acde2d5aa
commit
6f0c7df8ed
@ -58,13 +58,13 @@ type asmVar struct {
|
||||
}
|
||||
|
||||
var (
|
||||
asmArch386 = asmArch{"386", 4, 4, 4, false, "SP", false}
|
||||
asmArchArm = asmArch{"arm", 4, 4, 4, false, "R13", true}
|
||||
asmArchArm64 = asmArch{"arm64", 8, 8, 8, false, "RSP", true}
|
||||
asmArchAmd64 = asmArch{"amd64", 8, 8, 8, false, "SP", false}
|
||||
asmArchAmd64p32 = asmArch{"amd64p32", 4, 4, 8, false, "SP", false}
|
||||
asmArchPower64 = asmArch{"power64", 8, 8, 8, true, "R1", true}
|
||||
asmArchPower64LE = asmArch{"power64le", 8, 8, 8, false, "R1", true}
|
||||
asmArch386 = asmArch{"386", 4, 4, 4, false, "SP", false}
|
||||
asmArchArm = asmArch{"arm", 4, 4, 4, false, "R13", true}
|
||||
asmArchArm64 = asmArch{"arm64", 8, 8, 8, false, "RSP", true}
|
||||
asmArchAmd64 = asmArch{"amd64", 8, 8, 8, false, "SP", false}
|
||||
asmArchAmd64p32 = asmArch{"amd64p32", 4, 4, 8, false, "SP", false}
|
||||
asmArchPpc64 = asmArch{"ppc64", 8, 8, 8, true, "R1", true}
|
||||
asmArchPpc64LE = asmArch{"ppc64le", 8, 8, 8, false, "R1", true}
|
||||
|
||||
arches = []*asmArch{
|
||||
&asmArch386,
|
||||
@ -72,8 +72,8 @@ var (
|
||||
&asmArchArm64,
|
||||
&asmArchAmd64,
|
||||
&asmArchAmd64p32,
|
||||
&asmArchPower64,
|
||||
&asmArchPower64LE,
|
||||
&asmArchPpc64,
|
||||
&asmArchPpc64LE,
|
||||
}
|
||||
)
|
||||
|
||||
@ -86,7 +86,7 @@ var (
|
||||
asmUnnamedFP = re(`[^+\-0-9](([0-9]+)\(FP\))`)
|
||||
asmSP = re(`[^+\-0-9](([0-9]+)\(([A-Z0-9]+)\))`)
|
||||
asmOpcode = re(`^\s*(?:[A-Z0-9a-z_]+:)?\s*([A-Z]+)\s*([^,]*)(?:,\s*(.*))?`)
|
||||
power64Suff = re(`([BHWD])(ZU|Z|U|BR)?$`)
|
||||
ppc64Suff = re(`([BHWD])(ZU|Z|U|BR)?$`)
|
||||
)
|
||||
|
||||
func asmCheck(pkg *Package) {
|
||||
@ -589,9 +589,9 @@ func asmCheckVar(badf func(string, ...interface{}), fn *asmFunc, line, expr stri
|
||||
case 'D', 'Q':
|
||||
src = 8
|
||||
}
|
||||
case "power64", "power64le":
|
||||
case "ppc64", "ppc64le":
|
||||
// Strip standard suffixes to reveal size letter.
|
||||
m := power64Suff.FindStringSubmatch(op)
|
||||
m := ppc64Suff.FindStringSubmatch(op)
|
||||
if m != nil {
|
||||
switch m[1][0] {
|
||||
case 'B':
|
||||
|
Loading…
Reference in New Issue
Block a user