/*  Simple-SUIF Operation Definitions. */

/*  Copyright (c) 1994 Stanford University

    All rights reserved.

    This software is provided under the terms described in
    the "suif_copyright.h" include file. */

#include <suif_copyright.h>

/*  Each entry in this file describes several characteristics of an
    instruction used in the Simple-SUIF compiler system.  This file is
    included multiple times with the SOP macro redefined to extract the
    information in each field.  The fields are:

	OPCODE	- a member of the simple_op enumeration
	NAME	- a string holding a mnemonic for the opcode
	FORM	- the instruction format used
	SUIFOP	- ignore this field
*/

/*  no operand instructions */
SOP( NOP_OP,	"nop ",		BASE_FORM,	io_nop)

/*  one source operand (src1) instructions */
SOP( RET_OP,	"ret ",		BASE_FORM,	io_ret)

/*  two source operand (src1, src2) instructions */
SOP( STR_OP,	"str ",		BASE_FORM,	io_str)
SOP( MCPY_OP,	"mcpy",		BASE_FORM,	io_memcpy)

/*  unary instructions (dst, src1) */
SOP( CPY_OP,	"cpy ",		BASE_FORM,	io_cpy)
SOP( CVT_OP,	"cvt ",		BASE_FORM,	io_cvt)
SOP( NEG_OP,	"neg ",		BASE_FORM,	io_neg)
SOP( NOT_OP,	"not ",		BASE_FORM,	io_not)
SOP( LOAD_OP,	"load",		BASE_FORM,	io_lod)

/*  binary instructions (dst, src1, src2) */
SOP( ADD_OP,	"add ",		BASE_FORM,	io_add)
SOP( SUB_OP,	"sub ",		BASE_FORM,	io_sub)
SOP( MUL_OP,	"mul ",		BASE_FORM,	io_mul)
SOP( DIV_OP,	"div ",		BASE_FORM,	io_div)
SOP( REM_OP,	"rem ",		BASE_FORM,	io_rem)
SOP( MOD_OP,	"mod ",		BASE_FORM,	io_mod)
SOP( AND_OP,	"and ",		BASE_FORM,	io_and)
SOP( IOR_OP,	"ior ",		BASE_FORM,	io_ior)
SOP( XOR_OP,	"xor ",		BASE_FORM,	io_xor)
SOP( ASR_OP,	"asr ",		BASE_FORM,	io_asr)
SOP( LSL_OP,	"lsl ",		BASE_FORM,	io_lsl)
SOP( LSR_OP,	"lsr ",		BASE_FORM,	io_lsr)
SOP( ROT_OP,	"rot ",		BASE_FORM,	io_rot)
SOP( SEQ_OP,	"seq ",		BASE_FORM,	io_seq)
SOP( SNE_OP,	"sne ",		BASE_FORM,	io_sne)
SOP( SL_OP,	"sl  ",		BASE_FORM,	io_sl)
SOP( SLE_OP,	"sle ",		BASE_FORM,	io_sle)

/*  branch and jump instructions */
SOP( JMP_OP,	"jmp ",		BJ_FORM,	io_jmp)
SOP( BTRUE_OP,	"btru",		BJ_FORM,	io_btrue)
SOP( BFALSE_OP,	"bfls",		BJ_FORM,	io_bfalse)

/*  others.... */
SOP( LDC_OP,	"ldc ",		LDC_FORM,	io_ldc)
SOP( CALL_OP,	"call",		CALL_FORM,	io_cal)
SOP( MBR_OP,	"mbr ",		MBR_FORM,	io_mbr)
SOP( LABEL_OP,	"lab ",		LABEL_FORM,	io_lab)

