x86-64bit 0.4.6 → 0.4.6.1
raw patch · 5 files changed
+142/−142 lines, 5 filesdep ~QuickCheckdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: QuickCheck, base
API changes (from Hackage documentation)
Files
- CHANGELOG.md +93/−93
- CodeGen/X86/Tests.hs +2/−2
- LICENSE +30/−30
- README.md +13/−13
- x86-64bit.cabal +4/−4
CHANGELOG.md view
@@ -1,93 +1,93 @@-# Version 0.4.5 - -- fix build with newer base - -# Version 0.4.4 - -- export some useful data types - -# Version 0.4.3 - -- fixes to compile on GHC 7.10 and on Windows - -# Version 0.4.2 - -- fix OSX compilation - -# Version 0.4.1 - -- fix a bug which caused segmentation fault if a compiled function was called multiple times - -# Version 0.4 - -- rewrite FFI -- support calling labels -- speed up long code alignments -- bugfix: auto size calculation fix - -# Version 0.3.1 - -- use multi-byte nop operations for padding -- `preBuild` operation (may speed up code generation) -- branch-predicition friendlier if-then-else -- not-condition pattern: `N` - usage example: `j (N E)` which is the same as `j NE` -- bugfix: fix if-then-else condition - -# Version 0.3 - -- simpler API for label handling - (the idea of labels as De-Bruijn indices is abandoned) - -# Version 0.2 - -- simpler API for immediate values: `Add ax, 1` -- redesigned addressing API: `Add ax (addr $ rax + 4*rdi + 3)` -- support near jumps -- support automatic decision between short and near jumps (conditional jumps too) -- support more registers and instructions: - - cmovCC instructions - - SSE registers: xmm0 - xmm7 - - SSE instructions: movd, movq, movdqa, paddb, paddw, paddd, paddq, psubb, psubw, psubd, psubq, pxor - - SSE instructions (partial support): psllw, pslld, psllq, pslldq, psrlw, psrld, psrlq, psrldq, psraw, psraq -- bugfixes - - throw an error if an immediate value does not fit - - fix show instance of shift instructions - -# Version 0.1.4 - -- OS X operating system support (Balázs Kőműves) -- better show for db -- bugfix - - save flags in traceReg - -# Version 0.1.3 - -- jmpq instruction support (George Stelle) -- support near conditional jumps -- support automatic decision between short and near conditional jumps for backward references -- support alternative condition names -- make possible to use labels as relative immediate values (not used yet) -- bugfix - - fail if a short jump is out of range - -# Version 0.1.2 - -- Windows operating system support (Balázs Kőműves) -- GHC 7.10 support -- TODO.md file added - -# Version 0.1.1.1 - -- change dependencies to reflect that the package compiles only with ghc 8 -- add 'tested-with: GHC == 8.0.1' to the cabal file - -# Version 0.1.1 - -- examples moved into the library -- more Haddock comments -- add cabal test suit -- bugfixes - - fix code generation for alignments - - smaller code is generated now for 'add rax, 100' and similar instrcutions - +# Version 0.4.5++- fix build with newer base++# Version 0.4.4++- export some useful data types ++# Version 0.4.3++- fixes to compile on GHC 7.10 and on Windows++# Version 0.4.2++- fix OSX compilation++# Version 0.4.1++- fix a bug which caused segmentation fault if a compiled function was called multiple times++# Version 0.4++- rewrite FFI+- support calling labels+- speed up long code alignments+- bugfix: auto size calculation fix++# Version 0.3.1++- use multi-byte nop operations for padding+- `preBuild` operation (may speed up code generation)+- branch-predicition friendlier if-then-else+- not-condition pattern: `N` + usage example: `j (N E)` which is the same as `j NE`+- bugfix: fix if-then-else condition++# Version 0.3++- simpler API for label handling + (the idea of labels as De-Bruijn indices is abandoned)++# Version 0.2++- simpler API for immediate values: `Add ax, 1`+- redesigned addressing API: `Add ax (addr $ rax + 4*rdi + 3)`+- support near jumps+- support automatic decision between short and near jumps (conditional jumps too)+- support more registers and instructions:+ - cmovCC instructions+ - SSE registers: xmm0 - xmm7+ - SSE instructions: movd, movq, movdqa, paddb, paddw, paddd, paddq, psubb, psubw, psubd, psubq, pxor+ - SSE instructions (partial support): psllw, pslld, psllq, pslldq, psrlw, psrld, psrlq, psrldq, psraw, psraq+- bugfixes+ - throw an error if an immediate value does not fit+ - fix show instance of shift instructions++# Version 0.1.4++- OS X operating system support (Balázs Kőműves)+- better show for db+- bugfix+ - save flags in traceReg++# Version 0.1.3++- jmpq instruction support (George Stelle)+- support near conditional jumps+- support automatic decision between short and near conditional jumps for backward references+- support alternative condition names+- make possible to use labels as relative immediate values (not used yet)+- bugfix+ - fail if a short jump is out of range++# Version 0.1.2++- Windows operating system support (Balázs Kőműves)+- GHC 7.10 support+- TODO.md file added++# Version 0.1.1.1++- change dependencies to reflect that the package compiles only with ghc 8+- add 'tested-with: GHC == 8.0.1' to the cabal file++# Version 0.1.1++- examples moved into the library+- more Haddock comments+- add cabal test suit+- bugfixes+ - fix code generation for alignments+ - smaller code is generated now for 'add rax, 100' and similar instrcutions+
CodeGen/X86/Tests.hs view
@@ -242,8 +242,8 @@ And_{} -> mk (.&.) Sub_{} -> mk (-) Xor_{} -> mk xor- Cmp_{} -> mk_ (-) (const a)- Test_{} -> mk_ (.&.) (const a)+ Cmp_{} -> mk_ (-) const+ Test_{} -> mk_ (.&.) const Mov_{} -> \a b -> ((c, False), b) Shl_{} -> \a b -> let i = fromIntegral (b .&. shiftMask)
LICENSE view
@@ -1,30 +1,30 @@-Copyright (c) 2016, Péter Diviánszky - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of Péter Diviánszky nor the names of other - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Copyright (c) 2016, Péter Diviánszky++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++ * Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++ * Redistributions in binary form must reproduce the above+ copyright notice, this list of conditions and the following+ disclaimer in the documentation and/or other materials provided+ with the distribution.++ * Neither the name of Péter Diviánszky nor the names of other+ contributors may be used to endorse or promote products derived+ from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
README.md view
@@ -1,13 +1,13 @@-# x86-64 - -The primary goal of x86-64 is to provide a lightweight assembler for machine generated 64 bit x86 assembly instructions. - -Features: - -- The size of operands are statically checked. For example, exchanging `rax` with `eax` raises a compile time error rather than a code-generation time error. As a consequence, code generation is faster because the sizes are statically known. -- Quickcheck tests: You can quickcheck your x86 processor! Please report failures, there is a higher chance that the error is in this library rather than in your processor. -- Immediate values are automatically converted to smaller size if possible. -- Automatic calculation of short and near distances - -The package is available on HackageDB: http://hackage.haskell.org/package/x86-64bit - +# x86-64++The primary goal of x86-64 is to provide a lightweight assembler for machine generated 64 bit x86 assembly instructions.++Features:++- The size of operands are statically checked. For example, exchanging `rax` with `eax` raises a compile time error rather than a code-generation time error. As a consequence, code generation is faster because the sizes are statically known.+- Quickcheck tests: You can quickcheck your x86 processor! Please report failures, there is a higher chance that the error is in this library rather than in your processor.+- Immediate values are automatically converted to smaller size if possible.+- Automatic calculation of short and near distances++The package is available on HackageDB: http://hackage.haskell.org/package/x86-64bit+
x86-64bit.cabal view
@@ -1,5 +1,5 @@ name: x86-64bit-version: 0.4.6+version: 0.4.6.1 homepage: https://github.com/divipp/x86-64 synopsis: Runtime code generation for x86 64 bit machine code description: The primary goal of x86-64bit is to provide a lightweight assembler for machine generated 64 bit x86 assembly instructions. See README.md for further details.@@ -53,7 +53,7 @@ ScopedTypeVariables build-depends:- base >= 4.8 && <4.14,+ base >= 4.8 && <4.15, monads-tf >= 0.1 && <0.2, tardis >= 0.4 && <0.5, vector >= 0.11 && <0.13,@@ -75,11 +75,11 @@ CodeGen.X86.Tests build-depends:- base >= 4.8 && <4.14,+ base >= 4.8 && <4.15, monads-tf >= 0.1 && <0.2, tardis >= 0.4 && <0.5, vector >= 0.11 && <0.13,- QuickCheck >= 2.8 && <2.14,+ QuickCheck >= 2.8 && <2.15, deepseq if os(windows)