arm: add freestanding port
parent
7d149e6358
commit
f3f52fc17c
|
@ -18,7 +18,7 @@ Adding support for new architectures is easy, but you need to know assembly lang
|
||||||
| Architecture | Works on musl | Syscall | Supports FREESTANDING |
|
| Architecture | Works on musl | Syscall | Supports FREESTANDING |
|
||||||
|--------------|---------------|---------|-----------------------|
|
|--------------|---------------|---------|-----------------------|
|
||||||
| aarch64 | ✓ | | |
|
| aarch64 | ✓ | | |
|
||||||
| arm | ✓ | | |
|
| arm | ✓ | | ✓ |
|
||||||
| m68k | ✓ | | ✓ |
|
| m68k | ✓ | | ✓ |
|
||||||
| mips | ✓ | | ✓ |
|
| mips | ✓ | | ✓ |
|
||||||
| mips64 | ✓ | | ✓ |
|
| mips64 | ✓ | | ✓ |
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
#ifndef LIBUCONTEXT_BITS_H
|
||||||
|
#define LIBUCONTEXT_BITS_H
|
||||||
|
|
||||||
|
typedef int libucontext_greg_t, libucontext_gregset_t[18];
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
unsigned long trap_no, error_code, oldmask;
|
||||||
|
unsigned long arm_r0, arm_r1, arm_r2, arm_r3;
|
||||||
|
unsigned long arm_r4, arm_r5, arm_r6, arm_r7;
|
||||||
|
unsigned long arm_r8, arm_r9, arm_r10, arm_fp;
|
||||||
|
unsigned long arm_ip, arm_sp, arm_lr, arm_pc;
|
||||||
|
unsigned long arm_cpsr, fault_address;
|
||||||
|
} 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
|
|
@ -25,7 +25,7 @@ extern void libucontext_trampoline(void);
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
libucontext_makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
|
libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(void), int argc, ...)
|
||||||
{
|
{
|
||||||
unsigned long *sp;
|
unsigned long *sp;
|
||||||
unsigned long *regp;
|
unsigned long *regp;
|
||||||
|
|
Loading…
Reference in New Issue