zibi2 wrote:

> > > I'm not sure I understand this change. Are you saying that the de-facto 
> > > ABI as implemented by other compilers on z/OS does not actually guarantee 
> > > that incoming parameters are extended?
> > 
> > 
> > Sadly yes. The current XPLINK specification in the LE Vendor Interfaces 
> > document mandates only that scalar _return values_ are extended to 64 bit. 
> > However, this does not apply to arguments (a oversight in my opinion), and 
> > we found several interoperability issues.
> 
> I see. But then it does look like the correct implementation would be to 
> simply _not_ mark such parameters as `signext` or `zeroext` in the front end.

You're right. Updated the fix to do exactly that. The 
`ZOSXPLinkABIInfo::classifyArgumentType()` now returns `getDirect()` instead of 
`getExtend()` for promotable integer types, so no signext/zeroext is emitted on 
LLVM IR parameters. `classifyReturnType()` is unchanged since the spec does 
mandate extension for return values. 

https://github.com/llvm/llvm-project/pull/206833
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to