From mboxrd@z Thu Jan 1 00:00:00 1970 From: "M.V.S. Phani Narasimham" To: gcc-help@gcc.gnu.org Subject: Hard ware long dooble operations are slower. Date: Thu, 30 Dec 1999 02:14:00 -0000 Message-id: X-SW-Source: 1999-12/msg00381.html 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 ----------------------------------------------------------------------- From mboxrd@z Thu Jan 1 00:00:00 1970 From: "M.V.S. Phani Narasimham" To: gcc-help@gcc.gnu.org Subject: Hard ware long dooble operations are slower. Date: Fri, 31 Dec 1999 22:24:00 -0000 Message-ID: X-SW-Source: 1999-12n/msg00381.html Message-ID: <19991231222400.Opl6fbo04P39A3-qAq-VzqUokps8z6GUbY9IJ2Zbhy4@z> 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 -----------------------------------------------------------------------