projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
98cb06a
)
[project @ 1997-03-13 08:19:53 by sof]
author
sof
<unknown>
Thu, 13 Mar 1997 08:19:53 +0000
(08:19 +0000)
committer
sof
<unknown>
Thu, 13 Mar 1997 08:19:53 +0000
(08:19 +0000)
AIX mods
ghc/includes/COptWraps.lh
patch
|
blob
|
history
diff --git
a/ghc/includes/COptWraps.lh
b/ghc/includes/COptWraps.lh
index
baf217b
..
5b6d2d9
100644
(file)
--- a/
ghc/includes/COptWraps.lh
+++ b/
ghc/includes/COptWraps.lh
@@
-588,8
+588,17
@@
gets whatever it's after.
#define WRAPPER_SETUP(f,ignore1,ignore2) SaveAllStgContext();
#define WRAPPER_SETUP(f,ignore1,ignore2) SaveAllStgContext();
+/* we have to make sure the STG registers are restored.
+GCC tries to restore the value the registers had in
+the beginning of the current call, which we don't want.
+We defeat it by saving the registers in the stack again. :-( */
+
#define WRAPPER_RETURN(x) \
#define WRAPPER_RETURN(x) \
- do {RestoreAllStgRegs(); if(x) JMP_(EnterNodeCode);} while(0);
+ do {RestoreAllStgRegs(); if(x) JMP_(EnterNodeCode);} while(0); \
+ __asm__ volatile ( \
+ "cal 1,136(1)\n" \
+ "\tstm 13,-76(1)\n" \
+ "\tstu 1,-136(1)");
#define SEPARATE_WRAPPER_RESTORE /* none */
#define SEPARATE_WRAPPER_RESTORE /* none */