Added CPU type

This commit is contained in:
Eduard Urbach 2024-06-21 22:16:42 +02:00
parent 1058970be3
commit 4faa1641c6
No known key found for this signature in database
GPG key ID: C874F672B1AF20C0
10 changed files with 92 additions and 28 deletions

View file

@ -6,6 +6,8 @@ import (
"strings"
"sync"
"git.akyoto.dev/cli/q/src/build/arch/x64"
"git.akyoto.dev/cli/q/src/build/cpu"
"git.akyoto.dev/cli/q/src/build/fs"
"git.akyoto.dev/cli/q/src/build/token"
"git.akyoto.dev/cli/q/src/errors"
@ -225,6 +227,11 @@ func scanFile(path string, functions chan<- *Function) error {
Head: tokens[paramsStart:bodyStart],
Body: tokens[bodyStart : i+1],
Variables: map[string]*Variable{},
CPU: cpu.CPU{
General: x64.GeneralRegisters,
Syscall: x64.SyscallRegisters,
Return: x64.ReturnValueRegisters,
},
}
nameStart = -1