Hi, On Wed, 9 Dec 2009, H.J. Lu wrote:
> > Then fix the psABI. > > Don't we need to specify passing and returning char, short and int since > they are smaller than the integer class, which is eightbytes? Since the mapping from domain to bitpatterns is bijective, we don't have to (although if one wants to be extra anal one could say that the psABI expects the identity mapping). We have to say something about _Bool only because this mapping is not necessarily bijective. And in doing so we obviously were a bit too aggressive in specifying the bit range. So, IMO we have two sensible proposals: (a) specify that bits <7:1> must be zero (b) specify that bits <31:1> must be zero In both, the value would be in bit 0, other bits are don't care/unspecified. Both cases would do the conversion at the producer side, when necessary, i.e. before the call, or before the return. I have no opinion which one would be better. Defining only the low 8 bit might introduce partial register stalls or needless movzbl's. Defining the low 32 bit might require needless movzbl in other places. There's a case to be made for (a), because that one specifies exactly the bits that would be stored also in memory. I'd like to hear at least from the Solaris guys what they think about the whole thing. Ciao, Michael.