[LLVMdev] ARM assembler's syntax in clang
ashi
ashi08104 at gmail.com
Sat Feb 23 04:21:22 PST 2013
Hi, Jim,
Why "asm" name is a horrible hack? Do you have any suggestion for cross-platform support of my ARM assembly code?
Thanks!
ashi
On Feb 21, 2013, at 2:00 AM, Jim Grosbach <grosbach at apple.com> wrote:
> You were correct the first time. That post is talking about a Windows target. Ashi is working on iOS. Underscores are normal and expected. Using an "asm" name on the symbol is a horrible hack. Adding the underscore to the name in the .s file is the correct solution.
>
> -Jim
>
> On Feb 20, 2013, at 12:04 AM, Tyler Hardin <tghardin1 at catamount.wcu.edu> wrote:
>
>> So it turns out that I was wrong. It, in fact, is not standard. But regardless, you can use asm to specify the exact name. Eg.
>>
>> extern int func() asm("func");
>>
>> You can read more here: http://stackoverflow.com/questions/1034852/adding-leading-underscores-to-assembly-symbols-with-gcc-on-win32
>> Despite the title of the thread, the solution is compiler and system independent.
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130223/40459ce3/attachment.html>
More information about the llvm-dev
mailing list