/* * $Id: instr_word.h,v 1.1 2002/11/20 20:58:58 misto Exp $ */ #ifndef SMARC_PROC_INSTR_WORD_H #define SMARC_PROC_INSTR_WORD_H #include "exception.h" #include "bit_word.h" class instr_word { private: bit_word raw; public: enum format { primary_reg, primary_imm, branch_format, call_format, sethi_format }; enum instr { add, addx, addcc, addxcc, sub, subx, subcc, subxcc, and, andcc, andn, andncc, or, orcc, orn, orncc, xor, xorcc, xnor, xnorcc, sll, srl, sra, jmpl, save, restore, ld, ldub, lduh, ldd, ldsb, ldsh, st, stb, sth, std, ldstub, swap, bn, be, ble, bl, bleu, bcs, bneg, bvs, ba, bne, bg, bge, bgu, bcc, bpos, bvc, sethi, call }; enum igroup { arlog, mem, branch, other }; format format; instr instr; igroup group; int src1, src2, dst, opc, imm13; int a, cnd; unsigned long dsp22; // call instruction unsigned long dsp30; // sethi instruction unsigned long imm22; void recognize_instr( void ); instr_word( void ) : raw(0) {} instr_word( unsigned long r ); }; #endif