changes for shared libs ... now saving sb register (as I should have all along)

This commit is contained in:
phil 1994-04-19 17:11:16 +00:00
parent 6c6a8ee7de
commit b7685a8087
4 changed files with 13 additions and 8 deletions

View File

@ -58,6 +58,7 @@ struct trapframe {
long tf_trapno;
long tf_reg[8]; /* R7 - R0 from enter */
long tf_usp;
long tf_sb;
long tf_fp; /* From enter */
/* below portion defined in 532 hardware */
long tf_pc;
@ -72,6 +73,7 @@ struct intrframe {
long if_pl; /* the "processor level" for clock. */
long if_reg[8]; /* R7 - R0 from enter */
long if_usp;
long if_sb;
long if_fp; /* From enter */
/* below portion defined in 532 hardware */
long if_pc;
@ -86,6 +88,7 @@ struct intrframe {
struct syscframe {
long sf_reg[8]; /* R7 - R0 from enter */
long sf_usp;
long sf_sb;
long sf_fp; /* From enter */
/* below portion defined in 532 hardware */
long sf_pc;

View File

@ -49,10 +49,11 @@
*/
/* The registers as pushed from a trap/interrupt with the
exception of the USP, and that is placed by software. */
exception of USP and SB, and they are placed by software. */
struct on_stack {
long pcb_reg[8]; /* R7 - R0 from enter */
long pcb_usp; /* User stack pointer, by software. */
long pcb_sb; /* Static Base pointer, by software. */
long pcb_fp; /* From enter */
long pcb_pc; /* From the trap/interrupt */
u_short pcb_mod; /* in direct exception mode. */

View File

@ -64,9 +64,10 @@
#define R7 (0)
#define SP (8)
#define FP (9)
#define PC (10)
#define PSR (11)
#define SB (9)
#define FP (10)
#define PC (11)
#define PSR (12)
#define PS PSR
@ -83,6 +84,7 @@ struct reg {
unsigned int r_r0;
unsigned int r_sp;
unsigned int r_sb;
unsigned int r_fp;
unsigned int r_pc;
unsigned int r_psr;
@ -92,10 +94,10 @@ struct reg {
/*
* Registers accessible to ptrace(2) syscall for debugger
*/
#define NIPCREG 12
#define NIPCREG 13
#ifdef IPCREG
int ipcreg[NIPCREG] =
{ R0,R1,R2,R3,R4,R5,R6,R7,SP,FP,PC,PSR };
{ R0,R1,R2,R3,R4,R5,R6,R7,SP,SB,FP,PC,PSR };
#endif
#endif

View File

@ -56,11 +56,10 @@ struct sigcontext {
int sc_mask; /* signal mask to restore */
int sc_sp; /* sp to restore */
int sc_fp; /* fp to restore */
int sc_ap; /* ap to restore */
int sc_sb; /* sb to restore */
int sc_pc; /* pc to restore */
int sc_ps; /* psl to restore */
int sc_reg[8]; /* The registers */
};
#endif /* _MACHINE_SIGNAL_H_ */