s390x: add freestanding port

master
Ariadne Conill 2020-12-06 12:36:27 +00:00
parent b33c7df219
commit 50bb9432c8
3 changed files with 43 additions and 2 deletions

View File

@ -25,7 +25,7 @@ Adding support for new architectures is easy, but you need to know assembly lang
| ppc | ✓ | ✓ | |
| ppc64 | ✓ | ✓ | |
| riscv64 | ✓ | | |
| s390x | ✓ | | |
| s390x | ✓ | | |
| x86 | ✓ | | ✓ |
| x86_64 | ✓ | | ✓ |

View File

@ -0,0 +1,41 @@
#ifndef LIBUCONTEXT_BITS_H
#define LIBUCONTEXT_BITS_H
typedef unsigned long libucontext_greg_t, libucontext_gregset_t[27];
typedef struct {
unsigned long mask;
unsigned long addr;
} libucontext_psw_t;
typedef union {
double d;
float f;
} libucontext_fpreg_t;
typedef struct {
unsigned fpc;
libucontext_fpreg_t fprs[16];
} libucontext_fpregset_t;
typedef struct {
libucontext_psw_t psw;
unsigned long gregs[16];
unsigned aregs[16];
libucontext_fpregset_t fpregs;
} 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

View File

@ -21,7 +21,7 @@
extern void libucontext_trampoline(void);
extern int libucontext_setcontext(const ucontext_t *ucp);
extern int libucontext_setcontext(const libucontext_ucontext_t *ucp);
void