Hi,

On Mon, 7 Dec 2009, H.J. Lu wrote:

> ---
> When a value of type _Bool is passed in a register or on the stack,
> the upper 63 bits of the eightbyte shall be zero.
> ---

That was the outcome of a discussion in 2005/2006.  We put this language 
in because at that time all compilers booleanized at the caller.  
GCC also makes use of this guarantee (although limited to the 
8 bit):

_Bool bartmp;
void foo(_Bool bar)
{
  bartmp = bar;
}

will generate

foo:
        movb    %dil, bartmp(%rip)
        ret

I do see value in limiting the zeroing to bits 1-31 when passed on stack.
But we'd need agreement on the discuss@ list, which for some reason didn't 
seem to get any of these mails.


Ciao,
Michael.

Reply via email to