Skip to content

Commit de4ad6b96434592b9da6a286d717794b5d5f5cf8 broke Dynarmic #206

@Tachi107

Description

@Tachi107

Hi!

It seems that commit de4ad6b, "strictly check the size of general registers", broke the dynamic ARM recompiler Dynarmic.

In particular, the new check in opMR which throws ERR_BAD_MEM_SIZE is what broke it.

        void opMR(const Address& addr, const Reg& r, uint64_t type, int code, uint64_t type2 = 0, int code2 = NONE)
        {
                if (code2 == NONE) code2 = code;
                if (type2 && opROO(Reg(), addr, r, type2, code2)) return;
                if (addr.is64bitDisp()) XBYAK_THROW(ERR_CANT_USE_64BIT_DISP)
+               if (!(type & T_ALLOW_DIFF_SIZE) && r.getBit() <= BIT && addr.getBit() > 0 && addr.getBit() != r.getBit()) XBYAK_THROW(ERR_BAD_MEM_SIZE)
                bool rex2 = rex(addr, r, type);
                writeCode(type, r, code, rex2);
                opAddr(addr, r.getIdx());

I'm not really familiar with how Dynarmic uses Xbyak, but it'd be great to get this fixed nonetheless!

Bye :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions