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

    <tr>
        <th>Summary</th>
        <td>
            LLVM incorrectly assembles data32 jmp seg, addr in .intel_syntax and .code16
        </td>
    </tr>

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

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

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

<pre>
    For this code https://godbolt.org/z/KMvffjKns

```
    .section .text.att
 .code16
    ljmpl $0x8, $0x100000

    .section .text.intel
 .intel_syntax noprefix
    data32 jmp 0x8, 0x100000
```

The expected output for both instructions are:

```
66 ea 00 00 10 00 08 00
```

Binutils gets both right, LLVM assembles the second one as a 16-bit address far jump and silently truncates the address:

```
ea 00 00 08 00
```

There doesn't seem to be a proper way of writing this instruction in `.intel_syntax` that LLVM understands, besides manually doing it as say `.byte`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEU8GOozgQ_RpzKTUyTiDkwGFmR1xm-tba68rgAhwZG7mK7mS_fmXCbrpbu72RVcGy_V7Vq3qayI4esRHld1H-yPTKU4iNiXoeQsRXjFkXzK1pQwSeLEEfDMLEvJA4fBOqFaodg-mC4zzEUaj2T6Han8-vw3D56UnIH0J-22Ml97VtAQBywp5t8JAzXjnXzPtZnmiK6nHTXebFgVBHea2F-u3-Vcj0e8_xL6DWM7q_YbfNH3TzrK_gwxJxsNfHU6NZHxRc5gV2nk8kH0u4x5cJAa8L9owGwsrLyjCECF3gCawnjuuWD4GOmET7b02qClCDlGkVW5Q1fEn-3fqVrSMYkelOGe04ccr916_fn0ET4dw5JOAJgbAP3kDwCJpAQ1E9dZZBGxORCAYd4bLOC2hvgKxDz-4GHFffa94h9rtfF_JPFf-X_8uEEcEEJC_UiYEQZ-AAHYKGJYYFI7zpG4QB3qJl68f7GL7TFawHUckPvRWVBJ403zVYvcFIrL2hpEuHZA0SzNqv2rkbmJBwkw4EpG8bWndjFJXMTHMw58NZZ9gUp0LW5VHVdTY1utBlaWolT3VlSqlM3Z07PJiywP40FOfMNkqqozwU5-JQ1LLOUeuiP53lILHHrjqLo8RZW5c79zon82SWaMWmLk91mTndoaPNlkp5fIPtUCiVXBqb9OapW0cSR-ksMT1Q2LLDZivc-j7EiH3q4mMQ3k054ZgUST1NMn70RxqC3YjZGl3zyfWWp7XL-zAL1Sby_e9pieGCPQvVbimTUO1W0l8BAAD__wPWWUE">