I am not done yet; there are still problems. However, I would like to post some interim patches. These work on netbsd/m68k for hp300 machines; they may not work on other ports (sun3). These patches incorporate other hints that were posted to this list in the past two days. The big problem was cache flushing - the code was there, but disabled and with slightly malformed syntax. Also a suggestion: config/m68k/jit.h looks like it's actually used, but it isn't. Rather, config/m68k/netbsd1/jit.h is used instead. I don't know if this is true across the board for all m68k ports, but if m68k/jit.h is meant to be a template, then it should be marked and named as such. *** threads.h.old Sun Feb 21 08:21:14 1999 --- threads.h Sun Feb 21 08:21:20 1999 *************** *** 20,26 **** /* * Set a default size for the stack. */ ! #define THREADSTACKSIZE (32 * 1024) /* * Stack offset. --- 20,26 ---- /* * Set a default size for the stack. */ ! #define THREADSTACKSIZE (64 * 1024) /* * Stack offset. *** trampolines.c.old Sat Feb 20 09:22:17 1999 --- trampolines.c Sat Feb 20 09:22:34 1999 *************** *** 33,39 **** #define C_FUNC_NAME(FUNC) #FUNC #endif ! #if defined(NO_SHARED_VMLIBRARY) asm( START_ASM_FUNC() C_FUNC_NAME(m68k_do_fixup_trampoline) "\n" --- 33,39 ---- #define C_FUNC_NAME(FUNC) #FUNC #endif ! #if 1 /*defined(NO_SHARED_VMLIBRARY)*/ asm( START_ASM_FUNC() C_FUNC_NAME(m68k_do_fixup_trampoline) "\n" *** netbsd1/jit.h.old Sun Feb 21 08:22:22 1999 --- netbsd1/jit.h Sun Feb 21 20:58:35 1999 *************** *** 52,59 **** necessary). */ #define CALL_KAFFE_EXCEPTION(frame, info, obj) \ __asm__ __volatile__( \ - "move%.l %0,%/a6\n\t" \ "move%.l %1,%/d0\n\t" \ "jmp %2@" \ : : "g"(frame->retbp), "g"(obj), "a"(info.handler) \ : "d0", "cc", "memory") --- 52,59 ---- necessary). */ #define CALL_KAFFE_EXCEPTION(frame, info, obj) \ __asm__ __volatile__( \ "move%.l %1,%/d0\n\t" \ + "move%.l %0,%/a6\n\t" \ "jmp %2@" \ : : "g"(frame->retbp), "g"(obj), "a"(info.handler) \ : "d0", "cc", "memory") *************** *** 184,202 **** privledged instruction, so we have to get operating system help for this. Naturally, there is no standard there. */ - #define FLUSH_DCACHE(beg, end) __clear_cache((beg), (end)) - #if 0 #define FLUSH_DCACHE(beg, end) \ __asm__ __volatile__( \ ! "movem%.l %/d0-%/d7/%/a0-%/a5,%-\n\t" \ "move%.l %0,%/a1\n\t" \ "move%.l %1,%/d1\n\t" \ "sub%.l %/d1,%/a1\n\t" \ "movel %#0x80000004,d0\n\t" \ "trap %#12\n\t" \ ! "movem%.l %+,%/d0-%/d7/%/a0-%/a5" \ : \ : "g" (beg), "g" (end) ) - #endif #endif --- 184,199 ---- privledged instruction, so we have to get operating system help for this. Naturally, there is no standard there. */ #define FLUSH_DCACHE(beg, end) \ __asm__ __volatile__( \ ! "movem%.l %/d0-%/d7/%/a0-%/a5,%/sp@-\n\t" \ "move%.l %0,%/a1\n\t" \ "move%.l %1,%/d1\n\t" \ "sub%.l %/d1,%/a1\n\t" \ "movel %#0x80000004,d0\n\t" \ "trap %#12\n\t" \ ! "movem%.l %/sp@+,%/d0-%/d7/%/a0-%/a5" \ : \ : "g" (beg), "g" (end) ) #endif