Skip to content

JP (HL) / (IX) / (IY) lifted as a memory-indirect jump #13

Description

@xusheng6

For a register-deref target, goto_or_jump() in Z80IL.py runs the operand through operand_to_il() without peel_load=True, so it emits a load:

e9   JP (HL)   ->   jump([HL].w)      # should be jump(HL)

JP (HL) jumps to the address in HL, it does not dereference it. This breaks the standard Z80 jump-table dispatch idiom.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions