summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2013-11-11 10:26:03 -0600
committerAustin Seipp <austin@well-typed.com>2013-11-22 08:04:53 -0600
commit5bab1a57f572e29dfdffd6d1ce8e53a2772b18fd (patch)
tree3dd90a9434568af8b174b4809b385375979a4481 /includes
parent3fdad85781c4b5cdf424a78613353c9a6f57220e (diff)
downloadhaskell-5bab1a57f572e29dfdffd6d1ce8e53a2772b18fd.tar.gz
GHCi: Properly generate jump code for ARM (#8380)
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>
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/storage/GC.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h
index 813349610c..f8b8afe328 100644
--- a/includes/rts/storage/GC.h
+++ b/includes/rts/storage/GC.h
@@ -161,6 +161,7 @@ typedef void* AdjustorWritable;
typedef void* AdjustorExecutable;
AdjustorWritable allocateExec(W_ len, AdjustorExecutable *exec_addr);
+void flushExec(W_ len, AdjustorExecutable exec_addr);
#if defined(ios_HOST_OS)
AdjustorWritable execToWritable(AdjustorExecutable exec);
#endif