<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 again,</p>
<p><br>
</p>
<p>I forgot to remove the 'important notice' stuff from the footer of my last email, so I am sorry.</p>
<p><br>
</p>
<p>Here's my previous question:</p>
<p><br>
</p>
<p></p>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; margin-top: 0px; margin-bottom: 0px;">
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'.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; margin-top: 0px; margin-bottom: 0px;">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; margin-top: 0px; margin-bottom: 0px;">
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:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; margin-top: 0px; margin-bottom: 0px;">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; margin-top: 0px; margin-bottom: 0px;">
 </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
/// Return the default calling convention that LLVM will use.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
llvm::CallingConv::ID ARMABIInfo::getLLVMDefaultCC() const {</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
  // The default calling convention that LLVM will infer.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
  if (isEABIHF() || getTarget().getTriple().isWatchABI() ||</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
+      Kind == ARMABIInfo::AAPCS_VFP)</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<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 style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
cheers,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
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>
</body>
</html>