<div dir="ltr">I believe there's other target specific code hiding in clang/lib/Driver/ToolChains/Clang.cpp. Maybe other files in that directory too.<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 19, 2021 at 10:51 AM Bagel <<a href="mailto:bagel99@gmail.com">bagel99@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Oh my! I had thought that all the target-dependent code was under<br>
lib/Basic/Targets/. Looks like I have more work to do. Is there other <br>
target-dependent code hiding elsewhere in the tree?<br>
<br>
Thanks for the prompt reply,<br>
Brian<br>
<br>
<br>
On 10/19/21 12:21 PM, Craig Topper wrote:<br>
> I believe it is done by calling ABIArgInfo::getExtend in the ABI handling in <br>
> clang/lib/CodeGen/TargetInfo.cpp. This will add a signext or zeroext attribute <br>
> to the argument in IR. The backend can use this to insert the appropriate extend.<br>
> <br>
> ~Craig<br>
> <br>
> On Tue, Oct 19, 2021 at 10:14 AM Bagel via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a> <br>
> <mailto:<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>> wrote:<br>
> <br>
> My target is 64-bit only, it has no 32-bit operations other than LD/ST.<br>
> Parameters need to be sign or zero extended. Where in clang does one indicate<br>
> that for a target?<br>
> <br>
> Thanks,<br>
> Brian<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a> <mailto:<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
> <<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>><br>
> <br>
<br>
</blockquote></div>