cpu.h (526947e496e4447d74b8d42415e2847481c5043d) | cpu.h (bb5de52524c6c4b7da5623c5b19d9d6dc8405aa0) |
---|---|
1/* 2 * SH4 emulation 3 * 4 * Copyright (c) 2005 Samuel Tardieu 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 354 unchanged lines hidden (view full) --- 363static inline void cpu_write_sr(CPUSH4State *env, target_ulong sr) 364{ 365 env->sr_m = (sr >> SR_M) & 1; 366 env->sr_q = (sr >> SR_Q) & 1; 367 env->sr_t = (sr >> SR_T) & 1; 368 env->sr = sr & ~((1u << SR_M) | (1u << SR_Q) | (1u << SR_T)); 369} 370 | 1/* 2 * SH4 emulation 3 * 4 * Copyright (c) 2005 Samuel Tardieu 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 354 unchanged lines hidden (view full) --- 363static inline void cpu_write_sr(CPUSH4State *env, target_ulong sr) 364{ 365 env->sr_m = (sr >> SR_M) & 1; 366 env->sr_q = (sr >> SR_Q) & 1; 367 env->sr_t = (sr >> SR_T) & 1; 368 env->sr = sr & ~((1u << SR_M) | (1u << SR_Q) | (1u << SR_T)); 369} 370 |
371static inline void cpu_get_tb_cpu_state(CPUSH4State *env, target_ulong *pc, 372 target_ulong *cs_base, uint32_t *flags) | 371static inline void cpu_get_tb_cpu_state(CPUSH4State *env, vaddr *pc, 372 uint64_t *cs_base, uint32_t *flags) |
373{ 374 *pc = env->pc; 375 /* For a gUSA region, notice the end of the region. */ 376 *cs_base = env->flags & TB_FLAG_GUSA_MASK ? env->gregs[0] : 0; 377 *flags = env->flags 378 | (env->fpscr & TB_FLAG_FPSCR_MASK) 379 | (env->sr & TB_FLAG_SR_MASK) 380 | (env->movcal_backup ? TB_FLAG_PENDING_MOVCA : 0); /* Bit 3 */ 381#ifdef CONFIG_USER_ONLY 382 *flags |= TB_FLAG_UNALIGN * !env_cpu(env)->prctl_unalign_sigbus; 383#endif 384} 385 386#endif /* SH4_CPU_H */ | 373{ 374 *pc = env->pc; 375 /* For a gUSA region, notice the end of the region. */ 376 *cs_base = env->flags & TB_FLAG_GUSA_MASK ? env->gregs[0] : 0; 377 *flags = env->flags 378 | (env->fpscr & TB_FLAG_FPSCR_MASK) 379 | (env->sr & TB_FLAG_SR_MASK) 380 | (env->movcal_backup ? TB_FLAG_PENDING_MOVCA : 0); /* Bit 3 */ 381#ifdef CONFIG_USER_ONLY 382 *flags |= TB_FLAG_UNALIGN * !env_cpu(env)->prctl_unalign_sigbus; 383#endif 384} 385 386#endif /* SH4_CPU_H */ |