• Cherry Zhang's avatar
    cmd/internal/obj/mips et al.: introduce SB register on mips64x · 98139510
    Cherry Zhang authored
    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/19802Reviewed-by: default avatarMinux Ma <minux@golang.org>
    98139510
reg.go 3.45 KB