Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/include Force explicit alignment for fpstate ...



details:   https://anonhg.NetBSD.org/src/rev/3b211523c83f
branches:  trunk
changeset: 358703:3b211523c83f
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Jan 14 11:55:33 2018 +0000

description:
Force explicit alignment for fpstate in the kernel, to match what our
asm code assumes.
We use a stack variable at least once (in fpu_init).

diffstat:

 sys/arch/sparc/include/reg.h |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r a9b86dc3b60e -r 3b211523c83f sys/arch/sparc/include/reg.h
--- a/sys/arch/sparc/include/reg.h      Sun Jan 14 03:33:10 2018 +0000
+++ b/sys/arch/sparc/include/reg.h      Sun Jan 14 11:55:33 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: reg.h,v 1.9 2016/12/30 17:54:43 christos Exp $ */
+/*     $NetBSD: reg.h,v 1.10 2018/01/14 11:55:33 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -106,7 +106,11 @@
 struct fpreg {
        u_int   fr_regs[32];            /* our view is 32 32-bit registers */
        int     fr_fsr;                 /* %fsr */
-};
+}
+#ifdef _KERNEL
+ __aligned(8)                          /* asm code uses std instructions */
+#endif
+;
 struct fpstate {
        struct fpreg fs_reg;
 #define fs_regs fs_reg.fr_regs



Home | Main Index | Thread Index | Old Index