Implemented multiplication

This commit is contained in:
Eduard Urbach 2024-06-24 22:43:01 +02:00
parent 81fcb50e77
commit 432397043d
Signed by: eduard
GPG key ID: 49226B848C78F6C8
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