<div dir="ltr">
<p class=""><span class="">Fixed in r241381</span></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 2, 2015 at 4:35 PM, Craig Topper <span dir="ltr"><<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@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 dir="ltr">Forgot to copy llvmdev.<div><br></div><div><span class=""><span style="font-size:12.8000001907349px">I think this part of the diff was a mistake. That Requires check still needs to be there.</span><div style="font-size:12.8000001907349px"><br></div></span><div style="font-size:12.8000001907349px"><span class=""><pre style="white-space:pre-wrap;color:rgb(0,0,0)"> let Uses = [RCX] in
def JRCXZ : Ii8PCRel<0xE3, RawFrm, (outs), (ins brtarget8:$dst),
- "jrcxz\t$dst", [], IIC_JCXZ>, AdSize64, Requires<[In64BitMode]>;
+ "jrcxz\t$dst", [], IIC_JCXZ>, AdSize64;</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><br></pre></span><pre style="white-space:pre-wrap;color:rgb(0,0,0)">I'll fix sometime this weekend.</pre></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Thu, Jul 2, 2015 at 3:55 PM, Li, Charles <span dir="ltr"><<a href="mailto:charles_li@playstation.sony.com" target="_blank">charles_li@playstation.sony.com</a>></span> wrote:<br></span><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">Hi Craig,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">I am Charles Li from Sony Playstation.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">We are doing x86 code gen testing and, by chance, we noticed that compiling the
<span style="color:#1f497d"><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__msdn.microsoft.com_en-2Dus_library_windows_hardware_ff561499-28v-3Dvs.85-29.aspx&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=PTZl-V182G5lCtTyRw_pBegOuS9-dCoGJ6vQQmqygR0&s=sDMK3d1524BeXKDIv8fRJVB4XmU0XX-JjbZnS0zm4Ew&e=" target="_blank">64-bit assembly instruction</a></span> “</span><span style="font-family:"Lucida Console";color:#002060">jrcxz</span><span style="font-family:"Arial","sans-serif"">”
in 32-bit mode<span style="color:#1f497d"> “-m32”</span> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">previously resulted in an error,
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">now gets silently converted into the 32-bit equivalent instruction “</span><span style="font-family:"Lucida Console";color:#002060">jecxz</span><span style="font-family:"Arial","sans-serif"">”.<u></u><u></u></span></p>
<h1><span style="font-size:11.0pt;font-family:"Arial","sans-serif";font-weight:normal">I have bisected this change in behavior down to
<a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141229/250681.html" target="_blank">
r225075 - [X86] Make the instructions that use AdSize16/32/64 co-exist together without using mode predicates.</a><span style="color:black"><u></u><u></u></span></span></h1>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">I am curious if this change in behavior was an intended feature or perhaps a side effect.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">Here is my methodology.<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-family:"Arial","sans-serif"">The asm test case.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-family:"Lucida Console";color:#00b050">$ cat j64.s<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-family:"Lucida Console";color:#002060"> jrcxz foo<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-family:"Lucida Console";color:#002060">foo:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-family:"Arial","sans-serif"">Compiling the test case in 32-bit mode with Clang r225039.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-family:"Lucida Console";color:#00b050">$ r225039/clang.exe j64.s -c -m32 -target x86_64-pc-linux-gnu<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-family:"Lucida Console";color:#002060">j64.s:1:9: error: instruction requires: 64-bit mode<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-family:"Lucida Console";color:#002060"> jrcxz foo<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-family:"Lucida Console";color:#002060"> ^<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-family:"Arial","sans-serif"">Compiling the test case in 32-bit mode with Clang r225079 then disassembling the obj file to look for the jump instruction.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-family:"Lucida Console";color:#00b050">$ r225079/clang.exe j64.s -c -m32 -target x86_64-pc-linux-gnu<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-family:Consolas">(No Error)<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-family:"Lucida Console";color:#00b050">$ objdump j64.o -d | grep j<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-family:"Lucida Console";color:#002060">j64.o: file format elf32-i386<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-autospace:none"><span style="font-family:"Lucida Console";color:#002060"> 0: e3 00 jecxz 2 <foo><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<h1><span style="font-size:11.0pt;font-family:"Arial","sans-serif";font-weight:normal">Just FYI, this is not blocking us in any way. I found this to be a very interesting discovery so I want to share it in the hopes of determining if it was intentional or not.<u></u><u></u></span></h1>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">Sincerely,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">Charles Li<u></u><u></u></span></p>
</div>
</div>
</blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>~Craig</div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">~Craig</div>
</div>