diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-04-30 04:20:32 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-04-30 04:20:32 +0000 |
commit | 9563f562208c1eae74891da14c447b2af638bfa9 (patch) | |
tree | 56413c4449b91879bed08d4ca62b61779f8ea3f3 | |
parent | 7f3cc7b9daf81b20cd25282467ee117ae4938897 (diff) |
Enforce proper alignment of stack variables which may get accessed with
double-word load and store instructions. This used to work by chance, but
recent compiler changes no longer put us in the lucky situation.
tweaks kettenis@
-rw-r--r-- | sys/arch/sparc/sparc/cpu.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/trap.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/sparc/sparc/cpu.c b/sys/arch/sparc/sparc/cpu.c index dd5ee00b1a5..2cd298c6bd1 100644 --- a/sys/arch/sparc/sparc/cpu.c +++ b/sys/arch/sparc/sparc/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.49 2012/11/25 13:34:17 jsg Exp $ */ +/* $OpenBSD: cpu.c,v 1.50 2014/04/30 04:20:31 miod Exp $ */ /* $NetBSD: cpu.c,v 1.56 1997/09/15 20:52:36 pk Exp $ */ /* @@ -294,7 +294,7 @@ void fpu_init(sc) struct cpu_softc *sc; { - struct fpstate fpstate; + struct fpstate fpstate __aligned(8); /* * Get the FSR and clear any exceptions. If we do not unload diff --git a/sys/arch/sparc/sparc/trap.c b/sys/arch/sparc/sparc/trap.c index d5dcac3167a..9ef25319c59 100644 --- a/sys/arch/sparc/sparc/trap.c +++ b/sys/arch/sparc/sparc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.65 2014/04/18 11:51:17 guenther Exp $ */ +/* $OpenBSD: trap.c,v 1.66 2014/04/30 04:20:31 miod Exp $ */ /* $NetBSD: trap.c,v 1.58 1997/09/12 08:55:01 pk Exp $ */ /* @@ -952,8 +952,8 @@ syscall(code, tf, pc) int error, new; struct args { register_t i[8]; - } args; - register_t rval[2]; + } args __aligned(8); + register_t rval[2] __aligned(8); #ifdef DIAGNOSTIC extern struct pcb *cpcb; #endif |