|
From: Claus A. <sta...@es...> - 2005-04-25 01:39:14
|
Below is a hack for SunOS 5.10 when running in 64 bit mode on an AMD64 processor (using gcc 3.x with -m64). I simply copied my earlier hack for OpenBSD/AMD64, so this might not be the right way to do it. Can someone please check this? Thanks! --- md.h Sat Jan 29 21:22:00 2005 +++ /tmp/sm-9/md.h Sun Apr 24 18:27:44 2005 @@ -554,6 +554,13 @@ (_thread)->context[4] = (long) (_sp); \ (_thread)->context[5] = (long) _main; \ ST_END_MACRO +#elif defined(__amd64__) +#define MD_INIT_CONTEXT(_thread, _sp, _main) \ + ST_BEGIN_MACRO \ + if (MD_SETJMP((_thread)->context)) \ + _main(); \ + (_thread)->context[6] = (long) (_sp); \ + ST_END_MACRO #else #error Unknown CPU architecture #endif |