Skip to content

[M68k] M68kExpandPseudo::ExpandMI and M68kInstrInfo::ExpandMOVEM incorrectly promote 8bit and 16bit registers to 32bit #106209

Closed
@TechnoElf

Description

@TechnoElf

The functions M68kExpandPseudo::ExpandMI and M68kInstrInfo::ExpandMOVEM unconditionally promote MOVEM instructions to their 32bit variant to allow collapsing multiple consecutive instructions. This optimisation, however, clashes with the representation of these values in memory. For instance, a 16bit value will still only be allocated 2 bytes on the stack, causing unrelated data to be overwritten when the 32bit MOVEM is executed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions