From: simonmar Date: Fri, 19 Apr 2002 12:27:51 +0000 (+0000) Subject: [project @ 2002-04-19 12:27:51 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~2134 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b45a6d2d410e10f971086e3d8269f444d1823268;p=ghc-hetmet.git [project @ 2002-04-19 12:27:51 by simonmar] MacOS/X fixes, from Wolfgang Thaller. --- diff --git a/ghc/rts/Adjustor.c b/ghc/rts/Adjustor.c index b38e72d..b0448c7 100644 --- a/ghc/rts/Adjustor.c +++ b/ghc/rts/Adjustor.c @@ -329,7 +329,20 @@ TODO: Depending on how much allocation overhead stgMallocBytes uses for adj_code[11] = 0x4e800420; //bctr adj_code[12] = (unsigned long)hptr; - //MakeDataExecutable(adjustor,4*13); // don't know if it is _really_ necessary + // Flush the Instruction cache: + // MakeDataExecutable(adjustor,4*13); + /* This would require us to link with CoreServices.framework */ + { /* this should do the same: */ + int n = 13; + unsigned long *p = adj_code; + while(n--) + { + __asm__ volatile ("dcbf 0,%0\n\tsync\n\ticbi 0,%0" + : : "g" (p)); + p++; + } + __asm__ volatile ("sync\n\tisync"); + } } #else #error Adjustor creation is not supported on this platform.