diff options
author | wolfgang <unknown> | 2003-10-08 10:37:25 +0000 |
---|---|---|
committer | wolfgang <unknown> | 2003-10-08 10:37:25 +0000 |
commit | 79c93a8a30aaaa6bd940c0677d6f3c57eb727fa2 (patch) | |
tree | ad787a7ef11c2f95263ea4432a4f38d1d0813fa1 | |
parent | 2203c0cef25db52714de9bb33a5f3cde2d18b0f3 (diff) | |
download | haskell-79c93a8a30aaaa6bd940c0677d6f3c57eb727fa2.tar.gz |
[project @ 2003-10-08 10:37:25 by wolfgang]
Remove apostrophe from #error directive text, as gcc doesn't like that,
even if the #error is ifdef'd out.
All other C compilers I know claim that this is correct C :-(.
merge to stable
-rw-r--r-- | ghc/rts/Linker.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/ghc/rts/Linker.c b/ghc/rts/Linker.c index 093a791fcb..7a9e36387c 100644 --- a/ghc/rts/Linker.c +++ b/ghc/rts/Linker.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Linker.c,v 1.136 2003/10/08 09:42:34 wolfgang Exp $ + * $Id: Linker.c,v 1.137 2003/10/08 10:37:25 wolfgang Exp $ * * (c) The GHC Team, 2000-2003 * @@ -3049,7 +3049,7 @@ static int ocAllocateJumpIslands_MachO(ObjectCode* oc) if(nundefsym > 0) { #ifdef USE_MMAP - #error ocAllocateJumpIslands_MachO doesn't want USE_MMAP to be defined + #error ocAllocateJumpIslands_MachO doesnt want USE_MMAP to be defined #else oc->image = stgReallocBytes( image, oc->fileSize + islandSize * nundefsym, @@ -3467,6 +3467,23 @@ static int ocResolve_MachO(ObjectCode* oc) /* Free the local symbol table; we won't need it again. */ freeHashTable(oc->lochash, NULL); oc->lochash = NULL; + + /* + Flush the data & instruction caches. + Because the PPC has split data/instruction caches, we have to + do that whenever we modify code at runtime. + */ + { + int n = (oc->fileSize + islandSize * oc->n_islands) / 4; + unsigned long *p = (unsigned long*)oc->image; + while(n--) + { + __asm__ volatile ("dcbf 0,%0\n\tsync\n\ticbi 0,%0" + : : "r" (p)); + p++; + } + __asm__ volatile ("sync\n\tisync"); + } return 1; } |