From 7cbc48e37e5a8b89c13486fe8392223b0091a559 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Wed, 15 Feb 2017 21:18:53 +0000 Subject: Make this build (and run) with gcc 4. --- libexec/ld.so/m88k/rtld_machine.c | 4 ++-- sys/arch/m88k/include/tcb.h | 8 ++++---- sys/arch/m88k/m88k/trap.c | 10 +++++++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/libexec/ld.so/m88k/rtld_machine.c b/libexec/ld.so/m88k/rtld_machine.c index 5ebf997b576..586a84cff9c 100644 --- a/libexec/ld.so/m88k/rtld_machine.c +++ b/libexec/ld.so/m88k/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.19 2017/01/24 10:52:33 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.20 2017/02/15 21:18:52 miod Exp $ */ /* * Copyright (c) 2013 Miodrag Vallat. @@ -395,7 +395,7 @@ _dl_bind(elf_object_t *object, int reloff) __asm volatile("tb0 0, %%r0, 450; or %%r0, %%r0, %%r0" : "+r" (arg1), "+r" (arg2) : "r" (syscall_num), - "r" (arg3), "r" (arg4) : "cc", "memory"); + "r" (arg3), "r" (arg4) : "memory"); } return (buf.newval); 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 @@ -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++; -- cgit v1.2.3