Added basic support for arm64

This commit is contained in:
Eduard Urbach 2025-03-06 13:40:17 +01:00
parent cc1c990dc8
commit dfe807c2e2
Signed by: eduard
GPG key ID: 49226B848C78F6C8
25 changed files with 270 additions and 33 deletions

25
src/asmc/compileARM.go Normal file
View file

@ -0,0 +1,25 @@
package asmc
import (
"git.urbach.dev/cli/q/src/arm"
"git.urbach.dev/cli/q/src/asm"
)
func (c *compiler) compileARM(x asm.Instruction) {
switch x.Mnemonic {
// case asm.MOVE:
// switch operands := x.Data.(type) {
// case *asm.RegisterNumber:
// c.code = arm.MoveRegisterNumber(c.code, operands.Register, operands.Number)
// }
// case asm.RETURN:
// c.code = arm.Return(c.code)
// case asm.SYSCALL:
// c.code = arm.Syscall(c.code)
default:
c.code = arm.Nop(c.code)
}
}