...

Text file src/cmd/go/testdata/script/build_cache_gomips.txt

Documentation: cmd/go/testdata/script

     1env GO111MODULE=off
     2[short] skip # rebuilds std for mips
     3
     4# Set up fresh GOCACHE.
     5env GOCACHE=$WORK/gocache
     6mkdir $GOCACHE
     7
     8# Building for mipsle without setting GOMIPS will use floating point registers.
     9env GOARCH=mipsle
    10env GOOS=linux
    11go build -gcflags=-S f.go
    12stderr ADDD.F[0-9]+,.F[0-9]+,.F[0-9]+
    13
    14# Clean cache
    15go clean -cache
    16
    17# Building with GOMIPS=softfloat will not use floating point registers
    18env GOMIPS=softfloat
    19go build -gcflags=-S f.go
    20! stderr ADDD.F[0-9]+,.F[0-9]+,.F[0-9]+
    21
    22# Clean cache
    23go clean -cache
    24
    25# Build without setting GOMIPS
    26env GOMIPS=
    27go build -gcflags=-S f.go
    28stderr ADDD.F[0-9]+,.F[0-9]+,.F[0-9]+
    29
    30# Building with GOMIPS should still not use floating point registers.
    31env GOMIPS=softfloat
    32go build -gcflags=-S f.go
    33! stderr ADDD.F[0-9]+,.F[0-9]+,.F[0-9]+
    34
    35-- f.go --
    36package f
    37
    38func F(x float64) float64 {
    39     return x + x
    40}

View as plain text