Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: retrieve immediates in new backend #2251

Merged
merged 4 commits into from
Oct 7, 2020

Commits on Oct 7, 2020

  1. refactor: move DataValue from cranelift-reader to cranelift-codegen

    This is no change to functionality; the move is necessary in order to return InstructionData immediates in a structure way (see next commit).
    abrown committed Oct 7, 2020
    Configuration menu
    Copy the full SHA
    faa6643 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bb65ad4 View commit details
    Browse the repository at this point in the history
  3. refactor: change LowerCtx::get_immediate to return a DataValue

    This change abstracts away (from the perspective of the new backend) how immediate values are stored in InstructionData. It gathers large immediates from necessary places (e.g. constant pool) and delegates to `InstructionData::imm_value` for the rest. This refactor only touches original users of `LowerCtx::get_immediate` but a future change could do the same for any place the new backend is accessing InstructionData directly to retrieve immediates.
    abrown committed Oct 7, 2020
    Configuration menu
    Copy the full SHA
    b7afac9 View commit details
    Browse the repository at this point in the history
  4. Switch DataValue to use Ieee32/Ieee64

    As discussed in bytecodealliance#2251, in order to be very confident that NaN signaling bits are correctly handled by the compiler, this switches `DataValue` to use Cranelift's `Ieee32` and `Ieee64` structures. This makes it a bit more inconvenient to interpreter Cranelift FP operations but this should change to something like `rustc_apfloat` in the future.
    abrown committed Oct 7, 2020
    Configuration menu
    Copy the full SHA
    3c0fe89 View commit details
    Browse the repository at this point in the history