Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/m68k/fpe Use static inline structure assignment for...



details:   https://anonhg.NetBSD.org/src/rev/f9e33d6996c9
branches:  trunk
changeset: 770237:f9e33d6996c9
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Oct 09 01:34:19 2011 +0000

description:
Use static inline structure assignment for CPYFPN().  From isaki@.
Tested on XM6i.

diffstat:

 sys/arch/m68k/fpe/fpu_emulate.h |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (34 lines):

diff -r 4a90264e0a2c -r f9e33d6996c9 sys/arch/m68k/fpe/fpu_emulate.h
--- a/sys/arch/m68k/fpe/fpu_emulate.h   Sat Oct 08 22:16:03 2011 +0000
+++ b/sys/arch/m68k/fpe/fpu_emulate.h   Sun Oct 09 01:34:19 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_emulate.h,v 1.16 2011/07/18 07:44:30 isaki Exp $   */
+/*     $NetBSD: fpu_emulate.h,v 1.17 2011/10/09 01:34:19 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1995 Gordon Ross
@@ -91,15 +91,15 @@
 #define        FP_1            (1 << FP_LG)            /* 1.0 in fp_mant[0] */
 #define        FP_2            (1 << (FP_LG + 1))      /* 2.0 in fp_mant[0] */
 
-#define CPYFPN(dst, src)                                               \
-if ((dst) != (src)) {                                                  \
-       (dst)->fp_class = (src)->fp_class;                              \
-       (dst)->fp_sign = (src)->fp_sign;                                \
-       (dst)->fp_exp = (src)->fp_exp;                                  \
-       (dst)->fp_sticky = (src)->fp_sticky;                            \
-       (dst)->fp_mant[0] = (src)->fp_mant[0];                          \
-       (dst)->fp_mant[1] = (src)->fp_mant[1];                          \
-       (dst)->fp_mant[2] = (src)->fp_mant[2];                          \
+static inline void CPYFPN(struct fpn * dst, const struct fpn * src);
+
+static inline void
+CPYFPN(struct fpn * dst, const struct fpn * src)
+{
+
+       if (dst != src) {
+               *dst = *src;
+       }
 }
 
 /*



Home | Main Index | Thread Index | Old Index