This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Hard ware long dooble operations are slower.


hi,
Why quad floatine point instructions of sparcv9 are very slower,
compared to the instructions which make call to the library and
perform the operations.
The following c code takes more time when compiled with cc1 of gcc
with option -mhard-quad-float than when compiled with sun cc.

-----------------------------------------------------------
c code:-
     1  main(){
     2  long double a=2e0;
     3  int i;
     4  for(i=0;i<10000000;i++)
     5          a=a+2;
     6  printf("%Lfg\n",a);
     7  }

The c code generates an faddq instruction.
----------------------------------------------------------------------

Time taken details:-

real    4m36.96s
user    0m23.33s
sys     1m8.59s

-------------------------------------------------------------------

If Sun cc is used it makes a call to the library (_Qp_add_)
and the details of the time are.

real    0m14.77s
user    0m5.01s
sys     0m0.01s

------------------------------------------------------------------

I could not see any trap handler that get's invoked when the hard quad
instructions are generated. Is it that they are implimented in the system
software or firmware. If so why is it slow.

phani.
-----------------------------------------------------------------------
 M.V.S. Phani Narasimham	  
 Global R & D Solutions	    	 
 1 st Block,7 th main road,No:8
 Kormangla
 BANGLORE-36 , India
 Ph- 5530053 ext.1053           
 E-MAIL- phani.sesha@wipro.com
 www.wipro.com
 The World's First SEI CMM LEVEL 5 Software Services Company
-----------------------------------------------------------------------



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]