Skip to content

Global labels do not seem to resolve out-of-order (inside asm{} block) #111

@Emmett81

Description

@Emmett81

Hi, when I try to run the code below I get an "instruction size did not converge after iterations" error.

Placing the T and Z parts above the #ruledef makes it work. I tried working around it by renaming Z & T to ZZ & TT and placing Z=ZZ & T=TT above the #ruledef block. But then it'll throw a "unknown variable" error. That also happens without the #ruledef block.

Am I doing something wrong?

#ruledef 
{
    sub.neg {a: u32} {b: u32} {r: u32} {j: u32} => a`32 @ b`32 @ r`32 @ j`32

    jmp {j: u32} => asm { sub.neg Z Z+1 T j }
}

jmp main

T: 
#d32 0

Z:
#d32 0 
#d32 1

main:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions