⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 op.h

📁 Spim软件的一些源码。其中有Xspim的
💻 H
📖 第 1 页 / 共 2 页
字号:
/* SPIM S20 MIPS simulator.   This file describes the MIPS instructions, the assembler pseudo   instructions, the assembler pseudo-ops, and the spim commands.   Copyright (C) 1990-2004 by James Larus (larus@cs.wisc.edu).   ALL RIGHTS RESERVED.   SPIM is distributed under the following conditions:     You may make copies of SPIM for your own use and modify those copies.     All copies of SPIM must retain my name and copyright notice.     You may not sell SPIM or distributed SPIM in conjunction with a     commerical product or service without the expressed written consent of     James Larus.   THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR   PURPOSE. *//* $Header: /Software/SPIM/src/op.h 42    11/13/04 11:19a Larus $*//* Type of each entry: */#define ASM_DIR			0#define PSEUDO_OP		1#define BC_TYPE_INST		10#define B1_TYPE_INST		11#define I1s_TYPE_INST		12#define I1t_TYPE_INST		13#define I2_TYPE_INST		14#define B2_TYPE_INST		15#define I2a_TYPE_INST		16#define R1s_TYPE_INST		20#define R1d_TYPE_INST		21#define R2st_TYPE_INST		22#define R2ds_TYPE_INST		23#define R2td_TYPE_INST		24#define R2sh_TYPE_INST		25#define R3_TYPE_INST		26#define R3sh_TYPE_INST		27#define FP_I2a_TYPE_INST	30#define FP_R2ds_TYPE_INST	31#define FP_R2ts_TYPE_INST	32#define FP_CMP_TYPE_INST	33#define FP_R3_TYPE_INST		34#define FP_R4_TYPE_INST		35#define FP_MOVC_TYPE_INST	36#define J_TYPE_INST		40#define NOARG_TYPE_INST		42/* Information on each keyword token that can be read by spim.	Must be   sorted in alphabetical order. */OP(".alias",	Y_ALIAS_DIR,	ASM_DIR,		-1)OP(".align",	Y_ALIGN_DIR,	ASM_DIR,		-1)OP(".ascii",	Y_ASCII_DIR,	ASM_DIR,		-1)OP(".asciiz",	Y_ASCIIZ_DIR,	ASM_DIR,		-1)OP(".asm0",	Y_ASM0_DIR,	ASM_DIR,		-1)OP(".bgnb",	Y_BGNB_DIR,	ASM_DIR,		-1)OP(".byte",	Y_BYTE_DIR,	ASM_DIR,		-1)OP(".comm",	Y_COMM_DIR,	ASM_DIR,		-1)OP(".data",	Y_DATA_DIR,	ASM_DIR,		-1)OP(".double",	Y_DOUBLE_DIR,	ASM_DIR,		-1)OP(".end",	Y_END_DIR,	ASM_DIR,		-1)OP(".endb",	Y_ENDB_DIR,	ASM_DIR,		-1)OP(".endr",	Y_ENDR_DIR,	ASM_DIR,		-1)OP(".ent",	Y_ENT_DIR,	ASM_DIR,		-1)OP(".err",	Y_ERR_DIR,	ASM_DIR,		-1)OP(".extern",	Y_EXTERN_DIR,	ASM_DIR,		-1)OP(".file",	Y_FILE_DIR,	ASM_DIR,		-1)OP(".float",	Y_FLOAT_DIR,	ASM_DIR,		-1)OP(".fmask",	Y_FMASK_DIR,	ASM_DIR,		-1)OP(".frame",	Y_FRAME_DIR,	ASM_DIR,		-1)OP(".globl",	Y_GLOBAL_DIR,	ASM_DIR,		-1)OP(".half",	Y_HALF_DIR,	ASM_DIR,		-1)OP(".kdata",	Y_K_DATA_DIR,	ASM_DIR,		-1)OP(".ktext",	Y_K_TEXT_DIR,	ASM_DIR,		-1)OP(".lab",	Y_LABEL_DIR,	ASM_DIR,		-1)OP(".lcomm",	Y_LCOMM_DIR,	ASM_DIR,		-1)OP(".livereg",	Y_LIVEREG_DIR,	ASM_DIR,		-1)OP(".loc",	Y_LOC_DIR,	ASM_DIR,		-1)OP(".mask",	Y_MASK_DIR,	ASM_DIR,		-1)OP(".noalias",	Y_NOALIAS_DIR,	ASM_DIR,		-1)OP(".option",	Y_OPTIONS_DIR,	ASM_DIR,		-1)OP(".rdata",	Y_RDATA_DIR,	ASM_DIR,		-1)OP(".repeat",	Y_REPEAT_DIR,	ASM_DIR,		-1)OP(".sdata",	Y_SDATA_DIR,	ASM_DIR,		-1)OP(".set",	Y_SET_DIR,	ASM_DIR,		-1)OP(".space",	Y_SPACE_DIR,	ASM_DIR,		-1)OP(".struct",	Y_STRUCT_DIR,	ASM_DIR,		-1)OP(".text",	Y_TEXT_DIR,	ASM_DIR,		-1)OP(".verstamp",Y_VERSTAMP_DIR,	ASM_DIR,		-1)OP(".vreg",	Y_VREG_DIR,	ASM_DIR,		-1)OP(".word",	Y_WORD_DIR,	ASM_DIR,		-1)OP("abs",	Y_ABS_POP,	PSEUDO_OP,		-1)OP("abs.d",	Y_ABS_D_OP,	FP_R2ds_TYPE_INST,	0x46200005)OP("abs.ps",	Y_ABS_PS_OP,	FP_R2ds_TYPE_INST,	0x46600005)	/* MIPS32 Rev 2 */OP("abs.s",	Y_ABS_S_OP,	FP_R2ds_TYPE_INST,	0x46000005)OP("add",	Y_ADD_OP,	R3_TYPE_INST,		0x00000020)OP("add.d",	Y_ADD_D_OP,	FP_R3_TYPE_INST,	0x46200000)OP("add.ps",	Y_ADD_PS_OP,	FP_R3_TYPE_INST,	0x46600000)	/* MIPS32 Rev 2 */OP("add.s",	Y_ADD_S_OP,	FP_R3_TYPE_INST,	0x46000000)OP("addi",	Y_ADDI_OP,	I2_TYPE_INST,		0x20000000)OP("addiu",	Y_ADDIU_OP,	I2_TYPE_INST,		0x24000000)OP("addu",	Y_ADDU_OP,	R3_TYPE_INST,		0x00000021)OP("alnv.ps",	Y_ALNV_PS_OP,	FP_R4_TYPE_INST,	0x4c00001e)	/* MIPS32 Rev 2 */OP("and",	Y_AND_OP,	R3_TYPE_INST,		0x00000024)OP("andi",	Y_ANDI_OP,	I2_TYPE_INST,		0x30000000)OP("b",		Y_B_POP,	PSEUDO_OP,		-1)OP("bal",	Y_BAL_POP,	PSEUDO_OP,		-1)OP("bc1f",	Y_BC1F_OP,	BC_TYPE_INST,		0x45000000)OP("bc1fl",	Y_BC1FL_OP,	BC_TYPE_INST,		0x45020000)	/* MIPS32 */OP("bc1t",	Y_BC1T_OP,	BC_TYPE_INST,		0x45010000)OP("bc1tl",	Y_BC1TL_OP,	BC_TYPE_INST,		0x45030000)	/* MIPS32 */OP("bc2f",	Y_BC2F_OP,	BC_TYPE_INST,		0x49000000)OP("bc2fl",	Y_BC2FL_OP,	BC_TYPE_INST,		0x49020000)	/* MIPS32 */OP("bc2t",	Y_BC2T_OP,	BC_TYPE_INST,		0x49010000)OP("bc2tl",	Y_BC2TL_OP,	BC_TYPE_INST,		0x49030000)	/* MIPS32 */OP("beq",	Y_BEQ_OP,	B2_TYPE_INST,		0x10000000)OP("beql",	Y_BEQL_OP,	B2_TYPE_INST,		0x50000000)	/* MIPS32 */OP("beqz",	Y_BEQZ_POP,	PSEUDO_OP,		-1)OP("bge",	Y_BGE_POP,	PSEUDO_OP,		-1)OP("bgeu",	Y_BGEU_POP,	PSEUDO_OP,		-1)OP("bgez",	Y_BGEZ_OP,	B1_TYPE_INST,		0x04010000)OP("bgezal",	Y_BGEZAL_OP,	B1_TYPE_INST,		0x04110000)OP("bgezall",	Y_BGEZALL_OP,	B1_TYPE_INST,		0x04130000)	/* MIPS32 */OP("bgezl",	Y_BGEZL_OP,	B1_TYPE_INST,		0x04030000)	/* MIPS32 */OP("bgt",	Y_BGT_POP,	PSEUDO_OP,		-1)OP("bgtu",	Y_BGTU_POP,	PSEUDO_OP,		-1)OP("bgtz",	Y_BGTZ_OP,	B1_TYPE_INST,		0x1c000000)OP("bgtzl",	Y_BGTZL_OP,	B1_TYPE_INST,		0x5c000000)	/* MIPS32 */OP("ble",	Y_BLE_POP,	PSEUDO_OP,		-1)OP("bleu",	Y_BLEU_POP,	PSEUDO_OP,		-1)OP("blez",	Y_BLEZ_OP,	B1_TYPE_INST,		0x18000000)OP("blezl",	Y_BLEZL_OP,	B1_TYPE_INST,		0x58000000)	/* MIPS32 */OP("blt",	Y_BLT_POP,	PSEUDO_OP,		-1)OP("bltu",	Y_BLTU_POP,	PSEUDO_OP,		-1)OP("bltz",	Y_BLTZ_OP,	B1_TYPE_INST,		0x04000000)OP("bltzal",	Y_BLTZAL_OP,	B1_TYPE_INST,		0x04100000)OP("bltzall",	Y_BLTZALL_OP,	B1_TYPE_INST,		0x04120000)	/* MIPS32 */OP("bltzl",	Y_BLTZL_OP,	B1_TYPE_INST,		0x04020000)	/* MIPS32 */OP("bne",	Y_BNE_OP,	B2_TYPE_INST,		0x14000000)OP("bnel",	Y_BNEL_OP,	B2_TYPE_INST,		0x54000000)	/* MIPS32 */OP("bnez",	Y_BNEZ_POP,	PSEUDO_OP,		-1)OP("break",	Y_BREAK_OP,	R1d_TYPE_INST,		0x0000000d)OP("c.eq.d",	Y_C_EQ_D_OP,	FP_CMP_TYPE_INST,	0x46200032)OP("c.eq.ps",	Y_C_EQ_PS_OP,	FP_CMP_TYPE_INST,	0x46600032)	/* MIPS32 Rev 2 */OP("c.eq.s",	Y_C_EQ_S_OP,	FP_CMP_TYPE_INST,	0x46000032)OP("c.f.d",	Y_C_F_D_OP,	FP_CMP_TYPE_INST,	0x46200030)OP("c.f.ps",	Y_C_F_PS_OP,	FP_CMP_TYPE_INST,	0x46600030)	/* MIPS32 Rev 2 */OP("c.f.s",	Y_C_F_S_OP,	FP_CMP_TYPE_INST,	0x46000030)OP("c.le.d",	Y_C_LE_D_OP,	FP_CMP_TYPE_INST,	0x4620003e)OP("c.le.ps",	Y_C_LE_PS_OP,	FP_CMP_TYPE_INST,	0x4660003e)	/* MIPS32 Rev 2 */OP("c.le.s",	Y_C_LE_S_OP,	FP_CMP_TYPE_INST,	0x4600003e)OP("c.lt.d",	Y_C_LT_D_OP,	FP_CMP_TYPE_INST,	0x4620003c)OP("c.lt.ps",	Y_C_LT_PS_OP,	FP_CMP_TYPE_INST,	0x4660003c)	/* MIPS32 Rev 2 */OP("c.lt.s",	Y_C_LT_S_OP,	FP_CMP_TYPE_INST,	0x4600003c)OP("c.nge.d",	Y_C_NGE_D_OP,	FP_CMP_TYPE_INST,	0x4620003d)OP("c.nge.ps",	Y_C_NGE_PS_OP,	FP_CMP_TYPE_INST,	0x4660003d)	/* MIPS32 Rev 2 */OP("c.nge.s",	Y_C_NGE_S_OP,	FP_CMP_TYPE_INST,	0x4600003d)OP("c.ngl.d",	Y_C_NGL_D_OP,	FP_CMP_TYPE_INST,	0x4620003b)OP("c.ngl.ps",	Y_C_NGL_PS_OP,	FP_CMP_TYPE_INST,	0x4660003b)	/* MIPS32 Rev 2 */OP("c.ngl.s",	Y_C_NGL_S_OP,	FP_CMP_TYPE_INST,	0x4600003b)OP("c.ngle.d",	Y_C_NGLE_D_OP,	FP_CMP_TYPE_INST,	0x46200039)OP("c.ngle.ps",	Y_C_NGLE_PS_OP,	FP_CMP_TYPE_INST,	0x46600039)	/* MIPS32 Rev 2 */OP("c.ngle.s",	Y_C_NGLE_S_OP,	FP_CMP_TYPE_INST,	0x46000039)OP("c.ngt.d",	Y_C_NGT_D_OP,	FP_CMP_TYPE_INST,	0x4620003f)OP("c.ngt.ps",	Y_C_NGT_PS_OP,	FP_CMP_TYPE_INST,	0x4660003f)	/* MIPS32 Rev 2 */OP("c.ngt.s",	Y_C_NGT_S_OP,	FP_CMP_TYPE_INST,	0x4600003f)OP("c.ole.d",	Y_C_OLE_D_OP,	FP_CMP_TYPE_INST,	0x46200036)OP("c.ole.ps",	Y_C_OLE_PS_OP,	FP_CMP_TYPE_INST,	0x46600036)	/* MIPS32 Rev 2 */OP("c.ole.s",	Y_C_OLE_S_OP,	FP_CMP_TYPE_INST,	0x46000036)OP("c.olt.d",	Y_C_OLT_D_OP,	FP_CMP_TYPE_INST,	0x46200034)OP("c.olt.ps",	Y_C_OLT_PS_OP,	FP_CMP_TYPE_INST,	0x46600034)	/* MIPS32 Rev 2 */OP("c.olt.s",	Y_C_OLT_S_OP,	FP_CMP_TYPE_INST,	0x46000034)OP("c.seq.d",	Y_C_SEQ_D_OP,	FP_CMP_TYPE_INST,	0x4620003a)OP("c.seq.ps",	Y_C_SEQ_PS_OP,	FP_CMP_TYPE_INST,	0x4660003a)	/* MIPS32 Rev 2 */OP("c.seq.s",	Y_C_SEQ_S_OP,	FP_CMP_TYPE_INST,	0x4600003a)OP("c.sf.d",	Y_C_SF_D_OP,	FP_CMP_TYPE_INST,	0x46200038)OP("c.sf.ps",	Y_C_SF_PS_OP,	FP_CMP_TYPE_INST,	0x46600038)	/* MIPS32 Rev 2 */OP("c.sf.s",	Y_C_SF_S_OP,	FP_CMP_TYPE_INST,	0x46000038)OP("c.ueq.d",	Y_C_UEQ_D_OP,	FP_CMP_TYPE_INST,	0x46200033)OP("c.ueq.ps",	Y_C_UEQ_PS_OP,	FP_CMP_TYPE_INST,	0x46600033)	/* MIPS32 Rev 2 */OP("c.ueq.s",	Y_C_UEQ_S_OP,	FP_CMP_TYPE_INST,	0x46000033)OP("c.ule.d",	Y_C_ULE_D_OP,	FP_CMP_TYPE_INST,	0x46200037)OP("c.ule.ps",	Y_C_ULE_PS_OP,	FP_CMP_TYPE_INST,	0x46600037)	/* MIPS32 Rev 2 */OP("c.ule.s",	Y_C_ULE_S_OP,	FP_CMP_TYPE_INST,	0x46000037)OP("c.ult.d",	Y_C_ULT_D_OP,	FP_CMP_TYPE_INST,	0x46200035)OP("c.ult.ps",	Y_C_ULT_PS_OP,	FP_CMP_TYPE_INST,	0x46600035)	/* MIPS32 Rev 2 */OP("c.ult.s",	Y_C_ULT_S_OP,	FP_CMP_TYPE_INST,	0x46000035)OP("c.un.d",	Y_C_UN_D_OP,	FP_CMP_TYPE_INST,	0x46200031)OP("c.un.ps",	Y_C_UN_PS_OP,	FP_CMP_TYPE_INST,	0x46600031)	/* MIPS32 Rev 2 */OP("c.un.s",	Y_C_UN_S_OP,	FP_CMP_TYPE_INST,	0x46000031)OP("cache",	Y_CACHE_OP,	I2_TYPE_INST,		0xbc000000)	/* MIPS32 */OP("ceil.l.d",	Y_CEIL_L_D_OP,	FP_R2ds_TYPE_INST,	0x4620000a)	/* MIPS32 Rev 2 */OP("ceil.l.s",	Y_CEIL_L_S_OP,	FP_R2ds_TYPE_INST,	0x4600000a)	/* MIPS32 Rev 2 */OP("ceil.w.d",	Y_CEIL_W_D_OP,	FP_R2ds_TYPE_INST,	0x4620000e)	/* MIPS32 */OP("ceil.w.s",	Y_CEIL_W_S_OP,	FP_R2ds_TYPE_INST,	0x4600000e)	/* MIPS32 */OP("cfc0",	Y_CFC0_OP,	FP_R2ts_TYPE_INST,	0x40400000)OP("cfc1",	Y_CFC1_OP,	FP_R2ts_TYPE_INST,	0x44400000)OP("cfc2",	Y_CFC2_OP,	FP_R2ts_TYPE_INST,	0x48400000)OP("clo",	Y_CLO_OP,	R3_TYPE_INST,		0x70000021)OP("clz",	Y_CLZ_OP,	R3_TYPE_INST,		0x70000020)OP("cop2",	Y_COP2_OP,	J_TYPE_INST,		0x4a000000)OP("ctc0",	Y_CTC0_OP,	FP_R2ts_TYPE_INST,	0x40c00000)OP("ctc1",	Y_CTC1_OP,	FP_R2ts_TYPE_INST,	0x44c00000)OP("ctc2",	Y_CTC2_OP,	FP_R2ts_TYPE_INST,	0x48c00000)OP("cvt.d.l",	Y_CVT_D_L_OP,	FP_R2ds_TYPE_INST,	0x46b00021)	/* MIPS32 Rev 2 */OP("cvt.d.s",	Y_CVT_D_S_OP,	FP_R2ds_TYPE_INST,	0x46000021)OP("cvt.d.w",	Y_CVT_D_W_OP,	FP_R2ds_TYPE_INST,	0x46200021)OP("cvt.l.d",	Y_CVT_L_D_OP,	FP_R2ds_TYPE_INST,	0x46200025)	/* MIPS32 Rev 2 */OP("cvt.l.s",	Y_CVT_L_S_OP,	FP_R2ds_TYPE_INST,	0x46000025)	/* MIPS32 Rev 2 */OP("cvt.ps.s",	Y_CVT_PS_S_OP,	FP_R2ds_TYPE_INST,	0x46000026)	/* MIPS32 Rev 2 */OP("cvt.s.d",	Y_CVT_S_D_OP,	FP_R2ds_TYPE_INST,	0x46200020)OP("cvt.s.l",	Y_CVT_S_L_OP,	FP_R2ds_TYPE_INST,	0x46b00020)	/* MIPS32 Rev 2 */OP("cvt.s.pl",	Y_CVT_S_PL_OP,	FP_R2ds_TYPE_INST,	0x46c00024)	/* MIPS32 Rev 2 */OP("cvt.s.pu",	Y_CVT_S_PU_OP,	FP_R2ds_TYPE_INST,	0x46c00020)	/* MIPS32 Rev 2 */OP("cvt.s.w",	Y_CVT_S_W_OP,	FP_R2ds_TYPE_INST,	0x46800020)OP("cvt.w.d",	Y_CVT_W_D_OP,	FP_R2ds_TYPE_INST,	0x46200024)OP("cvt.w.s",	Y_CVT_W_S_OP,	FP_R2ds_TYPE_INST,	0x46000024)OP("deret",	Y_DERET_OP,	NOARG_TYPE_INST,	0x4200001f)	/* MIPS32 Rev 2 */OP("di",	Y_DI_OP,	I1t_TYPE_INST,		0x41606000)	/* MIPS32 Rev 2 */OP("div",	Y_DIV_OP,	R2st_TYPE_INST,		0x0000001a)OP("div.d",	Y_DIV_D_OP,	FP_R3_TYPE_INST,	0x46200003)OP("div.s",	Y_DIV_S_OP,	FP_R3_TYPE_INST,	0x46000003)OP("divu",	Y_DIVU_OP,	R2st_TYPE_INST,		0x0000001b)OP("ehb",	Y_EHB_OP,	NOARG_TYPE_INST,	0x000000c0)	/* MIPS32 Rev 2 */OP("ei",	Y_EI_OP,	I1t_TYPE_INST,		0x41606020)	/* MIPS32 Rev 2 */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -