aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd/7g/reg.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/7g/reg.go b/src/cmd/7g/reg.go
index c8035f5663..bf957c5968 100644
--- a/src/cmd/7g/reg.go
+++ b/src/cmd/7g/reg.go
@@ -115,6 +115,11 @@ func excludedregs() uint64 {
// Exclude registers with fixed functions
regbits := uint64(RtoB(arm64.REGRT1) | RtoB(arm64.REGRT2) | RtoB(arm64.REGPR))
+ // Exclude R26 - R31.
+ for r := arm64.REGMAX + 1; r <= arm64.REGZERO; r++ {
+ regbits |= RtoB(r)
+ }
+
// Also exclude floating point registers with fixed constants
regbits |= RtoB(arm64.REG_F27) | RtoB(arm64.REG_F28) | RtoB(arm64.REG_F29) | RtoB(arm64.REG_F30) | RtoB(arm64.REG_F31)