[PATCH] D37788: [ARM] builtins: Do not abort in clear_cache.

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 08:41:27 PDT 2017


rengolin added a comment.

In https://reviews.llvm.org/D37788#873836, @peter.smith wrote:

> I don't think the above argument is strong enough to go against the consensus opinion though.


I don't think we have a consensus! :)

> I think that would be difficult to do without making it ARM_UNSAFE_CLEAR_CACHE, for example on AArch64 the cache invalidation instructions are in user-space so clear-cache uses them directly, there is a bit in the SCTLR for EL1 that controls whether these instructions trap to EL1 or are ignored. An alternative might be to call another helper function, something like clear_cache_error() which would have a default weak implementation that calls compilerrt_abort().

This looks ugly. I agree with you, I'm more inclined to have a special case for ARM (if anyone wants it) than everyone else.

Peter, Saleem?


https://reviews.llvm.org/D37788





More information about the llvm-commits mailing list