#define __ARCH_ARM_LINUX_LINUX_HH__
#include "arch/arm/utility.hh"
+#include "base/compiler.hh"
#include "kern/linux/linux.hh"
class ArmLinux : public Linux
uint32_t st_gid;
uint64_t st_rdev;
uint8_t __pad3[4];
- int64_t __attribute__ ((aligned (8))) st_size;
+ M5_ALIGNED(8) int64_t st_size;
uint32_t st_blksize;
- uint64_t __attribute__ ((aligned (8))) st_blocks;
+ M5_ALIGNED(8) uint64_t st_blocks;
uint32_t st_atimeX;
uint32_t st_atime_nsec;
uint32_t st_mtimeX;
#define __ARCH_MIPS_LINUX_ALIGNED_HH__
-/* GCC 3.3.X has a bug in which attributes+typedefs don't work. 3.2.X is fine
- * as in 3.4.X, but the bug is marked will not fix in 3.3.X so here is
- * the work around.
- */
-#if (__GNUC__ == 3 && __GNUC_MINOR__ != 3) || __GNUC__ > 3
-typedef uint64_t uint64_ta __attribute__ ((aligned (8))) ;
-typedef int64_t int64_ta __attribute__ ((aligned (8))) ;
-typedef Addr Addr_a __attribute__ ((aligned (8))) ;
-#else
-#define uint64_ta uint64_t __attribute__ ((aligned (8)))
-#define int64_ta int64_t __attribute__ ((aligned (8)))
-#define Addr_a Addr __attribute__ ((aligned (8)))
-#endif /* __GNUC__ __GNUC_MINOR__ */
+typedef M5_ALIGNED(8) uint64_t uint64_ta;
+typedef M5_ALIGNED(8) int64_t int64_ta;
+typedef M5_ALIGNED(8) Addr Addr_a;
#endif /* __ARCH_MIPS_LINUX_ALIGNED_HH__ */
# define M5_LOCAL [[gnu::visibility("hidden")]]
# define M5_WEAK [[gnu::weak]]
+// Force an alignment for a variable.
+# define M5_ALIGNED(alignment) [[gnu::aligned(alignment)]]
+
// Marker for what should be an unreachable point in the code.
# define M5_UNREACHABLE __builtin_unreachable()
protected:
/** The storage of this stat. */
- char storage[sizeof(Storage)] __attribute__ ((aligned (8)));
+ M5_ALIGNED(8) char storage[sizeof(Storage)];
protected:
/**
protected:
/** The storage for this stat. */
- char storage[sizeof(Storage)] __attribute__ ((aligned (8)));
+ M5_ALIGNED(8) char storage[sizeof(Storage)];
protected:
/**