Subject: Re: Powerpc signal handler with floating point registers
To: Matt Thomas <matt@3am-software.com>
From: chris zhang <sileizhang@yahoo.com>
List: port-powerpc
Date: 02/28/2005 14:26:27
One of my colleagues found another restriction. This
appears to mean you can't do 64bit arithmetic in
signal handler without setting SA_SIGINFO in
sigaction.

Apparently, gcc generates code by using FP when
handling "long long" arithmatics. We couldn't find
compiler flags to turn off this yet.

Something like this,

  long long a, b;

  int foo()
  {
        a = b;
  }

GCC generates the following code for the above:

        lis 9,a@ha
        la 11,a@l(9)
        lis 9,b@ha
        la 9,b@l(9)
        lfd 0,0(9)
        stfd 0,0(11)

So it's trashing f0.


--- Matt Thomas <matt@3am-software.com> wrote:

> At 06:02 PM 2/25/2005, you wrote:
> >Just tried -current (NetBSD 2.99.16). Still doesn't
> >seem to work.
> 
> You need use sigaction and specify SA_SIGINFO.
> Only in that case will FP (or AltiVec) registers be
> preserved.
> 
> 
> -- 
> Matt Thomas                     email:
> matt@3am-software.com
> 3am Software Foundry              www:
> http://3am-software.com/bio/matt/
> Cupertino, CA              disclaimer: I avow all
> knowledge of this message.
> 
> 
> 



	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail