Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: setjmp, sigsetjmp, siglongjmp,_setjmp



Hello,

> Date: Tue, 30 Jul 1996 21:42:46 -0500 (CDT)
> From: YU SONG <cs_yus%cs4.lamar.edu@localhost>
> To: port-amiga%NetBSD.ORG@localhost
> Subject: setjmp, sigsetjmp, siglongjmp,_setjmp
> Message-Id: <Pine.ULT.3.91.960730213632.12296B-100000%cs4.lamar.edu@localhost>
 
> Hello, everyone,
> I have a question here.
> Do setjmp(), sigsetjmp(), siglongjmp(), and _setjmp() in NetBSD save the 
> content of fpu registers? It appears that in <setjmp.h>, setjmp_buf[] has 
> only 18 long type, which I think corresponding to D0-D7, A0-A7, SR and 
> PC. So how can I save the fpu registers?

This should be in port-m68k; I forward it there for convenience. 

a) you seem to be right; a quick glance at the library source code tells
me only the integer part of the cpu is saved.

b) the manual page doesn't mention anything special.

c) i386 doesn't save FP, either.

d) in contrast, the ALPHA code does save it, as far as I can understand
its assembler code.

I'd say, 


1. it should 

(and this is a complicated issue for the m68k port, as we 

2. might have to save the user invisible context, too, which requires
conditional code, as we have 2 and a half different Motorola FPUs
(68881/68882/680[46]0) 

3. worse, some SUN3's come with totally different FPU's not from the
Motorola world.

This sounds like the clean solution would be to call the kernel to do
this. 

JTC? What do the standards say about 1., and maybe 2.?

Regards
        Ignatios Souvatzis
        Ignatios Souvatzis




Home | Main Index | Thread Index | Old Index