Work-around C89 and/or "old" gcc unspecified behavior (#if in macro calls).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3350 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
a9d9eb8fd4
commit
417bf01068
@ -3297,16 +3297,17 @@ GEN_HANDLER(hrfid, 0x13, 0x12, 0x08, 0x03FF8001, PPC_64B)
|
||||
#endif
|
||||
|
||||
/* sc */
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
#define POWERPC_SYSCALL POWERPC_EXCP_SYSCALL_USER
|
||||
#else
|
||||
#define POWERPC_SYSCALL POWERPC_EXCP_SYSCALL
|
||||
#endif
|
||||
GEN_HANDLER(sc, 0x11, 0xFF, 0xFF, 0x03FFF01D, PPC_FLOW)
|
||||
{
|
||||
uint32_t lev;
|
||||
|
||||
lev = (ctx->opcode >> 5) & 0x7F;
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
GEN_EXCP(ctx, POWERPC_EXCP_SYSCALL_USER, lev);
|
||||
#else
|
||||
GEN_EXCP(ctx, POWERPC_EXCP_SYSCALL, lev);
|
||||
#endif
|
||||
GEN_EXCP(ctx, POWERPC_SYSCALL, lev);
|
||||
}
|
||||
|
||||
/*** Trap ***/
|
||||
@ -6830,11 +6831,7 @@ static always_inline int gen_intermediate_code_internal (CPUState *env,
|
||||
} else if (unlikely(single_step != 0 &&
|
||||
(ctx.nip <= 0x100 || ctx.nip > 0xF00 ||
|
||||
(ctx.nip & 0xFC) != 0x04) &&
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
ctx.exception != POWERPC_EXCP_SYSCALL_USER &&
|
||||
#else
|
||||
ctx.exception != POWERPC_EXCP_SYSCALL &&
|
||||
#endif
|
||||
ctx.exception != POWERPC_SYSCALL &&
|
||||
ctx.exception != POWERPC_EXCP_TRAP)) {
|
||||
GEN_EXCP(ctxp, POWERPC_EXCP_TRACE, 0);
|
||||
} else if (unlikely(((ctx.nip & (TARGET_PAGE_SIZE - 1)) == 0) ||
|
||||
|
@ -4024,6 +4024,12 @@ static void init_proc_7455 (CPUPPCState *env)
|
||||
#define POWERPC_BFDM_970 (bfd_mach_ppc64)
|
||||
#define POWERPC_FLAG_970 (POWERPC_FLAG_VRE)
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
#define POWERPC970_HID5_INIT 0x00000080
|
||||
#else
|
||||
#define POWERPC970_HID5_INIT 0x00000000
|
||||
#endif
|
||||
|
||||
static void init_proc_970 (CPUPPCState *env)
|
||||
{
|
||||
gen_spr_ne_601(env);
|
||||
@ -4050,12 +4056,7 @@ static void init_proc_970 (CPUPPCState *env)
|
||||
spr_register(env, SPR_970_HID5, "HID5",
|
||||
SPR_NOACCESS, SPR_NOACCESS,
|
||||
&spr_read_generic, &spr_write_generic,
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
0x00000080
|
||||
#else
|
||||
0x00000000
|
||||
#endif
|
||||
);
|
||||
POWERPC970_HID5_INIT);
|
||||
/* Memory management */
|
||||
/* XXX: not correct */
|
||||
gen_low_BATs(env);
|
||||
@ -4123,12 +4124,7 @@ static void init_proc_970FX (CPUPPCState *env)
|
||||
spr_register(env, SPR_970_HID5, "HID5",
|
||||
SPR_NOACCESS, SPR_NOACCESS,
|
||||
&spr_read_generic, &spr_write_generic,
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
0x00000080
|
||||
#else
|
||||
0x00000000
|
||||
#endif
|
||||
);
|
||||
POWERPC970_HID5_INIT);
|
||||
/* Memory management */
|
||||
/* XXX: not correct */
|
||||
gen_low_BATs(env);
|
||||
@ -4196,12 +4192,7 @@ static void init_proc_970GX (CPUPPCState *env)
|
||||
spr_register(env, SPR_970_HID5, "HID5",
|
||||
SPR_NOACCESS, SPR_NOACCESS,
|
||||
&spr_read_generic, &spr_write_generic,
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
0x00000080
|
||||
#else
|
||||
0x00000000
|
||||
#endif
|
||||
);
|
||||
POWERPC970_HID5_INIT);
|
||||
/* Memory management */
|
||||
/* XXX: not correct */
|
||||
gen_low_BATs(env);
|
||||
|
Loading…
x
Reference in New Issue
Block a user