Convert exception ops to TCG
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4022 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
		
							parent
							
								
									a3ffaf3060
								
							
						
					
					
						commit
						134d77a14b
					
				| @ -321,7 +321,6 @@ void cpu_set_cwp(CPUSPARCState *env1, int new_cwp); | ||||
| #endif | ||||
| 
 | ||||
| int cpu_sparc_signal_handler(int host_signum, void *pinfo, void *puc); | ||||
| void raise_exception(int tt); | ||||
| void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec, | ||||
|                           int is_asi); | ||||
| void cpu_check_irqs(CPUSPARCState *env); | ||||
|  | ||||
| @ -66,7 +66,6 @@ void do_fxtoq(void); | ||||
| #endif | ||||
| #endif | ||||
| void do_interrupt(int intno); | ||||
| void raise_exception(int tt); | ||||
| void memcpy32(target_ulong *dst, const target_ulong *src); | ||||
| target_ulong mmu_probe(CPUState *env, target_ulong address, int mmulev); | ||||
| void dump_mmu(CPUState *env); | ||||
|  | ||||
| @ -72,3 +72,4 @@ void TCG_HELPER_PROTO helper_fcmpeq_fcc2(void); | ||||
| void TCG_HELPER_PROTO helper_fcmpeq_fcc3(void); | ||||
| #endif | ||||
| #endif | ||||
| void TCG_HELPER_PROTO raise_exception(int tt); | ||||
|  | ||||
| @ -857,22 +857,6 @@ void OPPROTO op_restore(void) | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| void OPPROTO op_exception(void) | ||||
| { | ||||
|     env->exception_index = PARAM1; | ||||
|     cpu_loop_exit(); | ||||
|     FORCE_RET(); | ||||
| } | ||||
| 
 | ||||
| void OPPROTO op_fpexception_im(void) | ||||
| { | ||||
|     env->exception_index = TT_FP_EXCP; | ||||
|     env->fsr &= ~FSR_FTT_MASK; | ||||
|     env->fsr |= PARAM1; | ||||
|     cpu_loop_exit(); | ||||
|     FORCE_RET(); | ||||
| } | ||||
| 
 | ||||
| void OPPROTO op_eval_ba(void) | ||||
| { | ||||
|     T2 = 1; | ||||
|  | ||||
| @ -807,6 +807,24 @@ static inline void gen_op_fcmpeq(int fccno) | ||||
| 
 | ||||
| #endif | ||||
| 
 | ||||
| static inline void gen_op_exception(int exception) | ||||
| { | ||||
|     TCGv r_except; | ||||
| 
 | ||||
|     r_except = tcg_temp_new(TCG_TYPE_I32); | ||||
|     tcg_gen_movi_i32(r_except, exception); | ||||
|     tcg_gen_helper_0_1(raise_exception, r_except); | ||||
| } | ||||
| 
 | ||||
| static inline void gen_op_fpexception_im(int fsr_flags) | ||||
| { | ||||
|     tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUSPARCState, fsr)); | ||||
|     tcg_gen_andi_tl(cpu_tmp0, cpu_tmp0, ~FSR_FTT_MASK); | ||||
|     tcg_gen_ori_tl(cpu_tmp0, cpu_tmp0, fsr_flags); | ||||
|     tcg_gen_st_tl(cpu_tmp0, cpu_env, offsetof(CPUSPARCState, fsr)); | ||||
|     gen_op_exception(TT_FP_EXCP); | ||||
| } | ||||
| 
 | ||||
| static int gen_trap_ifnofpu(DisasContext * dc) | ||||
| { | ||||
| #if !defined(CONFIG_USER_ONLY) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 blueswir1
						blueswir1