<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 24, 2014 at 4:03 PM, 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">Hi Jun,<br>
<div class=""><br>
On 24 June 2014 08:08, Jun Koi <<a href="mailto:junkoi2004@gmail.com">junkoi2004@gmail.com</a>> wrote:<br>
> def LEA16r   : I<0x8D, MRMSrcMem,<br>
>                  (outs GR16:$dst), (ins i32mem:$src),<br>
>                  "lea{w}\t{$src|$dst}, {$dst|$src}", [], IIC_LEA_16>,<br>
> OpSize16;<br>
><br>
><br>
> Please correct me if I am wrong, but I think "ins i32mem" should be "ins<br>
> i16mem" because this is about 16bit register?<br>
<br>
</div>I think there's something going on here, but it's probably more<br>
complicated than that. The lea instruction just calculates an address,<br>
so the resulting pointer doesn't really *have* a size.<br>
<br>
Binutils seems to handle this reasonably by omitting the "dword<br>
ptr"/"word ptr" part entirely when printing: "lea ax, [eax]" instead<br>
of "mov ax, word ptr [eax]". The assembler accepts all variants, which<br>
may or may not be a good choice.<br></blockquote><div><br></div><div>yes, i think this is a good idea. but then how can i modify LEA16r above to <br></div><div>eliminate "dword ptr" part?<br><br><br></div><div>

thanks,<br></div><div>Jun<br><br></div></div><br></div></div>