mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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:
parent
155974701d
commit
c692fbe091
9 changed files with 14 additions and 8 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
struct ia64_fpreg {
|
||||
uint64_t fpr_bits[2];
|
||||
} __attribute__ ((aligned (16)));
|
||||
} __aligned(16);
|
||||
|
||||
#define _IA64_FPREG_DEFINED
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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'. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue