<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 25, 2015 at 12:56 AM, Ahmed Bougacha <span dir="ltr"><<a href="mailto:ahmed.bougacha@gmail.com" target="_blank">ahmed.bougacha@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">On Tue, Mar 24, 2015 at 7:54 AM, Jun Koi <<a href="mailto:junkoi2004@gmail.com">junkoi2004@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> This patch fixes outs/ins of MOV16mr instruction of X86.<br>
><br>
> Thanks.<br>
><br>
><br>
> diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td<br>
> index e9a0431..f5b2064 100644<br>
> --- a/lib/Target/X86/X86InstrInfo.td<br>
> +++ b/lib/Target/X86/X86InstrInfo.td<br>
> @@ -1412,7 +1412,7 @@ let SchedRW = [WriteStore] in {<br>
>  def MOV8mr  : I<0x88, MRMDestMem, (outs), (ins i8mem :$dst, GR8 :$src),<br>
>                  "mov{b}\t{$src, $dst|$dst, $src}",<br>
>                  [(store GR8:$src, addr:$dst)], IIC_MOV_MEM>;<br>
> -def MOV16mr : I<0x89, MRMDestMem, (outs), (ins i16mem:$dst, GR16:$src),<br>
> +def MOV16mr : I<0x89, MRMDestMem, (outs i16mem:$dst), (ins GR16:$src),<br>
>                  "mov{w}\t{$src, $dst|$dst, $src}",<br>
>                  [(store GR16:$src, addr:$dst)], IIC_MOV_MEM>, OpSize16;<br>
<br>
</div></div>Why?  i16mem here stands for the pointer, not the actual memory.  A<br>
store doesn't define a pointer, so why would it be in "outs"?<br></blockquote><div><br></div><div><br>Then why does this "i16mem:$dst" belongs to "ins"? Is that wrong, correct?<br> <br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Also, what's special about i16? You'd need to change the various other<br>
*mr instructions, for instance the MOV8mr right above.<br>
<br></blockquote><div><br></div><div>Yes, I would fix that with another patch, but now I am not sure if this is needed.<br><br><br></div><div>Thanks,<br></div><div>Jun<br></div></div></div></div>