Skip to content

Commit 848af1f

Browse files
committed
cmd/compile/internal/sparc64: fix excludedregs
Fixes golang#5 Change-Id: Ic75d3ee42fb21e9361a4cc907859d15ddabcb5e8
1 parent b2fe354 commit 848af1f

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

TODO

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ cd tmp && GOOS=solaris GOARCH=sparc64 go tool compile -S cmp.go
1717
cd tmp && GOOS=solaris GOARCH=sparc64 go tool compile -S shift.go
1818
cd /tmp && lsr /Users/aram/go/test | grep \.go$ | xargs egrep -L 'ERROR' | xargs egrep -L 'import' | GOOS=solaris GOARCH=sparc64 xargs -n1 go tool compile >/tmp/errors
1919

20-
==
21-
22-
ZR is used as a destination register
23-
24-
==
25-
2620
!!!
2721
NO DYNAMIC SIZED INSTRUCTIONS
2822
!!!

src/cmd/compile/internal/sparc64/reg.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ func regnames(n *int) []string {
113113

114114
func excludedregs() uint64 {
115115
// Exclude registers with fixed functions
116-
regbits := RtoB(sparc64.REG_RSP) | RtoB(sparc64.REG_LR) | RtoB(sparc64.REG_GOT)
116+
regbits := RtoB(sparc64.REG_ZR) | RtoB(sparc64.REG_RSP) | RtoB(sparc64.REG_LR) | RtoB(sparc64.REG_GOT)
117117

118118
// Exclude R26 - R31.
119119
for r := sparc64.REG_MAX + 1; r <= sparc64.REG_R31; r++ {
120120
regbits |= RtoB(r)
121121
}
122122

123123
// Exclude floating point registers with fixed functions
124-
regbits = RtoB(sparc64.REG_YTMP)
124+
regbits |= RtoB(sparc64.REG_YTMP)
125125

126126
// Exclude Y16-Y31, since they don't exist.
127127
for r := sparc64.REG_Y15 + 1; r <= (sparc64.REG_Y0 + 31); r++ {

0 commit comments

Comments
 (0)