]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/mips et al.: introduce SB register on mips64x
authorCherry Zhang <lunaria21@gmail.com>
Thu, 28 Apr 2016 02:18:02 +0000 (22:18 -0400)
committerMinux Ma <minux@golang.org>
Sun, 1 May 2016 02:36:46 +0000 (02:36 +0000)
commit981395103e9addfc494245979063dc59a327e888
treea6bb5586114cd46c7c6e7096ebc2f15a309787ec
parent8dc0444a04a8a43887b4ca3753ee63b430cf2602
cmd/internal/obj/mips et al.: introduce SB register on mips64x

SB register (R28) is introduced for access external addresses with shorter
instruction sequences. It is loaded at entry points. External data within
2G of SB can be accessed this way.

cmd/internal/obj: relocaltion R_ADDRMIPS is split into two relocations
R_ADDRMIPS and R_ADDRMIPSU, handling the low 16 bits and the "upper" 16
bits of external addresses, respectively, since the instructios may not
be adjacent. It might be better if relocation Variant could be used.

cmd/link/internal/mips64: support new relocations.

cmd/compile/internal/mips64: reserve SB register.

runtime: initialize SB register at entry points.

Change-Id: I5f34868f88c5a9698c042a8a1f12f76806c187b9
Reviewed-on: https://go-review.googlesource.com/19802
Reviewed-by: Minux Ma <minux@golang.org>
src/cmd/compile/internal/mips64/gsubr.go
src/cmd/compile/internal/mips64/reg.go
src/cmd/internal/obj/link.go
src/cmd/internal/obj/mips/asm0.go
src/cmd/link/internal/mips64/asm.go
src/runtime/rt0_linux_mips64x.s
src/runtime/sys_linux_mips64x.s