Line 28... |
Line 28... |
#include <inttypes.h>
|
#include <inttypes.h>
|
#endif
|
#endif
|
|
|
#include "port.h"
|
#include "port.h"
|
#include "arch.h"
|
#include "arch.h"
|
#include "spr_defs.h"
|
#include "spr-defs.h"
|
#include "opcode/or32.h"
|
#include "opcode/or32.h"
|
#include "sim-config.h"
|
#include "sim-config.h"
|
#include "except.h"
|
#include "except.h"
|
#include "abstract.h"
|
#include "abstract.h"
|
#include "execute.h"
|
#include "execute.h"
|
#include "sprs.h"
|
#include "sprs.h"
|
#include "sched.h"
|
#include "sched.h"
|
#include "immu.h"
|
#include "immu.h"
|
|
|
#include "op_support.h"
|
#include "op-support.h"
|
|
|
#include "i386_regs.h"
|
#include "i386-regs.h"
|
|
|
#include "dyn_rec.h"
|
#include "dyn-rec.h"
|
|
|
register struct cpu_state *env asm(CPU_STATE_REG);
|
register struct cpu_state *env asm(CPU_STATE_REG);
|
|
|
#include "op_i386.h"
|
#include "op-i386.h"
|
|
|
/*
|
/*
|
* WARNING: Before going of and wildly editing everything in this file remember
|
* WARNING: Before going of and wildly editing everything in this file remember
|
* the following about its contents:
|
* the following about its contents:
|
* 1) The `functions' don't EVER return. In otherwords haveing return state-
|
* 1) The `functions' don't EVER return. In otherwords haveing return state-
|
Line 490... |
Line 490... |
{
|
{
|
env->pc_delay = env->reg[31];
|
env->pc_delay = env->reg[31];
|
env->delay_insn = 1;
|
env->delay_insn = 1;
|
}
|
}
|
|
|
#define OP_FILE "op_1t_op.h"
|
#define OP_FILE "op-1t-op.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef OP_FILE
|
#undef OP_FILE
|
|
|
#define OP_FILE "op_2t_op.h"
|
#define OP_FILE "op-2t-op.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef OP_FILE
|
#undef OP_FILE
|
|
|
#define OP_FILE "op_3t_op.h"
|
#define OP_FILE "op-3t-op.h"
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#undef OP_FILE
|
#undef OP_FILE
|
|
|
#define OP_FILE "op_arith_op.h"
|
#define OP_FILE "op-arith-op.h"
|
#define OP_EXTRA
|
#define OP_EXTRA
|
|
|
#define OP /
|
#define OP /
|
#define OP_CAST(x) (orreg_t)(x)
|
#define OP_CAST(x) (orreg_t)(x)
|
#define OP_NAME div
|
#define OP_NAME div
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP_CAST
|
#undef OP_CAST
|
#undef OP
|
#undef OP
|
|
|
#define OP /
|
#define OP /
|
#define OP_CAST(x) (x)
|
#define OP_CAST(x) (x)
|
#define OP_NAME divu
|
#define OP_NAME divu
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP_CAST
|
#undef OP_CAST
|
#undef OP
|
#undef OP
|
|
|
#define OP *
|
#define OP *
|
#define OP_CAST(x) (x)
|
#define OP_CAST(x) (x)
|
#define OP_NAME mulu
|
#define OP_NAME mulu
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP_CAST
|
#undef OP_CAST
|
#undef OP
|
#undef OP
|
|
|
#define OP -
|
#define OP -
|
#define OP_CAST(x) (orreg_t)(x)
|
#define OP_CAST(x) (orreg_t)(x)
|
#define OP_NAME sub
|
#define OP_NAME sub
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP_CAST
|
#undef OP_CAST
|
#undef OP
|
#undef OP
|
|
|
#undef OP_EXTRA
|
#undef OP_EXTRA
|
|
|
#define OP_EXTRA + ((env->sprs[SPR_SR] & SPR_SR_CY) >> 10)
|
#define OP_EXTRA + ((env->sprs[SPR_SR] & SPR_SR_CY) >> 10)
|
#define OP +
|
#define OP +
|
#define OP_CAST(x) (orreg_t)(x)
|
#define OP_CAST(x) (orreg_t)(x)
|
#define OP_NAME addc
|
#define OP_NAME addc
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP_CAST
|
#undef OP_CAST
|
#undef OP
|
#undef OP
|
|
|
#undef OP_EXTRA
|
#undef OP_EXTRA
|
#define OP_EXTRA
|
#define OP_EXTRA
|
|
|
#define OP +
|
#define OP +
|
#define OP_CAST(x) (orreg_t)(x)
|
#define OP_CAST(x) (orreg_t)(x)
|
#define OP_NAME add
|
#define OP_NAME add
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP_CAST
|
#undef OP_CAST
|
#undef OP
|
#undef OP
|
|
|
#define OP &
|
#define OP &
|
#define OP_CAST(x) (x)
|
#define OP_CAST(x) (x)
|
#define OP_NAME and
|
#define OP_NAME and
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP_CAST
|
#undef OP_CAST
|
#undef OP
|
#undef OP
|
|
|
#define OP *
|
#define OP *
|
#define OP_CAST(x) (orreg_t)(x)
|
#define OP_CAST(x) (orreg_t)(x)
|
#define OP_NAME mul
|
#define OP_NAME mul
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP_CAST
|
#undef OP_CAST
|
#undef OP
|
#undef OP
|
|
|
#define OP |
|
#define OP |
|
#define OP_CAST(x) (x)
|
#define OP_CAST(x) (x)
|
#define OP_NAME or
|
#define OP_NAME or
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP_CAST
|
#undef OP_CAST
|
#undef OP
|
#undef OP
|
|
|
#define OP <<
|
#define OP <<
|
#define OP_CAST(x) (x)
|
#define OP_CAST(x) (x)
|
#define OP_NAME sll
|
#define OP_NAME sll
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP_CAST
|
#undef OP_CAST
|
#undef OP
|
#undef OP
|
|
|
#define OP >>
|
#define OP >>
|
#define OP_CAST(x) (orreg_t)(x)
|
#define OP_CAST(x) (orreg_t)(x)
|
#define OP_NAME sra
|
#define OP_NAME sra
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP_CAST
|
#undef OP_CAST
|
#undef OP
|
#undef OP
|
|
|
#define OP >>
|
#define OP >>
|
#define OP_CAST(x) (x)
|
#define OP_CAST(x) (x)
|
#define OP_NAME srl
|
#define OP_NAME srl
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP_CAST
|
#undef OP_CAST
|
#undef OP
|
#undef OP
|
|
|
#define OP ^
|
#define OP ^
|
#define OP_CAST(x) (x)
|
#define OP_CAST(x) (x)
|
#define OP_NAME xor
|
#define OP_NAME xor
|
#include "op_3t.h"
|
#include "op-3t.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP_CAST
|
#undef OP_CAST
|
#undef OP
|
#undef OP
|
|
|
#undef OP_EXTRA
|
#undef OP_EXTRA
|
#undef OP_FILE
|
#undef OP_FILE
|
|
|
#define OP_FILE "op_extend_op.h"
|
#define OP_FILE "op-extend-op.h"
|
|
|
#define EXT_NAME extbs
|
#define EXT_NAME extbs
|
#define EXT_TYPE int8_t
|
#define EXT_TYPE int8_t
|
#define EXT_CAST (orreg_t)
|
#define EXT_CAST (orreg_t)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef EXT_CAST
|
#undef EXT_CAST
|
#undef EXT_TYPE
|
#undef EXT_TYPE
|
#undef EXT_NAME
|
#undef EXT_NAME
|
|
|
#define EXT_NAME extbz
|
#define EXT_NAME extbz
|
#define EXT_TYPE uint8_t
|
#define EXT_TYPE uint8_t
|
#define EXT_CAST (uorreg_t)
|
#define EXT_CAST (uorreg_t)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef EXT_CAST
|
#undef EXT_CAST
|
#undef EXT_TYPE
|
#undef EXT_TYPE
|
#undef EXT_NAME
|
#undef EXT_NAME
|
|
|
#define EXT_NAME exths
|
#define EXT_NAME exths
|
#define EXT_TYPE int16_t
|
#define EXT_TYPE int16_t
|
#define EXT_CAST (orreg_t)
|
#define EXT_CAST (orreg_t)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef EXT_CAST
|
#undef EXT_CAST
|
#undef EXT_TYPE
|
#undef EXT_TYPE
|
#undef EXT_NAME
|
#undef EXT_NAME
|
|
|
#define EXT_NAME exthz
|
#define EXT_NAME exthz
|
#define EXT_TYPE uint16_t
|
#define EXT_TYPE uint16_t
|
#define EXT_CAST (uorreg_t)
|
#define EXT_CAST (uorreg_t)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef EXT_CAST
|
#undef EXT_CAST
|
#undef EXT_TYPE
|
#undef EXT_TYPE
|
#undef EXT_NAME
|
#undef EXT_NAME
|
|
|
#undef OP_FILE
|
#undef OP_FILE
|
|
|
#define OP_FILE "op_comp_op.h"
|
#define OP_FILE "op-comp-op.h"
|
|
|
#define COMP ==
|
#define COMP ==
|
#define COMP_NAME sfeq
|
#define COMP_NAME sfeq
|
#define COMP_CAST(x) (x)
|
#define COMP_CAST(x) (x)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef COMP_CAST
|
#undef COMP_CAST
|
#undef COMP_NAME
|
#undef COMP_NAME
|
#undef COMP
|
#undef COMP
|
|
|
#define COMP !=
|
#define COMP !=
|
#define COMP_NAME sfne
|
#define COMP_NAME sfne
|
#define COMP_CAST(x) (x)
|
#define COMP_CAST(x) (x)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef COMP_CAST
|
#undef COMP_CAST
|
#undef COMP_NAME
|
#undef COMP_NAME
|
#undef COMP
|
#undef COMP
|
|
|
#define COMP >
|
#define COMP >
|
#define COMP_NAME sfgtu
|
#define COMP_NAME sfgtu
|
#define COMP_CAST(x) (x)
|
#define COMP_CAST(x) (x)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef COMP_CAST
|
#undef COMP_CAST
|
#undef COMP_NAME
|
#undef COMP_NAME
|
#undef COMP
|
#undef COMP
|
|
|
#define COMP >=
|
#define COMP >=
|
#define COMP_NAME sfgeu
|
#define COMP_NAME sfgeu
|
#define COMP_CAST(x) (x)
|
#define COMP_CAST(x) (x)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef COMP_CAST
|
#undef COMP_CAST
|
#undef COMP_NAME
|
#undef COMP_NAME
|
#undef COMP
|
#undef COMP
|
|
|
#define COMP <
|
#define COMP <
|
#define COMP_NAME sfltu
|
#define COMP_NAME sfltu
|
#define COMP_CAST(x) (x)
|
#define COMP_CAST(x) (x)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef COMP_CAST
|
#undef COMP_CAST
|
#undef COMP_NAME
|
#undef COMP_NAME
|
#undef COMP
|
#undef COMP
|
|
|
#define COMP <=
|
#define COMP <=
|
#define COMP_NAME sfleu
|
#define COMP_NAME sfleu
|
#define COMP_CAST(x) (x)
|
#define COMP_CAST(x) (x)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef COMP_CAST
|
#undef COMP_CAST
|
#undef COMP_NAME
|
#undef COMP_NAME
|
#undef COMP
|
#undef COMP
|
|
|
#define COMP >
|
#define COMP >
|
#define COMP_NAME sfgts
|
#define COMP_NAME sfgts
|
#define COMP_CAST(x) (orreg_t)(x)
|
#define COMP_CAST(x) (orreg_t)(x)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef COMP_CAST
|
#undef COMP_CAST
|
#undef COMP_NAME
|
#undef COMP_NAME
|
#undef COMP
|
#undef COMP
|
|
|
#define COMP >=
|
#define COMP >=
|
#define COMP_NAME sfges
|
#define COMP_NAME sfges
|
#define COMP_CAST(x) (orreg_t)(x)
|
#define COMP_CAST(x) (orreg_t)(x)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef COMP_CAST
|
#undef COMP_CAST
|
#undef COMP_NAME
|
#undef COMP_NAME
|
#undef COMP
|
#undef COMP
|
|
|
#define COMP <
|
#define COMP <
|
#define COMP_NAME sflts
|
#define COMP_NAME sflts
|
#define COMP_CAST(x) (orreg_t)(x)
|
#define COMP_CAST(x) (orreg_t)(x)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef COMP_CAST
|
#undef COMP_CAST
|
#undef COMP_NAME
|
#undef COMP_NAME
|
#undef COMP
|
#undef COMP
|
|
|
#define COMP <=
|
#define COMP <=
|
#define COMP_NAME sfles
|
#define COMP_NAME sfles
|
#define COMP_CAST(x) (orreg_t)(x)
|
#define COMP_CAST(x) (orreg_t)(x)
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef COMP_CAST
|
#undef COMP_CAST
|
#undef COMP_NAME
|
#undef COMP_NAME
|
#undef COMP
|
#undef COMP
|
|
|
#undef OP_FILE
|
#undef OP_FILE
|
|
|
#define OP_FILE "op_t_reg_mov_op.h"
|
#define OP_FILE "op-t-reg-mov-op.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef OP_FILE
|
#undef OP_FILE
|
|
|
#define OP_FILE "op_mftspr_op.h"
|
#define OP_FILE "op-mftspr-op.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef OP_FILE
|
#undef OP_FILE
|
#include "op_mftspr_op.h"
|
#include "op-mftspr-op.h"
|
|
|
#define OP_FILE "op_mac_op.h"
|
#define OP_FILE "op-mac-op.h"
|
|
|
#define OP +=
|
#define OP +=
|
#define OP_NAME mac
|
#define OP_NAME mac
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP
|
#undef OP
|
|
|
#define OP -=
|
#define OP -=
|
#define OP_NAME msb
|
#define OP_NAME msb
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#undef OP_NAME
|
#undef OP_NAME
|
#undef OP
|
#undef OP
|
|
|
#undef OP_FILE
|
#undef OP_FILE
|
|
|
#define OP_FILE "op_lwhb_op.h"
|
#define OP_FILE "op-lwhb-op.h"
|
|
|
#define LS_OP_NAME lbz
|
#define LS_OP_NAME lbz
|
#define LS_OP_CAST
|
#define LS_OP_CAST
|
#define LS_OP_FUNC eval_mem8
|
#define LS_OP_FUNC eval_mem8
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef LS_OP_FUNC
|
#undef LS_OP_FUNC
|
#undef LS_OP_CAST
|
#undef LS_OP_CAST
|
#undef LS_OP_NAME
|
#undef LS_OP_NAME
|
|
|
#define LS_OP_NAME lbs
|
#define LS_OP_NAME lbs
|
#define LS_OP_CAST (int8_t)
|
#define LS_OP_CAST (int8_t)
|
#define LS_OP_FUNC eval_mem8
|
#define LS_OP_FUNC eval_mem8
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef LS_OP_FUNC
|
#undef LS_OP_FUNC
|
#undef LS_OP_CAST
|
#undef LS_OP_CAST
|
#undef LS_OP_NAME
|
#undef LS_OP_NAME
|
|
|
#define LS_OP_NAME lhz
|
#define LS_OP_NAME lhz
|
#define LS_OP_CAST
|
#define LS_OP_CAST
|
#define LS_OP_FUNC eval_mem16
|
#define LS_OP_FUNC eval_mem16
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef LS_OP_FUNC
|
#undef LS_OP_FUNC
|
#undef LS_OP_CAST
|
#undef LS_OP_CAST
|
#undef LS_OP_NAME
|
#undef LS_OP_NAME
|
|
|
#define LS_OP_NAME lhs
|
#define LS_OP_NAME lhs
|
#define LS_OP_CAST (int16_t)
|
#define LS_OP_CAST (int16_t)
|
#define LS_OP_FUNC eval_mem16
|
#define LS_OP_FUNC eval_mem16
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef LS_OP_FUNC
|
#undef LS_OP_FUNC
|
#undef LS_OP_CAST
|
#undef LS_OP_CAST
|
#undef LS_OP_NAME
|
#undef LS_OP_NAME
|
|
|
#define LS_OP_NAME lwz
|
#define LS_OP_NAME lwz
|
#define LS_OP_CAST
|
#define LS_OP_CAST
|
#define LS_OP_FUNC eval_mem32
|
#define LS_OP_FUNC eval_mem32
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef LS_OP_FUNC
|
#undef LS_OP_FUNC
|
#undef LS_OP_CAST
|
#undef LS_OP_CAST
|
#undef LS_OP_NAME
|
#undef LS_OP_NAME
|
|
|
#define LS_OP_NAME lws
|
#define LS_OP_NAME lws
|
#define LS_OP_CAST (int32_t)
|
#define LS_OP_CAST (int32_t)
|
#define LS_OP_FUNC eval_mem32
|
#define LS_OP_FUNC eval_mem32
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef LS_OP_FUNC
|
#undef LS_OP_FUNC
|
#undef LS_OP_CAST
|
#undef LS_OP_CAST
|
#undef LS_OP_NAME
|
#undef LS_OP_NAME
|
|
|
#undef OP_FILE
|
#undef OP_FILE
|
|
|
#define OP_FILE "op_swhb_op.h"
|
#define OP_FILE "op-swhb-op.h"
|
|
|
#define S_OP_NAME sb
|
#define S_OP_NAME sb
|
#define S_FUNC set_mem8
|
#define S_FUNC set_mem8
|
#include "op_swhb_op.h"
|
#include "op-swhb-op.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef S_FUNC
|
#undef S_FUNC
|
#undef S_OP_NAME
|
#undef S_OP_NAME
|
|
|
#define S_OP_NAME sh
|
#define S_OP_NAME sh
|
#define S_FUNC set_mem16
|
#define S_FUNC set_mem16
|
#include "op_swhb_op.h"
|
#include "op-swhb-op.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef S_FUNC
|
#undef S_FUNC
|
#undef S_OP_NAME
|
#undef S_OP_NAME
|
|
|
#define S_OP_NAME sw
|
#define S_OP_NAME sw
|
#define S_FUNC set_mem32
|
#define S_FUNC set_mem32
|
#include "op_swhb_op.h"
|
#include "op-swhb-op.h"
|
#include "op_2t.h"
|
#include "op-2t.h"
|
#include "op_1t.h"
|
#include "op-1t.h"
|
#undef S_FUNC
|
#undef S_FUNC
|
#undef S_OP_NAME
|
#undef S_OP_NAME
|
|
|
__or_dynop void op_join_mem_cycles(void)
|
__or_dynop void op_join_mem_cycles(void)
|
{
|
{
|