On Mon, 30 Sep 2019, Martin Ling wrote:

> For starters, by doing this I have implicitly invented an ABI for fixed
> point types on x86 (they get passed exactly like correspondingly-sized
> integers, I suppose). This ABI would be unique to gcc.
> 
> I have also implicitly set the numbers of integral and fractional bits
> for each mode to the gcc defaults (which are specified in the docs at
> https://gcc.gnu.org/onlinedocs/gccint/Machine-Modes.html).

Yes - and we had the discussion at the Cauldron recently about trying to 
coordinate ABIs for new features with anyone who might wish to support 
those in other implementations.

In the case of x86, there are ABI mailing lists ia32-...@googlegroups.com 
and x86-64-...@googlegroups.com that can be consulted (though they don't 
always come to a conclusion when issues are raised, it's probably 
necessary to be quite active about pushing things to a conclusion and 
getting it into the ABI repositories).

I should also mention the concern I previously expressed that the present 
implementation approach for fixed-point support in GCC is questionable and 
it might be better to have GIMPLE lowering of fixed-point types to normal 
integer ones, with some extra GIMPLE operations but without separate 
machine modes <https://gcc.gnu.org/ml/gcc-patches/2011-05/msg00846.html>.  
This is not however intended to block addition of fixed-point support to 
any architecture based on the existing approach, given that we don't have 
an implementation based on such lowering (and the same ABI issues would 
still apply this this approach).

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to