From: Cherry Zhang Date: Thu, 28 Apr 2016 02:17:36 +0000 (-0400) Subject: cmd/internal/obj/mips, runtime: change REGTMP to R23 X-Git-Tag: go1.7beta1~389 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a409fb80b0ebc1353336a9c03f8db408fbc6d1d5;p=gostls13.git cmd/internal/obj/mips, runtime: change REGTMP to R23 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 --- diff --git a/src/cmd/internal/obj/mips/a.out.go b/src/cmd/internal/obj/mips/a.out.go index 692e73b532..da0d2616f7 100644 --- a/src/cmd/internal/obj/mips/a.out.go +++ b/src/cmd/internal/obj/mips/a.out.go @@ -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 */ diff --git a/src/runtime/asm_mips64x.s b/src/runtime/asm_mips64x.s index 1ffa3ae348..f55627ce61 100644 --- a/src/runtime/asm_mips64x.s +++ b/src/runtime/asm_mips64x.s @@ -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. diff --git a/src/runtime/tls_mips64x.s b/src/runtime/tls_mips64x.s index 4bd9791dd3..870eecb8dd 100644 --- a/src/runtime/tls_mips64x.s +++ b/src/runtime/tls_mips64x.s @@ -11,10 +11,10 @@ // 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