opcode | 5 | 5 | 5 | 11 | ||
CPU指令集 | ||||||
算术运算指令 | ||||||
整数运算指令(7) | ||||||
000000 | rs | rt | rd | 保留 | add rs,rt,rd | |
000001 | rs | rt | imm | addi,rs,rt,imm | ||
000010 | rs | rt | rd | 保留 | sub rs,rt,rd | |
000011 | rs | rt | imm | subi,rs,rt,imm | ||
000100 | rs | rt | rd | 保留 | mul rs,rt,rd | |
000101 | rs | rt | rd | 保留 | div rs,rt,rd | |
000110 | rs | rt | rd | 保留 | mod rs,rt,rd | |
浮点数运算指令(4) | ||||||
000111 | rs | rt | rd | 保留 | fadd rs,rt,rd | |
001000 | rs | rt | rd | 保留 | fsub rs,rt,rd | |
001001 | rs | rt | rd | 保留 | fmul rs,rt,rd | |
001010 | rs | rt | rd | 保留 | fdiv rs,rt,rd | |
逻辑运算指令(9) | ||||||
001011 | rs | rt | rd | 保留 | and rs,rt,rd | |
001100 | rs | rt | rd | 保留 | or rs,rt,rd | |
001101 | rs | rt | 保留 | 保留 | not rs,rt | |
001110 | rs | rt | rd | 保留 | xor rs,rt,rd | |
001111 | rs | rt | imm | andi rs,rt,imm | ||
010000 | rs | rt | imm | ori rs,rt,imm | ||
010001 | rs | rt | imm | xori rs,rt,imm | ||
010010 | rs | rt | shamt | sll rs,rd,shamt | ||
010011 | rs | rt | shamt | slr rs,rd,shamt | ||
比较转移指令(7) | ||||||
010100 | rs | rt | lable | less rs,rt,lable | ||
010101 | rs | rt | lable | great rs,rt,lable | ||
010110 | rs | rt | lable | lessu rs,rt,lable | ||
010111 | rs | rt | lable | greatu rs,rt,lable | ||
011000 | rs | rt | lable | equal rs,rt,lable | ||
011001 | rs | rt | lable | uequal rs,rt,lable | ||
011010 | rs | 保留 | jmp rs | |||
数据传输指令(10) | ||||||
011011 | rs | rt | mov rs,rt | |||
011100 | rs | rt | rd | 保留 | lword rs,rt,rd | |
011101 | rs | rt | rd | 保留 | sword rs,rt,rd | |
011110 | rs | rt | rd | 保留 | lhalf rs,rt,rd | |
011111 | rs | rt | rd | 保留 | shalf rs,rt,rd | |
100000 | rs | rt | rd | 保留 | lbyte rs,rt,rd | |
100001 | rs | rt | rd | 保留 | sbyte rs,rt,rd | |
100010 | rs | 保留 | imm | lui rs,imm | ||
100011 | f1 | rt | rd | 保留 | ldouble $f1,$r2,$r3 | |
100100 | f1 | rt | rd | 保留 | sdouble $f1,$r2,$r3 | |
系统指令(5) | ||||||
100101 | rs | 保留 | call rs | |||
100110 | 保留 | ret | ||||
100111 | rs | 保留 | push rs | |||
101000 | rs | 保留 | pop rs | |||
101001 | 保留 | halt | ||||
101010 | imm | int imm | ||||
101011 | 保留 | IRET | ||||
101100 | SWITCH | |||||
伪指令 | ||||||
load rs,imm |