<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Jun,</div><div class=""><br class=""></div>Could you file a PR please?<div class=""><br class=""></div><div class="">Thanks,</div><div class="">-Quentin<br class=""><div><blockquote type="cite" class=""><div class="">On May 22, 2016, at 11:54 PM, Jun Koi via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><br class="Apple-interchange-newline"><br class=""><div class="gmail_quote">On Mon, May 23, 2016 at 2:44 PM, Jun Koi<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:junkoi2004@gmail.com" target="_blank" class="">junkoi2004@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div class="">Hi,<br class=""><br class="">I found a mismatch between assembler & disassembler of X86: I assembled an instruction, then disassembled the output, but the result is not the same as the first original code: "add qword ptr [205163983024656], 1" vs " add qword ptr [1985229328], 1"<br class=""><br class="">Anybody knows what is wrong?<br class=""><br class="">Thanks.<br class=""><br class=""><br class="">$ echo "ADD QWORD PTR [0xba9876543210], 0x1"|llvm-mc -assemble -triple=x86_64 -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding          <span class="Apple-converted-space"> </span><br class="">   <span class="Apple-converted-space"> </span>add    qword ptr [205163983024656], 1 # encoding:[0x48,0x83,0x04,0x25,0x10,0x32,0x54,0x76,0x01]<br class=""><br class="">$ echo "0x48,0x83,0x04,0x25,0x10,0x32,0x54,0x76,0x01"|llvm-mc -disassemble -triple=x86_64 -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding<br class="">   <span class="Apple-converted-space"> </span>add    qword ptr [1985229328], 1 # encoding: [0x48,0x83,0x04,0x25,0x10,0x32,0x54,0x76,0x01]<span class="Apple-converted-space"> </span><br class=""></div></blockquote><div class=""><br class=""></div><div class="">To make it more clear, here is the same thing again, but with hexa immediate. You can see the difference in memory address: 0xba9876543210 vs 0x76543210.<br class=""><br class=""><br class="">$ echo "ADD QWORD PTR [0xba9876543210], 0x1"|llvm-mc -assemble -triple=x86_64 -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding -print-imm-hex<br class="">    .text<br class="">    add    qword ptr [0xba9876543210], 0x1 # encoding: [0x48,0x83,0x04,0x25,0x10,0x32,0x54,0x76,0x01]<br class=""></div></div><br class=""><br class="">$ echo "0x48,0x83,0x04,0x25,0x10,0x32,0x54,0x76,0x01"|llvm-mc -disassemble -triple=x86_64 -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding -print-imm-hex<br class="">    .text<br class="">    add    qword ptr [0x76543210], 0x1 # encoding: [0x48,0x83,0x04,0x25,0x10,0x32,0x54,0x76,0x01]<br class=""><br class=""><br class=""><br class=""></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">LLVM Developers mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:llvm-dev@lists.llvm.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">llvm-dev@lists.llvm.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></div></blockquote></div><br class=""></div></body></html>