Index: src/gc/system.c =================================================================== --- src/gc/system.c (revision 38492) +++ src/gc/system.c (working copy) @@ -93,6 +93,34 @@ #elif defined(__ia64__) + +#if defined(__hpux) + /* This is untested, but should be functionally equivalent to the ia64 + code below, which must be IA64 Linux code? It did not compile on HPUX. */ + ucontext_t ucp; + void *current_regstore_top; + + getcontext(&ucp); + _Asm_flushrs(); + +#if defined(_LP64) + current_regstore_top = (void*)(uint64_t)_Asm_mov_from_ar(_AREG_BSP); +#else + current_regstore_top = (void*)(uint32_t)_Asm_mov_from_ar(_AREG_BSP); +#endif + + size_t base = 0; + struct pst_vm_status buf; + int i = 0; + + while(pstat_getprocvm (&buf, sizeof(buf), 0, i++) == 1) { + if (buf.pst_type == PS_RSESTACK) { + base = (size_t)buf.pst_vaddr; + break; + } + } + +#else /* is this code for ia64 linux? This doesn't seem portable. Is this better? http://www.mail-archive.com/guile-devel@gnu.org/msg01299.html */ /* On IA64 systems, we use the function getcontext() to get the current processor context. This function is located in , included above. */ @@ -110,8 +138,13 @@ is separate from the normal system stack. The register backing stack starts at memory address 0x80000FFF80000000 and ends at current_regstore_top. */ - trace_mem_block(interp, 0x80000fff80000000, + size_t base = 0x80000fff80000000; + +#endif + + trace_mem_block(interp, base, (size_t)current_regstore_top); + #else # ifdef PARROT_HAS_HEADER_SETJMP Index: src/gc/gc_private.h =================================================================== --- src/gc/gc_private.h (revision 38492) +++ src/gc/gc_private.h (working copy) @@ -29,8 +29,13 @@ extern void *flush_reg_store(void); # define BACKING_STORE_BASE 0x80000fff80000000 +#ifdef __hpux +#include +#include #endif +#endif + /* We're using this here to add an additional pointer to a PObj without having to actually add an entire pointer to every PObj-alike structure in Parrot. Astute observers may notice that if the PObj is comprised of