Improved assembler
This commit is contained in:
39
src/build/arch/arm64/Registers.go
Normal file
39
src/build/arch/arm64/Registers.go
Normal file
@ -0,0 +1,39 @@
|
||||
package register
|
||||
|
||||
import "git.akyoto.dev/cli/q/src/build/cpu"
|
||||
|
||||
const (
|
||||
X0 cpu.Register = iota
|
||||
X1
|
||||
X2
|
||||
X3
|
||||
X4
|
||||
X5
|
||||
X6
|
||||
X7
|
||||
X8
|
||||
X9
|
||||
X10
|
||||
X11
|
||||
X12
|
||||
X13
|
||||
X14
|
||||
X15
|
||||
X16
|
||||
X17
|
||||
X18
|
||||
X19
|
||||
X20
|
||||
X21
|
||||
X22
|
||||
X23
|
||||
X24
|
||||
X25
|
||||
X26
|
||||
X27
|
||||
X28
|
||||
X29
|
||||
X30
|
||||
)
|
||||
|
||||
var SyscallArgs = []cpu.Register{X8, X0, X1, X2, X3, X4, X5}
|
@ -1,9 +0,0 @@
|
||||
package register
|
||||
|
||||
import "git.akyoto.dev/cli/q/src/build/cpu"
|
||||
|
||||
const (
|
||||
SyscallReturn = 0
|
||||
)
|
||||
|
||||
var SyscallArgs = []cpu.Register{8, 0, 1, 2, 3, 4, 5}
|
@ -3,7 +3,7 @@ package x64
|
||||
import "git.akyoto.dev/cli/q/src/build/cpu"
|
||||
|
||||
const (
|
||||
RAX = iota
|
||||
RAX cpu.Register = iota
|
||||
RCX
|
||||
RDX
|
||||
RBX
|
||||
@ -21,8 +21,6 @@ const (
|
||||
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}
|
||||
|
Reference in New Issue
Block a user