Added CPU type

This commit is contained in:
2024-06-21 22:16:42 +02:00
parent 1058970be3
commit 4faa1641c6
10 changed files with 92 additions and 28 deletions

View File

@ -0,0 +1,28 @@
package x64
import "git.akyoto.dev/cli/q/src/build/cpu"
const (
rax = iota
rcx
rdx
rbx
rsp
rbp
rsi
rdi
r8
r9
r10
r11
r12
r13
r14
r15
)
const SyscallReturn = rax
var GeneralRegisters = []cpu.Register{rbx, rbp, r12, r13, r14, r15}
var SyscallRegisters = []cpu.Register{rax, rdi, rsi, rdx, r10, r8, r9}
var ReturnValueRegisters = []cpu.Register{rax, rcx, r11}