Assume __GNUC__ >= 3.
gcc 3.0 was seven years ago. Get with the times.
This commit is contained in:
parent
0c1c9d7508
commit
2e3c43d306
|
@ -212,7 +212,7 @@ struct __una_u16 { unsigned short x __attribute__((packed)); };
|
|||
|
||||
static __inline__ unsigned long ldq_u(unsigned long * r11)
|
||||
{
|
||||
# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
# if defined(__GNUC__)
|
||||
const struct __una_u64 *ptr = (const struct __una_u64 *) r11;
|
||||
return ptr->x;
|
||||
# else
|
||||
|
@ -231,7 +231,7 @@ static __inline__ unsigned long ldq_u(unsigned long * r11)
|
|||
|
||||
static __inline__ unsigned long ldl_u(unsigned int * r11)
|
||||
{
|
||||
# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
# if defined(__GNUC__)
|
||||
const struct __una_u32 *ptr = (const struct __una_u32 *) r11;
|
||||
return ptr->x;
|
||||
# else
|
||||
|
@ -250,7 +250,7 @@ static __inline__ unsigned long ldl_u(unsigned int * r11)
|
|||
|
||||
static __inline__ unsigned long ldw_u(unsigned short * r11)
|
||||
{
|
||||
# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
# if defined(__GNUC__)
|
||||
const struct __una_u16 *ptr = (const struct __una_u16 *) r11;
|
||||
return ptr->x;
|
||||
# else
|
||||
|
@ -273,7 +273,7 @@ static __inline__ unsigned long ldw_u(unsigned short * r11)
|
|||
|
||||
static __inline__ void stq_u(unsigned long r5, unsigned long * r11)
|
||||
{
|
||||
# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
# if defined(__GNUC__)
|
||||
struct __una_u64 *ptr = (struct __una_u64 *) r11;
|
||||
ptr->x = r5;
|
||||
# else
|
||||
|
@ -298,7 +298,7 @@ static __inline__ void stq_u(unsigned long r5, unsigned long * r11)
|
|||
|
||||
static __inline__ void stl_u(unsigned long r5, unsigned int * r11)
|
||||
{
|
||||
# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
# if defined(__GNUC__)
|
||||
struct __una_u32 *ptr = (struct __una_u32 *) r11;
|
||||
ptr->x = r5;
|
||||
# else
|
||||
|
@ -323,7 +323,7 @@ static __inline__ void stl_u(unsigned long r5, unsigned int * r11)
|
|||
|
||||
static __inline__ void stw_u(unsigned long r5, unsigned short * r11)
|
||||
{
|
||||
# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
# if defined(__GNUC__)
|
||||
struct __una_u16 *ptr = (struct __una_u16 *) r11;
|
||||
ptr->x = r5;
|
||||
# else
|
||||
|
@ -780,7 +780,7 @@ struct __una_u16 { unsigned short x __attribute__((packed)); };
|
|||
|
||||
static __inline__ unsigned long ldq_u(unsigned long *p)
|
||||
{
|
||||
# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
# if defined(__GNUC__)
|
||||
# if defined(__arch64__) || defined(__sparcv9)
|
||||
const struct __una_u64 *ptr = (const struct __una_u64 *) p;
|
||||
# else
|
||||
|
@ -796,7 +796,7 @@ static __inline__ unsigned long ldq_u(unsigned long *p)
|
|||
|
||||
static __inline__ unsigned long ldl_u(unsigned int *p)
|
||||
{
|
||||
# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
# if defined(__GNUC__)
|
||||
const struct __una_u32 *ptr = (const struct __una_u32 *) p;
|
||||
return ptr->x;
|
||||
# else
|
||||
|
@ -808,7 +808,7 @@ static __inline__ unsigned long ldl_u(unsigned int *p)
|
|||
|
||||
static __inline__ unsigned long ldw_u(unsigned short *p)
|
||||
{
|
||||
# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
# if defined(__GNUC__)
|
||||
const struct __una_u16 *ptr = (const struct __una_u16 *) p;
|
||||
return ptr->x;
|
||||
# else
|
||||
|
@ -820,7 +820,7 @@ static __inline__ unsigned long ldw_u(unsigned short *p)
|
|||
|
||||
static __inline__ void stq_u(unsigned long val, unsigned long *p)
|
||||
{
|
||||
# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
# if defined(__GNUC__)
|
||||
# if defined(__arch64__) || defined(__sparcv9)
|
||||
struct __una_u64 *ptr = (struct __una_u64 *) p;
|
||||
# else
|
||||
|
@ -835,7 +835,7 @@ static __inline__ void stq_u(unsigned long val, unsigned long *p)
|
|||
|
||||
static __inline__ void stl_u(unsigned long val, unsigned int *p)
|
||||
{
|
||||
# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
# if defined(__GNUC__)
|
||||
struct __una_u32 *ptr = (struct __una_u32 *) p;
|
||||
ptr->x = val;
|
||||
# else
|
||||
|
@ -846,7 +846,7 @@ static __inline__ void stl_u(unsigned long val, unsigned int *p)
|
|||
|
||||
static __inline__ void stw_u(unsigned long val, unsigned short *p)
|
||||
{
|
||||
# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
# if defined(__GNUC__)
|
||||
struct __una_u16 *ptr = (struct __una_u16 *) p;
|
||||
ptr->x = val;
|
||||
# else
|
||||
|
|
|
@ -68,7 +68,7 @@ X86EMU_intrFuncs _X86EMU_intrTab[256];
|
|||
* packed structures to talk about such things with.
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
#if defined(__GNUC__)
|
||||
struct __una_u64 { unsigned long x __attribute__((packed)); };
|
||||
struct __una_u32 { unsigned int x __attribute__((packed)); };
|
||||
struct __una_u16 { unsigned short x __attribute__((packed)); };
|
||||
|
@ -76,7 +76,7 @@ struct __una_u16 { unsigned short x __attribute__((packed)); };
|
|||
|
||||
static __inline__ unsigned long ldq_u(unsigned long * r11)
|
||||
{
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
#if defined(__GNUC__)
|
||||
const struct __una_u64 *ptr = (const struct __una_u64 *) r11;
|
||||
return ptr->x;
|
||||
#else
|
||||
|
@ -95,7 +95,7 @@ static __inline__ unsigned long ldq_u(unsigned long * r11)
|
|||
|
||||
static __inline__ unsigned long ldl_u(unsigned int * r11)
|
||||
{
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
#if defined(__GNUC__)
|
||||
const struct __una_u32 *ptr = (const struct __una_u32 *) r11;
|
||||
return ptr->x;
|
||||
#else
|
||||
|
@ -114,7 +114,7 @@ static __inline__ unsigned long ldl_u(unsigned int * r11)
|
|||
|
||||
static __inline__ unsigned long ldw_u(unsigned short * r11)
|
||||
{
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
#if defined(__GNUC__)
|
||||
const struct __una_u16 *ptr = (const struct __una_u16 *) r11;
|
||||
return ptr->x;
|
||||
#else
|
||||
|
@ -137,7 +137,7 @@ static __inline__ unsigned long ldw_u(unsigned short * r11)
|
|||
|
||||
static __inline__ void stq_u(unsigned long r5, unsigned long * r11)
|
||||
{
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
#if defined(__GNUC__)
|
||||
struct __una_u64 *ptr = (struct __una_u64 *) r11;
|
||||
ptr->x = r5;
|
||||
#else
|
||||
|
@ -162,7 +162,7 @@ static __inline__ void stq_u(unsigned long r5, unsigned long * r11)
|
|||
|
||||
static __inline__ void stl_u(unsigned long r5, unsigned int * r11)
|
||||
{
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
#if defined(__GNUC__)
|
||||
struct __una_u32 *ptr = (struct __una_u32 *) r11;
|
||||
ptr->x = r5;
|
||||
#else
|
||||
|
@ -187,7 +187,7 @@ static __inline__ void stl_u(unsigned long r5, unsigned int * r11)
|
|||
|
||||
static __inline__ void stw_u(unsigned long r5, unsigned short * r11)
|
||||
{
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
|
||||
#if defined(__GNUC__)
|
||||
struct __una_u16 *ptr = (struct __una_u16 *) r11;
|
||||
ptr->x = r5;
|
||||
#else
|
||||
|
@ -209,60 +209,6 @@ static __inline__ void stw_u(unsigned long r5, unsigned short * r11)
|
|||
:"r" (r5), "r" (r11));
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif defined(__GNUC__) && ((__GNUC__ < 3)) && \
|
||||
(defined (__ia64__) || defined (ia64__))
|
||||
#define IA64_UALOADS
|
||||
/*
|
||||
* EGCS 1.1 knows about arbitrary unaligned loads. Define some
|
||||
* packed structures to talk about such things with.
|
||||
*/
|
||||
struct __una_u64 { unsigned long x __attribute__((packed)); };
|
||||
struct __una_u32 { unsigned int x __attribute__((packed)); };
|
||||
struct __una_u16 { unsigned short x __attribute__((packed)); };
|
||||
|
||||
static __inline__ unsigned long
|
||||
__uldq (const unsigned long * r11)
|
||||
{
|
||||
const struct __una_u64 *ptr = (const struct __una_u64 *) r11;
|
||||
return ptr->x;
|
||||
}
|
||||
|
||||
static __inline__ unsigned long
|
||||
uldl (const unsigned int * r11)
|
||||
{
|
||||
const struct __una_u32 *ptr = (const struct __una_u32 *) r11;
|
||||
return ptr->x;
|
||||
}
|
||||
|
||||
static __inline__ unsigned long
|
||||
uldw (const unsigned short * r11)
|
||||
{
|
||||
const struct __una_u16 *ptr = (const struct __una_u16 *) r11;
|
||||
return ptr->x;
|
||||
}
|
||||
|
||||
static __inline__ void
|
||||
ustq (unsigned long r5, unsigned long * r11)
|
||||
{
|
||||
struct __una_u64 *ptr = (struct __una_u64 *) r11;
|
||||
ptr->x = r5;
|
||||
}
|
||||
|
||||
static __inline__ void
|
||||
ustl (unsigned long r5, unsigned int * r11)
|
||||
{
|
||||
struct __una_u32 *ptr = (struct __una_u32 *) r11;
|
||||
ptr->x = r5;
|
||||
}
|
||||
|
||||
static __inline__ void
|
||||
ustw (unsigned long r5, unsigned short * r11)
|
||||
{
|
||||
struct __una_u16 *ptr = (struct __una_u16 *) r11;
|
||||
ptr->x = r5;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
@ -476,8 +476,7 @@ typedef enum {
|
|||
} MessageType;
|
||||
|
||||
/* XXX Need to check which GCC versions have the format(printf) attribute. */
|
||||
#if defined(__GNUC__) && \
|
||||
((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
|
||||
#if defined(__GNUC__) && (__GNUC__ > 2)
|
||||
#define _printf_attribute(a,b) __attribute((format(__printf__,a,b)))
|
||||
#else
|
||||
#define _printf_attribute(a,b) /**/
|
||||
|
@ -498,8 +497,7 @@ extern void FreeAuditTimer(void);
|
|||
extern void AuditF(const char *f, ...) _printf_attribute(1,2);
|
||||
extern void VAuditF(const char *f, va_list args);
|
||||
extern void FatalError(const char *f, ...) _printf_attribute(1,2)
|
||||
#if defined(__GNUC__) && \
|
||||
((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
|
||||
#if defined(__GNUC__) && (__GNUC__ > 2)
|
||||
__attribute((noreturn))
|
||||
#endif
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue
Block a user