Refactored arm package

This commit is contained in:
Eduard Urbach 2025-04-16 17:38:48 +02:00
parent c238e3a190
commit f3f3ccc95f
Signed by: eduard
GPG key ID: 49226B848C78F6C8
26 changed files with 102 additions and 53 deletions

View file

@ -100,10 +100,12 @@ func (c *armCompiler) handleCallInstruction(instruction asm.Instruction) {
pointer.Resolve = func() Address {
destination, exists := c.codeLabels[label.Name]
if !exists {
panic(fmt.Sprintf("unknown jump label %s", label.Name))
}
distance := (destination - position) / 4
distance := int(destination-position) / 4
return arm.Call(distance)
}