;
; Project UnReality: The First Nintendo 64 Emulator
; Copyright (C) 1997-1998, Cold Fusion Entertainment
; All rights reserved
;
; This source code is unpublished propietary information of Cold Fusion Entertainment.  No portion of this software
; may be disclosed to any third party or copied or duplicated in any form, in whole or in part, without the prior
; written consent of Cold Fusion Entertainment.
;

;
; $Log: r4300tbl.inc $
; Revision 1.4  1998/04/03 00:05:17  BREAKPOINT
; Fixed bug where CVT.S.D wasn't being recognized as a valid COP1 opcode!
; Revision 1.3  1998/03/22 22:56:38  BREAKPOINT
; Fixed COP1 *.D opcodes, added more COP1, added LDC1 and SDC1... Fixed SCD1 and SCD2 to be SDC.
; Revision 1.2  1998/01/12 00:29:42  BREAKPOINT
; First compileable ASM core
; Revision 1.1  1998/01/10 21:58:27  BREAKPOINT
; Initial revision
;

;---------------------------------------------------------------------------------------------------------------------

OpcodeTable		dd	@Special, @REGIMM, @J,	  @JAL,	   @BEQ,  @BNE,  @BLEZ,  @BGTZ
				dd	@ADDI,	  @ADDIU,  @SLTI, @SLTIU,  @ANDI, @ORI,  @XORI,  @LUI
				dd	@COP0,	  @COP1,   @COP2, @InvCOP, @BEQL, @BNEL, @BLEZL, @BGTZL
				dd	@DADDI,	  @DADDIU, @LDL,  @LDR,    @Unk,  @Unk,  @Unk,   @Unk
				dd	@LB,	  @LH,	   @LWL,  @LW,     @LBU,  @LHU,  @LWR,   @LWU
				dd	@SB,	  @SH,	   @SWL,  @SW,     @SDL,  @SDR,  @SWR,   @CACHE
				dd	@LL,	  @LWC1,   @LWC2, @PREF,   @LLD,  @LDC1, @LDC2,  @LD
				dd	@SC,	  @SWC1,   @SWC2, @InvCOP, @SCD,  @SDC1, @SDC2,  @SD

SpecialTable	dd	@SLL,  @Unk,   @SRL,  @SRA,  @SLLV,    @Unk,    @SRLV,   @SRAV
				dd	@JR,   @JALR,  @Unk,  @Unk,  @SYSCALL, @BREAK,  @Unk,    @SYNC
				dd	@MFHI, @MTHI,  @MFLO, @MTLO, @DSLLV,   @Unk,    @DSRLV,  @DSRAV
				dd	@MULT, @MULTU, @DIV,  @DIVU, @DMULT,   @DMULTU, @DDIV,   @DDIVU
				dd	@ADD,  @ADDU,  @SUB,  @SUBU, @AND,     @OR,     @XOR,    @NOR
				dd	@Unk,  @Unk,   @SLT,  @SLTU, @DADD,    @DADDU,  @DSUB,   @DSUBU
				dd	@TGE,  @TGEU,  @TLT,  @TLTU, @TEQ,     @Unk,    @TNE,    @Unk
				dd	@DSLL, @Unk,   @DSRL, @DSRA, @DSLL32,  @Unk,    @DSRL32, @DSRA32

REGIMMTable		dd	@BLTZ,   @BGEZ,   @BLTZL,   @BGEZL,   @Unk,  @Unk, @Unk,  @Unk
				dd	@TGEI,   @TGEIU,  @TLTI,    @TLTIU,   @TEQI, @Unk, @TNEI, @Unk
				dd	@BLTZAL, @BGEZAL, @BLTZALL, @BGEZALL, @Unk,  @Unk, @Unk,  @Unk
				dd	@Unk,    @Unk,    @Unk,     @Unk,     @Unk,  @Unk, @Unk,  @Unk

COP0Table		dd	@MFC0,   @DMFC0, @CFC0,  @C0Unk, @MTC0,  @DMTC0, @CTC0,  @C0Unk
				dd	@C0Unk,  @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk
				dd	@C0Func, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk
				dd	@C0Unk,  @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk

COP0Func		dd	@C0Unk, @TLBR,  @TLBWI, @C0Unk, @C0Unk, @C0Unk, @TLBWR, @C0Unk
				dd	@TLBP,  @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk
				dd	@C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk
				dd	@ERET,  @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk
				dd	@C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk
				dd	@C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk
				dd	@C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk
				dd	@C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk, @C0Unk

COP1Table		dd	@MFC1,  @C1Unk, @CFC1,  @C1Unk, @MTC1,  @C1Unk, @CTC1,  @C1Unk
				dd	@C1BC,  @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1S,   @C1D,   @C1Unk, @C1Unk, @C1W,   @C1L,   @C1Unk, @C1Unk
				dd	@C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk

COP1BCTable		dd	@BC1F, @BC1T, @BC1FL, @BC1TL

COP1STable		dd	@C1S_ADD,     @C1S_SUB,     @C1S_MUL,    @C1S_DIV,     @C1S_SQRT,    @C1S_ABS,     @C1S_MOV,    @C1S_NEG
				dd	@C1S_ROUND_L, @C1S_TRUNC_L, @C1S_CEIL_L, @C1S_FLOOR_L, @C1S_ROUND_W, @C1S_TRUNC_W, @C1S_CEIL_W, @C1S_FLOOR_W
				dd	@C1Unk,       @C1Unk,       @C1Unk,      @C1Unk,       @C1Unk,       @C1Unk,       @C1Unk,      @C1Unk
				dd	@C1Unk,       @C1Unk,       @C1Unk,      @C1Unk,       @C1Unk,       @C1Unk,       @C1Unk,      @C1Unk
				dd	@C1Unk,       @C1S_CVT_D,   @C1Unk,      @C1Unk,       @C1S_CVT_W,   @C1S_CVT_L,   @C1Unk,      @C1Unk
				dd	@C1Unk,       @C1Unk,       @C1Unk,      @C1Unk,       @C1Unk,       @C1Unk,       @C1Unk,      @C1Unk
				dd	@C1S_C_F,     @C1S_C_UN,    @C1S_C_EQ,   @C1S_C_UEQ,   @C1S_C_OLT,   @C1S_C_ULT,   @C1S_C_OLE,  @C1S_C_ULE
				dd	@C1S_C_SF,    @C1S_C_NGLE,  @C1S_C_SEQ,  @C1S_C_NGL,   @C1S_C_LT,    @C1S_C_NGE,   @C1S_C_LE,   @C1S_C_NGT

COP1DTable		dd	@C1D_ADD,     @C1D_SUB,     @C1D_MUL,    @C1D_DIV,     @C1D_SQRT,    @C1D_ABS,     @C1D_MOV,    @C1D_NEG
				dd	@C1D_ROUND_L, @C1D_TRUNC_L, @C1D_CEIL_L, @C1D_FLOOR_L, @C1D_ROUND_W, @C1D_TRUNC_W, @C1D_CEIL_W, @C1D_FLOOR_W
				dd	@C1Unk,       @C1Unk,       @C1Unk,      @C1Unk,       @C1Unk,       @C1Unk,       @C1Unk,      @C1Unk
				dd	@C1Unk,       @C1Unk,       @C1Unk,      @C1Unk,       @C1Unk,       @C1Unk,       @C1Unk,      @C1Unk
				dd	@C1D_CVT_S,   @C1Unk,       @C1Unk,      @C1Unk,       @C1D_CVT_W,   @C1D_CVT_L,   @C1Unk,      @C1Unk
				dd	@C1Unk,       @C1Unk,       @C1Unk,      @C1Unk,       @C1Unk,       @C1Unk,       @C1Unk,      @C1Unk
				dd	@C1D_C_F,     @C1D_C_UN,    @C1D_C_EQ,   @C1D_C_UEQ,   @C1D_C_OLT,   @C1D_C_ULT,   @C1D_C_OLE,  @C1D_C_ULE
				dd	@C1D_C_SF,    @C1D_C_NGLE,  @C1D_C_SEQ,  @C1D_C_NGL,   @C1D_C_LT,    @C1D_C_NGE,   @C1D_C_LE,   @C1D_C_NGT

COP1WTable		dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1W_CVT_S, @C1W_CVT_D, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk

COP1LTable		dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1L_CVT_S, @C1L_CVT_D, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk
				dd	@C1Unk,     @C1Unk,     @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk, @C1Unk

