Hi,<br><br>  It looks like the problem was with the RIP relative addressing. The original patch mistakenly<br>removed the || DispForReloc part because I tough that the RIP relative addressing was done<br>by the SIB encodings, but it is actually done by the shorter ones.<br>
The attached patch seems to work for me on linux and when simulating darwin by forcing some variables in X86TargetMachine.cpp to their darwin values.<br><br>                                Zoltan<br><br><div class="gmail_quote">
On Tue, May 5, 2009 at 11:17 PM, Zoltan Varga <span dir="ltr"><<a href="mailto:vargaz@gmail.com">vargaz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>  I can't reproduce these failures on my linux machine. The test machine seems to be<br>running darwin. I suspect that the problem might be with RIP relative addressing, or with<br>the encoding of R12/R13, but the code seems to handle the latter, since it checks for<br>

ESP/EBP which is the same as R12/R13.<br><font color="#888888"><br>                Zoltan</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Tue, May 5, 2009 at 8:18 PM, Evan Cheng <span dir="ltr"><<a href="mailto:evan.cheng@apple.com" target="_blank">evan.cheng@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Zoltan,<br>
<br>
The part that determines whether SIB byte is needed caused a lot of<br>
regressions last night (see Geryon-X86-64 etc.). I've reverted it for<br>
now. Please take a look.<br>
<br>
Thanks,<br>
<font color="#888888"><br>
Evan<br>
</font><div><div></div><div><br>
On May 4, 2009, at 3:49 PM, Evan Cheng wrote:<br>
<br>
> Committed as revision 70929. Thanks.<br>
><br>
> Evan<br>
><br>
> On May 3, 2009, at 8:29 PM, vargaz wrote:<br>
><br>
>><br>
>> Hi,<br>
>><br>
>> If this looks ok, could somebody check it in ?<br>
>><br>
>>              thanks<br>
>><br>
>>                  Zoltan<br>
>><br>
>><br>
>> Evan Cheng-2 wrote:<br>
>>><br>
>>> Looks good. Thanks.<br>
>>><br>
>>> Evan<br>
>>><br>
>>> On May 1, 2009, at 8:40 AM, Zoltan Varga wrote:<br>
>>><br>
>>>> Hi,<br>
>>>><br>
>>>> The attached patch contains the following changes:<br>
>>>><br>
>>>> * X86InstrInfo.cpp: Synchronize a few places with the code in<br>
>>>> X86CodeEmitter.cpp<br>
>>>> * X86CodeEmitter.cpp: Avoid the longer SIB encoding on amd64 if it<br>
>>>> is not neeed.<br>
>>>><br>
>>>>       Zoltan<br>
>>>> <llvm.diff>_______________________________________________<br>
>>>> LLVM Developers mailing list<br>
>>>> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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>
>>><br>
>>> _______________________________________________<br>
>>> LLVM Developers mailing list<br>
>>> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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>
>>><br>
>>><br>
>><br>
>> --<br>
>> View this message in context: <a href="http://www.nabble.com/-PATH--Fixes-for-the-amd64-JIT-code-tp23335910p23362528.html" target="_blank">http://www.nabble.com/-PATH--Fixes-for-the-amd64-JIT-code-tp23335910p23362528.html</a><br>


>> Sent from the LLVM - Dev mailing list archive at Nabble.com.<br>
>><br>
>> _______________________________________________<br>
>> LLVM Developers mailing list<br>
>> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>