layout description - a proposal
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Tue Mar 13 21:15:51 UTC 2018
Hi Tobi,
I think your reading is correct - the intention here is to make
properties that would potentially result in breakage if violated (and
mistaking an int for a floating point seems like an unquestionably bad
thing) as first class entities of the description. Moreover, the goal is
also to be able to use the layout description to drive the ABI mapping.
So, knowing signedness and FP-ness is an important bit in order to
understand e.g. which register could be used to pass a value with that
layout on to a native function. So, the choices available should be
sufficiently expressive to cover e.g. the type table in section 3 in the
System V ABI [1].
If I look at that table, I see that it makes distinction between
signed/unsigned, it makes explicit assumptions on size (e.g. fourbyte,
eightbyte), and it distinguish between integral and FP values. These
basic distinctions form the base of the properties I wanted to capture
in the layout description.
Maurizio
[1] -
https://software.intel.com/sites/default/files/article/402129/mpx-linux64-abi.pdf
On 13/03/18 18:01, Tobi Ajila wrote:
>
> > As in LDL, it is possible for layouts to have annotations -
> > but I strongly feel that important representation distinctions
> should be
> > captured in the language rather than in another meta-language.
> When we previously investigated this we saw a distinction between
> layout (where are the bits - explicit size and offset), representation
> (what
> do the bits mean - endianness, signedness) and interaction (how are the
> bits loaded/stored - volatility, alignment constraints, etc.).
>
> My understanding of this proposal is that 'layout' and
> 'representation' are
> first class citizens. Is the intention to use annotations to convey
> 'interaction' properties?
>
> --Tobi
>
More information about the panama-spec-experts
mailing list