Skip to content
Snippets Groups Projects

Use fix-sized primops for fixed size boxed types

Merged John Ericson requested to merge wip/sized-primops-for-sized-box into master
  1. Jul 21, 2021
    • John Ericson's avatar
      Use fix-sized equality primops for fixed size boxed types · 024020c3
      John Ericson authored and John Ericson's avatar John Ericson committed
      These are the last to be converted.
      024020c3
    • John Ericson's avatar
      Fix #19931 · e8f7734d
      John Ericson authored
      The issue was the renderer for x86 addressing modes assumes native size
      registers, but we were passing in a possibly-smaller index in
      conjunction with a native-sized base pointer.
      
      The easist thing to do is just extend the register first.
      
      I also changed the other NGC backends implementing jump tables
      accordingly. On one hand, I think PowerPC and Sparc don't have the small
      sub-registers anyways so there is less to worry about. On the other
      hand, to the extent that's true the zero extension can become a no-op.
      
      I should give credit where it's due: @hsyl20 really did all the work for
      me in
      ghc/ghc!4717 (comment 355874),
      but I was daft and missed the "Oops" and so ended up spending a silly
      amount of time putting it all back together myself.
      
      The unregisterised backend change is a bit different, because here we
      are translating the actual case not a jump table, and the fix is to
      handle right-sized literals not addressing modes. But it makes sense to
      include here too because it's the same change in the subsequent commit
      that exposes both bugs.
      e8f7734d
Loading