Implemented dependency tracking

This commit is contained in:
Eduard Urbach 2025-03-03 12:14:53 +01:00
parent acfa6de1d4
commit b095a95021
Signed by: eduard
GPG key ID: 49226B848C78F6C8
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"
)
@ -21,7 +23,7 @@ func (c *compiler) call(x asm.Instruction) {
destination, exists := c.codeLabels[data.Name]
if !exists {
panic("unknown jump label")
panic(fmt.Sprintf("unknown jump label %s", data.Name))
}
distance := destination - (pointer.Position + Address(pointer.Size))

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))