mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
target/sparc: Split psr and xcc into components
Step in removing CC_OP: change the representation of CC_OP_FLAGS. The 8 bits are distributed between 6 variables, which should make it easy to keep up to date. The code within cc_helper.c is quite ugly but is only temporary. Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
b1fa27fcc8
commit
2a1905c79e
7 changed files with 291 additions and 272 deletions
|
@ -26,6 +26,17 @@
|
|||
# define TARGET_STACK_BIAS 0
|
||||
#endif
|
||||
|
||||
static void set_syscall_C(CPUSPARCState *env, bool val)
|
||||
{
|
||||
#ifndef TARGET_SPARC64
|
||||
env->icc_C = val;
|
||||
#elif defined(TARGET_ABI32)
|
||||
env->icc_C = (uint64_t)val << 32;
|
||||
#else
|
||||
env->xcc_C = val;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void cpu_clone_regs_child(CPUSPARCState *env, target_ulong newsp,
|
||||
unsigned flags)
|
||||
{
|
||||
|
@ -58,11 +69,7 @@ static inline void cpu_clone_regs_child(CPUSPARCState *env, target_ulong newsp,
|
|||
* do the pc advance twice.
|
||||
*/
|
||||
env->regwptr[WREG_O0] = 0;
|
||||
#if defined(TARGET_SPARC64) && !defined(TARGET_ABI32)
|
||||
env->xcc &= ~PSR_CARRY;
|
||||
#else
|
||||
env->psr &= ~PSR_CARRY;
|
||||
#endif
|
||||
set_syscall_C(env, 0);
|
||||
env->pc = env->npc;
|
||||
env->npc = env->npc + 4;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue