summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/SPARC
Commit message (Collapse)AuthorAgeFilesLines
* Add support for byte endian swapping for Word 16/32/64.Austin Seipp2013-07-171-0/+1
| | | | | | | | | | | | | * Exposes bSwap{,16,32,64}# primops * Add a new machop: MO_BSwap * Use a Stg implementation (hs_bswap{16,32,64}) for other implementation in NCG. * Generate bswap in X86 NCG for 32 and 64 bits, and for 16 bits, bswap+shr instead of using xchg. * Generate llvm.bswap intrinsics in llvm codegen. Authored-by: Vincent Hanquez <tab@snarc.org> Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Revert "Add support for byte endian swapping for Word 16/32/64."Simon Peyton Jones2013-06-111-1/+0
| | | | This reverts commit 1c5b0511a89488f5280523569d45ee61c0d09ffa.
* Add support for byte endian swapping for Word 16/32/64.Ian Lynagh2013-06-091-0/+1
| | | | | | | | | | | | * Exposes bSwap{,16,32,64}# primops * Add a new machops MO_BSwap * Use a Stg implementation (hs_bswap{16,32,64}) for other implementation in NCG. * Generate bswap in X86 NCG for 32 and 64 bits, and for 16 bits, bswap+shr instead of using xchg. * Generate llvm.bswap intrinsics in llvm codegen. Patch from Vincent Hanquez.
* Refactor cmmMakeDynamicReferenceIan Lynagh2013-05-131-1/+1
| | | | | 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 tabs (M-x untabify)Gabor Greif2013-04-071-99/+91
|
* Fix typosGabor Greif2013-04-072-3/+3
|
* Detab modules with tabs on 5 lines or fewerIan Lynagh2013-04-061-13/+6
|
* Add prefetch primops.Geoffrey Mainland2013-02-011-0/+1
|
* 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
|
* Implement word2Float# and word2Double#Johan Tibell2012-12-131-0/+2
|
* Remove OldCmm, convert backends to consume new CmmSimon Marlow2012-11-1213-51/+51
| | | | | | | | | | | | | | | | | | 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.
* Attach global register liveness info to Cmm procedures.Geoffrey Mainland2012-10-303-5/+5
| | | | | | | All Cmm procedures now include the set of global registers that are live on procedure entry, i.e., the global registers used to pass arguments to the procedure. Only global registers that are use to pass arguments are included in this list.
* Some alpha renamingIan Lynagh2012-10-161-1/+1
| | | | | Mostly d -> g (matching DynFlag -> GeneralFlag). Also renamed if* to when*, matching the Haskell if/when names
* Teach the linear register allocator how to allocate more stack if necessarySimon Marlow2012-09-201-0/+2
| | | | | | | | | This squashes the "out of spill slots" panic that occasionally happens on x86, by adding instructions to bump and retreat the C stack pointer as necessary. The panic has become more common since the new codegen, because we lump code into larger blocks, and the register allocator isn't very good at reusing stack slots for spilling (see Note [extra spill slots]).
* Move some more constants into platformConstantsIan Lynagh2012-09-143-17/+21
|
* Pass DynFlags down to wordWidthIan Lynagh2012-09-121-5/+5
|
* Pass DynFlags down to bWordIan Lynagh2012-09-126-20/+33
| | | | | | I've switched to passing DynFlags rather than Platform, as (a) it's simpler to not have to extract targetPlatform in so many places, and (b) it may be useful to have DynFlags around in future.
* Fix the PPC and SPARC NCGs to handle multiple info tables in a procSimon Marlow2012-09-071-16/+21
|
* Remove some old commented-out codeIan Lynagh2012-08-281-128/+0
|
* Move more code into codeGen/CodeGen/Platform.hsIan Lynagh2012-08-286-337/+26
| | | | | | | | HaskellMachRegs.h is no longer included in anything under compiler/ Also, includes/CodeGen.Platform.hs now includes "stg/MachRegs.h" rather than <stg/MachRegs.h> which means that we always get the file from the tree, rather than from the bootstrapping compiler.
* Fix -fPIC with the new code generatorSimon Marlow2012-08-281-3/+1
| | | | The CmmBlocks inside CmmExprs were not getting the PIC treatment
* Pass platform down to lastxmmIan Lynagh2012-08-211-2/+2
|
* Start separating out the RTS and Haskell imports of MachRegs.hIan Lynagh2012-08-061-1/+1
| | | | No functional differences yet
* Convert prefix uses of (<>) to infix <>Ian Lynagh2012-08-051-1/+1
|
* fix merge bugsSimon Marlow2012-07-301-3/+3
|
* New codegen: do not split proc-points when using the NCGSimon Marlow2012-07-301-35/+37
| | | | | | | | | Proc-point splitting is only required by backends that do not support having proc-points within a code block (that is, everything except the native backend, i.e. LLVM and C). Not doing proc-point splitting saves some compilation time, and might produce slightly better code in some cases.
* Remove pprNatCmmDecl's Platform argumentIan Lynagh2012-07-241-5/+6
|
* Remove a load of Platform argumentsIan Lynagh2012-07-181-117/+117
| | | | We don't need them any more, now that we have DynFlags inside SDoc
* Whitespace only in nativeGen/SPARC/Ppr.hsIan Lynagh2012-07-181-305/+300
|
* Make -fPIC a dynamic flagIan Lynagh2012-07-161-8/+9
| | | | | | Hopefully I've kept the logic the same, and we now generate warnings if the user does -fno-PIC but we ignore them (e.g. because they're on OS X amd64).
* Move -fno-warn-orphan flag into individual modulesIan Lynagh2012-07-151-0/+1
|
* Remove some more Platform argumentsIan Lynagh2012-06-132-12/+6
|
* Remove PlatformOutputableIan Lynagh2012-06-134-12/+8
| | | | | We can now get the Platform from the DynFlags inside an SDoc, so we no longer need to pass the Platform in.
* Use SDoc rather than Doc in the native gensIan Lynagh2012-06-122-50/+47
| | | | This avoid lots of converting back and forth between the two types.
* Add a quotRemWord2 primopIan Lynagh2012-04-211-6/+7
| | | | | | | | It allows you to do (high, low) `quotRem` d provided high < d. Currently only has an inefficient fallback implementation.
* Fix the unregisterised build; fixes #5901Ian Lynagh2012-02-271-3/+3
|
* Add a 2-word-multiply operatorIan Lynagh2012-02-241-0/+1
| | | | Currently no NCGs support it
* Add a Word add-with-carry primopIan Lynagh2012-02-231-7/+6
| | | | No special-casing in any NCGs yet
* Add a primop for unsigned quotRem; part of #5598Ian Lynagh2012-02-171-0/+1
| | | | Only amd64 has an efficient implementation currently.
* Define a quotRem CallishMachOp; fixes #5598Ian Lynagh2012-02-142-432/+410
| | | | | This means we no longer do a division twice when we are using quotRem (on platforms on which the op is supported; currently only amd64).
* de-tabbed the hs-boot filesIan Lynagh2012-01-261-9/+2
|
* Track STG live register information for use in LLVMDavid Terei2012-01-091-1/+1
| | | | | | | | | We now carry around with CmmJump statements a list of the STG registers that are live at that jump site. This is used by the LLVM backend so it can avoid unnesecarily passing around dead registers, improving perfromance. This gives us the framework to finally fix trac #4308.
* Remove unused arg field of CmmReturnDavid Terei2012-01-051-1/+1
|
* Remove unused argument field on CmmJumpDavid Terei2012-01-051-1/+1
|
* Make getDynFlags* functions use HasDynFlags/getDynFlags tooIan Lynagh2011-12-194-7/+7
|
* Get rid of the "safety" field of CmmCall (OldCmm)Simon Marlow2011-11-291-1/+1
| | | | | This field was doing nothing. I think it originally appeared in a very old incarnation of the new code generator.
* Tabs -> SpacesDavid Terei2011-11-221-184/+178
|
* Explicitly handle unsupported Cmm prim ops.David Terei2011-11-221-2/+5
|
* Fix validate by moving OPTIONS -fno-warn-tabs Validate fixed for Mac OS X ↵Thorkil Naur2011-11-071-3/+3
| | | | 10.5 and Linux. For both: compiler/nativeGen/PPC/Instr.hs compiler/nativeGen/SPARC/Instr.hs failed to (stage1) build. For Mac OS X, but mysteriously not for Linux: compiler/basicTypes/Id.lhs compiler/basicTypes/Name.lhs failed during haddock'ing.