This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [1/2] [ARM] [libgcc] Support RTABI half-precision conversion functions.
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Hale Wang <hale dot wang at arm dot com>
- Cc: 'GCC Patches' <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 10 Apr 2015 20:29:47 +0000
- Subject: Re: [PATCH] [1/2] [ARM] [libgcc] Support RTABI half-precision conversion functions.
- Authentication-results: sourceware.org; auth=none
- References: <000601d07346$9fbec910$df3c5b30$ at arm dot com>
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.".
(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
joseph@codesourcery.com