# 1 "/home/gebner/tmp/qemu/target-i386/op.c" # 1 "/home/gebner/tmp/qemu/i386-user//" # 1 "" # 1 "" # 1 "/home/gebner/tmp/qemu/target-i386/op.c" # 28 "/home/gebner/tmp/qemu/target-i386/op.c" # 1 "/home/gebner/tmp/qemu/target-i386/exec.h" 1 # 20 "/home/gebner/tmp/qemu/target-i386/exec.h" # 1 "./config.h" 1 # 1 "./../config-host.h" 1 # 3 "./config.h" 2 # 21 "/home/gebner/tmp/qemu/target-i386/exec.h" 2 # 1 "/home/gebner/tmp/qemu/dyngen-exec.h" 1 # 23 "/home/gebner/tmp/qemu/dyngen-exec.h" # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/include/stddef.h" 1 3 4 # 151 "/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/include/stddef.h" 3 4 typedef long int ptrdiff_t; # 213 "/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/include/stddef.h" 3 4 typedef long unsigned int size_t; # 325 "/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/include/stddef.h" 3 4 typedef int wchar_t; # 24 "/home/gebner/tmp/qemu/dyngen-exec.h" 2 typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef unsigned long uint64_t; typedef signed char int8_t; typedef signed short int16_t; typedef signed int int32_t; typedef signed long int64_t; # 57 "/home/gebner/tmp/qemu/dyngen-exec.h" typedef struct FILE FILE; extern int fprintf(FILE *, const char *, ...); extern int printf(const char *, ...); # 1 "/usr/include/fenv.h" 1 3 4 # 26 "/usr/include/fenv.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 295 "/usr/include/features.h" 3 4 # 1 "/usr/include/sys/cdefs.h" 1 3 4 # 296 "/usr/include/features.h" 2 3 4 # 318 "/usr/include/features.h" 3 4 # 1 "/usr/include/gnu/stubs.h" 1 3 4 # 319 "/usr/include/features.h" 2 3 4 # 27 "/usr/include/fenv.h" 2 3 4 # 58 "/usr/include/fenv.h" 3 4 # 1 "/usr/include/bits/fenv.h" 1 3 4 # 26 "/usr/include/bits/fenv.h" 3 4 enum { FE_INVALID = 0x01, __FE_DENORM = 0x02, FE_DIVBYZERO = 0x04, FE_OVERFLOW = 0x08, FE_UNDERFLOW = 0x10, FE_INEXACT = 0x20 }; enum { FE_TONEAREST = 0, FE_DOWNWARD = 0x400, FE_UPWARD = 0x800, FE_TOWARDZERO = 0xc00 }; typedef unsigned short int fexcept_t; typedef struct { unsigned short int __control_word; unsigned short int __unused1; unsigned short int __status_word; unsigned short int __unused2; unsigned short int __tags; unsigned short int __unused3; unsigned int __eip; unsigned short int __cs_selector; unsigned int __opcode:11; unsigned int __unused4:5; unsigned int __data_offset; unsigned short int __data_selector; unsigned short int __unused5; unsigned int __mxcsr; } fenv_t; # 59 "/usr/include/fenv.h" 2 3 4 extern int feclearexcept (int __excepts) ; extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) ; extern int feraiseexcept (int __excepts) ; extern int fesetexceptflag (__const fexcept_t *__flagp, int __excepts) ; extern int fetestexcept (int __excepts) ; extern int fegetround (void) ; extern int fesetround (int __rounding_direction) ; extern int fegetenv (fenv_t *__envp) ; extern int feholdexcept (fenv_t *__envp) ; extern int fesetenv (__const fenv_t *__envp) ; extern int feupdateenv (__const fenv_t *__envp) ; # 1 "/usr/include/bits/fenvinline.h" 1 3 4 # 116 "/usr/include/fenv.h" 2 3 4 extern int feenableexcept (int __excepts) ; extern int fedisableexcept (int __excepts) ; extern int fegetexcept (void) ; # 66 "/home/gebner/tmp/qemu/dyngen-exec.h" 2 # 191 "/home/gebner/tmp/qemu/dyngen-exec.h" extern int __op_param1, __op_param2, __op_param3; extern int __op_jmp0, __op_jmp1, __op_jmp2, __op_jmp3; # 22 "/home/gebner/tmp/qemu/target-i386/exec.h" 2 register struct CPUX86State *env asm("rbp"); register uint32_t T0 asm("rbx"); register uint32_t T1 asm("r12"); register uint32_t T2 asm("r13"); register uint32_t EAX asm("r14"); register uint32_t ESP asm("r15"); # 72 "/home/gebner/tmp/qemu/target-i386/exec.h" extern FILE *logfile; extern int loglevel; # 116 "/home/gebner/tmp/qemu/target-i386/exec.h" # 1 "/home/gebner/tmp/qemu/target-i386/cpu.h" 1 # 31 "/home/gebner/tmp/qemu/target-i386/cpu.h" # 1 "/home/gebner/tmp/qemu/cpu-defs.h" 1 # 23 "/home/gebner/tmp/qemu/cpu-defs.h" # 1 "./config.h" 1 # 1 "./../config-host.h" 1 # 3 "./config.h" 2 # 24 "/home/gebner/tmp/qemu/cpu-defs.h" 2 # 1 "/usr/include/setjmp.h" 1 3 4 # 28 "/usr/include/setjmp.h" 3 4 # 1 "/usr/include/bits/setjmp.h" 1 3 4 # 27 "/usr/include/bits/setjmp.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 28 "/usr/include/bits/setjmp.h" 2 3 4 # 62 "/usr/include/bits/setjmp.h" 3 4 typedef long int __jmp_buf[8]; # 31 "/usr/include/setjmp.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 23 "/usr/include/bits/sigset.h" 3 4 typedef int __sig_atomic_t; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 32 "/usr/include/setjmp.h" 2 3 4 typedef struct __jmp_buf_tag { __jmp_buf __jmpbuf; int __mask_was_saved; __sigset_t __saved_mask; } jmp_buf[1]; extern int setjmp (jmp_buf __env) ; extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) ; extern int _setjmp (struct __jmp_buf_tag __env[1]) ; # 76 "/usr/include/setjmp.h" 3 4 extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__noreturn__)); extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__noreturn__)); typedef struct __jmp_buf_tag sigjmp_buf[1]; # 108 "/usr/include/setjmp.h" 3 4 extern void siglongjmp (sigjmp_buf __env, int __val) __attribute__ ((__noreturn__)); # 25 "/home/gebner/tmp/qemu/cpu-defs.h" 2 # 1 "/usr/include/inttypes.h" 1 3 4 # 28 "/usr/include/inttypes.h" 3 4 # 1 "/usr/include/stdint.h" 1 3 4 # 27 "/usr/include/stdint.h" 3 4 # 1 "/usr/include/bits/wchar.h" 1 3 4 # 28 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 29 "/usr/include/stdint.h" 2 3 4 # 37 "/usr/include/stdint.h" 3 4 typedef signed char int8_t; typedef short int int16_t; typedef int int32_t; typedef long int int64_t; typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; typedef unsigned long int uint64_t; # 66 "/usr/include/stdint.h" 3 4 typedef signed char int_least8_t; typedef short int int_least16_t; typedef int int_least32_t; typedef long int int_least64_t; typedef unsigned char uint_least8_t; typedef unsigned short int uint_least16_t; typedef unsigned int uint_least32_t; typedef unsigned long int uint_least64_t; # 91 "/usr/include/stdint.h" 3 4 typedef signed char int_fast8_t; typedef long int int_fast16_t; typedef long int int_fast32_t; typedef long int int_fast64_t; # 104 "/usr/include/stdint.h" 3 4 typedef unsigned char uint_fast8_t; typedef unsigned long int uint_fast16_t; typedef unsigned long int uint_fast32_t; typedef unsigned long int uint_fast64_t; # 120 "/usr/include/stdint.h" 3 4 typedef long int intptr_t; typedef unsigned long int uintptr_t; # 135 "/usr/include/stdint.h" 3 4 typedef long int intmax_t; typedef unsigned long int uintmax_t; # 29 "/usr/include/inttypes.h" 2 3 4 typedef int __gwchar_t; # 274 "/usr/include/inttypes.h" 3 4 typedef struct { long int quot; long int rem; } imaxdiv_t; # 298 "/usr/include/inttypes.h" 3 4 extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__const__)); extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) __attribute__ ((__const__)); extern intmax_t strtoimax (__const char *__restrict __nptr, char **__restrict __endptr, int __base) ; extern uintmax_t strtoumax (__const char *__restrict __nptr, char ** __restrict __endptr, int __base) ; extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base) ; extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr, __gwchar_t ** __restrict __endptr, int __base) ; extern long int __strtol_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) ; extern __inline intmax_t strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base) { return __strtol_internal (nptr, endptr, base, 0); } extern unsigned long int __strtoul_internal (__const char * __restrict __nptr, char ** __restrict __endptr, int __base, int __group) ; extern __inline uintmax_t strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base) { return __strtoul_internal (nptr, endptr, base, 0); } extern long int __wcstol_internal (__const __gwchar_t * __restrict __nptr, __gwchar_t **__restrict __endptr, int __base, int __group) ; extern __inline intmax_t wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) { return __wcstol_internal (nptr, endptr, base, 0); } extern unsigned long int __wcstoul_internal (__const __gwchar_t * __restrict __nptr, __gwchar_t ** __restrict __endptr, int __base, int __group) ; extern __inline uintmax_t wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) { return __wcstoul_internal (nptr, endptr, base, 0); } # 459 "/usr/include/inttypes.h" 3 4 # 26 "/home/gebner/tmp/qemu/cpu-defs.h" 2 # 1 "/home/gebner/tmp/qemu/osdep.h" 1 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/include/stdarg.h" 1 3 4 # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 105 "/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/include/stdarg.h" 3 4 typedef __gnuc_va_list va_list; # 5 "/home/gebner/tmp/qemu/osdep.h" 2 int qemu_vsnprintf(char *buf, int buflen, const char *fmt, va_list args); void qemu_vprintf(const char *fmt, va_list ap); void qemu_printf(const char *fmt, ...); void *qemu_malloc(size_t size); void *qemu_mallocz(size_t size); void qemu_free(void *ptr); void *get_mmap_addr(unsigned long size); # 27 "/home/gebner/tmp/qemu/cpu-defs.h" 2 # 50 "/home/gebner/tmp/qemu/cpu-defs.h" typedef int32_t target_long; typedef uint32_t target_ulong; # 68 "/home/gebner/tmp/qemu/cpu-defs.h" typedef uint64_t target_phys_addr_t; # 83 "/home/gebner/tmp/qemu/cpu-defs.h" typedef struct CPUTLBEntry { target_ulong address; target_phys_addr_t addend; } CPUTLBEntry; # 32 "/home/gebner/tmp/qemu/target-i386/cpu.h" 2 # 215 "/home/gebner/tmp/qemu/target-i386/cpu.h" enum { CC_OP_DYNAMIC, CC_OP_EFLAGS, CC_OP_MULB, CC_OP_MULW, CC_OP_MULL, CC_OP_ADDB, CC_OP_ADDW, CC_OP_ADDL, CC_OP_ADCB, CC_OP_ADCW, CC_OP_ADCL, CC_OP_SUBB, CC_OP_SUBW, CC_OP_SUBL, CC_OP_SBBB, CC_OP_SBBW, CC_OP_SBBL, CC_OP_LOGICB, CC_OP_LOGICW, CC_OP_LOGICL, CC_OP_INCB, CC_OP_INCW, CC_OP_INCL, CC_OP_DECB, CC_OP_DECW, CC_OP_DECL, CC_OP_SHLB, CC_OP_SHLW, CC_OP_SHLL, CC_OP_SARB, CC_OP_SARW, CC_OP_SARL, CC_OP_NB, }; typedef long double CPU86_LDouble; typedef struct SegmentCache { uint32_t selector; uint8_t *base; uint32_t limit; uint32_t flags; } SegmentCache; typedef struct CPUX86State { uint32_t regs[8]; uint32_t eip; uint32_t eflags; uint32_t cc_src; uint32_t cc_dst; uint32_t cc_op; int32_t df; uint32_t hflags; unsigned int fpstt; unsigned int fpus; unsigned int fpuc; uint8_t fptags[8]; CPU86_LDouble fpregs[8]; CPU86_LDouble ft0; union { float f; double d; int i32; int64_t i64; } fp_convert; SegmentCache segs[6]; SegmentCache ldt; SegmentCache tr; SegmentCache gdt; SegmentCache idt; uint32_t sysenter_cs; uint32_t sysenter_esp; uint32_t sysenter_eip; # 330 "/home/gebner/tmp/qemu/target-i386/cpu.h" jmp_buf jmp_env; int exception_index; int error_code; int exception_is_int; int exception_next_eip; struct TranslationBlock *current_tb; uint32_t cr[5]; uint32_t dr[8]; int interrupt_request; int user_mode_only; uint32_t a20_mask; unsigned long mem_write_pc; unsigned long mem_write_vaddr; CPUTLBEntry tlb_read[2][256]; CPUTLBEntry tlb_write[2][256]; uint32_t breakpoints[32]; int nb_breakpoints; int singlestep_enabled; void *opaque; } CPUX86State; void cpu_x86_outb(CPUX86State *env, int addr, int val); void cpu_x86_outw(CPUX86State *env, int addr, int val); void cpu_x86_outl(CPUX86State *env, int addr, int val); int cpu_x86_inb(CPUX86State *env, int addr); int cpu_x86_inw(CPUX86State *env, int addr); int cpu_x86_inl(CPUX86State *env, int addr); CPUX86State *cpu_x86_init(void); int cpu_x86_exec(CPUX86State *s); void cpu_x86_close(CPUX86State *s); int cpu_get_pic_interrupt(CPUX86State *s); void cpu_set_ferr(CPUX86State *s); static inline void cpu_x86_load_seg_cache(CPUX86State *env, int seg_reg, unsigned int selector, uint8_t *base, unsigned int limit, unsigned int flags) { SegmentCache *sc; unsigned int new_hflags; sc = &env->segs[seg_reg]; sc->selector = selector; sc->base = base; sc->limit = limit; sc->flags = flags; new_hflags = (env->segs[1].flags & (1 << 22)) >> (22 - 4); new_hflags |= (env->segs[2].flags & (1 << 22)) >> (22 - 5); if (!(env->cr[0] & (1 << 0)) || (env->eflags & 0x00020000)) { new_hflags |= (1 << 6); } else { new_hflags |= (((unsigned long)env->segs[3].base | (unsigned long)env->segs[0].base | (unsigned long)env->segs[2].base) != 0) << 6; } env->hflags = (env->hflags & ~((1 << 4) | (1 << 5) | (1 << 6))) | new_hflags; } static inline void cpu_x86_set_cpl(CPUX86State *s, int cpl) { s->hflags = (s->hflags & ~(3 << 0)) | cpl; } void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, CPU86_LDouble f); CPU86_LDouble cpu_set_fp80(uint64_t mant, uint16_t upper); void cpu_x86_load_seg(CPUX86State *s, int seg_reg, int selector); void cpu_x86_fsave(CPUX86State *s, uint8_t *ptr, int data32); void cpu_x86_frstor(CPUX86State *s, uint8_t *ptr, int data32); struct siginfo; int cpu_x86_signal_handler(int host_signum, struct siginfo *info, void *puc); void cpu_x86_set_a20(CPUX86State *env, int a20_state); void cpu_x86_update_cr0(CPUX86State *env, uint32_t new_cr0); void cpu_x86_dump_state(CPUX86State *env, FILE *f, int flags); # 1 "/home/gebner/tmp/qemu/cpu-all.h" 1 # 40 "/home/gebner/tmp/qemu/cpu-all.h" # 1 "/home/gebner/tmp/qemu/bswap.h" 1 # 1 "/home/gebner/tmp/qemu/config-host.h" 1 # 5 "/home/gebner/tmp/qemu/bswap.h" 2 # 1 "/usr/include/byteswap.h" 1 3 4 # 23 "/usr/include/byteswap.h" 3 4 # 1 "/usr/include/bits/byteswap.h" 1 3 4 # 27 "/usr/include/bits/byteswap.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 28 "/usr/include/bits/byteswap.h" 2 3 4 # 24 "/usr/include/byteswap.h" 2 3 4 # 10 "/home/gebner/tmp/qemu/bswap.h" 2 # 46 "/home/gebner/tmp/qemu/bswap.h" static inline uint16_t bswap16(uint16_t x) { return (__extension__ ({ register unsigned short int __v, __x = (x); if (__builtin_constant_p (__x)) __v = ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); } static inline uint32_t bswap32(uint32_t x) { return (__extension__ ({ register unsigned int __v, __x = (x); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); __v; })); } static inline uint64_t bswap64(uint64_t x) { return (__extension__ ({ register unsigned long __v, __x = (x); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff00000000000000ull) >> 56) | (((__x) & 0x00ff000000000000ull) >> 40) | (((__x) & 0x0000ff0000000000ull) >> 24) | (((__x) & 0x000000ff00000000ull) >> 8) | (((__x) & 0x00000000ff000000ull) << 8) | (((__x) & 0x0000000000ff0000ull) << 24) | (((__x) & 0x000000000000ff00ull) << 40) | (((__x) & 0x00000000000000ffull) << 56)); else __asm__ ("bswap %q0" : "=r" (__v) : "0" (__x)); __v; })); } static inline void bswap16s(uint16_t *s) { *s = bswap16(*s); } static inline void bswap32s(uint32_t *s) { *s = bswap32(*s); } static inline void bswap64s(uint64_t *s) { *s = bswap64(*s); } # 41 "/home/gebner/tmp/qemu/cpu-all.h" 2 # 80 "/home/gebner/tmp/qemu/cpu-all.h" static inline uint16_t tswap16(uint16_t s) { return s; } static inline uint32_t tswap32(uint32_t s) { return s; } static inline uint64_t tswap64(uint64_t s) { return s; } static inline void tswap16s(uint16_t *s) { } static inline void tswap32s(uint32_t *s) { } static inline void tswap64s(uint64_t *s) { } # 118 "/home/gebner/tmp/qemu/cpu-all.h" typedef union { double d; struct { uint32_t lower; uint32_t upper; } l; uint64_t ll; } CPU_DoubleU; # 169 "/home/gebner/tmp/qemu/cpu-all.h" static inline int ldub_raw(void *ptr) { return *(uint8_t *)ptr; } static inline int ldsb_raw(void *ptr) { return *(int8_t *)ptr; } static inline void stb_raw(void *ptr, int v) { *(uint8_t *)ptr = v; } # 435 "/home/gebner/tmp/qemu/cpu-all.h" static inline int lduw_raw(void *ptr) { return *(uint16_t *)ptr; } static inline int ldsw_raw(void *ptr) { return *(int16_t *)ptr; } static inline int ldl_raw(void *ptr) { return *(uint32_t *)ptr; } static inline uint64_t ldq_raw(void *ptr) { return *(uint64_t *)ptr; } static inline void stw_raw(void *ptr, int v) { *(uint16_t *)ptr = v; } static inline void stl_raw(void *ptr, int v) { *(uint32_t *)ptr = v; } static inline void stq_raw(void *ptr, uint64_t v) { *(uint64_t *)ptr = v; } static inline float ldfl_raw(void *ptr) { return *(float *)ptr; } static inline double ldfq_raw(void *ptr) { return *(double *)ptr; } static inline void stfl_raw(void *ptr, float v) { *(float *)ptr = v; } static inline void stfq_raw(void *ptr, double v) { *(double *)ptr = v; } # 541 "/home/gebner/tmp/qemu/cpu-all.h" extern unsigned long real_host_page_size; extern unsigned long host_page_bits; extern unsigned long host_page_size; extern unsigned long host_page_mask; # 558 "/home/gebner/tmp/qemu/cpu-all.h" void page_dump(FILE *f); int page_get_flags(unsigned long address); void page_set_flags(unsigned long start, unsigned long end, int flags); void page_unprotect_range(uint8_t *data, unsigned long data_size); # 614 "/home/gebner/tmp/qemu/cpu-all.h" void cpu_abort(CPUX86State *env, const char *fmt, ...); extern CPUX86State *cpu_single_env; extern int code_copy_enabled; void cpu_x86_interrupt(CPUX86State *s, int mask); int cpu_breakpoint_insert(CPUX86State *env, target_ulong pc); int cpu_breakpoint_remove(CPUX86State *env, target_ulong pc); void cpu_single_step(CPUX86State *env, int enabled); target_ulong cpu_get_phys_page_debug(CPUX86State *env, target_ulong addr); # 642 "/home/gebner/tmp/qemu/cpu-all.h" typedef struct CPULogItem { int mask; const char *name; const char *help; } CPULogItem; extern CPULogItem cpu_log_items[]; void cpu_set_log(int log_flags); void cpu_set_log_filename(const char *filename); int cpu_str_to_log_mask(const char *str); void cpu_outb(CPUX86State *env, int addr, int val); void cpu_outw(CPUX86State *env, int addr, int val); void cpu_outl(CPUX86State *env, int addr, int val); int cpu_inb(CPUX86State *env, int addr); int cpu_inw(CPUX86State *env, int addr); int cpu_inl(CPUX86State *env, int addr); extern int phys_ram_size; extern int phys_ram_fd; extern uint8_t *phys_ram_base; extern uint8_t *phys_ram_dirty; # 685 "/home/gebner/tmp/qemu/cpu-all.h" typedef void CPUWriteMemoryFunc(target_phys_addr_t addr, uint32_t value); typedef uint32_t CPUReadMemoryFunc(target_phys_addr_t addr); void cpu_register_physical_memory(target_phys_addr_t start_addr, unsigned long size, unsigned long phys_offset); int cpu_register_io_memory(int io_index, CPUReadMemoryFunc **mem_read, CPUWriteMemoryFunc **mem_write); void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, int len, int is_write); static inline void cpu_physical_memory_read(target_phys_addr_t addr, uint8_t *buf, int len) { cpu_physical_memory_rw(addr, buf, len, 0); } static inline void cpu_physical_memory_write(target_phys_addr_t addr, const uint8_t *buf, int len) { cpu_physical_memory_rw(addr, (uint8_t *)buf, len, 1); } int cpu_memory_rw_debug(CPUX86State *env, target_ulong addr, uint8_t *buf, int len, int is_write); static inline int cpu_physical_memory_is_dirty(target_ulong addr) { return phys_ram_dirty[addr >> 12]; } static inline void cpu_physical_memory_set_dirty(target_ulong addr) { phys_ram_dirty[addr >> 12] = 1; } void cpu_physical_memory_reset_dirty(target_ulong start, target_ulong end); # 456 "/home/gebner/tmp/qemu/target-i386/cpu.h" 2 # 117 "/home/gebner/tmp/qemu/target-i386/exec.h" 2 # 1 "/home/gebner/tmp/qemu/exec-all.h" 1 # 47 "/home/gebner/tmp/qemu/exec-all.h" struct TranslationBlock; # 56 "/home/gebner/tmp/qemu/exec-all.h" extern uint16_t gen_opc_buf[512]; extern uint32_t gen_opparam_buf[(512 * 3)]; extern uint32_t gen_opc_pc[512]; extern uint8_t gen_opc_cc_op[512]; extern uint8_t gen_opc_instr_start[512]; typedef void (GenOpFunc)(void); typedef void (GenOpFunc1)(long); typedef void (GenOpFunc2)(long, long); typedef void (GenOpFunc3)(long, long, long); void optimize_flags_init(void); extern FILE *logfile; extern int loglevel; int gen_intermediate_code(CPUX86State *env, struct TranslationBlock *tb); int gen_intermediate_code_pc(CPUX86State *env, struct TranslationBlock *tb); void dump_ops(const uint16_t *opc_buf, const uint32_t *opparam_buf); int cpu_x86_gen_code(CPUX86State *env, struct TranslationBlock *tb, int max_code_size, int *gen_code_size_ptr); int cpu_restore_state(struct TranslationBlock *tb, CPUX86State *env, unsigned long searched_pc, void *puc); int cpu_gen_code_copy(CPUX86State *env, struct TranslationBlock *tb, int max_code_size, int *gen_code_size_ptr); int cpu_restore_state_copy(struct TranslationBlock *tb, CPUX86State *env, unsigned long searched_pc, void *puc); void cpu_resume_from_signal(CPUX86State *env1, void *puc); void cpu_exec_init(void); int page_unprotect(unsigned long address, unsigned long pc, void *puc); void tb_invalidate_phys_page_range(target_ulong start, target_ulong end, int is_cpu_write_access); void tb_invalidate_page_range(target_ulong start, target_ulong end); void tlb_flush_page(CPUX86State *env, target_ulong addr); void tlb_flush(CPUX86State *env, int flush_global); int tlb_set_page(CPUX86State *env, target_ulong vaddr, target_phys_addr_t paddr, int prot, int is_user, int is_softmmu); # 151 "/home/gebner/tmp/qemu/exec-all.h" typedef struct TranslationBlock { target_ulong pc; target_ulong cs_base; unsigned int flags; uint16_t size; uint16_t cflags; uint8_t *tc_ptr; struct TranslationBlock *hash_next; struct TranslationBlock *phys_hash_next; struct TranslationBlock *page_next[2]; target_ulong page_addr[2]; uint16_t tb_next_offset[2]; uint32_t tb_next[2]; struct TranslationBlock *jmp_next[2]; struct TranslationBlock *jmp_first; } TranslationBlock; static inline unsigned int tb_hash_func(unsigned long pc) { return pc & ((1 << 15) - 1); } static inline unsigned int tb_phys_hash_func(unsigned long pc) { return pc & ((1 << 15) - 1); } TranslationBlock *tb_alloc(unsigned long pc); void tb_flush(CPUX86State *env); void tb_link(TranslationBlock *tb); void tb_link_phys(TranslationBlock *tb, target_ulong phys_pc, target_ulong phys_page2); extern TranslationBlock *tb_hash[(1 << 15)]; extern TranslationBlock *tb_phys_hash[(1 << 15)]; extern uint8_t code_gen_buffer[(8 * 1024 * 1024)]; extern uint8_t *code_gen_ptr; static inline TranslationBlock *tb_find(TranslationBlock ***pptb, target_ulong pc, target_ulong cs_base, unsigned int flags) { TranslationBlock **ptb, *tb; unsigned int h; h = tb_hash_func(pc); ptb = &tb_hash[h]; for(;;) { tb = *ptb; if (!tb) break; if (tb->pc == pc && tb->cs_base == cs_base && tb->flags == flags) return tb; ptb = &tb->hash_next; } *pptb = ptb; return 0; } # 278 "/home/gebner/tmp/qemu/exec-all.h" static inline void tb_set_jmp_target(TranslationBlock *tb, int n, unsigned long addr) { tb->tb_next[n] = addr; } static inline void tb_add_jump(TranslationBlock *tb, int n, TranslationBlock *tb_next) { if (!tb->jmp_next[n]) { tb_set_jmp_target(tb, n, (unsigned long)tb_next->tc_ptr); tb->jmp_next[n] = tb_next->jmp_first; tb_next->jmp_first = (TranslationBlock *)((long)(tb) | (n)); } } TranslationBlock *tb_find_pc(unsigned long pc_ptr); # 378 "/home/gebner/tmp/qemu/exec-all.h" extern CPUWriteMemoryFunc *io_mem_write[256][4]; extern CPUReadMemoryFunc *io_mem_read[256][4]; # 414 "/home/gebner/tmp/qemu/exec-all.h" static inline int testandset (int *p) { char ret; int readval; __asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0" : "=q" (ret), "=m" (*p), "=a" (readval) : "r" (1), "m" (*p), "a" (0) : "memory"); return ret; } # 498 "/home/gebner/tmp/qemu/exec-all.h" typedef int spinlock_t; static inline void spin_lock(spinlock_t *lock) { while (testandset(lock)); } static inline void spin_unlock(spinlock_t *lock) { *lock = 0; } static inline int spin_trylock(spinlock_t *lock) { return !testandset(lock); } # 532 "/home/gebner/tmp/qemu/exec-all.h" extern spinlock_t tb_lock; extern int tb_invalidated_flag; # 562 "/home/gebner/tmp/qemu/exec-all.h" static inline target_ulong get_phys_addr_code(CPUX86State *env, target_ulong addr) { return addr; } # 118 "/home/gebner/tmp/qemu/target-i386/exec.h" 2 typedef struct CCTable { int (*compute_all)(void); int (*compute_c)(void); } CCTable; extern CCTable cc_table[]; void load_seg(int seg_reg, int selector); void helper_ljmp_protected_T0_T1(int next_eip); void helper_lcall_real_T0_T1(int shift, int next_eip); void helper_lcall_protected_T0_T1(int shift, int next_eip); void helper_iret_real(int shift); void helper_iret_protected(int shift, int next_eip); void helper_lret_protected(int shift, int addend); void helper_lldt_T0(void); void helper_ltr_T0(void); void helper_movl_crN_T0(int reg); void helper_movl_drN_T0(int reg); void helper_invlpg(unsigned int addr); void cpu_x86_update_cr0(CPUX86State *env, uint32_t new_cr0); void cpu_x86_update_cr3(CPUX86State *env, uint32_t new_cr3); void cpu_x86_update_cr4(CPUX86State *env, uint32_t new_cr4); void cpu_x86_flush_tlb(CPUX86State *env, uint32_t addr); int cpu_x86_handle_mmu_fault(CPUX86State *env, uint32_t addr, int is_write, int is_user, int is_softmmu); void tlb_fill(unsigned long addr, int is_write, int is_user, void *retaddr); void cpu_lock(void); void cpu_unlock(void); void do_interrupt(int intno, int is_int, int error_code, unsigned int next_eip, int is_hw); void do_interrupt_user(int intno, int is_int, int error_code, unsigned int next_eip); void raise_interrupt(int intno, int is_int, int error_code, unsigned int next_eip); void raise_exception_err(int exception_index, int error_code); void raise_exception(int exception_index); void cpu_loop_exit(void); void helper_fsave(uint8_t *ptr, int data32); void helper_frstor(uint8_t *ptr, int data32); void op_movl_eflags_T0(void); void op_movl_T0_eflags(void); void raise_interrupt(int intno, int is_int, int error_code, unsigned int next_eip); void raise_exception_err(int exception_index, int error_code); void raise_exception(int exception_index); void helper_divl_EAX_T0(uint32_t eip); void helper_idivl_EAX_T0(uint32_t eip); void helper_cmpxchg8b(void); void helper_cpuid(void); void helper_rdtsc(void); void helper_rdmsr(void); void helper_wrmsr(void); void helper_lsl(void); void helper_lar(void); void helper_verr(void); void helper_verw(void); void check_iob_T0(void); void check_iow_T0(void); void check_iol_T0(void); void check_iob_DX(void); void check_iow_DX(void); void check_iol_DX(void); # 312 "/home/gebner/tmp/qemu/target-i386/exec.h" extern int lrintl(CPU86_LDouble x); extern int64_t llrintl(CPU86_LDouble x); extern CPU86_LDouble fabsl(CPU86_LDouble x); extern CPU86_LDouble sinl(CPU86_LDouble x); extern CPU86_LDouble cosl(CPU86_LDouble x); extern CPU86_LDouble sqrtl(CPU86_LDouble x); extern CPU86_LDouble powl(CPU86_LDouble, CPU86_LDouble); extern CPU86_LDouble logl(CPU86_LDouble x); extern CPU86_LDouble tanl(CPU86_LDouble x); extern CPU86_LDouble atan2l(CPU86_LDouble, CPU86_LDouble); extern CPU86_LDouble floorl(CPU86_LDouble x); extern CPU86_LDouble ceill(CPU86_LDouble x); extern CPU86_LDouble rintl(CPU86_LDouble x); # 348 "/home/gebner/tmp/qemu/target-i386/exec.h" typedef union { long double d; struct { unsigned long long lower; unsigned short upper; } l; } CPU86_LDoubleU; # 398 "/home/gebner/tmp/qemu/target-i386/exec.h" static inline void fpush(void) { env->fpstt = (env->fpstt - 1) & 7; env->fptags[env->fpstt] = 0; } static inline void fpop(void) { env->fptags[env->fpstt] = 1; env->fpstt = (env->fpstt + 1) & 7; } # 451 "/home/gebner/tmp/qemu/target-i386/exec.h" static inline CPU86_LDouble helper_fldt(uint8_t *ptr) { return *(CPU86_LDouble *)ptr; } static inline void helper_fstt(CPU86_LDouble f, uint8_t *ptr) { *(CPU86_LDouble *)ptr = f; } # 499 "/home/gebner/tmp/qemu/target-i386/exec.h" const CPU86_LDouble f15rk[7]; void helper_fldt_ST0_A0(void); void helper_fstt_ST0_A0(void); void fpu_raise_exception(void); CPU86_LDouble helper_fdiv(CPU86_LDouble a, CPU86_LDouble b); void helper_fbld_ST0_A0(void); void helper_fbst_ST0_A0(void); void helper_f2xm1(void); void helper_fyl2x(void); void helper_fptan(void); void helper_fpatan(void); void helper_fxtract(void); void helper_fprem1(void); void helper_fprem(void); void helper_fyl2xp1(void); void helper_fsqrt(void); void helper_fsincos(void); void helper_frndint(void); void helper_fscale(void); void helper_fsin(void); void helper_fcos(void); void helper_fxam_ST0(void); void helper_fstenv(uint8_t *ptr, int data32); void helper_fldenv(uint8_t *ptr, int data32); void helper_fsave(uint8_t *ptr, int data32); void helper_frstor(uint8_t *ptr, int data32); void restore_native_fp_state(CPUX86State *env); void save_native_fp_state(CPUX86State *env); const uint8_t parity_table[256]; const uint8_t rclw_table[32]; const uint8_t rclb_table[32]; static inline uint32_t compute_eflags(void) { return env->eflags | cc_table[(env->cc_op)].compute_all() | ((env->df) & 0x00000400); } static inline void load_eflags(int eflags, int update_mask) { (env->cc_src) = eflags & (0x0800 | 0x0080 | 0x0040 | 0x0010 | 0x0004 | 0x0001); (env->df) = 1 - (2 * ((eflags >> 10) & 1)); env->eflags = (env->eflags & ~update_mask) | (eflags & update_mask); } # 29 "/home/gebner/tmp/qemu/target-i386/op.c" 2 static inline int lshift(int x, int n) { if (n >= 0) return x << n; else return x >> (-n); } # 1 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" 1 # 21 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" void op_movl_A0_EAX(void) { T2 = EAX; } void op_addl_A0_EAX(void) { T2 += EAX; } void op_addl_A0_EAX_s1(void) { T2 += EAX << 1; } void op_addl_A0_EAX_s2(void) { T2 += EAX << 2; } void op_addl_A0_EAX_s3(void) { T2 += EAX << 3; } void op_movl_T0_EAX(void) { T0 = EAX; } void op_movl_T1_EAX(void) { T1 = EAX; } void op_movh_T0_EAX(void) { T0 = EAX >> 8; } void op_movh_T1_EAX(void) { T1 = EAX >> 8; } void op_movl_EAX_T0(void) { EAX = T0; } void op_movl_EAX_T1(void) { EAX = T1; } void op_movl_EAX_A0(void) { EAX = T2; } void op_cmovw_EAX_T1_T0(void) { if (T0) EAX = (EAX & 0xffff0000) | (T1 & 0xffff); asm volatile ("");; } void op_cmovl_EAX_T1_T0(void) { if (T0) EAX = T1; asm volatile ("");; } void op_movw_EAX_T0(void) { EAX = (EAX & 0xffff0000) | (T0 & 0xffff); } void op_movw_EAX_T1(void) { EAX = (EAX & 0xffff0000) | (T1 & 0xffff); } void op_movw_EAX_A0(void) { EAX = (EAX & 0xffff0000) | (T2 & 0xffff); } void op_movb_EAX_T0(void) { EAX = (EAX & 0xffffff00) | (T0 & 0xff); } void op_movh_EAX_T0(void) { EAX = (EAX & 0xffff00ff) | ((T0 & 0xff) << 8); } void op_movb_EAX_T1(void) { EAX = (EAX & 0xffffff00) | (T1 & 0xff); } void op_movh_EAX_T1(void) { EAX = (EAX & 0xffff00ff) | ((T1 & 0xff) << 8); } # 44 "/home/gebner/tmp/qemu/target-i386/op.c" 2 # 1 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" 1 # 21 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" void op_movl_A0_ECX(void) { T2 = (env->regs[1]); } void op_addl_A0_ECX(void) { T2 += (env->regs[1]); } void op_addl_A0_ECX_s1(void) { T2 += (env->regs[1]) << 1; } void op_addl_A0_ECX_s2(void) { T2 += (env->regs[1]) << 2; } void op_addl_A0_ECX_s3(void) { T2 += (env->regs[1]) << 3; } void op_movl_T0_ECX(void) { T0 = (env->regs[1]); } void op_movl_T1_ECX(void) { T1 = (env->regs[1]); } void op_movh_T0_ECX(void) { T0 = (env->regs[1]) >> 8; } void op_movh_T1_ECX(void) { T1 = (env->regs[1]) >> 8; } void op_movl_ECX_T0(void) { (env->regs[1]) = T0; } void op_movl_ECX_T1(void) { (env->regs[1]) = T1; } void op_movl_ECX_A0(void) { (env->regs[1]) = T2; } void op_cmovw_ECX_T1_T0(void) { if (T0) (env->regs[1]) = ((env->regs[1]) & 0xffff0000) | (T1 & 0xffff); asm volatile ("");; } void op_cmovl_ECX_T1_T0(void) { if (T0) (env->regs[1]) = T1; asm volatile ("");; } void op_movw_ECX_T0(void) { (env->regs[1]) = ((env->regs[1]) & 0xffff0000) | (T0 & 0xffff); } void op_movw_ECX_T1(void) { (env->regs[1]) = ((env->regs[1]) & 0xffff0000) | (T1 & 0xffff); } void op_movw_ECX_A0(void) { (env->regs[1]) = ((env->regs[1]) & 0xffff0000) | (T2 & 0xffff); } void op_movb_ECX_T0(void) { (env->regs[1]) = ((env->regs[1]) & 0xffffff00) | (T0 & 0xff); } void op_movh_ECX_T0(void) { (env->regs[1]) = ((env->regs[1]) & 0xffff00ff) | ((T0 & 0xff) << 8); } void op_movb_ECX_T1(void) { (env->regs[1]) = ((env->regs[1]) & 0xffffff00) | (T1 & 0xff); } void op_movh_ECX_T1(void) { (env->regs[1]) = ((env->regs[1]) & 0xffff00ff) | ((T1 & 0xff) << 8); } # 50 "/home/gebner/tmp/qemu/target-i386/op.c" 2 # 1 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" 1 # 21 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" void op_movl_A0_EDX(void) { T2 = (env->regs[2]); } void op_addl_A0_EDX(void) { T2 += (env->regs[2]); } void op_addl_A0_EDX_s1(void) { T2 += (env->regs[2]) << 1; } void op_addl_A0_EDX_s2(void) { T2 += (env->regs[2]) << 2; } void op_addl_A0_EDX_s3(void) { T2 += (env->regs[2]) << 3; } void op_movl_T0_EDX(void) { T0 = (env->regs[2]); } void op_movl_T1_EDX(void) { T1 = (env->regs[2]); } void op_movh_T0_EDX(void) { T0 = (env->regs[2]) >> 8; } void op_movh_T1_EDX(void) { T1 = (env->regs[2]) >> 8; } void op_movl_EDX_T0(void) { (env->regs[2]) = T0; } void op_movl_EDX_T1(void) { (env->regs[2]) = T1; } void op_movl_EDX_A0(void) { (env->regs[2]) = T2; } void op_cmovw_EDX_T1_T0(void) { if (T0) (env->regs[2]) = ((env->regs[2]) & 0xffff0000) | (T1 & 0xffff); asm volatile ("");; } void op_cmovl_EDX_T1_T0(void) { if (T0) (env->regs[2]) = T1; asm volatile ("");; } void op_movw_EDX_T0(void) { (env->regs[2]) = ((env->regs[2]) & 0xffff0000) | (T0 & 0xffff); } void op_movw_EDX_T1(void) { (env->regs[2]) = ((env->regs[2]) & 0xffff0000) | (T1 & 0xffff); } void op_movw_EDX_A0(void) { (env->regs[2]) = ((env->regs[2]) & 0xffff0000) | (T2 & 0xffff); } void op_movb_EDX_T0(void) { (env->regs[2]) = ((env->regs[2]) & 0xffffff00) | (T0 & 0xff); } void op_movh_EDX_T0(void) { (env->regs[2]) = ((env->regs[2]) & 0xffff00ff) | ((T0 & 0xff) << 8); } void op_movb_EDX_T1(void) { (env->regs[2]) = ((env->regs[2]) & 0xffffff00) | (T1 & 0xff); } void op_movh_EDX_T1(void) { (env->regs[2]) = ((env->regs[2]) & 0xffff00ff) | ((T1 & 0xff) << 8); } # 56 "/home/gebner/tmp/qemu/target-i386/op.c" 2 # 1 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" 1 # 21 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" void op_movl_A0_EBX(void) { T2 = (env->regs[3]); } void op_addl_A0_EBX(void) { T2 += (env->regs[3]); } void op_addl_A0_EBX_s1(void) { T2 += (env->regs[3]) << 1; } void op_addl_A0_EBX_s2(void) { T2 += (env->regs[3]) << 2; } void op_addl_A0_EBX_s3(void) { T2 += (env->regs[3]) << 3; } void op_movl_T0_EBX(void) { T0 = (env->regs[3]); } void op_movl_T1_EBX(void) { T1 = (env->regs[3]); } void op_movh_T0_EBX(void) { T0 = (env->regs[3]) >> 8; } void op_movh_T1_EBX(void) { T1 = (env->regs[3]) >> 8; } void op_movl_EBX_T0(void) { (env->regs[3]) = T0; } void op_movl_EBX_T1(void) { (env->regs[3]) = T1; } void op_movl_EBX_A0(void) { (env->regs[3]) = T2; } void op_cmovw_EBX_T1_T0(void) { if (T0) (env->regs[3]) = ((env->regs[3]) & 0xffff0000) | (T1 & 0xffff); asm volatile ("");; } void op_cmovl_EBX_T1_T0(void) { if (T0) (env->regs[3]) = T1; asm volatile ("");; } void op_movw_EBX_T0(void) { (env->regs[3]) = ((env->regs[3]) & 0xffff0000) | (T0 & 0xffff); } void op_movw_EBX_T1(void) { (env->regs[3]) = ((env->regs[3]) & 0xffff0000) | (T1 & 0xffff); } void op_movw_EBX_A0(void) { (env->regs[3]) = ((env->regs[3]) & 0xffff0000) | (T2 & 0xffff); } void op_movb_EBX_T0(void) { (env->regs[3]) = ((env->regs[3]) & 0xffffff00) | (T0 & 0xff); } void op_movh_EBX_T0(void) { (env->regs[3]) = ((env->regs[3]) & 0xffff00ff) | ((T0 & 0xff) << 8); } void op_movb_EBX_T1(void) { (env->regs[3]) = ((env->regs[3]) & 0xffffff00) | (T1 & 0xff); } void op_movh_EBX_T1(void) { (env->regs[3]) = ((env->regs[3]) & 0xffff00ff) | ((T1 & 0xff) << 8); } # 62 "/home/gebner/tmp/qemu/target-i386/op.c" 2 # 1 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" 1 # 21 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" void op_movl_A0_ESP(void) { T2 = ESP; } void op_addl_A0_ESP(void) { T2 += ESP; } void op_addl_A0_ESP_s1(void) { T2 += ESP << 1; } void op_addl_A0_ESP_s2(void) { T2 += ESP << 2; } void op_addl_A0_ESP_s3(void) { T2 += ESP << 3; } void op_movl_T0_ESP(void) { T0 = ESP; } void op_movl_T1_ESP(void) { T1 = ESP; } void op_movh_T0_ESP(void) { T0 = ESP >> 8; } void op_movh_T1_ESP(void) { T1 = ESP >> 8; } void op_movl_ESP_T0(void) { ESP = T0; } void op_movl_ESP_T1(void) { ESP = T1; } void op_movl_ESP_A0(void) { ESP = T2; } void op_cmovw_ESP_T1_T0(void) { if (T0) ESP = (ESP & 0xffff0000) | (T1 & 0xffff); asm volatile ("");; } void op_cmovl_ESP_T1_T0(void) { if (T0) ESP = T1; asm volatile ("");; } void op_movw_ESP_T0(void) { ESP = (ESP & 0xffff0000) | (T0 & 0xffff); } void op_movw_ESP_T1(void) { ESP = (ESP & 0xffff0000) | (T1 & 0xffff); } void op_movw_ESP_A0(void) { ESP = (ESP & 0xffff0000) | (T2 & 0xffff); } void op_movb_ESP_T0(void) { ESP = (ESP & 0xffffff00) | (T0 & 0xff); } void op_movh_ESP_T0(void) { ESP = (ESP & 0xffff00ff) | ((T0 & 0xff) << 8); } void op_movb_ESP_T1(void) { ESP = (ESP & 0xffffff00) | (T1 & 0xff); } void op_movh_ESP_T1(void) { ESP = (ESP & 0xffff00ff) | ((T1 & 0xff) << 8); } # 68 "/home/gebner/tmp/qemu/target-i386/op.c" 2 # 1 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" 1 # 21 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" void op_movl_A0_EBP(void) { T2 = (env->regs[5]); } void op_addl_A0_EBP(void) { T2 += (env->regs[5]); } void op_addl_A0_EBP_s1(void) { T2 += (env->regs[5]) << 1; } void op_addl_A0_EBP_s2(void) { T2 += (env->regs[5]) << 2; } void op_addl_A0_EBP_s3(void) { T2 += (env->regs[5]) << 3; } void op_movl_T0_EBP(void) { T0 = (env->regs[5]); } void op_movl_T1_EBP(void) { T1 = (env->regs[5]); } void op_movh_T0_EBP(void) { T0 = (env->regs[5]) >> 8; } void op_movh_T1_EBP(void) { T1 = (env->regs[5]) >> 8; } void op_movl_EBP_T0(void) { (env->regs[5]) = T0; } void op_movl_EBP_T1(void) { (env->regs[5]) = T1; } void op_movl_EBP_A0(void) { (env->regs[5]) = T2; } void op_cmovw_EBP_T1_T0(void) { if (T0) (env->regs[5]) = ((env->regs[5]) & 0xffff0000) | (T1 & 0xffff); asm volatile ("");; } void op_cmovl_EBP_T1_T0(void) { if (T0) (env->regs[5]) = T1; asm volatile ("");; } void op_movw_EBP_T0(void) { (env->regs[5]) = ((env->regs[5]) & 0xffff0000) | (T0 & 0xffff); } void op_movw_EBP_T1(void) { (env->regs[5]) = ((env->regs[5]) & 0xffff0000) | (T1 & 0xffff); } void op_movw_EBP_A0(void) { (env->regs[5]) = ((env->regs[5]) & 0xffff0000) | (T2 & 0xffff); } void op_movb_EBP_T0(void) { (env->regs[5]) = ((env->regs[5]) & 0xffffff00) | (T0 & 0xff); } void op_movh_EBP_T0(void) { (env->regs[5]) = ((env->regs[5]) & 0xffff00ff) | ((T0 & 0xff) << 8); } void op_movb_EBP_T1(void) { (env->regs[5]) = ((env->regs[5]) & 0xffffff00) | (T1 & 0xff); } void op_movh_EBP_T1(void) { (env->regs[5]) = ((env->regs[5]) & 0xffff00ff) | ((T1 & 0xff) << 8); } # 74 "/home/gebner/tmp/qemu/target-i386/op.c" 2 # 1 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" 1 # 21 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" void op_movl_A0_ESI(void) { T2 = (env->regs[6]); } void op_addl_A0_ESI(void) { T2 += (env->regs[6]); } void op_addl_A0_ESI_s1(void) { T2 += (env->regs[6]) << 1; } void op_addl_A0_ESI_s2(void) { T2 += (env->regs[6]) << 2; } void op_addl_A0_ESI_s3(void) { T2 += (env->regs[6]) << 3; } void op_movl_T0_ESI(void) { T0 = (env->regs[6]); } void op_movl_T1_ESI(void) { T1 = (env->regs[6]); } void op_movh_T0_ESI(void) { T0 = (env->regs[6]) >> 8; } void op_movh_T1_ESI(void) { T1 = (env->regs[6]) >> 8; } void op_movl_ESI_T0(void) { (env->regs[6]) = T0; } void op_movl_ESI_T1(void) { (env->regs[6]) = T1; } void op_movl_ESI_A0(void) { (env->regs[6]) = T2; } void op_cmovw_ESI_T1_T0(void) { if (T0) (env->regs[6]) = ((env->regs[6]) & 0xffff0000) | (T1 & 0xffff); asm volatile ("");; } void op_cmovl_ESI_T1_T0(void) { if (T0) (env->regs[6]) = T1; asm volatile ("");; } void op_movw_ESI_T0(void) { (env->regs[6]) = ((env->regs[6]) & 0xffff0000) | (T0 & 0xffff); } void op_movw_ESI_T1(void) { (env->regs[6]) = ((env->regs[6]) & 0xffff0000) | (T1 & 0xffff); } void op_movw_ESI_A0(void) { (env->regs[6]) = ((env->regs[6]) & 0xffff0000) | (T2 & 0xffff); } void op_movb_ESI_T0(void) { (env->regs[6]) = ((env->regs[6]) & 0xffffff00) | (T0 & 0xff); } void op_movh_ESI_T0(void) { (env->regs[6]) = ((env->regs[6]) & 0xffff00ff) | ((T0 & 0xff) << 8); } void op_movb_ESI_T1(void) { (env->regs[6]) = ((env->regs[6]) & 0xffffff00) | (T1 & 0xff); } void op_movh_ESI_T1(void) { (env->regs[6]) = ((env->regs[6]) & 0xffff00ff) | ((T1 & 0xff) << 8); } # 80 "/home/gebner/tmp/qemu/target-i386/op.c" 2 # 1 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" 1 # 21 "/home/gebner/tmp/qemu/target-i386/opreg_template.h" void op_movl_A0_EDI(void) { T2 = (env->regs[7]); } void op_addl_A0_EDI(void) { T2 += (env->regs[7]); } void op_addl_A0_EDI_s1(void) { T2 += (env->regs[7]) << 1; } void op_addl_A0_EDI_s2(void) { T2 += (env->regs[7]) << 2; } void op_addl_A0_EDI_s3(void) { T2 += (env->regs[7]) << 3; } void op_movl_T0_EDI(void) { T0 = (env->regs[7]); } void op_movl_T1_EDI(void) { T1 = (env->regs[7]); } void op_movh_T0_EDI(void) { T0 = (env->regs[7]) >> 8; } void op_movh_T1_EDI(void) { T1 = (env->regs[7]) >> 8; } void op_movl_EDI_T0(void) { (env->regs[7]) = T0; } void op_movl_EDI_T1(void) { (env->regs[7]) = T1; } void op_movl_EDI_A0(void) { (env->regs[7]) = T2; } void op_cmovw_EDI_T1_T0(void) { if (T0) (env->regs[7]) = ((env->regs[7]) & 0xffff0000) | (T1 & 0xffff); asm volatile ("");; } void op_cmovl_EDI_T1_T0(void) { if (T0) (env->regs[7]) = T1; asm volatile ("");; } void op_movw_EDI_T0(void) { (env->regs[7]) = ((env->regs[7]) & 0xffff0000) | (T0 & 0xffff); } void op_movw_EDI_T1(void) { (env->regs[7]) = ((env->regs[7]) & 0xffff0000) | (T1 & 0xffff); } void op_movw_EDI_A0(void) { (env->regs[7]) = ((env->regs[7]) & 0xffff0000) | (T2 & 0xffff); } void op_movb_EDI_T0(void) { (env->regs[7]) = ((env->regs[7]) & 0xffffff00) | (T0 & 0xff); } void op_movh_EDI_T0(void) { (env->regs[7]) = ((env->regs[7]) & 0xffff00ff) | ((T0 & 0xff) << 8); } void op_movb_EDI_T1(void) { (env->regs[7]) = ((env->regs[7]) & 0xffffff00) | (T1 & 0xff); } void op_movh_EDI_T1(void) { (env->regs[7]) = ((env->regs[7]) & 0xffff00ff) | ((T1 & 0xff) << 8); } # 86 "/home/gebner/tmp/qemu/target-i386/op.c" 2 void op_update2_cc(void) { (env->cc_src) = T1; (env->cc_dst) = T0; } void op_update1_cc(void) { (env->cc_dst) = T0; } void op_update_neg_cc(void) { (env->cc_src) = -T0; (env->cc_dst) = T0; } void op_cmpl_T0_T1_cc(void) { (env->cc_src) = T1; (env->cc_dst) = T0 - T1; } void op_update_inc_cc(void) { (env->cc_src) = cc_table[(env->cc_op)].compute_c(); (env->cc_dst) = T0; } void op_testl_T0_T1_cc(void) { (env->cc_dst) = T0 & T1; } void op_addl_T0_T1(void) { T0 += T1; } void op_orl_T0_T1(void) { T0 |= T1; } void op_andl_T0_T1(void) { T0 &= T1; } void op_subl_T0_T1(void) { T0 -= T1; } void op_xorl_T0_T1(void) { T0 ^= T1; } void op_negl_T0(void) { T0 = -T0; } void op_incl_T0(void) { T0++; } void op_decl_T0(void) { T0--; } void op_notl_T0(void) { T0 = ~T0; } void op_bswapl_T0(void) { T0 = bswap32(T0); } void op_mulb_AL_T0(void) { unsigned int res; res = (uint8_t)EAX * (uint8_t)T0; EAX = (EAX & 0xffff0000) | res; (env->cc_dst) = res; (env->cc_src) = (res & 0xff00); } void op_imulb_AL_T0(void) { int res; res = (int8_t)EAX * (int8_t)T0; EAX = (EAX & 0xffff0000) | (res & 0xffff); (env->cc_dst) = res; (env->cc_src) = (res != (int8_t)res); } void op_mulw_AX_T0(void) { unsigned int res; res = (uint16_t)EAX * (uint16_t)T0; EAX = (EAX & 0xffff0000) | (res & 0xffff); (env->regs[2]) = ((env->regs[2]) & 0xffff0000) | ((res >> 16) & 0xffff); (env->cc_dst) = res; (env->cc_src) = res >> 16; } void op_imulw_AX_T0(void) { int res; res = (int16_t)EAX * (int16_t)T0; EAX = (EAX & 0xffff0000) | (res & 0xffff); (env->regs[2]) = ((env->regs[2]) & 0xffff0000) | ((res >> 16) & 0xffff); (env->cc_dst) = res; (env->cc_src) = (res != (int16_t)res); } void op_mull_EAX_T0(void) { uint64_t res; res = (uint64_t)((uint32_t)EAX) * (uint64_t)((uint32_t)T0); EAX = res; (env->regs[2]) = res >> 32; (env->cc_dst) = res; (env->cc_src) = res >> 32; } void op_imull_EAX_T0(void) { int64_t res; res = (int64_t)((int32_t)EAX) * (int64_t)((int32_t)T0); EAX = res; (env->regs[2]) = res >> 32; (env->cc_dst) = res; (env->cc_src) = (res != (int32_t)res); } void op_imulw_T0_T1(void) { int res; res = (int16_t)T0 * (int16_t)T1; T0 = res; (env->cc_dst) = res; (env->cc_src) = (res != (int16_t)res); } void op_imull_T0_T1(void) { int64_t res; res = (int64_t)((int32_t)T0) * (int64_t)((int32_t)T1); T0 = res; (env->cc_dst) = res; (env->cc_src) = (res != (int32_t)res); } void op_divb_AL_T0(void) { unsigned int num, den, q, r; num = (EAX & 0xffff); den = (T0 & 0xff); if (den == 0) { (env->eip) = ((long)(&__op_param1)); raise_exception(0); } q = (num / den) & 0xff; r = (num % den) & 0xff; EAX = (EAX & 0xffff0000) | (r << 8) | q; } void op_idivb_AL_T0(void) { int num, den, q, r; num = (int16_t)EAX; den = (int8_t)T0; if (den == 0) { (env->eip) = ((long)(&__op_param1)); raise_exception(0); } q = (num / den) & 0xff; r = (num % den) & 0xff; EAX = (EAX & 0xffff0000) | (r << 8) | q; } void op_divw_AX_T0(void) { unsigned int num, den, q, r; num = (EAX & 0xffff) | (((env->regs[2]) & 0xffff) << 16); den = (T0 & 0xffff); if (den == 0) { (env->eip) = ((long)(&__op_param1)); raise_exception(0); } q = (num / den) & 0xffff; r = (num % den) & 0xffff; EAX = (EAX & 0xffff0000) | q; (env->regs[2]) = ((env->regs[2]) & 0xffff0000) | r; } void op_idivw_AX_T0(void) { int num, den, q, r; num = (EAX & 0xffff) | (((env->regs[2]) & 0xffff) << 16); den = (int16_t)T0; if (den == 0) { (env->eip) = ((long)(&__op_param1)); raise_exception(0); } q = (num / den) & 0xffff; r = (num % den) & 0xffff; EAX = (EAX & 0xffff0000) | q; (env->regs[2]) = ((env->regs[2]) & 0xffff0000) | r; } void op_divl_EAX_T0(void) { helper_divl_EAX_T0(((long)(&__op_param1))); } void op_idivl_EAX_T0(void) { helper_idivl_EAX_T0(((long)(&__op_param1))); } void op_movl_T0_im(void) { T0 = ((long)(&__op_param1)); } void op_addl_T0_im(void) { T0 += ((long)(&__op_param1)); } void op_andl_T0_ffff(void) { T0 = T0 & 0xffff; } void op_andl_T0_im(void) { T0 = T0 & ((long)(&__op_param1)); } void op_movl_T0_T1(void) { T0 = T1; } void op_movl_T1_im(void) { T1 = ((long)(&__op_param1)); } void op_addl_T1_im(void) { T1 += ((long)(&__op_param1)); } void op_movl_T1_A0(void) { T1 = T2; } void op_movl_A0_im(void) { T2 = ((long)(&__op_param1)); } void op_addl_A0_im(void) { T2 += ((long)(&__op_param1)); } void op_addl_A0_AL(void) { T2 += (EAX & 0xff); } void op_andl_A0_ffff(void) { T2 = T2 & 0xffff; } # 1 "/home/gebner/tmp/qemu/target-i386/ops_mem.h" 1 void op_ldub_raw_T0_A0(void) { T0 = ldub_raw((uint8_t *)T2); } void op_ldsb_raw_T0_A0(void) { T0 = ldsb_raw((int8_t *)T2); } void op_lduw_raw_T0_A0(void) { T0 = lduw_raw((uint8_t *)T2); } void op_ldsw_raw_T0_A0(void) { T0 = ldsw_raw((int8_t *)T2); } void op_ldl_raw_T0_A0(void) { T0 = ldl_raw((uint8_t *)T2); } void op_ldub_raw_T1_A0(void) { T1 = ldub_raw((uint8_t *)T2); } void op_ldsb_raw_T1_A0(void) { T1 = ldsb_raw((int8_t *)T2); } void op_lduw_raw_T1_A0(void) { T1 = lduw_raw((uint8_t *)T2); } void op_ldsw_raw_T1_A0(void) { T1 = ldsw_raw((int8_t *)T2); } void op_ldl_raw_T1_A0(void) { T1 = ldl_raw((uint8_t *)T2); } void op_stb_raw_T0_A0(void) { stb_raw((uint8_t *)T2, T0); } void op_stw_raw_T0_A0(void) { stw_raw((uint8_t *)T2, T0); } void op_stl_raw_T0_A0(void) { stl_raw((uint8_t *)T2, T0); } # 73 "/home/gebner/tmp/qemu/target-i386/ops_mem.h" void op_stw_raw_T1_A0(void) { stw_raw((uint8_t *)T2, T1); } void op_stl_raw_T1_A0(void) { stl_raw((uint8_t *)T2, T1); } # 401 "/home/gebner/tmp/qemu/target-i386/op.c" 2 # 412 "/home/gebner/tmp/qemu/target-i386/op.c" void op_add_bitw_A0_T1(void) { T2 += ((int16_t)T1 >> 4) << 1; } void op_add_bitl_A0_T1(void) { T2 += ((int32_t)T1 >> 5) << 2; } void op_jmp_T0(void) { (env->eip) = T0; } void op_jmp_im(void) { (env->eip) = ((long)(&__op_param1)); } void op_hlt(void) { env->exception_index = 257; cpu_loop_exit(); } void op_debug(void) { env->exception_index = 258; cpu_loop_exit(); } void op_raise_interrupt(void) { int intno; unsigned int next_eip; intno = ((long)(&__op_param1)); next_eip = ((long)(&__op_param2)); raise_interrupt(intno, 1, 0, next_eip); } void op_raise_exception(void) { int exception_index; exception_index = ((long)(&__op_param1)); raise_exception(exception_index); } void op_into(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); if (eflags & 0x0800) { raise_interrupt(4, 1, 0, ((long)(&__op_param1))); } asm volatile ("");; } void op_cli(void) { env->eflags &= ~0x00000200; } void op_sti(void) { env->eflags |= 0x00000200; } void op_set_inhibit_irq(void) { env->hflags |= (1 << 3); } void op_reset_inhibit_irq(void) { env->hflags &= ~(1 << 3); } # 510 "/home/gebner/tmp/qemu/target-i386/op.c" void op_boundw(void) { int low, high, v; low = ldsw_raw((uint8_t *)T2); high = ldsw_raw((uint8_t *)T2 + 2); v = (int16_t)T0; if (v < low || v > high) { (env->eip) = ((long)(&__op_param1)); raise_exception(5); } asm volatile ("");; } void op_boundl(void) { int low, high, v; low = ldl_raw((uint8_t *)T2); high = ldl_raw((uint8_t *)T2 + 4); v = T0; if (v < low || v > high) { (env->eip) = ((long)(&__op_param1)); raise_exception(5); } asm volatile ("");; } void op_cmpxchg8b(void) { helper_cmpxchg8b(); } void op_jmp(void) { do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); } void op_movl_T0_0(void) { T0 = 0; } void op_exit_tb(void) { asm volatile ("ret"); } # 1 "/home/gebner/tmp/qemu/target-i386/ops_template.h" 1 # 46 "/home/gebner/tmp/qemu/target-i386/ops_template.h" static int compute_all_addb(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_src); src2 = (env->cc_dst) - (env->cc_src); cf = (uint8_t)(env->cc_dst) < (uint8_t)src1; pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint8_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 0))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_addb(void) { int src1, cf; src1 = (env->cc_src); cf = (uint8_t)(env->cc_dst) < (uint8_t)src1; return cf; } static int compute_all_adcb(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_src); src2 = (env->cc_dst) - (env->cc_src) - 1; cf = (uint8_t)(env->cc_dst) <= (uint8_t)src1; pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint8_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 0))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_adcb(void) { int src1, cf; src1 = (env->cc_src); cf = (uint8_t)(env->cc_dst) <= (uint8_t)src1; return cf; } static int compute_all_subb(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); cf = (uint8_t)src1 < (uint8_t)src2; pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint8_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 0))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_subb(void) { int src1, src2, cf; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); cf = (uint8_t)src1 < (uint8_t)src2; return cf; } static int compute_all_sbbb(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_dst) + (env->cc_src) + 1; src2 = (env->cc_src); cf = (uint8_t)src1 <= (uint8_t)src2; pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint8_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 0))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_sbbb(void) { int src1, src2, cf; src1 = (env->cc_dst) + (env->cc_src) + 1; src2 = (env->cc_src); cf = (uint8_t)src1 <= (uint8_t)src2; return cf; } static int compute_all_logicb(void) { int cf, pf, af, zf, sf, of; cf = 0; pf = parity_table[(uint8_t)(env->cc_dst)]; af = 0; zf = ((uint8_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; of = 0; return cf | pf | af | zf | sf | of; } static int compute_c_logicb(void) { return 0; } static int compute_all_incb(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_dst) - 1; src2 = 1; cf = (env->cc_src); pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint8_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; of = (((env->cc_dst) & 0xff) == (1 << ((1 << (3 + 0)) - 1))) << 11; return cf | pf | af | zf | sf | of; } # 179 "/home/gebner/tmp/qemu/target-i386/ops_template.h" static int compute_all_decb(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_dst) + 1; src2 = 1; cf = (env->cc_src); pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint8_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; of = (((env->cc_dst) & 0xff) == ((uint32_t)(1 << ((1 << (3 + 0)) - 1)) - 1)) << 11; return cf | pf | af | zf | sf | of; } static int compute_all_shlb(void) { int cf, pf, af, zf, sf, of; cf = ((env->cc_src) >> ((1 << (3 + 0)) - 1)) & 0x0001; pf = parity_table[(uint8_t)(env->cc_dst)]; af = 0; zf = ((uint8_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 0))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_shlb(void) { return ((env->cc_src) >> ((1 << (3 + 0)) - 1)) & 0x0001; } # 219 "/home/gebner/tmp/qemu/target-i386/ops_template.h" static int compute_all_sarb(void) { int cf, pf, af, zf, sf, of; cf = (env->cc_src) & 1; pf = parity_table[(uint8_t)(env->cc_dst)]; af = 0; zf = ((uint8_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 0))) & 0x0800; return cf | pf | af | zf | sf | of; } # 243 "/home/gebner/tmp/qemu/target-i386/ops_template.h" static int compute_all_mulb(void) { int cf, pf, af, zf, sf, of; cf = ((env->cc_src) != 0); pf = parity_table[(uint8_t)(env->cc_dst)]; af = 0; zf = ((uint8_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; of = cf << 11; return cf | pf | af | zf | sf | of; } void op_jb_subb(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); if ((uint8_t)src1 < (uint8_t)src2) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jz_subb(void) { if ((uint8_t)(env->cc_dst) == 0) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jbe_subb(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); if ((uint8_t)src1 <= (uint8_t)src2) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_js_subb(void) { if ((env->cc_dst) & (1 << ((1 << (3 + 0)) - 1))) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jl_subb(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); if ((int8_t)src1 < (int8_t)src2) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jle_subb(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); if ((int8_t)src1 <= (int8_t)src2) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } # 384 "/home/gebner/tmp/qemu/target-i386/ops_template.h" void op_setb_T0_subb(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); T0 = ((uint8_t)src1 < (uint8_t)src2); } void op_setz_T0_subb(void) { T0 = ((uint8_t)(env->cc_dst) == 0); } void op_setbe_T0_subb(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); T0 = ((uint8_t)src1 <= (uint8_t)src2); } void op_sets_T0_subb(void) { T0 = lshift((env->cc_dst), -((1 << (3 + 0)) - 1)) & 1; } void op_setl_T0_subb(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); T0 = ((int8_t)src1 < (int8_t)src2); } void op_setle_T0_subb(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); T0 = ((int8_t)src1 <= (int8_t)src2); } void op_shlb_T0_T1(void) { int count; count = T1 & 0x1f; T0 = T0 << count; asm volatile ("");; } void op_shrb_T0_T1(void) { int count; count = T1 & 0x1f; T0 &= 0xff; T0 = T0 >> count; asm volatile ("");; } void op_sarb_T0_T1(void) { int count, src; count = T1 & 0x1f; src = (int8_t)T0; T0 = src >> count; asm volatile ("");; } # 1 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" 1 # 65 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" void op_rolb_T0_T1_cc(void) { int count, src; count = T1 & ((1 << (3 + 0)) - 1); if (count) { src = T0; T0 &= 0xff; T0 = (T0 << count) | (T0 >> ((1 << (3 + 0)) - count)); asm volatile("" : : "r" (T0)); (env->cc_src) = (cc_table[(env->cc_op)].compute_all() & ~(0x0800 | 0x0001)) | (lshift(src ^ T0, 11 - ((1 << (3 + 0)) - 1)) & 0x0800) | (T0 & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rorb_T0_T1_cc(void) { int count, src; count = T1 & ((1 << (3 + 0)) - 1); if (count) { src = T0; T0 &= 0xff; T0 = (T0 >> count) | (T0 << ((1 << (3 + 0)) - count)); asm volatile("" : : "r" (T0)); (env->cc_src) = (cc_table[(env->cc_op)].compute_all() & ~(0x0800 | 0x0001)) | (lshift(src ^ T0, 11 - ((1 << (3 + 0)) - 1)) & 0x0800) | ((T0 >> ((1 << (3 + 0)) - 1)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rolb_T0_T1(void) { int count; count = T1 & ((1 << (3 + 0)) - 1); if (count) { T0 &= 0xff; T0 = (T0 << count) | (T0 >> ((1 << (3 + 0)) - count)); } asm volatile ("");; } void op_rorb_T0_T1(void) { int count; count = T1 & ((1 << (3 + 0)) - 1); if (count) { T0 &= 0xff; T0 = (T0 >> count) | (T0 << ((1 << (3 + 0)) - count)); } asm volatile ("");; } void op_rclb_T0_T1_cc(void) { int count, res, eflags; unsigned int src; count = T1 & 0x1f; count = rclb_table[count]; if (count) { eflags = cc_table[(env->cc_op)].compute_all(); T0 &= 0xff; src = T0; res = (T0 << count) | ((eflags & 0x0001) << (count - 1)); if (count > 1) res |= T0 >> ((1 << (3 + 0)) + 1 - count); T0 = res; (env->cc_src) = (eflags & ~(0x0001 | 0x0800)) | (lshift(src ^ T0, 11 - ((1 << (3 + 0)) - 1)) & 0x0800) | ((src >> ((1 << (3 + 0)) - count)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rcrb_T0_T1_cc(void) { int count, res, eflags; unsigned int src; count = T1 & 0x1f; count = rclb_table[count]; if (count) { eflags = cc_table[(env->cc_op)].compute_all(); T0 &= 0xff; src = T0; res = (T0 >> count) | ((eflags & 0x0001) << ((1 << (3 + 0)) - count)); if (count > 1) res |= T0 << ((1 << (3 + 0)) + 1 - count); T0 = res; (env->cc_src) = (eflags & ~(0x0001 | 0x0800)) | (lshift(src ^ T0, 11 - ((1 << (3 + 0)) - 1)) & 0x0800) | ((src >> (count - 1)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_shlb_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { src = (uint8_t)T0 << (count - 1); T0 = T0 << count; (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SHLB + 0; } asm volatile ("");; } void op_shrb_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { T0 &= 0xff; src = T0 >> (count - 1); T0 = T0 >> count; (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 0; } asm volatile ("");; } void op_sarb_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { src = (int8_t)T0; T0 = src >> count; src = src >> (count - 1); (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 0; } asm volatile ("");; } # 411 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" void op_adcb_T0_T1_cc(void) { int cf; cf = cc_table[(env->cc_op)].compute_c(); T0 = T0 + T1 + cf; (env->cc_src) = T1; (env->cc_dst) = T0; (env->cc_op) = CC_OP_ADDB + 0 + cf * 3; } void op_sbbb_T0_T1_cc(void) { int cf; cf = cc_table[(env->cc_op)].compute_c(); T0 = T0 - T1 - cf; (env->cc_src) = T1; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SUBB + 0 + cf * 3; } void op_cmpxchgb_T0_T1_EAX_cc(void) { unsigned int src, dst; src = T0; dst = EAX - T0; if ((uint8_t)dst == 0) { T0 = T1; } else { EAX = (EAX & ~0xff) | (T0 & 0xff); } (env->cc_src) = src; (env->cc_dst) = dst; asm volatile ("");; } # 460 "/home/gebner/tmp/qemu/target-i386/ops_template.h" 2 # 1 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" 1 # 65 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" void op_rolb_raw_T0_T1_cc(void) { int count, src; count = T1 & ((1 << (3 + 0)) - 1); if (count) { src = T0; T0 &= 0xff; T0 = (T0 << count) | (T0 >> ((1 << (3 + 0)) - count)); stb_raw((uint8_t *)T2, T0); (env->cc_src) = (cc_table[(env->cc_op)].compute_all() & ~(0x0800 | 0x0001)) | (lshift(src ^ T0, 11 - ((1 << (3 + 0)) - 1)) & 0x0800) | (T0 & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rorb_raw_T0_T1_cc(void) { int count, src; count = T1 & ((1 << (3 + 0)) - 1); if (count) { src = T0; T0 &= 0xff; T0 = (T0 >> count) | (T0 << ((1 << (3 + 0)) - count)); stb_raw((uint8_t *)T2, T0); (env->cc_src) = (cc_table[(env->cc_op)].compute_all() & ~(0x0800 | 0x0001)) | (lshift(src ^ T0, 11 - ((1 << (3 + 0)) - 1)) & 0x0800) | ((T0 >> ((1 << (3 + 0)) - 1)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rolb_raw_T0_T1(void) { int count; count = T1 & ((1 << (3 + 0)) - 1); if (count) { T0 &= 0xff; T0 = (T0 << count) | (T0 >> ((1 << (3 + 0)) - count)); stb_raw((uint8_t *)T2, T0); } asm volatile ("");; } void op_rorb_raw_T0_T1(void) { int count; count = T1 & ((1 << (3 + 0)) - 1); if (count) { T0 &= 0xff; T0 = (T0 >> count) | (T0 << ((1 << (3 + 0)) - count)); stb_raw((uint8_t *)T2, T0); } asm volatile ("");; } void op_rclb_raw_T0_T1_cc(void) { int count, res, eflags; unsigned int src; count = T1 & 0x1f; count = rclb_table[count]; if (count) { eflags = cc_table[(env->cc_op)].compute_all(); T0 &= 0xff; src = T0; res = (T0 << count) | ((eflags & 0x0001) << (count - 1)); if (count > 1) res |= T0 >> ((1 << (3 + 0)) + 1 - count); T0 = res; stb_raw((uint8_t *)T2, T0); (env->cc_src) = (eflags & ~(0x0001 | 0x0800)) | (lshift(src ^ T0, 11 - ((1 << (3 + 0)) - 1)) & 0x0800) | ((src >> ((1 << (3 + 0)) - count)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rcrb_raw_T0_T1_cc(void) { int count, res, eflags; unsigned int src; count = T1 & 0x1f; count = rclb_table[count]; if (count) { eflags = cc_table[(env->cc_op)].compute_all(); T0 &= 0xff; src = T0; res = (T0 >> count) | ((eflags & 0x0001) << ((1 << (3 + 0)) - count)); if (count > 1) res |= T0 << ((1 << (3 + 0)) + 1 - count); T0 = res; stb_raw((uint8_t *)T2, T0); (env->cc_src) = (eflags & ~(0x0001 | 0x0800)) | (lshift(src ^ T0, 11 - ((1 << (3 + 0)) - 1)) & 0x0800) | ((src >> (count - 1)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_shlb_raw_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { src = (uint8_t)T0 << (count - 1); T0 = T0 << count; stb_raw((uint8_t *)T2, T0); (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SHLB + 0; } asm volatile ("");; } void op_shrb_raw_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { T0 &= 0xff; src = T0 >> (count - 1); T0 = T0 >> count; stb_raw((uint8_t *)T2, T0); (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 0; } asm volatile ("");; } void op_sarb_raw_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { src = (int8_t)T0; T0 = src >> count; src = src >> (count - 1); stb_raw((uint8_t *)T2, T0); (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 0; } asm volatile ("");; } # 411 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" void op_adcb_raw_T0_T1_cc(void) { int cf; cf = cc_table[(env->cc_op)].compute_c(); T0 = T0 + T1 + cf; stb_raw((uint8_t *)T2, T0); (env->cc_src) = T1; (env->cc_dst) = T0; (env->cc_op) = CC_OP_ADDB + 0 + cf * 3; } void op_sbbb_raw_T0_T1_cc(void) { int cf; cf = cc_table[(env->cc_op)].compute_c(); T0 = T0 - T1 - cf; stb_raw((uint8_t *)T2, T0); (env->cc_src) = T1; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SUBB + 0 + cf * 3; } void op_cmpxchgb_raw_T0_T1_EAX_cc(void) { unsigned int src, dst; src = T0; dst = EAX - T0; if ((uint8_t)dst == 0) { T0 = T1; stb_raw((uint8_t *)T2, T0); } else { EAX = (EAX & ~0xff) | (T0 & 0xff); } (env->cc_src) = src; (env->cc_dst) = dst; asm volatile ("");; } # 463 "/home/gebner/tmp/qemu/target-i386/ops_template.h" 2 # 553 "/home/gebner/tmp/qemu/target-i386/ops_template.h" void op_movl_T0_Dshiftb(void) { T0 = (env->df) << 0; } void op_string_jz_subb(void) { if ((uint8_t)(env->cc_dst) == 0) do { goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[3 - 2]);} while (0); asm volatile ("");; } void op_string_jnz_subb(void) { if ((uint8_t)(env->cc_dst) != 0) do { goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[3 - 2]);} while (0); asm volatile ("");; } void op_string_jz_subb_im(void) { if ((uint8_t)(env->cc_dst) == 0) { (env->eip) = ((long)(&__op_param1)); if (env->eflags & 0x00000100) { raise_exception(1); } T0 = 0; asm volatile ("ret"); } asm volatile ("");; } void op_string_jnz_subb_im(void) { if ((uint8_t)(env->cc_dst) != 0) { (env->eip) = ((long)(&__op_param1)); if (env->eflags & 0x00000100) { raise_exception(1); } T0 = 0; asm volatile ("ret"); } asm volatile ("");; } # 622 "/home/gebner/tmp/qemu/target-i386/ops_template.h" void op_outb_T0_T1(void) { cpu_outb(env, T0, T1 & 0xff); } void op_inb_T0_T1(void) { T1 = cpu_inb(env, T0); } void op_inb_DX_T0(void) { T0 = cpu_inb(env, (env->regs[2]) & 0xffff); } void op_outb_DX_T0(void) { cpu_outb(env, (env->regs[2]) & 0xffff, T0); } void op_check_iob_T0(void) { check_iob_T0(); } void op_check_iob_DX(void) { check_iob_DX(); } # 562 "/home/gebner/tmp/qemu/target-i386/op.c" 2 # 1 "/home/gebner/tmp/qemu/target-i386/ops_template.h" 1 # 46 "/home/gebner/tmp/qemu/target-i386/ops_template.h" static int compute_all_addw(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_src); src2 = (env->cc_dst) - (env->cc_src); cf = (uint16_t)(env->cc_dst) < (uint16_t)src1; pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint16_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 1))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_addw(void) { int src1, cf; src1 = (env->cc_src); cf = (uint16_t)(env->cc_dst) < (uint16_t)src1; return cf; } static int compute_all_adcw(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_src); src2 = (env->cc_dst) - (env->cc_src) - 1; cf = (uint16_t)(env->cc_dst) <= (uint16_t)src1; pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint16_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 1))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_adcw(void) { int src1, cf; src1 = (env->cc_src); cf = (uint16_t)(env->cc_dst) <= (uint16_t)src1; return cf; } static int compute_all_subw(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); cf = (uint16_t)src1 < (uint16_t)src2; pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint16_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 1))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_subw(void) { int src1, src2, cf; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); cf = (uint16_t)src1 < (uint16_t)src2; return cf; } static int compute_all_sbbw(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_dst) + (env->cc_src) + 1; src2 = (env->cc_src); cf = (uint16_t)src1 <= (uint16_t)src2; pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint16_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 1))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_sbbw(void) { int src1, src2, cf; src1 = (env->cc_dst) + (env->cc_src) + 1; src2 = (env->cc_src); cf = (uint16_t)src1 <= (uint16_t)src2; return cf; } static int compute_all_logicw(void) { int cf, pf, af, zf, sf, of; cf = 0; pf = parity_table[(uint8_t)(env->cc_dst)]; af = 0; zf = ((uint16_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; of = 0; return cf | pf | af | zf | sf | of; } static int compute_c_logicw(void) { return 0; } static int compute_all_incw(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_dst) - 1; src2 = 1; cf = (env->cc_src); pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint16_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; of = (((env->cc_dst) & 0xffff) == (1 << ((1 << (3 + 1)) - 1))) << 11; return cf | pf | af | zf | sf | of; } # 179 "/home/gebner/tmp/qemu/target-i386/ops_template.h" static int compute_all_decw(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_dst) + 1; src2 = 1; cf = (env->cc_src); pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint16_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; of = (((env->cc_dst) & 0xffff) == ((uint32_t)(1 << ((1 << (3 + 1)) - 1)) - 1)) << 11; return cf | pf | af | zf | sf | of; } static int compute_all_shlw(void) { int cf, pf, af, zf, sf, of; cf = ((env->cc_src) >> ((1 << (3 + 1)) - 1)) & 0x0001; pf = parity_table[(uint8_t)(env->cc_dst)]; af = 0; zf = ((uint16_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 1))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_shlw(void) { return ((env->cc_src) >> ((1 << (3 + 1)) - 1)) & 0x0001; } # 219 "/home/gebner/tmp/qemu/target-i386/ops_template.h" static int compute_all_sarw(void) { int cf, pf, af, zf, sf, of; cf = (env->cc_src) & 1; pf = parity_table[(uint8_t)(env->cc_dst)]; af = 0; zf = ((uint16_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 1))) & 0x0800; return cf | pf | af | zf | sf | of; } # 243 "/home/gebner/tmp/qemu/target-i386/ops_template.h" static int compute_all_mulw(void) { int cf, pf, af, zf, sf, of; cf = ((env->cc_src) != 0); pf = parity_table[(uint8_t)(env->cc_dst)]; af = 0; zf = ((uint16_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; of = cf << 11; return cf | pf | af | zf | sf | of; } void op_jb_subw(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); if ((uint16_t)src1 < (uint16_t)src2) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jz_subw(void) { if ((uint16_t)(env->cc_dst) == 0) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jbe_subw(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); if ((uint16_t)src1 <= (uint16_t)src2) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_js_subw(void) { if ((env->cc_dst) & (1 << ((1 << (3 + 1)) - 1))) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jl_subw(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); if ((int16_t)src1 < (int16_t)src2) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jle_subw(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); if ((int16_t)src1 <= (int16_t)src2) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_loopnzw(void) { unsigned int tmp; int eflags; eflags = cc_table[(env->cc_op)].compute_all(); tmp = ((env->regs[1]) - 1) & 0xffff; (env->regs[1]) = ((env->regs[1]) & ~0xffff) | tmp; if (tmp != 0 && !(eflags & 0x0040)) (env->eip) = ((long)(&__op_param1)); else (env->eip) = ((long)(&__op_param2)); asm volatile ("");; } void op_loopzw(void) { unsigned int tmp; int eflags; eflags = cc_table[(env->cc_op)].compute_all(); tmp = ((env->regs[1]) - 1) & 0xffff; (env->regs[1]) = ((env->regs[1]) & ~0xffff) | tmp; if (tmp != 0 && (eflags & 0x0040)) (env->eip) = ((long)(&__op_param1)); else (env->eip) = ((long)(&__op_param2)); asm volatile ("");; } void op_loopw(void) { unsigned int tmp; tmp = ((env->regs[1]) - 1) & 0xffff; (env->regs[1]) = ((env->regs[1]) & ~0xffff) | tmp; if (tmp != 0) (env->eip) = ((long)(&__op_param1)); else (env->eip) = ((long)(&__op_param2)); asm volatile ("");; } void op_jecxzw(void) { if ((uint16_t)(env->regs[1]) == 0) (env->eip) = ((long)(&__op_param1)); else (env->eip) = ((long)(&__op_param2)); asm volatile ("");; } void op_setb_T0_subw(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); T0 = ((uint16_t)src1 < (uint16_t)src2); } void op_setz_T0_subw(void) { T0 = ((uint16_t)(env->cc_dst) == 0); } void op_setbe_T0_subw(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); T0 = ((uint16_t)src1 <= (uint16_t)src2); } void op_sets_T0_subw(void) { T0 = lshift((env->cc_dst), -((1 << (3 + 1)) - 1)) & 1; } void op_setl_T0_subw(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); T0 = ((int16_t)src1 < (int16_t)src2); } void op_setle_T0_subw(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); T0 = ((int16_t)src1 <= (int16_t)src2); } void op_shlw_T0_T1(void) { int count; count = T1 & 0x1f; T0 = T0 << count; asm volatile ("");; } void op_shrw_T0_T1(void) { int count; count = T1 & 0x1f; T0 &= 0xffff; T0 = T0 >> count; asm volatile ("");; } void op_sarw_T0_T1(void) { int count, src; count = T1 & 0x1f; src = (int16_t)T0; T0 = src >> count; asm volatile ("");; } # 1 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" 1 # 65 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" void op_rolw_T0_T1_cc(void) { int count, src; count = T1 & ((1 << (3 + 1)) - 1); if (count) { src = T0; T0 &= 0xffff; T0 = (T0 << count) | (T0 >> ((1 << (3 + 1)) - count)); asm volatile("" : : "r" (T0)); (env->cc_src) = (cc_table[(env->cc_op)].compute_all() & ~(0x0800 | 0x0001)) | (lshift(src ^ T0, 11 - ((1 << (3 + 1)) - 1)) & 0x0800) | (T0 & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rorw_T0_T1_cc(void) { int count, src; count = T1 & ((1 << (3 + 1)) - 1); if (count) { src = T0; T0 &= 0xffff; T0 = (T0 >> count) | (T0 << ((1 << (3 + 1)) - count)); asm volatile("" : : "r" (T0)); (env->cc_src) = (cc_table[(env->cc_op)].compute_all() & ~(0x0800 | 0x0001)) | (lshift(src ^ T0, 11 - ((1 << (3 + 1)) - 1)) & 0x0800) | ((T0 >> ((1 << (3 + 1)) - 1)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rolw_T0_T1(void) { int count; count = T1 & ((1 << (3 + 1)) - 1); if (count) { T0 &= 0xffff; T0 = (T0 << count) | (T0 >> ((1 << (3 + 1)) - count)); } asm volatile ("");; } void op_rorw_T0_T1(void) { int count; count = T1 & ((1 << (3 + 1)) - 1); if (count) { T0 &= 0xffff; T0 = (T0 >> count) | (T0 << ((1 << (3 + 1)) - count)); } asm volatile ("");; } void op_rclw_T0_T1_cc(void) { int count, res, eflags; unsigned int src; count = T1 & 0x1f; count = rclw_table[count]; if (count) { eflags = cc_table[(env->cc_op)].compute_all(); T0 &= 0xffff; src = T0; res = (T0 << count) | ((eflags & 0x0001) << (count - 1)); if (count > 1) res |= T0 >> ((1 << (3 + 1)) + 1 - count); T0 = res; (env->cc_src) = (eflags & ~(0x0001 | 0x0800)) | (lshift(src ^ T0, 11 - ((1 << (3 + 1)) - 1)) & 0x0800) | ((src >> ((1 << (3 + 1)) - count)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rcrw_T0_T1_cc(void) { int count, res, eflags; unsigned int src; count = T1 & 0x1f; count = rclw_table[count]; if (count) { eflags = cc_table[(env->cc_op)].compute_all(); T0 &= 0xffff; src = T0; res = (T0 >> count) | ((eflags & 0x0001) << ((1 << (3 + 1)) - count)); if (count > 1) res |= T0 << ((1 << (3 + 1)) + 1 - count); T0 = res; (env->cc_src) = (eflags & ~(0x0001 | 0x0800)) | (lshift(src ^ T0, 11 - ((1 << (3 + 1)) - 1)) & 0x0800) | ((src >> (count - 1)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_shlw_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { src = (uint16_t)T0 << (count - 1); T0 = T0 << count; (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SHLB + 1; } asm volatile ("");; } void op_shrw_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { T0 &= 0xffff; src = T0 >> (count - 1); T0 = T0 >> count; (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 1; } asm volatile ("");; } void op_sarw_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { src = (int16_t)T0; T0 = src >> count; src = src >> (count - 1); (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 1; } asm volatile ("");; } void op_shldw_T0_T1_im_cc(void) { int count; unsigned int res, tmp; count = ((long)(&__op_param1)); T1 &= 0xffff; res = T1 | (T0 << 16); tmp = res >> (32 - count); res <<= count; if (count > 16) res |= T1 << (count - 16); T0 = res >> 16; (env->cc_src) = tmp; (env->cc_dst) = T0; } void op_shldw_T0_T1_ECX_cc(void) { int count; unsigned int res, tmp; count = (env->regs[1]) & 0x1f; if (count) { T1 &= 0xffff; res = T1 | (T0 << 16); tmp = res >> (32 - count); res <<= count; if (count > 16) res |= T1 << (count - 16); T0 = res >> 16; (env->cc_src) = tmp; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 1; } asm volatile ("");; } void op_shrdw_T0_T1_im_cc(void) { int count; unsigned int res, tmp; count = ((long)(&__op_param1)); res = (T0 & 0xffff) | (T1 << 16); tmp = res >> (count - 1); res >>= count; if (count > 16) res |= T1 << (32 - count); T0 = res; (env->cc_src) = tmp; (env->cc_dst) = T0; } void op_shrdw_T0_T1_ECX_cc(void) { int count; unsigned int res, tmp; count = (env->regs[1]) & 0x1f; if (count) { res = (T0 & 0xffff) | (T1 << 16); tmp = res >> (count - 1); res >>= count; if (count > 16) res |= T1 << (32 - count); T0 = res; (env->cc_src) = tmp; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 1; } asm volatile ("");; } # 411 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" void op_adcw_T0_T1_cc(void) { int cf; cf = cc_table[(env->cc_op)].compute_c(); T0 = T0 + T1 + cf; (env->cc_src) = T1; (env->cc_dst) = T0; (env->cc_op) = CC_OP_ADDB + 1 + cf * 3; } void op_sbbw_T0_T1_cc(void) { int cf; cf = cc_table[(env->cc_op)].compute_c(); T0 = T0 - T1 - cf; (env->cc_src) = T1; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SUBB + 1 + cf * 3; } void op_cmpxchgw_T0_T1_EAX_cc(void) { unsigned int src, dst; src = T0; dst = EAX - T0; if ((uint16_t)dst == 0) { T0 = T1; } else { EAX = (EAX & ~0xffff) | (T0 & 0xffff); } (env->cc_src) = src; (env->cc_dst) = dst; asm volatile ("");; } # 460 "/home/gebner/tmp/qemu/target-i386/ops_template.h" 2 # 1 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" 1 # 65 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" void op_rolw_raw_T0_T1_cc(void) { int count, src; count = T1 & ((1 << (3 + 1)) - 1); if (count) { src = T0; T0 &= 0xffff; T0 = (T0 << count) | (T0 >> ((1 << (3 + 1)) - count)); stw_raw((uint8_t *)T2, T0); (env->cc_src) = (cc_table[(env->cc_op)].compute_all() & ~(0x0800 | 0x0001)) | (lshift(src ^ T0, 11 - ((1 << (3 + 1)) - 1)) & 0x0800) | (T0 & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rorw_raw_T0_T1_cc(void) { int count, src; count = T1 & ((1 << (3 + 1)) - 1); if (count) { src = T0; T0 &= 0xffff; T0 = (T0 >> count) | (T0 << ((1 << (3 + 1)) - count)); stw_raw((uint8_t *)T2, T0); (env->cc_src) = (cc_table[(env->cc_op)].compute_all() & ~(0x0800 | 0x0001)) | (lshift(src ^ T0, 11 - ((1 << (3 + 1)) - 1)) & 0x0800) | ((T0 >> ((1 << (3 + 1)) - 1)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rolw_raw_T0_T1(void) { int count; count = T1 & ((1 << (3 + 1)) - 1); if (count) { T0 &= 0xffff; T0 = (T0 << count) | (T0 >> ((1 << (3 + 1)) - count)); stw_raw((uint8_t *)T2, T0); } asm volatile ("");; } void op_rorw_raw_T0_T1(void) { int count; count = T1 & ((1 << (3 + 1)) - 1); if (count) { T0 &= 0xffff; T0 = (T0 >> count) | (T0 << ((1 << (3 + 1)) - count)); stw_raw((uint8_t *)T2, T0); } asm volatile ("");; } void op_rclw_raw_T0_T1_cc(void) { int count, res, eflags; unsigned int src; count = T1 & 0x1f; count = rclw_table[count]; if (count) { eflags = cc_table[(env->cc_op)].compute_all(); T0 &= 0xffff; src = T0; res = (T0 << count) | ((eflags & 0x0001) << (count - 1)); if (count > 1) res |= T0 >> ((1 << (3 + 1)) + 1 - count); T0 = res; stw_raw((uint8_t *)T2, T0); (env->cc_src) = (eflags & ~(0x0001 | 0x0800)) | (lshift(src ^ T0, 11 - ((1 << (3 + 1)) - 1)) & 0x0800) | ((src >> ((1 << (3 + 1)) - count)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rcrw_raw_T0_T1_cc(void) { int count, res, eflags; unsigned int src; count = T1 & 0x1f; count = rclw_table[count]; if (count) { eflags = cc_table[(env->cc_op)].compute_all(); T0 &= 0xffff; src = T0; res = (T0 >> count) | ((eflags & 0x0001) << ((1 << (3 + 1)) - count)); if (count > 1) res |= T0 << ((1 << (3 + 1)) + 1 - count); T0 = res; stw_raw((uint8_t *)T2, T0); (env->cc_src) = (eflags & ~(0x0001 | 0x0800)) | (lshift(src ^ T0, 11 - ((1 << (3 + 1)) - 1)) & 0x0800) | ((src >> (count - 1)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_shlw_raw_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { src = (uint16_t)T0 << (count - 1); T0 = T0 << count; stw_raw((uint8_t *)T2, T0); (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SHLB + 1; } asm volatile ("");; } void op_shrw_raw_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { T0 &= 0xffff; src = T0 >> (count - 1); T0 = T0 >> count; stw_raw((uint8_t *)T2, T0); (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 1; } asm volatile ("");; } void op_sarw_raw_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { src = (int16_t)T0; T0 = src >> count; src = src >> (count - 1); stw_raw((uint8_t *)T2, T0); (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 1; } asm volatile ("");; } void op_shldw_raw_T0_T1_im_cc(void) { int count; unsigned int res, tmp; count = ((long)(&__op_param1)); T1 &= 0xffff; res = T1 | (T0 << 16); tmp = res >> (32 - count); res <<= count; if (count > 16) res |= T1 << (count - 16); T0 = res >> 16; stw_raw((uint8_t *)T2, T0); (env->cc_src) = tmp; (env->cc_dst) = T0; } void op_shldw_raw_T0_T1_ECX_cc(void) { int count; unsigned int res, tmp; count = (env->regs[1]) & 0x1f; if (count) { T1 &= 0xffff; res = T1 | (T0 << 16); tmp = res >> (32 - count); res <<= count; if (count > 16) res |= T1 << (count - 16); T0 = res >> 16; stw_raw((uint8_t *)T2, T0); (env->cc_src) = tmp; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 1; } asm volatile ("");; } void op_shrdw_raw_T0_T1_im_cc(void) { int count; unsigned int res, tmp; count = ((long)(&__op_param1)); res = (T0 & 0xffff) | (T1 << 16); tmp = res >> (count - 1); res >>= count; if (count > 16) res |= T1 << (32 - count); T0 = res; stw_raw((uint8_t *)T2, T0); (env->cc_src) = tmp; (env->cc_dst) = T0; } void op_shrdw_raw_T0_T1_ECX_cc(void) { int count; unsigned int res, tmp; count = (env->regs[1]) & 0x1f; if (count) { res = (T0 & 0xffff) | (T1 << 16); tmp = res >> (count - 1); res >>= count; if (count > 16) res |= T1 << (32 - count); T0 = res; stw_raw((uint8_t *)T2, T0); (env->cc_src) = tmp; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 1; } asm volatile ("");; } # 411 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" void op_adcw_raw_T0_T1_cc(void) { int cf; cf = cc_table[(env->cc_op)].compute_c(); T0 = T0 + T1 + cf; stw_raw((uint8_t *)T2, T0); (env->cc_src) = T1; (env->cc_dst) = T0; (env->cc_op) = CC_OP_ADDB + 1 + cf * 3; } void op_sbbw_raw_T0_T1_cc(void) { int cf; cf = cc_table[(env->cc_op)].compute_c(); T0 = T0 - T1 - cf; stw_raw((uint8_t *)T2, T0); (env->cc_src) = T1; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SUBB + 1 + cf * 3; } void op_cmpxchgw_raw_T0_T1_EAX_cc(void) { unsigned int src, dst; src = T0; dst = EAX - T0; if ((uint16_t)dst == 0) { T0 = T1; stw_raw((uint8_t *)T2, T0); } else { EAX = (EAX & ~0xffff) | (T0 & 0xffff); } (env->cc_src) = src; (env->cc_dst) = dst; asm volatile ("");; } # 463 "/home/gebner/tmp/qemu/target-i386/ops_template.h" 2 # 475 "/home/gebner/tmp/qemu/target-i386/ops_template.h" void op_btw_T0_T1_cc(void) { int count; count = T1 & ((1 << (3 + 1)) - 1); (env->cc_src) = T0 >> count; } void op_btsw_T0_T1_cc(void) { int count; count = T1 & ((1 << (3 + 1)) - 1); T1 = T0 >> count; T0 |= (1 << count); } void op_btrw_T0_T1_cc(void) { int count; count = T1 & ((1 << (3 + 1)) - 1); T1 = T0 >> count; T0 &= ~(1 << count); } void op_btcw_T0_T1_cc(void) { int count; count = T1 & ((1 << (3 + 1)) - 1); T1 = T0 >> count; T0 ^= (1 << count); } void op_bsfw_T0_cc(void) { int res, count; res = T0 & 0xffff; if (res != 0) { count = 0; while ((res & 1) == 0) { count++; res >>= 1; } T1 = count; (env->cc_dst) = 1; } else { (env->cc_dst) = 0; } asm volatile ("");; } void op_bsrw_T0_cc(void) { int res, count; res = T0 & 0xffff; if (res != 0) { count = (1 << (3 + 1)) - 1; while ((res & (1 << ((1 << (3 + 1)) - 1))) == 0) { count--; res <<= 1; } T1 = count; (env->cc_dst) = 1; } else { (env->cc_dst) = 0; } asm volatile ("");; } # 553 "/home/gebner/tmp/qemu/target-i386/ops_template.h" void op_movl_T0_Dshiftw(void) { T0 = (env->df) << 1; } void op_string_jz_subw(void) { if ((uint16_t)(env->cc_dst) == 0) do { goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[3 - 2]);} while (0); asm volatile ("");; } void op_string_jnz_subw(void) { if ((uint16_t)(env->cc_dst) != 0) do { goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[3 - 2]);} while (0); asm volatile ("");; } void op_string_jz_subw_im(void) { if ((uint16_t)(env->cc_dst) == 0) { (env->eip) = ((long)(&__op_param1)); if (env->eflags & 0x00000100) { raise_exception(1); } T0 = 0; asm volatile ("ret"); } asm volatile ("");; } void op_string_jnz_subw_im(void) { if ((uint16_t)(env->cc_dst) != 0) { (env->eip) = ((long)(&__op_param1)); if (env->eflags & 0x00000100) { raise_exception(1); } T0 = 0; asm volatile ("ret"); } asm volatile ("");; } void op_jz_ecxw(void) { if ((uint16_t)(env->regs[1]) == 0) do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param2));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jz_ecxw_im(void) { if ((uint16_t)(env->regs[1]) == 0) { (env->eip) = ((long)(&__op_param1)); if (env->eflags & 0x00000100) { raise_exception(1); } T0 = 0; asm volatile ("ret"); } asm volatile ("");; } void op_outw_T0_T1(void) { cpu_outw(env, T0, T1 & 0xffff); } void op_inw_T0_T1(void) { T1 = cpu_inw(env, T0); } void op_inw_DX_T0(void) { T0 = cpu_inw(env, (env->regs[2]) & 0xffff); } void op_outw_DX_T0(void) { cpu_outw(env, (env->regs[2]) & 0xffff, T0); } void op_check_iow_T0(void) { check_iow_T0(); } void op_check_iow_DX(void) { check_iow_DX(); } # 566 "/home/gebner/tmp/qemu/target-i386/op.c" 2 # 1 "/home/gebner/tmp/qemu/target-i386/ops_template.h" 1 # 46 "/home/gebner/tmp/qemu/target-i386/ops_template.h" static int compute_all_addl(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_src); src2 = (env->cc_dst) - (env->cc_src); cf = (uint32_t)(env->cc_dst) < (uint32_t)src1; pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint32_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 2))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_addl(void) { int src1, cf; src1 = (env->cc_src); cf = (uint32_t)(env->cc_dst) < (uint32_t)src1; return cf; } static int compute_all_adcl(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_src); src2 = (env->cc_dst) - (env->cc_src) - 1; cf = (uint32_t)(env->cc_dst) <= (uint32_t)src1; pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint32_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 2))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_adcl(void) { int src1, cf; src1 = (env->cc_src); cf = (uint32_t)(env->cc_dst) <= (uint32_t)src1; return cf; } static int compute_all_subl(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); cf = (uint32_t)src1 < (uint32_t)src2; pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint32_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 2))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_subl(void) { int src1, src2, cf; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); cf = (uint32_t)src1 < (uint32_t)src2; return cf; } static int compute_all_sbbl(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_dst) + (env->cc_src) + 1; src2 = (env->cc_src); cf = (uint32_t)src1 <= (uint32_t)src2; pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint32_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 2))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_sbbl(void) { int src1, src2, cf; src1 = (env->cc_dst) + (env->cc_src) + 1; src2 = (env->cc_src); cf = (uint32_t)src1 <= (uint32_t)src2; return cf; } static int compute_all_logicl(void) { int cf, pf, af, zf, sf, of; cf = 0; pf = parity_table[(uint8_t)(env->cc_dst)]; af = 0; zf = ((uint32_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; of = 0; return cf | pf | af | zf | sf | of; } static int compute_c_logicl(void) { return 0; } static int compute_all_incl(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_dst) - 1; src2 = 1; cf = (env->cc_src); pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint32_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; of = (((env->cc_dst) & 0xffffffff) == (1 << ((1 << (3 + 2)) - 1))) << 11; return cf | pf | af | zf | sf | of; } static int compute_c_incl(void) { return (env->cc_src); } static int compute_all_decl(void) { int cf, pf, af, zf, sf, of; int src1, src2; src1 = (env->cc_dst) + 1; src2 = 1; cf = (env->cc_src); pf = parity_table[(uint8_t)(env->cc_dst)]; af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; zf = ((uint32_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; of = (((env->cc_dst) & 0xffffffff) == ((uint32_t)(1 << ((1 << (3 + 2)) - 1)) - 1)) << 11; return cf | pf | af | zf | sf | of; } static int compute_all_shll(void) { int cf, pf, af, zf, sf, of; cf = ((env->cc_src) >> ((1 << (3 + 2)) - 1)) & 0x0001; pf = parity_table[(uint8_t)(env->cc_dst)]; af = 0; zf = ((uint32_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 2))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_shll(void) { return ((env->cc_src) >> ((1 << (3 + 2)) - 1)) & 0x0001; } static int compute_c_sarl(void) { return (env->cc_src) & 1; } static int compute_all_sarl(void) { int cf, pf, af, zf, sf, of; cf = (env->cc_src) & 1; pf = parity_table[(uint8_t)(env->cc_dst)]; af = 0; zf = ((uint32_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 2))) & 0x0800; return cf | pf | af | zf | sf | of; } static int compute_c_mull(void) { int cf; cf = ((env->cc_src) != 0); return cf; } static int compute_all_mull(void) { int cf, pf, af, zf, sf, of; cf = ((env->cc_src) != 0); pf = parity_table[(uint8_t)(env->cc_dst)]; af = 0; zf = ((uint32_t)(env->cc_dst) == 0) << 6; sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; of = cf << 11; return cf | pf | af | zf | sf | of; } void op_jb_subl(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); if ((uint32_t)src1 < (uint32_t)src2) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jz_subl(void) { if ((uint32_t)(env->cc_dst) == 0) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jbe_subl(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); if ((uint32_t)src1 <= (uint32_t)src2) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_js_subl(void) { if ((env->cc_dst) & (1 << ((1 << (3 + 2)) - 1))) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jl_subl(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); if ((int32_t)src1 < (int32_t)src2) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jle_subl(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); if ((int32_t)src1 <= (int32_t)src2) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_loopnzl(void) { unsigned int tmp; int eflags; eflags = cc_table[(env->cc_op)].compute_all(); tmp = ((env->regs[1]) - 1) & 0xffffffff; (env->regs[1]) = ((env->regs[1]) & ~0xffffffff) | tmp; if (tmp != 0 && !(eflags & 0x0040)) (env->eip) = ((long)(&__op_param1)); else (env->eip) = ((long)(&__op_param2)); asm volatile ("");; } void op_loopzl(void) { unsigned int tmp; int eflags; eflags = cc_table[(env->cc_op)].compute_all(); tmp = ((env->regs[1]) - 1) & 0xffffffff; (env->regs[1]) = ((env->regs[1]) & ~0xffffffff) | tmp; if (tmp != 0 && (eflags & 0x0040)) (env->eip) = ((long)(&__op_param1)); else (env->eip) = ((long)(&__op_param2)); asm volatile ("");; } void op_loopl(void) { unsigned int tmp; tmp = ((env->regs[1]) - 1) & 0xffffffff; (env->regs[1]) = ((env->regs[1]) & ~0xffffffff) | tmp; if (tmp != 0) (env->eip) = ((long)(&__op_param1)); else (env->eip) = ((long)(&__op_param2)); asm volatile ("");; } void op_jecxzl(void) { if ((uint32_t)(env->regs[1]) == 0) (env->eip) = ((long)(&__op_param1)); else (env->eip) = ((long)(&__op_param2)); asm volatile ("");; } void op_setb_T0_subl(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); T0 = ((uint32_t)src1 < (uint32_t)src2); } void op_setz_T0_subl(void) { T0 = ((uint32_t)(env->cc_dst) == 0); } void op_setbe_T0_subl(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); T0 = ((uint32_t)src1 <= (uint32_t)src2); } void op_sets_T0_subl(void) { T0 = lshift((env->cc_dst), -((1 << (3 + 2)) - 1)) & 1; } void op_setl_T0_subl(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); T0 = ((int32_t)src1 < (int32_t)src2); } void op_setle_T0_subl(void) { int src1, src2; src1 = (env->cc_dst) + (env->cc_src); src2 = (env->cc_src); T0 = ((int32_t)src1 <= (int32_t)src2); } void op_shll_T0_T1(void) { int count; count = T1 & 0x1f; T0 = T0 << count; asm volatile ("");; } void op_shrl_T0_T1(void) { int count; count = T1 & 0x1f; T0 &= 0xffffffff; T0 = T0 >> count; asm volatile ("");; } void op_sarl_T0_T1(void) { int count, src; count = T1 & 0x1f; src = (int32_t)T0; T0 = src >> count; asm volatile ("");; } # 1 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" 1 # 65 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" void op_roll_T0_T1_cc(void) { int count, src; count = T1 & ((1 << (3 + 2)) - 1); if (count) { src = T0; T0 &= 0xffffffff; T0 = (T0 << count) | (T0 >> ((1 << (3 + 2)) - count)); asm volatile("" : : "r" (T0)); (env->cc_src) = (cc_table[(env->cc_op)].compute_all() & ~(0x0800 | 0x0001)) | (lshift(src ^ T0, 11 - ((1 << (3 + 2)) - 1)) & 0x0800) | (T0 & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rorl_T0_T1_cc(void) { int count, src; count = T1 & ((1 << (3 + 2)) - 1); if (count) { src = T0; T0 &= 0xffffffff; T0 = (T0 >> count) | (T0 << ((1 << (3 + 2)) - count)); asm volatile("" : : "r" (T0)); (env->cc_src) = (cc_table[(env->cc_op)].compute_all() & ~(0x0800 | 0x0001)) | (lshift(src ^ T0, 11 - ((1 << (3 + 2)) - 1)) & 0x0800) | ((T0 >> ((1 << (3 + 2)) - 1)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_roll_T0_T1(void) { int count; count = T1 & ((1 << (3 + 2)) - 1); if (count) { T0 &= 0xffffffff; T0 = (T0 << count) | (T0 >> ((1 << (3 + 2)) - count)); } asm volatile ("");; } void op_rorl_T0_T1(void) { int count; count = T1 & ((1 << (3 + 2)) - 1); if (count) { T0 &= 0xffffffff; T0 = (T0 >> count) | (T0 << ((1 << (3 + 2)) - count)); } asm volatile ("");; } void op_rcll_T0_T1_cc(void) { int count, res, eflags; unsigned int src; count = T1 & 0x1f; if (count) { eflags = cc_table[(env->cc_op)].compute_all(); T0 &= 0xffffffff; src = T0; res = (T0 << count) | ((eflags & 0x0001) << (count - 1)); if (count > 1) res |= T0 >> ((1 << (3 + 2)) + 1 - count); T0 = res; (env->cc_src) = (eflags & ~(0x0001 | 0x0800)) | (lshift(src ^ T0, 11 - ((1 << (3 + 2)) - 1)) & 0x0800) | ((src >> ((1 << (3 + 2)) - count)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rcrl_T0_T1_cc(void) { int count, res, eflags; unsigned int src; count = T1 & 0x1f; if (count) { eflags = cc_table[(env->cc_op)].compute_all(); T0 &= 0xffffffff; src = T0; res = (T0 >> count) | ((eflags & 0x0001) << ((1 << (3 + 2)) - count)); if (count > 1) res |= T0 << ((1 << (3 + 2)) + 1 - count); T0 = res; (env->cc_src) = (eflags & ~(0x0001 | 0x0800)) | (lshift(src ^ T0, 11 - ((1 << (3 + 2)) - 1)) & 0x0800) | ((src >> (count - 1)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_shll_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { src = (uint32_t)T0 << (count - 1); T0 = T0 << count; (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SHLB + 2; } asm volatile ("");; } void op_shrl_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { T0 &= 0xffffffff; src = T0 >> (count - 1); T0 = T0 >> count; (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 2; } asm volatile ("");; } void op_sarl_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { src = (int32_t)T0; T0 = src >> count; src = src >> (count - 1); (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 2; } asm volatile ("");; } # 339 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" void op_shldl_T0_T1_im_cc(void) { int count, tmp; count = ((long)(&__op_param1)); T0 &= 0xffffffff; T1 &= 0xffffffff; tmp = T0 << (count - 1); T0 = (T0 << count) | (T1 >> ((1 << (3 + 2)) - count)); (env->cc_src) = tmp; (env->cc_dst) = T0; } void op_shldl_T0_T1_ECX_cc(void) { int count, tmp; count = (env->regs[1]) & 0x1f; if (count) { T0 &= 0xffffffff; T1 &= 0xffffffff; tmp = T0 << (count - 1); T0 = (T0 << count) | (T1 >> ((1 << (3 + 2)) - count)); (env->cc_src) = tmp; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SHLB + 2; } asm volatile ("");; } void op_shrdl_T0_T1_im_cc(void) { int count, tmp; count = ((long)(&__op_param1)); T0 &= 0xffffffff; T1 &= 0xffffffff; tmp = T0 >> (count - 1); T0 = (T0 >> count) | (T1 << ((1 << (3 + 2)) - count)); (env->cc_src) = tmp; (env->cc_dst) = T0; } void op_shrdl_T0_T1_ECX_cc(void) { int count, tmp; count = (env->regs[1]) & 0x1f; if (count) { T0 &= 0xffffffff; T1 &= 0xffffffff; tmp = T0 >> (count - 1); T0 = (T0 >> count) | (T1 << ((1 << (3 + 2)) - count)); (env->cc_src) = tmp; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 2; } asm volatile ("");; } void op_adcl_T0_T1_cc(void) { int cf; cf = cc_table[(env->cc_op)].compute_c(); T0 = T0 + T1 + cf; (env->cc_src) = T1; (env->cc_dst) = T0; (env->cc_op) = CC_OP_ADDB + 2 + cf * 3; } void op_sbbl_T0_T1_cc(void) { int cf; cf = cc_table[(env->cc_op)].compute_c(); T0 = T0 - T1 - cf; (env->cc_src) = T1; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SUBB + 2 + cf * 3; } void op_cmpxchgl_T0_T1_EAX_cc(void) { unsigned int src, dst; src = T0; dst = EAX - T0; if ((uint32_t)dst == 0) { T0 = T1; } else { EAX = (EAX & ~0xffffffff) | (T0 & 0xffffffff); } (env->cc_src) = src; (env->cc_dst) = dst; asm volatile ("");; } # 460 "/home/gebner/tmp/qemu/target-i386/ops_template.h" 2 # 1 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" 1 # 65 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" void op_roll_raw_T0_T1_cc(void) { int count, src; count = T1 & ((1 << (3 + 2)) - 1); if (count) { src = T0; T0 &= 0xffffffff; T0 = (T0 << count) | (T0 >> ((1 << (3 + 2)) - count)); stl_raw((uint8_t *)T2, T0); (env->cc_src) = (cc_table[(env->cc_op)].compute_all() & ~(0x0800 | 0x0001)) | (lshift(src ^ T0, 11 - ((1 << (3 + 2)) - 1)) & 0x0800) | (T0 & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rorl_raw_T0_T1_cc(void) { int count, src; count = T1 & ((1 << (3 + 2)) - 1); if (count) { src = T0; T0 &= 0xffffffff; T0 = (T0 >> count) | (T0 << ((1 << (3 + 2)) - count)); stl_raw((uint8_t *)T2, T0); (env->cc_src) = (cc_table[(env->cc_op)].compute_all() & ~(0x0800 | 0x0001)) | (lshift(src ^ T0, 11 - ((1 << (3 + 2)) - 1)) & 0x0800) | ((T0 >> ((1 << (3 + 2)) - 1)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_roll_raw_T0_T1(void) { int count; count = T1 & ((1 << (3 + 2)) - 1); if (count) { T0 &= 0xffffffff; T0 = (T0 << count) | (T0 >> ((1 << (3 + 2)) - count)); stl_raw((uint8_t *)T2, T0); } asm volatile ("");; } void op_rorl_raw_T0_T1(void) { int count; count = T1 & ((1 << (3 + 2)) - 1); if (count) { T0 &= 0xffffffff; T0 = (T0 >> count) | (T0 << ((1 << (3 + 2)) - count)); stl_raw((uint8_t *)T2, T0); } asm volatile ("");; } void op_rcll_raw_T0_T1_cc(void) { int count, res, eflags; unsigned int src; count = T1 & 0x1f; if (count) { eflags = cc_table[(env->cc_op)].compute_all(); T0 &= 0xffffffff; src = T0; res = (T0 << count) | ((eflags & 0x0001) << (count - 1)); if (count > 1) res |= T0 >> ((1 << (3 + 2)) + 1 - count); T0 = res; stl_raw((uint8_t *)T2, T0); (env->cc_src) = (eflags & ~(0x0001 | 0x0800)) | (lshift(src ^ T0, 11 - ((1 << (3 + 2)) - 1)) & 0x0800) | ((src >> ((1 << (3 + 2)) - count)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_rcrl_raw_T0_T1_cc(void) { int count, res, eflags; unsigned int src; count = T1 & 0x1f; if (count) { eflags = cc_table[(env->cc_op)].compute_all(); T0 &= 0xffffffff; src = T0; res = (T0 >> count) | ((eflags & 0x0001) << ((1 << (3 + 2)) - count)); if (count > 1) res |= T0 << ((1 << (3 + 2)) + 1 - count); T0 = res; stl_raw((uint8_t *)T2, T0); (env->cc_src) = (eflags & ~(0x0001 | 0x0800)) | (lshift(src ^ T0, 11 - ((1 << (3 + 2)) - 1)) & 0x0800) | ((src >> (count - 1)) & 0x0001); (env->cc_op) = CC_OP_EFLAGS; } asm volatile ("");; } void op_shll_raw_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { src = (uint32_t)T0 << (count - 1); T0 = T0 << count; stl_raw((uint8_t *)T2, T0); (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SHLB + 2; } asm volatile ("");; } void op_shrl_raw_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { T0 &= 0xffffffff; src = T0 >> (count - 1); T0 = T0 >> count; stl_raw((uint8_t *)T2, T0); (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 2; } asm volatile ("");; } void op_sarl_raw_T0_T1_cc(void) { int count, src; count = T1 & 0x1f; if (count) { src = (int32_t)T0; T0 = src >> count; src = src >> (count - 1); stl_raw((uint8_t *)T2, T0); (env->cc_src) = src; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 2; } asm volatile ("");; } # 339 "/home/gebner/tmp/qemu/target-i386/ops_template_mem.h" void op_shldl_raw_T0_T1_im_cc(void) { int count, tmp; count = ((long)(&__op_param1)); T0 &= 0xffffffff; T1 &= 0xffffffff; tmp = T0 << (count - 1); T0 = (T0 << count) | (T1 >> ((1 << (3 + 2)) - count)); stl_raw((uint8_t *)T2, T0); (env->cc_src) = tmp; (env->cc_dst) = T0; } void op_shldl_raw_T0_T1_ECX_cc(void) { int count, tmp; count = (env->regs[1]) & 0x1f; if (count) { T0 &= 0xffffffff; T1 &= 0xffffffff; tmp = T0 << (count - 1); T0 = (T0 << count) | (T1 >> ((1 << (3 + 2)) - count)); stl_raw((uint8_t *)T2, T0); (env->cc_src) = tmp; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SHLB + 2; } asm volatile ("");; } void op_shrdl_raw_T0_T1_im_cc(void) { int count, tmp; count = ((long)(&__op_param1)); T0 &= 0xffffffff; T1 &= 0xffffffff; tmp = T0 >> (count - 1); T0 = (T0 >> count) | (T1 << ((1 << (3 + 2)) - count)); stl_raw((uint8_t *)T2, T0); (env->cc_src) = tmp; (env->cc_dst) = T0; } void op_shrdl_raw_T0_T1_ECX_cc(void) { int count, tmp; count = (env->regs[1]) & 0x1f; if (count) { T0 &= 0xffffffff; T1 &= 0xffffffff; tmp = T0 >> (count - 1); T0 = (T0 >> count) | (T1 << ((1 << (3 + 2)) - count)); stl_raw((uint8_t *)T2, T0); (env->cc_src) = tmp; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SARB + 2; } asm volatile ("");; } void op_adcl_raw_T0_T1_cc(void) { int cf; cf = cc_table[(env->cc_op)].compute_c(); T0 = T0 + T1 + cf; stl_raw((uint8_t *)T2, T0); (env->cc_src) = T1; (env->cc_dst) = T0; (env->cc_op) = CC_OP_ADDB + 2 + cf * 3; } void op_sbbl_raw_T0_T1_cc(void) { int cf; cf = cc_table[(env->cc_op)].compute_c(); T0 = T0 - T1 - cf; stl_raw((uint8_t *)T2, T0); (env->cc_src) = T1; (env->cc_dst) = T0; (env->cc_op) = CC_OP_SUBB + 2 + cf * 3; } void op_cmpxchgl_raw_T0_T1_EAX_cc(void) { unsigned int src, dst; src = T0; dst = EAX - T0; if ((uint32_t)dst == 0) { T0 = T1; stl_raw((uint8_t *)T2, T0); } else { EAX = (EAX & ~0xffffffff) | (T0 & 0xffffffff); } (env->cc_src) = src; (env->cc_dst) = dst; asm volatile ("");; } # 463 "/home/gebner/tmp/qemu/target-i386/ops_template.h" 2 # 475 "/home/gebner/tmp/qemu/target-i386/ops_template.h" void op_btl_T0_T1_cc(void) { int count; count = T1 & ((1 << (3 + 2)) - 1); (env->cc_src) = T0 >> count; } void op_btsl_T0_T1_cc(void) { int count; count = T1 & ((1 << (3 + 2)) - 1); T1 = T0 >> count; T0 |= (1 << count); } void op_btrl_T0_T1_cc(void) { int count; count = T1 & ((1 << (3 + 2)) - 1); T1 = T0 >> count; T0 &= ~(1 << count); } void op_btcl_T0_T1_cc(void) { int count; count = T1 & ((1 << (3 + 2)) - 1); T1 = T0 >> count; T0 ^= (1 << count); } void op_bsfl_T0_cc(void) { int res, count; res = T0 & 0xffffffff; if (res != 0) { count = 0; while ((res & 1) == 0) { count++; res >>= 1; } T1 = count; (env->cc_dst) = 1; } else { (env->cc_dst) = 0; } asm volatile ("");; } void op_bsrl_T0_cc(void) { int res, count; res = T0 & 0xffffffff; if (res != 0) { count = (1 << (3 + 2)) - 1; while ((res & (1 << ((1 << (3 + 2)) - 1))) == 0) { count--; res <<= 1; } T1 = count; (env->cc_dst) = 1; } else { (env->cc_dst) = 0; } asm volatile ("");; } void op_update_bt_cc(void) { (env->cc_src) = T1; } void op_movl_T0_Dshiftl(void) { T0 = (env->df) << 2; } void op_string_jz_subl(void) { if ((uint32_t)(env->cc_dst) == 0) do { goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[3 - 2]);} while (0); asm volatile ("");; } void op_string_jnz_subl(void) { if ((uint32_t)(env->cc_dst) != 0) do { goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[3 - 2]);} while (0); asm volatile ("");; } void op_string_jz_subl_im(void) { if ((uint32_t)(env->cc_dst) == 0) { (env->eip) = ((long)(&__op_param1)); if (env->eflags & 0x00000100) { raise_exception(1); } T0 = 0; asm volatile ("ret"); } asm volatile ("");; } void op_string_jnz_subl_im(void) { if ((uint32_t)(env->cc_dst) != 0) { (env->eip) = ((long)(&__op_param1)); if (env->eflags & 0x00000100) { raise_exception(1); } T0 = 0; asm volatile ("ret"); } asm volatile ("");; } void op_jz_ecxl(void) { if ((uint32_t)(env->regs[1]) == 0) do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param2));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jz_ecxl_im(void) { if ((uint32_t)(env->regs[1]) == 0) { (env->eip) = ((long)(&__op_param1)); if (env->eflags & 0x00000100) { raise_exception(1); } T0 = 0; asm volatile ("ret"); } asm volatile ("");; } void op_outl_T0_T1(void) { cpu_outl(env, T0, T1 & 0xffffffff); } void op_inl_T0_T1(void) { T1 = cpu_inl(env, T0); } void op_inl_DX_T0(void) { T0 = cpu_inl(env, (env->regs[2]) & 0xffff); } void op_outl_DX_T0(void) { cpu_outl(env, (env->regs[2]) & 0xffff, T0); } void op_check_iol_T0(void) { check_iol_T0(); } void op_check_iol_DX(void) { check_iol_DX(); } # 570 "/home/gebner/tmp/qemu/target-i386/op.c" 2 void op_movsbl_T0_T0(void) { T0 = (int8_t)T0; } void op_movzbl_T0_T0(void) { T0 = (uint8_t)T0; } void op_movswl_T0_T0(void) { T0 = (int16_t)T0; } void op_movzwl_T0_T0(void) { T0 = (uint16_t)T0; } void op_movswl_EAX_AX(void) { EAX = (int16_t)EAX; } void op_movsbw_AX_AL(void) { EAX = (EAX & 0xffff0000) | ((int8_t)EAX & 0xffff); } void op_movslq_EDX_EAX(void) { (env->regs[2]) = (int32_t)EAX >> 31; } void op_movswl_DX_AX(void) { (env->regs[2]) = ((env->regs[2]) & 0xffff0000) | (((int16_t)EAX >> 15) & 0xffff); } void op_addl_ESI_T0(void) { (env->regs[6]) += T0; } void op_addw_ESI_T0(void) { (env->regs[6]) = ((env->regs[6]) & ~0xffff) | (((env->regs[6]) + T0) & 0xffff); } void op_addl_EDI_T0(void) { (env->regs[7]) += T0; } void op_addw_EDI_T0(void) { (env->regs[7]) = ((env->regs[7]) & ~0xffff) | (((env->regs[7]) + T0) & 0xffff); } void op_decl_ECX(void) { (env->regs[1])--; } void op_decw_ECX(void) { (env->regs[1]) = ((env->regs[1]) & ~0xffff) | (((env->regs[1]) - 1) & 0xffff); } void op_addl_A0_SS(void) { T2 += (long)env->segs[2].base; } void op_subl_A0_2(void) { T2 -= 2; } void op_subl_A0_4(void) { T2 -= 4; } void op_addl_ESP_4(void) { ESP += 4; } void op_addl_ESP_2(void) { ESP += 2; } void op_addw_ESP_4(void) { ESP = (ESP & ~0xffff) | ((ESP + 4) & 0xffff); } void op_addw_ESP_2(void) { ESP = (ESP & ~0xffff) | ((ESP + 2) & 0xffff); } void op_addl_ESP_im(void) { ESP += ((long)(&__op_param1)); } void op_addw_ESP_im(void) { ESP = (ESP & ~0xffff) | ((ESP + ((long)(&__op_param1))) & 0xffff); } void op_rdtsc(void) { helper_rdtsc(); } void op_cpuid(void) { helper_cpuid(); } void op_rdmsr(void) { helper_rdmsr(); } void op_wrmsr(void) { helper_wrmsr(); } void op_aam(void) { int base = ((long)(&__op_param1)); int al, ah; al = EAX & 0xff; ah = al / base; al = al % base; EAX = (EAX & ~0xffff) | al | (ah << 8); (env->cc_dst) = al; } void op_aad(void) { int base = ((long)(&__op_param1)); int al, ah; al = EAX & 0xff; ah = (EAX >> 8) & 0xff; al = ((ah * base) + al) & 0xff; EAX = (EAX & ~0xffff) | al; (env->cc_dst) = al; } void op_aaa(void) { int icarry; int al, ah, af; int eflags; eflags = cc_table[(env->cc_op)].compute_all(); af = eflags & 0x0010; al = EAX & 0xff; ah = (EAX >> 8) & 0xff; icarry = (al > 0xf9); if (((al & 0x0f) > 9 ) || af) { al = (al + 6) & 0x0f; ah = (ah + 1 + icarry) & 0xff; eflags |= 0x0001 | 0x0010; } else { eflags &= ~(0x0001 | 0x0010); al &= 0x0f; } EAX = (EAX & ~0xffff) | al | (ah << 8); (env->cc_src) = eflags; } void op_aas(void) { int icarry; int al, ah, af; int eflags; eflags = cc_table[(env->cc_op)].compute_all(); af = eflags & 0x0010; al = EAX & 0xff; ah = (EAX >> 8) & 0xff; icarry = (al < 6); if (((al & 0x0f) > 9 ) || af) { al = (al - 6) & 0x0f; ah = (ah - 1 - icarry) & 0xff; eflags |= 0x0001 | 0x0010; } else { eflags &= ~(0x0001 | 0x0010); al &= 0x0f; } EAX = (EAX & ~0xffff) | al | (ah << 8); (env->cc_src) = eflags; } void op_daa(void) { int al, af, cf; int eflags; eflags = cc_table[(env->cc_op)].compute_all(); cf = eflags & 0x0001; af = eflags & 0x0010; al = EAX & 0xff; eflags = 0; if (((al & 0x0f) > 9 ) || af) { al = (al + 6) & 0xff; eflags |= 0x0010; } if ((al > 0x9f) || cf) { al = (al + 0x60) & 0xff; eflags |= 0x0001; } EAX = (EAX & ~0xff) | al; eflags |= (al == 0) << 6; eflags |= parity_table[al]; eflags |= (al & 0x80); (env->cc_src) = eflags; } void op_das(void) { int al, al1, af, cf; int eflags; eflags = cc_table[(env->cc_op)].compute_all(); cf = eflags & 0x0001; af = eflags & 0x0010; al = EAX & 0xff; eflags = 0; al1 = al; if (((al & 0x0f) > 9 ) || af) { eflags |= 0x0010; if (al < 6 || cf) eflags |= 0x0001; al = (al - 6) & 0xff; } if ((al1 > 0x99) || cf) { al = (al - 0x60) & 0xff; eflags |= 0x0001; } EAX = (EAX & ~0xff) | al; eflags |= (al == 0) << 6; eflags |= parity_table[al]; eflags |= (al & 0x80); (env->cc_src) = eflags; } void op_movl_seg_T0(void) { load_seg(((long)(&__op_param1)), T0); } void op_movl_seg_T0_vm(void) { int selector; SegmentCache *sc; selector = T0 & 0xffff; sc = (SegmentCache *)((char *)env + ((long)(&__op_param1))); sc->selector = selector; sc->base = (void *)(selector << 4); } void op_movl_T0_seg(void) { T0 = env->segs[((long)(&__op_param1))].selector; } void op_movl_A0_seg(void) { T2 = *(unsigned long *)((char *)env + ((long)(&__op_param1))); } void op_addl_A0_seg(void) { T2 += *(unsigned long *)((char *)env + ((long)(&__op_param1))); } void op_lsl(void) { helper_lsl(); } void op_lar(void) { helper_lar(); } void op_verr(void) { helper_verr(); } void op_verw(void) { helper_verw(); } void op_arpl(void) { if ((T0 & 3) < (T1 & 3)) { T0 = (T0 & ~3) | (T1 & 3); T1 = 0x0040; } else { T1 = 0; } asm volatile ("");; } void op_arpl_update(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); (env->cc_src) = (eflags & ~0x0040) | T1; } void op_ljmp_protected_T0_T1(void) { helper_ljmp_protected_T0_T1(((long)(&__op_param1))); } void op_lcall_real_T0_T1(void) { helper_lcall_real_T0_T1(((long)(&__op_param1)), ((long)(&__op_param2))); } void op_lcall_protected_T0_T1(void) { helper_lcall_protected_T0_T1(((long)(&__op_param1)), ((long)(&__op_param2))); } void op_iret_real(void) { helper_iret_real(((long)(&__op_param1))); } void op_iret_protected(void) { helper_iret_protected(((long)(&__op_param1)), ((long)(&__op_param2))); } void op_lret_protected(void) { helper_lret_protected(((long)(&__op_param1)), ((long)(&__op_param2))); } void op_lldt_T0(void) { helper_lldt_T0(); } void op_ltr_T0(void) { helper_ltr_T0(); } void op_movl_crN_T0(void) { helper_movl_crN_T0(((long)(&__op_param1))); } void op_movl_drN_T0(void) { helper_movl_drN_T0(((long)(&__op_param1))); } void op_lmsw_T0(void) { T0 = (env->cr[0] & ~0xf) | (T0 & 0xf); helper_movl_crN_T0(0); } void op_invlpg_A0(void) { helper_invlpg(T2); } void op_movl_T0_env(void) { T0 = *(uint32_t *)((char *)env + ((long)(&__op_param1))); } void op_movl_env_T0(void) { *(uint32_t *)((char *)env + ((long)(&__op_param1))) = T0; } void op_movl_env_T1(void) { *(uint32_t *)((char *)env + ((long)(&__op_param1))) = T1; } void op_clts(void) { env->cr[0] &= ~(1 << 3); env->hflags &= ~(1 << 11); } void op_jcc(void) { if (T0) do { static void __attribute__((unused)) *__op_label0 = &&label0; static void __attribute__((unused)) *dummy0 = &&dummy_label0; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[0]);label0: T0 = (long)(((long)(&__op_param1))) + (0); (env->eip) = ((long)(&__op_param2));dummy_label0: asm volatile ("ret");} while (0); else do { static void __attribute__((unused)) *__op_label1 = &&label1; static void __attribute__((unused)) *dummy1 = &&dummy_label1; goto *(void *)(((TranslationBlock *)((long)(&__op_param1)))->tb_next[1]);label1: T0 = (long)(((long)(&__op_param1))) + (1); (env->eip) = ((long)(&__op_param3));dummy_label1: asm volatile ("ret");} while (0); asm volatile ("");; } void op_jcc_im(void) { if (T0) (env->eip) = ((long)(&__op_param1)); else (env->eip) = ((long)(&__op_param2)); asm volatile ("");; } void op_seto_T0_cc(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); T0 = (eflags >> 11) & 1; } void op_setb_T0_cc(void) { T0 = cc_table[(env->cc_op)].compute_c(); } void op_setz_T0_cc(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); T0 = (eflags >> 6) & 1; } void op_setbe_T0_cc(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); T0 = (eflags & (0x0040 | 0x0001)) != 0; } void op_sets_T0_cc(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); T0 = (eflags >> 7) & 1; } void op_setp_T0_cc(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); T0 = (eflags >> 2) & 1; } void op_setl_T0_cc(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); T0 = ((eflags ^ (eflags >> 4)) >> 7) & 1; } void op_setle_T0_cc(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); T0 = (((eflags ^ (eflags >> 4)) & 0x80) || (eflags & 0x0040)) != 0; } void op_xor_T0_1(void) { T0 ^= 1; } void op_set_cc_op(void) { (env->cc_op) = ((long)(&__op_param1)); } void op_movl_eflags_T0(void) { load_eflags(T0, (0x00000100 | 0x00040000 | 0x00200000 | 0x00004000)); } void op_movw_eflags_T0(void) { load_eflags(T0, (0x00000100 | 0x00040000 | 0x00200000 | 0x00004000) & 0xffff); } void op_movl_eflags_T0_io(void) { load_eflags(T0, (0x00000100 | 0x00040000 | 0x00200000 | 0x00004000 | 0x00000200)); } void op_movw_eflags_T0_io(void) { load_eflags(T0, (0x00000100 | 0x00040000 | 0x00200000 | 0x00004000 | 0x00000200) & 0xffff); } void op_movl_eflags_T0_cpl0(void) { load_eflags(T0, (0x00000100 | 0x00040000 | 0x00200000 | 0x00004000 | 0x00000200 | 0x00003000)); } void op_movw_eflags_T0_cpl0(void) { load_eflags(T0, (0x00000100 | 0x00040000 | 0x00200000 | 0x00004000 | 0x00000200 | 0x00003000) & 0xffff); } # 1166 "/home/gebner/tmp/qemu/target-i386/op.c" void op_movb_eflags_T0(void) { int of; of = cc_table[(env->cc_op)].compute_all() & 0x0800; (env->cc_src) = (T0 & (0x0080 | 0x0040 | 0x0010 | 0x0004 | 0x0001)) | of; } void op_movl_T0_eflags(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); eflags |= ((env->df) & 0x00000400); eflags |= env->eflags & ~(0x00020000 | 0x00010000); T0 = eflags; } # 1196 "/home/gebner/tmp/qemu/target-i386/op.c" void op_cld(void) { (env->df) = 1; } void op_std(void) { (env->df) = -1; } void op_clc(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); eflags &= ~0x0001; (env->cc_src) = eflags; } void op_stc(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); eflags |= 0x0001; (env->cc_src) = eflags; } void op_cmc(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); eflags ^= 0x0001; (env->cc_src) = eflags; } void op_salc(void) { int cf; cf = cc_table[(env->cc_op)].compute_c(); EAX = (EAX & ~0xff) | ((-cf) & 0xff); } static int compute_all_eflags(void) { return (env->cc_src); } static int compute_c_eflags(void) { return (env->cc_src) & 0x0001; } CCTable cc_table[CC_OP_NB] = { [CC_OP_DYNAMIC] = { }, [CC_OP_EFLAGS] = { compute_all_eflags, compute_c_eflags }, [CC_OP_MULB] = { compute_all_mulb, compute_c_mull }, [CC_OP_MULW] = { compute_all_mulw, compute_c_mull }, [CC_OP_MULL] = { compute_all_mull, compute_c_mull }, [CC_OP_ADDB] = { compute_all_addb, compute_c_addb }, [CC_OP_ADDW] = { compute_all_addw, compute_c_addw }, [CC_OP_ADDL] = { compute_all_addl, compute_c_addl }, [CC_OP_ADCB] = { compute_all_adcb, compute_c_adcb }, [CC_OP_ADCW] = { compute_all_adcw, compute_c_adcw }, [CC_OP_ADCL] = { compute_all_adcl, compute_c_adcl }, [CC_OP_SUBB] = { compute_all_subb, compute_c_subb }, [CC_OP_SUBW] = { compute_all_subw, compute_c_subw }, [CC_OP_SUBL] = { compute_all_subl, compute_c_subl }, [CC_OP_SBBB] = { compute_all_sbbb, compute_c_sbbb }, [CC_OP_SBBW] = { compute_all_sbbw, compute_c_sbbw }, [CC_OP_SBBL] = { compute_all_sbbl, compute_c_sbbl }, [CC_OP_LOGICB] = { compute_all_logicb, compute_c_logicb }, [CC_OP_LOGICW] = { compute_all_logicw, compute_c_logicw }, [CC_OP_LOGICL] = { compute_all_logicl, compute_c_logicl }, [CC_OP_INCB] = { compute_all_incb, compute_c_incl }, [CC_OP_INCW] = { compute_all_incw, compute_c_incl }, [CC_OP_INCL] = { compute_all_incl, compute_c_incl }, [CC_OP_DECB] = { compute_all_decb, compute_c_incl }, [CC_OP_DECW] = { compute_all_decw, compute_c_incl }, [CC_OP_DECL] = { compute_all_decl, compute_c_incl }, [CC_OP_SHLB] = { compute_all_shlb, compute_c_shlb }, [CC_OP_SHLW] = { compute_all_shlw, compute_c_shlw }, [CC_OP_SHLL] = { compute_all_shll, compute_c_shll }, [CC_OP_SARB] = { compute_all_sarb, compute_c_sarl }, [CC_OP_SARW] = { compute_all_sarw, compute_c_sarl }, [CC_OP_SARL] = { compute_all_sarl, compute_c_sarl }, }; # 1319 "/home/gebner/tmp/qemu/target-i386/op.c" void op_flds_FT0_A0(void) { (env->ft0) = ldfl_raw((void *)T2); } void op_fldl_FT0_A0(void) { (env->ft0) = ldfq_raw((void *)T2); } # 1374 "/home/gebner/tmp/qemu/target-i386/op.c" void op_fild_FT0_A0(void) { (env->ft0) = (CPU86_LDouble)ldsw_raw((void *)T2); } void op_fildl_FT0_A0(void) { (env->ft0) = (CPU86_LDouble)((int32_t)ldl_raw((void *)T2)); } void op_fildll_FT0_A0(void) { (env->ft0) = (CPU86_LDouble)((int64_t)ldq_raw((void *)T2)); } void op_flds_ST0_A0(void) { int new_fpstt; new_fpstt = (env->fpstt - 1) & 7; env->fpregs[new_fpstt] = ldfl_raw((void *)T2); env->fpstt = new_fpstt; env->fptags[new_fpstt] = 0; } void op_fldl_ST0_A0(void) { int new_fpstt; new_fpstt = (env->fpstt - 1) & 7; env->fpregs[new_fpstt] = ldfq_raw((void *)T2); env->fpstt = new_fpstt; env->fptags[new_fpstt] = 0; } void op_fldt_ST0_A0(void) { helper_fldt_ST0_A0(); } # 1487 "/home/gebner/tmp/qemu/target-i386/op.c" void op_fild_ST0_A0(void) { int new_fpstt; new_fpstt = (env->fpstt - 1) & 7; env->fpregs[new_fpstt] = (CPU86_LDouble)ldsw_raw((void *)T2); env->fpstt = new_fpstt; env->fptags[new_fpstt] = 0; } void op_fildl_ST0_A0(void) { int new_fpstt; new_fpstt = (env->fpstt - 1) & 7; env->fpregs[new_fpstt] = (CPU86_LDouble)((int32_t)ldl_raw((void *)T2)); env->fpstt = new_fpstt; env->fptags[new_fpstt] = 0; } void op_fildll_ST0_A0(void) { int new_fpstt; new_fpstt = (env->fpstt - 1) & 7; env->fpregs[new_fpstt] = (CPU86_LDouble)((int64_t)ldq_raw((void *)T2)); env->fpstt = new_fpstt; env->fptags[new_fpstt] = 0; } void op_fsts_ST0_A0(void) { stfl_raw((void *)T2, (float)(env->fpregs[env->fpstt])); } void op_fstl_ST0_A0(void) { stfq_raw((void *)T2, (double)(env->fpregs[env->fpstt])); } void op_fstt_ST0_A0(void) { helper_fstt_ST0_A0(); } void op_fist_ST0_A0(void) { CPU86_LDouble d; int val; d = (env->fpregs[env->fpstt]); val = lrintl(d); if (val != (int16_t)val) val = -32768; stw_raw((void *)T2, val); } void op_fistl_ST0_A0(void) { CPU86_LDouble d; int val; d = (env->fpregs[env->fpstt]); val = lrintl(d); stl_raw((void *)T2, val); } void op_fistll_ST0_A0(void) { CPU86_LDouble d; int64_t val; d = (env->fpregs[env->fpstt]); val = llrintl(d); stq_raw((void *)T2, val); } void op_fbld_ST0_A0(void) { helper_fbld_ST0_A0(); } void op_fbst_ST0_A0(void) { helper_fbst_ST0_A0(); } void op_fpush(void) { fpush(); } void op_fpop(void) { fpop(); } void op_fdecstp(void) { env->fpstt = (env->fpstt - 1) & 7; env->fpus &= (~0x4700); } void op_fincstp(void) { env->fpstt = (env->fpstt + 1) & 7; env->fpus &= (~0x4700); } void op_fmov_ST0_FT0(void) { (env->fpregs[env->fpstt]) = (env->ft0); } void op_fmov_FT0_STN(void) { (env->ft0) = (env->fpregs[(env->fpstt + (((long)(&__op_param1)))) & 7]); } void op_fmov_ST0_STN(void) { (env->fpregs[env->fpstt]) = (env->fpregs[(env->fpstt + (((long)(&__op_param1)))) & 7]); } void op_fmov_STN_ST0(void) { (env->fpregs[(env->fpstt + (((long)(&__op_param1)))) & 7]) = (env->fpregs[env->fpstt]); } void op_fxchg_ST0_STN(void) { CPU86_LDouble tmp; tmp = (env->fpregs[(env->fpstt + (((long)(&__op_param1)))) & 7]); (env->fpregs[(env->fpstt + (((long)(&__op_param1)))) & 7]) = (env->fpregs[env->fpstt]); (env->fpregs[env->fpstt]) = tmp; } void op_fcom_ST0_FT0(void) { env->fpus &= (~0x4500); if ((env->fpregs[env->fpstt]) < (env->ft0)) env->fpus |= 0x100; else if ((env->fpregs[env->fpstt]) == (env->ft0)) env->fpus |= 0x4000; asm volatile ("");; } void op_fucom_ST0_FT0(void) { env->fpus &= (~0x4500); if ((env->fpregs[env->fpstt]) < (env->ft0)) env->fpus |= 0x100; else if ((env->fpregs[env->fpstt]) == (env->ft0)) env->fpus |= 0x4000; asm volatile ("");; } void op_fcomi_ST0_FT0(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); eflags &= ~(0x0040 | 0x0004 | 0x0001); if ((env->fpregs[env->fpstt]) < (env->ft0)) eflags |= 0x0001; else if ((env->fpregs[env->fpstt]) == (env->ft0)) eflags |= 0x0040; (env->cc_src) = eflags; asm volatile ("");; } void op_fucomi_ST0_FT0(void) { int eflags; eflags = cc_table[(env->cc_op)].compute_all(); eflags &= ~(0x0040 | 0x0004 | 0x0001); if ((env->fpregs[env->fpstt]) < (env->ft0)) eflags |= 0x0001; else if ((env->fpregs[env->fpstt]) == (env->ft0)) eflags |= 0x0040; (env->cc_src) = eflags; asm volatile ("");; } void op_fcmov_ST0_STN_T0(void) { if (T0) { (env->fpregs[env->fpstt]) = (env->fpregs[(env->fpstt + (((long)(&__op_param1)))) & 7]); } asm volatile ("");; } void op_fadd_ST0_FT0(void) { (env->fpregs[env->fpstt]) += (env->ft0); } void op_fmul_ST0_FT0(void) { (env->fpregs[env->fpstt]) *= (env->ft0); } void op_fsub_ST0_FT0(void) { (env->fpregs[env->fpstt]) -= (env->ft0); } void op_fsubr_ST0_FT0(void) { (env->fpregs[env->fpstt]) = (env->ft0) - (env->fpregs[env->fpstt]); } void op_fdiv_ST0_FT0(void) { (env->fpregs[env->fpstt]) = helper_fdiv((env->fpregs[env->fpstt]), (env->ft0)); } void op_fdivr_ST0_FT0(void) { (env->fpregs[env->fpstt]) = helper_fdiv((env->ft0), (env->fpregs[env->fpstt])); } void op_fadd_STN_ST0(void) { (env->fpregs[(env->fpstt + (((long)(&__op_param1)))) & 7]) += (env->fpregs[env->fpstt]); } void op_fmul_STN_ST0(void) { (env->fpregs[(env->fpstt + (((long)(&__op_param1)))) & 7]) *= (env->fpregs[env->fpstt]); } void op_fsub_STN_ST0(void) { (env->fpregs[(env->fpstt + (((long)(&__op_param1)))) & 7]) -= (env->fpregs[env->fpstt]); } void op_fsubr_STN_ST0(void) { CPU86_LDouble *p; p = &(env->fpregs[(env->fpstt + (((long)(&__op_param1)))) & 7]); *p = (env->fpregs[env->fpstt]) - *p; } void op_fdiv_STN_ST0(void) { CPU86_LDouble *p; p = &(env->fpregs[(env->fpstt + (((long)(&__op_param1)))) & 7]); *p = helper_fdiv(*p, (env->fpregs[env->fpstt])); } void op_fdivr_STN_ST0(void) { CPU86_LDouble *p; p = &(env->fpregs[(env->fpstt + (((long)(&__op_param1)))) & 7]); *p = helper_fdiv((env->fpregs[env->fpstt]), *p); } void op_fchs_ST0(void) { (env->fpregs[env->fpstt]) = -(env->fpregs[env->fpstt]); } void op_fabs_ST0(void) { (env->fpregs[env->fpstt]) = fabsl((env->fpregs[env->fpstt])); } void op_fxam_ST0(void) { helper_fxam_ST0(); } void op_fld1_ST0(void) { (env->fpregs[env->fpstt]) = f15rk[1]; } void op_fldl2t_ST0(void) { (env->fpregs[env->fpstt]) = f15rk[6]; } void op_fldl2e_ST0(void) { (env->fpregs[env->fpstt]) = f15rk[5]; } void op_fldpi_ST0(void) { (env->fpregs[env->fpstt]) = f15rk[2]; } void op_fldlg2_ST0(void) { (env->fpregs[env->fpstt]) = f15rk[3]; } void op_fldln2_ST0(void) { (env->fpregs[env->fpstt]) = f15rk[4]; } void op_fldz_ST0(void) { (env->fpregs[env->fpstt]) = f15rk[0]; } void op_fldz_FT0(void) { (env->ft0) = f15rk[0]; } void op_f2xm1(void) { helper_f2xm1(); } void op_fyl2x(void) { helper_fyl2x(); } void op_fptan(void) { helper_fptan(); } void op_fpatan(void) { helper_fpatan(); } void op_fxtract(void) { helper_fxtract(); } void op_fprem1(void) { helper_fprem1(); } void op_fprem(void) { helper_fprem(); } void op_fyl2xp1(void) { helper_fyl2xp1(); } void op_fsqrt(void) { helper_fsqrt(); } void op_fsincos(void) { helper_fsincos(); } void op_frndint(void) { helper_frndint(); } void op_fscale(void) { helper_fscale(); } void op_fsin(void) { helper_fsin(); } void op_fcos(void) { helper_fcos(); } void op_fnstsw_A0(void) { int fpus; fpus = (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11; stw_raw((void *)T2, fpus); } void op_fnstsw_EAX(void) { int fpus; fpus = (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11; EAX = (EAX & 0xffff0000) | fpus; } void op_fnstcw_A0(void) { stw_raw((void *)T2, env->fpuc); } void op_fldcw_A0(void) { int rnd_type; env->fpuc = lduw_raw((void *)T2); # 1959 "/home/gebner/tmp/qemu/target-i386/op.c" switch(env->fpuc & 0xc00) { default: case 0x000: rnd_type = FE_TONEAREST; break; case 0x400: rnd_type = FE_DOWNWARD; break; case 0x800: rnd_type = FE_UPWARD; break; case 0xc00: rnd_type = FE_TOWARDZERO; break; } fesetround(rnd_type); } void op_fclex(void) { env->fpus &= 0x7f00; } void op_fwait(void) { if (env->fpus & (1 << 7)) fpu_raise_exception(); asm volatile ("");; } void op_fninit(void) { env->fpus = 0; env->fpstt = 0; env->fpuc = 0x37f; env->fptags[0] = 1; env->fptags[1] = 1; env->fptags[2] = 1; env->fptags[3] = 1; env->fptags[4] = 1; env->fptags[5] = 1; env->fptags[6] = 1; env->fptags[7] = 1; } void op_fnstenv_A0(void) { helper_fstenv((uint8_t *)T2, ((long)(&__op_param1))); } void op_fldenv_A0(void) { helper_fldenv((uint8_t *)T2, ((long)(&__op_param1))); } void op_fnsave_A0(void) { helper_fsave((uint8_t *)T2, ((long)(&__op_param1))); } void op_frstor_A0(void) { helper_frstor((uint8_t *)T2, ((long)(&__op_param1))); } void op_lock(void) { cpu_lock(); } void op_unlock(void) { cpu_unlock(); }