完善龙芯指令格式注释

This commit is contained in:
chai2010
2025-11-23 23:10:38 +08:00
parent 527572b074
commit 67abc9884f

View File

@@ -3,7 +3,52 @@
package loong64
// TODO: 指令格式注释
//
// 31 10 9 5 4 0
// +-------------------------------------------------------------+ +------------+ +------------+
// | opcode | | rj | | rd | 2R-type
// +-------------------------------------------------------------+ +------------+ +------------+
//
// 31 15 14 10 9 5 4 0
// +----------------------------------------------+ +------------+ +------------+ +------------+
// | opcode | | rk | | rj | | rd | 3R-type
// +----------------------------------------------+ +------------+ +------------+ +------------+
//
// 31 20 19 15 14 10 9 5 4 0
// +-------------------------------+ +------------+ +------------+ +------------+ +------------+
// | opcode | | ra | | rk | | rj | | rd | 4R-type
// +-------------------------------+ +------------+ +------------+ +------------+ +------------+
//
// 31 18 17 10 9 5 4 0
// +-------------------------------------+ +---------------------+ +------------+ +------------+
// | opcode | | I8 | | rj | | rd | 2RI8-type
// +-------------------------------------+ +---------------------+ +------------+ +------------+
//
// 31 22 21 10 9 5 4 0
// +------------------------+ +----------------------------------+ +------------+ +------------+
// | opcode | | I12 | | rj | | rd | 2RI12-type
// +------------------------+ +----------------------------------+ +------------+ +------------+
//
// 31 24 23 10 9 5 4 0
// +-------------------+ +---------------------------------------+ +------------+ +------------+
// | opcode | | I14 | | rj | | rd | 2RI14-type
// +-------------------+ +---------------------------------------+ +------------+ +------------+
//
// 31 26 25 10 9 5 4 0
// +--------------+ +--------------------------------------------+ +------------+ +------------+
// | opcode | | I16 | | rj | | rd | 2RI16-type
// +--------------+ +--------------------------------------------+ +------------+ +------------+
//
// 31 26 25 10 9 5 4 0
// +--------------+ +--------------------------------------------+ +------------+ +------------+
// | opcode | | I21[15:0] | | rj | | I21[20:16] | 1RI21-type
// +--------------+ +--------------------------------------------+ +------------+ +------------+
//
// 31 26 25 10 9 0
// +--------------+ +--------------------------------------------+ +---------------------------+
// | opcode | | I21[15:0] | | I21[25:16] | I26-type
// +--------------+ +--------------------------------------------+ +---------------------------+
//
// 指令格式类型9种
type OpFormatType int