<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54252>54252</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[BPF] mod32 (0x94) instruction not recognized !
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
perror
</td>
</tr>
</table>
<pre>
I compiled the following code with `bpf-gcc`:
```c
int foo (void)
{
int n = 10, m = 100, k = -1;
n = 10 * k + ((unsigned) m) % 7;
k = (n ^ m) >> 2;
return k;
}
```
When disassembled with `bpf-objdumd` if get:
```
400068: bc 01 00 00 00 00 00 00 mov32 %r1,%r0
400070: 61 a0 f8 ff 00 00 00 00 ldxw %r0,[%fp+-8]
400078: 94 00 00 00 07 00 00 00 mod32 %r0,7
400080: bc 00 00 00 00 00 00 00 mov32 %r0,%r0
400088: 0c 01 00 00 00 00 00 00 add32 %r1,%r0
```
But, the exact same opcodes produce the following with `llvm-objdump-13 -d`:
```
524301: bc 01 00 00 00 00 00 00 w1 = w0
524302: 61 a0 f8 ff 00 00 00 00 r0 = *(u32 *)(r10 - 8)
524303: 94 00 00 00 07 00 00 00 <unknown>
524304: bc 00 00 00 00 00 00 00 w0 = w0
524305: 0c 01 00 00 00 00 00 00 w1 += w0
```
So, it seems that the opcode `0x94` (`mod32`) is not recognized.
I may be wrong, so do not hesitate to tell me if I am wrong.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFVMFuozAQ_Rq4jBIZAwEOHJKmlXpbaQ97BtsQN2AjbJp2v37HhqRpGmWRBTaeeZ6ZN8-15p_lKzDdD7ITHOxBQKO7Tp-kavE3F3CS9gDBhtRDs2oZw1kQbwOyD8jWzf1g81oqi94aApq_a8kDWix22W6eADgTBUG8h4gE9An6Ze4XR79YRUG82J-9zh6IvHVWdOfOwDEpI1sl3FHQu1dAU8gu_rBAoiVCpM-LTfyMA-iV2SjsNCo4fp2c7W9ynJd_DkIBl6YyRvS1K9l1fXT9xqee4wpkA62wP0t1PjEhhGxyv1_UDEgEhNyOy9Pr95i63MYI6-S-33CymZJiE0FFoMmhae7j4NPxjxPMCIiU7nDaDFjQVR6k-2-gS3BFcoWV3Q2OL8E5yOwaIydfCf7I7n6C5F6C-RIL-V-hKs7vF-qm_vN7N1nXdq7pxUfFLJiqF6AH1_cGhlHziYkbTZzp7rr3fuF7WEUxrPhdZZyzSGkSk-gh3bhziny7nr670Yfs4s5Ili7fOkn4Amyd-Gg-omZWkF-UuCDGD6nFnSB-mtRR6ZNyYrl2TR4y6nIg93JIHxK4pE531543NfytHVcSSRKiN8hKZT01M12OEvJRJE567mrYEN-WzhsVLw0obVHlTLdK_hV8fd0Gr9BXn1DjVTdq1bpTjAauvctBGGkri12gwYquA2wQlPYrVP1svg55GfMiLqrQStuJEjW1-_WCYroII_eBuTCUsePErNTqJh60isJp7MqDtYNxtaIvOFpstqle4_WMC9dxy2eFvfkmGHbvizRmEgYnaUJTGh7KiFS8LiqRsDphgvOaJvgrL3hBWZyJTdhVtehM6bVPlTiBh8A5xhzKkhJKSUyyaEMLkq-jJskZzeoiFoLhjyAhoq9kt3ZxrPXYhmPpQ6qn1uBmJ401X5t4T7oL2pfF4VeTPeixHMQ46jH0J5c-8n88Y6tw">