<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,</p>
<p><br>
</p>
<p>I'm looking to allow LLVM to simplify more library calls and it appears that currently this cannot happen for functions that are declared with a call standard other than C. Specifically I'm trying to work around function calls annotated with 'aapcs_vfpcc'.</p>
<p><br>
</p>
<p>I see that the VFP standard is used when -mfloat-abi=hard is provided, but it is not used when arm-none-eabihf is used as a triple. It looks like this happens because Clang decides that the ARM backend will be capable of figuring out what standard to use
and so doesn't worry about using extra annotations. But the backend is also capable of querying the Float ABI too, so I assume it would be capable of calculating the standard in either case. I want to make a simple change to Clang like this:</p>
<p><br>
</p>
<p></p>
<div>/// Return the default calling convention that LLVM will use.</div>
<div>llvm::CallingConv::ID ARMABIInfo::getLLVMDefaultCC() const {</div>
<div> // The default calling convention that LLVM will infer.</div>
<div> if (isEABIHF() || getTarget().getTriple().isWatchABI() ||</div>
<div>+ Kind == ARMABIInfo::AAPCS_VFP)</div>
<div>
<div>return llvm::CallingConv::ARM_AAPCS_VFP;</div>
<div><br>
</div>
But this change makes the CodeGen tests, that are testing the declared aapcs, fail. So my question is, (1) why is does the behaviour differ between -mfloat=hard and eabihf targets and (2) what would definitely break if clang didn't annotate some functions with
aapcs_vfp?</div>
<div><br>
</div>
<div>cheers,</div>
<div>sam</div>
<br>
<p></p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Sam Parker</p>
<p>Software Engineer, Compilation Tools</p>
<p>Development Solutions Group</p>
</div>
</div>
</div>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose,
or store or copy the information in any medium. Thank you.
</body>
</html>