[cfe-commits] [patch] Implement __clear_cache on ARM

Eli Friedman eli.friedman at gmail.com
Sat Jun 5 00:44:20 PDT 2010


On Fri, Jun 4, 2010 at 10:44 PM, Rafael Espindola <espindola at google.com> wrote:
>> I think you can use "f" without specifying a header name, but I'm
>> guessing you don't want the warning asking for an explicit declaration
>> of __clear_cache?  (I don't have an ARM gcc around to check how it
>> behaves.)
>
> Exactly, the issue is the warning. GCC handles this as a fully magic
> function, no declaration in a header is needed.
>
>>> The patch also removes some dead code. There is not need to special
>>> case ARM::BI__builtin_thread_pointer since the generic intrinsic
>>> handling code takes care of it.
>>
>> Patch looks fine.
>
> Sorry, would you mind reviewing the new version attached? Trying to
> bootstrap clang I noticed that the name was being mangle in c++ :-(
>
> If you think the assert should stay, I can also make
> GetOrCreateLLVMFunction public.

CodeGenModule::CreateRuntimeFunction is the public API for that; and
actually, I think explicitly building the function pointer using it
would be better than depending on the declaration of the builtin, to
call attention to the fact that it's a libgcc call rather than an
ordinary library call.

-Eli




More information about the cfe-commits mailing list