> -----Original Message----- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Joseph Myers > Sent: Saturday, April 11, 2015 4:30 AM > To: Hale Wang > Cc: 'GCC Patches' > Subject: Re: [PATCH] [1/2] [ARM] [libgcc] Support RTABI half-precision > conversion functions. > > On Fri, 10 Apr 2015, Hale Wang wrote: > > > According to the run-time ABI for ARM architecture, this function is > > allowed to corrupt only the integer core registers permitted to be > > corrupted by the [AAPCS] (r0-r3, ip, lr, and CPSR). So we can't just > > simply use the existing GNU conversion functions to implement this > function. > > I don't see that "only". Indeed, at the bottom of page 15 in IHI0043D, "If the > FP instruction set is available, implementations of these functions may use it. > Consequently, FP hardware-using code that calls one of these helper > functions directly, or indirectly by calling a function with a base-standard > interface, must assume that the FP parameter, result, scratch, and status > registers might be altered by a call to it.".
Yes, you are right. It's my fault to add the "only" here. Thank you to point out this. Beside this, is this patch OK for you? Hale > > (Furthermore, the ideal result on implementations with VFP but not > hardware half-precision support would be that the software conversions > interact properly with hardware exceptions and rounding modes (so using > FPSCR).) > > -- > Joseph S. Myers > jos...@codesourcery.com