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

    <tr>
        <th>Summary</th>
        <td>
            clang-cl inline asm bug about lable offset
        </td>
    </tr>

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

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

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

<pre>
    ```cpp
int main()
{
        unsigned dwpXSP, dwpXBP, dwpXIP;
#if defined(_M_IX86)
        __asm
        {
        XIP_lable:
                mov dwpXIP, offset XIP_lable
                mov dwpXSP, esp
                mov dwpXBP, ebp
        }
#else
#error please build with x86
#endif
        return 0;
}
```
Compiling the above code with clang-cl for x86 will result in the following link error, 
`
1>lld-link : error : undefined symbol: __MSASMLABEL_.0__XIP_lable
1>>>> referenced by Z:\TestInlineAsmBug\TestInlineAsmBug\TestInlineAsmBug.cpp:5
1>>>> Debug\TestInlineAsmBug.obj:(_main)
`
but with MSVC there will be no error.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMk82K2zAQx59GvogEWfLnwQcnu4HABhZSytKLkeyxo60sGUlOmrcv_ths6fZQEPagmflp5q8Rd052GqBA8Q7FTwEf_cXYwhl9H1xMScjCKBCmuRcoIcuqhwGRUmqPey41ohmiOSIlSnfTl-SjnpENbm7D2_kV0f1s7R7W8RWxOZYy2eIGWqmhQTSrTtXxLUtWHMmrirt-MR_wt-NrpbhQgFi5ukjem-sHmO6xaVsHHn9G_h221ARu-OJZagTx4UmfljJBOVgta43FgwLuAItRqgbfpL_gX1myBuhGtku6BT9ajcna7QL7UBGRcm_6QSqpO-wvgLkwV8C1aWAh1orrblMr3Bo74fFNKoUtuFF5LPWc0xqlzG0iKKl_4rm4qYP1IFKGiD0r1WxmN2LlEjJbo16Vx-7eC6Omvao6ncvz6aXcPb9UW1JVf4o4sR4LW2jBgq6hweKOf0zXEe-_gfNHraSG0vW7sfu_re00UayMv5zxBOLfCUa8TwfSrFpGMH80LEa_yHc6f99PGllYhBOAtVna3wZNwZqc5TyAIkwjmqUkzZPgUhCSpnUcQxjVlOU8TuIQBGQiZTVtEx4GsqCExoTRmNAoYck2SnmSpgwED7MIsghFBHou1Vapa781tgukcyMUIaNZwgLFBSg3PzZKNdzw7EWUTm_PFlPSRoydQxFR0nn3ifHSKygeQyFnOTB3PRZjNw3P6PF8U-v8B6NVxcX7wc1KHRA9dNJfRrGtTY_oYQKvv81gzTvUHtHDXI5D9LDWey3o7wAAAP__oX9E9A">