public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim: ppc: use common ATTRIBUTE_PACKED macro
@ 2021-06-16  5:11 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2021-06-16  5:11 UTC (permalink / raw)
  To: gdb-patches

Drop local packed attribute with the common ansidecl.h define.
---
 sim/ppc/ChangeLog |  5 +++++
 sim/ppc/double.c  |  1 +
 sim/ppc/dp-bit.c  | 12 ++++++------
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index f40504ebcfe4..6456dde8e1ae 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-16  Mike Frysinger  <vapier@gentoo.org>
+
+	* double.c: Include ansidecls.h.
+	* dp-bit.c: Change __attribute__ ((packed)) to ATTRIBUTE_PACKED.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
 	* basics.h (NORETURN): Delete.
diff --git a/sim/ppc/double.c b/sim/ppc/double.c
index d9002e6b5161..615797fc45eb 100644
--- a/sim/ppc/double.c
+++ b/sim/ppc/double.c
@@ -22,6 +22,7 @@
 #define _DOUBLE_C_
 
 #include "basics.h"
+#include "ansidecls.h"
 
 #define SFtype unsigned32
 #define DFtype unsigned64
diff --git a/sim/ppc/dp-bit.c b/sim/ppc/dp-bit.c
index dce51148b874..25d362770277 100644
--- a/sim/ppc/dp-bit.c
+++ b/sim/ppc/dp-bit.c
@@ -253,13 +253,13 @@ typedef union
   struct
     {
 #ifndef FLOAT_BIT_ORDER_MISMATCH
-      unsigned int sign:1 __attribute__ ((packed));
-      unsigned int exp:EXPBITS __attribute__ ((packed));
-      fractype fraction:FRACBITS __attribute__ ((packed));
+      unsigned int sign:1 ATTRIBUTE_PACKED;
+      unsigned int exp:EXPBITS ATTRIBUTE_PACKED;
+      fractype fraction:FRACBITS ATTRIBUTE_PACKED;
 #else
-      fractype fraction:FRACBITS __attribute__ ((packed));
-      unsigned int exp:EXPBITS __attribute__ ((packed));
-      unsigned int sign:1 __attribute__ ((packed));
+      fractype fraction:FRACBITS ATTRIBUTE_PACKED;
+      unsigned int exp:EXPBITS ATTRIBUTE_PACKED;
+      unsigned int sign:1 ATTRIBUTE_PACKED;
 #endif
     }
   bits;
-- 
2.31.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-16  5:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16  5:11 [PATCH] sim: ppc: use common ATTRIBUTE_PACKED macro Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).