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

    <tr>
        <th>Summary</th>
        <td>
            Compiling C inline powerpc 64-bit architecture assembly code with Clang 14.0.0 compiler, error: Undefined temporary symbol .Ltmp2
        </td>
    </tr>

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

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

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

<pre>
    My source code are:
int MyOpen(char * filename,int Attrib)
{
 
        int ret = 0;
        __asm__ __volatile__ (
          "  xor  %%rax, %%rax\n"
          "  add  $0x2, %%rax\n"//32--5 64--2
          "  mov  %1, %%rdi\n"
          "  mov  %2, %%rsi\n"
          "  syscall\n"
          " mov  %%rax, %0\n"
          :"=m"(ret)
          :"m"(filename), "m"(Attrib)
          :"memory", "rsi", "rdi", "rax", "rbx", "rcx", "rdx"
        );
        return ret;
}

int main()
{
        int fin = MyOpen("/home/test/hello.c",O_RDONLY );
        return 0;
}
compile with:
clang -m64 -target powerpc64-linux-gnu  test.c -o test
and get ERROR:
error: Undefined temporary symbol .Ltmp2
2 warnings and 1 error generated.

On Ubuntu 22.04
Have a powerpc64 cross-compile environment


I'm a rookie and didn't find a good fit on google to solve the problem, please help me!
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVEuvqzYQ_jVmMwKBgSQsWOQkjVrp3kY60l10FRk8Abd-INvkJP--MuRB7zlX6gZmPN-M5_F5mHOi04g1Kd9IuY_Y6Htj6wZ9j41DHzWG3-rvN3BmtC1CazgCs0jyLUn3JN0K7eH77TigJnTT9swCoVs4C4maKSR0FwBb761oCK1mH7J-mwW462kVUBY9kHwPKcnfnobTiTl1OsHpdDGSeSHxdAJCN08AAKEU4GpskEpCS8uuhO4WSrnThNKfPRjnQSrSK_0STg-EHnIaxyWsijj-5K_MZboxW3hz8YvLHuDlVe5XYHdzLZPya-sj0n8KTb_A5ttwkO_VVMzGon8N4AW4W18Dq-aQD8PPo1t4ojL2NqEmh1DPS-FLJeT5VJql0i4Vfl2WEO5cEMGiH60OJHmdrvcP84OKiolAxM9Uu3PsLPTEsSdl50n3JpR-8Oh80FBKk7RzZsfT-_7457e_4Ot80s_ZtEYNQiJ8CN8_30krme4gVqsCYs9shx4G84F2aFdFLIUer3GnR4CQQtJCbCZp9mWaQ3D47f39-P6MiNYaS_It_NAcz0IjB49qMJbZG7ibaoyE5JtXw72lFD6Y1UJ3DkLADKYA0KFGyzzyZNnLo4Yfzaj9CJQmaTEf_s4uCOyVN7TWOBc_6kV9EdZohdovQ83fPwhdK2BgjflH4JQBF1wTup6GwoFBZwyHs_BgdJA7ieANOCMvCL5HGKxpJKrAlkEicwg9ygHC5LKI1zmv8opFWGfrbFWsszwto77mVVq0KbINlk22asoWWbbCVZYVJearcxaJmqa0SEuaZ3lepmWStXmOm_KM1bpanzclKVJUTMhEyotKjO0i4dyIdZVnFY0ka1C6aX1SOg050KbcR7YO-LgZO0eKVArn3SuCF15ivZsaJ3QHOxBaCo2P3oaN0wgPzLa98Nj60SIw51A18jYv4cAu2E2syookTVK4z8GGBv1_ckSjlXXv_eCmZx2WXid8PzZJaxShh5Dz_RcP1vyNbXgiUwscoYe5C5ea_hsAAP__2l7M5Q">