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]

Re: [PATCH] ARM half-precision floating point, 3/8 (target hooks)


Paolo Bonzini wrote:
Sandra Loosemore wrote:
This patch adds the target hooks that are required to get the C and
C++ language-level support for HFmode, specifically including the
implicit promotion and restrictions on function argument/return types.
The included documentation patch should be sufficient to explain the
details.

Is this necessary at all? Can we define HFmode to be a storage-only type at the language level?

It would be nice if we could do that. I imagine that now that half-precision is in the IEEE standard, it's going to be picked up by other targets and may make it into future versions of the C/C++ language standards as well (although maybe not with the exact semantics that I've implemented here). I thought that the language-level issues were quite straightforward, both conceptually and implementation-wise.


OTOH, it was a lot of work to retro-fit the ARM back end to know about HFmode, and most of it was not even related to the 2 new instructions. (The constant pool handling gave us fits, for instance.) I clearly do not have either the time or target-specific knowledge to retrofit all the other back ends, too, and it's not realistic to think somebody else is going to do all that work. ;-) So if we did add HFmode knowledge to the compiler front end, we'd still need some sort of target hook to control whether it's supported at all by the back end.

Anyway, I could rework this part of the implementation if there's consensus that it's the right thing to do, that the semantics as currently implemented for ARM are useful in general, etc. I'd have to give it some thought to come up with a new design for the front end/back end interface, though -- so I'd prefer to get some guidance that it's really the right direction before diving into it.

-Sandra


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