From 3547f99a3092d262a23c120aa8d97945ccf3eeb6 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 15 Jun 2021 20:43:22 -0400 Subject: sim: ppc: use common ATTRIBUTE_PACKED macro 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 f40504e..6456dde 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,5 +1,10 @@ 2021-06-16 Mike Frysinger + * double.c: Include ansidecls.h. + * dp-bit.c: Change __attribute__ ((packed)) to ATTRIBUTE_PACKED. + +2021-06-16 Mike Frysinger + * basics.h (NORETURN): Delete. * sim_callbacks.h: Include ansidecl.h. Change NORETURN to ATTRIBUTE_NORETURN. diff --git a/sim/ppc/double.c b/sim/ppc/double.c index d9002e6..615797f 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 dce5114..25d3627 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; -- cgit v1.1