struct mnemonic {
Mnemonic_Type mnm_type; int format; union { struct register_info *reg; struct expression *exp; } u[3]; }; |
mnm_type
This member specifies the type of the mnemonic. Table 1.2.1 shows its values.format
This member specifies the format of the mnemonic. Table 1.2.2 shows its values. One mnemonic type can take a number of formats. Table 1.2.3 shows the formats associated with each type (those with * are not required in this assignment).u[3]
This member is an array of three elements representing for, in maximum, three operands in the mnemonic. Each operand can be either a register or an expression. Therefore each element in the array is a union of two pointers, one to a register structure (see section 1.3) and the other to an expression structure (see section 1.4). Which pointer of each element is active depends on the value of format. Table 1.2.2 shows the rule.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
not reg |
|
neg reg |
|
inc const13,reg |
|
inccc const13,reg |
|
dec const13,reg |
|
deccc const13,reg |
|
|
|
|
|
u[1].reg u[2].reg |
|
|
u[1].exp u[2].reg |
|
|
u[1].reg u[2].reg |
|
|
u[1].exp u[2].reg |
|
|
u[1].exp u[2].reg |
|
|
u[1].reg u[2].reg |
|
|
u[1].reg |
|
|
u[1].reg |
|
|
u[1].reg u[2].reg |
|
|
u[1].reg u[2].exp |
|
|
u[1].reg u[2].exp |
|
|
u[1].exp u[2].reg |
|
|
u[1].reg |
|
|
u[1].exp |
|
|
u[1].reg |
|
|
u[1].exp |
|
|
u[1].exp |
|
|
u[1].reg |
|
|
|
|
|
|
|
|
u[1].reg u[2].reg |
|
|
u[1].exp u[2].reg |
|
|
u[1].exp u[2].reg |
|
|
u[1].reg u[2].reg |
|
|
u[1].reg |
|
|
u[1].reg |
|
|
u[1].exp |
|
|
|
|
|
ADD,ADDCC,ADDX,ADDXCC,SUB,SUBCC,SUBX,SUBXCC,MULSCC,
AND,ANDCC,ANDN,ANDNCC,OR,ORCC,ORN,ORNCC, XOR,XORCC,XNOR,XNORCC,SLL,SRL,SRA,SAVE,RESTORE |
|
LDUB,LDSB,LDUH,LDSH,LD,LDD,SWAP |
|
STB,STH,ST,STD |
|
TA,RETT |
|
BA,BN,BE,BNE,BL,BLE,BGE,BG,BLU,BLEU,BGEU,BGU,
BPOS,BNEG,BCS,BCC,BVS,BVC |
exp only has one symbol |
CALL |
exp only has one symbol |
JMPL |
|
SETHI |
|
CMP |
|
TST |
|
RET, NOP |
|
NOT,NEG |
|
INC,INCCC,DEC,DECCC |
|
MOV |
|