summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/clear_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/clear_cache.c')
-rw-r--r--compiler-rt/lib/clear_cache.c40
1 files changed, 21 insertions, 19 deletions
diff --git a/compiler-rt/lib/clear_cache.c b/compiler-rt/lib/clear_cache.c
index 8176c24e659..1456823df20 100644
--- a/compiler-rt/lib/clear_cache.c
+++ b/compiler-rt/lib/clear_cache.c
@@ -1,11 +1,12 @@
-//===-- clear_cache.c - Implement __clear_cache ---------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
+/* ===-- clear_cache.c - Implement __clear_cache ---------------------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is distributed under the University of Illinois Open Source
+ * License. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ */
#include <stdlib.h>
@@ -13,22 +14,23 @@
#include <libkern/OSCacheControl.h>
#endif
-//
-// The compiler generates calls to __clear_cache() when creating
-// trampoline functions on the stack for use with nested functions.
-// It is expected to invalidate the instruction cache for the
-// specified range.
-//
+/*
+ * The compiler generates calls to __clear_cache() when creating
+ * trampoline functions on the stack for use with nested functions.
+ * It is expected to invalidate the instruction cache for the
+ * specified range.
+ */
+
void __clear_cache(void* start, void* end)
{
#if __i386__ || __x86_64__
-//
-// Intel processors have a unified instruction and data cache
-// so there is nothing to do
-//
+/*
+ * Intel processors have a unified instruction and data cache
+ * so there is nothing to do
+ */
#else
#if __APPLE__
- // On Darwin, sys_icache_invalidate() provides this functionality
+ /* On Darwin, sys_icache_invalidate() provides this functionality */
sys_icache_invalidate(start, end-start);
#else
abort();
OpenPOWER on IntegriCloud