<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54788>54788</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
gcc style inline assembly question
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
0x7cc
</td>
</tr>
</table>
<pre>
my test cpp code:
```cpp
#include <stdint.h>
#include <stddef.h>
constexpr uintptr_t value = 0x11111111;
uintptr_t f(){
uintptr_t result;
__asm__ ("call *%[p]" : "=r"(result) : [p]"r"(value));
return result;
}
```
im using clang 14 on the https://godbolt.org/
```shell
-O3 -target x86_64-pc-windows-msvc
```
generated code;
```
"?f@@YA_KXZ": # @"?f@@YA_KXZ"
mov eax, 286331153
call rax
ret
```
I think the correct one should be:
```
mov rax, 286331153
call rax
ret
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytU0tz2yAQ_jXowtgjgZClgw5x3Mx0eui17UXDyxItEiogP_59V4qT2J4kpzIMj_32g4_dRTh1rvszjjpELMcRS6c0og8o3aH0ZSzS5w74xUKoGaSdlMaIPoaozBDXHaJfPoCV3l_DyyjdEKI-jR5PwB6jbyI-cDvNnB1OT9mlIbq9pr057xEpEanQ5oJjaG-o12Gy8ZU8g03DQ980GC9EIrm1sAS1DLHtiNgOjHD5AxgJaPDzRMrLQaR6hl49L_AieZYB_foyr-Pkh3sZaLO7i-n120yPp2CGFkvLYcxy7AYcO427GMcwZ4U8QW-dEs7GtfPtbHgvU6HT1j7bVt8pXkXuWx3xqSyaIl-NcnU0g3LHsOrDQX6iqNWD9jxqdamL7fu-c7ye9ihPof98aL79-LWYlkB80KBG8Ex4n_oaxrn17rDMmp8QecSkLCjNMkZvvZZ0zoEHrxsAMvHJC79CgM3wZwmzdN5rGSHqGofOTVZhcfUZbun36vz_VZeomqqKVjyJJlpdt1LiEM9WYzNYAwJ5CLoX9oz_TvB3jRuSydv6rlJM7Caxlq6HjbWHl2k1evcbXgpbEwLwYcHyTVkmXc1KxTIhtKiKjGQ0Z1xIVqWSpnmqskollgttQw0_ATI16CNejpizxnaJqUlKCLhuUkYKVq2FEps9yzMuM1UQUUKadc-NXc865hJOfL1IElMbALQmxPAGwitNO2i9XAfn8yl2ztfpaSNlslxcL8L_ARSxTjc">