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

Saturating casts between integers and floats #45205

Merged
merged 7 commits into from
Nov 8, 2017

Commits on Nov 7, 2017

  1. Saturating casts between integers and floats (both directions).

    This affects regular code generation as well as constant evaluation in trans,
    but not the HIR constant evaluator because that one returns an error for
    overflowing casts and NaN-to-int casts. That error is conservatively
    correct and we should be careful to not accept more code in constant
    expressions.
    The changes to code generation are guarded by a new -Z flag, to be able
    to evaluate the performance impact. The trans constant evaluation changes
    are unconditional because they have no run time impact and don't affect
    type checking either.
    Robin Kruppe committed Nov 7, 2017
    Configuration menu
    Copy the full SHA
    0d6b52c View commit details
    Browse the repository at this point in the history
  2. Fix bug in rustc_apfloat

    Robin Kruppe committed Nov 7, 2017
    Configuration menu
    Copy the full SHA
    964ba2a View commit details
    Browse the repository at this point in the history
  3. Extract (f32::MAX + 0.5 ULP) constant

    Robin Kruppe committed Nov 7, 2017
    Configuration menu
    Copy the full SHA
    e999e7b View commit details
    Browse the repository at this point in the history
  4. Make trans const eval error on overflow and NaN, matching HIR const e…

    …val.
    Robin Kruppe committed Nov 7, 2017
    Configuration menu
    Copy the full SHA
    354a5cb View commit details
    Browse the repository at this point in the history
  5. Implement more efficient saturation

    Robin Kruppe committed Nov 7, 2017
    Configuration menu
    Copy the full SHA
    0a843df View commit details
    Browse the repository at this point in the history
  6. Clean up

    Robin Kruppe committed Nov 7, 2017
    Configuration menu
    Copy the full SHA
    ce46649 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2017

  1. Disable u128 <-> float tests on emscripten

    Robin Kruppe committed Nov 8, 2017
    Configuration menu
    Copy the full SHA
    ef0b999 View commit details
    Browse the repository at this point in the history