From 5c3ca5a7e173762800aede17fabc7ece7ae2806f Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sat, 12 Dec 2020 06:02:47 +0000 Subject: [PATCH] sh: add freestanding bits --- arch/sh/freestanding/bits.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 arch/sh/freestanding/bits.h diff --git a/arch/sh/freestanding/bits.h b/arch/sh/freestanding/bits.h new file mode 100644 index 0000000..3db92ad --- /dev/null +++ b/arch/sh/freestanding/bits.h @@ -0,0 +1,29 @@ +#ifndef LIBUCONTEXT_BITS_H +#define LIBUCONTEXT_BITS_H + +typedef unsigned long libucontext_greg_t, libucontext_gregset_t[16]; +typedef unsigned long libucontext_freg_t, libucontext_fpregset_t[16]; +typedef struct sigcontext { + unsigned long oldmask; + unsigned long gregs[16]; + unsigned long pc, pr, sr; + unsigned long gbr, mach, macl; + unsigned long fpregs[16]; + unsigned long xfpregs[16]; + unsigned int fpscr, fpul, ownedfp; +} libucontext_mcontext_t; + +typedef struct { + void *ss_sp; + int ss_flags; + size_t ss_size; +} libucontext_stack_t; + +typedef struct libucontext_ucontext { + unsigned long uc_flags; + struct libucontext_ucontext *uc_link; + libucontext_stack_t uc_stack; + libucontext_mcontext_t uc_mcontext; +} libucontext_ucontext_t; + +#endif