diff options
author | jake <jake@FreeBSD.org> | 2002-10-22 18:03:15 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2002-10-22 18:03:15 +0000 |
commit | 9130753f7bfb5024993a17fbec7fac7020574e06 (patch) | |
tree | e96edf10490992bf3efbc52e79111e937298e7cb /sys/sparc64/include/ucontext.h | |
parent | 6856844ba372beec28c7e52c4002703a51c757e2 (diff) | |
download | FreeBSD-src-9130753f7bfb5024993a17fbec7fac7020574e06.zip FreeBSD-src-9130753f7bfb5024993a17fbec7fac7020574e06.tar.gz |
- Expand struct trapframe to 256 bytes, make all fields fixed width and the
same size. Add some fields that previously overlapped with something else
or were missing.
- Make struct regs and struct mcontext (minus floating point) the same as
struct trapframe so converting between them is easy (null).
- Add space for saving floating point state to struct mcontext. This requires
that it be 64 byte aligned.
- Add assertions that none of these structures change size, as they are part
of the ABI.
- Remove some dead code in sendsig().
- Save and restore %gsr in struct trapframe. Remember to restore %fsr.
- Add some comments to exception.S.
Diffstat (limited to 'sys/sparc64/include/ucontext.h')
-rw-r--r-- | sys/sparc64/include/ucontext.h | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/sys/sparc64/include/ucontext.h b/sys/sparc64/include/ucontext.h index 6549e84..b4550c6 100644 --- a/sys/sparc64/include/ucontext.h +++ b/sys/sparc64/include/ucontext.h @@ -32,14 +32,32 @@ #ifndef _MACHINE_UCONTEXT_H_ #define _MACHINE_UCONTEXT_H_ -typedef struct __mcontext { - long mc_global[8]; - long mc_out[8]; - long mc_onstack; - long mc_tpc; - long mc_tnpc; - long mc_tstate; - long mc_spare[2]; -} mcontext_t; +struct __mcontext { + uint64_t mc_global[8]; + uint64_t mc_out[8]; + uint64_t mc_local[8]; + uint64_t mc_in[8]; + uint32_t mc_fp[64]; +} __aligned(64); + +typedef struct __mcontext mcontext_t; + +#define mc_flags mc_global[0] +#define mc_sp mc_out[6] +#define mc_fprs mc_local[0] +#define mc_fsr mc_local[1] +#define mc_gsr mc_local[2] +#define mc_tnpc mc_in[0] +#define mc_tpc mc_in[1] +#define mc_tstate mc_in[2] +#define mc_y mc_in[4] + +#define _MC_VERSION_SHIFT 0 +#define _MC_VERSION_BITS 32 +#define _MC_VERSION 1L + +#define _MC_FLAGS_SHIFT 32 +#define _MC_FLAGS_BITS 32 +#define _MC_VOLUNTARY ((1L << 0) << _MC_FLAGS_SHIFT) #endif /* !_MACHINE_UCONTEXT_H_ */ |