< prev index next >
src/hotspot/share/utilities/globalDefinitions_xlc.hpp
Print this page
rev 53569 : 8218136: minor hotspot adjustments for xlclang++ from xlc16 on AIX
@@ -1,8 +1,8 @@
/*
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2017 SAP SE. All rights reserved.
+ * Copyright (c) 2012, 2019 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -53,34 +53,18 @@
// Use XLC compiler builtins instead of inline assembler
#define USE_XLC_BUILTINS
#ifdef USE_XLC_BUILTINS
#include <builtins.h>
- #if __IBMCPP__ < 1000
- // the funtion prototype for __dcbtst(void *) is missing in XLC V8.0
- // I could compile a little test, where I provided the prototype.
- // The generated code was correct there. This is the prototype:
- // extern "builtin" void __dcbtst (void *);
- // For now we don't make use of it when compiling with XLC V8.0
- #else
- // __IBMCPP__ >= 1000
- // XLC V10 provides the prototype for __dcbtst (void *);
- #define USE_XLC_PREFETCH_WRITE_BUILTIN
- #endif
+// XLC V10 and higher provide the prototype for __dcbtst (void *);
+#define USE_XLC_PREFETCH_WRITE_BUILTIN
#endif // USE_XLC_BUILTINS
// NULL vs NULL_WORD:
-// On Linux NULL is defined as a special type '__null'. Assigning __null to
-// integer variable will cause gcc warning. Use NULL_WORD in places where a
-// pointer is stored as integer value. On some platforms, sizeof(intptr_t) >
-// sizeof(void*), so here we want something which is integer type, but has the
-// same size as a pointer.
-#ifdef __GNUC__
- #error XLC and __GNUC__?
-#else
- #define NULL_WORD NULL
-#endif
+// Some platform/tool-chain combinations can't assign NULL to an integer
+// type so we define NULL_WORD to use in those contexts. For xlc they are the same.
+#define NULL_WORD NULL
// AIX also needs a 64 bit NULL to work as a null address pointer.
// Most system includes on AIX would define it as an int 0 if not already defined with one
// exception: /usr/include/dirent.h will unconditionally redefine NULL to int 0 again.
// In this case you need to copy the following defines to a position after #include <dirent.h>
< prev index next >