Implemented dependency tracking

This commit is contained in:
2025-03-03 12:14:53 +01:00
parent 08660ad845
commit 751614e7c0
12 changed files with 75 additions and 69 deletions

View File

@ -1,6 +1,8 @@
package asmc
import (
"fmt"
"git.urbach.dev/cli/q/src/asm"
"git.urbach.dev/cli/q/src/x86"
)
@ -36,7 +38,7 @@ func (c *compiler) jump(x asm.Instruction) {
destination, exists := c.codeLabels[label.Name]
if !exists {
panic("unknown jump label")
panic(fmt.Sprintf("unknown jump label %s", label.Name))
}
distance := destination - (pointer.Position + Address(pointer.Size))