diff -r -u parrot-current/include/parrot/packfile.h parrot-gcc64/include/parrot/packfile.h --- parrot-current/include/parrot/packfile.h 2009-03-11 07:42:34.000000000 -0400 +++ parrot-gcc64/include/parrot/packfile.h 2009-03-11 08:28:05.000000000 -0400 @@ -1031,7 +1031,7 @@ PARROT_WARN_UNUSED_RESULT INTVAL PF_fetch_integer( ARGIN_NULLOK(PackFile *pf), - ARGIN(const opcode_t **stream)) + ARGIN(const char **stream)) __attribute__nonnull__(2); PARROT_WARN_UNUSED_RESULT diff -r -u parrot-current/src/packfile/pf_items.c parrot-gcc64/src/packfile/pf_items.c --- parrot-current/src/packfile/pf_items.c 2009-03-11 07:42:31.000000000 -0400 +++ parrot-gcc64/src/packfile/pf_items.c 2009-03-11 12:20:16.000000000 -0400 @@ -1098,24 +1098,24 @@ PARROT_WARN_UNUSED_RESULT INTVAL -PF_fetch_integer(ARGIN_NULLOK(PackFile *pf), ARGIN(const opcode_t **stream)) +PF_fetch_integer(ARGIN_NULLOK(PackFile *pf), ARGIN(const char **stream)) { ASSERT_ARGS(PF_fetch_integer) INTVAL i; - if (!pf || pf->fetch_iv == NULL) - return *(*stream)++; - i = (pf->fetch_iv)(*((const unsigned char **)stream)); - TRACE_PRINTF_VAL((" PF_fetch_integer: 0x%x (%d) at 0x%x\n", i, i, - OFFS(*stream))); - /* XXX assume sizeof (opcode_t) == sizeof (INTVAL) on the - * machine producing this PBC. - * - * TODO TT #364 on Sparc 64bit: On pbc wordsize=4 but native ptrsize=8 and - * ptr_alignment=8 the advance by 4 will signal BUS (invalid address alignment) - * in PF_fetch_integer and elsewhere. - */ - *((const unsigned char **) (stream)) += pf->header->wordsize; + if (!pf || pf->fetch_iv == NULL) { /* Native transforms */ + memcpy(&i, *stream, sizeof (INTVAL)); + *stream += sizeof (INTVAL); + } + else { + i = (pf->fetch_iv)(*((const unsigned char **)stream)); + TRACE_PRINTF_VAL((" PF_fetch_integer: 0x%x (%d) at 0x%x\n", i, i, + OFFS(*stream))); + /* XXX assume sizeof (opcode_t) == sizeof (INTVAL) on the + * machine producing this PBC. + */ + *stream += pf->header->wordsize; + } return i; } diff -r -u parrot-current/src/pmc_freeze.c parrot-gcc64/src/pmc_freeze.c --- parrot-current/src/pmc_freeze.c 2009-03-11 07:42:32.000000000 -0400 +++ parrot-gcc64/src/pmc_freeze.c 2009-03-11 08:30:52.000000000 -0400 @@ -872,7 +872,7 @@ const char * const start = (char *)io->image->strstart; char **opcode = &io->image->strstart; const INTVAL i = PF_fetch_integer(io->pf, - (const opcode_t **)opcode); + (const char **)opcode); io->image->bufused -= ((char *)io->image->strstart - start); PARROT_ASSERT((int)io->image->bufused >= 0);