Issue |
93192
|
Summary |
Compiling C inline powerpc 64-bit architecture assembly code with Clang 14.0.0 compiler, error: Undefined temporary symbol .Ltmp2
|
Labels |
clang
|
Assignees |
|
Reporter |
bethebset
|
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!
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs