<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/102280>102280</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Why are the llvm API and llvm-objdump disassembly results different for the same version?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          potatopublic
      </td>
    </tr>
</table>

<pre>
     My environment.

CPU: Apple M1
OS: ventura 13.0
llvm version: 18.1.8
lldb version: 18.1.8

I attempted disassembly with lldb and llvm-objdump for only 4 bytes of code. However, even though they are clearly the same version, the disassembly results of lldb and llvm-objdump were different. Can anyone explain this phenomenon?

Below is the source code I targeted and the disassembly results.




````
target 4byte is 0x088dc6c2 // strlb w2, [x22]
byte.c

int main(){

   asm volatile(
   ".byte 0xc2, 0xc6, 0x8d, 0x08\n"
 );

}
````


````
./llvm-objdump --version
  Homebrew LLVM version 18.1.8
  Optimized build.

0000000100003fac <_main>:
100003fac: 088dc6c2     stlrb   w2, [x22]     <<<<------- disassemble successed
100003fb0: 52800000     mov     w0, #0x0 ; =0
100003fb4: d65f03c0     ret

````

````
./lldb --version
 lldb version 18.1.8

(lldb) disas --pc
byte4`main:
->  0x100003fac <+0>: ; unknown opcode  <<<---- disassemble failed
    0x100003fb0 <+4>: mov w0, #0x0 ; =0
    0x100003fb4 <+8>: ret
````

Additionally, I wrote disassembly code for 4 bytes with the llvm-c header file, and when disassembly was attempted, disassembly failed for 4 bytes targets like lldb.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VUuP4ygQ_jXkUopF8CPugw_d6YmmpRnNSKvdPa6wKcfMYLAA57G_fgV20vH2w7JAKqjXV8VX3Dl50IgVyZ9I_rzio--MrQbjuTfDWCvZrGojLhV8vwDqo7RG96h9QugzoY_Tuvv5J0kf4XEYFML3zST88UeQHVH70XLY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