[m32c,patch]New assembly subroutines

Naveen H.S. naveenh@KPITCummins.com
Fri Aug 11 14:30:00 GMT 2006


Hi DJ,

> This is not a patch, should have gone to gcc@

Sorry for that. The patch was to be posted to FSF and we came across
the mentioned problem while testing. So we posted it to the patches.

Please find attached the patch "m32_asm.tar.bz2", which does the 
arithmetic operations like addition, subtraction and multiplication
of float and double variables. 

> Why?  We already have floating point software for m32c.

When the compiler comes across arithmetic operations on double and 
float variables, it refers to top level files like fp-bit.c and
dfp-bit.c to generate assembly instructions for these operations. 
It generates the assembly instructions referring to the functions 
present in these files consuming huge amount of memory. 
Hence, I have implemented the assembly routines for arithmetic
operations on float and double variables like addsf3, subsf3, mulsf3,
adddf3, subdf3 and muldf3.
The implemented assembly routines consume only 20-30% of the memory 
as compared to memory consumed by the earlier subroutines.
We have tested it and found that the results obtained are accurate.

> The error you reported is for doubles, not long longs.

Yes the assembly routine subdf3 is used for the subtraction of double 
variables. We did not get the mentioned error while performing the
subtraction of double variables. But when we were testing the patched 
toolchain for some testcase that contains long long variable, we faced 
the mentioned problem.

> There is no __m32c_subdf3.o in the official m32c-lib1.S, so there's
nothing we can do to help you with this.

There was no __m32c_subdf3.o in m32c-lib1.S. But we have implemented
it and are posting it to FSF.
 
Can you please suggest me why the subdf3 subroutine is not overwriting 
the original subroutine, while all the other original subroutines are
overwritten by the newly implemented assembly routines.
Is there any specific methods to overwrite the subdf3 subroutine in
case of long long variables? 

ChangeLog
2006-08-11  Naveen.H.S  <naveenh@kpitcummins.com>

	* config/m32c/t-m32c (MD_FILES): Add addsf3, subsf3, mulsf3
	adddf3, subdf3, muldf3.
	* config/m32c/m32c-lib1.S (mulsi3): Use only registers for 
 	dest.
	(addsf3): New.
	(subsf3): New.
	(mulsf3): New.	
	(adddf3): New.
	(subdf3): New.
	(muldf3): New.

Regards,
Naveen.H.S.
KPIT Cummins Infosystems Ltd,
Pune (INDIA) 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	
Free download of GNU based tool-chains for Renesas' SH, H8, R8C, M16C	
and M32C Series. The following site also offers free technical support	
to its users. Visit http://www.kpitgnutools.com for details. 	
Latest versions of KPIT GNU tools were released on June 1, 2006.	
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: m32c_asm.tar.bz2
Type: application/octet-stream
Size: 3712 bytes
Desc: m32c_asm.tar.bz2
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060811/7ccade3a/attachment.obj>


More information about the Gcc-patches mailing list