Re: help needed with porting to m68k
Hi,
Ralf Treinen wrote:
> There is an old patch to an earlier version that says to make the
> packet compile on m68k. The patch does no longer apply literally
> to recent versions of the file in question (the patch was submitted
> before I adopted the package). Since I don't understand anything
> about the memory managing stuff I will need some help to adapt
> it to the recent version.
You could look into boehm-gc for how it's done there. Here is the
relevant info from there:
void handler(int sig, int code, struct sigcontext *scp)
{
int format = (scp->sc_formatvec >> 12) & 0xf;
unsigned long *framedata = (unsigned long *)(scp + 1);
unsigned long ea;
if (format == 0xa || format == 0xb) {
/* 68020/030 */
ea = framedata[2];
} else if (format == 7) {
/* 68040 */
ea = framedata[3];
if (framedata[1] & 0x08000000) {
/* correct addr on misaligned access */
ea = (ea+4095)&(~4095);
}
} else if (format == 4) {
/* 68060 */
ea = framedata[0];
if (framedata[1] & 0x08000000) {
/* correct addr on misaligned access */
ea = (ea+4095)&(~4095);
}
}
addr = (char *)ea;
}
bye, Roman
Reply to: