Implemented multiplication

This commit is contained in:
2024-06-24 22:43:01 +02:00
parent 625e8d5e2e
commit 34af20d7a0
11 changed files with 107 additions and 47 deletions

View File

@ -39,6 +39,12 @@ func (a *Assembler) Finalize() ([]byte, []byte) {
code = x64.SubRegNum(code, operands.Register, operands.Number)
}
case MUL:
switch operands := x.Data.(type) {
case *RegisterNumber:
code = x64.MulRegNum(code, operands.Register, operands.Number)
}
case CALL:
code = x64.Call(code, 0x00_00_00_00)
size := 4