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:
Prajwal Koirala 2021-03-15 06:13:23 +00:00 committed by Ian Lance Taylor
parent e61c9ddb7f
commit de2b27dee7
8 changed files with 47 additions and 48 deletions

View File

@ -15,7 +15,7 @@ import (
var t p.T
type I interface { M() }
type I interface{ M() }
func main() {
pl, err := plugin.Open("method2.so")

View File

@ -381,7 +381,7 @@ func init() {
{name: "NOT", 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
// Conditional register-register moves.

View File

@ -15,8 +15,8 @@
package main
import (
"os"
exec "internal/execabs"
"os"
"strings"
)

View File

@ -22,10 +22,10 @@ import (
"bytes"
"flag"
"fmt"
exec "internal/execabs"
"io/fs"
"log"
"os"
exec "internal/execabs"
"path/filepath"
"strings"

View File

@ -25,13 +25,13 @@ func testBLTU(a, b int64) (r bool)
func testBLTZ(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 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 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 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 TestBranchCondition(t *testing.T) {

View File

@ -522,22 +522,22 @@ func elfwriteinterp(out *OutBuf) int {
// member of .gnu.attributes of MIPS for fpAbi
const (
// 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
MIPS_FPABI_ANY = 1
MIPS_FPABI_ANY = 1
// 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
MIPS_FPABI_SOFT = 3
MIPS_FPABI_SOFT = 3
// FP code in the module assumes an FPU with FR=1 and has 12
// callee-saved doubles. Historic, no longer supported.
MIPS_FPABI_HIST = 4
MIPS_FPABI_HIST = 4
// 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
MIPS_FPABI_FP64 = 6
MIPS_FPABI_FP64 = 6
// 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 {
@ -585,7 +585,7 @@ func elfWriteMipsAbiFlags(ctxt *Link) int {
ctxt.Out.Write8(1) // cpr1Size
ctxt.Out.Write8(0) // cpr2Size
if objabi.GOMIPS == "softfloat" {
ctxt.Out.Write8(MIPS_FPABI_SOFT) // fpAbi
ctxt.Out.Write8(MIPS_FPABI_SOFT) // fpAbi
} else {
// 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,
@ -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.
// It is not for 'ANY'.
// 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) // ases
ctxt.Out.Write32(0) // flags1
ctxt.Out.Write32(0) // flags2
ctxt.Out.Write32(0) // isaExt
ctxt.Out.Write32(0) // ases
ctxt.Out.Write32(0) // flags1
ctxt.Out.Write32(0) // flags2
return int(sh.Size)
}
@ -1538,7 +1538,6 @@ func (ctxt *Link) doelf() {
addgonote(ctxt, ".note.go.buildid", ELF_NOTE_GOBUILDID_TAG, []byte(*flagBuildid))
}
//type mipsGnuAttributes struct {
// version uint8 // 'A'
// length uint32 // 15 including itself
@ -1552,12 +1551,12 @@ func (ctxt *Link) doelf() {
gnuattributes := ldr.CreateSymForUpdate(".gnu.attributes", 0)
gnuattributes.SetType(sym.SELFROSECT)
gnuattributes.SetReachable(true)
gnuattributes.AddUint8('A') // version 'A'
gnuattributes.AddUint32(ctxt.Arch, 15) // length 15 including itself
gnuattributes.AddUint8('A') // version 'A'
gnuattributes.AddUint32(ctxt.Arch, 15) // length 15 including itself
gnuattributes.AddBytes([]byte("gnu\x00")) // "gnu\0"
gnuattributes.AddUint8(1) // 1:file, 2: section, 3: symbol, 1 here
gnuattributes.AddUint32(ctxt.Arch, 7) // tag length, including tag, 7 here
gnuattributes.AddUint8(4) // 4 for FP, 8 for MSA
gnuattributes.AddUint8(1) // 1:file, 2: section, 3: symbol, 1 here
gnuattributes.AddUint32(ctxt.Arch, 7) // tag length, including tag, 7 here
gnuattributes.AddUint8(4) // 4 for FP, 8 for MSA
if objabi.GOMIPS == "softfloat" {
gnuattributes.AddUint8(MIPS_FPABI_SOFT)
} else {

View File

@ -14,7 +14,7 @@ type S int
func (s S) M() { println("S.M") }
type I interface { M() }
type I interface{ M() }
type T float64

View File

@ -1,19 +1,19 @@
package main
import (
"fmt"
"os"
"os/signal"
"time"
)
func main() {
c := make(chan os.Signal, 1)
signal.Notify(c)
fmt.Println("ready")
sig := <-c
time.Sleep(time.Second)
fmt.Println(sig)
}
package main
import (
"fmt"
"os"
"os/signal"
"time"
)
func main() {
c := make(chan os.Signal, 1)
signal.Notify(c)
fmt.Println("ready")
sig := <-c
time.Sleep(time.Second)
fmt.Println(sig)
}