opcodes

package
Version: v0.0.0-...-3f1fa26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ADD_Wd_Wn_imm12 = &Opcode{"add", []OpcodeChunk{OP_Exact(10, 0b000_100010_0), OP_Imm12, OP_Wn, OP_Wd}}
	ADD_Xd_Xn_imm12 = &Opcode{"add", []OpcodeChunk{OP_Exact(10, 0b100_100010_0), OP_Imm12, OP_Xn, OP_Xd}}
	ADD_Wd_Wn_Wm    = &Opcode{"add", []OpcodeChunk{OP_Exact(11, 0b000_01011_000), OP_Wm, OP_Exact(6, 0), OP_Wn, OP_Wd}}
	ADD_Xd_Xn_Xm    = &Opcode{"add", []OpcodeChunk{OP_Exact(11, 0b100_01011_000), OP_Xm, OP_Exact(6, 0), OP_Xn, OP_Xd}}

	ADDS_Wd_Wn_imm12 = &Opcode{"adds", []OpcodeChunk{OP_Exact(10, 0b001_100010_0), OP_Imm12, OP_Wn, OP_Wd}}
	ADDS_Xd_Xn_imm12 = &Opcode{"adds", []OpcodeChunk{OP_Exact(10, 0b101_100010_0), OP_Imm12, OP_Xn, OP_Xd}}

	MOVK_Wd_imm16 = &Opcode{"movk", []OpcodeChunk{OP_Exact(11, 0b011_100101_00), OP_Imm16, OP_Wd}}
	MOVK_Xd_imm16 = &Opcode{"movk", []OpcodeChunk{OP_Exact(11, 0b111_100101_00), OP_Imm16, OP_Xd}}

	SUB_Wd_Wn_imm12 = &Opcode{"sub", []OpcodeChunk{OP_Exact(10, 0b010_100010_0), OP_Imm12, OP_Wn, OP_Wd}}
	SUB_Xd_Xn_imm12 = &Opcode{"sub", []OpcodeChunk{OP_Exact(10, 0b110_100010_0), OP_Imm12, OP_Xn, OP_Xd}}
	SUB_Wd_Wn_Wm    = &Opcode{"sub", []OpcodeChunk{OP_Exact(10, 0b010_01011_00_0), OP_Wm, OP_Exact(6, 0), OP_Wn, OP_Wd}}
	SUB_Xd_Xn_Xm    = &Opcode{"sub", []OpcodeChunk{OP_Exact(10, 0b110_01011_00_0), OP_Xm, OP_Exact(6, 0), OP_Xn, OP_Xd}}

	SUBS_Wd_Wn_imm12 = &Opcode{"subs", []OpcodeChunk{OP_Exact(10, 0b011_100010_0), OP_Imm12, OP_Wn, OP_Wd}}
	SUBS_Xd_Xn_imm12 = &Opcode{"subs", []OpcodeChunk{OP_Exact(10, 0b111_100010_0), OP_Imm12, OP_Xn, OP_Xd}}
)
View Source
var ADDS = []*Opcode{
	ADDS_Wd_Wn_imm12,
	ADDS_Xd_Xn_imm12,
}
View Source
var MOVK = []*Opcode{
	MOVK_Wd_imm16,
	MOVK_Xd_imm16,
}
View Source
var SUBS = []*Opcode{
	SUBS_Wd_Wn_imm12,
	SUBS_Xd_Xn_imm12,
}

Functions

func NewOpcodeInstruction

func NewOpcodeInstruction(name string, o *Opcode, args []lib.Operand) *opcodeInstruction

func OpcodeToInstruction

func OpcodeToInstruction(name string, opcode *Opcode, operands ...lib.Operand) lib.Instruction

func OpcodesToInstruction

func OpcodesToInstruction(name string, opcodes []*Opcode, operands ...lib.Operand) lib.Instruction

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL