Commit a409fb80 authored by Cherry Zhang's avatar Cherry Zhang Committed by Minux Ma

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/19863Reviewed-by: 's avatarMinux Ma <minux@golang.org>
parent 9bc1e206
......@@ -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 */
......
......@@ -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.
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment