Skip to content

[Bug]: default 64-bit operand size rule not applied #125

Backlog

Description

@pkhuong

Description

The SDM's prose says that, in 64-bit mode, PUSH, POP, PUSHF, POPF, ENTER, and LEAVE default to 64-bit operand size (instead of 32), even in the absence of REX.W. AFAIU, this makes it impossible to have any operand size except 64 or 16 bits.

However, in https://github.com/intel/SDM/blob/35eface1b7ee003a1cda95005ec5fd83de658a64/data/instruction/POP.xml, I find <encoding-size name="operand_size" size="16/32/64"/>, and Fetch_And_Execute (and its callees) doesn't seem to special case these instructions before context.operand_size := Operand_Size(context);

The result is that 64-bit operations are naively interpreted as working on 32-bit operands when we try to follow the code in the release.

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