Problem with SPARC Linux

Godmar Back gback at
Sun Oct 15 09:53:56 PDT 2000

> >>Godmar wrote
> >Which OS is this? 
> Errr... See the header.

I noticed that after I sent the mail.

In any event, the sparc linux port uses its own context switch
routine, see sparc/linux/md.c

It depends on SP_OFFSET, but also on some other things.

> >Check that the SP_OFFSET value is correct (compile and run 
> >developers/sp_offset.c and compare to config/sparc/youros/...h) 
> Yes... Patrick advisaed me to do that.
>    config/sparc/threads.h   defines SP_OFFSET=1
> but
>    config/sparc/linux/md.h   undef SP_OFFSET
> so I guess SP_OFFSET==0 for Linux.

No.  You'd get a compilation error in this case.
My copy of config/sparc/linux/md.h reads:

#undef  SP_OFFSET
#undef  FP_OFFSET
#define SP_OFFSET               0
#define FP_OFFSET               1

#define CONTEXT_SWITCH(F,T)     sparcLinuxContextSwitch(F, T)

So I guess the SP_OFFSET hasn't changed, but something else
has changed.  It's hard to diagnose from afar.

Use gdb and print the pc, disassemble the instruction where it
crashes and see what it does.  Look at the Changelog for your
setjmp/longjmp in whatever version of glibc you're using.
Look at the setjmp/longjmp implementation; the header files
usually also have some comments about the jmp_buf layout etc.

	- Godmar

More information about the kaffe mailing list