summaryrefslogtreecommitdiff
path: root/compiler/nativeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Use NatM_State record fields, rather than matching/constructing the whole typeIan Lynagh2013-05-131-12/+7
|
* Refactor cmmMakeDynamicReferenceIan Lynagh2013-05-135-20/+27
| | | | | It now has its own class, and the addImport function is defined in that class, rather than needing to be passed as an argument.
* Remove redundant cmmMakeDynamicReference' wrapperIan Lynagh2013-05-131-4/+2
|
* No need to map over all blocks, setting up PIC.Gabor Greif2013-04-131-12/+4
| | | | | Darwin x86 has inconsistent PIC base register, so splitting (which happened before) ensures that each cmm procedure only has one entry point (namely the first block).
* Make explicit that there can be only one entry pointGabor Greif2013-04-121-3/+3
| | | | | | per cmm procedure on Darwin/PPC, because of splitting. x86 should be treated the same way, I'll come back to that later.
* There can be several blocks in a PPC/ELF cmm procGabor Greif2013-04-081-8/+15
| | | | add FETCHPC to all of them (this fixes #7814).
* Remove tabs (M-x untabify)Gabor Greif2013-04-071-99/+91
|
* Fix typosGabor Greif2013-04-073-6/+6
|
* TyposGabor Greif2013-04-071-1/+1
|
* Detab modules with tabs on 5 lines or fewerIan Lynagh2013-04-062-25/+11
|
* Fix typosGabor Greif2013-04-063-3/+3
|
* Simplify away some old -dynamic-too stuff from the previous approachIan Lynagh2013-03-091-48/+33
|
* x86: promote arguments to C functions according to the ABI (#7383)Simon Marlow2013-02-231-6/+14
| | | | | | | | | I don't think the x86-64 version is quite right, but this ought to be enough to pass cgrun071. This code is terrible and needs a complete refactor. There's a lot of duplication, and we ought to be specifying the ABI in a much more abstract way (like LLVM).
* allocMoreStack: we should be retargetting table jumps too.Simon Marlow2013-02-111-3/+3
| | | | Thanks to @PHO on #7498 for pointing this out.
* Fix bugs in PPC.Instr.allocMoreStack (#7498)PHO2013-02-111-39/+85
| | | | This patch is ported from #7510, which fixes the same bug in the x86 nativeGen.
* AsmCodeGen.NcgImpl.ncgMakeFarBranches should take account of info tables (#709)PHO2013-02-022-11/+13
| | | | We have to reduce the maximum number of instructions to jump over depending on the number of info tables in a proc.
* Move AsmCodeGen.makeFarBranches to PPC.Instr (#709)PHO2013-02-022-39/+40
| | | | Its implementation is totally specific to PPC.
* Add prefetch primops.Geoffrey Mainland2013-02-013-0/+5
|
* Add support for passing SSE vectors in registers.Geoffrey Mainland2013-02-011-41/+47
| | | | | | | This patch adds support for 6 XMM registers on x86-64 which overlap with the F and D registers and may hold 128-bit wide SIMD vectors. Because there is not a good way to attach type information to STG registers, we aggressively bitcast in the LLVM back-end.
* Add the Int32X4# primitive type and associated primops.Paul Monday2013-02-011-0/+18
|
* Add the Float32X4# primitive type and associated primops.Geoffrey Mainland2013-02-011-1/+35
| | | | | | | | | | | | | This patch lays the groundwork needed for primop support for SIMD vectors. In addition to the groundwork, we add support for the FloatX4# primitive type and associated primops. * Add the FloatX4# primitive type and associated primops. * Add CodeGen support for Float vectors. * Compile vector operations to LLVM vector operations in the LLVM code generator. * Make the x86 native backend fail gracefully when encountering vector primops. * Only generate primop wrappers for vector primops when using LLVM.
* typosGabor Greif2013-01-301-1/+1
|
* Merge branch 'master' of https://github.com/ghc/ghcJohan Tibell2013-01-111-31/+24
|\
| * Update a panic messageIan Lynagh2013-01-111-1/+1
| | | | | | | | | | | | I don't actually know if suggesting -fllvm as a workaround is useful advice, but -fvia-C certainly won't help as it doesn't do anything any more.
| * Whitespace only in nativeGen/SPARC/Base.hsIan Lynagh2013-01-111-31/+24
| |
* | Add preprocessor defines when SSE is enabledJohan Tibell2013-01-101-10/+2
|/ | | | | | | | | | | This will add the following preprocessor defines when Haskell source files are compiled: * __SSE__ - If any version of SSE is enabled * __SSE2__ - If SSE2 or greater is enabled * __SSE4_2_ - If SSE4.2 is enabled Note that SSE2 is enabled by default on x86-64.
* Fix bugs in allocMoreStack (#7498, #7510)Simon Marlow2013-01-073-42/+99
| | | | | | | | | | | | | | | | | | | | | | | | There were four bugs here. Clearly I didn't test this enough to expose the bugs - it appeared to work on x86/Linux, but completely by accident it seems. 1. the delta was wrong by a factor of the slot size (as noted on #7498) 2. we weren't correctly aligning the stack pointer (sp needs to be 16-byte aligned on x86/x86_64) 3. we were doing the adjustment multiple times in the case of a block that was both a return point and a local branch target. To fix this I had to add new shim blocks to adjust the stack pointer, and retarget the original branches. See comment for details. 4. we were doing the adjustment for CALL instructions, which is unnecessary and wrong; only JMPs should be preceded by a stack adjustment. (Someone with a PPC box will need to update the PPC version of allocMoreStack to fix the above bugs, using the x86 version as a guide.)
* Small refactoring: makes it easier to see what nativeCodeGen actually doesIan Lynagh2012-12-162-65/+75
|
* PPC: Implement stack resizing for the linear register allocator.Erik de Castro Lopo2012-12-162-15/+59
| | | | Fixes #7498.
* De-tab compiler/nativeGen/PPC/Instr.hs.Erik de Castro Lopo2012-12-161-273/+266
|
* Implement word2Float# and word2Double#Johan Tibell2012-12-134-1/+28
|
* Small code tidy-upIan Lynagh2012-12-121-8/+7
|
* typoGabor Greif2012-12-121-1/+1
|
* Implement the -dynamic-too optimised path for the NCGIan Lynagh2012-12-111-32/+32
| | | | | | | | We don't yet have the slow path, for when we have to fall back to separate compilation. We also only currently handle the case qhere we're compiling Haskell code with the NCG.
* Add more plumbing to the nativeCodeGenIan Lynagh2012-12-111-30/+56
| | | | | This patch adds more of the plumbing necessary to allow the nativeGen to build multiple ways in a single compilation.
* Tweak how 'count' is handled in the nativeCodeGenIan Lynagh2012-12-111-5/+4
| | | | | We were always passing 0 to cmmNativeGenStream, so now the 0 is just hardcoded there.
* Package the NativeGen state up into a named typeIan Lynagh2012-12-111-35/+26
| | | | | This will make it a little more pleasant to have the nativegen build for multiple ways at once.
* Small refactoring: Use more idiomatic strictness forcing in AsmCodeGenIan Lynagh2012-12-111-7/+5
|
* Make nativeCodeGen return the rest of its UniqSupplyIan Lynagh2012-12-061-7/+9
|
* Haddoc fixBen Lippmeier2012-11-141-9/+9
|
* Comments and formatting to register allocator statsBen Lippmeier2012-11-141-38/+87
|
* Comments and formatting to spill cost codeBen Lippmeier2012-11-141-52/+62
|
* Comments and formatting to spill cleanerBen Lippmeier2012-11-141-147/+166
| | | | No functional changes.
* Comments and formatting to register allocatorsBen Lippmeier2012-11-145-252/+326
| | | | No functional changes.
* De-tabify register allocator codeBen Lippmeier2012-11-1410-961/+889
|
* Tell the compiler about alpha, mipseb and mipsel again; fixes #7339Ian Lynagh2012-11-135-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts the compiler parts of commit 7b594a5d7ac29972db39228e9c8b7f384313f39b Author: David Terei <davidterei@gmail.com> Date: Mon Nov 21 12:05:18 2011 -0800 Remove registerised code for dead architectures: mips, ia64, alpha, hppa1, m68k In particular, we want to know whether bewareLoadStoreAlignment should return True or False for them. It also reverts commit 3fc68b5c356b39b2b52a86d953367d0021c13262 Author: Simon Marlow <marlowsd@gmail.com> Date: Wed Jan 4 11:44:02 2012 +0000 Remove missing archs (mipseb, mipsel, alpha) (#5734) It doesn't hurt to map these to ArchUnknown since we don't need to know anything specific about them, and adding them would be a pain (there are a bunch of places where we have to case-match on all the arches to avoid warnings).
* Fix warningsSimon Marlow2012-11-122-2/+0
|
* Remove OldCmm, convert backends to consume new CmmSimon Marlow2012-11-1235-257/+277
| | | | | | | | | | | | | | | | | | This removes the OldCmm data type and the CmmCvt pass that converts new Cmm to OldCmm. The backends (NCGs, LLVM and C) have all been converted to consume new Cmm. The main difference between the two data types is that conditional branches in new Cmm have both true/false successors, whereas in OldCmm the false case was a fallthrough. To generate slightly better code we occasionally need to invert a conditional to ensure that the branch-not-taken becomes a fallthrough; this was previously done in CmmCvt, and it is now done in CmmContFlowOpt. We could go further and use the Hoopl Block representation for native code, which would mean that we could use Hoopl's postorderDfs and analyses for native code, but for now I've left it as is, using the old ListGraph representation for native code.
* Fix typosIan Lynagh2012-11-011-2/+2
|
* Whitespace only in nativeGen/NCGMonad.hsIan Lynagh2012-11-011-71/+64
|