Add missing cpu_halted function, by Magnus Damm.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2998 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
		
							parent
							
								
									8b6e0729aa
								
							
						
					
					
						commit
						d10927f86b
					
				@ -114,6 +114,7 @@ typedef struct CPUSH4State {
 | 
				
			|||||||
    jmp_buf jmp_env;
 | 
					    jmp_buf jmp_env;
 | 
				
			||||||
    int user_mode_only;
 | 
					    int user_mode_only;
 | 
				
			||||||
    int interrupt_request;
 | 
					    int interrupt_request;
 | 
				
			||||||
 | 
					    int halted;
 | 
				
			||||||
    int exception_index;
 | 
					    int exception_index;
 | 
				
			||||||
     CPU_COMMON tlb_t utlb[UTLB_SIZE];	/* unified translation table */
 | 
					     CPU_COMMON tlb_t utlb[UTLB_SIZE];	/* unified translation table */
 | 
				
			||||||
    tlb_t itlb[ITLB_SIZE];	/* instruction translation table */
 | 
					    tlb_t itlb[ITLB_SIZE];	/* instruction translation table */
 | 
				
			||||||
 | 
				
			|||||||
@ -36,6 +36,16 @@ register uint32_t T1 asm(AREG2);
 | 
				
			|||||||
#include "cpu.h"
 | 
					#include "cpu.h"
 | 
				
			||||||
#include "exec-all.h"
 | 
					#include "exec-all.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline int cpu_halted(CPUState *env) {
 | 
				
			||||||
 | 
					    if (!env->halted)
 | 
				
			||||||
 | 
					        return 0;
 | 
				
			||||||
 | 
					    if (env->interrupt_request & CPU_INTERRUPT_HARD) {
 | 
				
			||||||
 | 
					        env->halted = 0;
 | 
				
			||||||
 | 
					        return 0;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    return EXCP_HALTED;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef CONFIG_USER_ONLY
 | 
					#ifndef CONFIG_USER_ONLY
 | 
				
			||||||
#include "softmmu_exec.h"
 | 
					#include "softmmu_exec.h"
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user