mirror of https://github.com/xemu-project/xemu.git
Fix compilation on Darwin platform, avoiding the use of gcc function attributes
(problem reported by Andreas Farber). : ---------------------------------------------------------------------- git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3292 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
a5b85f7959
commit
8a84de23b8
|
@ -38,7 +38,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef always_inline
|
#ifndef always_inline
|
||||||
#if __GNUC__ < 3
|
#if (__GNUC__ < 3) || defined(__APPLE__)
|
||||||
#define always_inline inline
|
#define always_inline inline
|
||||||
#else
|
#else
|
||||||
#define always_inline __attribute__ (( always_inline )) inline
|
#define always_inline __attribute__ (( always_inline )) inline
|
||||||
|
|
22
hw/ppc.c
22
hw/ppc.c
|
@ -445,7 +445,7 @@ uint32_t cpu_ppc_load_tbl (CPUState *env)
|
||||||
return tb & 0xFFFFFFFF;
|
return tb & 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t cpu_ppc_load_tbu (CPUState *env)
|
static inline uint32_t _cpu_ppc_load_tbu (CPUState *env)
|
||||||
{
|
{
|
||||||
ppc_tb_t *tb_env = env->tb_env;
|
ppc_tb_t *tb_env = env->tb_env;
|
||||||
uint64_t tb;
|
uint64_t tb;
|
||||||
|
@ -460,6 +460,11 @@ uint32_t cpu_ppc_load_tbu (CPUState *env)
|
||||||
return tb >> 32;
|
return tb >> 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t cpu_ppc_load_tbu (CPUState *env)
|
||||||
|
{
|
||||||
|
return _cpu_ppc_load_tbu(env);
|
||||||
|
}
|
||||||
|
|
||||||
static inline void cpu_ppc_store_tb (ppc_tb_t *tb_env, int64_t *tb_offsetp,
|
static inline void cpu_ppc_store_tb (ppc_tb_t *tb_env, int64_t *tb_offsetp,
|
||||||
uint64_t value)
|
uint64_t value)
|
||||||
{
|
{
|
||||||
|
@ -483,7 +488,7 @@ void cpu_ppc_store_tbl (CPUState *env, uint32_t value)
|
||||||
cpu_ppc_store_tb(tb_env, &tb_env->tb_offset, tb | (uint64_t)value);
|
cpu_ppc_store_tb(tb_env, &tb_env->tb_offset, tb | (uint64_t)value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpu_ppc_store_tbu (CPUState *env, uint32_t value)
|
static inline void _cpu_ppc_store_tbu (CPUState *env, uint32_t value)
|
||||||
{
|
{
|
||||||
ppc_tb_t *tb_env = env->tb_env;
|
ppc_tb_t *tb_env = env->tb_env;
|
||||||
uint64_t tb;
|
uint64_t tb;
|
||||||
|
@ -494,6 +499,11 @@ void cpu_ppc_store_tbu (CPUState *env, uint32_t value)
|
||||||
((uint64_t)value << 32) | tb);
|
((uint64_t)value << 32) | tb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cpu_ppc_store_tbu (CPUState *env, uint32_t value)
|
||||||
|
{
|
||||||
|
_cpu_ppc_store_tbu(env, value);
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t cpu_ppc_load_atbl (CPUState *env)
|
uint32_t cpu_ppc_load_atbl (CPUState *env)
|
||||||
{
|
{
|
||||||
ppc_tb_t *tb_env = env->tb_env;
|
ppc_tb_t *tb_env = env->tb_env;
|
||||||
|
@ -738,10 +748,14 @@ clk_setup_cb cpu_ppc601_rtc_init (CPUState *env)
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpu_ppc601_store_rtcu (CPUState *env, uint32_t value)
|
void cpu_ppc601_store_rtcu (CPUState *env, uint32_t value)
|
||||||
__attribute__ (( alias ("cpu_ppc_store_tbu") ));
|
{
|
||||||
|
_cpu_ppc_store_tbu(env, value);
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t cpu_ppc601_load_rtcu (CPUState *env)
|
uint32_t cpu_ppc601_load_rtcu (CPUState *env)
|
||||||
__attribute__ (( alias ("cpu_ppc_load_tbu") ));
|
{
|
||||||
|
return _cpu_ppc_load_tbu(env);
|
||||||
|
}
|
||||||
|
|
||||||
void cpu_ppc601_store_rtcl (CPUState *env, uint32_t value)
|
void cpu_ppc601_store_rtcl (CPUState *env, uint32_t value)
|
||||||
{
|
{
|
||||||
|
|
2
vl.h
2
vl.h
|
@ -110,7 +110,7 @@ static inline char *realpath(const char *path, char *resolved_path)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef always_inline
|
#ifndef always_inline
|
||||||
#if __GNUC__ < 3
|
#if (__GNUC__ < 3) || defined(__APPLE__)
|
||||||
#define always_inline inline
|
#define always_inline inline
|
||||||
#else
|
#else
|
||||||
#define always_inline __attribute__ (( always_inline )) inline
|
#define always_inline __attribute__ (( always_inline )) inline
|
||||||
|
|
Loading…
Reference in New Issue