diff --git a/arch/x86/core/gdt.c b/arch/x86/core/gdt.c index aa3550d2295..4d2d8f60ea1 100644 --- a/arch/x86/core/gdt.c +++ b/arch/x86/core/gdt.c @@ -70,8 +70,7 @@ for the IA-32 architecture. */ static tGdtDesc - _gdt_entries[MAX_GDT_ENTRIES] - __attribute__((aligned(8))) = { + _gdt_entries[MAX_GDT_ENTRIES] __aligned(8) = { {/* Entry 0 (selector=0x0000): The "NULL descriptor" */ 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00}, { /* Entry 1 (selector=0x0008): Code descriptor: DPL0 */ diff --git a/arch/x86/include/gdt.h b/arch/x86/include/gdt.h index d231c76d240..00fe2f4fbbf 100644 --- a/arch/x86/include/gdt.h +++ b/arch/x86/include/gdt.h @@ -73,7 +73,7 @@ typedef struct PACK_STRUCT s_gdtHeader { uint16_t limit; /* GDT limit */ tGdtDesc *pEntries; /* pointer to the GDT entries */ -} tGdtHeader __attribute__((aligned(4))); +} tGdtHeader __aligned(4); /* externs */ diff --git a/arch/x86/include/nanok.h b/arch/x86/include/nanok.h index dfebe430222..b10ca48e948 100644 --- a/arch/x86/include/nanok.h +++ b/arch/x86/include/nanok.h @@ -547,7 +547,7 @@ typedef struct s_FpRegSet { /* # of bytes: name of register */ unsigned short ds; /* 2 : x87 FPU instr operand ptr selector */ unsigned short pad5; /* 2 : N/A */ tFpReg fpReg[8]; /* 80 : ST0 -> ST7 */ -} tFpRegSet __attribute__((aligned(FP_REG_SET_ALIGN))); +} tFpRegSet __aligned(FP_REG_SET_ALIGN); #ifdef CONFIG_SSE @@ -595,7 +595,7 @@ typedef struct s_FpRegSetEx /* # of bytes: name of register */ tFpRegEx fpReg[8]; /* 128 : x87 FPU/MMX registers */ tXmmReg xmmReg[8]; /* 128 : XMM registers */ unsigned char rsrvd3[176]; /* 176 : reserved */ -} tFpRegSetEx __attribute__((aligned(FP_REG_SET_ALIGN))); +} tFpRegSetEx __aligned(FP_REG_SET_ALIGN); #else /* CONFIG_SSE == 0 */ @@ -875,8 +875,7 @@ static inline void fiberRtnValueSet( #define _EXC_STUB_ALIGN 1 #endif -typedef unsigned char - __attribute__((aligned(_EXC_STUB_ALIGN))) NANO_EXC_STUB[_EXC_STUB_SIZE]; +typedef unsigned char __aligned(_EXC_STUB_ALIGN) NANO_EXC_STUB[_EXC_STUB_SIZE]; /* * Macro to declare a dynamic exception stub. Using the macro places the stub diff --git a/include/arch/x86/arch.h b/include/arch/x86/arch.h index e3562468bbf..39c6dd30bf2 100644 --- a/include/arch/x86/arch.h +++ b/include/arch/x86/arch.h @@ -71,8 +71,7 @@ by the generic nanokernel interface header (nanokernel.h) #define _INT_STUB_ALIGN 1 #endif -typedef unsigned char __attribute__((aligned(_INT_STUB_ALIGN))) - NANO_INT_STUB[_INT_STUB_SIZE]; +typedef unsigned char __aligned(_INT_STUB_ALIGN) NANO_INT_STUB[_INT_STUB_SIZE]; typedef struct s_isrList {