q/src/x86/Registers.go

34 lines
782 B
Go

package x86
import "git.urbach.dev/cli/q/src/cpu"
const (
RAX cpu.Register = iota
RCX
RDX
RBX
RSP
RBP
RSI
RDI
R8
R9
R10
R11
R12
R13
R14
R15
)
var (
AllRegisters = []cpu.Register{RAX, RCX, RDX, RBX, RSP, RBP, RSI, RDI, R8, R9, R10, R11, R12, R13, R14, R15}
SyscallInputRegisters = []cpu.Register{RAX, RDI, RSI, RDX, R10, R8, R9}
SyscallOutputRegisters = []cpu.Register{RAX, RCX, R11}
GeneralRegisters = []cpu.Register{RBX, R12, R13, R14, R15, RCX, R11}
InputRegisters = SyscallInputRegisters
OutputRegisters = SyscallInputRegisters
WindowsInputRegisters = []cpu.Register{RCX, RDX, R8, R9}
WindowsOutputRegisters = []cpu.Register{RAX}
WindowsVolatileRegisters = []cpu.Register{RCX, RDX, R8, R9, R10, R11}
)