Add subWordC# on x86ish
authorNikita Karetnikov <nikita@karetnikov.org>
Sat, 31 Oct 2015 11:27:54 +0000 (12:27 +0100)
committerBen Gamari <ben@smart-cactus.org>
Sat, 31 Oct 2015 15:40:38 +0000 (16:40 +0100)
commit8160f42b8dad33e47b4c73ed3f9bf889462e7bfe
tree0752990875cffaac175c28b3a761b1509862af4b
parent62f0fbc943307d8522e6c8333caf37c6569ee873
Add subWordC# on x86ish

This adds a subWordC# primop which implements subtraction with overflow
reporting.

Reviewers: tibbe, goldfire, rwbarton, bgamari, austin, hvr

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1334

GHC Trac Issues: #10962
14 files changed:
compiler/cmm/CmmMachOp.hs
compiler/cmm/PprC.hs
compiler/codeGen/StgCmmPrim.hs
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
compiler/nativeGen/PPC/CodeGen.hs
compiler/nativeGen/SPARC/CodeGen.hs
compiler/nativeGen/X86/CodeGen.hs
compiler/prelude/primops.txt.pp
libraries/base/GHC/Natural.hs
libraries/integer-gmp/src/GHC/Integer/Type.hs
testsuite/tests/numeric/should_run/T10962.hs [new file with mode: 0644]
testsuite/tests/numeric/should_run/T10962.stdout-ws-32 [new file with mode: 0644]
testsuite/tests/numeric/should_run/T10962.stdout-ws-64 [new file with mode: 0644]
testsuite/tests/numeric/should_run/all.T