Skip to content

(lifting) fix AF modifications updating flags #9

Description

@samrussell

Current lifting is broken, implementation is here:

    elif decoded.op == OP.POP:
        # possible operands are: af bc de hl ix iy
        flag_write_type = '*' if oper_val == REG.AF else None

        size = REG_TO_SIZE[oper_val]
        tmp = il.pop(size)
        tmp = il.set_reg(size, reg2str(oper_val), tmp, flag_write_type)
        il.append(tmp)

But the flag lifter watches for LLIL_POP (which doesn't trigger flags) instead of LLIL_LOAD ( which does trigger flags)

We'll also need to look closer at the ld lifter to make sure any time we're loading into AF (including the ex opcode) we tell it to do all flags, otherwise none

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