projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rollback: use cas() to claim the closure in copyPart(), to match copy_tag()
[ghc-hetmet.git]
/
rts
/
StgCRun.c
diff --git
a/rts/StgCRun.c
b/rts/StgCRun.c
index
16158bd
..
92ce6eb
100644
(file)
--- a/
rts/StgCRun.c
+++ b/
rts/StgCRun.c
@@
-34,7
+34,6
@@
#include "PosixSource.h"
#include "PosixSource.h"
-
/*
* We define the following (unused) global register variables, because for
* some reason gcc generates sub-optimal code for StgRun() on the Alpha
/*
* We define the following (unused) global register variables, because for
* some reason gcc generates sub-optimal code for StgRun() on the Alpha
@@
-66,11
+65,12
@@
register double fake_f9 __asm__("$f9");
/* include Stg.h first because we want real machine regs in here: we
* have to get the value of R1 back from Stg land to C land intact.
*/
/* include Stg.h first because we want real machine regs in here: we
* have to get the value of R1 back from Stg land to C land intact.
*/
+// yeuch
+#define IN_STGCRUN 1
#include "Stg.h"
#include "Rts.h"
#include "Stg.h"
#include "Rts.h"
+
#include "StgRun.h"
#include "StgRun.h"
-#include "RtsFlags.h"
-#include "OSThreads.h"
#include "Capability.h"
#ifdef DEBUG
#include "Capability.h"
#ifdef DEBUG
@@
-87,13
+87,11
@@
register double fake_f9 __asm__("$f9");
StgRegTable * StgRun(StgFunPtr f, StgRegTable *basereg STG_UNUSED)
{
while (f) {
StgRegTable * StgRun(StgFunPtr f, StgRegTable *basereg STG_UNUSED)
{
while (f) {
- /* XXX Disabled due to RtsFlags[]/RtsFlags mismatch
IF_DEBUG(interpreter,
debugBelch("Jumping to ");
printPtr((P_)f); fflush(stdout);
debugBelch("\n");
);
IF_DEBUG(interpreter,
debugBelch("Jumping to ");
printPtr((P_)f); fflush(stdout);
debugBelch("\n");
);
- */
f = (StgFunPtr) (f)();
}
return (StgRegTable *)R1.p;
f = (StgFunPtr) (f)();
}
return (StgRegTable *)R1.p;
@@
-854,7
+852,7
@@
StgRunIsImplementedInAssembler(void)
loc32: saved ar.lc
loc33: saved pr
f2 - f5: preserved floating-point registers
loc32: saved ar.lc
loc33: saved pr
f2 - f5: preserved floating-point registers
- f16 - f21: preserved floating-point registers
+ f16 - f23: preserved floating-point registers
-------------------------------------------------------------------------- */
#ifdef ia64_HOST_ARCH
-------------------------------------------------------------------------- */
#ifdef ia64_HOST_ARCH
@@
-865,7
+863,7
@@
StgRunIsImplementedInAssembler(void)
/* We don't spill all the callee-save FP registers, only the ones that
* gcc has been observed to use */
/* We don't spill all the callee-save FP registers, only the ones that
* gcc has been observed to use */
-#define PRESERVED_FP_REGISTERS 10
+#define PRESERVED_FP_REGISTERS 12
/* We always allocate 34 local and 8 output registers. As long as gcc used
* fewer than 32 locals, the mangler will adjust the stack frame accordingly. */
/* We always allocate 34 local and 8 output registers. As long as gcc used
* fewer than 32 locals, the mangler will adjust the stack frame accordingly. */
@@
-890,7
+888,9
@@
StgRunIsImplementedInAssembler(void)
"\tstf.spill [r17] = f19,32\n"
"\tmov loc30 = b0 ;;\n" /* save return address */
"\tstf.spill [r16] = f20,32\n"
"\tstf.spill [r17] = f19,32\n"
"\tmov loc30 = b0 ;;\n" /* save return address */
"\tstf.spill [r16] = f20,32\n"
- "\tstf.spill [r17] = f21,32\n"
+ "\tstf.spill [r17] = f21,32 ;;\n"
+ "\tstf.spill [r16] = f22,32\n"
+ "\tstf.spill [r17] = f23,32\n"
"\tmov loc32 = ar.lc ;;\n" /* save loop counter */
"\tstf.spill [r16] = f2,32\n"
"\tstf.spill [r17] = f3,32\n"
"\tmov loc32 = ar.lc ;;\n" /* save loop counter */
"\tstf.spill [r16] = f2,32\n"
"\tstf.spill [r17] = f3,32\n"
@@
-912,9
+912,11
@@
StgRunIsImplementedInAssembler(void)
"\tldf.fill f20 = [r16],32\n"
"\tldf.fill f21 = [r17],32\n"
"\tmov ar.lc = loc32 ;;\n" /* restore loop counter */
"\tldf.fill f20 = [r16],32\n"
"\tldf.fill f21 = [r17],32\n"
"\tmov ar.lc = loc32 ;;\n" /* restore loop counter */
+ "\tldf.fill f22 = [r16],32\n"
+ "\tldf.fill f23 = [r17],32\n"
+ "\tmov pr = loc33 ;;\n" /* restore predicate registers */
"\tldf.fill f2 = [r16],32\n"
"\tldf.fill f3 = [r17],32\n"
"\tldf.fill f2 = [r16],32\n"
"\tldf.fill f3 = [r17],32\n"
- "\tmov pr = loc33\n" /* restore predicate registers */
"\tadds sp = %0, sp ;;\n" /* restore stack */
"\tldf.fill f4 = [r16],32\n"
"\tldf.fill f5 = [r17],32\n"
"\tadds sp = %0, sp ;;\n" /* restore stack */
"\tldf.fill f4 = [r16],32\n"
"\tldf.fill f5 = [r17],32\n"