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

    <tr>
        <th>Summary</th>
        <td>
            assembler macro argument separation
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    Assembler macro invocations can occur with arguments separated simply by white space. While gcc/gas accept the x86 example below, clang (presumably its integrated assembler) loses some important white space here. Slight variations of the example can be used to observe that both arguments indeed are concatenated to a single one at some point.

asm(".macro branch$ insn:req tgt:req\n"
    "\\insn\\()q \\tgt\n"
    ".endm\n"
    ".macro call tgt\n"
    "branch$ call \\tgt\n"
    ".endm");

void foo(void(*func)(void))
{
    asm("call *%0" :: "r" (func));
}

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNk8FynDAMhp_GXDRlwMBmOXDYJJMX6KFn2WjBGWMT22ySt6-AkqSddqaMBySsX_okjPL9e3eJkSZlKcCEOngw7uY1JuNdBI0OvNZLgFeTRsAwLBO5FCHSjAET9RDNNNt3UO_wOppEEGfUlMOP0ViCQWshnwaMgFrTnCCNBG_nE9AbsoxAkfWvQj6AtugGEPI8B4rLhIpzGi5kXKJhr4QHqJAtWB-JMfxEwAA-JHTpKwGMFBjjuzXDmOCGwfxqyV83iANg7VARLJELJA9eRQo34hBMoPxvPRvX04oRWOUdj4jcxsUy5DG4gdN5R8DKjWv2DJ-L4lEUl_2OceIOhZT5PmoV0OlRyJpzRyeqS6AXSEPaLdE8OI7dpcDX6jQPvLbozdrStS-we6v0L6KcXD_9dWPH0Ggt_EP7ibhF_UcdfilbUd1_bfzmTQ9X7xl3NTfqy3Vxeg093rXr2kV395-JP4a2A8iLkE3BLvCUeK2Fw-bK80fGL_XvHncj67uqb6sWs2SSpQ7_OPbHdz6ONh-WbAm2G1Oa41pKPq1HmX-DReXaM9OTtbfj8W0O_pl0YtfEuFBko6nPVZ2NXXMqZVUqVTTyWlWS6lr3pSzPJ8KCpOozi_wbxE4096J5zEwnCymLuiyKc1kWdd5SLYvrnawUypM-XUVd0ITG5mvh3IchC93GoJYh8qY1McXPTW7UDI7oyI9LGn3onhUt1ugx23i7DfYnVShDxQ">