quetion for gcc on hpux

dai yiyang daiyiyang@hotmail.com
Thu Feb 24 03:59:00 GMT 2005

well , Tru64 can catch & handle unaligned access by OS itself . the 
unaligned access only cause a system warning , but the code can be running 
only with performance penalty . there is a command to turn off the 
unaligned access message by OS ( I can forgot the name ).

HPUX can not handle unaligned access by default , for me  , maybe use 
libunalign.so on IA64 is the best way .I really don't want to change the 
code .


>From: Eljay Love-Jensen <eljay@adobe.com>
>To: dai yiyang <daiyiyang@hotmail.com>, gcc@gcc.gnu.org, 
>Subject: Re: quetion for gcc on hpux
>Date: Wed, 23 Feb 2005 06:28:40 -0600
>Hi Dai,
>If you choose not to change the bad code that is causing a SIGBUS, I 
>believe you cannot use GCC since (as far as I am aware) GCC does not 
>provide a mechanism *IN THE COMPILE/LINK* to catch the SIGBUS signal 
>and do the byte-by-byte manipulation to complete the action.
>Such handling of a SIGBUS slows down the performance of the 
>application significantly.  If the SIGBUS is happening on a data 
>structure that is often used, such as in a tight loop, you can 
>expect to see a degradation of performance on the order of two or 
>three magnitudes.
>You could write your own SIGBUS handler (as such, in that sense, GCC 
>provide a mechanism -- i.e., the building blocks to do it yourself), 
>so you wouldn't have to change the rest of your code other than in 
>main to put in your SIGBUS handler, and the SIGBUS handler itself.
>My recommendation is to fix the bad code, not surround the 
>application with a inevitably inefficient SIGBUS handler that masks 
>bad programming*.
>* "bad" in the sense of "violates system architecture constraints".
>PS:  I ran into the same issue on DEC Alpha Tru64 machines.

ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£  http://www.hotmail.com  

More information about the Gcc-help mailing list