Skip to content

Cranelift: express x86 callee-save FPR correctly #1497

@iximeow

Description

@iximeow

In isa/x86/abi.rs, callee-save FPRs are represented as F64. In the only ABI we currently support with callee-save FPRs, we preserve xmm registers, which should be written more specifically as F64x2 or some other equivalently-sized type. F64 gets correct codegen out at the moment, but some optimization that tries to be clever about only preserving the low 64 bits of a callee-save register might break this in the future. It also would make the code less surprising by removing a point of confusion for the reader :)

See here, here, and here.

This was done at the time because of a missing fstDisp8 encoding allowing a REX prefix. Such an encoding might have been added in the intervening time, so hopefully this is a very simple change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    craneliftIssues related to the Cranelift code generatorcranelift:E-compiler-easyBeginner–Intermediate compiler issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions