< prev index next >

src/hotspot/share/utilities/globalDefinitions_gcc.hpp

Print this page

  1 /*
  2  * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *

148 // warning. The -Wno-invalid-offsetof option could be used to suppress
149 // this warning, but we instead just avoid the use of offsetof().
150 #define offset_of(klass,field) (size_t)((intx)&(((klass*)16)->field) - 16)
151 
152 #if defined(_LP64) && defined(__APPLE__)
153 #define JLONG_FORMAT          "%ld"
154 #define JLONG_FORMAT_W(width) "%" #width "ld"
155 #endif // _LP64 && __APPLE__
156 
157 #define THREAD_LOCAL __thread
158 
159 // Inlining support
160 #define NOINLINE     __attribute__ ((noinline))
161 #define ALWAYSINLINE inline __attribute__ ((always_inline))
162 #define ATTRIBUTE_FLATTEN __attribute__ ((flatten))
163 
164 // Alignment
165 //
166 #define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x)))
167 





168 #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_GCC_HPP

  1 /*
  2  * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *

148 // warning. The -Wno-invalid-offsetof option could be used to suppress
149 // this warning, but we instead just avoid the use of offsetof().
150 #define offset_of(klass,field) (size_t)((intx)&(((klass*)16)->field) - 16)
151 
152 #if defined(_LP64) && defined(__APPLE__)
153 #define JLONG_FORMAT          "%ld"
154 #define JLONG_FORMAT_W(width) "%" #width "ld"
155 #endif // _LP64 && __APPLE__
156 
157 #define THREAD_LOCAL __thread
158 
159 // Inlining support
160 #define NOINLINE     __attribute__ ((noinline))
161 #define ALWAYSINLINE inline __attribute__ ((always_inline))
162 #define ATTRIBUTE_FLATTEN __attribute__ ((flatten))
163 
164 // Alignment
165 //
166 #define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x)))
167 
168 // TODO: Implement JavaThread::riscv64_get_thread_helper and revert this change
169 #if defined(RISCV)
170 #define USE_LIBRARY_BASED_TLS_ONLY 1
171 #endif
172 
173 #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_GCC_HPP
< prev index next >