- 25 Mar, 2006 1 commit
-
-
wolfgang.thaller@gmx.net authored
... again. For now, I've added a TODO comment, but sooner or later this will have to be made gcc-version-independent.
-
- 22 Mar, 2006 2 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
We need to use GNUC3_ATTRIBUTE(used) to force gcc to keep the definition of StgRunIsImplementedInAssembler() around. In some cases we had already made this function external rather than static to get around the problem, but GNUC3_ATTRIBUTE(used) is a better fix.
-
- 28 Feb, 2006 1 commit
-
-
Simon Marlow authored
Now that we can handle using C argument registers as global registers, extend the x86_64 register mapping. We now have 5 integer argument registers, 4 float, and 2 double (all caller-saves). This results in a reasonable speedup on x86_64.
-
- 17 Jan, 2006 1 commit
-
-
wolfgang authored
Darwin/PPC: Make StgRunIsImplementedInAssembler non-static; gcc has recently acquired a habit of dead-stripping it. MERGE TO STABLE
-
- 18 Nov, 2005 1 commit
-
-
simonmar authored
Two improvements to the SMP runtime: - support for 'par', aka sparks. Load balancing is very primitive right now, but I have seen programs that go faster using par. - support for backing off when a thread is found to be duplicating a computation currently underway in another thread. This also fixes some instability in SMP, because it turned out that when an update frame points to an indirection, which can happen if a thunk is under evaluation in multiple threads, then after GC has shorted out the indirection the update will trash the value. Now we suspend the duplicate computation to the heap before this can happen. Additionally: - stack squeezing is separate from lazy blackholing, and now only happens if there's a reasonable amount of squeezing to be done in relation to the number of words of stack that have to be moved. This means we won't try to shift 10Mb of stack just to save 2 words at the bottom (it probably never happened, but still). - update frames are now marked when they have been visited by lazy blackholing, as per the SMP paper. - cleaned up raiseAsync() a bit.
-
- 26 Oct, 2005 1 commit
-
-
simonmar authored
- change the type of StgRun(): now we return the Capability that the thread currently holds. The return status of the thread is now stored in cap->r.rRet (a new slot in the reg table). This was necessary because on return from StgRun(), the current TSO may be blocked, so it no longer belongs to us. If it is a bound thread, then the Task may have been already woken up on another Capability, so the scheduler can't use task->cap to find the capability it currently owns. - when shutting down, allow a bound thread to remove its TSO from the run queue when exiting (eliminates an error condition in releaseCapability()).
-
- 24 Oct, 2005 1 commit
-
-
simonmar authored
Fix a warning
-
- 11 Sep, 2005 1 commit
-
-
wolfgang authored
Darwin/x86: Align the stack correctly when entering Haskell code.
-
- 09 Jun, 2005 1 commit
-
-
wolfgang authored
Registerised support for Darwin/x86, both NCG and mangled. *) -fPIC doesn't work yet with -fvia-C. *) Apple officially requires the stack to be 16-byte-aligned, GHC ignores this for now.
-
- 30 Mar, 2005 1 commit
-
-
simonmar authored
Hack around a nasty bug on x86_64, caused by failing to align %rsp correctly at a C call. See the comment for details.
-
- 28 Jan, 2005 1 commit
-
-
simonmar authored
Rationalise the BUILD,HOST,TARGET defines. Recall that: - build is the platform we're building on - host is the platform we're running on - target is the platform we're generating code for The change is that now we take these definitions as applying from the point of view of the particular source code being built, rather than the point of view of the whole build tree. For example, in RTS and library code, we were previously testing the TARGET platform. But under the new rule, the platform on which this code is going to run is the HOST platform. TARGET only makes sense in the compiler sources. In practical terms, this means that the values of BUILD, HOST & TARGET may vary depending on which part of the build tree we are in. Actual changes: - new file: includes/ghcplatform.h contains platform defines for the RTS and library code. - new file: includes/ghcautoconf.h contains the autoconf settings only (HAVE_BLAH). This is so that we can get hold of these settings independently of the platform defines when necessary (eg. in GHC). - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h. - MachRegs.h, which is included into both the compiler and the RTS, now has to cope with the fact that it might need to test either _TARGET_ or _HOST_ depending on the context. - the compiler's Makefile now generates stage{1,2,3}/ghc_boot_platform.h which contains platform defines for the compiler. These differ depending on the stage, of course: in stage2, the HOST is the TARGET of stage1. This was wrong before. - The compiler doesn't get platform info from Config.hs any more. Previously it did (sometimes), but unless we want to generate a new Config.hs for each stage we can't do this. - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically in CPP'd Haskell source. - ghcplatform.h defines *_TARGET_* for backwards compatibility (ghcplatform.h is included by ghcconfig.h, which is included by config.h, so code which still #includes config.h will get the TARGET settings as before). - The Users's Guide is updated to mention *_HOST_* rather than *_TARGET_*. - coding-style.html in the commentary now contains a section on platform defines. There are further doc updates to come. Thanks to Wolfgang Thaller for pointing me in the right direction.
-
- 23 Jan, 2005 1 commit
-
-
wolfgang authored
Add support for the dead code stripping feature of recent Apple linkers. If your code is compiled using the NCG, you can now specify -optl-W,-dead_strip on the GHC command line when linking. It will have basically the same effect as using split-objs to build the libraries. Advantages over split-objs: * No evil perl script involved * Requires no special handling when building libraries Disadvantages: * The current version of Apple's linker is slow when given the -dead_strip flag. _REALLY_ slow. * Mac OS X only. This works by making the NCG emit the .subsections_via_symbols directive. Additionally, we have to add an extra label at the top of every info table, and make sure that the entry code references it (otherwise the info table will be considered part of the preceding entry code). The mangler just removes the .subsections_via_symbols directive.
-
- 22 Nov, 2004 1 commit
-
-
desrt authored
#ifdef powerpc64: fixed errors in run/return code revealed by testing
-
- 21 Nov, 2004 1 commit
-
-
desrt authored
Added an StgRun for powerpc64/Linux Fixed a typo in the code for powerpc32 Linux and Darwin
-
- 12 Sep, 2004 1 commit
-
-
panne authored
Removed the annoying "Id" CVS keywords, they're a real PITA when it comes to merging...
-
- 03 Sep, 2004 1 commit
-
-
simonmar authored
Cleanup: all (well, most) messages from the RTS now go through the functions in RtsUtils: barf(), debugBelch() and errorBelch(). The latter two were previously called belch() and prog_belch() respectively. See the comments for the right usage of these message functions. One reason for doing this is so that we can avoid spurious uses of stdout/stderr by Haskell apps on platforms where we shouldn't be using them (eg. non-console apps on Windows).
-
- 13 Aug, 2004 2 commits
- 10 Dec, 2003 1 commit
-
-
wolfgang authored
PowerPC Linux support for registerised compilation and native code generation. (object splitting and GHCi are still unsupported). Code for other platforms is not affected, so MERGE TO STABLE.
-
- 29 Aug, 2003 1 commit
-
-
simonmar authored
Oops, forgot one file in the x86_64 commit.
-
- 09 Jun, 2003 1 commit
-
-
matthewc authored
Update IA64 port to work with gcc 3.3.
-
- 31 Jan, 2003 1 commit
-
-
wolfgang authored
PowerPC bugfix: Don't forget to save GPR13 (Thanks to Ashley Yakeley for reporting this) MERGE TO STABLE
-
- 11 Dec, 2002 1 commit
-
-
simonmar authored
Merge the eval-apply-branch on to the HEAD ------------------------------------------ This is a change to GHC's evaluation model in order to ultimately make GHC more portable and to reduce complexity in some areas. At some point we'll update the commentary to describe the new state of the RTS. Pending that, the highlights of this change are: - No more Su. The Su register is gone, update frames are one word smaller. - Slow-entry points and arg checks are gone. Unknown function calls are handled by automatically-generated RTS entry points (AutoApply.hc, generated by the program in utils/genapply). - The stack layout is stricter: there are no "pending arguments" on the stack any more, the stack is always strictly a sequence of stack frames. This means that there's no need for LOOKS_LIKE_GHC_INFO() or LOOKS_LIKE_STATIC_CLOSURE() any more, and GHC doesn't need to know how to find the boundary between the text and data segments (BIG WIN!). - A couple of nasty hacks in the mangler caused by the neet to identify closure ptrs vs. info tables have gone away. - Info tables are a bit more complicated. See InfoTables.h for the details. - As a side effect, GHCi can now deal with polymorphic seq. Some bugs in GHCi which affected primitives and unboxed tuples are now fixed. - Binary sizes are reduced by about 7% on x86. Performance is roughly similar, some programs get faster while some get slower. I've seen GHCi perform worse on some examples, but haven't investigated further yet (GHCi performance *should* be about the same or better in theory). - Internally the code generator is rather better organised. I've moved info-table generation from the NCG into the main codeGen where it is shared with the C back-end; info tables are now emitted as arrays of words in both back-ends. The NCG is one step closer to being able to support profiling. This has all been fairly thoroughly tested, but no doubt I've messed up the commit in some way.
-
- 13 Jun, 2002 1 commit
-
-
wolfgang authored
added a clarifying comment to the PowerPC version
-
- 07 Jun, 2002 1 commit
-
-
matthewc authored
STG to machine register mapping for IA64.
-
- 03 Jun, 2002 1 commit
-
-
matthewc authored
Initial mangling and tailcalls support for IA64. Function prologues and epilogues are deleted and we use a single register stack frame throughout (with a little register renaming in the mangler...) Dropthrough from fast to slow entry point is also implemented. Tailcalls are marked and converted into jumps at mangle time.
-
- 21 May, 2002 1 commit
-
-
wolfgang authored
Bug-fixes for PowerPC *) Rewrote StgRun in assembler (that seems to be the cleanest way to get it to work). *) Fixed a small typo in createAdjustor.
-
- 18 Apr, 2002 1 commit
-
-
ken authored
Save $gp in StgRun() on the Alpha
-
- 26 Mar, 2002 1 commit
-
-
simonmar authored
Changes to support powerpc-apple-darwin From: Wolfgang Thaller <wolfgang.thaller@gmx.net>
-
- 28 Feb, 2002 1 commit
-
-
sof authored
make sure stdout is flushed; unused arg wibble
-
- 08 Feb, 2002 1 commit
-
-
sewardj authored
Back out rev 1.28. In retrospect saving the pre-messed-with %esp in a global location is thread/reentrancy unsafe and a brain-dead thing to do, and we can't think of a clean way to fix this. So am backing it out.
-
- 06 Feb, 2002 1 commit
-
-
sewardj authored
x86 only: make %esp be 8-aligned before entering HC-world code. This avoids misalignment penalties for C doubles stored on the C stack. A quick test using nofib/imaginary/rfib shows that getting this wrong increases run time by about 10% on our 1 GHz PIII.
-
- 07 Jan, 2002 1 commit
-
-
ken authored
On the alpha, __divq() in libc.a clobbers $s6, so StgRun() needs to save $s6. While we are at it, let us save $f8 and $f9 as well. MERGE TO STABLE
-
- 14 Aug, 2001 1 commit
-
-
sewardj authored
Change the story about POSIX headers in C compilation. Until now, all C code in the RTS and library cbits has by default been compiled with settings for POSIXness enabled, that is: #define _POSIX_SOURCE 1 #define _POSIX_C_SOURCE 199309L #define _ISOC9X_SOURCE If you wanted to negate this, you'd have to define NON_POSIX_SOURCE before including headers. This scheme has some bad effects: * It means that ccall-unfoldings exported via interfaces from a module compiled with -DNON_POSIX_SOURCE may not compile when imported into a module which does not -DNON_POSIX_SOURCE. * It overlaps with the feature tests we do with autoconf. * It seems to have caused borkage in the Solaris builds for some considerable period of time. The New Way is: * The default changes to not-being-in-Posix mode. * If you want to force a C file into Posix mode, #include as the **first** include the new file ghc/includes/PosixSource.h. Most of the RTS C sources have this include now. * NON_POSIX_SOURCE is almost totally expunged. Unfortunately we have to retain some vestiges of it in ghc/compiler so that modules compiled via C on Solaris using older compilers don't break.
-
- 07 Aug, 2001 1 commit
-
-
ken authored
Fixed (I hope, and have reason to believe) mysterious segfaulting problem on the Alpha. The problem (I hope, and have reason to believe) was that, during a few instructions, the register saving/restoring code in StgRun() places data below the current SP value. (I.e., it should first reserve stack space, then put data in said space, rather than first put data in, then reserve the space.) "The SP value might be used by the hardware when raising exceptions and asynchronous interrupts. It must be assumed that the contents of the stack below the current SP value and within the stack for the current thread are continually and unpredictably modified, as specified in the _Alpha Architecture Reference Manual_, and as a result of asynchronous software actions." -- Compaq Computer Corporation, Houston. Tru64 UNIX Calling Standard for Alpha Systems, 5.1 edition, August 2000, section 3.2.1. http://www. tru64unix.compaq.com/docs/base_doc/DOCUMENTATION/V51_PDF/ARH9MBTE.PDF
-
- 24 Jul, 2001 1 commit
-
-
ken authored
Fix typo in StgRun() for the Alpha
-
- 04 Dec, 2000 1 commit
-
-
simonmar authored
merge recent changes from before-ghci-branch onto the HEAD
-
- 13 Nov, 2000 2 commits