25 lines
496 B
Go
25 lines
496 B
Go
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)
|
|
}
|
|
}
|