This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

PATCH: More cleanups to ARM lib1funcs (and a couple of FP bug fixes)


This patch is a general clean-up of the lib1funcs.asm code for ARM.  It 
moves several of the macros that had just been added into the top-level 
asm file and then re-organizes some of the existing code by making use of 
assembler macros rather than preprocessor ones.

It also fixes a couple of bugs that Nicolas and I have discovered while 
testing the new floating point code.  One affected VFP-format floating 
point values on a little-endian machine, the other affected underflow to 
zero during multiplication of doubles.

Finally, a better sequence has been adopted for getting the carry flag 
into a register for conversion to integer.  The new sequence is both more 
efficient later on and compatible with apcs-26 mode.

2003-08-30  Richard Earnshaw  <rearnsha@arm.com>
	Nicolas Pitre <nico@cam.org>

	* arm/lib1funcs.asm (RETCOND): Delete.
	(RETLDM): New assembler macro.  Use it for returning with ldm/ldr.
	(ARM_LDIV0, THUMB_LDIV0): Collapse multiple definitions.
	(__ARM_ARCH__): Move here from ieee754-?f.S.
	(RET, RETc): Clean up definitions.
	(DIV_FUNC_END): Renamed from FUNC_END.  All uses changed.
	(FUNC_END): New macro that marks the end of any function.
	(ARM_FUNC_START): New macro that allows an assembler routine to be
	implemented in ARM code even if a Thumb-only build.
	Unconditionally include ieee754-?f.S.
	* arm/ieee754-df.S: Delete macros moved to lib1funcs.asm.
	Mark ends of functions.
	Split into separate conditionally-compiled units.
	Use RETLDM to return from routines.
	* arm/ieee754-sf.S: Similarly.
	* t-arm-elf (LIB1ASMFUNCS): Remove _ieee754_dp and _ieee754_sp. 
	Add _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi
	_truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2
	_fixsfsi and _fixunssfsi.

	* arm/ieee754-df.S (__muldf3): Fix bug when result of a 
	multiplication underflows to zero.
	(__adddf3): Fix bug when using VFP ordering on little-endian 
	processors.
	(__fixdfsi): Use rrx to extract the carry into a register instead of
	MRS instruction.  Optimize later use of result.
	* arm/ieee754-sf.S (__fixsfsi): Likewise.
	(__fixunssfsi): Use a better sequence for handling negative-or-zero.
	

Attachment: asm-fp2.patch
Description: asm-fp2.patch


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