diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2017-02-15 21:18:53 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2017-02-15 21:18:53 +0000 |
commit | 7cbc48e37e5a8b89c13486fe8392223b0091a559 (patch) | |
tree | d70dc3d7f982983a7d8309eaa73be12ba2644007 /sys | |
parent | cd09a506cb7d33eec8baabe47faeb32cc2bec3e3 (diff) |
Make this build (and run) with gcc 4.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/m88k/include/tcb.h | 8 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/trap.c | 10 |
2 files changed, 11 insertions, 7 deletions
diff --git a/sys/arch/m88k/include/tcb.h b/sys/arch/m88k/include/tcb.h index b4c798ec33d..5b37acce6e2 100644 --- a/sys/arch/m88k/include/tcb.h +++ b/sys/arch/m88k/include/tcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcb.h,v 1.4 2016/09/04 08:49:35 guenther Exp $ */ +/* $OpenBSD: tcb.h,v 1.5 2017/02/15 21:18:52 miod Exp $ */ /* * Copyright (c) 2011 Philip Guenther <guenther@openbsd.org> @@ -46,13 +46,13 @@ */ #define TLS_VARIANT 1 -#if defined(__GNUC__) && __GNUC__ > 4 +#if defined(__GNUC__) && __GNUC__ >= 4 register void *__tcb __asm__ ("%r27"); #define TCB_GET() (__tcb) #define TCB_SET(tcb) ((__tcb) = (tcb)) -#else /* __GNUC__ > 4 */ +#else /* __GNUC__ >= 4 */ /* Get a pointer to the TCB itself */ static inline void * @@ -66,7 +66,7 @@ __m88k_get_tcb(void) #define TCB_GET() __m88k_get_tcb() #define TCB_SET(tcb) __asm volatile("or %%r27,%0,%r0" : : "r" (tcb)) -#endif /* __GNUC__ > 4 */ +#endif /* __GNUC__ >= 4 */ #endif /* _KERNEL */ #endif /* _MACHINE_TCB_H_ */ diff --git a/sys/arch/m88k/m88k/trap.c b/sys/arch/m88k/m88k/trap.c index 35c54855e32..de8a5f2fdd0 100644 --- a/sys/arch/m88k/m88k/trap.c +++ b/sys/arch/m88k/m88k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.105 2016/10/19 08:31:33 guenther Exp $ */ +/* $OpenBSD: trap.c,v 1.106 2017/02/15 21:18:52 miod Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. * Copyright (c) 1998 Steve Murphree, Jr. @@ -1146,7 +1146,9 @@ m88100_syscall(register_t code, struct trapframe *tf) struct sysent *callp; struct proc *p = curproc; int error; - register_t args[8], rval[2], *ap; + register_t args[8] __aligned(8); + register_t rval[2] __aligned(8); + register_t *ap; uvmexp.syscalls++; @@ -1267,7 +1269,9 @@ m88110_syscall(register_t code, struct trapframe *tf) struct sysent *callp; struct proc *p = curproc; int error; - register_t args[8], rval[2], *ap; + register_t args[8] __aligned(8); + register_t rval[2] __aligned(8); + register_t *ap; uvmexp.syscalls++; |