Skip to content

cmd/asm: MOVL $x-8(SP) and LEAL x-8(SP) are different #4997

@rsc

Description

@rsc
MOVL $x-8(SP), AX assembles to raw LEAL -8(SP), AX.
LEAL x-8(SP), AX assembles to raw LEAL (framesize-8)(SP), AX.
It's a bit confusing that they have different interpretations of x-8(SP).

Same for MOVQ on 6a.

Can wait until after Go 1 because I think I'm the only one who ever uses that form
instead of writing LEAL/LEAQ.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions