Add __builtin___clear_cache to the portability headers
authorChristopher Dykes <cdykes@fb.com>
Thu, 26 Jan 2017 18:44:00 +0000 (10:44 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 26 Jan 2017 18:47:54 +0000 (10:47 -0800)
commitcc0ca971057edb5e4c8f78946b0c5508395ecc48
treef0d276e80edd17e9904f73180dca97d66a530cf7
parentd0d34d8e226197fca5313dfcef58e2ca85ee734d
Add __builtin___clear_cache to the portability headers

Summary:
HHVM uses this heavily in it's ARM JIT, so provide an implementation. With GCC & Clang this function is a no-op on x86_64 where the requirement doesn't exist, so do the same in the portability header.
This doesn't include the Windows portability header on x64 specifically because it is a very heavy header and this is currently very lightweight.

Reviewed By: yfeldblum

Differential Revision: D4451032

fbshipit-source-id: 0af57448577635f9cd690ea9b09ce46a244191e1
folly/Portability.h
folly/portability/Builtins.cpp [new file with mode: 0755]
folly/portability/Builtins.h