- Feb 27, 2014
-
-
Simon Marlow authored
See documentation for details.
-
Simon Marlow authored
-
- Feb 20, 2014
-
-
Sergei Trofimovich authored
Found by clang: rts_dist_HC rts/dist/build/RetainerProfile.p_o rts/RetainerProfile.c:1779:5: error: implicit declaration of function 'markStableTables' is invalid in C99 [-Werror,-Wimplicit-function-declaration] markStableTables(retainRoot, NULL); Signed-off-by:
Sergei Trofimovich <slyfox@gentoo.org> Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- Feb 17, 2014
-
-
Austin Seipp authored
This should have manifested earlier, but for some reason it only seemed to trigger on Mavericks. Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
Sergei Trofimovich authored
Issue #8748 Signed-off-by:
Sergei Trofimovich <slyfox@gentoo.org> Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
Sergei Trofimovich authored
UNREG mode has quite nasty invariant to maintain: capabilities[0] == &MainCapability and it's a non-heap memory, while other capabilities are dynamically allocated. Issue #8748 Signed-off-by:
Sergei Trofimovich <slyfox@gentoo.org> Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- Feb 07, 2014
-
-
Austin Seipp authored
Following 298a25bd and #8722 as Peter mentioned, this probably isn't needed anymore. Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- Feb 05, 2014
-
-
Edward Z. Yang authored
Our old function for searching for sections could only deal with section names that were eight bytes or shorter; this patch adds support for long section names. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- Feb 04, 2014
-
-
awson authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- Jan 30, 2014
-
-
awson authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
Austin Seipp authored
As Luke Iannini reported, the Clang iOS cross compiler apparently doesn't support __thread for some bizarre reason, so unfortunately they too must fall back to pthread_{get,set}specific. Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- Jan 28, 2014
-
-
awson authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
Christiaan Baaij authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
Austin Seipp authored
This basically cleans a lot of GCTDecl up - I found it quite hard to read and a bit confusing. The changes are mostly cosmetic: better delineation between the alternative cases and light touchups, and tries to make every branch as consistent as possible. However, this patch does have one significant effect: it will ensure that any LLVM-based compilers will use __thread if they support it. Before, they would simply always use pthread_getspecific and pthread_setspecific, which are almost surely even *more* inefficient. The details are a bit too long and boring to go into here; see #7602. After talking with Simon, we decided to play it safe - __thread can at least be optimized by future clang releases even further on OS X if they choose, and it's safer until we can investigate the pthread implementation further on Mavericks. For Linux, the story isn't so bleak if you use Clang (for whatever reason) - Linux directly writes to `%fs` for __thread slots (while OS X will perform a load followed by an indirect call.) So it should still be fairly competitive, speed-wise. Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- Jan 27, 2014
-
-
awson authored
This fixes #7134 Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- Jan 16, 2014
-
-
Simon Marlow authored
We occasionally need to reserve some temporary memory in a primop for passing to a foreign function. We've been using the stack for this, but when we moved to high-level Cmm it became quite fragile because primops are in high-level Cmm and the stack is supposed to be under the control of the Cmm pipeline. So this change puts things on a firmer footing by adding a new Cmm construct 'reserve'. e.g. in decodeFloat_Int#: reserve 2 = tmp { mp_tmp1 = tmp + WDS(1); mp_tmp_w = tmp; /* Perform the operation */ ccall __decodeFloat_Int(mp_tmp1 "ptr", mp_tmp_w "ptr", arg); r1 = W_[mp_tmp1]; r2 = W_[mp_tmp_w]; } reserve is described in CmmParse.y. Unfortunately the argument to reserve must be a compile-time constant. We might have to extend the parser to allow expressions with arithmetic operators if this is too restrictive. Note also that the return instruction for the procedure must be outside the scope of the reserved stack area, so we have to extract the values from the reserved area before we close the scope. This means some more local variables (r1, r2 in the example above). The generated code is more or less identical to what we had before though.
-
- Jan 15, 2014
-
-
Arash Rouhani authored
When printing an update frame in printClosure(), it will not print the unspecific UPDATE_FRAME, instead it prints BH_UPDATE_FRAME, NORMAL_UPDATE_FRAME or MARKED_UPDATE_FRAME. Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- Jan 11, 2014
-
-
Herbert Valerio Riedel authored
Signed-off-by:
Herbert Valerio Riedel <hvr@gnu.org>
-
- Jan 07, 2014
-
-
Austin Seipp authored
Gold apparently doesn't recognize `-z origin`, only `-zorigin` it seems. Authored-by:
Ben Gamari <bgamari.foss@gmail.com> Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- Dec 31, 2013
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- Dec 09, 2013
-
-
Austin Seipp authored
On win64 sizeof(long) != sizeof(void*), so debugTrace was casting a value of incorrect size causing a validate failure. Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- Dec 05, 2013
-
-
Christopher Rodrigues authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- Dec 04, 2013
-
-
Christopher Rodrigues authored
An earlier patch fixes a bug in flushExec on linux only. This patch uses the fixed code on all operating systems. Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
parcs authored
-
parcs authored
We now do the allocation of the blackhole indirection closure inside the RTS procedure 'newCAF' instead of generating the allocation code inline in the closure body of each CAF. This slightly decreases code size in modules with a lot of CAFs. As a result of this change, for example, the size of DynFlags.o drops by ~60KB and HsExpr.o by ~100KB.
-
parcs authored
-
- Nov 30, 2013
-
-
parcs authored
-
- Nov 27, 2013
-
-
Austin Seipp authored
Instead, just don't do anything on x86/amd64, and on !x86, use either A) __clear_cache from libgcc, or B) sys_icache_invalidate for OS X (and iOS.) Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- Nov 22, 2013
-
-
Austin Seipp authored
Authored-by:
Authored-by: Luke Iannini <lukexi@me.com> Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
Arash Rouhani authored
Signed-off-by:
Arash Rouhani <rarash@student.chalmers.se> Reviewed-by:
Austin Seipp <austin@well-typed.com>
-
Austin Seipp authored
This adds code for jumping to given addresses for ARM, written by Ben Gamari. However, when allocating new infotables for bytecode (which is where this jump code occurs), we need to be sure to flush the cache on the execute pointer returned from allocateExec() - on systems like ARM, the processor won't reliably read back code or automatically cache flush, where x86 will. So we add a new flushExec primitive to call out to GCC's __builtin___clear_cache primitive, which will properly generate the correct code (nothing on x86, and a call to libgcc's __clear_cache on ARM) and make sure we use it after writing the code out. Authored-by:
Ben Gamari <bgamari.foss@gmail.com> Authored-by:
Austin Seipp <austin@well-typed.com> Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
Gabor Greif authored
-
- Nov 21, 2013
-
-
Simon Marlow authored
This creates a new C API: initLinker_ (int retain_cafs) The old initLinker() was left as-is for backwards compatibility. See documentation in Linker.h.
-
Simon Marlow authored
Retained CAFs must keep an object file alive.
-
Simon Marlow authored
This resurrects some old code and makes it work again. The idea is that we want to get an error message if we ever enter a CAF that has been GC'd, rather than following its indirection which will likely cause a segfault. Without this patch, these bugs are hard to track down in gdb, because the IND_STATIC code overwrites R1 (the pointer to the CAF) with its indirectee before jumping into bad memory, so we've lost the address of the CAF that got GC'd. Some associated refactoring while I was here.
-
- Nov 14, 2013
-
-
Duncan Coutts authored
This is the RTS part of a patch to base's topHandler to handle exiting by a signal. The intended behaviour is that on Unix, throwing ExitFailure (-sig) results in the process terminating with that signal. Previously shutdownHaskellAndSignal was only used for exiting with SIGINT due to the UserInterrupt exception. Improve shutdownHaskellAndSignal to do the signal part more carefully. In particular, it (should) now reliably terminates the process one way or another. Previusly if the signal was blocked, ignored or handled then shutdownHaskellAndSignal would actually return! Also, the topHandler code has two paths a careful shutdown and a "fast exit" where it does not give finalisers a chance to run. We want to support that mode also when we want to exit by signal. So rather than the base code directly calling stg_exit as it did before, we have a fastExit bool paramater for both shutdownHaskellAnd{Exit,Signal}.
-
Simon Marlow authored
It wasn't actually broken, but it wasn't obviously right either.
-
Simon Marlow authored
-
- Nov 02, 2013
-
-
Austin Seipp authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
takano-akio authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-