[LLVMbugs] [Bug 19142] New: Implement __builtin___clear_cache and lower to __clear_cache on ARM

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 14 07:57:09 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19142

            Bug ID: 19142
           Summary: Implement __builtin___clear_cache and lower to
                    __clear_cache on ARM
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: renato.golin at linaro.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Android uses the GCC intrinsic __builtin___clear_cache described here:
http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html

To implement that in LLVM we'd have to add it in three steps:

1. Add support for clang to recognise __builtin___clear_cache and lower to some
intrinsic like @llvm.clear_cache

2. Add a LibCall to __clear_cache, but set it as noop by default (some targets
don't need it), and set it to __clear_cache on the targets that do support it.

3. Link @llvm.clear_cache to LibCall's __clear_cache.

As an extra, on ARM, would it be desired to lower the call to a sequence of
instructions (push r7, mov r7, #0xf0002, svc 0x0, pop r7), or is that a bit too
much optimisation?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140314/a6ccae9e/attachment.html>


More information about the llvm-bugs mailing list