]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj/mips, runtime: change REGTMP to R23
authorCherry Zhang <lunaria21@gmail.com>
Thu, 28 Apr 2016 02:17:36 +0000 (22:17 -0400)
committerMinux Ma <minux@golang.org>
Sun, 1 May 2016 02:36:28 +0000 (02:36 +0000)
Leave R28 to SB register, which will be introduced in CL 19802.

Change-Id: I1cf7a789695c5de664267ec8086bfb0b043ebc14
Reviewed-on: https://go-review.googlesource.com/19863
Reviewed-by: Minux Ma <minux@golang.org>
src/cmd/internal/obj/mips/a.out.go
src/runtime/asm_mips64x.s
src/runtime/tls_mips64x.s

index 692e73b5328e97980c04ddefcb45078930d9a543..da0d2616f76d580677e2091b8dbc9f820cb6a9eb 100644 (file)
@@ -195,7 +195,7 @@ const (
        REGRT2   = REG_R2  /* reserved for runtime, duffcopy */
        REGCTXT  = REG_R22 /* context for closures */
        REGG     = REG_R30 /* G */
-       REGTMP   = REG_R28 /* used by the linker */
+       REGTMP   = REG_R23 /* used by the linker */
        FREGRET  = REG_F0
        FREGZERO = REG_F24 /* both float and double */
        FREGHALF = REG_F26 /* double */
index 1ffa3ae3484d8bf03752533b2dd134af2e20540f..f55627ce61703cdfa259eb5026c4f4cff14a436c 100644 (file)
@@ -24,8 +24,8 @@ TEXT runtime·rt0_go(SB),NOSPLIT,$0
        // create istack out of the given (operating system) stack.
        // _cgo_init may update stackguard.
        MOVV    $runtime·g0(SB), g
-       MOVV    $(-64*1024), R28
-       ADDV    R28, R29, R1
+       MOVV    $(-64*1024), R23
+       ADDV    R23, R29, R1
        MOVV    R1, g_stackguard0(g)
        MOVV    R1, g_stackguard1(g)
        MOVV    R1, (g_stack+stack_lo)(g)
@@ -299,9 +299,9 @@ TEXT runtime·stackBarrier(SB),NOSPLIT,$0
 // Caution: ugly multiline assembly macros in your future!
 
 #define DISPATCH(NAME,MAXSIZE)         \
-       MOVV    $MAXSIZE, R28;          \
-       SGTU    R1, R28, R28;           \
-       BNE     R28, 3(PC);                     \
+       MOVV    $MAXSIZE, R23;          \
+       SGTU    R1, R23, R23;           \
+       BNE     R23, 3(PC);                     \
        MOVV    $NAME(SB), R4;  \
        JMP     (R4)
 // Note: can't just "BR NAME(SB)" - bad inlining results.
index 4bd9791dd363e018b93acb89e85fdef9e957a55f..870eecb8dd6f92e44ee9f8c719d379cd8ca4dcc6 100644 (file)
 
 // If !iscgo, this is a no-op.
 //
-// NOTE: mcall() assumes this clobbers only R28 (REGTMP).
+// NOTE: mcall() assumes this clobbers only R23 (REGTMP).
 TEXT runtime·save_g(SB),NOSPLIT,$-8-0
-       MOVB    runtime·iscgo(SB), R28
-       BEQ     R28, nocgo
+       MOVB    runtime·iscgo(SB), R23
+       BEQ     R23, nocgo
 
 nocgo:
        RET