save and restore registers symmetrically. don't forget to restore PV (t12).

This commit is contained in:
cgd 1996-09-15 22:33:28 +00:00
parent 1112d46296
commit e025186655
1 changed files with 10 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: profile.h,v 1.5 1996/08/21 15:53:26 cgd Exp $ */
/* $NetBSD: profile.h,v 1.6 1996/09/15 22:33:28 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -91,8 +91,8 @@ LEAF(_mcount,0) /* XXX */
stq t12, OFFSET_T12(sp)
stq gp, OFFSET_GP(sp)
br pv, 1f
1: SETGP(pv)
br pv, LX99
LX99: SETGP(pv)
mov ra, a0
mov at_reg, a1
CALL(mcount)
@ -117,8 +117,9 @@ LEAF(_mcount,0) /* XXX */
ldq t9, OFFSET_T9(sp)
ldq t10, OFFSET_T10(sp)
ldq t11, OFFSET_T11(sp)
ldq gp, OFFSET_GP(sp)
ldq ra, OFFSET_RA(sp)
stq t12, OFFSET_T12(sp)
ldq gp, OFFSET_GP(sp)
ldq at_reg, OFFSET_AT(sp)
@ -163,8 +164,8 @@ _mcount:; \
stq $27, 176($30); \
stq $29, 184($30); \
\
br $27, 1f; \
1: ldgp $29,0($27); \
br $27, LX98; \
LX98: ldgp $29,0($27); \
mov $26, $16; \
mov $28, $17; \
jsr $26,mcount; \
@ -190,10 +191,10 @@ _mcount:; \
ldq $23, 144($30); \
ldq $24, 152($30); \
ldq $25, 160($30); \
ldq $29, 184($30); \
ldq $25, 160($30); \
ldq $26, 168($30); \
\
ldq $28, 0($30); \
ldq $27, 176($30); \
ldq $29, 184($30); \
\
lda $30, 192($30); \
ret $31, ($28), 1; \