/* ----------------------------------------------------------------------------
- * $Id: ClosureMacros.h,v 1.7 1999/03/03 19:27:23 sof Exp $
+ * $Id: ClosureMacros.h,v 1.8 1999/03/11 11:21:45 simonm Exp $
*
* (c) The GHC Team, 1998-1999
*
* _end } end of read-write data space
*/
extern StgFun start;
-extern StgFun TEXT_SECTION_END_MARKER_DECL;
-extern StgFun DATA_SECTION_END_MARKER_DECL;
+
+extern StgWord TEXT_SECTION_END_MARKER_DECL[];
+extern StgWord DATA_SECTION_END_MARKER_DECL[];
#define IS_CODE_PTR(p) ((P_)(p) < (P_)&TEXT_SECTION_END_MARKER)
#define IS_DATA_PTR(p) ((P_)(p) >= (P_)&TEXT_SECTION_END_MARKER && (P_)(p) < (P_)&DATA_SECTION_END_MARKER)
/* -----------------------------------------------------------------------------
- * $Id: MBlock.c,v 1.10 1999/03/03 19:04:56 sof Exp $
+ * $Id: MBlock.c,v 1.11 1999/03/11 11:21:47 simonm Exp $
*
* (c) The GHC Team 1998-1999
*
/* guess */
#define ASK_FOR_MEM_AT 0x50000000
+#elif hpux_TARGET_OS
+/* guess */
+#define ASK_FOR_MEM_AT 0x50000000
+
#elif _WIN32
/* doesn't matter, we use a reserve/commit algorithm */
MAP_FIXED | MAP_PRIVATE, fd, 0);
close(fd);
}
+#elif hpux_TARGET_OS
+ ret = mmap(next_request, size, PROT_READ | PROT_WRITE,
+ MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
#else
ret = mmap(next_request, size, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_PRIVATE, -1, 0);
/* -----------------------------------------------------------------------------
- * $Id: StgCRun.c,v 1.4 1999/03/01 17:42:11 simonm Exp $
+ * $Id: StgCRun.c,v 1.5 1999/03/11 11:21:47 simonm Exp $
*
* (c) The GHC Team, 1998-1999
*
return (StgThreadReturnCode)R1.i;
}
-#endif /* sparc_TARGET_ARCH */
+#endif /* alpha_TARGET_ARCH */
/* -----------------------------------------------------------------------------
HP-PA architecture
StgRun(StgFunPtr f)
{
StgChar space[RESERVED_C_STACK_BYTES+16*sizeof(long)+10*sizeof(double)];
+ StgThredReturnCode ret;
+
__asm__ volatile ("ldo %0(%%r30),%%r19\n"
"\tstw %%r3, 0(0,%%r19)\n"
"\tstw %%r4, 4(0,%%r19)\n"
"\t.EXPORT " STG_RETURN ",ENTRY,PRIV_LEV=3\n"
STG_RETURN "\n"
/* "\tldo %0(%%r3),%%r19\n" */
- "\tldo %0(%%r30),%%r19\n"
+ "\tldo %1(%%r30),%%r19\n"
+ "\tcopy %%r11, %0\n" /* save R1 */
"\tldw 0(0,%%r19),%%r3\n"
"\tldw 4(0,%%r19),%%r4\n"
"\tldw 8(0,%%r19),%%r5\n"
"\tfldds 8(0,%%r19),%%fr19\n"
"\tldo 32(%%r19),%%r19\n"
"\tfldds -16(0,%%r19),%%fr20\n"
- "\tfldds -8(0,%%r19),%%fr21\n" : :
- "n" (-(116 * sizeof(long) + 10 * sizeof(double))) : "%r19"
+ "\tfldds -8(0,%%r19),%%fr21\n"
+ : "=r" (ret) /* result */
+ : "n" (-(116 * sizeof(long) + 10 * sizeof(double)))
+ : "%r19"
);
- return (StgThreadReturnCode)R1.i;
+ return ret;
}
#endif /* hppa1_1_TARGET_ARCH */