#include <stdint.h>#include <errno.h>#include "emu/emu.h"#include "emu/emu_cpu.h"#include "emu/emu_cpu_data.h"#include "emu/emu_cpu_stack.h"#include "emu/emu_memory.h"#include <stdio.h>
Defines | |
| #define | INSTR_CALC(bits, a, b) |
| #define | INSTR_CALC_AND_SET_FLAGS(bits, cpu, a, b) |
| #define | INSTR_CALC_EDI_ESI(cpu, bits) |
Functions | |
| int32_t | instr_cmps_a6 (struct emu_cpu *c, struct emu_cpu_instruction *i) |
| int32_t | instr_cmps_a7 (struct emu_cpu *c, struct emu_cpu_instruction *i) |
| #define INSTR_CALC | ( | bits, | |||
| a, | |||||
| b | ) |
| #define INSTR_CALC_AND_SET_FLAGS | ( | bits, | |||
| cpu, | |||||
| a, | |||||
| b | ) |
INSTR_CALC(bits, a, b) \ INSTR_SET_FLAG_ZF(cpu) \ INSTR_SET_FLAG_PF(cpu) \ INSTR_SET_FLAG_SF(cpu) \ INSTR_SET_FLAG_CF(cpu, -) \ INSTR_SET_FLAG_OF(cpu, -,bits)
| #define INSTR_CALC_EDI_ESI | ( | cpu, | |||
| bits | ) |
{ \
if ( !CPU_FLAG_ISSET(cpu,f_df) ) \
{ \
cpu->reg[edi]+=bits/8; \
cpu->reg[esi]+=bits/8; \
} \
else \
{ \
cpu->reg[edi]-=bits/8; \
cpu->reg[esi]-=bits/8; \
} \
}
Referenced by instr_cmps_a6(), and instr_cmps_a7().
| int32_t instr_cmps_a6 | ( | struct emu_cpu * | c, | |
| struct emu_cpu_instruction * | i | |||
| ) |
References CPU_FLAG_ISSET, ecx, edi, emu_memory_segment_get(), emu_memory_segment_select(), esi, f_zf, INSTR_CALC_AND_SET_FLAGS, INSTR_CALC_EDI_ESI, emu_cpu::mem, MEM_BYTE_READ, PREFIX_ADSIZE, PREFIX_F3, emu_cpu_instruction::prefixes, emu_cpu::reg, emu_cpu::repeat_current_instr, s_ds, and s_es.

| int32_t instr_cmps_a7 | ( | struct emu_cpu * | c, | |
| struct emu_cpu_instruction * | i | |||
| ) |
References edi, emu_memory_segment_get(), emu_memory_segment_select(), esi, INSTR_CALC_AND_SET_FLAGS, INSTR_CALC_EDI_ESI, emu_cpu::mem, MEM_DWORD_READ, MEM_WORD_READ, PREFIX_ADSIZE, PREFIX_OPSIZE, emu_cpu_instruction::prefixes, emu_cpu::reg, s_ds, and s_es.

1.6.1