At great personal risk, add a __packed and __aligned(x) define that

expand to __attribute__((packed)) and __attribute__((aligned(x)))
respectively.  Replace the handful of gcc-ism's that use
__attribute__((aligned(16))) etc around the kernel with __aligned(16).

There are over 400 __attribute__((packed)) to deal with, that can come
later.  I just want to use __packed in new code rather than add more
gcc-ism's.
This commit is contained in:
Peter Wemm 2002-09-23 05:55:10 +00:00
parent 155974701d
commit c692fbe091
9 changed files with 14 additions and 8 deletions

View file

@ -10,7 +10,7 @@
typedef struct {
volatile u_int64_t reg __attribute__((aligned(64)));
volatile u_int64_t reg __aligned(64);
} tsunami_reg;
/* notes */
typedef struct {

View file

@ -113,7 +113,7 @@ struct savexmm {
} sv_fp[8];
struct xmmacc sv_xmm[8];
u_char sv_pad[224];
} __attribute__((aligned(16)));
} __aligned(16);
union savefpu {
struct save87 sv_87;

View file

@ -113,7 +113,7 @@ struct savexmm {
} sv_fp[8];
struct xmmacc sv_xmm[8];
u_char sv_pad[224];
} __attribute__((aligned(16)));
} __aligned(16);
union savefpu {
struct save87 sv_87;

View file

@ -49,7 +49,7 @@ struct arch_switch archsw; /* MI/MD interface boundary */
void
__start(void)
{
static char stack[16384] __attribute__((aligned (16)));
static char stack[16384] __aligned(16);
static char malloc[512*1024];
int i;

View file

@ -49,7 +49,7 @@ struct arch_switch archsw; /* MI/MD interface boundary */
void
__start(void)
{
static char stack[16384] __attribute__((aligned (16)));
static char stack[16384] __aligned(16);
static char malloc[512*1024];
int i;

View file

@ -113,7 +113,7 @@ struct savexmm {
} sv_fp[8];
struct xmmacc sv_xmm[8];
u_char sv_pad[224];
} __attribute__((aligned(16)));
} __aligned(16);
union savefpu {
struct save87 sv_87;

View file

@ -33,7 +33,7 @@
struct ia64_fpreg {
uint64_t fpr_bits[2];
} __attribute__ ((aligned (16)));
} __aligned(16);
#define _IA64_FPREG_DEFINED

View file

@ -57,7 +57,7 @@ typedef long sig_atomic_t;
struct ia64_fpreg {
unsigned long fpr_bits[2];
} __attribute__ ((aligned (16)));
} __aligned(16);
#define _IA64_FPREG_DEFINED

View file

@ -116,16 +116,22 @@
#define __dead2
#define __pure2
#define __unused
#define __packed
#define __aligned
#endif
#if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7
#define __dead2 __attribute__((__noreturn__))
#define __pure2 __attribute__((__const__))
#define __unused
#define __packed
#define __aligned
#endif
#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ == 3
#define __dead2 __attribute__((__noreturn__))
#define __pure2 __attribute__((__const__))
#define __unused __attribute__((__unused__))
#define __packed __attribute__((__packed__))
#define __aligned(x) __attribute__((__aligned__(x)))
#endif
/* XXX: should use `#if __STDC_VERSION__ < 199901'. */