1. 03 Aug, 2015 1 commit
    • Michal Terepeta's avatar
      Support MO_U_QuotRem2 in LLVM backend · 92f5385d
      Michal Terepeta authored
      This adds support for MO_U_QuotRem2 in LLVM backend.  Similarly to
      MO_U_Mul2 we use the standard LLVM instructions (in this case 'udiv'
      and 'urem') but do the computation on double the word width (e.g., for
      64-bit we will do them on 128 registers).
      
      Test Plan: validate
      
      Reviewers: rwbarton, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1100
      
      GHC Trac Issues: #9430
      92f5385d
  2. 20 Jul, 2015 1 commit
    • Michal Terepeta's avatar
      LlvmCodeGen: add support for MO_U_Mul2 CallishMachOp · 82ffc80d
      Michal Terepeta authored
      This adds support MO_U_Mul2 to the LLVM backend by simply using 'mul'
      instruction but operating at twice the bit width (e.g., for 64 bit
      words we will generate mul that operates on 128 bits and then extract
      the two 64 bit values for the result of the CallishMachOp).
      
      Test Plan: validate
      
      Reviewers: rwbarton, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1068
      
      GHC Trac Issues: #9430
      82ffc80d
  3. 04 Jul, 2015 1 commit
    • Michal Terepeta's avatar
      Support MO_{Add,Sub}IntC and MO_Add2 in the LLVM backend · b1d1c652
      Michal Terepeta authored
      This includes:
      
      - Adding new LlvmType called LMStructP that represents an unpacked
        struct (this is necessary since LLVM's instructions the
        llvm.sadd.with.overflow.* return an unpacked struct).
      
      - Modifications to LlvmCodeGen.CodeGen to generate the LLVM
        instructions for the primops.
      
      - Modifications to StgCmmPrim to actually use those three instructions
        if we use the LLVM backend (so far they were only used for NCG).
      
      Test Plan: validate
      
      Reviewers: austin, rwbarton, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D991
      
      GHC Trac Issues: #9430
      b1d1c652