projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add bytestring to core-packages
[ghc-hetmet.git]
/
rts
/
StgMiscClosures.cmm
diff --git
a/rts/StgMiscClosures.cmm
b/rts/StgMiscClosures.cmm
index
e532e51
..
c6cc541
100644
(file)
--- a/
rts/StgMiscClosures.cmm
+++ b/
rts/StgMiscClosures.cmm
@@
-12,6
+12,12
@@
#include "Cmm.h"
#include "Cmm.h"
+#ifdef __PIC__
+import pthread_mutex_lock;
+import base_GHCziBase_Czh_static_info;
+import base_GHCziBase_Izh_static_info;
+#endif
+
/* ----------------------------------------------------------------------------
Support for the bytecode interpreter.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------
Support for the bytecode interpreter.
------------------------------------------------------------------------- */
@@
-57,9
+63,7
@@
stg_interp_constr_entry
haven't got a good story about that yet.
*/
haven't got a good story about that yet.
*/
-INFO_TABLE_RET( stg_ctoi_R1p,
- 0/*size*/, 0/*bitmap*/, /* special layout! */
- RET_BCO)
+INFO_TABLE_RET( stg_ctoi_R1p, RET_BCO)
{
Sp_adj(-2);
Sp(1) = R1;
{
Sp_adj(-2);
Sp(1) = R1;
@@
-70,9
+74,7
@@
INFO_TABLE_RET( stg_ctoi_R1p,
/*
* When the returned value is a pointer, but unlifted, in R1 ...
*/
/*
* When the returned value is a pointer, but unlifted, in R1 ...
*/
-INFO_TABLE_RET( stg_ctoi_R1unpt,
- 0/*size*/, 0/*bitmap*/, /* special layout! */
- RET_BCO )
+INFO_TABLE_RET( stg_ctoi_R1unpt, RET_BCO )
{
Sp_adj(-2);
Sp(1) = R1;
{
Sp_adj(-2);
Sp(1) = R1;
@@
-83,9
+85,7
@@
INFO_TABLE_RET( stg_ctoi_R1unpt,
/*
* When the returned value is a non-pointer in R1 ...
*/
/*
* When the returned value is a non-pointer in R1 ...
*/
-INFO_TABLE_RET( stg_ctoi_R1n,
- 0/*size*/, 0/*bitmap*/, /* special layout! */
- RET_BCO )
+INFO_TABLE_RET( stg_ctoi_R1n, RET_BCO )
{
Sp_adj(-2);
Sp(1) = R1;
{
Sp_adj(-2);
Sp(1) = R1;
@@
-96,9
+96,7
@@
INFO_TABLE_RET( stg_ctoi_R1n,
/*
* When the returned value is in F1
*/
/*
* When the returned value is in F1
*/
-INFO_TABLE_RET( stg_ctoi_F1,
- 0/*size*/, 0/*bitmap*/, /* special layout! */
- RET_BCO )
+INFO_TABLE_RET( stg_ctoi_F1, RET_BCO )
{
Sp_adj(-2);
F_[Sp + WDS(1)] = F1;
{
Sp_adj(-2);
F_[Sp + WDS(1)] = F1;
@@
-109,9
+107,7
@@
INFO_TABLE_RET( stg_ctoi_F1,
/*
* When the returned value is in D1
*/
/*
* When the returned value is in D1
*/
-INFO_TABLE_RET( stg_ctoi_D1,
- 0/*size*/, 0/*bitmap*/, /* special layout! */
- RET_BCO )
+INFO_TABLE_RET( stg_ctoi_D1, RET_BCO )
{
Sp_adj(-1) - SIZEOF_DOUBLE;
D_[Sp + WDS(1)] = D1;
{
Sp_adj(-1) - SIZEOF_DOUBLE;
D_[Sp + WDS(1)] = D1;
@@
-122,9
+118,7
@@
INFO_TABLE_RET( stg_ctoi_D1,
/*
* When the returned value is in L1
*/
/*
* When the returned value is in L1
*/
-INFO_TABLE_RET( stg_ctoi_L1,
- 0/*size*/, 0/*bitmap*/, /* special layout! */
- RET_BCO )
+INFO_TABLE_RET( stg_ctoi_L1, RET_BCO )
{
Sp_adj(-1) - 8;
L_[Sp + WDS(1)] = L1;
{
Sp_adj(-1) - 8;
L_[Sp + WDS(1)] = L1;
@@
-135,9
+129,7
@@
INFO_TABLE_RET( stg_ctoi_L1,
/*
* When the returned value is a void
*/
/*
* When the returned value is a void
*/
-INFO_TABLE_RET( stg_ctoi_V,
- 0/*size*/, 0/*bitmap*/, /* special layout! */
- RET_BCO )
+INFO_TABLE_RET( stg_ctoi_V, RET_BCO )
{
Sp_adj(-1);
Sp(0) = stg_gc_void_info;
{
Sp_adj(-1);
Sp(0) = stg_gc_void_info;
@@
-149,9
+141,7
@@
INFO_TABLE_RET( stg_ctoi_V,
* should apply the BCO on the stack to its arguments, also on the
* stack.
*/
* should apply the BCO on the stack to its arguments, also on the
* stack.
*/
-INFO_TABLE_RET( stg_apply_interp,
- 0/*size*/, 0/*bitmap*/, /* special layout! */
- RET_BCO )
+INFO_TABLE_RET( stg_apply_interp, RET_BCO )
{
/* Just in case we end up in here... (we shouldn't) */
jump stg_yield_to_interpreter;
{
/* Just in case we end up in here... (we shouldn't) */
jump stg_yield_to_interpreter;
@@
-183,7
+173,7
@@
INFO_TABLE_FUN( stg_BCO, 4, 0, BCO, "BCO", "BCO", ARG_BCO )
INFO_TABLE(stg_IND,1,0,IND,"IND","IND")
{
TICK_ENT_DYN_IND(); /* tick */
INFO_TABLE(stg_IND,1,0,IND,"IND","IND")
{
TICK_ENT_DYN_IND(); /* tick */
- R1 = StgInd_indirectee(R1);
+ R1 = UNTAG(StgInd_indirectee(R1));
TICK_ENT_VIA_NODE();
jump %GET_ENTRY(R1);
}
TICK_ENT_VIA_NODE();
jump %GET_ENTRY(R1);
}
@@
-199,7
+189,7
@@
INFO_TABLE(stg_IND_direct,1,0,IND,"IND","IND")
INFO_TABLE(stg_IND_STATIC,1,0,IND_STATIC,"IND_STATIC","IND_STATIC")
{
TICK_ENT_STATIC_IND(); /* tick */
INFO_TABLE(stg_IND_STATIC,1,0,IND_STATIC,"IND_STATIC","IND_STATIC")
{
TICK_ENT_STATIC_IND(); /* tick */
- R1 = StgInd_indirectee(R1);
+ R1 = UNTAG(StgInd_indirectee(R1));
TICK_ENT_VIA_NODE();
jump %GET_ENTRY(R1);
}
TICK_ENT_VIA_NODE();
jump %GET_ENTRY(R1);
}
@@
-236,7
+226,7
@@
INFO_TABLE(stg_IND_PERM,1,0,IND_PERM,"IND_PERM","IND_PERM")
StgHeader_info(R1) = stg_IND_info;
#endif /* TICKY_TICKY */
StgHeader_info(R1) = stg_IND_info;
#endif /* TICKY_TICKY */
- R1 = StgInd_indirectee(R1);
+ R1 = UNTAG(StgInd_indirectee(R1));
#if defined(TICKY_TICKY) && !defined(PROFILING)
TICK_ENT_VIA_NODE();
#if defined(TICKY_TICKY) && !defined(PROFILING)
TICK_ENT_VIA_NODE();
@@
-249,7
+239,7
@@
INFO_TABLE(stg_IND_PERM,1,0,IND_PERM,"IND_PERM","IND_PERM")
INFO_TABLE(stg_IND_OLDGEN,1,0,IND_OLDGEN,"IND_OLDGEN","IND_OLDGEN")
{
TICK_ENT_STATIC_IND(); /* tick */
INFO_TABLE(stg_IND_OLDGEN,1,0,IND_OLDGEN,"IND_OLDGEN","IND_OLDGEN")
{
TICK_ENT_STATIC_IND(); /* tick */
- R1 = StgInd_indirectee(R1);
+ R1 = UNTAG(StgInd_indirectee(R1));
TICK_ENT_VIA_NODE();
jump %GET_ENTRY(R1);
}
TICK_ENT_VIA_NODE();
jump %GET_ENTRY(R1);
}
@@
-278,7
+268,7
@@
INFO_TABLE(stg_IND_OLDGEN_PERM,1,0,IND_OLDGEN_PERM,"IND_OLDGEN_PERM","IND_OLDGEN
StgHeader_info(R1) = stg_IND_OLDGEN_info;
#endif /* TICKY_TICKY */
StgHeader_info(R1) = stg_IND_OLDGEN_info;
#endif /* TICKY_TICKY */
- R1 = StgInd_indirectee(R1);
+ R1 = UNTAG(StgInd_indirectee(R1));
TICK_ENT_VIA_NODE();
jump %GET_ENTRY(R1);
TICK_ENT_VIA_NODE();
jump %GET_ENTRY(R1);
@@
-608,17
+598,16
@@
CLOSURE(stg_dummy_ret_closure,stg_dummy_ret);
replace them with references to the static objects.
------------------------------------------------------------------------- */
replace them with references to the static objects.
------------------------------------------------------------------------- */
-#if defined(ENABLE_WIN32_DLL_SUPPORT)
+#if defined(__PIC__) && defined(mingw32_TARGET_OS)
/*
* When sticking the RTS in a DLL, we delay populating the
* Charlike and Intlike tables until load-time, which is only
* when we've got the real addresses to the C# and I# closures.
*
*/
/*
* When sticking the RTS in a DLL, we delay populating the
* Charlike and Intlike tables until load-time, which is only
* when we've got the real addresses to the C# and I# closures.
*
*/
-static INFO_TBL_CONST StgInfoTable czh_static_info;
-static INFO_TBL_CONST StgInfoTable izh_static_info;
-#define Char_hash_static_info czh_static_info
-#define Int_hash_static_info izh_static_info
+#warning Is this correct? _imp is a pointer!
+#define Char_hash_static_info _imp__base_GHCziBase_Czh_static
+#define Int_hash_static_info _imp__base_GHCziBase_Izh_static
#else
#define Char_hash_static_info base_GHCziBase_Czh_static
#define Int_hash_static_info base_GHCziBase_Izh_static
#else
#define Char_hash_static_info base_GHCziBase_Czh_static
#define Int_hash_static_info base_GHCziBase_Izh_static