summaryrefslogtreecommitdiff
path: root/includes/Stg.h
Commit message (Collapse)AuthorAgeFilesLines
* includes/Stg.h: remove unused 'wcStore' inlineSergei Trofimovich2014-09-011-18/+0
| | | | | | | | | | | | | | | | | | | | | Summary: Commit reverts never used addition in cbd29e0a23bb8e15033edae123d6c8fbe9740c97 I think it might make sense to take advantage of TSO/RMO/PSO models tome day. But it's highly architecture/model-dependent thus it better be implemented in per-arch Native CodeGen. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Test Plan: build-tested on UNREG-amd64 Reviewers: simonmar, austin Reviewed By: austin Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D186
* PprC: cleanup: don't emit 'FB_' / 'FE_' in via-CSergei Trofimovich2014-08-291-2/+0
| | | | | | | No need to emit (now empty) those special markers. Markers were needed only in registerised -fvia-C mode. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* [ci skip] includes: detabify/dewhitespace Stg.hAustin Seipp2014-08-201-1/+1
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Add comments to explain the change to EF_ (Trac #8965)Simon Peyton Jones2014-04-241-1/+29
|
* Be less untruthful about the prototypes of external functionsColin Watson2014-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GHC's generated C code uses dummy prototypes for foreign imports. At the moment these all claim to be (void), i.e. functions of zero arguments. On most platforms this doesn't matter very much: calls to these functions put the parameters in the usual places anyway, and (with the exception of varargs) things just work. However, the ELFv2 ABI on ppc64 optimises stack allocation (http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01149.html): a call to a function that has a prototype, is not varargs, and receives all parameters in registers rather than on the stack does not require the caller to allocate an argument save area. The incorrect prototypes cause GCC to believe that all functions declared this way can be called without an argument save area, but if the callee has sufficiently many arguments then it will expect that area to be present, and will thus corrupt the caller's stack. This happens in particular with calls to runInteractiveProcess in libraries/process/cbits/runProcess.c. The simplest fix appears to be to declare these external functions with an unspecified argument list rather than a void argument list. This is no worse for platforms that don't care either way, and allows a successful bootstrap of GHC 7.8 on little-endian Linux ppc64 (which uses the ELFv2 ABI). Fixes #8965 Signed-off-by: Colin Watson <cjwatson@debian.org> Signed-off-by: Austin Seipp <austin@well-typed.com>
* includes/Stg.h: add declarations for hs_popcnt and frindsSergei Trofimovich2014-02-171-0/+1
| | | | | | | | | | | | | | This fixes most of implicit function declarations emitted C codegen in UNREG mode. Found by adding the following to mk/build.mk: SRC_CC_OPTS += -Werror=implicit-function-declaration SRC_HC_OPTS += -optc-Werror=implicit-function-declaration Issue #8748 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Signed-off-by: Austin Seipp <austin@well-typed.com>
* Globally replace "hackage.haskell.org" with "ghc.haskell.org"Simon Marlow2013-10-011-1/+1
|
* Remove most of TailCalls.hSimon Marlow2012-12-131-4/+3
| | | | it was only needed for registerised compilation.
* Start separating out the RTS and Haskell imports of MachRegs.hIan Lynagh2012-08-061-1/+1
| | | | No functional differences yet
* Fix ASSIGN_DBL on Win64Ian Lynagh2012-03-231-4/+4
| | | | | We were comparing ALIGNMENT_DOUBLE to ALIGNMENT_LONG, but really we cared about W_ values, and sizeof(long) /= sizeof(void *) on Win64
* Typo in commentIan Lynagh2012-03-111-1/+1
|
* Tabs -> SpacesDavid Terei2011-11-221-43/+43
|
* mergeSimon Marlow2011-11-221-1/+4
|\
| * Enable pthread_getspecific() tls for LLVM compilerDavid M Peixotto2011-10-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | LLVM does not support the __thread attribute for thread local storage and may generate incorrect code for global register variables. We want to allow building the runtime with LLVM-based compilers such as llvm-gcc and clang, particularly for MacOS. This patch changes the gct variable used by the garbage collector to use pthread_getspecific() for thread local storage when an llvm based compiler is used to build the runtime.
* | Put the target platform in the settings fileIan Lynagh2011-10-191-2/+0
|/
* ARMv5 compatibility for registerized runtime changes.Stephen Blackheath2011-08-101-0/+2
| | | | | | | When the bootstrap compiler does not include this patch, you must add this line to mk/build.mk, otherwise the ARM architecture cannot be detected due to a -undef option given to the C pre-processor. SRC_HC_OPTS = -pgmP 'gcc -E -traditional'
* define INFINITY and NAN if they don't exist (#2929)Simon Marlow2010-01-271-0/+21
|
* put back F_, just in case the via-C codegen uses itSimon Marlow2009-09-101-0/+1
|
* Tidy up file headers and copyrights; point to the wiki for docsSimon Marlow2009-08-251-9/+12
| | | | | | | I've updated the wiki page about the RTS headers http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes to reflect the new layout and explain some of the rationale. All the header files now point to this page.
* RTS tidyup sweep, first phaseSimon Marlow2009-08-021-32/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first phase of this tidyup is focussed on the header files, and in particular making sure we are exposinng publicly exactly what we need to, and no more. - Rts.h now includes everything that the RTS exposes publicly, rather than a random subset of it. - Most of the public header files have moved into subdirectories, and many of them have been renamed. But clients should not need to include any of the other headers directly, just #include the main public headers: Rts.h, HsFFI.h, RtsAPI.h. - All the headers needed for via-C compilation have moved into the stg subdirectory, which is self-contained. Most of the headers for the rest of the RTS APIs have moved into the rts subdirectory. - I left MachDeps.h where it is, because it is so widely used in Haskell code. - I left a deprecated stub for RtsFlags.h in place. The flag structures are now exposed by Rts.h. - Various internal APIs are no longer exposed by public header files. - Various bits of dead code and declarations have been removed - More gcc warnings are turned on, and the RTS code is more warning-clean. - More source files #include "PosixSource.h", and hence only use standard POSIX (1003.1c-1995) interfaces. There is a lot more tidying up still to do, this is just the first pass. I also intend to standardise the names for external RTS APIs (e.g use the rts_ prefix consistently), and declare the internal APIs as hidden for shared libraries.
* Define _BSD_SOURCE in Stg.hIan Lynagh2009-06-091-0/+4
| | | | | This means that, on Linux, we get functions like gamma defined when we #include math.h
* Remove old GUM/GranSim codeSimon Marlow2009-06-021-2/+0
|
* GHC new build system megapatchIan Lynagh2009-04-261-1/+1
|
* Fix more problems caused by padding in the Capability structureSimon Marlow2008-12-021-0/+4
| | | | Fixes crashes on Windows and Sparc
* Remove #define _BSD_SOURCE from Stg.hIan Lynagh2008-10-061-3/+0
| | | | It's no longer needed, as base no longer #includes it
* Fix MacOS X build: don't believe __GNUC_GNU_INLINE__ on MacOS XSimon Marlow2008-09-181-1/+5
|
* FIX #2469: sort out our static/extern inline storySimon Marlow2008-09-161-6/+20
| | | | | | gcc has changed the meaning of "extern inline" when certain flags are on (e.g. --std=gnu99), and this broke our use of it in the header files.
* Define _BSD_SOURCE in Stg.hIan Lynagh2008-09-041-1/+5
| | | | This means S_ISSOCK gets defined on Linux
* Fix up inlines for gcc 4.3Simon Marlow2008-06-191-1/+27
| | | | | | | | | gcc 4.3 emits warnings for static inline functions that its heuristics decided not to inline. The workaround is to either mark appropriate functions as "hot" (a new attribute in gcc 4.3), or sometimes to use "extern inline" instead. With this fix I can validate with gcc 4.3 on Fedora 9.
* FIX #1861: floating-point constants for infinity and NaN in via-CSimon Marlow2008-05-121-0/+3
|
* Fix the ticky ticky buildIan Lynagh2008-04-251-0/+4
| | | | Include TickyCounters.h in Stg.h if we are doing Ticky Ticky.
* Do not #include external header files when compiling via CSimon Marlow2008-04-021-3/+6
| | | | | | | | | | | | | | | | | | | | | | | This has several advantages: - -fvia-C is consistent with -fasm with respect to FFI declarations: both bind to the ABI, not the API. - foreign calls can now be inlined freely across module boundaries, since a header file is not required when compiling the call. - bootstrapping via C will be more reliable, because this difference in behavour between the two backends has been removed. There is one disadvantage: - we get no checking by the C compiler that the FFI declaration is correct. So now, the c-includes field in a .cabal file is always ignored by GHC, as are header files specified in an FFI declaration. This was previously the case only for -fasm compilations, now it is also the case for -fvia-C too.
* Split GC.c, and move storage manager into sm/ directorySimon Marlow2006-10-241-1/+3
| | | | | | | | | | | | | | | | | In preparation for parallel GC, split up the monolithic GC.c file into smaller parts. Also in this patch (and difficult to separate, unfortunatley): - Don't include Stable.h in Rts.h, instead just include it where necessary. - consistently use STATIC_INLINE in source files, and INLINE_HEADER in header files. STATIC_INLINE is now turned off when DEBUG is on, to make debugging easier. - The GC no longer takes the get_roots function as an argument. We weren't making use of this generalisation.
* Fix mulIntMayOflo on 64-bit arches; fixes trac #867Ian Lynagh2006-09-281-1/+3
| | | | | We were assuming we could multiply 2 32-bit numbers without overflowing a 64-bit number, but we can't as the top bit is the sign bit.
* 8 byte align data. Fixes SIBGUSs on HPPA/Linux.Ian Lynagh2006-09-091-2/+2
|
* Reorganisation of the source treeSimon Marlow2006-04-071-0/+461
Most of the other users of the fptools build system have migrated to Cabal, and with the move to darcs we can now flatten the source tree without losing history, so here goes. The main change is that the ghc/ subdir is gone, and most of what it contained is now at the top level. The build system now makes no pretense at being multi-project, it is just the GHC build system. No doubt this will break many things, and there will be a period of instability while we fix the dependencies. A straightforward build should work, but I haven't yet fixed binary/source distributions. Changes to the Building Guide will follow, too.