Subject: Re: ksh lossage on sparc64
To: None <tech-toolchain@netbsd.org>
From: Charles M. Hannum <root@ihack.net>
List: tech-toolchain
Date: 11/22/2000 19:41:44
One additional data point.  If, instead of the call chain, I simply
do:

 .LL99:
         call    fork, 0
          nop
+        save    %sp, -128, %sp
+        save    %sp, -128, %sp
+        save    %sp, -128, %sp
+        save    %sp, -128, %sp
+        save    %sp, -128, %sp
+        save    %sp, -128, %sp
+        save    %sp, -128, %sp
+        save    %sp, -128, %sp
+        restore
+        restore
+        restore
+        restore
+        restore
+        restore
+        restore
+        restore
         mov     %o0, %l0
         cmp     %l0, 0
         bge,pn  %icc, .LL147

that also fixes the problem.  Putting that code *before* the call does
not.

So, I don't know precisely why it's losing, but it seems clear that
fork() is somehow screwing up the windows.