aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/build_cache_gomips.txt
blob: c77acc3f2f32d10c97337cfcb72c4daba2e7c300 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Set up fresh GOCACHE.
env GOCACHE=$WORK/gocache
mkdir $GOCACHE

# Building for mipsle without setting GOMIPS will use floating point registers.
env GOARCH=mipsle
env GOOS=linux
go build -gcflags=-S f.go
stderr ADDD.F[0-9]+,.F[0-9]+,.F[0-9]+

# Clean cache
go clean -cache

# Building with GOMIPS=softfloat will not use floating point registers
env GOMIPS=softfloat
go build -gcflags=-S f.go
! stderr ADDD.F[0-9]+,.F[0-9]+,.F[0-9]+

# Clean cache
go clean -cache

# Build without setting GOMIPS
env GOMIPS=
go build -gcflags=-S f.go
stderr ADDD.F[0-9]+,.F[0-9]+,.F[0-9]+

# Building with GOMIPS should still not use floating point registers.
env GOMIPS=softfloat
go build -gcflags=-S f.go
! stderr ADDD.F[0-9]+,.F[0-9]+,.F[0-9]+

-- f.go --
package f

func F(x float64) float64 {
     return x + x
}