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>
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 */
// 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)
// 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.
// 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