mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
all: run gofmt
Fixes #44980
Change-Id: Icef35319d1582d8367c8911e15d11b0224957327
GitHub-Last-Rev: 2113e97e83
GitHub-Pull-Request: golang/go#45005
Reviewed-on: https://go-review.googlesource.com/c/go/+/301632
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
e61c9ddb7f
commit
de2b27dee7
8 changed files with 47 additions and 48 deletions
2
misc/cgo/testplugin/testdata/method2/main.go
vendored
2
misc/cgo/testplugin/testdata/method2/main.go
vendored
|
|
@ -15,7 +15,7 @@ import (
|
||||||
|
|
||||||
var t p.T
|
var t p.T
|
||||||
|
|
||||||
type I interface { M() }
|
type I interface{ M() }
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
pl, err := plugin.Open("method2.so")
|
pl, err := plugin.Open("method2.so")
|
||||||
|
|
|
||||||
|
|
@ -381,7 +381,7 @@ func init() {
|
||||||
{name: "NOT", argLength: 1, reg: gp11, resultInArg0: true, clobberFlags: true}, // ^arg0
|
{name: "NOT", argLength: 1, reg: gp11, resultInArg0: true, clobberFlags: true}, // ^arg0
|
||||||
{name: "NOTW", argLength: 1, reg: gp11, resultInArg0: true, clobberFlags: true}, // ^arg0
|
{name: "NOTW", argLength: 1, reg: gp11, resultInArg0: true, clobberFlags: true}, // ^arg0
|
||||||
|
|
||||||
{name: "FSQRT", argLength: 1, reg: fp11, asm: "FSQRT"}, // sqrt(arg0)
|
{name: "FSQRT", argLength: 1, reg: fp11, asm: "FSQRT"}, // sqrt(arg0)
|
||||||
{name: "FSQRTS", argLength: 1, reg: fp11, asm: "FSQRTS"}, // sqrt(arg0), float32
|
{name: "FSQRTS", argLength: 1, reg: fp11, asm: "FSQRTS"}, // sqrt(arg0), float32
|
||||||
|
|
||||||
// Conditional register-register moves.
|
// Conditional register-register moves.
|
||||||
|
|
|
||||||
2
src/cmd/cover/testdata/toolexec.go
vendored
2
src/cmd/cover/testdata/toolexec.go
vendored
|
|
@ -15,8 +15,8 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
|
||||||
exec "internal/execabs"
|
exec "internal/execabs"
|
||||||
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
2
src/cmd/go/testdata/addmod.go
vendored
2
src/cmd/go/testdata/addmod.go
vendored
|
|
@ -22,10 +22,10 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
exec "internal/execabs"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
exec "internal/execabs"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,13 @@ func testBLTU(a, b int64) (r bool)
|
||||||
func testBLTZ(a int64) (r bool)
|
func testBLTZ(a int64) (r bool)
|
||||||
func testBNEZ(a int64) (r bool)
|
func testBNEZ(a int64) (r bool)
|
||||||
|
|
||||||
func testGoBGE(a, b int64) bool { return a >= b }
|
func testGoBGE(a, b int64) bool { return a >= b }
|
||||||
func testGoBGEU(a, b int64) bool { return uint64(a) >= uint64(b) }
|
func testGoBGEU(a, b int64) bool { return uint64(a) >= uint64(b) }
|
||||||
func testGoBGT(a, b int64) bool { return a > b }
|
func testGoBGT(a, b int64) bool { return a > b }
|
||||||
func testGoBGTU(a, b int64) bool { return uint64(a) > uint64(b) }
|
func testGoBGTU(a, b int64) bool { return uint64(a) > uint64(b) }
|
||||||
func testGoBLE(a, b int64) bool { return a <= b }
|
func testGoBLE(a, b int64) bool { return a <= b }
|
||||||
func testGoBLEU(a, b int64) bool { return uint64(a) <= uint64(b) }
|
func testGoBLEU(a, b int64) bool { return uint64(a) <= uint64(b) }
|
||||||
func testGoBLT(a, b int64) bool { return a < b }
|
func testGoBLT(a, b int64) bool { return a < b }
|
||||||
func testGoBLTZ(a, b int64) bool { return uint64(a) < uint64(b) }
|
func testGoBLTZ(a, b int64) bool { return uint64(a) < uint64(b) }
|
||||||
|
|
||||||
func TestBranchCondition(t *testing.T) {
|
func TestBranchCondition(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -522,22 +522,22 @@ func elfwriteinterp(out *OutBuf) int {
|
||||||
// member of .gnu.attributes of MIPS for fpAbi
|
// member of .gnu.attributes of MIPS for fpAbi
|
||||||
const (
|
const (
|
||||||
// No floating point is present in the module (default)
|
// No floating point is present in the module (default)
|
||||||
MIPS_FPABI_NONE = 0
|
MIPS_FPABI_NONE = 0
|
||||||
// FP code in the module uses the FP32 ABI for a 32-bit ABI
|
// FP code in the module uses the FP32 ABI for a 32-bit ABI
|
||||||
MIPS_FPABI_ANY = 1
|
MIPS_FPABI_ANY = 1
|
||||||
// FP code in the module only uses single precision ABI
|
// FP code in the module only uses single precision ABI
|
||||||
MIPS_FPABI_SINGLE = 2
|
MIPS_FPABI_SINGLE = 2
|
||||||
// FP code in the module uses soft-float ABI
|
// FP code in the module uses soft-float ABI
|
||||||
MIPS_FPABI_SOFT = 3
|
MIPS_FPABI_SOFT = 3
|
||||||
// FP code in the module assumes an FPU with FR=1 and has 12
|
// FP code in the module assumes an FPU with FR=1 and has 12
|
||||||
// callee-saved doubles. Historic, no longer supported.
|
// callee-saved doubles. Historic, no longer supported.
|
||||||
MIPS_FPABI_HIST = 4
|
MIPS_FPABI_HIST = 4
|
||||||
// FP code in the module uses the FPXX ABI
|
// FP code in the module uses the FPXX ABI
|
||||||
MIPS_FPABI_FPXX = 5
|
MIPS_FPABI_FPXX = 5
|
||||||
// FP code in the module uses the FP64 ABI
|
// FP code in the module uses the FP64 ABI
|
||||||
MIPS_FPABI_FP64 = 6
|
MIPS_FPABI_FP64 = 6
|
||||||
// FP code in the module uses the FP64A ABI
|
// FP code in the module uses the FP64A ABI
|
||||||
MIPS_FPABI_FP64A = 7
|
MIPS_FPABI_FP64A = 7
|
||||||
)
|
)
|
||||||
|
|
||||||
func elfMipsAbiFlags(sh *ElfShdr, startva uint64, resoff uint64) int {
|
func elfMipsAbiFlags(sh *ElfShdr, startva uint64, resoff uint64) int {
|
||||||
|
|
@ -585,7 +585,7 @@ func elfWriteMipsAbiFlags(ctxt *Link) int {
|
||||||
ctxt.Out.Write8(1) // cpr1Size
|
ctxt.Out.Write8(1) // cpr1Size
|
||||||
ctxt.Out.Write8(0) // cpr2Size
|
ctxt.Out.Write8(0) // cpr2Size
|
||||||
if objabi.GOMIPS == "softfloat" {
|
if objabi.GOMIPS == "softfloat" {
|
||||||
ctxt.Out.Write8(MIPS_FPABI_SOFT) // fpAbi
|
ctxt.Out.Write8(MIPS_FPABI_SOFT) // fpAbi
|
||||||
} else {
|
} else {
|
||||||
// Go cannot make sure non odd-number-fpr is used (ie, in load a double from memory).
|
// Go cannot make sure non odd-number-fpr is used (ie, in load a double from memory).
|
||||||
// So, we mark the object is MIPS I style paired float/double register scheme,
|
// So, we mark the object is MIPS I style paired float/double register scheme,
|
||||||
|
|
@ -594,12 +594,12 @@ func elfWriteMipsAbiFlags(ctxt *Link) int {
|
||||||
// Note: MIPS_FPABI_ANY is bad naming: in fact it is MIPS I style FPR usage.
|
// Note: MIPS_FPABI_ANY is bad naming: in fact it is MIPS I style FPR usage.
|
||||||
// It is not for 'ANY'.
|
// It is not for 'ANY'.
|
||||||
// TODO: switch to FPXX after be sure that no odd-number-fpr is used.
|
// TODO: switch to FPXX after be sure that no odd-number-fpr is used.
|
||||||
ctxt.Out.Write8(MIPS_FPABI_ANY) // fpAbi
|
ctxt.Out.Write8(MIPS_FPABI_ANY) // fpAbi
|
||||||
}
|
}
|
||||||
ctxt.Out.Write32(0) // isaExt
|
ctxt.Out.Write32(0) // isaExt
|
||||||
ctxt.Out.Write32(0) // ases
|
ctxt.Out.Write32(0) // ases
|
||||||
ctxt.Out.Write32(0) // flags1
|
ctxt.Out.Write32(0) // flags1
|
||||||
ctxt.Out.Write32(0) // flags2
|
ctxt.Out.Write32(0) // flags2
|
||||||
return int(sh.Size)
|
return int(sh.Size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1538,7 +1538,6 @@ func (ctxt *Link) doelf() {
|
||||||
addgonote(ctxt, ".note.go.buildid", ELF_NOTE_GOBUILDID_TAG, []byte(*flagBuildid))
|
addgonote(ctxt, ".note.go.buildid", ELF_NOTE_GOBUILDID_TAG, []byte(*flagBuildid))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//type mipsGnuAttributes struct {
|
//type mipsGnuAttributes struct {
|
||||||
// version uint8 // 'A'
|
// version uint8 // 'A'
|
||||||
// length uint32 // 15 including itself
|
// length uint32 // 15 including itself
|
||||||
|
|
@ -1552,12 +1551,12 @@ func (ctxt *Link) doelf() {
|
||||||
gnuattributes := ldr.CreateSymForUpdate(".gnu.attributes", 0)
|
gnuattributes := ldr.CreateSymForUpdate(".gnu.attributes", 0)
|
||||||
gnuattributes.SetType(sym.SELFROSECT)
|
gnuattributes.SetType(sym.SELFROSECT)
|
||||||
gnuattributes.SetReachable(true)
|
gnuattributes.SetReachable(true)
|
||||||
gnuattributes.AddUint8('A') // version 'A'
|
gnuattributes.AddUint8('A') // version 'A'
|
||||||
gnuattributes.AddUint32(ctxt.Arch, 15) // length 15 including itself
|
gnuattributes.AddUint32(ctxt.Arch, 15) // length 15 including itself
|
||||||
gnuattributes.AddBytes([]byte("gnu\x00")) // "gnu\0"
|
gnuattributes.AddBytes([]byte("gnu\x00")) // "gnu\0"
|
||||||
gnuattributes.AddUint8(1) // 1:file, 2: section, 3: symbol, 1 here
|
gnuattributes.AddUint8(1) // 1:file, 2: section, 3: symbol, 1 here
|
||||||
gnuattributes.AddUint32(ctxt.Arch, 7) // tag length, including tag, 7 here
|
gnuattributes.AddUint32(ctxt.Arch, 7) // tag length, including tag, 7 here
|
||||||
gnuattributes.AddUint8(4) // 4 for FP, 8 for MSA
|
gnuattributes.AddUint8(4) // 4 for FP, 8 for MSA
|
||||||
if objabi.GOMIPS == "softfloat" {
|
if objabi.GOMIPS == "softfloat" {
|
||||||
gnuattributes.AddUint8(MIPS_FPABI_SOFT)
|
gnuattributes.AddUint8(MIPS_FPABI_SOFT)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ type S int
|
||||||
|
|
||||||
func (s S) M() { println("S.M") }
|
func (s S) M() { println("S.M") }
|
||||||
|
|
||||||
type I interface { M() }
|
type I interface{ M() }
|
||||||
|
|
||||||
type T float64
|
type T float64
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue