< prev index next >
src/hotspot/cpu/aarch64/icache_aarch64.hpp
Print this page
8248238: Adding Windows support to OpenJDK on AArch64
Summary: Adding Windows support for AArch64
Contributed-by: Ludovic Henry <luhenry@microsoft.com>, Monica Beckwith <monica.beckwith@microsoft.com>
Reviewed-by:
@@ -29,10 +29,19 @@
// Interface for updating the instruction cache. Whenever the VM
// modifies code, part of the processor instruction cache potentially
// has to be flushed.
class ICache : public AbstractICache {
+ private:
+#ifdef _WIN64
+ // __builtin___clear_cache is a GCC intrinsic, and is then not available in
+ // MSVC. Define an equivalent method which calls the right Win32/MSVC
+ // intrinsic.
+ static void __builtin___clear_cache(char *start, char *end) {
+ FlushInstructionCache((HANDLE)GetCurrentProcess(), start, (SIZE_T)(end - start));
+ }
+#endif
public:
static void initialize();
static void invalidate_word(address addr) {
__builtin___clear_cache((char *)addr, (char *)(addr + 3));
}
< prev index next >