diff options
author | Sergei Trofimovich <siarheit@google.com> | 2015-01-19 16:27:06 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2015-01-19 16:27:07 -0600 |
commit | d82f592522eb8e063276a8a8c87ab93e18353c6b (patch) | |
tree | 9c57ffe45d026b3796d926fd51dec23f0771548e /rts/PrimOps.cmm | |
parent | c024af131b9e2538486eb605ba8af6a8d10fe76d (diff) | |
download | haskell-d82f592522eb8e063276a8a8c87ab93e18353c6b.tar.gz |
CMM: add a mechanism to import C .data labels
Summary:
This introduces new .cmm syntax for import:
'import' 'CLOSURE' <identifier>;
Currently cmm syntax allows importing only function labels:
import pthread_mutex_lock;
but sometimes ghc needs to import global gariables
or haskell closures:
import ghczmprim_GHCziTypes_True_closure;
import base_ControlziExceptionziBase_nestedAtomically_closure;
import ghczmprim_GHCziTypes_False_closure;
import sm_mutex;
It breaks on ia64 where there is a difference in
pointers to data and pointer to functions.
Patch fixes threaded runtime on ia64 where
dereference of 'sm_mutex' from CMM led to
incurrect location.
Exact breakage machanics are the same as in e18525fae273f4c1ad8d6cbe1dea4fc074cac721
Merge into the 7.10 branch
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Test Plan: passes ./validate, makes ghci work on ghc-7.8.4
Reviewers: simonmar, simonpj, austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D622
Diffstat (limited to 'rts/PrimOps.cmm')
-rw-r--r-- | rts/PrimOps.cmm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index 3e8612cea7..2e6ca46ede 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -28,12 +28,12 @@ import pthread_mutex_lock; import pthread_mutex_unlock; #endif -import base_ControlziExceptionziBase_nestedAtomically_closure; +import CLOSURE base_ControlziExceptionziBase_nestedAtomically_closure; import EnterCriticalSection; import LeaveCriticalSection; -import ghczmprim_GHCziTypes_False_closure; +import CLOSURE ghczmprim_GHCziTypes_False_closure; #if defined(USE_MINIINTERPRETER) || !defined(mingw32_HOST_OS) -import sm_mutex; +import CLOSURE sm_mutex; #endif /*----------------------------------------------------------------------------- |