Refactored arm package
This commit is contained in:
parent
c238e3a190
commit
f3f3ccc95f
26 changed files with 102 additions and 53 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue