sal.c File Reference

#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 dependency graph for sal.c:

Defines

#define INSTR_CALC(bits, a, b, cpu)
#define INSTR_CALC_AND_SET_FLAGS(bits, cpu, a, b)

Functions

int32_t instr_group_2_c0_sal (struct emu_cpu *c, struct emu_cpu_instruction *i)
int32_t instr_group_2_c1_sal (struct emu_cpu *c, struct emu_cpu_instruction *i)
int32_t instr_group_2_d0_sal (struct emu_cpu *c, struct emu_cpu_instruction *i)
int32_t instr_group_2_d1_sal (struct emu_cpu *c, struct emu_cpu_instruction *i)
int32_t instr_group_2_d2_sal (struct emu_cpu *c, struct emu_cpu_instruction *i)
int32_t instr_group_2_d3_sal (struct emu_cpu *c, struct emu_cpu_instruction *i)

Define Documentation

#define INSTR_CALC ( bits,
a,
b,
cpu   ) 
Value:
UINTOF(bits) operation_result = (a); \
uint8_t operand_b = (b); \
{ \
        operand_b &= 0x1f; \
        if( operand_b > 0 ) \
        { \
                if( operation_result & (1 << (bits - operand_b)) ) \
                { \
                        CPU_FLAG_SET(cpu, f_cf); \
                } \
                operation_result <<= operand_b; \
                if( operand_b == 1 ) \
                { \
                        if( (operation_result >> (bits - 1)) ^ (cpu->eflags >> f_cf) ) \
                        { \
                                CPU_FLAG_SET(cpu, f_of); \
                        } \
                        else \
                        { \
                                CPU_FLAG_UNSET(cpu, f_of); \
                        } \
                } \
                a = operation_result; \
        } \
}
#define INSTR_CALC_AND_SET_FLAGS ( bits,
cpu,
a,
 ) 
Value:
INSTR_CALC(bits, a, b, cpu) \
if (b > 0) \
{ \
        INSTR_SET_FLAG_ZF(cpu) \
        INSTR_SET_FLAG_PF(cpu) \
        INSTR_SET_FLAG_SF(cpu) \
}

Function Documentation

int32_t instr_group_2_c0_sal ( struct emu_cpu c,
struct emu_cpu_instruction i 
)
int32_t instr_group_2_c1_sal ( struct emu_cpu c,
struct emu_cpu_instruction i 
)
int32_t instr_group_2_d0_sal ( struct emu_cpu c,
struct emu_cpu_instruction i 
)
int32_t instr_group_2_d1_sal ( struct emu_cpu c,
struct emu_cpu_instruction i 
)
int32_t instr_group_2_d2_sal ( struct emu_cpu c,
struct emu_cpu_instruction i 
)
int32_t instr_group_2_d3_sal ( struct emu_cpu c,
struct emu_cpu_instruction i 
)

Generated on Sun Jan 9 16:50:24 2011 for libemu by  doxygen 1.6.1