<div dir="ltr"><br><br><div class="gmail_quote">On Wed Feb 18 2015 at 1:42:23 PM Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In <a href="http://reviews.llvm.org/D7316#125709" target="_blank">http://reviews.llvm.org/D7316#<u></u>125709</a>, @echristo wrote:<br>
<br>
> b) The attribute changes on the testcases, what's going on there?<br>
<br>
<br>
Krait is currently modelled as A15 because it's A9+Div, but it's closer to A9 than A15, and that generates codegen issues.<br>
<br>
There is no way of telling an external assembler that the CPU is A9+Div other than adding two directives (.cpu + .arch_extension), since GAS doesn't support ".cpu krait", and I'm not sure it should, TBH, since that's the whole point of the .arch_extension directive.<br></blockquote><div><br></div><div>Right, but there are other ones. Like:</div><div><br></div><div>-mcpu=krait -mattr=-v7,+v6,-hwdiv,-hwdiv-arm,-vfp4,-vfp3,+vfp2,-neon,-t2dsp,+slowfpvmlx,-aclass,-trustzone</div><div><br></div><div>Most of those likely aren't needed?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> c) If the krait always has hardware divide why both conditionals after?<br>
<br>
<br>
Because of "-mattr=-hwdiv,-hwdiv-arm".<br></blockquote><div><br></div><div>Fair (annoying, but fair).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> d) It seems that the .cpu directive for the krait cpu is orthogonal to the arch_extension part of this patch.<br>
<br>
<br>
Almost... :)<br>
<br>
.arch_extension is needed to help GAS understand that krait is A9+Div, that's why it's in the same patch. Without it, the original patch looked completely useless. This merge was actually my fault, if you feel strongly, it should be pretty safe to split the .arch_extension from the krait changes.<br>
<br></blockquote><div><br></div><div>Would be nice, yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> e) It doesn't seem that the arch_extension stuff is wired into the object emitter? What is supposed to happen there?<br>
<br>
<br>
The object emitter already knows that Krait is A9+Div, so the Div instructions get emitted correctly. The directive is *just* for the sake of GAS allowing Divs to be emitted.<br></blockquote><div><br></div><div>So it's quite literally taking the place of a command line option? Otherwise gas can't handle the instruction or what? Can I get some more background here please?</div><div><br></div><div>Thanks!</div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<a href="http://reviews.llvm.org/D7316" target="_blank">http://reviews.llvm.org/D7316</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/<u></u>settings/panel/<u></u>emailpreferences/</a><br>
<br>
<br>
</blockquote></div></div>