Tim,<br><br>Thank you very much, that did indeed fix things. I believe the word I should be saying is: 'oops'!<div><br></div><div>Stephen</div><div><br><div class="gmail_quote">On 24 October 2012 13:44, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Hi Stephen,<br>
<br>
> I'm not entirely sure what is wrong here - I assume it has something to do<br>
> with my 'special' instruction LDri_ab. This instruction is a load with an<br>
> 'address writeback' - ld.ab r0, [r1, 5] is equivalent to ld r0, [r1]; add<br>
> r1, r1, 5. As it was very difficult to match such behaviour automatically, I<br>
> actually only generate them manually for prologue/epilogue emission, so the<br>
> tablegen def is like:<br>
<br>
That fits. This line<br>
<br>
LDri_ab %FP, %SP, 4<br>
<br>
should almost certainly be printed as:<br>
<br>
%FP = LDri_ab %SP, 4<br>
<br>
The most likely cause is a slightly malformed BuildMI that's adding<br>
%FP without a define flag. Usually you put the destination register<br>
inside the call to BuildMI, and inputs with "addReg(...)" and so on.<br>
All this actually does is fiddle the flags in an appropriate manner;<br>
you can emulate it with addReg, but why bother? So what you should be<br>
looking for is something like:<br>
<br>
BuildMI(LDri_ab).addReg(Dest).addReg(Src).addImm(Offset)<br>
<br>
and changing it to:<br>
<br>
BuildMI(LDri_ab, Dest).addReg(Src).addImm(Offset)<br>
<br>
Hope this helps.<br>
<br>
Tim.<br>
</div></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>