diff --git a/gcc-bug-info/problematic_asm.txt b/gcc-bug-info/problematic_asm.txt new file mode 100644 index 0000000000000..5be8091f9ab23 --- /dev/null +++ b/gcc-bug-info/problematic_asm.txt @@ -0,0 +1,39 @@ +000000000000005e <.L2820>: + 5e: 6198 ld a4,0(a1) + +0000000000000060 <.LBB43490>: + 60: 4590 lw a2,8(a1) + +0000000000000062 <.LBB43503>: + 62: 0ff0000f fence + +0000000000000066 <.LBB43492>: + 66: 40eb07b3 sub a5,s6,a4 + +000000000000006a <.LBE43492>: + 6a: 00c7d7b3 srl a5,a5,a2 + +000000000000006e <.LBB43493>: + 6e: 2781 sext.w a5,a5 + +0000000000000070 <.LBB43568>: + 70: 16048063 beqz s1,1d0 <.L1^B143> + +0000000000000074 <.LBB43572>: + 74: 40e48733 sub a4,s1,a4 + +0000000000000078 <.LBE43586>: + 78: 00c75733 srl a4,a4,a2 + +000000000000007c <.L1^B141>: + 7c: 1009262f lr.w a2,(s2) + 80: 00e61563 bne a2,a4,8a <.L1^B142> + 84: 18f9252f sc.w a0,a5,(s2) + 88: f975 bnez a0,7c <.L1^B141> + +000000000000008a <.L1^B142>: + 8a: 0006079b sext.w a5,a2 + +000000000000008e <.LVL4238>: + 8e: 0ff0000f fence + diff --git a/gcc-bug-info/problematic_method.ii b/gcc-bug-info/problematic_method.ii new file mode 100644 index 0000000000000..f705b192e2239 --- /dev/null +++ b/gcc-bug-info/problematic_method.ii @@ -0,0 +1,20 @@ +template +template +inline T Atomic::PlatformCmpxchg::operator()(T volatile* dest __attribute__((unused)), + T compare_value, + T exchange_value, + atomic_memory_order order) const { + static_assert((byte_size == sizeof(T)), "byte_size == sizeof(T)"); + if (order != memory_order_relaxed) { + __sync_synchronize(); + } + + __atomic_compare_exchange(dest, &compare_value, &exchange_value, false, + 0, 0); + + if (order != memory_order_relaxed) { + __sync_synchronize(); + } + return compare_value; +} + diff --git a/gcc-bug-info/unsafe.ii b/gcc-bug-info/unsafe.ii new file mode 100644 index 0000000000000..7442b3341aaac --- /dev/null +++ b/gcc-bug-info/unsafe.ii @@ -0,0 +1,123917 @@ +# 0 "/home/rehn/source/jdk/open/src/hotspot/share/prims/unsafe.cpp" +# 1 "/home/rehn/source/jdk/open//" +# 0 "" +# 0 "" +# 1 "/usr/riscv64-linux-gnu/include/stdc-predef.h" 1 3 +# 0 "" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/prims/unsafe.cpp" +# 25 "/home/rehn/source/jdk/open/src/hotspot/share/prims/unsafe.cpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/precompiled/precompiled.hpp" 1 +# 26 "/home/rehn/source/jdk/open/src/hotspot/share/prims/unsafe.cpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classFileStream.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classFileStream.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allStatic.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allStatic.hpp" +struct AllStatic { + AllStatic() = delete; + ~AllStatic() = delete; +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/debug.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/debug.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/attributeNoreturn.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/debug.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/breakpoint.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/breakpoint.hpp" +extern "C" void breakpoint(); +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/debug.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/compilerWarnings.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/compilerWarnings.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/macros.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/compilerWarnings.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/compilerWarnings_gcc.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/compilerWarnings.hpp" 2 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/debug.hpp" 2 + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 143 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 3 4 + +# 143 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 3 4 +typedef long int ptrdiff_t; +# 209 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 3 4 +typedef long unsigned int size_t; +# 415 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 3 4 +typedef struct { + long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); + long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); +# 426 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 3 4 +} max_align_t; + + + + + + + typedef decltype(nullptr) nullptr_t; +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/debug.hpp" 2 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stdint.h" 1 3 4 +# 9 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stdint.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/stdint.h" 1 3 4 +# 26 "/usr/riscv64-linux-gnu/include/stdint.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/libc-header-start.h" 1 3 4 +# 33 "/usr/riscv64-linux-gnu/include/bits/libc-header-start.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/features.h" 1 3 4 +# 392 "/usr/riscv64-linux-gnu/include/features.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/features-time64.h" 1 3 4 +# 20 "/usr/riscv64-linux-gnu/include/features-time64.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/wordsize.h" 1 3 4 +# 21 "/usr/riscv64-linux-gnu/include/features-time64.h" 2 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/timesize.h" 1 3 4 +# 22 "/usr/riscv64-linux-gnu/include/features-time64.h" 2 3 4 +# 393 "/usr/riscv64-linux-gnu/include/features.h" 2 3 4 +# 486 "/usr/riscv64-linux-gnu/include/features.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/sys/cdefs.h" 1 3 4 +# 559 "/usr/riscv64-linux-gnu/include/sys/cdefs.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/wordsize.h" 1 3 4 +# 560 "/usr/riscv64-linux-gnu/include/sys/cdefs.h" 2 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/long-double.h" 1 3 4 +# 561 "/usr/riscv64-linux-gnu/include/sys/cdefs.h" 2 3 4 +# 487 "/usr/riscv64-linux-gnu/include/features.h" 2 3 4 +# 510 "/usr/riscv64-linux-gnu/include/features.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/gnu/stubs.h" 1 3 4 + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/wordsize.h" 1 3 4 +# 6 "/usr/riscv64-linux-gnu/include/gnu/stubs.h" 2 3 4 +# 17 "/usr/riscv64-linux-gnu/include/gnu/stubs.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/gnu/stubs-lp64d.h" 1 3 4 +# 18 "/usr/riscv64-linux-gnu/include/gnu/stubs.h" 2 3 4 +# 511 "/usr/riscv64-linux-gnu/include/features.h" 2 3 4 +# 34 "/usr/riscv64-linux-gnu/include/bits/libc-header-start.h" 2 3 4 +# 27 "/usr/riscv64-linux-gnu/include/stdint.h" 2 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/types.h" 1 3 4 +# 27 "/usr/riscv64-linux-gnu/include/bits/types.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/wordsize.h" 1 3 4 +# 28 "/usr/riscv64-linux-gnu/include/bits/types.h" 2 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/timesize.h" 1 3 4 +# 29 "/usr/riscv64-linux-gnu/include/bits/types.h" 2 3 4 + + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + + +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; + +typedef signed long int __int64_t; +typedef unsigned long int __uint64_t; + + + + + + +typedef __int8_t __int_least8_t; +typedef __uint8_t __uint_least8_t; +typedef __int16_t __int_least16_t; +typedef __uint16_t __uint_least16_t; +typedef __int32_t __int_least32_t; +typedef __uint32_t __uint_least32_t; +typedef __int64_t __int_least64_t; +typedef __uint64_t __uint_least64_t; + + + +typedef long int __quad_t; +typedef unsigned long int __u_quad_t; + + + + + + + +typedef long int __intmax_t; +typedef unsigned long int __uintmax_t; +# 141 "/usr/riscv64-linux-gnu/include/bits/types.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/typesizes.h" 1 3 4 +# 142 "/usr/riscv64-linux-gnu/include/bits/types.h" 2 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/time64.h" 1 3 4 +# 143 "/usr/riscv64-linux-gnu/include/bits/types.h" 2 3 4 + + +typedef unsigned long int __dev_t; +typedef unsigned int __uid_t; +typedef unsigned int __gid_t; +typedef unsigned long int __ino_t; +typedef unsigned long int __ino64_t; +typedef unsigned int __mode_t; +typedef unsigned int __nlink_t; +typedef long int __off_t; +typedef long int __off64_t; +typedef int __pid_t; +typedef struct { int __val[2]; } __fsid_t; +typedef long int __clock_t; +typedef unsigned long int __rlim_t; +typedef unsigned long int __rlim64_t; +typedef unsigned int __id_t; +typedef long int __time_t; +typedef unsigned int __useconds_t; +typedef long int __suseconds_t; +typedef long int __suseconds64_t; + +typedef int __daddr_t; +typedef int __key_t; + + +typedef int __clockid_t; + + +typedef void * __timer_t; + + +typedef int __blksize_t; + + + + +typedef long int __blkcnt_t; +typedef long int __blkcnt64_t; + + +typedef unsigned long int __fsblkcnt_t; +typedef unsigned long int __fsblkcnt64_t; + + +typedef unsigned long int __fsfilcnt_t; +typedef unsigned long int __fsfilcnt64_t; + + +typedef long int __fsword_t; + +typedef long int __ssize_t; + + +typedef long int __syscall_slong_t; + +typedef unsigned long int __syscall_ulong_t; + + + +typedef __off64_t __loff_t; +typedef char *__caddr_t; + + +typedef long int __intptr_t; + + +typedef unsigned int __socklen_t; + + + + +typedef int __sig_atomic_t; +# 28 "/usr/riscv64-linux-gnu/include/stdint.h" 2 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/wchar.h" 1 3 4 +# 29 "/usr/riscv64-linux-gnu/include/stdint.h" 2 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/wordsize.h" 1 3 4 +# 30 "/usr/riscv64-linux-gnu/include/stdint.h" 2 3 4 + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/stdint-intn.h" 1 3 4 +# 24 "/usr/riscv64-linux-gnu/include/bits/stdint-intn.h" 3 4 +typedef __int8_t int8_t; +typedef __int16_t int16_t; +typedef __int32_t int32_t; +typedef __int64_t int64_t; +# 35 "/usr/riscv64-linux-gnu/include/stdint.h" 2 3 4 + + +# 1 "/usr/riscv64-linux-gnu/include/bits/stdint-uintn.h" 1 3 4 +# 24 "/usr/riscv64-linux-gnu/include/bits/stdint-uintn.h" 3 4 +typedef __uint8_t uint8_t; +typedef __uint16_t uint16_t; +typedef __uint32_t uint32_t; +typedef __uint64_t uint64_t; +# 38 "/usr/riscv64-linux-gnu/include/stdint.h" 2 3 4 + + + + + +typedef __int_least8_t int_least8_t; +typedef __int_least16_t int_least16_t; +typedef __int_least32_t int_least32_t; +typedef __int_least64_t int_least64_t; + + +typedef __uint_least8_t uint_least8_t; +typedef __uint_least16_t uint_least16_t; +typedef __uint_least32_t uint_least32_t; +typedef __uint_least64_t uint_least64_t; + + + + + +typedef signed char int_fast8_t; + +typedef long int int_fast16_t; +typedef long int int_fast32_t; +typedef long int int_fast64_t; +# 71 "/usr/riscv64-linux-gnu/include/stdint.h" 3 4 +typedef unsigned char uint_fast8_t; + +typedef unsigned long int uint_fast16_t; +typedef unsigned long int uint_fast32_t; +typedef unsigned long int uint_fast64_t; +# 87 "/usr/riscv64-linux-gnu/include/stdint.h" 3 4 +typedef long int intptr_t; + + +typedef unsigned long int uintptr_t; +# 101 "/usr/riscv64-linux-gnu/include/stdint.h" 3 4 +typedef __intmax_t intmax_t; +typedef __uintmax_t uintmax_t; +# 10 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stdint.h" 2 3 4 +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/debug.hpp" 2 + + +# 36 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/debug.hpp" +class oopDesc; + + + + +extern char* g_assert_poison; + +void initialize_assert_poison(); +void disarm_assert_poison(); +bool handle_assert_poison_fault(const void* ucVoid, const void* faulting_address); +# 58 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/debug.hpp" +class DebuggingContext { + static int _enabled; + +public: + DebuggingContext(); + ~DebuggingContext(); + + + static bool is_enabled() { return _enabled > 0; } +}; +# 248 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/debug.hpp" +enum VMErrorType : unsigned int { + INTERNAL_ERROR = 0xe0000000, + OOM_MALLOC_ERROR = 0xe0000001, + OOM_MMAP_ERROR = 0xe0000002, + OOM_MPROTECT_ERROR = 0xe0000003, + OOM_JAVA_HEAP_FATAL = 0xe0000004 +}; + + +[[noreturn]] +void report_vm_error(const char* file, int line, const char* error_msg); + +[[noreturn]] +__attribute__((format(printf, 4, 5))) +void report_vm_error(const char* file, int line, const char* error_msg, + const char* detail_fmt, ...); + +[[noreturn]] +void report_vm_status_error(const char* file, int line, const char* error_msg, + int status, const char* detail); + +[[noreturn]] +__attribute__((format(printf, 4, 5))) +void report_fatal(VMErrorType error_type, const char* file, int line, const char* detail_fmt, ...); + +[[noreturn]] +__attribute__((format(printf, 5, 6))) +void report_vm_out_of_memory(const char* file, int line, size_t size, VMErrorType vm_err_type, + const char* detail_fmt, ...); + +[[noreturn]] void report_should_not_call(const char* file, int line); +[[noreturn]] void report_should_not_reach_here(const char* file, int line); +[[noreturn]] void report_unimplemented(const char* file, int line); + + +void report_untested(const char* file, int line, const char* message); + +__attribute__((format(printf, 1, 2))) +void warning(const char* format, ...); + + + + +void report_java_out_of_memory(const char* message); + + +extern "C" bool dbg_is_safe(const void* p, intptr_t errvalue); +extern "C" bool dbg_is_good_oop(oopDesc* o); +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +# 1 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/classfile_constants.h" 1 +# 30 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/classfile_constants.h" +extern "C" { +# 39 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/classfile_constants.h" +enum { + JVM_ACC_PUBLIC = 0x0001, + JVM_ACC_PRIVATE = 0x0002, + JVM_ACC_PROTECTED = 0x0004, + JVM_ACC_STATIC = 0x0008, + JVM_ACC_FINAL = 0x0010, + JVM_ACC_SYNCHRONIZED = 0x0020, + JVM_ACC_SUPER = 0x0020, + JVM_ACC_VOLATILE = 0x0040, + JVM_ACC_BRIDGE = 0x0040, + JVM_ACC_TRANSIENT = 0x0080, + JVM_ACC_VARARGS = 0x0080, + JVM_ACC_NATIVE = 0x0100, + JVM_ACC_INTERFACE = 0x0200, + JVM_ACC_ABSTRACT = 0x0400, + JVM_ACC_STRICT = 0x0800, + JVM_ACC_SYNTHETIC = 0x1000, + JVM_ACC_ANNOTATION = 0x2000, + JVM_ACC_ENUM = 0x4000, + JVM_ACC_MODULE = 0x8000 +}; +# 82 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/classfile_constants.h" +enum { + JVM_T_BOOLEAN = 4, + JVM_T_CHAR = 5, + JVM_T_FLOAT = 6, + JVM_T_DOUBLE = 7, + JVM_T_BYTE = 8, + JVM_T_SHORT = 9, + JVM_T_INT = 10, + JVM_T_LONG = 11 +}; + + + +enum { + JVM_CONSTANT_Utf8 = 1, + JVM_CONSTANT_Unicode = 2, + JVM_CONSTANT_Integer = 3, + JVM_CONSTANT_Float = 4, + JVM_CONSTANT_Long = 5, + JVM_CONSTANT_Double = 6, + JVM_CONSTANT_Class = 7, + JVM_CONSTANT_String = 8, + JVM_CONSTANT_Fieldref = 9, + JVM_CONSTANT_Methodref = 10, + JVM_CONSTANT_InterfaceMethodref = 11, + JVM_CONSTANT_NameAndType = 12, + JVM_CONSTANT_MethodHandle = 15, + JVM_CONSTANT_MethodType = 16, + JVM_CONSTANT_Dynamic = 17, + JVM_CONSTANT_InvokeDynamic = 18, + JVM_CONSTANT_Module = 19, + JVM_CONSTANT_Package = 20, + JVM_CONSTANT_ExternalMax = 20 +}; + + +enum { + JVM_REF_getField = 1, + JVM_REF_getStatic = 2, + JVM_REF_putField = 3, + JVM_REF_putStatic = 4, + JVM_REF_invokeVirtual = 5, + JVM_REF_invokeStatic = 6, + JVM_REF_invokeSpecial = 7, + JVM_REF_newInvokeSpecial = 8, + JVM_REF_invokeInterface = 9 +}; + + + +enum { + JVM_ITEM_Top = 0, + JVM_ITEM_Integer = 1, + JVM_ITEM_Float = 2, + JVM_ITEM_Double = 3, + JVM_ITEM_Long = 4, + JVM_ITEM_Null = 5, + JVM_ITEM_UninitializedThis = 6, + JVM_ITEM_Object = 7, + JVM_ITEM_Uninitialized = 8 +}; + + + +enum { + JVM_SIGNATURE_SLASH = '/', + JVM_SIGNATURE_DOT = '.', + JVM_SIGNATURE_SPECIAL = '<', + JVM_SIGNATURE_ENDSPECIAL = '>', + JVM_SIGNATURE_ARRAY = '[', + JVM_SIGNATURE_BYTE = 'B', + JVM_SIGNATURE_CHAR = 'C', + JVM_SIGNATURE_CLASS = 'L', + JVM_SIGNATURE_ENDCLASS = ';', + JVM_SIGNATURE_ENUM = 'E', + JVM_SIGNATURE_FLOAT = 'F', + JVM_SIGNATURE_DOUBLE = 'D', + JVM_SIGNATURE_FUNC = '(', + JVM_SIGNATURE_ENDFUNC = ')', + JVM_SIGNATURE_INT = 'I', + JVM_SIGNATURE_LONG = 'J', + JVM_SIGNATURE_SHORT = 'S', + JVM_SIGNATURE_VOID = 'V', + JVM_SIGNATURE_BOOLEAN = 'Z' +}; + + + +enum { + JVM_OPC_nop = 0, + JVM_OPC_aconst_null = 1, + JVM_OPC_iconst_m1 = 2, + JVM_OPC_iconst_0 = 3, + JVM_OPC_iconst_1 = 4, + JVM_OPC_iconst_2 = 5, + JVM_OPC_iconst_3 = 6, + JVM_OPC_iconst_4 = 7, + JVM_OPC_iconst_5 = 8, + JVM_OPC_lconst_0 = 9, + JVM_OPC_lconst_1 = 10, + JVM_OPC_fconst_0 = 11, + JVM_OPC_fconst_1 = 12, + JVM_OPC_fconst_2 = 13, + JVM_OPC_dconst_0 = 14, + JVM_OPC_dconst_1 = 15, + JVM_OPC_bipush = 16, + JVM_OPC_sipush = 17, + JVM_OPC_ldc = 18, + JVM_OPC_ldc_w = 19, + JVM_OPC_ldc2_w = 20, + JVM_OPC_iload = 21, + JVM_OPC_lload = 22, + JVM_OPC_fload = 23, + JVM_OPC_dload = 24, + JVM_OPC_aload = 25, + JVM_OPC_iload_0 = 26, + JVM_OPC_iload_1 = 27, + JVM_OPC_iload_2 = 28, + JVM_OPC_iload_3 = 29, + JVM_OPC_lload_0 = 30, + JVM_OPC_lload_1 = 31, + JVM_OPC_lload_2 = 32, + JVM_OPC_lload_3 = 33, + JVM_OPC_fload_0 = 34, + JVM_OPC_fload_1 = 35, + JVM_OPC_fload_2 = 36, + JVM_OPC_fload_3 = 37, + JVM_OPC_dload_0 = 38, + JVM_OPC_dload_1 = 39, + JVM_OPC_dload_2 = 40, + JVM_OPC_dload_3 = 41, + JVM_OPC_aload_0 = 42, + JVM_OPC_aload_1 = 43, + JVM_OPC_aload_2 = 44, + JVM_OPC_aload_3 = 45, + JVM_OPC_iaload = 46, + JVM_OPC_laload = 47, + JVM_OPC_faload = 48, + JVM_OPC_daload = 49, + JVM_OPC_aaload = 50, + JVM_OPC_baload = 51, + JVM_OPC_caload = 52, + JVM_OPC_saload = 53, + JVM_OPC_istore = 54, + JVM_OPC_lstore = 55, + JVM_OPC_fstore = 56, + JVM_OPC_dstore = 57, + JVM_OPC_astore = 58, + JVM_OPC_istore_0 = 59, + JVM_OPC_istore_1 = 60, + JVM_OPC_istore_2 = 61, + JVM_OPC_istore_3 = 62, + JVM_OPC_lstore_0 = 63, + JVM_OPC_lstore_1 = 64, + JVM_OPC_lstore_2 = 65, + JVM_OPC_lstore_3 = 66, + JVM_OPC_fstore_0 = 67, + JVM_OPC_fstore_1 = 68, + JVM_OPC_fstore_2 = 69, + JVM_OPC_fstore_3 = 70, + JVM_OPC_dstore_0 = 71, + JVM_OPC_dstore_1 = 72, + JVM_OPC_dstore_2 = 73, + JVM_OPC_dstore_3 = 74, + JVM_OPC_astore_0 = 75, + JVM_OPC_astore_1 = 76, + JVM_OPC_astore_2 = 77, + JVM_OPC_astore_3 = 78, + JVM_OPC_iastore = 79, + JVM_OPC_lastore = 80, + JVM_OPC_fastore = 81, + JVM_OPC_dastore = 82, + JVM_OPC_aastore = 83, + JVM_OPC_bastore = 84, + JVM_OPC_castore = 85, + JVM_OPC_sastore = 86, + JVM_OPC_pop = 87, + JVM_OPC_pop2 = 88, + JVM_OPC_dup = 89, + JVM_OPC_dup_x1 = 90, + JVM_OPC_dup_x2 = 91, + JVM_OPC_dup2 = 92, + JVM_OPC_dup2_x1 = 93, + JVM_OPC_dup2_x2 = 94, + JVM_OPC_swap = 95, + JVM_OPC_iadd = 96, + JVM_OPC_ladd = 97, + JVM_OPC_fadd = 98, + JVM_OPC_dadd = 99, + JVM_OPC_isub = 100, + JVM_OPC_lsub = 101, + JVM_OPC_fsub = 102, + JVM_OPC_dsub = 103, + JVM_OPC_imul = 104, + JVM_OPC_lmul = 105, + JVM_OPC_fmul = 106, + JVM_OPC_dmul = 107, + JVM_OPC_idiv = 108, + JVM_OPC_ldiv = 109, + JVM_OPC_fdiv = 110, + JVM_OPC_ddiv = 111, + JVM_OPC_irem = 112, + JVM_OPC_lrem = 113, + JVM_OPC_frem = 114, + JVM_OPC_drem = 115, + JVM_OPC_ineg = 116, + JVM_OPC_lneg = 117, + JVM_OPC_fneg = 118, + JVM_OPC_dneg = 119, + JVM_OPC_ishl = 120, + JVM_OPC_lshl = 121, + JVM_OPC_ishr = 122, + JVM_OPC_lshr = 123, + JVM_OPC_iushr = 124, + JVM_OPC_lushr = 125, + JVM_OPC_iand = 126, + JVM_OPC_land = 127, + JVM_OPC_ior = 128, + JVM_OPC_lor = 129, + JVM_OPC_ixor = 130, + JVM_OPC_lxor = 131, + JVM_OPC_iinc = 132, + JVM_OPC_i2l = 133, + JVM_OPC_i2f = 134, + JVM_OPC_i2d = 135, + JVM_OPC_l2i = 136, + JVM_OPC_l2f = 137, + JVM_OPC_l2d = 138, + JVM_OPC_f2i = 139, + JVM_OPC_f2l = 140, + JVM_OPC_f2d = 141, + JVM_OPC_d2i = 142, + JVM_OPC_d2l = 143, + JVM_OPC_d2f = 144, + JVM_OPC_i2b = 145, + JVM_OPC_i2c = 146, + JVM_OPC_i2s = 147, + JVM_OPC_lcmp = 148, + JVM_OPC_fcmpl = 149, + JVM_OPC_fcmpg = 150, + JVM_OPC_dcmpl = 151, + JVM_OPC_dcmpg = 152, + JVM_OPC_ifeq = 153, + JVM_OPC_ifne = 154, + JVM_OPC_iflt = 155, + JVM_OPC_ifge = 156, + JVM_OPC_ifgt = 157, + JVM_OPC_ifle = 158, + JVM_OPC_if_icmpeq = 159, + JVM_OPC_if_icmpne = 160, + JVM_OPC_if_icmplt = 161, + JVM_OPC_if_icmpge = 162, + JVM_OPC_if_icmpgt = 163, + JVM_OPC_if_icmple = 164, + JVM_OPC_if_acmpeq = 165, + JVM_OPC_if_acmpne = 166, + JVM_OPC_goto = 167, + JVM_OPC_jsr = 168, + JVM_OPC_ret = 169, + JVM_OPC_tableswitch = 170, + JVM_OPC_lookupswitch = 171, + JVM_OPC_ireturn = 172, + JVM_OPC_lreturn = 173, + JVM_OPC_freturn = 174, + JVM_OPC_dreturn = 175, + JVM_OPC_areturn = 176, + JVM_OPC_return = 177, + JVM_OPC_getstatic = 178, + JVM_OPC_putstatic = 179, + JVM_OPC_getfield = 180, + JVM_OPC_putfield = 181, + JVM_OPC_invokevirtual = 182, + JVM_OPC_invokespecial = 183, + JVM_OPC_invokestatic = 184, + JVM_OPC_invokeinterface = 185, + JVM_OPC_invokedynamic = 186, + JVM_OPC_new = 187, + JVM_OPC_newarray = 188, + JVM_OPC_anewarray = 189, + JVM_OPC_arraylength = 190, + JVM_OPC_athrow = 191, + JVM_OPC_checkcast = 192, + JVM_OPC_instanceof = 193, + JVM_OPC_monitorenter = 194, + JVM_OPC_monitorexit = 195, + JVM_OPC_wide = 196, + JVM_OPC_multianewarray = 197, + JVM_OPC_ifnull = 198, + JVM_OPC_ifnonnull = 199, + JVM_OPC_goto_w = 200, + JVM_OPC_jsr_w = 201, + JVM_OPC_MAX = 201 +}; +# 585 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/classfile_constants.h" +} +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" +# 1 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 1 +# 39 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" +# 1 "/usr/riscv64-linux-gnu/include/stdio.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/libc-header-start.h" 1 3 +# 28 "/usr/riscv64-linux-gnu/include/stdio.h" 2 3 + + +# 29 "/usr/riscv64-linux-gnu/include/stdio.h" 3 4 +extern "C" { + + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 34 "/usr/riscv64-linux-gnu/include/stdio.h" 2 3 + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stdarg.h" 1 3 4 +# 40 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stdarg.h" 3 4 +typedef __builtin_va_list __gnuc_va_list; +# 37 "/usr/riscv64-linux-gnu/include/stdio.h" 2 3 + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/__fpos_t.h" 1 3 + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/__mbstate_t.h" 1 3 +# 13 "/usr/riscv64-linux-gnu/include/bits/types/__mbstate_t.h" 3 +typedef struct +{ + int __count; + union + { + unsigned int __wch; + char __wchb[4]; + } __value; +} __mbstate_t; +# 6 "/usr/riscv64-linux-gnu/include/bits/types/__fpos_t.h" 2 3 + + + + +typedef struct _G_fpos_t +{ + __off_t __pos; + __mbstate_t __state; +} __fpos_t; +# 40 "/usr/riscv64-linux-gnu/include/stdio.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/__fpos64_t.h" 1 3 +# 10 "/usr/riscv64-linux-gnu/include/bits/types/__fpos64_t.h" 3 +typedef struct _G_fpos64_t +{ + __off64_t __pos; + __mbstate_t __state; +} __fpos64_t; +# 41 "/usr/riscv64-linux-gnu/include/stdio.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/__FILE.h" 1 3 + + + +struct _IO_FILE; +typedef struct _IO_FILE __FILE; +# 42 "/usr/riscv64-linux-gnu/include/stdio.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/FILE.h" 1 3 + + + +struct _IO_FILE; + + +typedef struct _IO_FILE FILE; +# 43 "/usr/riscv64-linux-gnu/include/stdio.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/struct_FILE.h" 1 3 +# 35 "/usr/riscv64-linux-gnu/include/bits/types/struct_FILE.h" 3 +struct _IO_FILE; +struct _IO_marker; +struct _IO_codecvt; +struct _IO_wide_data; + + + + +typedef void _IO_lock_t; + + + + + +struct _IO_FILE +{ + int _flags; + + + char *_IO_read_ptr; + char *_IO_read_end; + char *_IO_read_base; + char *_IO_write_base; + char *_IO_write_ptr; + char *_IO_write_end; + char *_IO_buf_base; + char *_IO_buf_end; + + + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + int _flags2; + __off_t _old_offset; + + + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + _IO_lock_t *_lock; + + + + + + + + __off64_t _offset; + + struct _IO_codecvt *_codecvt; + struct _IO_wide_data *_wide_data; + struct _IO_FILE *_freeres_list; + void *_freeres_buf; + size_t __pad5; + int _mode; + + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; +}; +# 44 "/usr/riscv64-linux-gnu/include/stdio.h" 2 3 + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/cookie_io_functions_t.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/bits/types/cookie_io_functions_t.h" 3 +typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf, + size_t __nbytes); + + + + + + + +typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf, + size_t __nbytes); + + + + + + + +typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w); + + +typedef int cookie_close_function_t (void *__cookie); + + + + + + +typedef struct _IO_cookie_io_functions_t +{ + cookie_read_function_t *read; + cookie_write_function_t *write; + cookie_seek_function_t *seek; + cookie_close_function_t *close; +} cookie_io_functions_t; +# 47 "/usr/riscv64-linux-gnu/include/stdio.h" 2 3 + + + + + +typedef __gnuc_va_list va_list; +# 63 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +typedef __off_t off_t; + + + + + + +typedef __off64_t off64_t; + + + + + + +typedef __ssize_t ssize_t; + + + + + + +typedef __fpos_t fpos_t; + + + + +typedef __fpos64_t fpos64_t; +# 133 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/stdio_lim.h" 1 3 +# 134 "/usr/riscv64-linux-gnu/include/stdio.h" 2 3 +# 143 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern FILE *stdin; +extern FILE *stdout; +extern FILE *stderr; + + + + + + +extern int remove (const char *__filename) noexcept (true); + +extern int rename (const char *__old, const char *__new) noexcept (true); + + + +extern int renameat (int __oldfd, const char *__old, int __newfd, + const char *__new) noexcept (true); +# 170 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int renameat2 (int __oldfd, const char *__old, int __newfd, + const char *__new, unsigned int __flags) noexcept (true); + + + + + + +extern int fclose (FILE *__stream); +# 188 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern FILE *tmpfile (void) + __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); +# 200 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern FILE *tmpfile64 (void) + __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); + + + +extern char *tmpnam (char[20]) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + +extern char *tmpnam_r (char __s[20]) noexcept (true) __attribute__ ((__warn_unused_result__)); +# 222 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern char *tempnam (const char *__dir, const char *__pfx) + noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__malloc__ (__builtin_free, 1))); + + + + + + +extern int fflush (FILE *__stream); +# 239 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int fflush_unlocked (FILE *__stream); +# 249 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int fcloseall (void); +# 258 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern FILE *fopen (const char *__restrict __filename, + const char *__restrict __modes) + __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *freopen (const char *__restrict __filename, + const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 283 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern FILE *fopen64 (const char *__restrict __filename, + const char *__restrict __modes) + __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (const char *__restrict __filename, + const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fdopen (int __fd, const char *__modes) noexcept (true) + __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern FILE *fopencookie (void *__restrict __magic_cookie, + const char *__restrict __modes, + cookie_io_functions_t __io_funcs) noexcept (true) + __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) + noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) noexcept (true) + __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); +# 328 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) noexcept (true); + + + +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) noexcept (true); + + + + +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) noexcept (true); + + +extern void setlinebuf (FILE *__stream) noexcept (true); + + + + + + + +extern int fprintf (FILE *__restrict __stream, + const char *__restrict __format, ...); + + + + +extern int printf (const char *__restrict __format, ...); + +extern int sprintf (char *__restrict __s, + const char *__restrict __format, ...) noexcept (true); + + + + + +extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, + __gnuc_va_list __arg); + + + + +extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); + +extern int vsprintf (char *__restrict __s, const char *__restrict __format, + __gnuc_va_list __arg) noexcept (true); + + + +extern int snprintf (char *__restrict __s, size_t __maxlen, + const char *__restrict __format, ...) + noexcept (true) __attribute__ ((__format__ (__printf__, 3, 4))); + +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + const char *__restrict __format, __gnuc_va_list __arg) + noexcept (true) __attribute__ ((__format__ (__printf__, 3, 0))); + + + + + +extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, + __gnuc_va_list __arg) + noexcept (true) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + const char *__restrict __fmt, ...) + noexcept (true) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + const char *__restrict __fmt, ...) + noexcept (true) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); + + + + +extern int vdprintf (int __fd, const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); + + + + + + + +extern int fscanf (FILE *__restrict __stream, + const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + + + + +extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + +extern int sscanf (const char *__restrict __s, + const char *__restrict __format, ...) noexcept (true); + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/floatn.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/bits/floatn.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/long-double.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/floatn.h" 2 3 +# 80 "/usr/riscv64-linux-gnu/include/bits/floatn.h" 3 +typedef long double _Float128; +# 95 "/usr/riscv64-linux-gnu/include/bits/floatn.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/floatn-common.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/floatn-common.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/long-double.h" 1 3 +# 25 "/usr/riscv64-linux-gnu/include/bits/floatn-common.h" 2 3 +# 214 "/usr/riscv64-linux-gnu/include/bits/floatn-common.h" 3 +typedef float _Float32; +# 251 "/usr/riscv64-linux-gnu/include/bits/floatn-common.h" 3 +typedef double _Float64; +# 268 "/usr/riscv64-linux-gnu/include/bits/floatn-common.h" 3 +typedef double _Float32x; +# 285 "/usr/riscv64-linux-gnu/include/bits/floatn-common.h" 3 +typedef long double _Float64x; +# 96 "/usr/riscv64-linux-gnu/include/bits/floatn.h" 2 3 +# 431 "/usr/riscv64-linux-gnu/include/stdio.h" 2 3 + + + +extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") + + __attribute__ ((__warn_unused_result__)); +extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") + __attribute__ ((__warn_unused_result__)); +extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) noexcept (true) __asm__ ("" "__isoc99_sscanf") + + ; +# 459 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); + + +extern int vsscanf (const char *__restrict __s, + const char *__restrict __format, __gnuc_va_list __arg) + noexcept (true) __attribute__ ((__format__ (__scanf__, 2, 0))); + + + + + +extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf") + + + + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf") + + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); +extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) noexcept (true) __asm__ ("" "__isoc99_vsscanf") + + + + __attribute__ ((__format__ (__scanf__, 2, 0))); +# 513 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); + + + + + +extern int getchar (void); + + + + + + +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +# 538 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int fgetc_unlocked (FILE *__stream); +# 549 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); + + + + + +extern int putchar (int __c); +# 565 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int fputc_unlocked (int __c, FILE *__stream); + + + + + + + +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); + + + + + + +extern int getw (FILE *__stream); + + +extern int putw (int __w, FILE *__stream); + + + + + + + +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))); +# 615 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__write_only__, 1, 2))); +# 632 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int fputs (const char *__restrict __s, FILE *__restrict __stream); + + + + + +extern int puts (const char *__s); + + + + + + +extern int ungetc (int __c, FILE *__stream); + + + + + + +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern size_t fwrite (const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s); +# 691 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int fputs_unlocked (const char *__restrict __s, + FILE *__restrict __stream); +# 702 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream); + + + + + + + +extern int fseek (FILE *__stream, long int __off, int __whence); + + + + +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); + + + + +extern void rewind (FILE *__stream); +# 736 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int fseeko (FILE *__stream, __off_t __off, int __whence); + + + + +extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); +# 760 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); + + + + +extern int fsetpos (FILE *__stream, const fpos_t *__pos); +# 779 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); + + + +extern void clearerr (FILE *__stream) noexcept (true); + +extern int feof (FILE *__stream) noexcept (true) __attribute__ ((__warn_unused_result__)); + +extern int ferror (FILE *__stream) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + +extern void clearerr_unlocked (FILE *__stream) noexcept (true); +extern int feof_unlocked (FILE *__stream) noexcept (true) __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern void perror (const char *__s); + + + + +extern int fileno (FILE *__stream) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + +extern int fileno_unlocked (FILE *__stream) noexcept (true) __attribute__ ((__warn_unused_result__)); +# 823 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int pclose (FILE *__stream); + + + + + +extern FILE *popen (const char *__command, const char *__modes) + __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (pclose, 1))) __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *ctermid (char *__s) noexcept (true) + __attribute__ ((__access__ (__write_only__, 1))); + + + + + +extern char *cuserid (char *__s) + __attribute__ ((__access__ (__write_only__, 1))); + + + + +struct obstack; + + +extern int obstack_printf (struct obstack *__restrict __obstack, + const char *__restrict __format, ...) + noexcept (true) __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + const char *__restrict __format, + __gnuc_va_list __args) + noexcept (true) __attribute__ ((__format__ (__printf__, 2, 0))); + + + + + + + +extern void flockfile (FILE *__stream) noexcept (true); + + + +extern int ftrylockfile (FILE *__stream) noexcept (true) __attribute__ ((__warn_unused_result__)); + + +extern void funlockfile (FILE *__stream) noexcept (true); +# 885 "/usr/riscv64-linux-gnu/include/stdio.h" 3 +extern int __uflow (FILE *); +extern int __overflow (FILE *, int); + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/stdio.h" 1 3 +# 46 "/usr/riscv64-linux-gnu/include/bits/stdio.h" 3 +extern __inline __attribute__ ((__gnu_inline__)) int +getchar (void) +{ + return getc (stdin); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar (int __c) +{ + return putc (__c, stdout); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__leaf__)) feof_unlocked (FILE *__stream) noexcept (true) +{ + return (((__stream)->_flags & 0x0010) != 0); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__leaf__)) ferror_unlocked (FILE *__stream) noexcept (true) +{ + return (((__stream)->_flags & 0x0020) != 0); +} +# 892 "/usr/riscv64-linux-gnu/include/stdio.h" 2 3 + + +# 1 "/usr/riscv64-linux-gnu/include/bits/stdio2.h" 1 3 +# 26 "/usr/riscv64-linux-gnu/include/bits/stdio2.h" 3 +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + const char *__restrict __format, ...) noexcept (true) + __attribute__ ((__access__ (__write_only__, 1, 3))); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + const char *__restrict __format, + __gnuc_va_list __ap) noexcept (true) + __attribute__ ((__access__ (__write_only__, 1, 3))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...) noexcept (true) +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, + __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap) noexcept (true) + +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, const char *__restrict __format, + ...) noexcept (true) + __attribute__ ((__access__ (__write_only__, 1, 2))); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, const char *__restrict __format, + __gnuc_va_list __ap) noexcept (true); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...) noexcept (true) + +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, + __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap) noexcept (true) + +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + + + +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + const char *__restrict __format, ...); +extern int __printf_chk (int __flag, const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, const char *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +printf (const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +vprintf (const char *__restrict __fmt, __gnuc_va_list __ap) +{ + + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); + + + +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +vfprintf (FILE *__restrict __stream, + const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + +extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +dprintf (int __fd, const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} + + + + +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + const char *__restrict __fmt, ...) + noexcept (true) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + const char *__restrict __fmt, __gnuc_va_list __arg) + noexcept (true) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, const char *__restrict __format, + ...) + noexcept (true) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + const char *__restrict __format, + __gnuc_va_list __args) + noexcept (true) __attribute__ ((__format__ (__printf__, 3, 0))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) noexcept (true) +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) noexcept (true) + +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __fmt, ...) noexcept (true) + +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +# 214 "/usr/riscv64-linux-gnu/include/bits/stdio2.h" 3 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap) noexcept (true) + +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap) noexcept (true) + +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} +# 248 "/usr/riscv64-linux-gnu/include/bits/stdio2.h" 3 +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 3))); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + + + __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + size_t sz = __builtin_object_size (__s, 2 > 1); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && (((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) + return __fgets_alias (__s, __n, __stream); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) + return __fgets_chk_warn (__s, sz, __n, __stream); + return __fgets_chk (__s, sz, __n, __stream); +} + +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + size_t sz = __builtin_object_size (__ptr, 0); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && (((long unsigned int) (__n)) <= (sz) / (__size)))) + return __fread_alias (__ptr, __size, __n, __stream); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && !(((long unsigned int) (__n)) <= (sz) / (__size)))) + return __fread_chk_warn (__ptr, sz, __size, __n, __stream); + return __fread_chk (__ptr, sz, __size, __n, __stream); +} + + +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 3))); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + + + __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + size_t sz = __builtin_object_size (__s, 2 > 1); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && (((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) + return __fgets_unlocked_alias (__s, __n, __stream); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) + return __fgets_unlocked_chk_warn (__s, sz, __n, __stream); + return __fgets_unlocked_chk (__s, sz, __n, __stream); +} + + + + +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + size_t sz = __builtin_object_size (__ptr, 0); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && (((long unsigned int) (__n)) <= (sz) / (__size)))) + { + + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + + for (; __cnt > 0; --__cnt) + { + int __c = getc_unlocked (__stream); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + + return __fread_unlocked_alias (__ptr, __size, __n, __stream); + } + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && !(((long unsigned int) (__n)) <= (sz) / (__size)))) + return __fread_unlocked_chk_warn (__ptr, sz, __size, __n, __stream); + return __fread_unlocked_chk (__ptr, sz, __size, __n, __stream); + +} +# 895 "/usr/riscv64-linux-gnu/include/stdio.h" 2 3 + + + + + + + +} +# 40 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 2 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stdarg.h" 1 3 4 +# 41 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 2 + + + + +# 1 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/linux/jni_md.h" 1 +# 57 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/linux/jni_md.h" + +# 57 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/linux/jni_md.h" +typedef int jint; + +typedef long jlong; + + + + +typedef signed char jbyte; +# 46 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 2 + + +extern "C" { +# 57 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" +typedef unsigned char jboolean; +typedef unsigned short jchar; +typedef short jshort; +typedef float jfloat; +typedef double jdouble; + +typedef jint jsize; + + + +class _jobject {}; +class _jclass : public _jobject {}; +class _jthrowable : public _jobject {}; +class _jstring : public _jobject {}; +class _jarray : public _jobject {}; +class _jbooleanArray : public _jarray {}; +class _jbyteArray : public _jarray {}; +class _jcharArray : public _jarray {}; +class _jshortArray : public _jarray {}; +class _jintArray : public _jarray {}; +class _jlongArray : public _jarray {}; +class _jfloatArray : public _jarray {}; +class _jdoubleArray : public _jarray {}; +class _jobjectArray : public _jarray {}; + +typedef _jobject *jobject; +typedef _jclass *jclass; +typedef _jthrowable *jthrowable; +typedef _jstring *jstring; +typedef _jarray *jarray; +typedef _jbooleanArray *jbooleanArray; +typedef _jbyteArray *jbyteArray; +typedef _jcharArray *jcharArray; +typedef _jshortArray *jshortArray; +typedef _jintArray *jintArray; +typedef _jlongArray *jlongArray; +typedef _jfloatArray *jfloatArray; +typedef _jdoubleArray *jdoubleArray; +typedef _jobjectArray *jobjectArray; +# 118 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" +typedef jobject jweak; + +typedef union jvalue { + jboolean z; + jbyte b; + jchar c; + jshort s; + jint i; + jlong j; + jfloat f; + jdouble d; + jobject l; +} jvalue; + +struct _jfieldID; +typedef struct _jfieldID *jfieldID; + +struct _jmethodID; +typedef struct _jmethodID *jmethodID; + + +typedef enum _jobjectType { + JNIInvalidRefType = 0, + JNILocalRefType = 1, + JNIGlobalRefType = 2, + JNIWeakGlobalRefType = 3 +} jobjectRefType; +# 180 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" +typedef struct { + char *name; + char *signature; + void *fnPtr; +} JNINativeMethod; + + + + + +struct JNINativeInterface_; + +struct JNIEnv_; + + +typedef JNIEnv_ JNIEnv; +# 204 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" +struct JNIInvokeInterface_; + +struct JavaVM_; + + +typedef JavaVM_ JavaVM; + + + + +struct JNINativeInterface_ { + void *reserved0; + void *reserved1; + void *reserved2; + + void *reserved3; + jint ( *GetVersion)(JNIEnv *env); + + jclass ( *DefineClass) + (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, + jsize len); + jclass ( *FindClass) + (JNIEnv *env, const char *name); + + jmethodID ( *FromReflectedMethod) + (JNIEnv *env, jobject method); + jfieldID ( *FromReflectedField) + (JNIEnv *env, jobject field); + + jobject ( *ToReflectedMethod) + (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic); + + jclass ( *GetSuperclass) + (JNIEnv *env, jclass sub); + jboolean ( *IsAssignableFrom) + (JNIEnv *env, jclass sub, jclass sup); + + jobject ( *ToReflectedField) + (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic); + + jint ( *Throw) + (JNIEnv *env, jthrowable obj); + jint ( *ThrowNew) + (JNIEnv *env, jclass clazz, const char *msg); + jthrowable ( *ExceptionOccurred) + (JNIEnv *env); + void ( *ExceptionDescribe) + (JNIEnv *env); + void ( *ExceptionClear) + (JNIEnv *env); + void ( *FatalError) + (JNIEnv *env, const char *msg); + + jint ( *PushLocalFrame) + (JNIEnv *env, jint capacity); + jobject ( *PopLocalFrame) + (JNIEnv *env, jobject result); + + jobject ( *NewGlobalRef) + (JNIEnv *env, jobject lobj); + void ( *DeleteGlobalRef) + (JNIEnv *env, jobject gref); + void ( *DeleteLocalRef) + (JNIEnv *env, jobject obj); + jboolean ( *IsSameObject) + (JNIEnv *env, jobject obj1, jobject obj2); + jobject ( *NewLocalRef) + (JNIEnv *env, jobject ref); + jint ( *EnsureLocalCapacity) + (JNIEnv *env, jint capacity); + + jobject ( *AllocObject) + (JNIEnv *env, jclass clazz); + jobject ( *NewObject) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jobject ( *NewObjectV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jobject ( *NewObjectA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jclass ( *GetObjectClass) + (JNIEnv *env, jobject obj); + jboolean ( *IsInstanceOf) + (JNIEnv *env, jobject obj, jclass clazz); + + jmethodID ( *GetMethodID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject ( *CallObjectMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jobject ( *CallObjectMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jobject ( *CallObjectMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); + + jboolean ( *CallBooleanMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jboolean ( *CallBooleanMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jboolean ( *CallBooleanMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); + + jbyte ( *CallByteMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jbyte ( *CallByteMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jbyte ( *CallByteMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jchar ( *CallCharMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jchar ( *CallCharMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jchar ( *CallCharMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jshort ( *CallShortMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jshort ( *CallShortMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jshort ( *CallShortMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jint ( *CallIntMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jint ( *CallIntMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jint ( *CallIntMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jlong ( *CallLongMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jlong ( *CallLongMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jlong ( *CallLongMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jfloat ( *CallFloatMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jfloat ( *CallFloatMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jfloat ( *CallFloatMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jdouble ( *CallDoubleMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jdouble ( *CallDoubleMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jdouble ( *CallDoubleMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + void ( *CallVoidMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + void ( *CallVoidMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + void ( *CallVoidMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); + + jobject ( *CallNonvirtualObjectMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jobject ( *CallNonvirtualObjectMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jobject ( *CallNonvirtualObjectMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue * args); + + jboolean ( *CallNonvirtualBooleanMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jboolean ( *CallNonvirtualBooleanMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jboolean ( *CallNonvirtualBooleanMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue * args); + + jbyte ( *CallNonvirtualByteMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jbyte ( *CallNonvirtualByteMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jbyte ( *CallNonvirtualByteMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jchar ( *CallNonvirtualCharMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jchar ( *CallNonvirtualCharMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jchar ( *CallNonvirtualCharMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jshort ( *CallNonvirtualShortMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jshort ( *CallNonvirtualShortMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jshort ( *CallNonvirtualShortMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jint ( *CallNonvirtualIntMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jint ( *CallNonvirtualIntMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jint ( *CallNonvirtualIntMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jlong ( *CallNonvirtualLongMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jlong ( *CallNonvirtualLongMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jlong ( *CallNonvirtualLongMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jfloat ( *CallNonvirtualFloatMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jfloat ( *CallNonvirtualFloatMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jfloat ( *CallNonvirtualFloatMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jdouble ( *CallNonvirtualDoubleMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jdouble ( *CallNonvirtualDoubleMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jdouble ( *CallNonvirtualDoubleMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + void ( *CallNonvirtualVoidMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + void ( *CallNonvirtualVoidMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + void ( *CallNonvirtualVoidMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue * args); + + jfieldID ( *GetFieldID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject ( *GetObjectField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jboolean ( *GetBooleanField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jbyte ( *GetByteField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jchar ( *GetCharField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jshort ( *GetShortField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jint ( *GetIntField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jlong ( *GetLongField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jfloat ( *GetFloatField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jdouble ( *GetDoubleField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + + void ( *SetObjectField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val); + void ( *SetBooleanField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val); + void ( *SetByteField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val); + void ( *SetCharField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val); + void ( *SetShortField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val); + void ( *SetIntField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jint val); + void ( *SetLongField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val); + void ( *SetFloatField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val); + void ( *SetDoubleField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val); + + jmethodID ( *GetStaticMethodID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject ( *CallStaticObjectMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jobject ( *CallStaticObjectMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jobject ( *CallStaticObjectMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jboolean ( *CallStaticBooleanMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jboolean ( *CallStaticBooleanMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jboolean ( *CallStaticBooleanMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jbyte ( *CallStaticByteMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jbyte ( *CallStaticByteMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jbyte ( *CallStaticByteMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jchar ( *CallStaticCharMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jchar ( *CallStaticCharMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jchar ( *CallStaticCharMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jshort ( *CallStaticShortMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jshort ( *CallStaticShortMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jshort ( *CallStaticShortMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jint ( *CallStaticIntMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jint ( *CallStaticIntMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jint ( *CallStaticIntMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jlong ( *CallStaticLongMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jlong ( *CallStaticLongMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jlong ( *CallStaticLongMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jfloat ( *CallStaticFloatMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jfloat ( *CallStaticFloatMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jfloat ( *CallStaticFloatMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jdouble ( *CallStaticDoubleMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jdouble ( *CallStaticDoubleMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jdouble ( *CallStaticDoubleMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + void ( *CallStaticVoidMethod) + (JNIEnv *env, jclass cls, jmethodID methodID, ...); + void ( *CallStaticVoidMethodV) + (JNIEnv *env, jclass cls, jmethodID methodID, va_list args); + void ( *CallStaticVoidMethodA) + (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args); + + jfieldID ( *GetStaticFieldID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + jobject ( *GetStaticObjectField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jboolean ( *GetStaticBooleanField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jbyte ( *GetStaticByteField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jchar ( *GetStaticCharField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jshort ( *GetStaticShortField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jint ( *GetStaticIntField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jlong ( *GetStaticLongField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jfloat ( *GetStaticFloatField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jdouble ( *GetStaticDoubleField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + + void ( *SetStaticObjectField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value); + void ( *SetStaticBooleanField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value); + void ( *SetStaticByteField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value); + void ( *SetStaticCharField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value); + void ( *SetStaticShortField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value); + void ( *SetStaticIntField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value); + void ( *SetStaticLongField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value); + void ( *SetStaticFloatField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value); + void ( *SetStaticDoubleField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value); + + jstring ( *NewString) + (JNIEnv *env, const jchar *unicode, jsize len); + jsize ( *GetStringLength) + (JNIEnv *env, jstring str); + const jchar *( *GetStringChars) + (JNIEnv *env, jstring str, jboolean *isCopy); + void ( *ReleaseStringChars) + (JNIEnv *env, jstring str, const jchar *chars); + + jstring ( *NewStringUTF) + (JNIEnv *env, const char *utf); + jsize ( *GetStringUTFLength) + (JNIEnv *env, jstring str); + const char* ( *GetStringUTFChars) + (JNIEnv *env, jstring str, jboolean *isCopy); + void ( *ReleaseStringUTFChars) + (JNIEnv *env, jstring str, const char* chars); + + + jsize ( *GetArrayLength) + (JNIEnv *env, jarray array); + + jobjectArray ( *NewObjectArray) + (JNIEnv *env, jsize len, jclass clazz, jobject init); + jobject ( *GetObjectArrayElement) + (JNIEnv *env, jobjectArray array, jsize index); + void ( *SetObjectArrayElement) + (JNIEnv *env, jobjectArray array, jsize index, jobject val); + + jbooleanArray ( *NewBooleanArray) + (JNIEnv *env, jsize len); + jbyteArray ( *NewByteArray) + (JNIEnv *env, jsize len); + jcharArray ( *NewCharArray) + (JNIEnv *env, jsize len); + jshortArray ( *NewShortArray) + (JNIEnv *env, jsize len); + jintArray ( *NewIntArray) + (JNIEnv *env, jsize len); + jlongArray ( *NewLongArray) + (JNIEnv *env, jsize len); + jfloatArray ( *NewFloatArray) + (JNIEnv *env, jsize len); + jdoubleArray ( *NewDoubleArray) + (JNIEnv *env, jsize len); + + jboolean * ( *GetBooleanArrayElements) + (JNIEnv *env, jbooleanArray array, jboolean *isCopy); + jbyte * ( *GetByteArrayElements) + (JNIEnv *env, jbyteArray array, jboolean *isCopy); + jchar * ( *GetCharArrayElements) + (JNIEnv *env, jcharArray array, jboolean *isCopy); + jshort * ( *GetShortArrayElements) + (JNIEnv *env, jshortArray array, jboolean *isCopy); + jint * ( *GetIntArrayElements) + (JNIEnv *env, jintArray array, jboolean *isCopy); + jlong * ( *GetLongArrayElements) + (JNIEnv *env, jlongArray array, jboolean *isCopy); + jfloat * ( *GetFloatArrayElements) + (JNIEnv *env, jfloatArray array, jboolean *isCopy); + jdouble * ( *GetDoubleArrayElements) + (JNIEnv *env, jdoubleArray array, jboolean *isCopy); + + void ( *ReleaseBooleanArrayElements) + (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode); + void ( *ReleaseByteArrayElements) + (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode); + void ( *ReleaseCharArrayElements) + (JNIEnv *env, jcharArray array, jchar *elems, jint mode); + void ( *ReleaseShortArrayElements) + (JNIEnv *env, jshortArray array, jshort *elems, jint mode); + void ( *ReleaseIntArrayElements) + (JNIEnv *env, jintArray array, jint *elems, jint mode); + void ( *ReleaseLongArrayElements) + (JNIEnv *env, jlongArray array, jlong *elems, jint mode); + void ( *ReleaseFloatArrayElements) + (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode); + void ( *ReleaseDoubleArrayElements) + (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode); + + void ( *GetBooleanArrayRegion) + (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); + void ( *GetByteArrayRegion) + (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); + void ( *GetCharArrayRegion) + (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); + void ( *GetShortArrayRegion) + (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); + void ( *GetIntArrayRegion) + (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); + void ( *GetLongArrayRegion) + (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); + void ( *GetFloatArrayRegion) + (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); + void ( *GetDoubleArrayRegion) + (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); + + void ( *SetBooleanArrayRegion) + (JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf); + void ( *SetByteArrayRegion) + (JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf); + void ( *SetCharArrayRegion) + (JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf); + void ( *SetShortArrayRegion) + (JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf); + void ( *SetIntArrayRegion) + (JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf); + void ( *SetLongArrayRegion) + (JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf); + void ( *SetFloatArrayRegion) + (JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf); + void ( *SetDoubleArrayRegion) + (JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf); + + jint ( *RegisterNatives) + (JNIEnv *env, jclass clazz, const JNINativeMethod *methods, + jint nMethods); + jint ( *UnregisterNatives) + (JNIEnv *env, jclass clazz); + + jint ( *MonitorEnter) + (JNIEnv *env, jobject obj); + jint ( *MonitorExit) + (JNIEnv *env, jobject obj); + + jint ( *GetJavaVM) + (JNIEnv *env, JavaVM **vm); + + void ( *GetStringRegion) + (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf); + void ( *GetStringUTFRegion) + (JNIEnv *env, jstring str, jsize start, jsize len, char *buf); + + void * ( *GetPrimitiveArrayCritical) + (JNIEnv *env, jarray array, jboolean *isCopy); + void ( *ReleasePrimitiveArrayCritical) + (JNIEnv *env, jarray array, void *carray, jint mode); + + const jchar * ( *GetStringCritical) + (JNIEnv *env, jstring string, jboolean *isCopy); + void ( *ReleaseStringCritical) + (JNIEnv *env, jstring string, const jchar *cstring); + + jweak ( *NewWeakGlobalRef) + (JNIEnv *env, jobject obj); + void ( *DeleteWeakGlobalRef) + (JNIEnv *env, jweak ref); + + jboolean ( *ExceptionCheck) + (JNIEnv *env); + + jobject ( *NewDirectByteBuffer) + (JNIEnv* env, void* address, jlong capacity); + void* ( *GetDirectBufferAddress) + (JNIEnv* env, jobject buf); + jlong ( *GetDirectBufferCapacity) + (JNIEnv* env, jobject buf); + + + + jobjectRefType ( *GetObjectRefType) + (JNIEnv* env, jobject obj); + + + + jobject ( *GetModule) + (JNIEnv* env, jclass clazz); + + + + jboolean ( *IsVirtualThread) + (JNIEnv* env, jobject obj); +}; +# 792 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" +struct JNIEnv_ { + const struct JNINativeInterface_ *functions; + + + jint GetVersion() { + return functions->GetVersion(this); + } + jclass DefineClass(const char *name, jobject loader, const jbyte *buf, + jsize len) { + return functions->DefineClass(this, name, loader, buf, len); + } + jclass FindClass(const char *name) { + return functions->FindClass(this, name); + } + jmethodID FromReflectedMethod(jobject method) { + return functions->FromReflectedMethod(this,method); + } + jfieldID FromReflectedField(jobject field) { + return functions->FromReflectedField(this,field); + } + + jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) { + return functions->ToReflectedMethod(this, cls, methodID, isStatic); + } + + jclass GetSuperclass(jclass sub) { + return functions->GetSuperclass(this, sub); + } + jboolean IsAssignableFrom(jclass sub, jclass sup) { + return functions->IsAssignableFrom(this, sub, sup); + } + + jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) { + return functions->ToReflectedField(this,cls,fieldID,isStatic); + } + + jint Throw(jthrowable obj) { + return functions->Throw(this, obj); + } + jint ThrowNew(jclass clazz, const char *msg) { + return functions->ThrowNew(this, clazz, msg); + } + jthrowable ExceptionOccurred() { + return functions->ExceptionOccurred(this); + } + void ExceptionDescribe() { + functions->ExceptionDescribe(this); + } + void ExceptionClear() { + functions->ExceptionClear(this); + } + void FatalError(const char *msg) { + functions->FatalError(this, msg); + } + + jint PushLocalFrame(jint capacity) { + return functions->PushLocalFrame(this,capacity); + } + jobject PopLocalFrame(jobject result) { + return functions->PopLocalFrame(this,result); + } + + jobject NewGlobalRef(jobject lobj) { + return functions->NewGlobalRef(this,lobj); + } + void DeleteGlobalRef(jobject gref) { + functions->DeleteGlobalRef(this,gref); + } + void DeleteLocalRef(jobject obj) { + functions->DeleteLocalRef(this, obj); + } + + jboolean IsSameObject(jobject obj1, jobject obj2) { + return functions->IsSameObject(this,obj1,obj2); + } + + jobject NewLocalRef(jobject ref) { + return functions->NewLocalRef(this,ref); + } + jint EnsureLocalCapacity(jint capacity) { + return functions->EnsureLocalCapacity(this,capacity); + } + + jobject AllocObject(jclass clazz) { + return functions->AllocObject(this,clazz); + } + jobject NewObject(jclass clazz, jmethodID methodID, ...) { + va_list args; + jobject result; + +# 881 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 881 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 881 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 881 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 881 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 881 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->NewObjectV(this,clazz,methodID,args); + +# 883 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 883 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 883 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 883 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jobject NewObjectV(jclass clazz, jmethodID methodID, + va_list args) { + return functions->NewObjectV(this,clazz,methodID,args); + } + jobject NewObjectA(jclass clazz, jmethodID methodID, + const jvalue *args) { + return functions->NewObjectA(this,clazz,methodID,args); + } + + jclass GetObjectClass(jobject obj) { + return functions->GetObjectClass(this,obj); + } + jboolean IsInstanceOf(jobject obj, jclass clazz) { + return functions->IsInstanceOf(this,obj,clazz); + } + + jmethodID GetMethodID(jclass clazz, const char *name, + const char *sig) { + return functions->GetMethodID(this,clazz,name,sig); + } + + jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jobject result; + +# 910 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 910 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 910 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 910 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 910 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 910 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallObjectMethodV(this,obj,methodID,args); + +# 912 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 912 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 912 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 912 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jobject CallObjectMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallObjectMethodV(this,obj,methodID,args); + } + jobject CallObjectMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallObjectMethodA(this,obj,methodID,args); + } + + jboolean CallBooleanMethod(jobject obj, + jmethodID methodID, ...) { + va_list args; + jboolean result; + +# 928 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 928 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 928 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 928 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 928 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 928 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallBooleanMethodV(this,obj,methodID,args); + +# 930 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 930 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 930 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 930 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jboolean CallBooleanMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallBooleanMethodV(this,obj,methodID,args); + } + jboolean CallBooleanMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallBooleanMethodA(this,obj,methodID, args); + } + + jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jbyte result; + +# 945 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 945 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 945 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 945 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 945 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 945 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallByteMethodV(this,obj,methodID,args); + +# 947 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 947 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 947 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 947 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jbyte CallByteMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallByteMethodV(this,obj,methodID,args); + } + jbyte CallByteMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallByteMethodA(this,obj,methodID,args); + } + + jchar CallCharMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jchar result; + +# 962 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 962 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 962 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 962 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 962 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 962 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallCharMethodV(this,obj,methodID,args); + +# 964 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 964 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 964 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 964 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jchar CallCharMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallCharMethodV(this,obj,methodID,args); + } + jchar CallCharMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallCharMethodA(this,obj,methodID,args); + } + + jshort CallShortMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jshort result; + +# 979 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 979 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 979 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 979 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 979 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 979 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallShortMethodV(this,obj,methodID,args); + +# 981 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 981 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 981 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 981 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jshort CallShortMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallShortMethodV(this,obj,methodID,args); + } + jshort CallShortMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallShortMethodA(this,obj,methodID,args); + } + + jint CallIntMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jint result; + +# 996 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 996 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 996 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 996 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 996 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 996 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallIntMethodV(this,obj,methodID,args); + +# 998 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 998 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 998 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 998 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jint CallIntMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallIntMethodV(this,obj,methodID,args); + } + jint CallIntMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallIntMethodA(this,obj,methodID,args); + } + + jlong CallLongMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jlong result; + +# 1013 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1013 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1013 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1013 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1013 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1013 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallLongMethodV(this,obj,methodID,args); + +# 1015 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1015 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1015 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1015 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jlong CallLongMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallLongMethodV(this,obj,methodID,args); + } + jlong CallLongMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallLongMethodA(this,obj,methodID,args); + } + + jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jfloat result; + +# 1030 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1030 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1030 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1030 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1030 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1030 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallFloatMethodV(this,obj,methodID,args); + +# 1032 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1032 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1032 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1032 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jfloat CallFloatMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallFloatMethodV(this,obj,methodID,args); + } + jfloat CallFloatMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallFloatMethodA(this,obj,methodID,args); + } + + jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jdouble result; + +# 1047 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1047 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1047 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1047 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1047 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1047 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallDoubleMethodV(this,obj,methodID,args); + +# 1049 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1049 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1049 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1049 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jdouble CallDoubleMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallDoubleMethodV(this,obj,methodID,args); + } + jdouble CallDoubleMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallDoubleMethodA(this,obj,methodID,args); + } + + void CallVoidMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + +# 1063 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1063 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1063 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1063 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1063 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1063 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + functions->CallVoidMethodV(this,obj,methodID,args); + +# 1065 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1065 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1065 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1065 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + } + void CallVoidMethodV(jobject obj, jmethodID methodID, + va_list args) { + functions->CallVoidMethodV(this,obj,methodID,args); + } + void CallVoidMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + functions->CallVoidMethodA(this,obj,methodID,args); + } + + jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jobject result; + +# 1080 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1080 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1080 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1080 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1080 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1080 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallNonvirtualObjectMethodV(this,obj,clazz, + methodID,args); + +# 1083 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1083 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1083 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1083 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualObjectMethodV(this,obj,clazz, + methodID,args); + } + jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualObjectMethodA(this,obj,clazz, + methodID,args); + } + + jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jboolean result; + +# 1101 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1101 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1101 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1101 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1101 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1101 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz, + methodID,args); + +# 1104 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1104 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1104 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1104 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualBooleanMethodV(this,obj,clazz, + methodID,args); + } + jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualBooleanMethodA(this,obj,clazz, + methodID, args); + } + + jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jbyte result; + +# 1122 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1122 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1122 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1122 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1122 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1122 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallNonvirtualByteMethodV(this,obj,clazz, + methodID,args); + +# 1125 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1125 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1125 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1125 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualByteMethodV(this,obj,clazz, + methodID,args); + } + jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualByteMethodA(this,obj,clazz, + methodID,args); + } + + jchar CallNonvirtualCharMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jchar result; + +# 1143 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1143 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1143 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1143 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1143 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1143 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallNonvirtualCharMethodV(this,obj,clazz, + methodID,args); + +# 1146 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1146 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1146 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1146 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualCharMethodV(this,obj,clazz, + methodID,args); + } + jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualCharMethodA(this,obj,clazz, + methodID,args); + } + + jshort CallNonvirtualShortMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jshort result; + +# 1164 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1164 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1164 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1164 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1164 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1164 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallNonvirtualShortMethodV(this,obj,clazz, + methodID,args); + +# 1167 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1167 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1167 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1167 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualShortMethodV(this,obj,clazz, + methodID,args); + } + jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualShortMethodA(this,obj,clazz, + methodID,args); + } + + jint CallNonvirtualIntMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jint result; + +# 1185 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1185 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1185 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1185 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1185 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1185 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallNonvirtualIntMethodV(this,obj,clazz, + methodID,args); + +# 1188 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1188 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1188 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1188 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jint CallNonvirtualIntMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualIntMethodV(this,obj,clazz, + methodID,args); + } + jint CallNonvirtualIntMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualIntMethodA(this,obj,clazz, + methodID,args); + } + + jlong CallNonvirtualLongMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jlong result; + +# 1206 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1206 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1206 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1206 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1206 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1206 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallNonvirtualLongMethodV(this,obj,clazz, + methodID,args); + +# 1209 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1209 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1209 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1209 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualLongMethodV(this,obj,clazz, + methodID,args); + } + jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualLongMethodA(this,obj,clazz, + methodID,args); + } + + jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jfloat result; + +# 1227 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1227 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1227 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1227 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1227 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1227 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallNonvirtualFloatMethodV(this,obj,clazz, + methodID,args); + +# 1230 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1230 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1230 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1230 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + return functions->CallNonvirtualFloatMethodV(this,obj,clazz, + methodID,args); + } + jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz, + jmethodID methodID, + const jvalue * args) { + return functions->CallNonvirtualFloatMethodA(this,obj,clazz, + methodID,args); + } + + jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jdouble result; + +# 1250 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1250 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1250 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1250 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1250 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1250 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz, + methodID,args); + +# 1253 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1253 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1253 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1253 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + return functions->CallNonvirtualDoubleMethodV(this,obj,clazz, + methodID,args); + } + jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz, + jmethodID methodID, + const jvalue * args) { + return functions->CallNonvirtualDoubleMethodA(this,obj,clazz, + methodID,args); + } + + void CallNonvirtualVoidMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + +# 1272 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1272 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1272 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1272 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1272 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1272 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); + +# 1274 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1274 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1274 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1274 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + } + void CallNonvirtualVoidMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); + } + void CallNonvirtualVoidMethodA(jobject obj, jclass clazz, + jmethodID methodID, + const jvalue * args) { + functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args); + } + + jfieldID GetFieldID(jclass clazz, const char *name, + const char *sig) { + return functions->GetFieldID(this,clazz,name,sig); + } + + jobject GetObjectField(jobject obj, jfieldID fieldID) { + return functions->GetObjectField(this,obj,fieldID); + } + jboolean GetBooleanField(jobject obj, jfieldID fieldID) { + return functions->GetBooleanField(this,obj,fieldID); + } + jbyte GetByteField(jobject obj, jfieldID fieldID) { + return functions->GetByteField(this,obj,fieldID); + } + jchar GetCharField(jobject obj, jfieldID fieldID) { + return functions->GetCharField(this,obj,fieldID); + } + jshort GetShortField(jobject obj, jfieldID fieldID) { + return functions->GetShortField(this,obj,fieldID); + } + jint GetIntField(jobject obj, jfieldID fieldID) { + return functions->GetIntField(this,obj,fieldID); + } + jlong GetLongField(jobject obj, jfieldID fieldID) { + return functions->GetLongField(this,obj,fieldID); + } + jfloat GetFloatField(jobject obj, jfieldID fieldID) { + return functions->GetFloatField(this,obj,fieldID); + } + jdouble GetDoubleField(jobject obj, jfieldID fieldID) { + return functions->GetDoubleField(this,obj,fieldID); + } + + void SetObjectField(jobject obj, jfieldID fieldID, jobject val) { + functions->SetObjectField(this,obj,fieldID,val); + } + void SetBooleanField(jobject obj, jfieldID fieldID, + jboolean val) { + functions->SetBooleanField(this,obj,fieldID,val); + } + void SetByteField(jobject obj, jfieldID fieldID, + jbyte val) { + functions->SetByteField(this,obj,fieldID,val); + } + void SetCharField(jobject obj, jfieldID fieldID, + jchar val) { + functions->SetCharField(this,obj,fieldID,val); + } + void SetShortField(jobject obj, jfieldID fieldID, + jshort val) { + functions->SetShortField(this,obj,fieldID,val); + } + void SetIntField(jobject obj, jfieldID fieldID, + jint val) { + functions->SetIntField(this,obj,fieldID,val); + } + void SetLongField(jobject obj, jfieldID fieldID, + jlong val) { + functions->SetLongField(this,obj,fieldID,val); + } + void SetFloatField(jobject obj, jfieldID fieldID, + jfloat val) { + functions->SetFloatField(this,obj,fieldID,val); + } + void SetDoubleField(jobject obj, jfieldID fieldID, + jdouble val) { + functions->SetDoubleField(this,obj,fieldID,val); + } + + jmethodID GetStaticMethodID(jclass clazz, const char *name, + const char *sig) { + return functions->GetStaticMethodID(this,clazz,name,sig); + } + + jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID, + ...) { + va_list args; + jobject result; + +# 1365 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1365 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1365 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1365 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1365 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1365 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallStaticObjectMethodV(this,clazz,methodID,args); + +# 1367 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1367 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1367 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1367 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID, + va_list args) { + return functions->CallStaticObjectMethodV(this,clazz,methodID,args); + } + jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID, + const jvalue *args) { + return functions->CallStaticObjectMethodA(this,clazz,methodID,args); + } + + jboolean CallStaticBooleanMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jboolean result; + +# 1383 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1383 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1383 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1383 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1383 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1383 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args); + +# 1385 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1385 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1385 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1385 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jboolean CallStaticBooleanMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticBooleanMethodV(this,clazz,methodID,args); + } + jboolean CallStaticBooleanMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticBooleanMethodA(this,clazz,methodID,args); + } + + jbyte CallStaticByteMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jbyte result; + +# 1401 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1401 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1401 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1401 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1401 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1401 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallStaticByteMethodV(this,clazz,methodID,args); + +# 1403 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1403 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1403 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1403 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jbyte CallStaticByteMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticByteMethodV(this,clazz,methodID,args); + } + jbyte CallStaticByteMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticByteMethodA(this,clazz,methodID,args); + } + + jchar CallStaticCharMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jchar result; + +# 1419 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1419 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1419 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1419 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1419 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1419 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallStaticCharMethodV(this,clazz,methodID,args); + +# 1421 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1421 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1421 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1421 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jchar CallStaticCharMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticCharMethodV(this,clazz,methodID,args); + } + jchar CallStaticCharMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticCharMethodA(this,clazz,methodID,args); + } + + jshort CallStaticShortMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jshort result; + +# 1437 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1437 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1437 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1437 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1437 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1437 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallStaticShortMethodV(this,clazz,methodID,args); + +# 1439 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1439 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1439 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1439 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jshort CallStaticShortMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticShortMethodV(this,clazz,methodID,args); + } + jshort CallStaticShortMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticShortMethodA(this,clazz,methodID,args); + } + + jint CallStaticIntMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jint result; + +# 1455 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1455 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1455 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1455 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1455 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1455 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallStaticIntMethodV(this,clazz,methodID,args); + +# 1457 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1457 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1457 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1457 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jint CallStaticIntMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticIntMethodV(this,clazz,methodID,args); + } + jint CallStaticIntMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticIntMethodA(this,clazz,methodID,args); + } + + jlong CallStaticLongMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jlong result; + +# 1473 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1473 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1473 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1473 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1473 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1473 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallStaticLongMethodV(this,clazz,methodID,args); + +# 1475 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1475 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1475 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1475 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jlong CallStaticLongMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticLongMethodV(this,clazz,methodID,args); + } + jlong CallStaticLongMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticLongMethodA(this,clazz,methodID,args); + } + + jfloat CallStaticFloatMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jfloat result; + +# 1491 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1491 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1491 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1491 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1491 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1491 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallStaticFloatMethodV(this,clazz,methodID,args); + +# 1493 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1493 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1493 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1493 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jfloat CallStaticFloatMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticFloatMethodV(this,clazz,methodID,args); + } + jfloat CallStaticFloatMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticFloatMethodA(this,clazz,methodID,args); + } + + jdouble CallStaticDoubleMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jdouble result; + +# 1509 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1509 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1509 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1509 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1509 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1509 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args); + +# 1511 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1511 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1511 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1511 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + return result; + } + jdouble CallStaticDoubleMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticDoubleMethodV(this,clazz,methodID,args); + } + jdouble CallStaticDoubleMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticDoubleMethodA(this,clazz,methodID,args); + } + + void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) { + va_list args; + +# 1525 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_start( +# 1525 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1525 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + , +# 1525 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + methodID +# 1525 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1525 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + functions->CallStaticVoidMethodV(this,cls,methodID,args); + +# 1527 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + __builtin_va_end( +# 1527 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + args +# 1527 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" 3 4 + ) +# 1527 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" + ; + } + void CallStaticVoidMethodV(jclass cls, jmethodID methodID, + va_list args) { + functions->CallStaticVoidMethodV(this,cls,methodID,args); + } + void CallStaticVoidMethodA(jclass cls, jmethodID methodID, + const jvalue * args) { + functions->CallStaticVoidMethodA(this,cls,methodID,args); + } + + jfieldID GetStaticFieldID(jclass clazz, const char *name, + const char *sig) { + return functions->GetStaticFieldID(this,clazz,name,sig); + } + jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticObjectField(this,clazz,fieldID); + } + jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticBooleanField(this,clazz,fieldID); + } + jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticByteField(this,clazz,fieldID); + } + jchar GetStaticCharField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticCharField(this,clazz,fieldID); + } + jshort GetStaticShortField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticShortField(this,clazz,fieldID); + } + jint GetStaticIntField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticIntField(this,clazz,fieldID); + } + jlong GetStaticLongField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticLongField(this,clazz,fieldID); + } + jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticFloatField(this,clazz,fieldID); + } + jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticDoubleField(this,clazz,fieldID); + } + + void SetStaticObjectField(jclass clazz, jfieldID fieldID, + jobject value) { + functions->SetStaticObjectField(this,clazz,fieldID,value); + } + void SetStaticBooleanField(jclass clazz, jfieldID fieldID, + jboolean value) { + functions->SetStaticBooleanField(this,clazz,fieldID,value); + } + void SetStaticByteField(jclass clazz, jfieldID fieldID, + jbyte value) { + functions->SetStaticByteField(this,clazz,fieldID,value); + } + void SetStaticCharField(jclass clazz, jfieldID fieldID, + jchar value) { + functions->SetStaticCharField(this,clazz,fieldID,value); + } + void SetStaticShortField(jclass clazz, jfieldID fieldID, + jshort value) { + functions->SetStaticShortField(this,clazz,fieldID,value); + } + void SetStaticIntField(jclass clazz, jfieldID fieldID, + jint value) { + functions->SetStaticIntField(this,clazz,fieldID,value); + } + void SetStaticLongField(jclass clazz, jfieldID fieldID, + jlong value) { + functions->SetStaticLongField(this,clazz,fieldID,value); + } + void SetStaticFloatField(jclass clazz, jfieldID fieldID, + jfloat value) { + functions->SetStaticFloatField(this,clazz,fieldID,value); + } + void SetStaticDoubleField(jclass clazz, jfieldID fieldID, + jdouble value) { + functions->SetStaticDoubleField(this,clazz,fieldID,value); + } + + jstring NewString(const jchar *unicode, jsize len) { + return functions->NewString(this,unicode,len); + } + jsize GetStringLength(jstring str) { + return functions->GetStringLength(this,str); + } + const jchar *GetStringChars(jstring str, jboolean *isCopy) { + return functions->GetStringChars(this,str,isCopy); + } + void ReleaseStringChars(jstring str, const jchar *chars) { + functions->ReleaseStringChars(this,str,chars); + } + + jstring NewStringUTF(const char *utf) { + return functions->NewStringUTF(this,utf); + } + jsize GetStringUTFLength(jstring str) { + return functions->GetStringUTFLength(this,str); + } + const char* GetStringUTFChars(jstring str, jboolean *isCopy) { + return functions->GetStringUTFChars(this,str,isCopy); + } + void ReleaseStringUTFChars(jstring str, const char* chars) { + functions->ReleaseStringUTFChars(this,str,chars); + } + + jsize GetArrayLength(jarray array) { + return functions->GetArrayLength(this,array); + } + + jobjectArray NewObjectArray(jsize len, jclass clazz, + jobject init) { + return functions->NewObjectArray(this,len,clazz,init); + } + jobject GetObjectArrayElement(jobjectArray array, jsize index) { + return functions->GetObjectArrayElement(this,array,index); + } + void SetObjectArrayElement(jobjectArray array, jsize index, + jobject val) { + functions->SetObjectArrayElement(this,array,index,val); + } + + jbooleanArray NewBooleanArray(jsize len) { + return functions->NewBooleanArray(this,len); + } + jbyteArray NewByteArray(jsize len) { + return functions->NewByteArray(this,len); + } + jcharArray NewCharArray(jsize len) { + return functions->NewCharArray(this,len); + } + jshortArray NewShortArray(jsize len) { + return functions->NewShortArray(this,len); + } + jintArray NewIntArray(jsize len) { + return functions->NewIntArray(this,len); + } + jlongArray NewLongArray(jsize len) { + return functions->NewLongArray(this,len); + } + jfloatArray NewFloatArray(jsize len) { + return functions->NewFloatArray(this,len); + } + jdoubleArray NewDoubleArray(jsize len) { + return functions->NewDoubleArray(this,len); + } + + jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) { + return functions->GetBooleanArrayElements(this,array,isCopy); + } + jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) { + return functions->GetByteArrayElements(this,array,isCopy); + } + jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) { + return functions->GetCharArrayElements(this,array,isCopy); + } + jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) { + return functions->GetShortArrayElements(this,array,isCopy); + } + jint * GetIntArrayElements(jintArray array, jboolean *isCopy) { + return functions->GetIntArrayElements(this,array,isCopy); + } + jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) { + return functions->GetLongArrayElements(this,array,isCopy); + } + jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) { + return functions->GetFloatArrayElements(this,array,isCopy); + } + jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) { + return functions->GetDoubleArrayElements(this,array,isCopy); + } + + void ReleaseBooleanArrayElements(jbooleanArray array, + jboolean *elems, + jint mode) { + functions->ReleaseBooleanArrayElements(this,array,elems,mode); + } + void ReleaseByteArrayElements(jbyteArray array, + jbyte *elems, + jint mode) { + functions->ReleaseByteArrayElements(this,array,elems,mode); + } + void ReleaseCharArrayElements(jcharArray array, + jchar *elems, + jint mode) { + functions->ReleaseCharArrayElements(this,array,elems,mode); + } + void ReleaseShortArrayElements(jshortArray array, + jshort *elems, + jint mode) { + functions->ReleaseShortArrayElements(this,array,elems,mode); + } + void ReleaseIntArrayElements(jintArray array, + jint *elems, + jint mode) { + functions->ReleaseIntArrayElements(this,array,elems,mode); + } + void ReleaseLongArrayElements(jlongArray array, + jlong *elems, + jint mode) { + functions->ReleaseLongArrayElements(this,array,elems,mode); + } + void ReleaseFloatArrayElements(jfloatArray array, + jfloat *elems, + jint mode) { + functions->ReleaseFloatArrayElements(this,array,elems,mode); + } + void ReleaseDoubleArrayElements(jdoubleArray array, + jdouble *elems, + jint mode) { + functions->ReleaseDoubleArrayElements(this,array,elems,mode); + } + + void GetBooleanArrayRegion(jbooleanArray array, + jsize start, jsize len, jboolean *buf) { + functions->GetBooleanArrayRegion(this,array,start,len,buf); + } + void GetByteArrayRegion(jbyteArray array, + jsize start, jsize len, jbyte *buf) { + functions->GetByteArrayRegion(this,array,start,len,buf); + } + void GetCharArrayRegion(jcharArray array, + jsize start, jsize len, jchar *buf) { + functions->GetCharArrayRegion(this,array,start,len,buf); + } + void GetShortArrayRegion(jshortArray array, + jsize start, jsize len, jshort *buf) { + functions->GetShortArrayRegion(this,array,start,len,buf); + } + void GetIntArrayRegion(jintArray array, + jsize start, jsize len, jint *buf) { + functions->GetIntArrayRegion(this,array,start,len,buf); + } + void GetLongArrayRegion(jlongArray array, + jsize start, jsize len, jlong *buf) { + functions->GetLongArrayRegion(this,array,start,len,buf); + } + void GetFloatArrayRegion(jfloatArray array, + jsize start, jsize len, jfloat *buf) { + functions->GetFloatArrayRegion(this,array,start,len,buf); + } + void GetDoubleArrayRegion(jdoubleArray array, + jsize start, jsize len, jdouble *buf) { + functions->GetDoubleArrayRegion(this,array,start,len,buf); + } + + void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, + const jboolean *buf) { + functions->SetBooleanArrayRegion(this,array,start,len,buf); + } + void SetByteArrayRegion(jbyteArray array, jsize start, jsize len, + const jbyte *buf) { + functions->SetByteArrayRegion(this,array,start,len,buf); + } + void SetCharArrayRegion(jcharArray array, jsize start, jsize len, + const jchar *buf) { + functions->SetCharArrayRegion(this,array,start,len,buf); + } + void SetShortArrayRegion(jshortArray array, jsize start, jsize len, + const jshort *buf) { + functions->SetShortArrayRegion(this,array,start,len,buf); + } + void SetIntArrayRegion(jintArray array, jsize start, jsize len, + const jint *buf) { + functions->SetIntArrayRegion(this,array,start,len,buf); + } + void SetLongArrayRegion(jlongArray array, jsize start, jsize len, + const jlong *buf) { + functions->SetLongArrayRegion(this,array,start,len,buf); + } + void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len, + const jfloat *buf) { + functions->SetFloatArrayRegion(this,array,start,len,buf); + } + void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, + const jdouble *buf) { + functions->SetDoubleArrayRegion(this,array,start,len,buf); + } + + jint RegisterNatives(jclass clazz, const JNINativeMethod *methods, + jint nMethods) { + return functions->RegisterNatives(this,clazz,methods,nMethods); + } + jint UnregisterNatives(jclass clazz) { + return functions->UnregisterNatives(this,clazz); + } + + jint MonitorEnter(jobject obj) { + return functions->MonitorEnter(this,obj); + } + jint MonitorExit(jobject obj) { + return functions->MonitorExit(this,obj); + } + + jint GetJavaVM(JavaVM **vm) { + return functions->GetJavaVM(this,vm); + } + + void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) { + functions->GetStringRegion(this,str,start,len,buf); + } + void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) { + functions->GetStringUTFRegion(this,str,start,len,buf); + } + + void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) { + return functions->GetPrimitiveArrayCritical(this,array,isCopy); + } + void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) { + functions->ReleasePrimitiveArrayCritical(this,array,carray,mode); + } + + const jchar * GetStringCritical(jstring string, jboolean *isCopy) { + return functions->GetStringCritical(this,string,isCopy); + } + void ReleaseStringCritical(jstring string, const jchar *cstring) { + functions->ReleaseStringCritical(this,string,cstring); + } + + jweak NewWeakGlobalRef(jobject obj) { + return functions->NewWeakGlobalRef(this,obj); + } + void DeleteWeakGlobalRef(jweak ref) { + functions->DeleteWeakGlobalRef(this,ref); + } + + jboolean ExceptionCheck() { + return functions->ExceptionCheck(this); + } + + jobject NewDirectByteBuffer(void* address, jlong capacity) { + return functions->NewDirectByteBuffer(this, address, capacity); + } + void* GetDirectBufferAddress(jobject buf) { + return functions->GetDirectBufferAddress(this, buf); + } + jlong GetDirectBufferCapacity(jobject buf) { + return functions->GetDirectBufferCapacity(this, buf); + } + jobjectRefType GetObjectRefType(jobject obj) { + return functions->GetObjectRefType(this, obj); + } + + + + jobject GetModule(jclass clazz) { + return functions->GetModule(this, clazz); + } + + + + jboolean IsVirtualThread(jobject obj) { + return functions->IsVirtualThread(this, obj); + } + + +}; +# 1899 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" +typedef struct JavaVMOption { + char *optionString; + void *extraInfo; +} JavaVMOption; + +typedef struct JavaVMInitArgs { + jint version; + + jint nOptions; + JavaVMOption *options; + jboolean ignoreUnrecognized; +} JavaVMInitArgs; + +typedef struct JavaVMAttachArgs { + jint version; + + char *name; + jobject group; +} JavaVMAttachArgs; +# 1926 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" +struct JNIInvokeInterface_ { + void *reserved0; + void *reserved1; + void *reserved2; + + jint ( *DestroyJavaVM)(JavaVM *vm); + + jint ( *AttachCurrentThread)(JavaVM *vm, void **penv, void *args); + + jint ( *DetachCurrentThread)(JavaVM *vm); + + jint ( *GetEnv)(JavaVM *vm, void **penv, jint version); + + jint ( *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args); +}; + +struct JavaVM_ { + const struct JNIInvokeInterface_ *functions; + + + jint DestroyJavaVM() { + return functions->DestroyJavaVM(this); + } + jint AttachCurrentThread(void **penv, void *args) { + return functions->AttachCurrentThread(this, penv, args); + } + jint DetachCurrentThread() { + return functions->DetachCurrentThread(this); + } + + jint GetEnv(void **penv, jint version) { + return functions->GetEnv(this, penv, version); + } + jint AttachCurrentThreadAsDaemon(void **penv, void *args) { + return functions->AttachCurrentThreadAsDaemon(this, penv, args); + } + +}; + + + + + + +__attribute__((visibility("default"))) jint +JNI_GetDefaultJavaVMInitArgs(void *args); + +__attribute__((visibility("default"))) jint +JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args); + +__attribute__((visibility("default"))) jint +JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); + + +__attribute__((visibility("default"))) jint +JNI_OnLoad(JavaVM *vm, void *reserved); + +__attribute__((visibility("default"))) void +JNI_OnUnload(JavaVM *vm, void *reserved); +# 1998 "/home/rehn/source/jdk/open/build/relgcc11/support/modules_include/java.base/jni.h" +} +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 + + + + + +# 1 "/usr/riscv64-linux-gnu/include/ctype.h" 1 3 +# 28 "/usr/riscv64-linux-gnu/include/ctype.h" 3 + +# 28 "/usr/riscv64-linux-gnu/include/ctype.h" 3 4 +extern "C" { +# 39 "/usr/riscv64-linux-gnu/include/ctype.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/endian.h" 1 3 +# 35 "/usr/riscv64-linux-gnu/include/bits/endian.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/endianness.h" 1 3 +# 36 "/usr/riscv64-linux-gnu/include/bits/endian.h" 2 3 +# 40 "/usr/riscv64-linux-gnu/include/ctype.h" 2 3 + + + + + + +enum +{ + _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), + _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), + _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), + _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), + _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), + _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), + _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), + _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), + _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), + _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), + _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), + _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) +}; +# 79 "/usr/riscv64-linux-gnu/include/ctype.h" 3 +extern const unsigned short int **__ctype_b_loc (void) + noexcept (true) __attribute__ ((__const__)); +extern const __int32_t **__ctype_tolower_loc (void) + noexcept (true) __attribute__ ((__const__)); +extern const __int32_t **__ctype_toupper_loc (void) + noexcept (true) __attribute__ ((__const__)); +# 108 "/usr/riscv64-linux-gnu/include/ctype.h" 3 +extern int isalnum (int) noexcept (true); +extern int isalpha (int) noexcept (true); +extern int iscntrl (int) noexcept (true); +extern int isdigit (int) noexcept (true); +extern int islower (int) noexcept (true); +extern int isgraph (int) noexcept (true); +extern int isprint (int) noexcept (true); +extern int ispunct (int) noexcept (true); +extern int isspace (int) noexcept (true); +extern int isupper (int) noexcept (true); +extern int isxdigit (int) noexcept (true); + + + +extern int tolower (int __c) noexcept (true); + + +extern int toupper (int __c) noexcept (true); + + + + +extern int isblank (int) noexcept (true); + + + + +extern int isctype (int __c, int __mask) noexcept (true); + + + + + + +extern int isascii (int __c) noexcept (true); + + + +extern int toascii (int __c) noexcept (true); + + + +extern int _toupper (int) noexcept (true); +extern int _tolower (int) noexcept (true); +# 174 "/usr/riscv64-linux-gnu/include/ctype.h" 3 +extern __inline __attribute__ ((__gnu_inline__)) int isalnum (int __c) noexcept (true) { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _ISalnum; } +extern __inline __attribute__ ((__gnu_inline__)) int isalpha (int __c) noexcept (true) { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _ISalpha; } +extern __inline __attribute__ ((__gnu_inline__)) int iscntrl (int __c) noexcept (true) { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _IScntrl; } +extern __inline __attribute__ ((__gnu_inline__)) int isdigit (int __c) noexcept (true) { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _ISdigit; } +extern __inline __attribute__ ((__gnu_inline__)) int islower (int __c) noexcept (true) { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _ISlower; } +extern __inline __attribute__ ((__gnu_inline__)) int isgraph (int __c) noexcept (true) { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _ISgraph; } +extern __inline __attribute__ ((__gnu_inline__)) int isprint (int __c) noexcept (true) { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _ISprint; } +extern __inline __attribute__ ((__gnu_inline__)) int ispunct (int __c) noexcept (true) { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _ISpunct; } +extern __inline __attribute__ ((__gnu_inline__)) int isspace (int __c) noexcept (true) { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _ISspace; } +extern __inline __attribute__ ((__gnu_inline__)) int isupper (int __c) noexcept (true) { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _ISupper; } +extern __inline __attribute__ ((__gnu_inline__)) int isxdigit (int __c) noexcept (true) { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _ISxdigit; } + +extern __inline __attribute__ ((__gnu_inline__)) int isblank (int __c) noexcept (true) { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _ISblank; } +# 206 "/usr/riscv64-linux-gnu/include/ctype.h" 3 +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__leaf__)) tolower (int __c) noexcept (true) +{ + return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; +} + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__leaf__)) toupper (int __c) noexcept (true) +{ + return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; +} +# 237 "/usr/riscv64-linux-gnu/include/ctype.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/locale_t.h" 1 3 +# 22 "/usr/riscv64-linux-gnu/include/bits/types/locale_t.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/__locale_t.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/bits/types/__locale_t.h" 3 +struct __locale_struct +{ + + struct __locale_data *__locales[13]; + + + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + + + const char *__names[13]; +}; + +typedef struct __locale_struct *__locale_t; +# 23 "/usr/riscv64-linux-gnu/include/bits/types/locale_t.h" 2 3 + +typedef __locale_t locale_t; +# 238 "/usr/riscv64-linux-gnu/include/ctype.h" 2 3 +# 251 "/usr/riscv64-linux-gnu/include/ctype.h" 3 +extern int isalnum_l (int, locale_t) noexcept (true); +extern int isalpha_l (int, locale_t) noexcept (true); +extern int iscntrl_l (int, locale_t) noexcept (true); +extern int isdigit_l (int, locale_t) noexcept (true); +extern int islower_l (int, locale_t) noexcept (true); +extern int isgraph_l (int, locale_t) noexcept (true); +extern int isprint_l (int, locale_t) noexcept (true); +extern int ispunct_l (int, locale_t) noexcept (true); +extern int isspace_l (int, locale_t) noexcept (true); +extern int isupper_l (int, locale_t) noexcept (true); +extern int isxdigit_l (int, locale_t) noexcept (true); + +extern int isblank_l (int, locale_t) noexcept (true); + + + +extern int __tolower_l (int __c, locale_t __l) noexcept (true); +extern int tolower_l (int __c, locale_t __l) noexcept (true); + + +extern int __toupper_l (int __c, locale_t __l) noexcept (true); +extern int toupper_l (int __c, locale_t __l) noexcept (true); +# 327 "/usr/riscv64-linux-gnu/include/ctype.h" 3 +} +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 +# 1 "/usr/riscv64-linux-gnu/include/string.h" 1 3 +# 26 "/usr/riscv64-linux-gnu/include/string.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/libc-header-start.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/string.h" 2 3 + +extern "C" { + + + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 34 "/usr/riscv64-linux-gnu/include/string.h" 2 3 +# 43 "/usr/riscv64-linux-gnu/include/string.h" 3 +extern void *memcpy (void *__restrict __dest, const void *__restrict __src, + size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern void *memmove (void *__dest, const void *__src, size_t __n) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern void *memccpy (void *__restrict __dest, const void *__restrict __src, + int __c, size_t __n) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__write_only__, 1, 4))); + + + + +extern void *memset (void *__s, int __c, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int memcmp (const void *__s1, const void *__s2, size_t __n) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 80 "/usr/riscv64-linux-gnu/include/string.h" 3 +extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern "C++" +{ +extern void *memchr (void *__s, int __c, size_t __n) + noexcept (true) __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern const void *memchr (const void *__s, int __c, size_t __n) + noexcept (true) __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void * +memchr (void *__s, int __c, size_t __n) noexcept (true) +{ + return __builtin_memchr (__s, __c, __n); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const void * +memchr (const void *__s, int __c, size_t __n) noexcept (true) +{ + return __builtin_memchr (__s, __c, __n); +} + +} +# 115 "/usr/riscv64-linux-gnu/include/string.h" 3 +extern "C++" void *rawmemchr (void *__s, int __c) + noexcept (true) __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" const void *rawmemchr (const void *__s, int __c) + noexcept (true) __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern "C++" void *memrchr (void *__s, int __c, size_t __n) + noexcept (true) __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) + __attribute__ ((__access__ (__read_only__, 1, 3))); +extern "C++" const void *memrchr (const void *__s, int __c, size_t __n) + noexcept (true) __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) + __attribute__ ((__access__ (__read_only__, 1, 3))); +# 141 "/usr/riscv64-linux-gnu/include/string.h" 3 +extern char *strcpy (char *__restrict __dest, const char *__restrict __src) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncpy (char *__restrict __dest, + const char *__restrict __src, size_t __n) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strcat (char *__restrict __dest, const char *__restrict __src) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncat (char *__restrict __dest, const char *__restrict __src, + size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcmp (const char *__s1, const char *__s2) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int strncmp (const char *__s1, const char *__s2, size_t __n) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcoll (const char *__s1, const char *__s2) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern size_t strxfrm (char *__restrict __dest, + const char *__restrict __src, size_t __n) + noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 1, 3))); + + + + + + +extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + + +extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, + locale_t __l) noexcept (true) __attribute__ ((__nonnull__ (2, 4))) + __attribute__ ((__access__ (__write_only__, 1, 3))); + + + + + +extern char *strdup (const char *__s) + noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strndup (const char *__string, size_t __n) + noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +# 224 "/usr/riscv64-linux-gnu/include/string.h" 3 +extern "C++" +{ +extern char *strchr (char *__s, int __c) + noexcept (true) __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern const char *strchr (const char *__s, int __c) + noexcept (true) __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * +strchr (char *__s, int __c) noexcept (true) +{ + return __builtin_strchr (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * +strchr (const char *__s, int __c) noexcept (true) +{ + return __builtin_strchr (__s, __c); +} + +} + + + + + + +extern "C++" +{ +extern char *strrchr (char *__s, int __c) + noexcept (true) __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern const char *strrchr (const char *__s, int __c) + noexcept (true) __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * +strrchr (char *__s, int __c) noexcept (true) +{ + return __builtin_strrchr (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * +strrchr (const char *__s, int __c) noexcept (true) +{ + return __builtin_strrchr (__s, __c); +} + +} +# 281 "/usr/riscv64-linux-gnu/include/string.h" 3 +extern "C++" char *strchrnul (char *__s, int __c) + noexcept (true) __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" const char *strchrnul (const char *__s, int __c) + noexcept (true) __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +# 293 "/usr/riscv64-linux-gnu/include/string.h" 3 +extern size_t strcspn (const char *__s, const char *__reject) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern size_t strspn (const char *__s, const char *__accept) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern "C++" +{ +extern char *strpbrk (char *__s, const char *__accept) + noexcept (true) __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern const char *strpbrk (const char *__s, const char *__accept) + noexcept (true) __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * +strpbrk (char *__s, const char *__accept) noexcept (true) +{ + return __builtin_strpbrk (__s, __accept); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * +strpbrk (const char *__s, const char *__accept) noexcept (true) +{ + return __builtin_strpbrk (__s, __accept); +} + +} + + + + + + +extern "C++" +{ +extern char *strstr (char *__haystack, const char *__needle) + noexcept (true) __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern const char *strstr (const char *__haystack, const char *__needle) + noexcept (true) __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * +strstr (char *__haystack, const char *__needle) noexcept (true) +{ + return __builtin_strstr (__haystack, __needle); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * +strstr (const char *__haystack, const char *__needle) noexcept (true) +{ + return __builtin_strstr (__haystack, __needle); +} + +} + + + + + + + +extern char *strtok (char *__restrict __s, const char *__restrict __delim) + noexcept (true) __attribute__ ((__nonnull__ (2))); + + + +extern char *__strtok_r (char *__restrict __s, + const char *__restrict __delim, + char **__restrict __save_ptr) + noexcept (true) __attribute__ ((__nonnull__ (2, 3))); + +extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, + char **__restrict __save_ptr) + noexcept (true) __attribute__ ((__nonnull__ (2, 3))); + + + + + +extern "C++" char *strcasestr (char *__haystack, const char *__needle) + noexcept (true) __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" const char *strcasestr (const char *__haystack, + const char *__needle) + noexcept (true) __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 389 "/usr/riscv64-linux-gnu/include/string.h" 3 +extern void *memmem (const void *__haystack, size_t __haystacklen, + const void *__needle, size_t __needlelen) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))) + __attribute__ ((__access__ (__read_only__, 1, 2))) + __attribute__ ((__access__ (__read_only__, 3, 4))); + + + +extern void *__mempcpy (void *__restrict __dest, + const void *__restrict __src, size_t __n) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + const void *__restrict __src, size_t __n) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern size_t strlen (const char *__s) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + +extern size_t strnlen (const char *__string, size_t __maxlen) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + +extern char *strerror (int __errnum) noexcept (true); +# 444 "/usr/riscv64-linux-gnu/include/string.h" 3 +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); + + + + +extern const char *strerrordesc_np (int __err) noexcept (true); + +extern const char *strerrorname_np (int __err) noexcept (true); + + + + + +extern char *strerror_l (int __errnum, locale_t __l) noexcept (true); + + + +# 1 "/usr/riscv64-linux-gnu/include/strings.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/strings.h" 3 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 24 "/usr/riscv64-linux-gnu/include/strings.h" 2 3 + + + + + + +extern "C" { + + + +extern int bcmp (const void *__s1, const void *__s2, size_t __n) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void bcopy (const void *__src, void *__dest, size_t __n) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern void bzero (void *__s, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern "C++" +{ +extern char *index (char *__s, int __c) + noexcept (true) __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern const char *index (const char *__s, int __c) + noexcept (true) __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * +index (char *__s, int __c) noexcept (true) +{ + return __builtin_index (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * +index (const char *__s, int __c) noexcept (true) +{ + return __builtin_index (__s, __c); +} + +} + + + + + + + +extern "C++" +{ +extern char *rindex (char *__s, int __c) + noexcept (true) __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern const char *rindex (const char *__s, int __c) + noexcept (true) __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * +rindex (char *__s, int __c) noexcept (true) +{ + return __builtin_rindex (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * +rindex (const char *__s, int __c) noexcept (true) +{ + return __builtin_rindex (__s, __c); +} + +} +# 104 "/usr/riscv64-linux-gnu/include/strings.h" 3 +extern int ffs (int __i) noexcept (true) __attribute__ ((__const__)); + + + + + +extern int ffsl (long int __l) noexcept (true) __attribute__ ((__const__)); +__extension__ extern int ffsll (long long int __ll) + noexcept (true) __attribute__ ((__const__)); + + + +extern int strcasecmp (const char *__s1, const char *__s2) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + + + +extern int strncasecmp_l (const char *__s1, const char *__s2, + size_t __n, locale_t __loc) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); + + +} + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/strings_fortified.h" 1 3 +# 22 "/usr/riscv64-linux-gnu/include/bits/strings_fortified.h" 3 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void +__attribute__ ((__leaf__)) bcopy (const void *__src, void *__dest, size_t __len) noexcept (true) +{ + (void) __builtin___memmove_chk (__dest, __src, __len, + __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void +__attribute__ ((__leaf__)) bzero (void *__dest, size_t __len) noexcept (true) +{ + (void) __builtin___memset_chk (__dest, '\0', __len, + __builtin_object_size (__dest, 0)); +} +# 145 "/usr/riscv64-linux-gnu/include/strings.h" 2 3 +# 463 "/usr/riscv64-linux-gnu/include/string.h" 2 3 + + + +extern void explicit_bzero (void *__s, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1))) + __attribute__ ((__access__ (__write_only__, 1, 2))); + + + +extern char *strsep (char **__restrict __stringp, + const char *__restrict __delim) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strsignal (int __sig) noexcept (true); + + + +extern const char *sigabbrev_np (int __sig) noexcept (true); + + +extern const char *sigdescr_np (int __sig) noexcept (true); + + + +extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + +extern char *__stpncpy (char *__restrict __dest, + const char *__restrict __src, size_t __n) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + const char *__restrict __src, size_t __n) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int strverscmp (const char *__s1, const char *__s2) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strfry (char *__string) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern void *memfrob (void *__s, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1))) + __attribute__ ((__access__ (__read_write__, 1, 2))); + + + + + + + +extern "C++" char *basename (char *__filename) + noexcept (true) __asm ("basename") __attribute__ ((__nonnull__ (1))); +extern "C++" const char *basename (const char *__filename) + noexcept (true) __asm ("basename") __attribute__ ((__nonnull__ (1))); +# 535 "/usr/riscv64-linux-gnu/include/string.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/string_fortified.h" 1 3 +# 25 "/usr/riscv64-linux-gnu/include/bits/string_fortified.h" 3 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * +__attribute__ ((__leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) noexcept (true) + +{ + return __builtin___memcpy_chk (__dest, __src, __len, + __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * +__attribute__ ((__leaf__)) memmove (void *__dest, const void *__src, size_t __len) noexcept (true) +{ + return __builtin___memmove_chk (__dest, __src, __len, + __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * +__attribute__ ((__leaf__)) mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) noexcept (true) + +{ + return __builtin___mempcpy_chk (__dest, __src, __len, + __builtin_object_size (__dest, 0)); +} +# 56 "/usr/riscv64-linux-gnu/include/bits/string_fortified.h" 3 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * +__attribute__ ((__leaf__)) memset (void *__dest, int __ch, size_t __len) noexcept (true) +{ + return __builtin___memset_chk (__dest, __ch, __len, + __builtin_object_size (__dest, 0)); +} + + + + +void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void +__attribute__ ((__leaf__)) explicit_bzero (void *__dest, size_t __len) noexcept (true) +{ + __explicit_bzero_chk (__dest, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src) noexcept (true) +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__leaf__)) stpcpy (char *__restrict __dest, const char *__restrict __src) noexcept (true) +{ + return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len) noexcept (true) + +{ + return __builtin___strncpy_chk (__dest, __src, __len, + __builtin_object_size (__dest, 2 > 1)); +} + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__leaf__)) stpncpy (char *__dest, const char *__src, size_t __n) noexcept (true) +{ + return __builtin___stpncpy_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1)); +} +# 127 "/usr/riscv64-linux-gnu/include/bits/string_fortified.h" 3 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__leaf__)) strcat (char *__restrict __dest, const char *__restrict __src) noexcept (true) +{ + return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len) noexcept (true) + +{ + return __builtin___strncat_chk (__dest, __src, __len, + __builtin_object_size (__dest, 2 > 1)); +} +# 536 "/usr/riscv64-linux-gnu/include/string.h" 2 3 + + + +} +# 36 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 + +# 1 "/usr/riscv64-linux-gnu/include/c++/11/stdlib.h" 1 3 +# 36 "/usr/riscv64-linux-gnu/include/c++/11/stdlib.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/c++/11/cstdlib" 1 3 +# 39 "/usr/riscv64-linux-gnu/include/c++/11/cstdlib" 3 + +# 40 "/usr/riscv64-linux-gnu/include/c++/11/cstdlib" 3 + +# 1 "/usr/riscv64-linux-gnu/include/c++/11/riscv64-linux-gnu/bits/c++config.h" 1 3 +# 278 "/usr/riscv64-linux-gnu/include/c++/11/riscv64-linux-gnu/bits/c++config.h" 3 +namespace std +{ + typedef long unsigned int size_t; + typedef long int ptrdiff_t; + + + typedef decltype(nullptr) nullptr_t; + +} +# 300 "/usr/riscv64-linux-gnu/include/c++/11/riscv64-linux-gnu/bits/c++config.h" 3 +namespace std +{ + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } +} +namespace __gnu_cxx +{ + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } +} +# 586 "/usr/riscv64-linux-gnu/include/c++/11/riscv64-linux-gnu/bits/c++config.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/c++/11/riscv64-linux-gnu/bits/os_defines.h" 1 3 +# 587 "/usr/riscv64-linux-gnu/include/c++/11/riscv64-linux-gnu/bits/c++config.h" 2 3 + + +# 1 "/usr/riscv64-linux-gnu/include/c++/11/riscv64-linux-gnu/bits/cpu_defines.h" 1 3 +# 590 "/usr/riscv64-linux-gnu/include/c++/11/riscv64-linux-gnu/bits/c++config.h" 2 3 +# 42 "/usr/riscv64-linux-gnu/include/c++/11/cstdlib" 2 3 +# 75 "/usr/riscv64-linux-gnu/include/c++/11/cstdlib" 3 +# 1 "/usr/riscv64-linux-gnu/include/stdlib.h" 1 3 +# 26 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/libc-header-start.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/stdlib.h" 2 3 + + + + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 33 "/usr/riscv64-linux-gnu/include/stdlib.h" 2 3 + +extern "C" { + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/waitflags.h" 1 3 +# 41 "/usr/riscv64-linux-gnu/include/stdlib.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/waitstatus.h" 1 3 +# 42 "/usr/riscv64-linux-gnu/include/stdlib.h" 2 3 +# 59 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +typedef struct + { + int quot; + int rem; + } div_t; + + + +typedef struct + { + long int quot; + long int rem; + } ldiv_t; + + + + + +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; +# 98 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern size_t __ctype_get_mb_cur_max (void) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + +extern double atof (const char *__nptr) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern int atoi (const char *__nptr) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long int atol (const char *__nptr) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +__extension__ extern long long int atoll (const char *__nptr) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern double strtod (const char *__restrict __nptr, + char **__restrict __endptr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern float strtof (const char *__restrict __nptr, + char **__restrict __endptr) noexcept (true) __attribute__ ((__nonnull__ (1))); + +extern long double strtold (const char *__restrict __nptr, + char **__restrict __endptr) + noexcept (true) __attribute__ ((__nonnull__ (1))); +# 141 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern _Float32 strtof32 (const char *__restrict __nptr, + char **__restrict __endptr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern _Float64 strtof64 (const char *__restrict __nptr, + char **__restrict __endptr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern _Float128 strtof128 (const char *__restrict __nptr, + char **__restrict __endptr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern _Float32x strtof32x (const char *__restrict __nptr, + char **__restrict __endptr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern _Float64x strtof64x (const char *__restrict __nptr, + char **__restrict __endptr) + noexcept (true) __attribute__ ((__nonnull__ (1))); +# 177 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern long int strtol (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + noexcept (true) __attribute__ ((__nonnull__ (1))); + +extern unsigned long int strtoul (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +__extension__ +extern long long int strtoq (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + noexcept (true) __attribute__ ((__nonnull__ (1))); + +__extension__ +extern unsigned long long int strtouq (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + +__extension__ +extern long long int strtoll (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + noexcept (true) __attribute__ ((__nonnull__ (1))); + +__extension__ +extern unsigned long long int strtoull (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + +extern int strfromd (char *__dest, size_t __size, const char *__format, + double __f) + noexcept (true) __attribute__ ((__nonnull__ (3))); + +extern int strfromf (char *__dest, size_t __size, const char *__format, + float __f) + noexcept (true) __attribute__ ((__nonnull__ (3))); + +extern int strfroml (char *__dest, size_t __size, const char *__format, + long double __f) + noexcept (true) __attribute__ ((__nonnull__ (3))); +# 233 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern int strfromf32 (char *__dest, size_t __size, const char * __format, + _Float32 __f) + noexcept (true) __attribute__ ((__nonnull__ (3))); + + + +extern int strfromf64 (char *__dest, size_t __size, const char * __format, + _Float64 __f) + noexcept (true) __attribute__ ((__nonnull__ (3))); + + + +extern int strfromf128 (char *__dest, size_t __size, const char * __format, + _Float128 __f) + noexcept (true) __attribute__ ((__nonnull__ (3))); + + + +extern int strfromf32x (char *__dest, size_t __size, const char * __format, + _Float32x __f) + noexcept (true) __attribute__ ((__nonnull__ (3))); + + + +extern int strfromf64x (char *__dest, size_t __size, const char * __format, + _Float64x __f) + noexcept (true) __attribute__ ((__nonnull__ (3))); +# 275 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern long int strtol_l (const char *__restrict __nptr, + char **__restrict __endptr, int __base, + locale_t __loc) noexcept (true) __attribute__ ((__nonnull__ (1, 4))); + +extern unsigned long int strtoul_l (const char *__restrict __nptr, + char **__restrict __endptr, + int __base, locale_t __loc) + noexcept (true) __attribute__ ((__nonnull__ (1, 4))); + +__extension__ +extern long long int strtoll_l (const char *__restrict __nptr, + char **__restrict __endptr, int __base, + locale_t __loc) + noexcept (true) __attribute__ ((__nonnull__ (1, 4))); + +__extension__ +extern unsigned long long int strtoull_l (const char *__restrict __nptr, + char **__restrict __endptr, + int __base, locale_t __loc) + noexcept (true) __attribute__ ((__nonnull__ (1, 4))); + +extern double strtod_l (const char *__restrict __nptr, + char **__restrict __endptr, locale_t __loc) + noexcept (true) __attribute__ ((__nonnull__ (1, 3))); + +extern float strtof_l (const char *__restrict __nptr, + char **__restrict __endptr, locale_t __loc) + noexcept (true) __attribute__ ((__nonnull__ (1, 3))); + +extern long double strtold_l (const char *__restrict __nptr, + char **__restrict __endptr, + locale_t __loc) + noexcept (true) __attribute__ ((__nonnull__ (1, 3))); +# 317 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern _Float32 strtof32_l (const char *__restrict __nptr, + char **__restrict __endptr, + locale_t __loc) + noexcept (true) __attribute__ ((__nonnull__ (1, 3))); + + + +extern _Float64 strtof64_l (const char *__restrict __nptr, + char **__restrict __endptr, + locale_t __loc) + noexcept (true) __attribute__ ((__nonnull__ (1, 3))); + + + +extern _Float128 strtof128_l (const char *__restrict __nptr, + char **__restrict __endptr, + locale_t __loc) + noexcept (true) __attribute__ ((__nonnull__ (1, 3))); + + + +extern _Float32x strtof32x_l (const char *__restrict __nptr, + char **__restrict __endptr, + locale_t __loc) + noexcept (true) __attribute__ ((__nonnull__ (1, 3))); + + + +extern _Float64x strtof64x_l (const char *__restrict __nptr, + char **__restrict __endptr, + locale_t __loc) + noexcept (true) __attribute__ ((__nonnull__ (1, 3))); +# 361 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__leaf__)) atoi (const char *__nptr) noexcept (true) +{ + return (int) strtol (__nptr, (char **) __null, 10); +} +extern __inline __attribute__ ((__gnu_inline__)) long int +__attribute__ ((__leaf__)) atol (const char *__nptr) noexcept (true) +{ + return strtol (__nptr, (char **) __null, 10); +} + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int +__attribute__ ((__leaf__)) atoll (const char *__nptr) noexcept (true) +{ + return strtoll (__nptr, (char **) __null, 10); +} +# 386 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern char *l64a (long int __n) noexcept (true) __attribute__ ((__warn_unused_result__)); + + +extern long int a64l (const char *__s) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +# 1 "/usr/riscv64-linux-gnu/include/sys/types.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/sys/types.h" 3 +extern "C" { + + + + + +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; + + +typedef __loff_t loff_t; + + + + +typedef __ino_t ino_t; + + + + + + +typedef __ino64_t ino64_t; + + + + +typedef __dev_t dev_t; + + + + +typedef __gid_t gid_t; + + + + +typedef __mode_t mode_t; + + + + +typedef __nlink_t nlink_t; + + + + +typedef __uid_t uid_t; +# 97 "/usr/riscv64-linux-gnu/include/sys/types.h" 3 +typedef __pid_t pid_t; + + + + + +typedef __id_t id_t; +# 114 "/usr/riscv64-linux-gnu/include/sys/types.h" 3 +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; + + + + + +typedef __key_t key_t; + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/clock_t.h" 1 3 + + + + + + +typedef __clock_t clock_t; +# 127 "/usr/riscv64-linux-gnu/include/sys/types.h" 2 3 + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/clockid_t.h" 1 3 + + + + + + +typedef __clockid_t clockid_t; +# 129 "/usr/riscv64-linux-gnu/include/sys/types.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/time_t.h" 1 3 +# 10 "/usr/riscv64-linux-gnu/include/bits/types/time_t.h" 3 +typedef __time_t time_t; +# 130 "/usr/riscv64-linux-gnu/include/sys/types.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/timer_t.h" 1 3 + + + + + + +typedef __timer_t timer_t; +# 131 "/usr/riscv64-linux-gnu/include/sys/types.h" 2 3 + + + +typedef __useconds_t useconds_t; + + + +typedef __suseconds_t suseconds_t; + + + + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 145 "/usr/riscv64-linux-gnu/include/sys/types.h" 2 3 + + + +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; + + + + + + + +typedef __uint8_t u_int8_t; +typedef __uint16_t u_int16_t; +typedef __uint32_t u_int32_t; +typedef __uint64_t u_int64_t; + + +typedef int register_t __attribute__ ((__mode__ (__word__))); +# 176 "/usr/riscv64-linux-gnu/include/sys/types.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/endian.h" 1 3 +# 35 "/usr/riscv64-linux-gnu/include/endian.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/byteswap.h" 1 3 +# 33 "/usr/riscv64-linux-gnu/include/bits/byteswap.h" 3 +static __inline __uint16_t +__bswap_16 (__uint16_t __bsx) +{ + + return __builtin_bswap16 (__bsx); + + + +} + + + + + + +static __inline __uint32_t +__bswap_32 (__uint32_t __bsx) +{ + + return __builtin_bswap32 (__bsx); + + + +} +# 69 "/usr/riscv64-linux-gnu/include/bits/byteswap.h" 3 +__extension__ static __inline __uint64_t +__bswap_64 (__uint64_t __bsx) +{ + + return __builtin_bswap64 (__bsx); + + + +} +# 36 "/usr/riscv64-linux-gnu/include/endian.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/uintn-identity.h" 1 3 +# 32 "/usr/riscv64-linux-gnu/include/bits/uintn-identity.h" 3 +static __inline __uint16_t +__uint16_identity (__uint16_t __x) +{ + return __x; +} + +static __inline __uint32_t +__uint32_identity (__uint32_t __x) +{ + return __x; +} + +static __inline __uint64_t +__uint64_identity (__uint64_t __x) +{ + return __x; +} +# 37 "/usr/riscv64-linux-gnu/include/endian.h" 2 3 +# 177 "/usr/riscv64-linux-gnu/include/sys/types.h" 2 3 + + +# 1 "/usr/riscv64-linux-gnu/include/sys/select.h" 1 3 +# 30 "/usr/riscv64-linux-gnu/include/sys/select.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/select.h" 1 3 +# 31 "/usr/riscv64-linux-gnu/include/sys/select.h" 2 3 + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/sigset_t.h" 1 3 + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/__sigset_t.h" 1 3 + + + + +typedef struct +{ + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; +} __sigset_t; +# 5 "/usr/riscv64-linux-gnu/include/bits/types/sigset_t.h" 2 3 + + +typedef __sigset_t sigset_t; +# 34 "/usr/riscv64-linux-gnu/include/sys/select.h" 2 3 + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/struct_timeval.h" 1 3 + + + + + + + +struct timeval +{ + + + + + __time_t tv_sec; + __suseconds_t tv_usec; + +}; +# 38 "/usr/riscv64-linux-gnu/include/sys/select.h" 2 3 + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/struct_timespec.h" 1 3 +# 11 "/usr/riscv64-linux-gnu/include/bits/types/struct_timespec.h" 3 +struct timespec +{ + + + + __time_t tv_sec; + + + + + __syscall_slong_t tv_nsec; +# 31 "/usr/riscv64-linux-gnu/include/bits/types/struct_timespec.h" 3 +}; +# 40 "/usr/riscv64-linux-gnu/include/sys/select.h" 2 3 +# 49 "/usr/riscv64-linux-gnu/include/sys/select.h" 3 +typedef long int __fd_mask; +# 59 "/usr/riscv64-linux-gnu/include/sys/select.h" 3 +typedef struct + { + + + + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; + + + + + + } fd_set; + + + + + + +typedef __fd_mask fd_mask; +# 91 "/usr/riscv64-linux-gnu/include/sys/select.h" 3 +extern "C" { +# 102 "/usr/riscv64-linux-gnu/include/sys/select.h" 3 +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +# 127 "/usr/riscv64-linux-gnu/include/sys/select.h" 3 +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); +# 150 "/usr/riscv64-linux-gnu/include/sys/select.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/select2.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/select2.h" 3 +extern long int __fdelt_chk (long int __d); +extern long int __fdelt_warn (long int __d) + __attribute__((__warning__ ("bit outside of fd_set selected"))); +# 151 "/usr/riscv64-linux-gnu/include/sys/select.h" 2 3 + + +} +# 180 "/usr/riscv64-linux-gnu/include/sys/types.h" 2 3 + + + + + +typedef __blksize_t blksize_t; + + + + + + +typedef __blkcnt_t blkcnt_t; + + + +typedef __fsblkcnt_t fsblkcnt_t; + + + +typedef __fsfilcnt_t fsfilcnt_t; +# 219 "/usr/riscv64-linux-gnu/include/sys/types.h" 3 +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/pthreadtypes.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/bits/pthreadtypes.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/thread-shared-types.h" 1 3 +# 44 "/usr/riscv64-linux-gnu/include/bits/thread-shared-types.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/pthreadtypes-arch.h" 1 3 +# 45 "/usr/riscv64-linux-gnu/include/bits/thread-shared-types.h" 2 3 + +# 1 "/usr/riscv64-linux-gnu/include/bits/atomic_wide_counter.h" 1 3 +# 25 "/usr/riscv64-linux-gnu/include/bits/atomic_wide_counter.h" 3 +typedef union +{ + __extension__ unsigned long long int __value64; + struct + { + unsigned int __low; + unsigned int __high; + } __value32; +} __atomic_wide_counter; +# 47 "/usr/riscv64-linux-gnu/include/bits/thread-shared-types.h" 2 3 + + + + +typedef struct __pthread_internal_list +{ + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +} __pthread_list_t; + +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; +# 76 "/usr/riscv64-linux-gnu/include/bits/thread-shared-types.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/struct_mutex.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/bits/struct_mutex.h" 3 +struct __pthread_mutex_s +{ + int __lock ; + unsigned int __count; + int __owner; + + unsigned int __nusers; +# 58 "/usr/riscv64-linux-gnu/include/bits/struct_mutex.h" 3 + int __kind; + + + + + int __spins; + __pthread_list_t __list; +# 74 "/usr/riscv64-linux-gnu/include/bits/struct_mutex.h" 3 +}; +# 77 "/usr/riscv64-linux-gnu/include/bits/thread-shared-types.h" 2 3 +# 89 "/usr/riscv64-linux-gnu/include/bits/thread-shared-types.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/struct_rwlock.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/bits/struct_rwlock.h" 3 +struct __pthread_rwlock_arch_t +{ + unsigned int __readers; + unsigned int __writers; + unsigned int __wrphase_futex; + unsigned int __writers_futex; + unsigned int __pad3; + unsigned int __pad4; + + int __cur_writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + unsigned int __flags; +# 55 "/usr/riscv64-linux-gnu/include/bits/struct_rwlock.h" 3 +}; +# 90 "/usr/riscv64-linux-gnu/include/bits/thread-shared-types.h" 2 3 + + + + +struct __pthread_cond_s +{ + __atomic_wide_counter __wseq; + __atomic_wide_counter __g1_start; + unsigned int __g_refs[2] ; + unsigned int __g_size[2]; + unsigned int __g1_orig_size; + unsigned int __wrefs; + unsigned int __g_signals[2]; +}; + +typedef unsigned int __tss_t; +typedef unsigned long int __thrd_t; + +typedef struct +{ + int __data ; +} __once_flag; +# 24 "/usr/riscv64-linux-gnu/include/bits/pthreadtypes.h" 2 3 + + + +typedef unsigned long int pthread_t; + + + + +typedef union +{ + char __size[4]; + int __align; +} pthread_mutexattr_t; + + + + +typedef union +{ + char __size[4]; + int __align; +} pthread_condattr_t; + + + +typedef unsigned int pthread_key_t; + + + +typedef int pthread_once_t; + + +union pthread_attr_t +{ + char __size[56]; + long int __align; +}; + +typedef union pthread_attr_t pthread_attr_t; + + + + +typedef union +{ + struct __pthread_mutex_s __data; + char __size[40]; + long int __align; +} pthread_mutex_t; + + +typedef union +{ + struct __pthread_cond_s __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; + + + + + +typedef union +{ + struct __pthread_rwlock_arch_t __data; + char __size[56]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; + + + + + +typedef volatile int pthread_spinlock_t; + + + + +typedef union +{ + char __size[32]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +# 228 "/usr/riscv64-linux-gnu/include/sys/types.h" 2 3 + + +} +# 396 "/usr/riscv64-linux-gnu/include/stdlib.h" 2 3 + + + + + + +extern long int random (void) noexcept (true); + + +extern void srandom (unsigned int __seed) noexcept (true); + + + + + +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) noexcept (true) __attribute__ ((__nonnull__ (2))); + + + +extern char *setstate (char *__statebuf) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + + + +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; + +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + noexcept (true) __attribute__ ((__nonnull__ (2))); + +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + noexcept (true) __attribute__ ((__nonnull__ (2, 4))); + +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int rand (void) noexcept (true); + +extern void srand (unsigned int __seed) noexcept (true); + + + +extern int rand_r (unsigned int *__seed) noexcept (true); + + + + + + + +extern double drand48 (void) noexcept (true); +extern double erand48 (unsigned short int __xsubi[3]) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern long int lrand48 (void) noexcept (true); +extern long int nrand48 (unsigned short int __xsubi[3]) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern long int mrand48 (void) noexcept (true); +extern long int jrand48 (unsigned short int __xsubi[3]) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern void srand48 (long int __seedval) noexcept (true); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + noexcept (true) __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + __extension__ unsigned long long int __a; + + }; + + +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + noexcept (true) __attribute__ ((__nonnull__ (2))); + +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern void *malloc (size_t __size) noexcept (true) __attribute__ ((__malloc__)) + __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__)); + +extern void *calloc (size_t __nmemb, size_t __size) + noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + + + +extern void *realloc (void *__ptr, size_t __size) + noexcept (true) __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2))); + + +extern void free (void *__ptr) noexcept (true); + + + + + + + +extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) + noexcept (true) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__alloc_size__ (2, 3))) + __attribute__ ((__malloc__ (__builtin_free, 1))); + + +extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) + noexcept (true) __attribute__ ((__malloc__ (reallocarray, 1))); + + + +# 1 "/usr/riscv64-linux-gnu/include/alloca.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/alloca.h" 3 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 25 "/usr/riscv64-linux-gnu/include/alloca.h" 2 3 + +extern "C" { + + + + + +extern void *alloca (size_t __size) noexcept (true); + + + + + +} +# 575 "/usr/riscv64-linux-gnu/include/stdlib.h" 2 3 + + + + + +extern void *valloc (size_t __size) noexcept (true) __attribute__ ((__malloc__)) + __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern void *aligned_alloc (size_t __alignment, size_t __size) + noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__alloc_align__ (1))) + __attribute__ ((__alloc_size__ (2))) __attribute__ ((__warn_unused_result__)); + + + +extern void abort (void) noexcept (true) __attribute__ ((__noreturn__)); + + + +extern int atexit (void (*__func) (void)) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + +extern "C++" int at_quick_exit (void (*__func) (void)) + noexcept (true) __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); +# 617 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + +extern void exit (int __status) noexcept (true) __attribute__ ((__noreturn__)); + + + + + +extern void quick_exit (int __status) noexcept (true) __attribute__ ((__noreturn__)); + + + + + +extern void _Exit (int __status) noexcept (true) __attribute__ ((__noreturn__)); + + + + +extern char *getenv (const char *__name) noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *secure_getenv (const char *__name) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int putenv (char *__string) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + +extern int setenv (const char *__name, const char *__value, int __replace) + noexcept (true) __attribute__ ((__nonnull__ (2))); + + +extern int unsetenv (const char *__name) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int clearenv (void) noexcept (true); +# 682 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern char *mktemp (char *__template) noexcept (true) __attribute__ ((__nonnull__ (1))); +# 695 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 705 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 717 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 727 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 738 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern char *mkdtemp (char *__template) noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 749 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 759 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 769 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern int mkostemps (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 781 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 791 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern int system (const char *__command) __attribute__ ((__warn_unused_result__)); + + + + + +extern char *canonicalize_file_name (const char *__name) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__malloc__)) + __attribute__ ((__malloc__ (__builtin_free, 1))) __attribute__ ((__warn_unused_result__)); +# 808 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern char *realpath (const char *__restrict __name, + char *__restrict __resolved) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + + + +typedef int (*__compar_fn_t) (const void *, const void *); + + +typedef __compar_fn_t comparison_fn_t; + + + +typedef int (*__compar_d_fn_t) (const void *, const void *, void *); + + + + +extern void *bsearch (const void *__key, const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); + + +# 1 "/usr/riscv64-linux-gnu/include/bits/stdlib-bsearch.h" 1 3 +# 19 "/usr/riscv64-linux-gnu/include/bits/stdlib-bsearch.h" 3 +extern __inline __attribute__ ((__gnu_inline__)) void * +bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) +{ + size_t __l, __u, __idx; + const void *__p; + int __comparison; + + __l = 0; + __u = __nmemb; + while (__l < __u) + { + __idx = (__l + __u) / 2; + __p = (const void *) (((const char *) __base) + (__idx * __size)); + __comparison = (*__compar) (__key, __p); + if (__comparison < 0) + __u = __idx; + else if (__comparison > 0) + __l = __idx + 1; + else + { + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" + + return (void *) __p; + +#pragma GCC diagnostic pop + + } + } + + return __null; +} +# 834 "/usr/riscv64-linux-gnu/include/stdlib.h" 2 3 + + + + +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); + +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); + + + + +extern int abs (int __x) noexcept (true) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) noexcept (true) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + +__extension__ extern long long int llabs (long long int __x) + noexcept (true) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + + + +extern div_t div (int __numer, int __denom) + noexcept (true) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + noexcept (true) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + noexcept (true) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +# 880 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) noexcept (true) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) noexcept (true) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *gcvt (double __value, int __ndigit, char *__buf) + noexcept (true) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + noexcept (true) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + noexcept (true) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + noexcept (true) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) noexcept (true) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) noexcept (true) __attribute__ ((__nonnull__ (3, 4, 5))); + +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + noexcept (true) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + noexcept (true) __attribute__ ((__nonnull__ (3, 4, 5))); + + + + + +extern int mblen (const char *__s, size_t __n) noexcept (true); + + +extern int mbtowc (wchar_t *__restrict __pwc, + const char *__restrict __s, size_t __n) noexcept (true); + + +extern int wctomb (char *__s, wchar_t __wchar) noexcept (true); + + + +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + const char *__restrict __s, size_t __n) noexcept (true) + __attribute__ ((__access__ (__read_only__, 2))); + +extern size_t wcstombs (char *__restrict __s, + const wchar_t *__restrict __pwcs, size_t __n) + noexcept (true) + __attribute__ ((__access__ (__write_only__, 1, 3))) + __attribute__ ((__access__ (__read_only__, 2))); + + + + + + +extern int rpmatch (const char *__response) noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 967 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +extern int getsubopt (char **__restrict __optionp, + char *const *__restrict __tokens, + char **__restrict __valuep) + noexcept (true) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int grantpt (int __fd) noexcept (true); + + + +extern int unlockpt (int __fd) noexcept (true); + + + + +extern char *ptsname (int __fd) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3))); + + +extern int getpt (void); + + + + + + +extern int getloadavg (double __loadavg[], int __nelem) + noexcept (true) __attribute__ ((__nonnull__ (1))); +# 1023 "/usr/riscv64-linux-gnu/include/stdlib.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/stdlib-float.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/stdlib-float.h" 3 +extern __inline __attribute__ ((__gnu_inline__)) double +__attribute__ ((__leaf__)) atof (const char *__nptr) noexcept (true) +{ + return strtod (__nptr, (char **) __null); +} +# 1024 "/usr/riscv64-linux-gnu/include/stdlib.h" 2 3 + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/stdlib.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/bits/stdlib.h" 3 +extern char *__realpath_chk (const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) noexcept (true) __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) noexcept (true) __asm__ ("" "realpath") + + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) noexcept (true) __asm__ ("" "__realpath_chk") + + + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved) noexcept (true) +{ + size_t sz = __builtin_object_size (__resolved, 2 > 1); + + if (sz == (size_t) -1) + return __realpath_alias (__name, __resolved); + + + + + + return __realpath_chk (__name, __resolved, sz); +} + + +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) noexcept (true) __attribute__ ((__nonnull__ (2))) + __attribute__ ((__access__ (__write_only__, 2, 3))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) noexcept (true) __asm__ ("" "ptsname_r") + + __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) noexcept (true) __asm__ ("" "__ptsname_r_chk") + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen) noexcept (true) +{ + return ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __ptsname_r_alias (__fd, __buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)))) + + ; +} + + +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + noexcept (true) __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) noexcept (true) __asm__ ("" "wctomb") + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int +__attribute__ ((__leaf__)) wctomb (char *__s, wchar_t __wchar) noexcept (true) +{ + + + + + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 + && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} + + +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + const char *__restrict __src, + size_t __len, size_t __dstlen) noexcept (true) + __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2))); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) noexcept (true) __asm__ ("" "mbstowcs") + + + + __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2))); +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) noexcept (true) __asm__ ("" "__mbstowcs_chk") + + + + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t +__attribute__ ((__leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) noexcept (true) + +{ + return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) ? __mbstowcs_alias (__dst, __src, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) ? __mbstowcs_chk_warn (__dst, __src, __len, (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t))) : __mbstowcs_chk (__dst, __src, __len, (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t))))) + + ; +} + + +extern size_t __wcstombs_chk (char *__restrict __dst, + const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) noexcept (true) + __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2))); +extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) noexcept (true) __asm__ ("" "wcstombs") + + + + __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2))); +extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) noexcept (true) __asm__ ("" "__wcstombs_chk") + + + + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t +__attribute__ ((__leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) noexcept (true) + +{ + return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) ? __wcstombs_alias (__dst, __src, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) ? __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)) : __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)))) + + ; +} +# 1028 "/usr/riscv64-linux-gnu/include/stdlib.h" 2 3 + + + + + + + +} +# 76 "/usr/riscv64-linux-gnu/include/c++/11/cstdlib" 2 3 + +# 1 "/usr/riscv64-linux-gnu/include/c++/11/bits/std_abs.h" 1 3 +# 33 "/usr/riscv64-linux-gnu/include/c++/11/bits/std_abs.h" 3 + +# 34 "/usr/riscv64-linux-gnu/include/c++/11/bits/std_abs.h" 3 +# 46 "/usr/riscv64-linux-gnu/include/c++/11/bits/std_abs.h" 3 +extern "C++" +{ +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + using ::abs; + + + inline long + abs(long __i) { return __builtin_labs(__i); } + + + + inline long long + abs(long long __x) { return __builtin_llabs (__x); } +# 70 "/usr/riscv64-linux-gnu/include/c++/11/bits/std_abs.h" 3 + inline constexpr double + abs(double __x) + { return __builtin_fabs(__x); } + + inline constexpr float + abs(float __x) + { return __builtin_fabsf(__x); } + + inline constexpr long double + abs(long double __x) + { return __builtin_fabsl(__x); } +# 107 "/usr/riscv64-linux-gnu/include/c++/11/bits/std_abs.h" 3 + +} +} +# 78 "/usr/riscv64-linux-gnu/include/c++/11/cstdlib" 2 3 +# 121 "/usr/riscv64-linux-gnu/include/c++/11/cstdlib" 3 +extern "C++" +{ +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + using ::div_t; + using ::ldiv_t; + + using ::abort; + + + + using ::atexit; + + + using ::at_quick_exit; + + + using ::atof; + using ::atoi; + using ::atol; + using ::bsearch; + using ::calloc; + using ::div; + using ::exit; + using ::free; + using ::getenv; + using ::labs; + using ::ldiv; + using ::malloc; + + using ::mblen; + using ::mbstowcs; + using ::mbtowc; + + using ::qsort; + + + using ::quick_exit; + + + using ::rand; + using ::realloc; + using ::srand; + using ::strtod; + using ::strtol; + using ::strtoul; + using ::system; + + using ::wcstombs; + using ::wctomb; + + + + inline ldiv_t + div(long __i, long __j) { return ldiv(__i, __j); } + + + + +} +# 195 "/usr/riscv64-linux-gnu/include/c++/11/cstdlib" 3 +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + + + + using ::lldiv_t; + + + + + + using ::_Exit; + + + + using ::llabs; + + inline lldiv_t + div(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + + using ::lldiv; +# 227 "/usr/riscv64-linux-gnu/include/c++/11/cstdlib" 3 + using ::atoll; + using ::strtoll; + using ::strtoull; + + using ::strtof; + using ::strtold; + + +} + +namespace std +{ + + using ::__gnu_cxx::lldiv_t; + + using ::__gnu_cxx::_Exit; + + using ::__gnu_cxx::llabs; + using ::__gnu_cxx::div; + using ::__gnu_cxx::lldiv; + + using ::__gnu_cxx::atoll; + using ::__gnu_cxx::strtof; + using ::__gnu_cxx::strtoll; + using ::__gnu_cxx::strtoull; + using ::__gnu_cxx::strtold; +} + + + +} +# 37 "/usr/riscv64-linux-gnu/include/c++/11/stdlib.h" 2 3 + +using std::abort; +using std::atexit; +using std::exit; + + + using std::at_quick_exit; + + + using std::quick_exit; + + + + +using std::div_t; +using std::ldiv_t; + +using std::abs; +using std::atof; +using std::atoi; +using std::atol; +using std::bsearch; +using std::calloc; +using std::div; +using std::free; +using std::getenv; +using std::labs; +using std::ldiv; +using std::malloc; + +using std::mblen; +using std::mbstowcs; +using std::mbtowc; + +using std::qsort; +using std::rand; +using std::realloc; +using std::srand; +using std::strtod; +using std::strtol; +using std::strtoul; +using std::system; + +using std::wcstombs; +using std::wctomb; +# 40 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 +# 1 "/usr/riscv64-linux-gnu/include/wchar.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/libc-header-start.h" 1 3 +# 28 "/usr/riscv64-linux-gnu/include/wchar.h" 2 3 + + + + + + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 36 "/usr/riscv64-linux-gnu/include/wchar.h" 2 3 + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/wint_t.h" 1 3 +# 20 "/usr/riscv64-linux-gnu/include/bits/types/wint_t.h" 3 +typedef unsigned int wint_t; +# 42 "/usr/riscv64-linux-gnu/include/wchar.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/mbstate_t.h" 1 3 + + + + + +typedef __mbstate_t mbstate_t; +# 43 "/usr/riscv64-linux-gnu/include/wchar.h" 2 3 +# 79 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern "C" { + + + +struct tm; + + + +extern wchar_t *wcscpy (wchar_t *__restrict __dest, + const wchar_t *__restrict __src) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern wchar_t *wcsncpy (wchar_t *__restrict __dest, + const wchar_t *__restrict __src, size_t __n) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern wchar_t *wcscat (wchar_t *__restrict __dest, + const wchar_t *__restrict __src) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + +extern wchar_t *wcsncat (wchar_t *__restrict __dest, + const wchar_t *__restrict __src, size_t __n) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) noexcept (true); + + +extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, + size_t __n) noexcept (true); + + + +extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2, + locale_t __loc) noexcept (true); + +extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2, + size_t __n, locale_t __loc) noexcept (true); + + + + +extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) noexcept (true); + + + +extern size_t wcsxfrm (wchar_t *__restrict __s1, + const wchar_t *__restrict __s2, size_t __n) noexcept (true); + + + + + + + +extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2, + locale_t __loc) noexcept (true); + + + + +extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, + size_t __n, locale_t __loc) noexcept (true); + + +extern wchar_t *wcsdup (const wchar_t *__s) noexcept (true) + __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (__builtin_free, 1))); + + + + +extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) + noexcept (true) __asm ("wcschr") __attribute__ ((__pure__)); +extern "C++" const wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) + noexcept (true) __asm ("wcschr") __attribute__ ((__pure__)); + + + + + + +extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) + noexcept (true) __asm ("wcsrchr") __attribute__ ((__pure__)); +extern "C++" const wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) + noexcept (true) __asm ("wcsrchr") __attribute__ ((__pure__)); +# 182 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc) + noexcept (true) __attribute__ ((__pure__)); + + + + +extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) + noexcept (true) __attribute__ ((__pure__)); + + +extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) + noexcept (true) __attribute__ ((__pure__)); + + +extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, const wchar_t *__accept) + noexcept (true) __asm ("wcspbrk") __attribute__ ((__pure__)); +extern "C++" const wchar_t *wcspbrk (const wchar_t *__wcs, + const wchar_t *__accept) + noexcept (true) __asm ("wcspbrk") __attribute__ ((__pure__)); + + + + + + +extern "C++" wchar_t *wcsstr (wchar_t *__haystack, const wchar_t *__needle) + noexcept (true) __asm ("wcsstr") __attribute__ ((__pure__)); +extern "C++" const wchar_t *wcsstr (const wchar_t *__haystack, + const wchar_t *__needle) + noexcept (true) __asm ("wcsstr") __attribute__ ((__pure__)); + + + + + + +extern wchar_t *wcstok (wchar_t *__restrict __s, + const wchar_t *__restrict __delim, + wchar_t **__restrict __ptr) noexcept (true); + + +extern size_t wcslen (const wchar_t *__s) noexcept (true) __attribute__ ((__pure__)); + + + + +extern "C++" wchar_t *wcswcs (wchar_t *__haystack, const wchar_t *__needle) + noexcept (true) __asm ("wcswcs") __attribute__ ((__pure__)); +extern "C++" const wchar_t *wcswcs (const wchar_t *__haystack, + const wchar_t *__needle) + noexcept (true) __asm ("wcswcs") __attribute__ ((__pure__)); +# 241 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) + noexcept (true) __attribute__ ((__pure__)); + + + + + +extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) + noexcept (true) __asm ("wmemchr") __attribute__ ((__pure__)); +extern "C++" const wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, + size_t __n) + noexcept (true) __asm ("wmemchr") __attribute__ ((__pure__)); + + + + + + +extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + noexcept (true) __attribute__ ((__pure__)); + + +extern wchar_t *wmemcpy (wchar_t *__restrict __s1, + const wchar_t *__restrict __s2, size_t __n) noexcept (true); + + + +extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) + noexcept (true); + + +extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) noexcept (true); + + + + +extern wchar_t *wmempcpy (wchar_t *__restrict __s1, + const wchar_t *__restrict __s2, size_t __n) + noexcept (true); + + + + + +extern wint_t btowc (int __c) noexcept (true); + + + +extern int wctob (wint_t __c) noexcept (true); + + + +extern int mbsinit (const mbstate_t *__ps) noexcept (true) __attribute__ ((__pure__)); + + + +extern size_t mbrtowc (wchar_t *__restrict __pwc, + const char *__restrict __s, size_t __n, + mbstate_t *__restrict __p) noexcept (true); + + +extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, + mbstate_t *__restrict __ps) noexcept (true); + + +extern size_t __mbrlen (const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) noexcept (true); +extern size_t mbrlen (const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) noexcept (true); + + + + + + + +extern wint_t __btowc_alias (int __c) __asm ("btowc"); +extern __inline __attribute__ ((__gnu_inline__)) wint_t +__attribute__ ((__leaf__)) btowc (int __c) noexcept (true) +{ return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' + ? (wint_t) __c : __btowc_alias (__c)); } + +extern int __wctob_alias (wint_t __c) __asm ("wctob"); +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__leaf__)) wctob (wint_t __wc) noexcept (true) +{ return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' + ? (int) __wc : __wctob_alias (__wc)); } + +extern __inline __attribute__ ((__gnu_inline__)) size_t +__attribute__ ((__leaf__)) mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) noexcept (true) + +{ return (__ps != __null + ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } + + + + +extern size_t mbsrtowcs (wchar_t *__restrict __dst, + const char **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) noexcept (true); + + + +extern size_t wcsrtombs (char *__restrict __dst, + const wchar_t **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) noexcept (true); + + + + + +extern size_t mbsnrtowcs (wchar_t *__restrict __dst, + const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps) noexcept (true); + + + +extern size_t wcsnrtombs (char *__restrict __dst, + const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps) noexcept (true); + + + + + + +extern int wcwidth (wchar_t __c) noexcept (true); + + + +extern int wcswidth (const wchar_t *__s, size_t __n) noexcept (true); + + + + + +extern double wcstod (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) noexcept (true); + + + +extern float wcstof (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) noexcept (true); +extern long double wcstold (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) noexcept (true); +# 397 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern _Float32 wcstof32 (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) noexcept (true); + + + +extern _Float64 wcstof64 (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) noexcept (true); + + + +extern _Float128 wcstof128 (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) noexcept (true); + + + +extern _Float32x wcstof32x (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) noexcept (true); + + + +extern _Float64x wcstof64x (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) noexcept (true); +# 429 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern long int wcstol (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) noexcept (true); + + + +extern unsigned long int wcstoul (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + noexcept (true); + + + + +__extension__ +extern long long int wcstoll (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + noexcept (true); + + + +__extension__ +extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) noexcept (true); + + + + + +__extension__ +extern long long int wcstoq (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + noexcept (true); + + + +__extension__ +extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) noexcept (true); + + + + + + +extern long int wcstol_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base, + locale_t __loc) noexcept (true); + +extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, locale_t __loc) noexcept (true); + +__extension__ +extern long long int wcstoll_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, locale_t __loc) noexcept (true); + +__extension__ +extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, locale_t __loc) + noexcept (true); + +extern double wcstod_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, locale_t __loc) + noexcept (true); + +extern float wcstof_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, locale_t __loc) + noexcept (true); + +extern long double wcstold_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + locale_t __loc) noexcept (true); +# 512 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern _Float32 wcstof32_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + locale_t __loc) noexcept (true); + + + +extern _Float64 wcstof64_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + locale_t __loc) noexcept (true); + + + +extern _Float128 wcstof128_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + locale_t __loc) noexcept (true); + + + +extern _Float32x wcstof32x_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + locale_t __loc) noexcept (true); + + + +extern _Float64x wcstof64x_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + locale_t __loc) noexcept (true); +# 552 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern wchar_t *wcpcpy (wchar_t *__restrict __dest, + const wchar_t *__restrict __src) noexcept (true); + + + +extern wchar_t *wcpncpy (wchar_t *__restrict __dest, + const wchar_t *__restrict __src, size_t __n) + noexcept (true); +# 581 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) noexcept (true) + __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))); + + + + + +extern int fwide (__FILE *__fp, int __mode) noexcept (true); + + + + + + +extern int fwprintf (__FILE *__restrict __stream, + const wchar_t *__restrict __format, ...) + ; + + + + +extern int wprintf (const wchar_t *__restrict __format, ...) + ; + +extern int swprintf (wchar_t *__restrict __s, size_t __n, + const wchar_t *__restrict __format, ...) + noexcept (true) ; + + + + + +extern int vfwprintf (__FILE *__restrict __s, + const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + + + + +extern int vwprintf (const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + + +extern int vswprintf (wchar_t *__restrict __s, size_t __n, + const wchar_t *__restrict __format, + __gnuc_va_list __arg) + noexcept (true) ; + + + + + + +extern int fwscanf (__FILE *__restrict __stream, + const wchar_t *__restrict __format, ...) + ; + + + + +extern int wscanf (const wchar_t *__restrict __format, ...) + ; + +extern int swscanf (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, ...) + noexcept (true) ; +# 657 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern int fwscanf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...) __asm__ ("" "__isoc99_fwscanf") + + + ; +extern int wscanf (const wchar_t *__restrict __format, ...) __asm__ ("" "__isoc99_wscanf") + + ; +extern int swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) noexcept (true) __asm__ ("" "__isoc99_swscanf") + + + ; +# 688 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern int vfwscanf (__FILE *__restrict __s, + const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + + + + +extern int vwscanf (const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + +extern int vswscanf (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, + __gnuc_va_list __arg) + noexcept (true) ; + + + + + + + +extern int vfwscanf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfwscanf") + + + ; +extern int vwscanf (const wchar_t *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vwscanf") + + ; +extern int vswscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) noexcept (true) __asm__ ("" "__isoc99_vswscanf") + + + ; +# 744 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern wint_t fgetwc (__FILE *__stream); +extern wint_t getwc (__FILE *__stream); + + + + + +extern wint_t getwchar (void); + + + + + + +extern wint_t fputwc (wchar_t __wc, __FILE *__stream); +extern wint_t putwc (wchar_t __wc, __FILE *__stream); + + + + + +extern wint_t putwchar (wchar_t __wc); + + + + + + + +extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); + + + + + +extern int fputws (const wchar_t *__restrict __ws, + __FILE *__restrict __stream); + + + + + + +extern wint_t ungetwc (wint_t __wc, __FILE *__stream); +# 799 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern wint_t getwc_unlocked (__FILE *__stream); +extern wint_t getwchar_unlocked (void); + + + + + + + +extern wint_t fgetwc_unlocked (__FILE *__stream); + + + + + + + +extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); +# 825 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); +extern wint_t putwchar_unlocked (wchar_t __wc); +# 835 "/usr/riscv64-linux-gnu/include/wchar.h" 3 +extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); + + + + + + + +extern int fputws_unlocked (const wchar_t *__restrict __ws, + __FILE *__restrict __stream); + + + + + + +extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, + const wchar_t *__restrict __format, + const struct tm *__restrict __tp) noexcept (true); + + + + +extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, + const wchar_t *__restrict __format, + const struct tm *__restrict __tp, + locale_t __loc) noexcept (true); + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/wchar2.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/wchar2.h" 3 +extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1, + const wchar_t *__restrict __s2, size_t __n, + size_t __ns1) noexcept (true); +extern wchar_t *__wmemcpy_alias (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) noexcept (true) __asm__ ("" "wmemcpy") + + + ; +extern wchar_t *__wmemcpy_chk_warn (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n, size_t __ns1) noexcept (true) __asm__ ("" "__wmemcpy_chk") + + + + __attribute__((__warning__ ("wmemcpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * +__attribute__ ((__leaf__)) wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) noexcept (true) + +{ + return ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t)))) && (((long unsigned int) (__n)) <= (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t)))) ? __wmemcpy_alias (__s1, __s2, __n) : ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__n)) <= (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t)))) ? __wmemcpy_chk_warn (__s1, __s2, __n, (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t))) : __wmemcpy_chk (__s1, __s2, __n, (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t))))) + + ; +} + + +extern wchar_t *__wmemmove_chk (wchar_t *__s1, const wchar_t *__s2, + size_t __n, size_t __ns1) noexcept (true); +extern wchar_t *__wmemmove_alias (wchar_t *__s1, const wchar_t *__s2, size_t __n) noexcept (true) __asm__ ("" "wmemmove") + + ; +extern wchar_t *__wmemmove_chk_warn (wchar_t *__s1, const wchar_t *__s2, size_t __n, size_t __ns1) noexcept (true) __asm__ ("" "__wmemmove_chk") + + + __attribute__((__warning__ ("wmemmove called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * +__attribute__ ((__leaf__)) wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) noexcept (true) +{ + return ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t)))) && (((long unsigned int) (__n)) <= (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t)))) ? __wmemmove_alias (__s1, __s2, __n) : ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__n)) <= (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t)))) ? __wmemmove_chk_warn (__s1, __s2, __n, (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t))) : __wmemmove_chk (__s1, __s2, __n, (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t))))) + + ; +} + + + +extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1, + const wchar_t *__restrict __s2, size_t __n, + size_t __ns1) noexcept (true); +extern wchar_t *__wmempcpy_alias (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) noexcept (true) __asm__ ("" "wmempcpy") + + + ; +extern wchar_t *__wmempcpy_chk_warn (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n, size_t __ns1) noexcept (true) __asm__ ("" "__wmempcpy_chk") + + + + __attribute__((__warning__ ("wmempcpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * +__attribute__ ((__leaf__)) wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) noexcept (true) + +{ + return ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t)))) && (((long unsigned int) (__n)) <= (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t)))) ? __wmempcpy_alias (__s1, __s2, __n) : ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__n)) <= (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t)))) ? __wmempcpy_chk_warn (__s1, __s2, __n, (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t))) : __wmempcpy_chk (__s1, __s2, __n, (__builtin_object_size (__s1, 0)) / (sizeof (wchar_t))))) + + ; +} + + + +extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, + size_t __ns) noexcept (true); +extern wchar_t *__wmemset_alias (wchar_t *__s, wchar_t __c, size_t __n) noexcept (true) __asm__ ("" "wmemset") + ; +extern wchar_t *__wmemset_chk_warn (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) noexcept (true) __asm__ ("" "__wmemset_chk") + + + __attribute__((__warning__ ("wmemset called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * +__attribute__ ((__leaf__)) wmemset (wchar_t *__s, wchar_t __c, size_t __n) noexcept (true) +{ + return ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (__builtin_object_size (__s, 0)) / (sizeof (wchar_t)))) && (((long unsigned int) (__n)) <= (__builtin_object_size (__s, 0)) / (sizeof (wchar_t)))) ? __wmemset_alias (__s, __c, __n) : ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (__builtin_object_size (__s, 0)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__n)) <= (__builtin_object_size (__s, 0)) / (sizeof (wchar_t)))) ? __wmemset_chk_warn (__s, __c, __n, (__builtin_object_size (__s, 0)) / (sizeof (wchar_t))) : __wmemset_chk (__s, __c, __n, (__builtin_object_size (__s, 0)) / (sizeof (wchar_t))))) + + ; +} + + +extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest, + const wchar_t *__restrict __src, + size_t __n) noexcept (true); +extern wchar_t *__wcscpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src) noexcept (true) __asm__ ("" "wcscpy") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * +__attribute__ ((__leaf__)) wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) noexcept (true) +{ + size_t sz = __builtin_object_size (__dest, 2 > 1); + if (sz != (size_t) -1) + return __wcscpy_chk (__dest, __src, sz / sizeof (wchar_t)); + return __wcscpy_alias (__dest, __src); +} + + +extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest, + const wchar_t *__restrict __src, + size_t __destlen) noexcept (true); +extern wchar_t *__wcpcpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src) noexcept (true) __asm__ ("" "wcpcpy") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * +__attribute__ ((__leaf__)) wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) noexcept (true) +{ + size_t sz = __builtin_object_size (__dest, 2 > 1); + if (sz != (size_t) -1) + return __wcpcpy_chk (__dest, __src, sz / sizeof (wchar_t)); + return __wcpcpy_alias (__dest, __src); +} + + +extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest, + const wchar_t *__restrict __src, size_t __n, + size_t __destlen) noexcept (true); +extern wchar_t *__wcsncpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) __asm__ ("" "wcsncpy") + + + ; +extern wchar_t *__wcsncpy_chk_warn (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen) noexcept (true) __asm__ ("" "__wcsncpy_chk") + + + + __attribute__((__warning__ ("wcsncpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * +__attribute__ ((__leaf__)) wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) + +{ + return ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (__builtin_object_size (__dest, 2 > 1)) / (sizeof (wchar_t)))) && (((long unsigned int) (__n)) <= (__builtin_object_size (__dest, 2 > 1)) / (sizeof (wchar_t)))) ? __wcsncpy_alias (__dest, __src, __n) : ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (__builtin_object_size (__dest, 2 > 1)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__n)) <= (__builtin_object_size (__dest, 2 > 1)) / (sizeof (wchar_t)))) ? __wcsncpy_chk_warn (__dest, __src, __n, (__builtin_object_size (__dest, 2 > 1)) / (sizeof (wchar_t))) : __wcsncpy_chk (__dest, __src, __n, (__builtin_object_size (__dest, 2 > 1)) / (sizeof (wchar_t))))) + + ; +} + + +extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest, + const wchar_t *__restrict __src, size_t __n, + size_t __destlen) noexcept (true); +extern wchar_t *__wcpncpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) __asm__ ("" "wcpncpy") + + + ; +extern wchar_t *__wcpncpy_chk_warn (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen) noexcept (true) __asm__ ("" "__wcpncpy_chk") + + + + __attribute__((__warning__ ("wcpncpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * +__attribute__ ((__leaf__)) wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) + +{ + return ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (__builtin_object_size (__dest, 2 > 1)) / (sizeof (wchar_t)))) && (((long unsigned int) (__n)) <= (__builtin_object_size (__dest, 2 > 1)) / (sizeof (wchar_t)))) ? __wcpncpy_alias (__dest, __src, __n) : ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (__builtin_object_size (__dest, 2 > 1)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__n)) <= (__builtin_object_size (__dest, 2 > 1)) / (sizeof (wchar_t)))) ? __wcpncpy_chk_warn (__dest, __src, __n, (__builtin_object_size (__dest, 2 > 1)) / (sizeof (wchar_t))) : __wcpncpy_chk (__dest, __src, __n, (__builtin_object_size (__dest, 2 > 1)) / (sizeof (wchar_t))))) + + ; +} + + +extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest, + const wchar_t *__restrict __src, + size_t __destlen) noexcept (true); +extern wchar_t *__wcscat_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src) noexcept (true) __asm__ ("" "wcscat") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * +__attribute__ ((__leaf__)) wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src) noexcept (true) +{ + size_t sz = __builtin_object_size (__dest, 2 > 1); + if (sz != (size_t) -1) + return __wcscat_chk (__dest, __src, sz / sizeof (wchar_t)); + return __wcscat_alias (__dest, __src); +} + + +extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest, + const wchar_t *__restrict __src, + size_t __n, size_t __destlen) noexcept (true); +extern wchar_t *__wcsncat_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) __asm__ ("" "wcsncat") + + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * +__attribute__ ((__leaf__)) wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) + +{ + size_t sz = __builtin_object_size (__dest, 2 > 1); + if (sz != (size_t) -1) + return __wcsncat_chk (__dest, __src, __n, sz / sizeof (wchar_t)); + return __wcsncat_alias (__dest, __src, __n); +} + + +extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n, + int __flag, size_t __s_len, + const wchar_t *__restrict __format, ...) + noexcept (true) ; + +extern int __swprintf_alias (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, ...) noexcept (true) __asm__ ("" "swprintf") + + + ; + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) swprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, ...) noexcept (true) + +{ + size_t sz = __builtin_object_size (__s, 2 > 1); + if (sz != (size_t) -1 || 2 > 1) + return __swprintf_chk (__s, __n, 2 - 1, + sz / sizeof (wchar_t), __fmt, __builtin_va_arg_pack ()); + return __swprintf_alias (__s, __n, __fmt, __builtin_va_arg_pack ()); +} +# 261 "/usr/riscv64-linux-gnu/include/bits/wchar2.h" 3 +extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, + int __flag, size_t __s_len, + const wchar_t *__restrict __format, + __gnuc_va_list __arg) + noexcept (true) ; + +extern int __vswprintf_alias (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, __gnuc_va_list __ap) noexcept (true) __asm__ ("" "vswprintf") + + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) vswprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, __gnuc_va_list __ap) noexcept (true) + +{ + size_t sz = __builtin_object_size (__s, 2 > 1); + if (sz != (size_t) -1 || 2 > 1) + return __vswprintf_chk (__s, __n, 2 - 1, + sz / sizeof (wchar_t), __fmt, __ap); + return __vswprintf_alias (__s, __n, __fmt, __ap); +} + + + + +extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag, + const wchar_t *__restrict __format, ...); +extern int __wprintf_chk (int __flag, const wchar_t *__restrict __format, + ...); +extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, + const wchar_t *__restrict __format, + __gnuc_va_list __ap); +extern int __vwprintf_chk (int __flag, const wchar_t *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +wprintf (const wchar_t *__restrict __fmt, ...) +{ + return __wprintf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +fwprintf (__FILE *__restrict __stream, const wchar_t *__restrict __fmt, ...) +{ + return __fwprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +vwprintf (const wchar_t *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vwprintf_chk (2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +vfwprintf (__FILE *__restrict __stream, + const wchar_t *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfwprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + + +extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n, + __FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws") + + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * +fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) +{ + size_t sz = __builtin_object_size (__s, 2 > 1); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (wchar_t)))) && (((long unsigned int) (__n)) <= (sz) / (sizeof (wchar_t))))) + return __fgetws_alias (__s, __n, __stream); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (wchar_t)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (wchar_t))))) + return __fgetws_chk_warn (__s, sz / sizeof (wchar_t), __n, __stream); + return __fgetws_chk (__s, sz / sizeof (wchar_t), __n, __stream); +} + + +extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size, + int __n, __FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_unlocked_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_unlocked_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_unlocked_chk") + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * +fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) +{ + size_t sz = __builtin_object_size (__s, 2 > 1); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (wchar_t)))) && (((long unsigned int) (__n)) <= (sz) / (sizeof (wchar_t))))) + return __fgetws_unlocked_alias (__s, __n, __stream); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (wchar_t)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (wchar_t))))) + return __fgetws_unlocked_chk_warn (__s, sz / sizeof (wchar_t), __n, + __stream); + return __fgetws_unlocked_chk (__s, sz / sizeof (wchar_t), __n, __stream); +} + + + +extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar, + mbstate_t *__restrict __p, + size_t __buflen) noexcept (true) __attribute__ ((__warn_unused_result__)); +extern size_t __wcrtomb_alias (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) noexcept (true) __asm__ ("" "wcrtomb") + + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t +__attribute__ ((__leaf__)) wcrtomb (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) noexcept (true) + +{ + + + + + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 + && 16 > __builtin_object_size (__s, 2 > 1)) + return __wcrtomb_chk (__s, __wchar, __ps, __builtin_object_size (__s, 2 > 1)); + return __wcrtomb_alias (__s, __wchar, __ps); +} + + +extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst, + const char **__restrict __src, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) noexcept (true); +extern size_t __mbsrtowcs_alias (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) noexcept (true) __asm__ ("" "mbsrtowcs") + + + + ; +extern size_t __mbsrtowcs_chk_warn (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) noexcept (true) __asm__ ("" "__mbsrtowcs_chk") + + + + + __attribute__((__warning__ ("mbsrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t +__attribute__ ((__leaf__)) mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) noexcept (true) + +{ + return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) ? __mbsrtowcs_alias (__dst, __src, __len, __ps) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) ? __mbsrtowcs_chk_warn (__dst, __src, __len, __ps, (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t))) : __mbsrtowcs_chk (__dst, __src, __len, __ps, (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t))))) + + ; +} + + +extern size_t __wcsrtombs_chk (char *__restrict __dst, + const wchar_t **__restrict __src, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) noexcept (true); +extern size_t __wcsrtombs_alias (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) noexcept (true) __asm__ ("" "wcsrtombs") + + + + ; +extern size_t __wcsrtombs_chk_warn (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) noexcept (true) __asm__ ("" "__wcsrtombs_chk") + + + + + __attribute__((__warning__ ("wcsrtombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t +__attribute__ ((__leaf__)) wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) noexcept (true) + +{ + return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) ? __wcsrtombs_alias (__dst, __src, __len, __ps) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) ? __wcsrtombs_chk_warn (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)) : __wcsrtombs_chk (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)))) + + ; +} + + + +extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst, + const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) noexcept (true); +extern size_t __mbsnrtowcs_alias (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) noexcept (true) __asm__ ("" "mbsnrtowcs") + + + + ; +extern size_t __mbsnrtowcs_chk_warn (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) noexcept (true) __asm__ ("" "__mbsnrtowcs_chk") + + + + + __attribute__((__warning__ ("mbsnrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t +__attribute__ ((__leaf__)) mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) noexcept (true) + +{ + return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) ? __mbsnrtowcs_alias (__dst, __src, __nmc, __len, __ps) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) ? __mbsnrtowcs_chk_warn (__dst, __src, __nmc, __len, __ps, (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t))) : __mbsnrtowcs_chk (__dst, __src, __nmc, __len, __ps, (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t))))) + + ; +} + + +extern size_t __wcsnrtombs_chk (char *__restrict __dst, + const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps, size_t __dstlen) + noexcept (true); +extern size_t __wcsnrtombs_alias (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) noexcept (true) __asm__ ("" "wcsnrtombs") + + + + ; +extern size_t __wcsnrtombs_chk_warn (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) noexcept (true) __asm__ ("" "__wcsnrtombs_chk") + + + + + + __attribute__((__warning__ ("wcsnrtombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t +__attribute__ ((__leaf__)) wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) noexcept (true) + +{ + return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) ? __wcsnrtombs_alias (__dst, __src, __nwc, __len, __ps) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) ? __wcsnrtombs_chk_warn (__dst, __src, __nwc, __len, __ps, __builtin_object_size (__dst, 2 > 1)) : __wcsnrtombs_chk (__dst, __src, __nwc, __len, __ps, __builtin_object_size (__dst, 2 > 1)))) + + ; +} +# 868 "/usr/riscv64-linux-gnu/include/wchar.h" 2 3 + + + + + + + +} +# 41 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 + +# 1 "/usr/riscv64-linux-gnu/include/c++/11/math.h" 1 3 +# 36 "/usr/riscv64-linux-gnu/include/c++/11/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/c++/11/cmath" 1 3 +# 39 "/usr/riscv64-linux-gnu/include/c++/11/cmath" 3 + +# 40 "/usr/riscv64-linux-gnu/include/c++/11/cmath" 3 + + +# 1 "/usr/riscv64-linux-gnu/include/c++/11/bits/cpp_type_traits.h" 1 3 +# 35 "/usr/riscv64-linux-gnu/include/c++/11/bits/cpp_type_traits.h" 3 + +# 36 "/usr/riscv64-linux-gnu/include/c++/11/bits/cpp_type_traits.h" 3 +# 67 "/usr/riscv64-linux-gnu/include/c++/11/bits/cpp_type_traits.h" 3 +extern "C++" { + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + struct __true_type { }; + struct __false_type { }; + + template + struct __truth_type + { typedef __false_type __type; }; + + template<> + struct __truth_type + { typedef __true_type __type; }; + + + + template + struct __traitor + { + enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; + typedef typename __truth_type<__value>::__type __type; + }; + + + template + struct __are_same + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __are_same<_Tp, _Tp> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template + struct __is_void + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_void + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_integer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; +# 184 "/usr/riscv64-linux-gnu/include/c++/11/bits/cpp_type_traits.h" 3 + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; +# 287 "/usr/riscv64-linux-gnu/include/c++/11/bits/cpp_type_traits.h" 3 + template + struct __is_floating + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_pointer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __is_pointer<_Tp*> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_arithmetic + : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > + { }; + + + + + template + struct __is_scalar + : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > + { }; + + + + + template + struct __is_char + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template + struct __is_byte + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; +# 423 "/usr/riscv64-linux-gnu/include/c++/11/bits/cpp_type_traits.h" 3 + template struct iterator_traits; + + + template + struct __is_nonvolatile_trivially_copyable + { + enum { __value = __is_trivially_copyable(_Tp) }; + }; + + + + + template + struct __is_nonvolatile_trivially_copyable + { + enum { __value = 0 }; + }; + + + template + struct __memcpyable + { + enum { __value = 0 }; + }; + + template + struct __memcpyable<_Tp*, _Tp*> + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + template + struct __memcpyable<_Tp*, const _Tp*> + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + + + + + + template + struct __memcmpable + { + enum { __value = 0 }; + }; + + + template + struct __memcmpable<_Tp*, _Tp*> + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + template + struct __memcmpable + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + template + struct __memcmpable<_Tp*, const _Tp*> + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + + + + + + + template::__value + + > + struct __is_memcmp_ordered + { + static const bool __value = _Tp(-1) > _Tp(1); + }; + + template + struct __is_memcmp_ordered<_Tp, false> + { + static const bool __value = false; + }; + + + template + struct __is_memcmp_ordered_with + { + static const bool __value = __is_memcmp_ordered<_Tp>::__value + && __is_memcmp_ordered<_Up>::__value; + }; + + template + struct __is_memcmp_ordered_with<_Tp, _Up, false> + { + static const bool __value = false; + }; +# 548 "/usr/riscv64-linux-gnu/include/c++/11/bits/cpp_type_traits.h" 3 + template + struct __is_move_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + + template + + inline _Iterator + __miter_base(_Iterator __it) + { return __it; } + + +} +} +# 43 "/usr/riscv64-linux-gnu/include/c++/11/cmath" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/c++/11/ext/type_traits.h" 1 3 +# 32 "/usr/riscv64-linux-gnu/include/c++/11/ext/type_traits.h" 3 + +# 33 "/usr/riscv64-linux-gnu/include/c++/11/ext/type_traits.h" 3 + + + + +extern "C++" { + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + + + + template + struct __enable_if + { }; + + template + struct __enable_if + { typedef _Tp __type; }; + + + + template + struct __conditional_type + { typedef _Iftrue __type; }; + + template + struct __conditional_type + { typedef _Iffalse __type; }; + + + + template + struct __add_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + + public: + typedef typename __if_type::__type __type; + }; + + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + + template<> + struct __add_unsigned + { typedef unsigned short __type; }; + + template<> + struct __add_unsigned + { typedef unsigned int __type; }; + + template<> + struct __add_unsigned + { typedef unsigned long __type; }; + + template<> + struct __add_unsigned + { typedef unsigned long long __type; }; + + + template<> + struct __add_unsigned; + + template<> + struct __add_unsigned; + + + + template + struct __remove_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + + public: + typedef typename __if_type::__type __type; + }; + + template<> + struct __remove_unsigned + { typedef signed char __type; }; + + template<> + struct __remove_unsigned + { typedef signed char __type; }; + + template<> + struct __remove_unsigned + { typedef short __type; }; + + template<> + struct __remove_unsigned + { typedef int __type; }; + + template<> + struct __remove_unsigned + { typedef long __type; }; + + template<> + struct __remove_unsigned + { typedef long long __type; }; + + + template<> + struct __remove_unsigned; + + template<> + struct __remove_unsigned; + + + + template + inline bool + __is_null_pointer(_Type* __ptr) + { return __ptr == 0; } + + template + inline bool + __is_null_pointer(_Type) + { return false; } + + + inline bool + __is_null_pointer(std::nullptr_t) + { return true; } + + + + + template::__value> + struct __promote + { typedef double __type; }; + + + + + template + struct __promote<_Tp, false> + { }; + + template<> + struct __promote + { typedef long double __type; }; + + template<> + struct __promote + { typedef double __type; }; + + template<> + struct __promote + { typedef float __type; }; + + + + + + + template::__type, + typename _Up2 = typename __promote<_Up>::__type> + struct __promote_2 + { + typedef __typeof__(_Tp2() + _Up2()) __type; + }; + + template::__type, + typename _Up2 = typename __promote<_Up>::__type, + typename _Vp2 = typename __promote<_Vp>::__type> + struct __promote_3 + { + typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; + }; + + template::__type, + typename _Up2 = typename __promote<_Up>::__type, + typename _Vp2 = typename __promote<_Vp>::__type, + typename _Wp2 = typename __promote<_Wp>::__type> + struct __promote_4 + { + typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; + }; + + +} +} +# 44 "/usr/riscv64-linux-gnu/include/c++/11/cmath" 2 3 + +# 1 "/usr/riscv64-linux-gnu/include/math.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/libc-header-start.h" 1 3 +# 28 "/usr/riscv64-linux-gnu/include/math.h" 2 3 + + + + + + +extern "C" { + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/math-vector.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/bits/math-vector.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/libm-simd-decl-stubs.h" 1 3 +# 28 "/usr/riscv64-linux-gnu/include/bits/math-vector.h" 2 3 +# 41 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 152 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/flt-eval-method.h" 1 3 +# 153 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 163 "/usr/riscv64-linux-gnu/include/math.h" 3 +typedef float float_t; +typedef double double_t; +# 204 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/fp-logb.h" 1 3 +# 205 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 247 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/fp-fast.h" 1 3 +# 248 "/usr/riscv64-linux-gnu/include/math.h" 2 3 + + + +enum + { + FP_INT_UPWARD = + + 0, + FP_INT_DOWNWARD = + + 1, + FP_INT_TOWARDZERO = + + 2, + FP_INT_TONEARESTFROMZERO = + + 3, + FP_INT_TONEAREST = + + 4, + }; +# 312 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-helper-functions.h" 1 3 +# 20 "/usr/riscv64-linux-gnu/include/bits/mathcalls-helper-functions.h" 3 +extern int __fpclassify (double __value) noexcept (true) + __attribute__ ((__const__)); + + +extern int __signbit (double __value) noexcept (true) + __attribute__ ((__const__)); + + + +extern int __isinf (double __value) noexcept (true) + __attribute__ ((__const__)); + + +extern int __finite (double __value) noexcept (true) + __attribute__ ((__const__)); + + +extern int __isnan (double __value) noexcept (true) + __attribute__ ((__const__)); + + +extern int __iseqsig (double __x, double __y) noexcept (true); + + +extern int __issignaling (double __value) noexcept (true) + __attribute__ ((__const__)); +# 313 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 1 3 +# 53 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 + extern double acos (double __x) noexcept (true); extern double __acos (double __x) noexcept (true); + + extern double asin (double __x) noexcept (true); extern double __asin (double __x) noexcept (true); + + extern double atan (double __x) noexcept (true); extern double __atan (double __x) noexcept (true); + + extern double atan2 (double __y, double __x) noexcept (true); extern double __atan2 (double __y, double __x) noexcept (true); + + + extern double cos (double __x) noexcept (true); extern double __cos (double __x) noexcept (true); + + extern double sin (double __x) noexcept (true); extern double __sin (double __x) noexcept (true); + + extern double tan (double __x) noexcept (true); extern double __tan (double __x) noexcept (true); + + + + + extern double cosh (double __x) noexcept (true); extern double __cosh (double __x) noexcept (true); + + extern double sinh (double __x) noexcept (true); extern double __sinh (double __x) noexcept (true); + + extern double tanh (double __x) noexcept (true); extern double __tanh (double __x) noexcept (true); + + + + extern void sincos (double __x, double *__sinx, double *__cosx) noexcept (true); extern void __sincos (double __x, double *__sinx, double *__cosx) noexcept (true) + ; + + + + + extern double acosh (double __x) noexcept (true); extern double __acosh (double __x) noexcept (true); + + extern double asinh (double __x) noexcept (true); extern double __asinh (double __x) noexcept (true); + + extern double atanh (double __x) noexcept (true); extern double __atanh (double __x) noexcept (true); + + + + + + extern double exp (double __x) noexcept (true); extern double __exp (double __x) noexcept (true); + + +extern double frexp (double __x, int *__exponent) noexcept (true); extern double __frexp (double __x, int *__exponent) noexcept (true); + + +extern double ldexp (double __x, int __exponent) noexcept (true); extern double __ldexp (double __x, int __exponent) noexcept (true); + + + extern double log (double __x) noexcept (true); extern double __log (double __x) noexcept (true); + + + extern double log10 (double __x) noexcept (true); extern double __log10 (double __x) noexcept (true); + + +extern double modf (double __x, double *__iptr) noexcept (true); extern double __modf (double __x, double *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + extern double exp10 (double __x) noexcept (true); extern double __exp10 (double __x) noexcept (true); + + + + + extern double expm1 (double __x) noexcept (true); extern double __expm1 (double __x) noexcept (true); + + + extern double log1p (double __x) noexcept (true); extern double __log1p (double __x) noexcept (true); + + +extern double logb (double __x) noexcept (true); extern double __logb (double __x) noexcept (true); + + + + + extern double exp2 (double __x) noexcept (true); extern double __exp2 (double __x) noexcept (true); + + + extern double log2 (double __x) noexcept (true); extern double __log2 (double __x) noexcept (true); + + + + + + + extern double pow (double __x, double __y) noexcept (true); extern double __pow (double __x, double __y) noexcept (true); + + +extern double sqrt (double __x) noexcept (true); extern double __sqrt (double __x) noexcept (true); + + + + extern double hypot (double __x, double __y) noexcept (true); extern double __hypot (double __x, double __y) noexcept (true); + + + + + extern double cbrt (double __x) noexcept (true); extern double __cbrt (double __x) noexcept (true); + + + + + + +extern double ceil (double __x) noexcept (true) __attribute__ ((__const__)); extern double __ceil (double __x) noexcept (true) __attribute__ ((__const__)); + + +extern double fabs (double __x) noexcept (true) __attribute__ ((__const__)); extern double __fabs (double __x) noexcept (true) __attribute__ ((__const__)); + + +extern double floor (double __x) noexcept (true) __attribute__ ((__const__)); extern double __floor (double __x) noexcept (true) __attribute__ ((__const__)); + + +extern double fmod (double __x, double __y) noexcept (true); extern double __fmod (double __x, double __y) noexcept (true); +# 183 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern int finite (double __value) noexcept (true) + __attribute__ ((__const__)); + + +extern double drem (double __x, double __y) noexcept (true); extern double __drem (double __x, double __y) noexcept (true); + + + +extern double significand (double __x) noexcept (true); extern double __significand (double __x) noexcept (true); + + + + + + +extern double copysign (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern double nan (const char *__tagb) noexcept (true); extern double __nan (const char *__tagb) noexcept (true); +# 220 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern double j0 (double) noexcept (true); extern double __j0 (double) noexcept (true); +extern double j1 (double) noexcept (true); extern double __j1 (double) noexcept (true); +extern double jn (int, double) noexcept (true); extern double __jn (int, double) noexcept (true); +extern double y0 (double) noexcept (true); extern double __y0 (double) noexcept (true); +extern double y1 (double) noexcept (true); extern double __y1 (double) noexcept (true); +extern double yn (int, double) noexcept (true); extern double __yn (int, double) noexcept (true); + + + + + + extern double erf (double) noexcept (true); extern double __erf (double) noexcept (true); + extern double erfc (double) noexcept (true); extern double __erfc (double) noexcept (true); +extern double lgamma (double) noexcept (true); extern double __lgamma (double) noexcept (true); + + + + +extern double tgamma (double) noexcept (true); extern double __tgamma (double) noexcept (true); + + + + + +extern double gamma (double) noexcept (true); extern double __gamma (double) noexcept (true); + + + + + + + +extern double lgamma_r (double, int *__signgamp) noexcept (true); extern double __lgamma_r (double, int *__signgamp) noexcept (true); + + + + + + +extern double rint (double __x) noexcept (true); extern double __rint (double __x) noexcept (true); + + +extern double nextafter (double __x, double __y) noexcept (true); extern double __nextafter (double __x, double __y) noexcept (true); + +extern double nexttoward (double __x, long double __y) noexcept (true); extern double __nexttoward (double __x, long double __y) noexcept (true); + + + + +extern double nextdown (double __x) noexcept (true); extern double __nextdown (double __x) noexcept (true); + +extern double nextup (double __x) noexcept (true); extern double __nextup (double __x) noexcept (true); + + + +extern double remainder (double __x, double __y) noexcept (true); extern double __remainder (double __x, double __y) noexcept (true); + + + +extern double scalbn (double __x, int __n) noexcept (true); extern double __scalbn (double __x, int __n) noexcept (true); + + + +extern int ilogb (double __x) noexcept (true); extern int __ilogb (double __x) noexcept (true); + + + + +extern long int llogb (double __x) noexcept (true); extern long int __llogb (double __x) noexcept (true); + + + + +extern double scalbln (double __x, long int __n) noexcept (true); extern double __scalbln (double __x, long int __n) noexcept (true); + + + +extern double nearbyint (double __x) noexcept (true); extern double __nearbyint (double __x) noexcept (true); + + + +extern double round (double __x) noexcept (true) __attribute__ ((__const__)); extern double __round (double __x) noexcept (true) __attribute__ ((__const__)); + + + +extern double trunc (double __x) noexcept (true) __attribute__ ((__const__)); extern double __trunc (double __x) noexcept (true) __attribute__ ((__const__)); + + + + +extern double remquo (double __x, double __y, int *__quo) noexcept (true); extern double __remquo (double __x, double __y, int *__quo) noexcept (true); + + + + + + +extern long int lrint (double __x) noexcept (true); extern long int __lrint (double __x) noexcept (true); +__extension__ +extern long long int llrint (double __x) noexcept (true); extern long long int __llrint (double __x) noexcept (true); + + + +extern long int lround (double __x) noexcept (true); extern long int __lround (double __x) noexcept (true); +__extension__ +extern long long int llround (double __x) noexcept (true); extern long long int __llround (double __x) noexcept (true); + + + +extern double fdim (double __x, double __y) noexcept (true); extern double __fdim (double __x, double __y) noexcept (true); + + + +extern double fmax (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmax (double __x, double __y) noexcept (true) __attribute__ ((__const__)); + + +extern double fmin (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmin (double __x, double __y) noexcept (true) __attribute__ ((__const__)); + + + +extern double fma (double __x, double __y, double __z) noexcept (true); extern double __fma (double __x, double __y, double __z) noexcept (true); + + + + +extern double roundeven (double __x) noexcept (true) __attribute__ ((__const__)); extern double __roundeven (double __x) noexcept (true) __attribute__ ((__const__)); + + + +extern __intmax_t fromfp (double __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfp (double __x, int __round, unsigned int __width) noexcept (true) + ; + + + +extern __uintmax_t ufromfp (double __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfp (double __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __intmax_t fromfpx (double __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpx (double __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __uintmax_t ufromfpx (double __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpx (double __x, int __round, unsigned int __width) noexcept (true) + ; + + +extern int canonicalize (double *__cx, const double *__x) noexcept (true); + + + + + + +extern double fmaxmag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmaxmag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); + + +extern double fminmag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fminmag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern double fmaximum (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmaximum (double __x, double __y) noexcept (true) __attribute__ ((__const__)); + + +extern double fminimum (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fminimum (double __x, double __y) noexcept (true) __attribute__ ((__const__)); + + +extern double fmaximum_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmaximum_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); + + +extern double fminimum_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fminimum_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); + + +extern double fmaximum_mag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmaximum_mag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); + + +extern double fminimum_mag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fminimum_mag (double __x, double __y) noexcept (true) __attribute__ ((__const__)); + + +extern double fmaximum_mag_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fmaximum_mag_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); + + +extern double fminimum_mag_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); extern double __fminimum_mag_num (double __x, double __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern int totalorder (const double *__x, const double *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern int totalordermag (const double *__x, const double *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern double getpayload (const double *__x) noexcept (true); extern double __getpayload (const double *__x) noexcept (true); + + +extern int setpayload (double *__x, double __payload) noexcept (true); + + +extern int setpayloadsig (double *__x, double __payload) noexcept (true); + + + + + + + +extern double scalb (double __x, double __n) noexcept (true); extern double __scalb (double __x, double __n) noexcept (true); +# 314 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 329 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-helper-functions.h" 1 3 +# 20 "/usr/riscv64-linux-gnu/include/bits/mathcalls-helper-functions.h" 3 +extern int __fpclassifyf (float __value) noexcept (true) + __attribute__ ((__const__)); + + +extern int __signbitf (float __value) noexcept (true) + __attribute__ ((__const__)); + + + +extern int __isinff (float __value) noexcept (true) + __attribute__ ((__const__)); + + +extern int __finitef (float __value) noexcept (true) + __attribute__ ((__const__)); + + +extern int __isnanf (float __value) noexcept (true) + __attribute__ ((__const__)); + + +extern int __iseqsigf (float __x, float __y) noexcept (true); + + +extern int __issignalingf (float __value) noexcept (true) + __attribute__ ((__const__)); +# 330 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 1 3 +# 53 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 + extern float acosf (float __x) noexcept (true); extern float __acosf (float __x) noexcept (true); + + extern float asinf (float __x) noexcept (true); extern float __asinf (float __x) noexcept (true); + + extern float atanf (float __x) noexcept (true); extern float __atanf (float __x) noexcept (true); + + extern float atan2f (float __y, float __x) noexcept (true); extern float __atan2f (float __y, float __x) noexcept (true); + + + extern float cosf (float __x) noexcept (true); extern float __cosf (float __x) noexcept (true); + + extern float sinf (float __x) noexcept (true); extern float __sinf (float __x) noexcept (true); + + extern float tanf (float __x) noexcept (true); extern float __tanf (float __x) noexcept (true); + + + + + extern float coshf (float __x) noexcept (true); extern float __coshf (float __x) noexcept (true); + + extern float sinhf (float __x) noexcept (true); extern float __sinhf (float __x) noexcept (true); + + extern float tanhf (float __x) noexcept (true); extern float __tanhf (float __x) noexcept (true); + + + + extern void sincosf (float __x, float *__sinx, float *__cosx) noexcept (true); extern void __sincosf (float __x, float *__sinx, float *__cosx) noexcept (true) + ; + + + + + extern float acoshf (float __x) noexcept (true); extern float __acoshf (float __x) noexcept (true); + + extern float asinhf (float __x) noexcept (true); extern float __asinhf (float __x) noexcept (true); + + extern float atanhf (float __x) noexcept (true); extern float __atanhf (float __x) noexcept (true); + + + + + + extern float expf (float __x) noexcept (true); extern float __expf (float __x) noexcept (true); + + +extern float frexpf (float __x, int *__exponent) noexcept (true); extern float __frexpf (float __x, int *__exponent) noexcept (true); + + +extern float ldexpf (float __x, int __exponent) noexcept (true); extern float __ldexpf (float __x, int __exponent) noexcept (true); + + + extern float logf (float __x) noexcept (true); extern float __logf (float __x) noexcept (true); + + + extern float log10f (float __x) noexcept (true); extern float __log10f (float __x) noexcept (true); + + +extern float modff (float __x, float *__iptr) noexcept (true); extern float __modff (float __x, float *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + extern float exp10f (float __x) noexcept (true); extern float __exp10f (float __x) noexcept (true); + + + + + extern float expm1f (float __x) noexcept (true); extern float __expm1f (float __x) noexcept (true); + + + extern float log1pf (float __x) noexcept (true); extern float __log1pf (float __x) noexcept (true); + + +extern float logbf (float __x) noexcept (true); extern float __logbf (float __x) noexcept (true); + + + + + extern float exp2f (float __x) noexcept (true); extern float __exp2f (float __x) noexcept (true); + + + extern float log2f (float __x) noexcept (true); extern float __log2f (float __x) noexcept (true); + + + + + + + extern float powf (float __x, float __y) noexcept (true); extern float __powf (float __x, float __y) noexcept (true); + + +extern float sqrtf (float __x) noexcept (true); extern float __sqrtf (float __x) noexcept (true); + + + + extern float hypotf (float __x, float __y) noexcept (true); extern float __hypotf (float __x, float __y) noexcept (true); + + + + + extern float cbrtf (float __x) noexcept (true); extern float __cbrtf (float __x) noexcept (true); + + + + + + +extern float ceilf (float __x) noexcept (true) __attribute__ ((__const__)); extern float __ceilf (float __x) noexcept (true) __attribute__ ((__const__)); + + +extern float fabsf (float __x) noexcept (true) __attribute__ ((__const__)); extern float __fabsf (float __x) noexcept (true) __attribute__ ((__const__)); + + +extern float floorf (float __x) noexcept (true) __attribute__ ((__const__)); extern float __floorf (float __x) noexcept (true) __attribute__ ((__const__)); + + +extern float fmodf (float __x, float __y) noexcept (true); extern float __fmodf (float __x, float __y) noexcept (true); +# 177 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern int isinff (float __value) noexcept (true) + __attribute__ ((__const__)); + + + + +extern int finitef (float __value) noexcept (true) + __attribute__ ((__const__)); + + +extern float dremf (float __x, float __y) noexcept (true); extern float __dremf (float __x, float __y) noexcept (true); + + + +extern float significandf (float __x) noexcept (true); extern float __significandf (float __x) noexcept (true); + + + + + + +extern float copysignf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern float nanf (const char *__tagb) noexcept (true); extern float __nanf (const char *__tagb) noexcept (true); +# 213 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern int isnanf (float __value) noexcept (true) + __attribute__ ((__const__)); + + + + + +extern float j0f (float) noexcept (true); extern float __j0f (float) noexcept (true); +extern float j1f (float) noexcept (true); extern float __j1f (float) noexcept (true); +extern float jnf (int, float) noexcept (true); extern float __jnf (int, float) noexcept (true); +extern float y0f (float) noexcept (true); extern float __y0f (float) noexcept (true); +extern float y1f (float) noexcept (true); extern float __y1f (float) noexcept (true); +extern float ynf (int, float) noexcept (true); extern float __ynf (int, float) noexcept (true); + + + + + + extern float erff (float) noexcept (true); extern float __erff (float) noexcept (true); + extern float erfcf (float) noexcept (true); extern float __erfcf (float) noexcept (true); +extern float lgammaf (float) noexcept (true); extern float __lgammaf (float) noexcept (true); + + + + +extern float tgammaf (float) noexcept (true); extern float __tgammaf (float) noexcept (true); + + + + + +extern float gammaf (float) noexcept (true); extern float __gammaf (float) noexcept (true); + + + + + + + +extern float lgammaf_r (float, int *__signgamp) noexcept (true); extern float __lgammaf_r (float, int *__signgamp) noexcept (true); + + + + + + +extern float rintf (float __x) noexcept (true); extern float __rintf (float __x) noexcept (true); + + +extern float nextafterf (float __x, float __y) noexcept (true); extern float __nextafterf (float __x, float __y) noexcept (true); + +extern float nexttowardf (float __x, long double __y) noexcept (true); extern float __nexttowardf (float __x, long double __y) noexcept (true); + + + + +extern float nextdownf (float __x) noexcept (true); extern float __nextdownf (float __x) noexcept (true); + +extern float nextupf (float __x) noexcept (true); extern float __nextupf (float __x) noexcept (true); + + + +extern float remainderf (float __x, float __y) noexcept (true); extern float __remainderf (float __x, float __y) noexcept (true); + + + +extern float scalbnf (float __x, int __n) noexcept (true); extern float __scalbnf (float __x, int __n) noexcept (true); + + + +extern int ilogbf (float __x) noexcept (true); extern int __ilogbf (float __x) noexcept (true); + + + + +extern long int llogbf (float __x) noexcept (true); extern long int __llogbf (float __x) noexcept (true); + + + + +extern float scalblnf (float __x, long int __n) noexcept (true); extern float __scalblnf (float __x, long int __n) noexcept (true); + + + +extern float nearbyintf (float __x) noexcept (true); extern float __nearbyintf (float __x) noexcept (true); + + + +extern float roundf (float __x) noexcept (true) __attribute__ ((__const__)); extern float __roundf (float __x) noexcept (true) __attribute__ ((__const__)); + + + +extern float truncf (float __x) noexcept (true) __attribute__ ((__const__)); extern float __truncf (float __x) noexcept (true) __attribute__ ((__const__)); + + + + +extern float remquof (float __x, float __y, int *__quo) noexcept (true); extern float __remquof (float __x, float __y, int *__quo) noexcept (true); + + + + + + +extern long int lrintf (float __x) noexcept (true); extern long int __lrintf (float __x) noexcept (true); +__extension__ +extern long long int llrintf (float __x) noexcept (true); extern long long int __llrintf (float __x) noexcept (true); + + + +extern long int lroundf (float __x) noexcept (true); extern long int __lroundf (float __x) noexcept (true); +__extension__ +extern long long int llroundf (float __x) noexcept (true); extern long long int __llroundf (float __x) noexcept (true); + + + +extern float fdimf (float __x, float __y) noexcept (true); extern float __fdimf (float __x, float __y) noexcept (true); + + + +extern float fmaxf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); + + +extern float fminf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fminf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); + + + +extern float fmaf (float __x, float __y, float __z) noexcept (true); extern float __fmaf (float __x, float __y, float __z) noexcept (true); + + + + +extern float roundevenf (float __x) noexcept (true) __attribute__ ((__const__)); extern float __roundevenf (float __x) noexcept (true) __attribute__ ((__const__)); + + + +extern __intmax_t fromfpf (float __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpf (float __x, int __round, unsigned int __width) noexcept (true) + ; + + + +extern __uintmax_t ufromfpf (float __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpf (float __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __intmax_t fromfpxf (float __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxf (float __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __uintmax_t ufromfpxf (float __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxf (float __x, int __round, unsigned int __width) noexcept (true) + ; + + +extern int canonicalizef (float *__cx, const float *__x) noexcept (true); + + + + + + +extern float fmaxmagf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fmaxmagf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); + + +extern float fminmagf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fminmagf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern float fmaximumf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fmaximumf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); + + +extern float fminimumf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fminimumf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); + + +extern float fmaximum_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fmaximum_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); + + +extern float fminimum_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fminimum_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); + + +extern float fmaximum_magf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fmaximum_magf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); + + +extern float fminimum_magf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fminimum_magf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); + + +extern float fmaximum_mag_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fmaximum_mag_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); + + +extern float fminimum_mag_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); extern float __fminimum_mag_numf (float __x, float __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern int totalorderf (const float *__x, const float *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern int totalordermagf (const float *__x, const float *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern float getpayloadf (const float *__x) noexcept (true); extern float __getpayloadf (const float *__x) noexcept (true); + + +extern int setpayloadf (float *__x, float __payload) noexcept (true); + + +extern int setpayloadsigf (float *__x, float __payload) noexcept (true); + + + + + + + +extern float scalbf (float __x, float __n) noexcept (true); extern float __scalbf (float __x, float __n) noexcept (true); +# 331 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 398 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-helper-functions.h" 1 3 +# 20 "/usr/riscv64-linux-gnu/include/bits/mathcalls-helper-functions.h" 3 +extern int __fpclassifyl (long double __value) noexcept (true) + __attribute__ ((__const__)); + + +extern int __signbitl (long double __value) noexcept (true) + __attribute__ ((__const__)); + + + +extern int __isinfl (long double __value) noexcept (true) + __attribute__ ((__const__)); + + +extern int __finitel (long double __value) noexcept (true) + __attribute__ ((__const__)); + + +extern int __isnanl (long double __value) noexcept (true) + __attribute__ ((__const__)); + + +extern int __iseqsigl (long double __x, long double __y) noexcept (true); + + +extern int __issignalingl (long double __value) noexcept (true) + __attribute__ ((__const__)); +# 399 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 1 3 +# 53 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 + extern long double acosl (long double __x) noexcept (true); extern long double __acosl (long double __x) noexcept (true); + + extern long double asinl (long double __x) noexcept (true); extern long double __asinl (long double __x) noexcept (true); + + extern long double atanl (long double __x) noexcept (true); extern long double __atanl (long double __x) noexcept (true); + + extern long double atan2l (long double __y, long double __x) noexcept (true); extern long double __atan2l (long double __y, long double __x) noexcept (true); + + + extern long double cosl (long double __x) noexcept (true); extern long double __cosl (long double __x) noexcept (true); + + extern long double sinl (long double __x) noexcept (true); extern long double __sinl (long double __x) noexcept (true); + + extern long double tanl (long double __x) noexcept (true); extern long double __tanl (long double __x) noexcept (true); + + + + + extern long double coshl (long double __x) noexcept (true); extern long double __coshl (long double __x) noexcept (true); + + extern long double sinhl (long double __x) noexcept (true); extern long double __sinhl (long double __x) noexcept (true); + + extern long double tanhl (long double __x) noexcept (true); extern long double __tanhl (long double __x) noexcept (true); + + + + extern void sincosl (long double __x, long double *__sinx, long double *__cosx) noexcept (true); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) noexcept (true) + ; + + + + + extern long double acoshl (long double __x) noexcept (true); extern long double __acoshl (long double __x) noexcept (true); + + extern long double asinhl (long double __x) noexcept (true); extern long double __asinhl (long double __x) noexcept (true); + + extern long double atanhl (long double __x) noexcept (true); extern long double __atanhl (long double __x) noexcept (true); + + + + + + extern long double expl (long double __x) noexcept (true); extern long double __expl (long double __x) noexcept (true); + + +extern long double frexpl (long double __x, int *__exponent) noexcept (true); extern long double __frexpl (long double __x, int *__exponent) noexcept (true); + + +extern long double ldexpl (long double __x, int __exponent) noexcept (true); extern long double __ldexpl (long double __x, int __exponent) noexcept (true); + + + extern long double logl (long double __x) noexcept (true); extern long double __logl (long double __x) noexcept (true); + + + extern long double log10l (long double __x) noexcept (true); extern long double __log10l (long double __x) noexcept (true); + + +extern long double modfl (long double __x, long double *__iptr) noexcept (true); extern long double __modfl (long double __x, long double *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + extern long double exp10l (long double __x) noexcept (true); extern long double __exp10l (long double __x) noexcept (true); + + + + + extern long double expm1l (long double __x) noexcept (true); extern long double __expm1l (long double __x) noexcept (true); + + + extern long double log1pl (long double __x) noexcept (true); extern long double __log1pl (long double __x) noexcept (true); + + +extern long double logbl (long double __x) noexcept (true); extern long double __logbl (long double __x) noexcept (true); + + + + + extern long double exp2l (long double __x) noexcept (true); extern long double __exp2l (long double __x) noexcept (true); + + + extern long double log2l (long double __x) noexcept (true); extern long double __log2l (long double __x) noexcept (true); + + + + + + + extern long double powl (long double __x, long double __y) noexcept (true); extern long double __powl (long double __x, long double __y) noexcept (true); + + +extern long double sqrtl (long double __x) noexcept (true); extern long double __sqrtl (long double __x) noexcept (true); + + + + extern long double hypotl (long double __x, long double __y) noexcept (true); extern long double __hypotl (long double __x, long double __y) noexcept (true); + + + + + extern long double cbrtl (long double __x) noexcept (true); extern long double __cbrtl (long double __x) noexcept (true); + + + + + + +extern long double ceill (long double __x) noexcept (true) __attribute__ ((__const__)); extern long double __ceill (long double __x) noexcept (true) __attribute__ ((__const__)); + + +extern long double fabsl (long double __x) noexcept (true) __attribute__ ((__const__)); extern long double __fabsl (long double __x) noexcept (true) __attribute__ ((__const__)); + + +extern long double floorl (long double __x) noexcept (true) __attribute__ ((__const__)); extern long double __floorl (long double __x) noexcept (true) __attribute__ ((__const__)); + + +extern long double fmodl (long double __x, long double __y) noexcept (true); extern long double __fmodl (long double __x, long double __y) noexcept (true); +# 177 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern int isinfl (long double __value) noexcept (true) + __attribute__ ((__const__)); + + + + +extern int finitel (long double __value) noexcept (true) + __attribute__ ((__const__)); + + +extern long double dreml (long double __x, long double __y) noexcept (true); extern long double __dreml (long double __x, long double __y) noexcept (true); + + + +extern long double significandl (long double __x) noexcept (true); extern long double __significandl (long double __x) noexcept (true); + + + + + + +extern long double copysignl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern long double nanl (const char *__tagb) noexcept (true); extern long double __nanl (const char *__tagb) noexcept (true); +# 213 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern int isnanl (long double __value) noexcept (true) + __attribute__ ((__const__)); + + + + + +extern long double j0l (long double) noexcept (true); extern long double __j0l (long double) noexcept (true); +extern long double j1l (long double) noexcept (true); extern long double __j1l (long double) noexcept (true); +extern long double jnl (int, long double) noexcept (true); extern long double __jnl (int, long double) noexcept (true); +extern long double y0l (long double) noexcept (true); extern long double __y0l (long double) noexcept (true); +extern long double y1l (long double) noexcept (true); extern long double __y1l (long double) noexcept (true); +extern long double ynl (int, long double) noexcept (true); extern long double __ynl (int, long double) noexcept (true); + + + + + + extern long double erfl (long double) noexcept (true); extern long double __erfl (long double) noexcept (true); + extern long double erfcl (long double) noexcept (true); extern long double __erfcl (long double) noexcept (true); +extern long double lgammal (long double) noexcept (true); extern long double __lgammal (long double) noexcept (true); + + + + +extern long double tgammal (long double) noexcept (true); extern long double __tgammal (long double) noexcept (true); + + + + + +extern long double gammal (long double) noexcept (true); extern long double __gammal (long double) noexcept (true); + + + + + + + +extern long double lgammal_r (long double, int *__signgamp) noexcept (true); extern long double __lgammal_r (long double, int *__signgamp) noexcept (true); + + + + + + +extern long double rintl (long double __x) noexcept (true); extern long double __rintl (long double __x) noexcept (true); + + +extern long double nextafterl (long double __x, long double __y) noexcept (true); extern long double __nextafterl (long double __x, long double __y) noexcept (true); + +extern long double nexttowardl (long double __x, long double __y) noexcept (true); extern long double __nexttowardl (long double __x, long double __y) noexcept (true); + + + + +extern long double nextdownl (long double __x) noexcept (true); extern long double __nextdownl (long double __x) noexcept (true); + +extern long double nextupl (long double __x) noexcept (true); extern long double __nextupl (long double __x) noexcept (true); + + + +extern long double remainderl (long double __x, long double __y) noexcept (true); extern long double __remainderl (long double __x, long double __y) noexcept (true); + + + +extern long double scalbnl (long double __x, int __n) noexcept (true); extern long double __scalbnl (long double __x, int __n) noexcept (true); + + + +extern int ilogbl (long double __x) noexcept (true); extern int __ilogbl (long double __x) noexcept (true); + + + + +extern long int llogbl (long double __x) noexcept (true); extern long int __llogbl (long double __x) noexcept (true); + + + + +extern long double scalblnl (long double __x, long int __n) noexcept (true); extern long double __scalblnl (long double __x, long int __n) noexcept (true); + + + +extern long double nearbyintl (long double __x) noexcept (true); extern long double __nearbyintl (long double __x) noexcept (true); + + + +extern long double roundl (long double __x) noexcept (true) __attribute__ ((__const__)); extern long double __roundl (long double __x) noexcept (true) __attribute__ ((__const__)); + + + +extern long double truncl (long double __x) noexcept (true) __attribute__ ((__const__)); extern long double __truncl (long double __x) noexcept (true) __attribute__ ((__const__)); + + + + +extern long double remquol (long double __x, long double __y, int *__quo) noexcept (true); extern long double __remquol (long double __x, long double __y, int *__quo) noexcept (true); + + + + + + +extern long int lrintl (long double __x) noexcept (true); extern long int __lrintl (long double __x) noexcept (true); +__extension__ +extern long long int llrintl (long double __x) noexcept (true); extern long long int __llrintl (long double __x) noexcept (true); + + + +extern long int lroundl (long double __x) noexcept (true); extern long int __lroundl (long double __x) noexcept (true); +__extension__ +extern long long int llroundl (long double __x) noexcept (true); extern long long int __llroundl (long double __x) noexcept (true); + + + +extern long double fdiml (long double __x, long double __y) noexcept (true); extern long double __fdiml (long double __x, long double __y) noexcept (true); + + + +extern long double fmaxl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); + + +extern long double fminl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); + + + +extern long double fmal (long double __x, long double __y, long double __z) noexcept (true); extern long double __fmal (long double __x, long double __y, long double __z) noexcept (true); + + + + +extern long double roundevenl (long double __x) noexcept (true) __attribute__ ((__const__)); extern long double __roundevenl (long double __x) noexcept (true) __attribute__ ((__const__)); + + + +extern __intmax_t fromfpl (long double __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpl (long double __x, int __round, unsigned int __width) noexcept (true) + ; + + + +extern __uintmax_t ufromfpl (long double __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpl (long double __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __intmax_t fromfpxl (long double __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxl (long double __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __uintmax_t ufromfpxl (long double __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxl (long double __x, int __round, unsigned int __width) noexcept (true) + ; + + +extern int canonicalizel (long double *__cx, const long double *__x) noexcept (true); + + + + + + +extern long double fmaxmagl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fmaxmagl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); + + +extern long double fminmagl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fminmagl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern long double fmaximuml (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fmaximuml (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); + + +extern long double fminimuml (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fminimuml (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); + + +extern long double fmaximum_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fmaximum_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); + + +extern long double fminimum_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fminimum_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); + + +extern long double fmaximum_magl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fmaximum_magl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); + + +extern long double fminimum_magl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fminimum_magl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); + + +extern long double fmaximum_mag_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fmaximum_mag_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); + + +extern long double fminimum_mag_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); extern long double __fminimum_mag_numl (long double __x, long double __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern int totalorderl (const long double *__x, const long double *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern int totalordermagl (const long double *__x, const long double *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern long double getpayloadl (const long double *__x) noexcept (true); extern long double __getpayloadl (const long double *__x) noexcept (true); + + +extern int setpayloadl (long double *__x, long double __payload) noexcept (true); + + +extern int setpayloadsigl (long double *__x, long double __payload) noexcept (true); + + + + + + + +extern long double scalbl (long double __x, long double __n) noexcept (true); extern long double __scalbl (long double __x, long double __n) noexcept (true); +# 400 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 450 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 1 3 +# 53 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 + extern _Float32 acosf32 (_Float32 __x) noexcept (true); extern _Float32 __acosf32 (_Float32 __x) noexcept (true); + + extern _Float32 asinf32 (_Float32 __x) noexcept (true); extern _Float32 __asinf32 (_Float32 __x) noexcept (true); + + extern _Float32 atanf32 (_Float32 __x) noexcept (true); extern _Float32 __atanf32 (_Float32 __x) noexcept (true); + + extern _Float32 atan2f32 (_Float32 __y, _Float32 __x) noexcept (true); extern _Float32 __atan2f32 (_Float32 __y, _Float32 __x) noexcept (true); + + + extern _Float32 cosf32 (_Float32 __x) noexcept (true); extern _Float32 __cosf32 (_Float32 __x) noexcept (true); + + extern _Float32 sinf32 (_Float32 __x) noexcept (true); extern _Float32 __sinf32 (_Float32 __x) noexcept (true); + + extern _Float32 tanf32 (_Float32 __x) noexcept (true); extern _Float32 __tanf32 (_Float32 __x) noexcept (true); + + + + + extern _Float32 coshf32 (_Float32 __x) noexcept (true); extern _Float32 __coshf32 (_Float32 __x) noexcept (true); + + extern _Float32 sinhf32 (_Float32 __x) noexcept (true); extern _Float32 __sinhf32 (_Float32 __x) noexcept (true); + + extern _Float32 tanhf32 (_Float32 __x) noexcept (true); extern _Float32 __tanhf32 (_Float32 __x) noexcept (true); + + + + extern void sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) noexcept (true); extern void __sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) noexcept (true) + ; + + + + + extern _Float32 acoshf32 (_Float32 __x) noexcept (true); extern _Float32 __acoshf32 (_Float32 __x) noexcept (true); + + extern _Float32 asinhf32 (_Float32 __x) noexcept (true); extern _Float32 __asinhf32 (_Float32 __x) noexcept (true); + + extern _Float32 atanhf32 (_Float32 __x) noexcept (true); extern _Float32 __atanhf32 (_Float32 __x) noexcept (true); + + + + + + extern _Float32 expf32 (_Float32 __x) noexcept (true); extern _Float32 __expf32 (_Float32 __x) noexcept (true); + + +extern _Float32 frexpf32 (_Float32 __x, int *__exponent) noexcept (true); extern _Float32 __frexpf32 (_Float32 __x, int *__exponent) noexcept (true); + + +extern _Float32 ldexpf32 (_Float32 __x, int __exponent) noexcept (true); extern _Float32 __ldexpf32 (_Float32 __x, int __exponent) noexcept (true); + + + extern _Float32 logf32 (_Float32 __x) noexcept (true); extern _Float32 __logf32 (_Float32 __x) noexcept (true); + + + extern _Float32 log10f32 (_Float32 __x) noexcept (true); extern _Float32 __log10f32 (_Float32 __x) noexcept (true); + + +extern _Float32 modff32 (_Float32 __x, _Float32 *__iptr) noexcept (true); extern _Float32 __modff32 (_Float32 __x, _Float32 *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + extern _Float32 exp10f32 (_Float32 __x) noexcept (true); extern _Float32 __exp10f32 (_Float32 __x) noexcept (true); + + + + + extern _Float32 expm1f32 (_Float32 __x) noexcept (true); extern _Float32 __expm1f32 (_Float32 __x) noexcept (true); + + + extern _Float32 log1pf32 (_Float32 __x) noexcept (true); extern _Float32 __log1pf32 (_Float32 __x) noexcept (true); + + +extern _Float32 logbf32 (_Float32 __x) noexcept (true); extern _Float32 __logbf32 (_Float32 __x) noexcept (true); + + + + + extern _Float32 exp2f32 (_Float32 __x) noexcept (true); extern _Float32 __exp2f32 (_Float32 __x) noexcept (true); + + + extern _Float32 log2f32 (_Float32 __x) noexcept (true); extern _Float32 __log2f32 (_Float32 __x) noexcept (true); + + + + + + + extern _Float32 powf32 (_Float32 __x, _Float32 __y) noexcept (true); extern _Float32 __powf32 (_Float32 __x, _Float32 __y) noexcept (true); + + +extern _Float32 sqrtf32 (_Float32 __x) noexcept (true); extern _Float32 __sqrtf32 (_Float32 __x) noexcept (true); + + + + extern _Float32 hypotf32 (_Float32 __x, _Float32 __y) noexcept (true); extern _Float32 __hypotf32 (_Float32 __x, _Float32 __y) noexcept (true); + + + + + extern _Float32 cbrtf32 (_Float32 __x) noexcept (true); extern _Float32 __cbrtf32 (_Float32 __x) noexcept (true); + + + + + + +extern _Float32 ceilf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); extern _Float32 __ceilf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32 fabsf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fabsf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32 floorf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); extern _Float32 __floorf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32 fmodf32 (_Float32 __x, _Float32 __y) noexcept (true); extern _Float32 __fmodf32 (_Float32 __x, _Float32 __y) noexcept (true); +# 198 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float32 copysignf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __copysignf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float32 nanf32 (const char *__tagb) noexcept (true); extern _Float32 __nanf32 (const char *__tagb) noexcept (true); +# 220 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float32 j0f32 (_Float32) noexcept (true); extern _Float32 __j0f32 (_Float32) noexcept (true); +extern _Float32 j1f32 (_Float32) noexcept (true); extern _Float32 __j1f32 (_Float32) noexcept (true); +extern _Float32 jnf32 (int, _Float32) noexcept (true); extern _Float32 __jnf32 (int, _Float32) noexcept (true); +extern _Float32 y0f32 (_Float32) noexcept (true); extern _Float32 __y0f32 (_Float32) noexcept (true); +extern _Float32 y1f32 (_Float32) noexcept (true); extern _Float32 __y1f32 (_Float32) noexcept (true); +extern _Float32 ynf32 (int, _Float32) noexcept (true); extern _Float32 __ynf32 (int, _Float32) noexcept (true); + + + + + + extern _Float32 erff32 (_Float32) noexcept (true); extern _Float32 __erff32 (_Float32) noexcept (true); + extern _Float32 erfcf32 (_Float32) noexcept (true); extern _Float32 __erfcf32 (_Float32) noexcept (true); +extern _Float32 lgammaf32 (_Float32) noexcept (true); extern _Float32 __lgammaf32 (_Float32) noexcept (true); + + + + +extern _Float32 tgammaf32 (_Float32) noexcept (true); extern _Float32 __tgammaf32 (_Float32) noexcept (true); +# 252 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float32 lgammaf32_r (_Float32, int *__signgamp) noexcept (true); extern _Float32 __lgammaf32_r (_Float32, int *__signgamp) noexcept (true); + + + + + + +extern _Float32 rintf32 (_Float32 __x) noexcept (true); extern _Float32 __rintf32 (_Float32 __x) noexcept (true); + + +extern _Float32 nextafterf32 (_Float32 __x, _Float32 __y) noexcept (true); extern _Float32 __nextafterf32 (_Float32 __x, _Float32 __y) noexcept (true); + + + + + + +extern _Float32 nextdownf32 (_Float32 __x) noexcept (true); extern _Float32 __nextdownf32 (_Float32 __x) noexcept (true); + +extern _Float32 nextupf32 (_Float32 __x) noexcept (true); extern _Float32 __nextupf32 (_Float32 __x) noexcept (true); + + + +extern _Float32 remainderf32 (_Float32 __x, _Float32 __y) noexcept (true); extern _Float32 __remainderf32 (_Float32 __x, _Float32 __y) noexcept (true); + + + +extern _Float32 scalbnf32 (_Float32 __x, int __n) noexcept (true); extern _Float32 __scalbnf32 (_Float32 __x, int __n) noexcept (true); + + + +extern int ilogbf32 (_Float32 __x) noexcept (true); extern int __ilogbf32 (_Float32 __x) noexcept (true); + + + + +extern long int llogbf32 (_Float32 __x) noexcept (true); extern long int __llogbf32 (_Float32 __x) noexcept (true); + + + + +extern _Float32 scalblnf32 (_Float32 __x, long int __n) noexcept (true); extern _Float32 __scalblnf32 (_Float32 __x, long int __n) noexcept (true); + + + +extern _Float32 nearbyintf32 (_Float32 __x) noexcept (true); extern _Float32 __nearbyintf32 (_Float32 __x) noexcept (true); + + + +extern _Float32 roundf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); extern _Float32 __roundf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); + + + +extern _Float32 truncf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); extern _Float32 __truncf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float32 remquof32 (_Float32 __x, _Float32 __y, int *__quo) noexcept (true); extern _Float32 __remquof32 (_Float32 __x, _Float32 __y, int *__quo) noexcept (true); + + + + + + +extern long int lrintf32 (_Float32 __x) noexcept (true); extern long int __lrintf32 (_Float32 __x) noexcept (true); +__extension__ +extern long long int llrintf32 (_Float32 __x) noexcept (true); extern long long int __llrintf32 (_Float32 __x) noexcept (true); + + + +extern long int lroundf32 (_Float32 __x) noexcept (true); extern long int __lroundf32 (_Float32 __x) noexcept (true); +__extension__ +extern long long int llroundf32 (_Float32 __x) noexcept (true); extern long long int __llroundf32 (_Float32 __x) noexcept (true); + + + +extern _Float32 fdimf32 (_Float32 __x, _Float32 __y) noexcept (true); extern _Float32 __fdimf32 (_Float32 __x, _Float32 __y) noexcept (true); + + + +extern _Float32 fmaxf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fmaxf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32 fminf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fminf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); + + + +extern _Float32 fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) noexcept (true); extern _Float32 __fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) noexcept (true); + + + + +extern _Float32 roundevenf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); extern _Float32 __roundevenf32 (_Float32 __x) noexcept (true) __attribute__ ((__const__)); + + + +extern __intmax_t fromfpf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true) + ; + + + +extern __uintmax_t ufromfpf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __intmax_t fromfpxf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __uintmax_t ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) noexcept (true) + ; + + +extern int canonicalizef32 (_Float32 *__cx, const _Float32 *__x) noexcept (true); + + + + + + +extern _Float32 fmaxmagf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fmaxmagf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32 fminmagf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fminmagf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float32 fmaximumf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fmaximumf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32 fminimumf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fminimumf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32 fmaximum_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fmaximum_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32 fminimum_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fminimum_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32 fmaximum_magf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fmaximum_magf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32 fminimum_magf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fminimum_magf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32 fmaximum_mag_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fmaximum_mag_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32 fminimum_mag_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); extern _Float32 __fminimum_mag_numf32 (_Float32 __x, _Float32 __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern int totalorderf32 (const _Float32 *__x, const _Float32 *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern int totalordermagf32 (const _Float32 *__x, const _Float32 *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern _Float32 getpayloadf32 (const _Float32 *__x) noexcept (true); extern _Float32 __getpayloadf32 (const _Float32 *__x) noexcept (true); + + +extern int setpayloadf32 (_Float32 *__x, _Float32 __payload) noexcept (true); + + +extern int setpayloadsigf32 (_Float32 *__x, _Float32 __payload) noexcept (true); +# 451 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 467 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 1 3 +# 53 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 + extern _Float64 acosf64 (_Float64 __x) noexcept (true); extern _Float64 __acosf64 (_Float64 __x) noexcept (true); + + extern _Float64 asinf64 (_Float64 __x) noexcept (true); extern _Float64 __asinf64 (_Float64 __x) noexcept (true); + + extern _Float64 atanf64 (_Float64 __x) noexcept (true); extern _Float64 __atanf64 (_Float64 __x) noexcept (true); + + extern _Float64 atan2f64 (_Float64 __y, _Float64 __x) noexcept (true); extern _Float64 __atan2f64 (_Float64 __y, _Float64 __x) noexcept (true); + + + extern _Float64 cosf64 (_Float64 __x) noexcept (true); extern _Float64 __cosf64 (_Float64 __x) noexcept (true); + + extern _Float64 sinf64 (_Float64 __x) noexcept (true); extern _Float64 __sinf64 (_Float64 __x) noexcept (true); + + extern _Float64 tanf64 (_Float64 __x) noexcept (true); extern _Float64 __tanf64 (_Float64 __x) noexcept (true); + + + + + extern _Float64 coshf64 (_Float64 __x) noexcept (true); extern _Float64 __coshf64 (_Float64 __x) noexcept (true); + + extern _Float64 sinhf64 (_Float64 __x) noexcept (true); extern _Float64 __sinhf64 (_Float64 __x) noexcept (true); + + extern _Float64 tanhf64 (_Float64 __x) noexcept (true); extern _Float64 __tanhf64 (_Float64 __x) noexcept (true); + + + + extern void sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) noexcept (true); extern void __sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) noexcept (true) + ; + + + + + extern _Float64 acoshf64 (_Float64 __x) noexcept (true); extern _Float64 __acoshf64 (_Float64 __x) noexcept (true); + + extern _Float64 asinhf64 (_Float64 __x) noexcept (true); extern _Float64 __asinhf64 (_Float64 __x) noexcept (true); + + extern _Float64 atanhf64 (_Float64 __x) noexcept (true); extern _Float64 __atanhf64 (_Float64 __x) noexcept (true); + + + + + + extern _Float64 expf64 (_Float64 __x) noexcept (true); extern _Float64 __expf64 (_Float64 __x) noexcept (true); + + +extern _Float64 frexpf64 (_Float64 __x, int *__exponent) noexcept (true); extern _Float64 __frexpf64 (_Float64 __x, int *__exponent) noexcept (true); + + +extern _Float64 ldexpf64 (_Float64 __x, int __exponent) noexcept (true); extern _Float64 __ldexpf64 (_Float64 __x, int __exponent) noexcept (true); + + + extern _Float64 logf64 (_Float64 __x) noexcept (true); extern _Float64 __logf64 (_Float64 __x) noexcept (true); + + + extern _Float64 log10f64 (_Float64 __x) noexcept (true); extern _Float64 __log10f64 (_Float64 __x) noexcept (true); + + +extern _Float64 modff64 (_Float64 __x, _Float64 *__iptr) noexcept (true); extern _Float64 __modff64 (_Float64 __x, _Float64 *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + extern _Float64 exp10f64 (_Float64 __x) noexcept (true); extern _Float64 __exp10f64 (_Float64 __x) noexcept (true); + + + + + extern _Float64 expm1f64 (_Float64 __x) noexcept (true); extern _Float64 __expm1f64 (_Float64 __x) noexcept (true); + + + extern _Float64 log1pf64 (_Float64 __x) noexcept (true); extern _Float64 __log1pf64 (_Float64 __x) noexcept (true); + + +extern _Float64 logbf64 (_Float64 __x) noexcept (true); extern _Float64 __logbf64 (_Float64 __x) noexcept (true); + + + + + extern _Float64 exp2f64 (_Float64 __x) noexcept (true); extern _Float64 __exp2f64 (_Float64 __x) noexcept (true); + + + extern _Float64 log2f64 (_Float64 __x) noexcept (true); extern _Float64 __log2f64 (_Float64 __x) noexcept (true); + + + + + + + extern _Float64 powf64 (_Float64 __x, _Float64 __y) noexcept (true); extern _Float64 __powf64 (_Float64 __x, _Float64 __y) noexcept (true); + + +extern _Float64 sqrtf64 (_Float64 __x) noexcept (true); extern _Float64 __sqrtf64 (_Float64 __x) noexcept (true); + + + + extern _Float64 hypotf64 (_Float64 __x, _Float64 __y) noexcept (true); extern _Float64 __hypotf64 (_Float64 __x, _Float64 __y) noexcept (true); + + + + + extern _Float64 cbrtf64 (_Float64 __x) noexcept (true); extern _Float64 __cbrtf64 (_Float64 __x) noexcept (true); + + + + + + +extern _Float64 ceilf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); extern _Float64 __ceilf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64 fabsf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fabsf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64 floorf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); extern _Float64 __floorf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64 fmodf64 (_Float64 __x, _Float64 __y) noexcept (true); extern _Float64 __fmodf64 (_Float64 __x, _Float64 __y) noexcept (true); +# 198 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float64 copysignf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __copysignf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float64 nanf64 (const char *__tagb) noexcept (true); extern _Float64 __nanf64 (const char *__tagb) noexcept (true); +# 220 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float64 j0f64 (_Float64) noexcept (true); extern _Float64 __j0f64 (_Float64) noexcept (true); +extern _Float64 j1f64 (_Float64) noexcept (true); extern _Float64 __j1f64 (_Float64) noexcept (true); +extern _Float64 jnf64 (int, _Float64) noexcept (true); extern _Float64 __jnf64 (int, _Float64) noexcept (true); +extern _Float64 y0f64 (_Float64) noexcept (true); extern _Float64 __y0f64 (_Float64) noexcept (true); +extern _Float64 y1f64 (_Float64) noexcept (true); extern _Float64 __y1f64 (_Float64) noexcept (true); +extern _Float64 ynf64 (int, _Float64) noexcept (true); extern _Float64 __ynf64 (int, _Float64) noexcept (true); + + + + + + extern _Float64 erff64 (_Float64) noexcept (true); extern _Float64 __erff64 (_Float64) noexcept (true); + extern _Float64 erfcf64 (_Float64) noexcept (true); extern _Float64 __erfcf64 (_Float64) noexcept (true); +extern _Float64 lgammaf64 (_Float64) noexcept (true); extern _Float64 __lgammaf64 (_Float64) noexcept (true); + + + + +extern _Float64 tgammaf64 (_Float64) noexcept (true); extern _Float64 __tgammaf64 (_Float64) noexcept (true); +# 252 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float64 lgammaf64_r (_Float64, int *__signgamp) noexcept (true); extern _Float64 __lgammaf64_r (_Float64, int *__signgamp) noexcept (true); + + + + + + +extern _Float64 rintf64 (_Float64 __x) noexcept (true); extern _Float64 __rintf64 (_Float64 __x) noexcept (true); + + +extern _Float64 nextafterf64 (_Float64 __x, _Float64 __y) noexcept (true); extern _Float64 __nextafterf64 (_Float64 __x, _Float64 __y) noexcept (true); + + + + + + +extern _Float64 nextdownf64 (_Float64 __x) noexcept (true); extern _Float64 __nextdownf64 (_Float64 __x) noexcept (true); + +extern _Float64 nextupf64 (_Float64 __x) noexcept (true); extern _Float64 __nextupf64 (_Float64 __x) noexcept (true); + + + +extern _Float64 remainderf64 (_Float64 __x, _Float64 __y) noexcept (true); extern _Float64 __remainderf64 (_Float64 __x, _Float64 __y) noexcept (true); + + + +extern _Float64 scalbnf64 (_Float64 __x, int __n) noexcept (true); extern _Float64 __scalbnf64 (_Float64 __x, int __n) noexcept (true); + + + +extern int ilogbf64 (_Float64 __x) noexcept (true); extern int __ilogbf64 (_Float64 __x) noexcept (true); + + + + +extern long int llogbf64 (_Float64 __x) noexcept (true); extern long int __llogbf64 (_Float64 __x) noexcept (true); + + + + +extern _Float64 scalblnf64 (_Float64 __x, long int __n) noexcept (true); extern _Float64 __scalblnf64 (_Float64 __x, long int __n) noexcept (true); + + + +extern _Float64 nearbyintf64 (_Float64 __x) noexcept (true); extern _Float64 __nearbyintf64 (_Float64 __x) noexcept (true); + + + +extern _Float64 roundf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); extern _Float64 __roundf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); + + + +extern _Float64 truncf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); extern _Float64 __truncf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float64 remquof64 (_Float64 __x, _Float64 __y, int *__quo) noexcept (true); extern _Float64 __remquof64 (_Float64 __x, _Float64 __y, int *__quo) noexcept (true); + + + + + + +extern long int lrintf64 (_Float64 __x) noexcept (true); extern long int __lrintf64 (_Float64 __x) noexcept (true); +__extension__ +extern long long int llrintf64 (_Float64 __x) noexcept (true); extern long long int __llrintf64 (_Float64 __x) noexcept (true); + + + +extern long int lroundf64 (_Float64 __x) noexcept (true); extern long int __lroundf64 (_Float64 __x) noexcept (true); +__extension__ +extern long long int llroundf64 (_Float64 __x) noexcept (true); extern long long int __llroundf64 (_Float64 __x) noexcept (true); + + + +extern _Float64 fdimf64 (_Float64 __x, _Float64 __y) noexcept (true); extern _Float64 __fdimf64 (_Float64 __x, _Float64 __y) noexcept (true); + + + +extern _Float64 fmaxf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fmaxf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64 fminf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fminf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); + + + +extern _Float64 fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) noexcept (true); extern _Float64 __fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) noexcept (true); + + + + +extern _Float64 roundevenf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); extern _Float64 __roundevenf64 (_Float64 __x) noexcept (true) __attribute__ ((__const__)); + + + +extern __intmax_t fromfpf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true) + ; + + + +extern __uintmax_t ufromfpf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __intmax_t fromfpxf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __uintmax_t ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) noexcept (true) + ; + + +extern int canonicalizef64 (_Float64 *__cx, const _Float64 *__x) noexcept (true); + + + + + + +extern _Float64 fmaxmagf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fmaxmagf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64 fminmagf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fminmagf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float64 fmaximumf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fmaximumf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64 fminimumf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fminimumf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64 fmaximum_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fmaximum_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64 fminimum_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fminimum_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64 fmaximum_magf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fmaximum_magf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64 fminimum_magf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fminimum_magf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64 fmaximum_mag_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fmaximum_mag_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64 fminimum_mag_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); extern _Float64 __fminimum_mag_numf64 (_Float64 __x, _Float64 __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern int totalorderf64 (const _Float64 *__x, const _Float64 *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern int totalordermagf64 (const _Float64 *__x, const _Float64 *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern _Float64 getpayloadf64 (const _Float64 *__x) noexcept (true); extern _Float64 __getpayloadf64 (const _Float64 *__x) noexcept (true); + + +extern int setpayloadf64 (_Float64 *__x, _Float64 __payload) noexcept (true); + + +extern int setpayloadsigf64 (_Float64 *__x, _Float64 __payload) noexcept (true); +# 468 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 484 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 1 3 +# 53 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 + extern _Float128 acosf128 (_Float128 __x) noexcept (true); extern _Float128 __acosf128 (_Float128 __x) noexcept (true); + + extern _Float128 asinf128 (_Float128 __x) noexcept (true); extern _Float128 __asinf128 (_Float128 __x) noexcept (true); + + extern _Float128 atanf128 (_Float128 __x) noexcept (true); extern _Float128 __atanf128 (_Float128 __x) noexcept (true); + + extern _Float128 atan2f128 (_Float128 __y, _Float128 __x) noexcept (true); extern _Float128 __atan2f128 (_Float128 __y, _Float128 __x) noexcept (true); + + + extern _Float128 cosf128 (_Float128 __x) noexcept (true); extern _Float128 __cosf128 (_Float128 __x) noexcept (true); + + extern _Float128 sinf128 (_Float128 __x) noexcept (true); extern _Float128 __sinf128 (_Float128 __x) noexcept (true); + + extern _Float128 tanf128 (_Float128 __x) noexcept (true); extern _Float128 __tanf128 (_Float128 __x) noexcept (true); + + + + + extern _Float128 coshf128 (_Float128 __x) noexcept (true); extern _Float128 __coshf128 (_Float128 __x) noexcept (true); + + extern _Float128 sinhf128 (_Float128 __x) noexcept (true); extern _Float128 __sinhf128 (_Float128 __x) noexcept (true); + + extern _Float128 tanhf128 (_Float128 __x) noexcept (true); extern _Float128 __tanhf128 (_Float128 __x) noexcept (true); + + + + extern void sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) noexcept (true); extern void __sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) noexcept (true) + ; + + + + + extern _Float128 acoshf128 (_Float128 __x) noexcept (true); extern _Float128 __acoshf128 (_Float128 __x) noexcept (true); + + extern _Float128 asinhf128 (_Float128 __x) noexcept (true); extern _Float128 __asinhf128 (_Float128 __x) noexcept (true); + + extern _Float128 atanhf128 (_Float128 __x) noexcept (true); extern _Float128 __atanhf128 (_Float128 __x) noexcept (true); + + + + + + extern _Float128 expf128 (_Float128 __x) noexcept (true); extern _Float128 __expf128 (_Float128 __x) noexcept (true); + + +extern _Float128 frexpf128 (_Float128 __x, int *__exponent) noexcept (true); extern _Float128 __frexpf128 (_Float128 __x, int *__exponent) noexcept (true); + + +extern _Float128 ldexpf128 (_Float128 __x, int __exponent) noexcept (true); extern _Float128 __ldexpf128 (_Float128 __x, int __exponent) noexcept (true); + + + extern _Float128 logf128 (_Float128 __x) noexcept (true); extern _Float128 __logf128 (_Float128 __x) noexcept (true); + + + extern _Float128 log10f128 (_Float128 __x) noexcept (true); extern _Float128 __log10f128 (_Float128 __x) noexcept (true); + + +extern _Float128 modff128 (_Float128 __x, _Float128 *__iptr) noexcept (true); extern _Float128 __modff128 (_Float128 __x, _Float128 *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + extern _Float128 exp10f128 (_Float128 __x) noexcept (true); extern _Float128 __exp10f128 (_Float128 __x) noexcept (true); + + + + + extern _Float128 expm1f128 (_Float128 __x) noexcept (true); extern _Float128 __expm1f128 (_Float128 __x) noexcept (true); + + + extern _Float128 log1pf128 (_Float128 __x) noexcept (true); extern _Float128 __log1pf128 (_Float128 __x) noexcept (true); + + +extern _Float128 logbf128 (_Float128 __x) noexcept (true); extern _Float128 __logbf128 (_Float128 __x) noexcept (true); + + + + + extern _Float128 exp2f128 (_Float128 __x) noexcept (true); extern _Float128 __exp2f128 (_Float128 __x) noexcept (true); + + + extern _Float128 log2f128 (_Float128 __x) noexcept (true); extern _Float128 __log2f128 (_Float128 __x) noexcept (true); + + + + + + + extern _Float128 powf128 (_Float128 __x, _Float128 __y) noexcept (true); extern _Float128 __powf128 (_Float128 __x, _Float128 __y) noexcept (true); + + +extern _Float128 sqrtf128 (_Float128 __x) noexcept (true); extern _Float128 __sqrtf128 (_Float128 __x) noexcept (true); + + + + extern _Float128 hypotf128 (_Float128 __x, _Float128 __y) noexcept (true); extern _Float128 __hypotf128 (_Float128 __x, _Float128 __y) noexcept (true); + + + + + extern _Float128 cbrtf128 (_Float128 __x) noexcept (true); extern _Float128 __cbrtf128 (_Float128 __x) noexcept (true); + + + + + + +extern _Float128 ceilf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); extern _Float128 __ceilf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float128 fabsf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fabsf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float128 floorf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); extern _Float128 __floorf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float128 fmodf128 (_Float128 __x, _Float128 __y) noexcept (true); extern _Float128 __fmodf128 (_Float128 __x, _Float128 __y) noexcept (true); +# 198 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float128 copysignf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __copysignf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float128 nanf128 (const char *__tagb) noexcept (true); extern _Float128 __nanf128 (const char *__tagb) noexcept (true); +# 220 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float128 j0f128 (_Float128) noexcept (true); extern _Float128 __j0f128 (_Float128) noexcept (true); +extern _Float128 j1f128 (_Float128) noexcept (true); extern _Float128 __j1f128 (_Float128) noexcept (true); +extern _Float128 jnf128 (int, _Float128) noexcept (true); extern _Float128 __jnf128 (int, _Float128) noexcept (true); +extern _Float128 y0f128 (_Float128) noexcept (true); extern _Float128 __y0f128 (_Float128) noexcept (true); +extern _Float128 y1f128 (_Float128) noexcept (true); extern _Float128 __y1f128 (_Float128) noexcept (true); +extern _Float128 ynf128 (int, _Float128) noexcept (true); extern _Float128 __ynf128 (int, _Float128) noexcept (true); + + + + + + extern _Float128 erff128 (_Float128) noexcept (true); extern _Float128 __erff128 (_Float128) noexcept (true); + extern _Float128 erfcf128 (_Float128) noexcept (true); extern _Float128 __erfcf128 (_Float128) noexcept (true); +extern _Float128 lgammaf128 (_Float128) noexcept (true); extern _Float128 __lgammaf128 (_Float128) noexcept (true); + + + + +extern _Float128 tgammaf128 (_Float128) noexcept (true); extern _Float128 __tgammaf128 (_Float128) noexcept (true); +# 252 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float128 lgammaf128_r (_Float128, int *__signgamp) noexcept (true); extern _Float128 __lgammaf128_r (_Float128, int *__signgamp) noexcept (true); + + + + + + +extern _Float128 rintf128 (_Float128 __x) noexcept (true); extern _Float128 __rintf128 (_Float128 __x) noexcept (true); + + +extern _Float128 nextafterf128 (_Float128 __x, _Float128 __y) noexcept (true); extern _Float128 __nextafterf128 (_Float128 __x, _Float128 __y) noexcept (true); + + + + + + +extern _Float128 nextdownf128 (_Float128 __x) noexcept (true); extern _Float128 __nextdownf128 (_Float128 __x) noexcept (true); + +extern _Float128 nextupf128 (_Float128 __x) noexcept (true); extern _Float128 __nextupf128 (_Float128 __x) noexcept (true); + + + +extern _Float128 remainderf128 (_Float128 __x, _Float128 __y) noexcept (true); extern _Float128 __remainderf128 (_Float128 __x, _Float128 __y) noexcept (true); + + + +extern _Float128 scalbnf128 (_Float128 __x, int __n) noexcept (true); extern _Float128 __scalbnf128 (_Float128 __x, int __n) noexcept (true); + + + +extern int ilogbf128 (_Float128 __x) noexcept (true); extern int __ilogbf128 (_Float128 __x) noexcept (true); + + + + +extern long int llogbf128 (_Float128 __x) noexcept (true); extern long int __llogbf128 (_Float128 __x) noexcept (true); + + + + +extern _Float128 scalblnf128 (_Float128 __x, long int __n) noexcept (true); extern _Float128 __scalblnf128 (_Float128 __x, long int __n) noexcept (true); + + + +extern _Float128 nearbyintf128 (_Float128 __x) noexcept (true); extern _Float128 __nearbyintf128 (_Float128 __x) noexcept (true); + + + +extern _Float128 roundf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); extern _Float128 __roundf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); + + + +extern _Float128 truncf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); extern _Float128 __truncf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float128 remquof128 (_Float128 __x, _Float128 __y, int *__quo) noexcept (true); extern _Float128 __remquof128 (_Float128 __x, _Float128 __y, int *__quo) noexcept (true); + + + + + + +extern long int lrintf128 (_Float128 __x) noexcept (true); extern long int __lrintf128 (_Float128 __x) noexcept (true); +__extension__ +extern long long int llrintf128 (_Float128 __x) noexcept (true); extern long long int __llrintf128 (_Float128 __x) noexcept (true); + + + +extern long int lroundf128 (_Float128 __x) noexcept (true); extern long int __lroundf128 (_Float128 __x) noexcept (true); +__extension__ +extern long long int llroundf128 (_Float128 __x) noexcept (true); extern long long int __llroundf128 (_Float128 __x) noexcept (true); + + + +extern _Float128 fdimf128 (_Float128 __x, _Float128 __y) noexcept (true); extern _Float128 __fdimf128 (_Float128 __x, _Float128 __y) noexcept (true); + + + +extern _Float128 fmaxf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fmaxf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float128 fminf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fminf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); + + + +extern _Float128 fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) noexcept (true); extern _Float128 __fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) noexcept (true); + + + + +extern _Float128 roundevenf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); extern _Float128 __roundevenf128 (_Float128 __x) noexcept (true) __attribute__ ((__const__)); + + + +extern __intmax_t fromfpf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true) + ; + + + +extern __uintmax_t ufromfpf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __intmax_t fromfpxf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __uintmax_t ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) noexcept (true) + ; + + +extern int canonicalizef128 (_Float128 *__cx, const _Float128 *__x) noexcept (true); + + + + + + +extern _Float128 fmaxmagf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fmaxmagf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float128 fminmagf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fminmagf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float128 fmaximumf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fmaximumf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float128 fminimumf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fminimumf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float128 fmaximum_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fmaximum_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float128 fminimum_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fminimum_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float128 fmaximum_magf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fmaximum_magf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float128 fminimum_magf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fminimum_magf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float128 fmaximum_mag_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fmaximum_mag_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float128 fminimum_mag_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); extern _Float128 __fminimum_mag_numf128 (_Float128 __x, _Float128 __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern int totalorderf128 (const _Float128 *__x, const _Float128 *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern int totalordermagf128 (const _Float128 *__x, const _Float128 *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern _Float128 getpayloadf128 (const _Float128 *__x) noexcept (true); extern _Float128 __getpayloadf128 (const _Float128 *__x) noexcept (true); + + +extern int setpayloadf128 (_Float128 *__x, _Float128 __payload) noexcept (true); + + +extern int setpayloadsigf128 (_Float128 *__x, _Float128 __payload) noexcept (true); +# 485 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 501 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 1 3 +# 53 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 + extern _Float32x acosf32x (_Float32x __x) noexcept (true); extern _Float32x __acosf32x (_Float32x __x) noexcept (true); + + extern _Float32x asinf32x (_Float32x __x) noexcept (true); extern _Float32x __asinf32x (_Float32x __x) noexcept (true); + + extern _Float32x atanf32x (_Float32x __x) noexcept (true); extern _Float32x __atanf32x (_Float32x __x) noexcept (true); + + extern _Float32x atan2f32x (_Float32x __y, _Float32x __x) noexcept (true); extern _Float32x __atan2f32x (_Float32x __y, _Float32x __x) noexcept (true); + + + extern _Float32x cosf32x (_Float32x __x) noexcept (true); extern _Float32x __cosf32x (_Float32x __x) noexcept (true); + + extern _Float32x sinf32x (_Float32x __x) noexcept (true); extern _Float32x __sinf32x (_Float32x __x) noexcept (true); + + extern _Float32x tanf32x (_Float32x __x) noexcept (true); extern _Float32x __tanf32x (_Float32x __x) noexcept (true); + + + + + extern _Float32x coshf32x (_Float32x __x) noexcept (true); extern _Float32x __coshf32x (_Float32x __x) noexcept (true); + + extern _Float32x sinhf32x (_Float32x __x) noexcept (true); extern _Float32x __sinhf32x (_Float32x __x) noexcept (true); + + extern _Float32x tanhf32x (_Float32x __x) noexcept (true); extern _Float32x __tanhf32x (_Float32x __x) noexcept (true); + + + + extern void sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) noexcept (true); extern void __sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) noexcept (true) + ; + + + + + extern _Float32x acoshf32x (_Float32x __x) noexcept (true); extern _Float32x __acoshf32x (_Float32x __x) noexcept (true); + + extern _Float32x asinhf32x (_Float32x __x) noexcept (true); extern _Float32x __asinhf32x (_Float32x __x) noexcept (true); + + extern _Float32x atanhf32x (_Float32x __x) noexcept (true); extern _Float32x __atanhf32x (_Float32x __x) noexcept (true); + + + + + + extern _Float32x expf32x (_Float32x __x) noexcept (true); extern _Float32x __expf32x (_Float32x __x) noexcept (true); + + +extern _Float32x frexpf32x (_Float32x __x, int *__exponent) noexcept (true); extern _Float32x __frexpf32x (_Float32x __x, int *__exponent) noexcept (true); + + +extern _Float32x ldexpf32x (_Float32x __x, int __exponent) noexcept (true); extern _Float32x __ldexpf32x (_Float32x __x, int __exponent) noexcept (true); + + + extern _Float32x logf32x (_Float32x __x) noexcept (true); extern _Float32x __logf32x (_Float32x __x) noexcept (true); + + + extern _Float32x log10f32x (_Float32x __x) noexcept (true); extern _Float32x __log10f32x (_Float32x __x) noexcept (true); + + +extern _Float32x modff32x (_Float32x __x, _Float32x *__iptr) noexcept (true); extern _Float32x __modff32x (_Float32x __x, _Float32x *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + extern _Float32x exp10f32x (_Float32x __x) noexcept (true); extern _Float32x __exp10f32x (_Float32x __x) noexcept (true); + + + + + extern _Float32x expm1f32x (_Float32x __x) noexcept (true); extern _Float32x __expm1f32x (_Float32x __x) noexcept (true); + + + extern _Float32x log1pf32x (_Float32x __x) noexcept (true); extern _Float32x __log1pf32x (_Float32x __x) noexcept (true); + + +extern _Float32x logbf32x (_Float32x __x) noexcept (true); extern _Float32x __logbf32x (_Float32x __x) noexcept (true); + + + + + extern _Float32x exp2f32x (_Float32x __x) noexcept (true); extern _Float32x __exp2f32x (_Float32x __x) noexcept (true); + + + extern _Float32x log2f32x (_Float32x __x) noexcept (true); extern _Float32x __log2f32x (_Float32x __x) noexcept (true); + + + + + + + extern _Float32x powf32x (_Float32x __x, _Float32x __y) noexcept (true); extern _Float32x __powf32x (_Float32x __x, _Float32x __y) noexcept (true); + + +extern _Float32x sqrtf32x (_Float32x __x) noexcept (true); extern _Float32x __sqrtf32x (_Float32x __x) noexcept (true); + + + + extern _Float32x hypotf32x (_Float32x __x, _Float32x __y) noexcept (true); extern _Float32x __hypotf32x (_Float32x __x, _Float32x __y) noexcept (true); + + + + + extern _Float32x cbrtf32x (_Float32x __x) noexcept (true); extern _Float32x __cbrtf32x (_Float32x __x) noexcept (true); + + + + + + +extern _Float32x ceilf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); extern _Float32x __ceilf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32x fabsf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fabsf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32x floorf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); extern _Float32x __floorf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32x fmodf32x (_Float32x __x, _Float32x __y) noexcept (true); extern _Float32x __fmodf32x (_Float32x __x, _Float32x __y) noexcept (true); +# 198 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float32x copysignf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __copysignf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float32x nanf32x (const char *__tagb) noexcept (true); extern _Float32x __nanf32x (const char *__tagb) noexcept (true); +# 220 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float32x j0f32x (_Float32x) noexcept (true); extern _Float32x __j0f32x (_Float32x) noexcept (true); +extern _Float32x j1f32x (_Float32x) noexcept (true); extern _Float32x __j1f32x (_Float32x) noexcept (true); +extern _Float32x jnf32x (int, _Float32x) noexcept (true); extern _Float32x __jnf32x (int, _Float32x) noexcept (true); +extern _Float32x y0f32x (_Float32x) noexcept (true); extern _Float32x __y0f32x (_Float32x) noexcept (true); +extern _Float32x y1f32x (_Float32x) noexcept (true); extern _Float32x __y1f32x (_Float32x) noexcept (true); +extern _Float32x ynf32x (int, _Float32x) noexcept (true); extern _Float32x __ynf32x (int, _Float32x) noexcept (true); + + + + + + extern _Float32x erff32x (_Float32x) noexcept (true); extern _Float32x __erff32x (_Float32x) noexcept (true); + extern _Float32x erfcf32x (_Float32x) noexcept (true); extern _Float32x __erfcf32x (_Float32x) noexcept (true); +extern _Float32x lgammaf32x (_Float32x) noexcept (true); extern _Float32x __lgammaf32x (_Float32x) noexcept (true); + + + + +extern _Float32x tgammaf32x (_Float32x) noexcept (true); extern _Float32x __tgammaf32x (_Float32x) noexcept (true); +# 252 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float32x lgammaf32x_r (_Float32x, int *__signgamp) noexcept (true); extern _Float32x __lgammaf32x_r (_Float32x, int *__signgamp) noexcept (true); + + + + + + +extern _Float32x rintf32x (_Float32x __x) noexcept (true); extern _Float32x __rintf32x (_Float32x __x) noexcept (true); + + +extern _Float32x nextafterf32x (_Float32x __x, _Float32x __y) noexcept (true); extern _Float32x __nextafterf32x (_Float32x __x, _Float32x __y) noexcept (true); + + + + + + +extern _Float32x nextdownf32x (_Float32x __x) noexcept (true); extern _Float32x __nextdownf32x (_Float32x __x) noexcept (true); + +extern _Float32x nextupf32x (_Float32x __x) noexcept (true); extern _Float32x __nextupf32x (_Float32x __x) noexcept (true); + + + +extern _Float32x remainderf32x (_Float32x __x, _Float32x __y) noexcept (true); extern _Float32x __remainderf32x (_Float32x __x, _Float32x __y) noexcept (true); + + + +extern _Float32x scalbnf32x (_Float32x __x, int __n) noexcept (true); extern _Float32x __scalbnf32x (_Float32x __x, int __n) noexcept (true); + + + +extern int ilogbf32x (_Float32x __x) noexcept (true); extern int __ilogbf32x (_Float32x __x) noexcept (true); + + + + +extern long int llogbf32x (_Float32x __x) noexcept (true); extern long int __llogbf32x (_Float32x __x) noexcept (true); + + + + +extern _Float32x scalblnf32x (_Float32x __x, long int __n) noexcept (true); extern _Float32x __scalblnf32x (_Float32x __x, long int __n) noexcept (true); + + + +extern _Float32x nearbyintf32x (_Float32x __x) noexcept (true); extern _Float32x __nearbyintf32x (_Float32x __x) noexcept (true); + + + +extern _Float32x roundf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); extern _Float32x __roundf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); + + + +extern _Float32x truncf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); extern _Float32x __truncf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float32x remquof32x (_Float32x __x, _Float32x __y, int *__quo) noexcept (true); extern _Float32x __remquof32x (_Float32x __x, _Float32x __y, int *__quo) noexcept (true); + + + + + + +extern long int lrintf32x (_Float32x __x) noexcept (true); extern long int __lrintf32x (_Float32x __x) noexcept (true); +__extension__ +extern long long int llrintf32x (_Float32x __x) noexcept (true); extern long long int __llrintf32x (_Float32x __x) noexcept (true); + + + +extern long int lroundf32x (_Float32x __x) noexcept (true); extern long int __lroundf32x (_Float32x __x) noexcept (true); +__extension__ +extern long long int llroundf32x (_Float32x __x) noexcept (true); extern long long int __llroundf32x (_Float32x __x) noexcept (true); + + + +extern _Float32x fdimf32x (_Float32x __x, _Float32x __y) noexcept (true); extern _Float32x __fdimf32x (_Float32x __x, _Float32x __y) noexcept (true); + + + +extern _Float32x fmaxf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fmaxf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32x fminf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fminf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); + + + +extern _Float32x fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) noexcept (true); extern _Float32x __fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) noexcept (true); + + + + +extern _Float32x roundevenf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); extern _Float32x __roundevenf32x (_Float32x __x) noexcept (true) __attribute__ ((__const__)); + + + +extern __intmax_t fromfpf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true) + ; + + + +extern __uintmax_t ufromfpf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __intmax_t fromfpxf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __uintmax_t ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) noexcept (true) + ; + + +extern int canonicalizef32x (_Float32x *__cx, const _Float32x *__x) noexcept (true); + + + + + + +extern _Float32x fmaxmagf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fmaxmagf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32x fminmagf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fminmagf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float32x fmaximumf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fmaximumf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32x fminimumf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fminimumf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32x fmaximum_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fmaximum_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32x fminimum_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fminimum_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32x fmaximum_magf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fmaximum_magf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32x fminimum_magf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fminimum_magf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32x fmaximum_mag_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fmaximum_mag_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float32x fminimum_mag_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); extern _Float32x __fminimum_mag_numf32x (_Float32x __x, _Float32x __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern int totalorderf32x (const _Float32x *__x, const _Float32x *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern int totalordermagf32x (const _Float32x *__x, const _Float32x *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern _Float32x getpayloadf32x (const _Float32x *__x) noexcept (true); extern _Float32x __getpayloadf32x (const _Float32x *__x) noexcept (true); + + +extern int setpayloadf32x (_Float32x *__x, _Float32x __payload) noexcept (true); + + +extern int setpayloadsigf32x (_Float32x *__x, _Float32x __payload) noexcept (true); +# 502 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 518 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 1 3 +# 53 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 + extern _Float64x acosf64x (_Float64x __x) noexcept (true); extern _Float64x __acosf64x (_Float64x __x) noexcept (true); + + extern _Float64x asinf64x (_Float64x __x) noexcept (true); extern _Float64x __asinf64x (_Float64x __x) noexcept (true); + + extern _Float64x atanf64x (_Float64x __x) noexcept (true); extern _Float64x __atanf64x (_Float64x __x) noexcept (true); + + extern _Float64x atan2f64x (_Float64x __y, _Float64x __x) noexcept (true); extern _Float64x __atan2f64x (_Float64x __y, _Float64x __x) noexcept (true); + + + extern _Float64x cosf64x (_Float64x __x) noexcept (true); extern _Float64x __cosf64x (_Float64x __x) noexcept (true); + + extern _Float64x sinf64x (_Float64x __x) noexcept (true); extern _Float64x __sinf64x (_Float64x __x) noexcept (true); + + extern _Float64x tanf64x (_Float64x __x) noexcept (true); extern _Float64x __tanf64x (_Float64x __x) noexcept (true); + + + + + extern _Float64x coshf64x (_Float64x __x) noexcept (true); extern _Float64x __coshf64x (_Float64x __x) noexcept (true); + + extern _Float64x sinhf64x (_Float64x __x) noexcept (true); extern _Float64x __sinhf64x (_Float64x __x) noexcept (true); + + extern _Float64x tanhf64x (_Float64x __x) noexcept (true); extern _Float64x __tanhf64x (_Float64x __x) noexcept (true); + + + + extern void sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) noexcept (true); extern void __sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) noexcept (true) + ; + + + + + extern _Float64x acoshf64x (_Float64x __x) noexcept (true); extern _Float64x __acoshf64x (_Float64x __x) noexcept (true); + + extern _Float64x asinhf64x (_Float64x __x) noexcept (true); extern _Float64x __asinhf64x (_Float64x __x) noexcept (true); + + extern _Float64x atanhf64x (_Float64x __x) noexcept (true); extern _Float64x __atanhf64x (_Float64x __x) noexcept (true); + + + + + + extern _Float64x expf64x (_Float64x __x) noexcept (true); extern _Float64x __expf64x (_Float64x __x) noexcept (true); + + +extern _Float64x frexpf64x (_Float64x __x, int *__exponent) noexcept (true); extern _Float64x __frexpf64x (_Float64x __x, int *__exponent) noexcept (true); + + +extern _Float64x ldexpf64x (_Float64x __x, int __exponent) noexcept (true); extern _Float64x __ldexpf64x (_Float64x __x, int __exponent) noexcept (true); + + + extern _Float64x logf64x (_Float64x __x) noexcept (true); extern _Float64x __logf64x (_Float64x __x) noexcept (true); + + + extern _Float64x log10f64x (_Float64x __x) noexcept (true); extern _Float64x __log10f64x (_Float64x __x) noexcept (true); + + +extern _Float64x modff64x (_Float64x __x, _Float64x *__iptr) noexcept (true); extern _Float64x __modff64x (_Float64x __x, _Float64x *__iptr) noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + extern _Float64x exp10f64x (_Float64x __x) noexcept (true); extern _Float64x __exp10f64x (_Float64x __x) noexcept (true); + + + + + extern _Float64x expm1f64x (_Float64x __x) noexcept (true); extern _Float64x __expm1f64x (_Float64x __x) noexcept (true); + + + extern _Float64x log1pf64x (_Float64x __x) noexcept (true); extern _Float64x __log1pf64x (_Float64x __x) noexcept (true); + + +extern _Float64x logbf64x (_Float64x __x) noexcept (true); extern _Float64x __logbf64x (_Float64x __x) noexcept (true); + + + + + extern _Float64x exp2f64x (_Float64x __x) noexcept (true); extern _Float64x __exp2f64x (_Float64x __x) noexcept (true); + + + extern _Float64x log2f64x (_Float64x __x) noexcept (true); extern _Float64x __log2f64x (_Float64x __x) noexcept (true); + + + + + + + extern _Float64x powf64x (_Float64x __x, _Float64x __y) noexcept (true); extern _Float64x __powf64x (_Float64x __x, _Float64x __y) noexcept (true); + + +extern _Float64x sqrtf64x (_Float64x __x) noexcept (true); extern _Float64x __sqrtf64x (_Float64x __x) noexcept (true); + + + + extern _Float64x hypotf64x (_Float64x __x, _Float64x __y) noexcept (true); extern _Float64x __hypotf64x (_Float64x __x, _Float64x __y) noexcept (true); + + + + + extern _Float64x cbrtf64x (_Float64x __x) noexcept (true); extern _Float64x __cbrtf64x (_Float64x __x) noexcept (true); + + + + + + +extern _Float64x ceilf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); extern _Float64x __ceilf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64x fabsf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fabsf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64x floorf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); extern _Float64x __floorf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64x fmodf64x (_Float64x __x, _Float64x __y) noexcept (true); extern _Float64x __fmodf64x (_Float64x __x, _Float64x __y) noexcept (true); +# 198 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float64x copysignf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __copysignf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float64x nanf64x (const char *__tagb) noexcept (true); extern _Float64x __nanf64x (const char *__tagb) noexcept (true); +# 220 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float64x j0f64x (_Float64x) noexcept (true); extern _Float64x __j0f64x (_Float64x) noexcept (true); +extern _Float64x j1f64x (_Float64x) noexcept (true); extern _Float64x __j1f64x (_Float64x) noexcept (true); +extern _Float64x jnf64x (int, _Float64x) noexcept (true); extern _Float64x __jnf64x (int, _Float64x) noexcept (true); +extern _Float64x y0f64x (_Float64x) noexcept (true); extern _Float64x __y0f64x (_Float64x) noexcept (true); +extern _Float64x y1f64x (_Float64x) noexcept (true); extern _Float64x __y1f64x (_Float64x) noexcept (true); +extern _Float64x ynf64x (int, _Float64x) noexcept (true); extern _Float64x __ynf64x (int, _Float64x) noexcept (true); + + + + + + extern _Float64x erff64x (_Float64x) noexcept (true); extern _Float64x __erff64x (_Float64x) noexcept (true); + extern _Float64x erfcf64x (_Float64x) noexcept (true); extern _Float64x __erfcf64x (_Float64x) noexcept (true); +extern _Float64x lgammaf64x (_Float64x) noexcept (true); extern _Float64x __lgammaf64x (_Float64x) noexcept (true); + + + + +extern _Float64x tgammaf64x (_Float64x) noexcept (true); extern _Float64x __tgammaf64x (_Float64x) noexcept (true); +# 252 "/usr/riscv64-linux-gnu/include/bits/mathcalls.h" 3 +extern _Float64x lgammaf64x_r (_Float64x, int *__signgamp) noexcept (true); extern _Float64x __lgammaf64x_r (_Float64x, int *__signgamp) noexcept (true); + + + + + + +extern _Float64x rintf64x (_Float64x __x) noexcept (true); extern _Float64x __rintf64x (_Float64x __x) noexcept (true); + + +extern _Float64x nextafterf64x (_Float64x __x, _Float64x __y) noexcept (true); extern _Float64x __nextafterf64x (_Float64x __x, _Float64x __y) noexcept (true); + + + + + + +extern _Float64x nextdownf64x (_Float64x __x) noexcept (true); extern _Float64x __nextdownf64x (_Float64x __x) noexcept (true); + +extern _Float64x nextupf64x (_Float64x __x) noexcept (true); extern _Float64x __nextupf64x (_Float64x __x) noexcept (true); + + + +extern _Float64x remainderf64x (_Float64x __x, _Float64x __y) noexcept (true); extern _Float64x __remainderf64x (_Float64x __x, _Float64x __y) noexcept (true); + + + +extern _Float64x scalbnf64x (_Float64x __x, int __n) noexcept (true); extern _Float64x __scalbnf64x (_Float64x __x, int __n) noexcept (true); + + + +extern int ilogbf64x (_Float64x __x) noexcept (true); extern int __ilogbf64x (_Float64x __x) noexcept (true); + + + + +extern long int llogbf64x (_Float64x __x) noexcept (true); extern long int __llogbf64x (_Float64x __x) noexcept (true); + + + + +extern _Float64x scalblnf64x (_Float64x __x, long int __n) noexcept (true); extern _Float64x __scalblnf64x (_Float64x __x, long int __n) noexcept (true); + + + +extern _Float64x nearbyintf64x (_Float64x __x) noexcept (true); extern _Float64x __nearbyintf64x (_Float64x __x) noexcept (true); + + + +extern _Float64x roundf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); extern _Float64x __roundf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); + + + +extern _Float64x truncf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); extern _Float64x __truncf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float64x remquof64x (_Float64x __x, _Float64x __y, int *__quo) noexcept (true); extern _Float64x __remquof64x (_Float64x __x, _Float64x __y, int *__quo) noexcept (true); + + + + + + +extern long int lrintf64x (_Float64x __x) noexcept (true); extern long int __lrintf64x (_Float64x __x) noexcept (true); +__extension__ +extern long long int llrintf64x (_Float64x __x) noexcept (true); extern long long int __llrintf64x (_Float64x __x) noexcept (true); + + + +extern long int lroundf64x (_Float64x __x) noexcept (true); extern long int __lroundf64x (_Float64x __x) noexcept (true); +__extension__ +extern long long int llroundf64x (_Float64x __x) noexcept (true); extern long long int __llroundf64x (_Float64x __x) noexcept (true); + + + +extern _Float64x fdimf64x (_Float64x __x, _Float64x __y) noexcept (true); extern _Float64x __fdimf64x (_Float64x __x, _Float64x __y) noexcept (true); + + + +extern _Float64x fmaxf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fmaxf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64x fminf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fminf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); + + + +extern _Float64x fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) noexcept (true); extern _Float64x __fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) noexcept (true); + + + + +extern _Float64x roundevenf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); extern _Float64x __roundevenf64x (_Float64x __x) noexcept (true) __attribute__ ((__const__)); + + + +extern __intmax_t fromfpf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true) + ; + + + +extern __uintmax_t ufromfpf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __intmax_t fromfpxf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true); extern __intmax_t __fromfpxf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true) + ; + + + + +extern __uintmax_t ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true); extern __uintmax_t __ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) noexcept (true) + ; + + +extern int canonicalizef64x (_Float64x *__cx, const _Float64x *__x) noexcept (true); + + + + + + +extern _Float64x fmaxmagf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fmaxmagf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64x fminmagf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fminmagf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern _Float64x fmaximumf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fmaximumf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64x fminimumf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fminimumf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64x fmaximum_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fmaximum_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64x fminimum_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fminimum_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64x fmaximum_magf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fmaximum_magf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64x fminimum_magf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fminimum_magf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64x fmaximum_mag_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fmaximum_mag_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); + + +extern _Float64x fminimum_mag_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); extern _Float64x __fminimum_mag_numf64x (_Float64x __x, _Float64x __y) noexcept (true) __attribute__ ((__const__)); + + + + +extern int totalorderf64x (const _Float64x *__x, const _Float64x *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern int totalordermagf64x (const _Float64x *__x, const _Float64x *__y) noexcept (true) + + __attribute__ ((__pure__)); + + +extern _Float64x getpayloadf64x (const _Float64x *__x) noexcept (true); extern _Float64x __getpayloadf64x (const _Float64x *__x) noexcept (true); + + +extern int setpayloadf64x (_Float64x *__x, _Float64x __payload) noexcept (true); + + +extern int setpayloadsigf64x (_Float64x *__x, _Float64x __payload) noexcept (true); +# 519 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 566 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 3 +extern float fadd (double __x, double __y) noexcept (true); + + +extern float fdiv (double __x, double __y) noexcept (true); + + +extern float ffma (double __x, double __y, double __z) noexcept (true); + + +extern float fmul (double __x, double __y) noexcept (true); + + +extern float fsqrt (double __x) noexcept (true); + + +extern float fsub (double __x, double __y) noexcept (true); +# 567 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 587 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 3 +extern float faddl (long double __x, long double __y) noexcept (true); + + +extern float fdivl (long double __x, long double __y) noexcept (true); + + +extern float ffmal (long double __x, long double __y, long double __z) noexcept (true); + + +extern float fmull (long double __x, long double __y) noexcept (true); + + +extern float fsqrtl (long double __x) noexcept (true); + + +extern float fsubl (long double __x, long double __y) noexcept (true); +# 588 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 616 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 3 +extern double daddl (long double __x, long double __y) noexcept (true); + + +extern double ddivl (long double __x, long double __y) noexcept (true); + + +extern double dfmal (long double __x, long double __y, long double __z) noexcept (true); + + +extern double dmull (long double __x, long double __y) noexcept (true); + + +extern double dsqrtl (long double __x) noexcept (true); + + +extern double dsubl (long double __x, long double __y) noexcept (true); +# 617 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 697 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 3 +extern _Float32 f32addf32x (_Float32x __x, _Float32x __y) noexcept (true); + + +extern _Float32 f32divf32x (_Float32x __x, _Float32x __y) noexcept (true); + + +extern _Float32 f32fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) noexcept (true); + + +extern _Float32 f32mulf32x (_Float32x __x, _Float32x __y) noexcept (true); + + +extern _Float32 f32sqrtf32x (_Float32x __x) noexcept (true); + + +extern _Float32 f32subf32x (_Float32x __x, _Float32x __y) noexcept (true); +# 698 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 707 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 3 +extern _Float32 f32addf64 (_Float64 __x, _Float64 __y) noexcept (true); + + +extern _Float32 f32divf64 (_Float64 __x, _Float64 __y) noexcept (true); + + +extern _Float32 f32fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) noexcept (true); + + +extern _Float32 f32mulf64 (_Float64 __x, _Float64 __y) noexcept (true); + + +extern _Float32 f32sqrtf64 (_Float64 __x) noexcept (true); + + +extern _Float32 f32subf64 (_Float64 __x, _Float64 __y) noexcept (true); +# 708 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 717 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 3 +extern _Float32 f32addf64x (_Float64x __x, _Float64x __y) noexcept (true); + + +extern _Float32 f32divf64x (_Float64x __x, _Float64x __y) noexcept (true); + + +extern _Float32 f32fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) noexcept (true); + + +extern _Float32 f32mulf64x (_Float64x __x, _Float64x __y) noexcept (true); + + +extern _Float32 f32sqrtf64x (_Float64x __x) noexcept (true); + + +extern _Float32 f32subf64x (_Float64x __x, _Float64x __y) noexcept (true); +# 718 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 727 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 3 +extern _Float32 f32addf128 (_Float128 __x, _Float128 __y) noexcept (true); + + +extern _Float32 f32divf128 (_Float128 __x, _Float128 __y) noexcept (true); + + +extern _Float32 f32fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) noexcept (true); + + +extern _Float32 f32mulf128 (_Float128 __x, _Float128 __y) noexcept (true); + + +extern _Float32 f32sqrtf128 (_Float128 __x) noexcept (true); + + +extern _Float32 f32subf128 (_Float128 __x, _Float128 __y) noexcept (true); +# 728 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 747 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 3 +extern _Float32x f32xaddf64 (_Float64 __x, _Float64 __y) noexcept (true); + + +extern _Float32x f32xdivf64 (_Float64 __x, _Float64 __y) noexcept (true); + + +extern _Float32x f32xfmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) noexcept (true); + + +extern _Float32x f32xmulf64 (_Float64 __x, _Float64 __y) noexcept (true); + + +extern _Float32x f32xsqrtf64 (_Float64 __x) noexcept (true); + + +extern _Float32x f32xsubf64 (_Float64 __x, _Float64 __y) noexcept (true); +# 748 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 757 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 3 +extern _Float32x f32xaddf64x (_Float64x __x, _Float64x __y) noexcept (true); + + +extern _Float32x f32xdivf64x (_Float64x __x, _Float64x __y) noexcept (true); + + +extern _Float32x f32xfmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) noexcept (true); + + +extern _Float32x f32xmulf64x (_Float64x __x, _Float64x __y) noexcept (true); + + +extern _Float32x f32xsqrtf64x (_Float64x __x) noexcept (true); + + +extern _Float32x f32xsubf64x (_Float64x __x, _Float64x __y) noexcept (true); +# 758 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 767 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 3 +extern _Float32x f32xaddf128 (_Float128 __x, _Float128 __y) noexcept (true); + + +extern _Float32x f32xdivf128 (_Float128 __x, _Float128 __y) noexcept (true); + + +extern _Float32x f32xfmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) noexcept (true); + + +extern _Float32x f32xmulf128 (_Float128 __x, _Float128 __y) noexcept (true); + + +extern _Float32x f32xsqrtf128 (_Float128 __x) noexcept (true); + + +extern _Float32x f32xsubf128 (_Float128 __x, _Float128 __y) noexcept (true); +# 768 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 787 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 3 +extern _Float64 f64addf64x (_Float64x __x, _Float64x __y) noexcept (true); + + +extern _Float64 f64divf64x (_Float64x __x, _Float64x __y) noexcept (true); + + +extern _Float64 f64fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) noexcept (true); + + +extern _Float64 f64mulf64x (_Float64x __x, _Float64x __y) noexcept (true); + + +extern _Float64 f64sqrtf64x (_Float64x __x) noexcept (true); + + +extern _Float64 f64subf64x (_Float64x __x, _Float64x __y) noexcept (true); +# 788 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 797 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 3 +extern _Float64 f64addf128 (_Float128 __x, _Float128 __y) noexcept (true); + + +extern _Float64 f64divf128 (_Float128 __x, _Float128 __y) noexcept (true); + + +extern _Float64 f64fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) noexcept (true); + + +extern _Float64 f64mulf128 (_Float128 __x, _Float128 __y) noexcept (true); + + +extern _Float64 f64sqrtf128 (_Float128 __x) noexcept (true); + + +extern _Float64 f64subf128 (_Float128 __x, _Float128 __y) noexcept (true); +# 798 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 817 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/mathcalls-narrow.h" 3 +extern _Float64x f64xaddf128 (_Float128 __x, _Float128 __y) noexcept (true); + + +extern _Float64x f64xdivf128 (_Float128 __x, _Float128 __y) noexcept (true); + + +extern _Float64x f64xfmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) noexcept (true); + + +extern _Float64x f64xmulf128 (_Float128 __x, _Float128 __y) noexcept (true); + + +extern _Float64x f64xsqrtf128 (_Float128 __x) noexcept (true); + + +extern _Float64x f64xsubf128 (_Float128 __x, _Float128 __y) noexcept (true); +# 818 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 854 "/usr/riscv64-linux-gnu/include/math.h" 3 +extern int signgam; +# 934 "/usr/riscv64-linux-gnu/include/math.h" 3 +enum + { + FP_NAN = + + 0, + FP_INFINITE = + + 1, + FP_ZERO = + + 2, + FP_SUBNORMAL = + + 3, + FP_NORMAL = + + 4 + }; +# 1054 "/usr/riscv64-linux-gnu/include/math.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/iscanonical.h" 1 3 +# 1055 "/usr/riscv64-linux-gnu/include/math.h" 2 3 +# 1066 "/usr/riscv64-linux-gnu/include/math.h" 3 +extern "C++" { +inline int issignaling (float __val) { return __issignalingf (__val); } +inline int issignaling (double __val) { return __issignaling (__val); } +inline int +issignaling (long double __val) +{ + + + + return __issignalingl (__val); + +} + + + + + +} +# 1097 "/usr/riscv64-linux-gnu/include/math.h" 3 +extern "C++" { +# 1128 "/usr/riscv64-linux-gnu/include/math.h" 3 +template inline bool +iszero (__T __val) +{ + return __val == 0; +} + +} +# 1363 "/usr/riscv64-linux-gnu/include/math.h" 3 +extern "C++" { +template struct __iseqsig_type; + +template<> struct __iseqsig_type +{ + static int __call (float __x, float __y) throw () + { + return __iseqsigf (__x, __y); + } +}; + +template<> struct __iseqsig_type +{ + static int __call (double __x, double __y) throw () + { + return __iseqsig (__x, __y); + } +}; + +template<> struct __iseqsig_type +{ + static int __call (long double __x, long double __y) throw () + { + + return __iseqsigl (__x, __y); + + + + } +}; +# 1406 "/usr/riscv64-linux-gnu/include/math.h" 3 +template +inline int +iseqsig (_T1 __x, _T2 __y) throw () +{ + + typedef decltype (((__x) + (__y) + 0.0f)) _T3; + + + + return __iseqsig_type<_T3>::__call (__x, __y); +} + +} + + + + +} +# 46 "/usr/riscv64-linux-gnu/include/c++/11/cmath" 2 3 +# 77 "/usr/riscv64-linux-gnu/include/c++/11/cmath" 3 +extern "C++" +{ +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + using ::acos; + + + inline constexpr float + acos(float __x) + { return __builtin_acosf(__x); } + + inline constexpr long double + acos(long double __x) + { return __builtin_acosl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + acos(_Tp __x) + { return __builtin_acos(__x); } + + using ::asin; + + + inline constexpr float + asin(float __x) + { return __builtin_asinf(__x); } + + inline constexpr long double + asin(long double __x) + { return __builtin_asinl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + asin(_Tp __x) + { return __builtin_asin(__x); } + + using ::atan; + + + inline constexpr float + atan(float __x) + { return __builtin_atanf(__x); } + + inline constexpr long double + atan(long double __x) + { return __builtin_atanl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + atan(_Tp __x) + { return __builtin_atan(__x); } + + using ::atan2; + + + inline constexpr float + atan2(float __y, float __x) + { return __builtin_atan2f(__y, __x); } + + inline constexpr long double + atan2(long double __y, long double __x) + { return __builtin_atan2l(__y, __x); } + + + template + inline constexpr + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + atan2(_Tp __y, _Up __x) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return atan2(__type(__y), __type(__x)); + } + + using ::ceil; + + + inline constexpr float + ceil(float __x) + { return __builtin_ceilf(__x); } + + inline constexpr long double + ceil(long double __x) + { return __builtin_ceill(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + ceil(_Tp __x) + { return __builtin_ceil(__x); } + + using ::cos; + + + inline constexpr float + cos(float __x) + { return __builtin_cosf(__x); } + + inline constexpr long double + cos(long double __x) + { return __builtin_cosl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cos(_Tp __x) + { return __builtin_cos(__x); } + + using ::cosh; + + + inline constexpr float + cosh(float __x) + { return __builtin_coshf(__x); } + + inline constexpr long double + cosh(long double __x) + { return __builtin_coshl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cosh(_Tp __x) + { return __builtin_cosh(__x); } + + using ::exp; + + + inline constexpr float + exp(float __x) + { return __builtin_expf(__x); } + + inline constexpr long double + exp(long double __x) + { return __builtin_expl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + exp(_Tp __x) + { return __builtin_exp(__x); } + + using ::fabs; + + + inline constexpr float + fabs(float __x) + { return __builtin_fabsf(__x); } + + inline constexpr long double + fabs(long double __x) + { return __builtin_fabsl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + fabs(_Tp __x) + { return __builtin_fabs(__x); } + + using ::floor; + + + inline constexpr float + floor(float __x) + { return __builtin_floorf(__x); } + + inline constexpr long double + floor(long double __x) + { return __builtin_floorl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + floor(_Tp __x) + { return __builtin_floor(__x); } + + using ::fmod; + + + inline constexpr float + fmod(float __x, float __y) + { return __builtin_fmodf(__x, __y); } + + inline constexpr long double + fmod(long double __x, long double __y) + { return __builtin_fmodl(__x, __y); } + + + template + inline constexpr + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + fmod(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return fmod(__type(__x), __type(__y)); + } + + using ::frexp; + + + inline float + frexp(float __x, int* __exp) + { return __builtin_frexpf(__x, __exp); } + + inline long double + frexp(long double __x, int* __exp) + { return __builtin_frexpl(__x, __exp); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + frexp(_Tp __x, int* __exp) + { return __builtin_frexp(__x, __exp); } + + using ::ldexp; + + + inline constexpr float + ldexp(float __x, int __exp) + { return __builtin_ldexpf(__x, __exp); } + + inline constexpr long double + ldexp(long double __x, int __exp) + { return __builtin_ldexpl(__x, __exp); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + ldexp(_Tp __x, int __exp) + { return __builtin_ldexp(__x, __exp); } + + using ::log; + + + inline constexpr float + log(float __x) + { return __builtin_logf(__x); } + + inline constexpr long double + log(long double __x) + { return __builtin_logl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log(_Tp __x) + { return __builtin_log(__x); } + + using ::log10; + + + inline constexpr float + log10(float __x) + { return __builtin_log10f(__x); } + + inline constexpr long double + log10(long double __x) + { return __builtin_log10l(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log10(_Tp __x) + { return __builtin_log10(__x); } + + using ::modf; + + + inline float + modf(float __x, float* __iptr) + { return __builtin_modff(__x, __iptr); } + + inline long double + modf(long double __x, long double* __iptr) + { return __builtin_modfl(__x, __iptr); } + + + using ::pow; + + + inline constexpr float + pow(float __x, float __y) + { return __builtin_powf(__x, __y); } + + inline constexpr long double + pow(long double __x, long double __y) + { return __builtin_powl(__x, __y); } +# 412 "/usr/riscv64-linux-gnu/include/c++/11/cmath" 3 + template + inline constexpr + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + pow(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return pow(__type(__x), __type(__y)); + } + + using ::sin; + + + inline constexpr float + sin(float __x) + { return __builtin_sinf(__x); } + + inline constexpr long double + sin(long double __x) + { return __builtin_sinl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sin(_Tp __x) + { return __builtin_sin(__x); } + + using ::sinh; + + + inline constexpr float + sinh(float __x) + { return __builtin_sinhf(__x); } + + inline constexpr long double + sinh(long double __x) + { return __builtin_sinhl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sinh(_Tp __x) + { return __builtin_sinh(__x); } + + using ::sqrt; + + + inline constexpr float + sqrt(float __x) + { return __builtin_sqrtf(__x); } + + inline constexpr long double + sqrt(long double __x) + { return __builtin_sqrtl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sqrt(_Tp __x) + { return __builtin_sqrt(__x); } + + using ::tan; + + + inline constexpr float + tan(float __x) + { return __builtin_tanf(__x); } + + inline constexpr long double + tan(long double __x) + { return __builtin_tanl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tan(_Tp __x) + { return __builtin_tan(__x); } + + using ::tanh; + + + inline constexpr float + tanh(float __x) + { return __builtin_tanhf(__x); } + + inline constexpr long double + tanh(long double __x) + { return __builtin_tanhl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tanh(_Tp __x) + { return __builtin_tanh(__x); } +# 536 "/usr/riscv64-linux-gnu/include/c++/11/cmath" 3 + constexpr int + fpclassify(float __x) + { return __builtin_fpclassify(0, 1, 4, + 3, 2, __x); } + + constexpr int + fpclassify(double __x) + { return __builtin_fpclassify(0, 1, 4, + 3, 2, __x); } + + constexpr int + fpclassify(long double __x) + { return __builtin_fpclassify(0, 1, 4, + 3, 2, __x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + int>::__type + fpclassify(_Tp __x) + { return __x != 0 ? 4 : 2; } + + + + constexpr bool + isfinite(float __x) + { return __builtin_isfinite(__x); } + + constexpr bool + isfinite(double __x) + { return __builtin_isfinite(__x); } + + constexpr bool + isfinite(long double __x) + { return __builtin_isfinite(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + isfinite(_Tp __x) + { return true; } + + + + constexpr bool + isinf(float __x) + { return __builtin_isinf(__x); } + + + + + + constexpr bool + isinf(double __x) + { return __builtin_isinf(__x); } + + + constexpr bool + isinf(long double __x) + { return __builtin_isinf(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + isinf(_Tp __x) + { return false; } + + + + constexpr bool + isnan(float __x) + { return __builtin_isnan(__x); } + + + + + + constexpr bool + isnan(double __x) + { return __builtin_isnan(__x); } + + + constexpr bool + isnan(long double __x) + { return __builtin_isnan(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + isnan(_Tp __x) + { return false; } + + + + constexpr bool + isnormal(float __x) + { return __builtin_isnormal(__x); } + + constexpr bool + isnormal(double __x) + { return __builtin_isnormal(__x); } + + constexpr bool + isnormal(long double __x) + { return __builtin_isnormal(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + isnormal(_Tp __x) + { return __x != 0 ? true : false; } + + + + + constexpr bool + signbit(float __x) + { return __builtin_signbit(__x); } + + constexpr bool + signbit(double __x) + { return __builtin_signbit(__x); } + + constexpr bool + signbit(long double __x) + { return __builtin_signbit(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + signbit(_Tp __x) + { return __x < 0 ? true : false; } + + + + constexpr bool + isgreater(float __x, float __y) + { return __builtin_isgreater(__x, __y); } + + constexpr bool + isgreater(double __x, double __y) + { return __builtin_isgreater(__x, __y); } + + constexpr bool + isgreater(long double __x, long double __y) + { return __builtin_isgreater(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + isgreater(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_isgreater(__type(__x), __type(__y)); + } + + + + constexpr bool + isgreaterequal(float __x, float __y) + { return __builtin_isgreaterequal(__x, __y); } + + constexpr bool + isgreaterequal(double __x, double __y) + { return __builtin_isgreaterequal(__x, __y); } + + constexpr bool + isgreaterequal(long double __x, long double __y) + { return __builtin_isgreaterequal(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + isgreaterequal(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_isgreaterequal(__type(__x), __type(__y)); + } + + + + constexpr bool + isless(float __x, float __y) + { return __builtin_isless(__x, __y); } + + constexpr bool + isless(double __x, double __y) + { return __builtin_isless(__x, __y); } + + constexpr bool + isless(long double __x, long double __y) + { return __builtin_isless(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + isless(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_isless(__type(__x), __type(__y)); + } + + + + constexpr bool + islessequal(float __x, float __y) + { return __builtin_islessequal(__x, __y); } + + constexpr bool + islessequal(double __x, double __y) + { return __builtin_islessequal(__x, __y); } + + constexpr bool + islessequal(long double __x, long double __y) + { return __builtin_islessequal(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + islessequal(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_islessequal(__type(__x), __type(__y)); + } + + + + constexpr bool + islessgreater(float __x, float __y) + { return __builtin_islessgreater(__x, __y); } + + constexpr bool + islessgreater(double __x, double __y) + { return __builtin_islessgreater(__x, __y); } + + constexpr bool + islessgreater(long double __x, long double __y) + { return __builtin_islessgreater(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + islessgreater(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_islessgreater(__type(__x), __type(__y)); + } + + + + constexpr bool + isunordered(float __x, float __y) + { return __builtin_isunordered(__x, __y); } + + constexpr bool + isunordered(double __x, double __y) + { return __builtin_isunordered(__x, __y); } + + constexpr bool + isunordered(long double __x, long double __y) + { return __builtin_isunordered(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + isunordered(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_isunordered(__type(__x), __type(__y)); + } +# 1065 "/usr/riscv64-linux-gnu/include/c++/11/cmath" 3 + using ::double_t; + using ::float_t; + + + using ::acosh; + using ::acoshf; + using ::acoshl; + + using ::asinh; + using ::asinhf; + using ::asinhl; + + using ::atanh; + using ::atanhf; + using ::atanhl; + + using ::cbrt; + using ::cbrtf; + using ::cbrtl; + + using ::copysign; + using ::copysignf; + using ::copysignl; + + using ::erf; + using ::erff; + using ::erfl; + + using ::erfc; + using ::erfcf; + using ::erfcl; + + using ::exp2; + using ::exp2f; + using ::exp2l; + + using ::expm1; + using ::expm1f; + using ::expm1l; + + using ::fdim; + using ::fdimf; + using ::fdiml; + + using ::fma; + using ::fmaf; + using ::fmal; + + using ::fmax; + using ::fmaxf; + using ::fmaxl; + + using ::fmin; + using ::fminf; + using ::fminl; + + using ::hypot; + using ::hypotf; + using ::hypotl; + + using ::ilogb; + using ::ilogbf; + using ::ilogbl; + + using ::lgamma; + using ::lgammaf; + using ::lgammal; + + + using ::llrint; + using ::llrintf; + using ::llrintl; + + using ::llround; + using ::llroundf; + using ::llroundl; + + + using ::log1p; + using ::log1pf; + using ::log1pl; + + using ::log2; + using ::log2f; + using ::log2l; + + using ::logb; + using ::logbf; + using ::logbl; + + using ::lrint; + using ::lrintf; + using ::lrintl; + + using ::lround; + using ::lroundf; + using ::lroundl; + + using ::nan; + using ::nanf; + using ::nanl; + + using ::nearbyint; + using ::nearbyintf; + using ::nearbyintl; + + using ::nextafter; + using ::nextafterf; + using ::nextafterl; + + using ::nexttoward; + using ::nexttowardf; + using ::nexttowardl; + + using ::remainder; + using ::remainderf; + using ::remainderl; + + using ::remquo; + using ::remquof; + using ::remquol; + + using ::rint; + using ::rintf; + using ::rintl; + + using ::round; + using ::roundf; + using ::roundl; + + using ::scalbln; + using ::scalblnf; + using ::scalblnl; + + using ::scalbn; + using ::scalbnf; + using ::scalbnl; + + using ::tgamma; + using ::tgammaf; + using ::tgammal; + + using ::trunc; + using ::truncf; + using ::truncl; + + + + constexpr float + acosh(float __x) + { return __builtin_acoshf(__x); } + + constexpr long double + acosh(long double __x) + { return __builtin_acoshl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + acosh(_Tp __x) + { return __builtin_acosh(__x); } + + + + constexpr float + asinh(float __x) + { return __builtin_asinhf(__x); } + + constexpr long double + asinh(long double __x) + { return __builtin_asinhl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + asinh(_Tp __x) + { return __builtin_asinh(__x); } + + + + constexpr float + atanh(float __x) + { return __builtin_atanhf(__x); } + + constexpr long double + atanh(long double __x) + { return __builtin_atanhl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + atanh(_Tp __x) + { return __builtin_atanh(__x); } + + + + constexpr float + cbrt(float __x) + { return __builtin_cbrtf(__x); } + + constexpr long double + cbrt(long double __x) + { return __builtin_cbrtl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cbrt(_Tp __x) + { return __builtin_cbrt(__x); } + + + + constexpr float + copysign(float __x, float __y) + { return __builtin_copysignf(__x, __y); } + + constexpr long double + copysign(long double __x, long double __y) + { return __builtin_copysignl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + copysign(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return copysign(__type(__x), __type(__y)); + } + + + + constexpr float + erf(float __x) + { return __builtin_erff(__x); } + + constexpr long double + erf(long double __x) + { return __builtin_erfl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + erf(_Tp __x) + { return __builtin_erf(__x); } + + + + constexpr float + erfc(float __x) + { return __builtin_erfcf(__x); } + + constexpr long double + erfc(long double __x) + { return __builtin_erfcl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + erfc(_Tp __x) + { return __builtin_erfc(__x); } + + + + constexpr float + exp2(float __x) + { return __builtin_exp2f(__x); } + + constexpr long double + exp2(long double __x) + { return __builtin_exp2l(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + exp2(_Tp __x) + { return __builtin_exp2(__x); } + + + + constexpr float + expm1(float __x) + { return __builtin_expm1f(__x); } + + constexpr long double + expm1(long double __x) + { return __builtin_expm1l(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + expm1(_Tp __x) + { return __builtin_expm1(__x); } + + + + constexpr float + fdim(float __x, float __y) + { return __builtin_fdimf(__x, __y); } + + constexpr long double + fdim(long double __x, long double __y) + { return __builtin_fdiml(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + fdim(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return fdim(__type(__x), __type(__y)); + } + + + + constexpr float + fma(float __x, float __y, float __z) + { return __builtin_fmaf(__x, __y, __z); } + + constexpr long double + fma(long double __x, long double __y, long double __z) + { return __builtin_fmal(__x, __y, __z); } + + + + template + constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type + fma(_Tp __x, _Up __y, _Vp __z) + { + typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type; + return fma(__type(__x), __type(__y), __type(__z)); + } + + + + constexpr float + fmax(float __x, float __y) + { return __builtin_fmaxf(__x, __y); } + + constexpr long double + fmax(long double __x, long double __y) + { return __builtin_fmaxl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + fmax(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return fmax(__type(__x), __type(__y)); + } + + + + constexpr float + fmin(float __x, float __y) + { return __builtin_fminf(__x, __y); } + + constexpr long double + fmin(long double __x, long double __y) + { return __builtin_fminl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + fmin(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return fmin(__type(__x), __type(__y)); + } + + + + constexpr float + hypot(float __x, float __y) + { return __builtin_hypotf(__x, __y); } + + constexpr long double + hypot(long double __x, long double __y) + { return __builtin_hypotl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + hypot(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return hypot(__type(__x), __type(__y)); + } + + + + constexpr int + ilogb(float __x) + { return __builtin_ilogbf(__x); } + + constexpr int + ilogb(long double __x) + { return __builtin_ilogbl(__x); } + + + + template + constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + int>::__type + ilogb(_Tp __x) + { return __builtin_ilogb(__x); } + + + + constexpr float + lgamma(float __x) + { return __builtin_lgammaf(__x); } + + constexpr long double + lgamma(long double __x) + { return __builtin_lgammal(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + lgamma(_Tp __x) + { return __builtin_lgamma(__x); } + + + + constexpr long long + llrint(float __x) + { return __builtin_llrintf(__x); } + + constexpr long long + llrint(long double __x) + { return __builtin_llrintl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + long long>::__type + llrint(_Tp __x) + { return __builtin_llrint(__x); } + + + + constexpr long long + llround(float __x) + { return __builtin_llroundf(__x); } + + constexpr long long + llround(long double __x) + { return __builtin_llroundl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + long long>::__type + llround(_Tp __x) + { return __builtin_llround(__x); } + + + + constexpr float + log1p(float __x) + { return __builtin_log1pf(__x); } + + constexpr long double + log1p(long double __x) + { return __builtin_log1pl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log1p(_Tp __x) + { return __builtin_log1p(__x); } + + + + + constexpr float + log2(float __x) + { return __builtin_log2f(__x); } + + constexpr long double + log2(long double __x) + { return __builtin_log2l(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log2(_Tp __x) + { return __builtin_log2(__x); } + + + + constexpr float + logb(float __x) + { return __builtin_logbf(__x); } + + constexpr long double + logb(long double __x) + { return __builtin_logbl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + logb(_Tp __x) + { return __builtin_logb(__x); } + + + + constexpr long + lrint(float __x) + { return __builtin_lrintf(__x); } + + constexpr long + lrint(long double __x) + { return __builtin_lrintl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + long>::__type + lrint(_Tp __x) + { return __builtin_lrint(__x); } + + + + constexpr long + lround(float __x) + { return __builtin_lroundf(__x); } + + constexpr long + lround(long double __x) + { return __builtin_lroundl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + long>::__type + lround(_Tp __x) + { return __builtin_lround(__x); } + + + + constexpr float + nearbyint(float __x) + { return __builtin_nearbyintf(__x); } + + constexpr long double + nearbyint(long double __x) + { return __builtin_nearbyintl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + nearbyint(_Tp __x) + { return __builtin_nearbyint(__x); } + + + + constexpr float + nextafter(float __x, float __y) + { return __builtin_nextafterf(__x, __y); } + + constexpr long double + nextafter(long double __x, long double __y) + { return __builtin_nextafterl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + nextafter(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return nextafter(__type(__x), __type(__y)); + } + + + + constexpr float + nexttoward(float __x, long double __y) + { return __builtin_nexttowardf(__x, __y); } + + constexpr long double + nexttoward(long double __x, long double __y) + { return __builtin_nexttowardl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + nexttoward(_Tp __x, long double __y) + { return __builtin_nexttoward(__x, __y); } + + + + constexpr float + remainder(float __x, float __y) + { return __builtin_remainderf(__x, __y); } + + constexpr long double + remainder(long double __x, long double __y) + { return __builtin_remainderl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + remainder(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return remainder(__type(__x), __type(__y)); + } + + + + inline float + remquo(float __x, float __y, int* __pquo) + { return __builtin_remquof(__x, __y, __pquo); } + + inline long double + remquo(long double __x, long double __y, int* __pquo) + { return __builtin_remquol(__x, __y, __pquo); } + + + + template + inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + remquo(_Tp __x, _Up __y, int* __pquo) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return remquo(__type(__x), __type(__y), __pquo); + } + + + + constexpr float + rint(float __x) + { return __builtin_rintf(__x); } + + constexpr long double + rint(long double __x) + { return __builtin_rintl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + rint(_Tp __x) + { return __builtin_rint(__x); } + + + + constexpr float + round(float __x) + { return __builtin_roundf(__x); } + + constexpr long double + round(long double __x) + { return __builtin_roundl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + round(_Tp __x) + { return __builtin_round(__x); } + + + + constexpr float + scalbln(float __x, long __ex) + { return __builtin_scalblnf(__x, __ex); } + + constexpr long double + scalbln(long double __x, long __ex) + { return __builtin_scalblnl(__x, __ex); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + scalbln(_Tp __x, long __ex) + { return __builtin_scalbln(__x, __ex); } + + + + constexpr float + scalbn(float __x, int __ex) + { return __builtin_scalbnf(__x, __ex); } + + constexpr long double + scalbn(long double __x, int __ex) + { return __builtin_scalbnl(__x, __ex); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + scalbn(_Tp __x, int __ex) + { return __builtin_scalbn(__x, __ex); } + + + + constexpr float + tgamma(float __x) + { return __builtin_tgammaf(__x); } + + constexpr long double + tgamma(long double __x) + { return __builtin_tgammal(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tgamma(_Tp __x) + { return __builtin_tgamma(__x); } + + + + constexpr float + trunc(float __x) + { return __builtin_truncf(__x); } + + constexpr long double + trunc(long double __x) + { return __builtin_truncl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + trunc(_Tp __x) + { return __builtin_trunc(__x); } +# 1931 "/usr/riscv64-linux-gnu/include/c++/11/cmath" 3 + +} + + + + + +} +# 37 "/usr/riscv64-linux-gnu/include/c++/11/math.h" 2 3 + +using std::abs; +using std::acos; +using std::asin; +using std::atan; +using std::atan2; +using std::cos; +using std::sin; +using std::tan; +using std::cosh; +using std::sinh; +using std::tanh; +using std::exp; +using std::frexp; +using std::ldexp; +using std::log; +using std::log10; +using std::modf; +using std::pow; +using std::sqrt; +using std::ceil; +using std::fabs; +using std::floor; +using std::fmod; + + +using std::fpclassify; +using std::isfinite; +using std::isinf; +using std::isnan; +using std::isnormal; +using std::signbit; +using std::isgreater; +using std::isgreaterequal; +using std::isless; +using std::islessequal; +using std::islessgreater; +using std::isunordered; + + + +using std::acosh; +using std::asinh; +using std::atanh; +using std::cbrt; +using std::copysign; +using std::erf; +using std::erfc; +using std::exp2; +using std::expm1; +using std::fdim; +using std::fma; +using std::fmax; +using std::fmin; +using std::hypot; +using std::ilogb; +using std::lgamma; +using std::llrint; +using std::llround; +using std::log1p; +using std::log2; +using std::logb; +using std::lrint; +using std::lround; +using std::nearbyint; +using std::nextafter; +using std::nexttoward; +using std::remainder; +using std::remquo; +using std::rint; +using std::round; +using std::scalbln; +using std::scalbn; +using std::tgamma; +using std::trunc; +# 43 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 +# 1 "/usr/riscv64-linux-gnu/include/time.h" 1 3 +# 29 "/usr/riscv64-linux-gnu/include/time.h" 3 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 30 "/usr/riscv64-linux-gnu/include/time.h" 2 3 + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/time.h" 1 3 +# 73 "/usr/riscv64-linux-gnu/include/bits/time.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/timex.h" 1 3 +# 26 "/usr/riscv64-linux-gnu/include/bits/timex.h" 3 +struct timex +{ +# 58 "/usr/riscv64-linux-gnu/include/bits/timex.h" 3 + unsigned int modes; + __syscall_slong_t offset; + __syscall_slong_t freq; + __syscall_slong_t maxerror; + __syscall_slong_t esterror; + int status; + __syscall_slong_t constant; + __syscall_slong_t precision; + __syscall_slong_t tolerance; + struct timeval time; + __syscall_slong_t tick; + __syscall_slong_t ppsfreq; + __syscall_slong_t jitter; + int shift; + __syscall_slong_t stabil; + __syscall_slong_t jitcnt; + __syscall_slong_t calcnt; + __syscall_slong_t errcnt; + __syscall_slong_t stbcnt; + + int tai; + + + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; + +}; +# 74 "/usr/riscv64-linux-gnu/include/bits/time.h" 2 3 + +extern "C" { + + +extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) noexcept (true); +# 90 "/usr/riscv64-linux-gnu/include/bits/time.h" 3 +} +# 34 "/usr/riscv64-linux-gnu/include/time.h" 2 3 + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/struct_tm.h" 1 3 + + + + + + +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + + + long int tm_gmtoff; + const char *tm_zone; + + + + +}; +# 40 "/usr/riscv64-linux-gnu/include/time.h" 2 3 +# 48 "/usr/riscv64-linux-gnu/include/time.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/struct_itimerspec.h" 1 3 + + + + + + + +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; +# 49 "/usr/riscv64-linux-gnu/include/time.h" 2 3 +struct sigevent; +# 68 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern "C" { + + + +extern clock_t clock (void) noexcept (true); + + + +extern time_t time (time_t *__timer) noexcept (true); + + +extern double difftime (time_t __time1, time_t __time0) + noexcept (true) __attribute__ ((__const__)); + + +extern time_t mktime (struct tm *__tp) noexcept (true); +# 100 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern size_t strftime (char *__restrict __s, size_t __maxsize, + const char *__restrict __format, + const struct tm *__restrict __tp) noexcept (true); + + + + +extern char *strptime (const char *__restrict __s, + const char *__restrict __fmt, struct tm *__tp) + noexcept (true); + + + + + + +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + const char *__restrict __format, + const struct tm *__restrict __tp, + locale_t __loc) noexcept (true); + + + +extern char *strptime_l (const char *__restrict __s, + const char *__restrict __fmt, struct tm *__tp, + locale_t __loc) noexcept (true); + + + + + + +extern struct tm *gmtime (const time_t *__timer) noexcept (true); + + + +extern struct tm *localtime (const time_t *__timer) noexcept (true); +# 154 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern struct tm *gmtime_r (const time_t *__restrict __timer, + struct tm *__restrict __tp) noexcept (true); + + + +extern struct tm *localtime_r (const time_t *__restrict __timer, + struct tm *__restrict __tp) noexcept (true); +# 179 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern char *asctime (const struct tm *__tp) noexcept (true); + + + +extern char *ctime (const time_t *__timer) noexcept (true); +# 197 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern char *asctime_r (const struct tm *__restrict __tp, + char *__restrict __buf) noexcept (true); + + + +extern char *ctime_r (const time_t *__restrict __timer, + char *__restrict __buf) noexcept (true); +# 217 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; + + + + +extern char *tzname[2]; + + + +extern void tzset (void) noexcept (true); + + + +extern int daylight; +extern long int timezone; +# 249 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern time_t timegm (struct tm *__tp) noexcept (true); + +extern time_t timelocal (struct tm *__tp) noexcept (true); +# 262 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern int dysize (int __year) noexcept (true) __attribute__ ((__const__)); +# 272 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern int nanosleep (const struct timespec *__requested_time, + struct timespec *__remaining); + + +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) noexcept (true); + + +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) noexcept (true); + + +extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) + noexcept (true); +# 311 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + const struct timespec *__req, + struct timespec *__rem); +# 326 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) noexcept (true); + + + + +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) noexcept (true); + + +extern int timer_delete (timer_t __timerid) noexcept (true); + + + +extern int timer_settime (timer_t __timerid, int __flags, + const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) noexcept (true); + + +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + noexcept (true); +# 364 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern int timer_getoverrun (timer_t __timerid) noexcept (true); + + + + + + +extern int timespec_get (struct timespec *__ts, int __base) + noexcept (true) __attribute__ ((__nonnull__ (1))); +# 387 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern int timespec_getres (struct timespec *__ts, int __base) + noexcept (true); +# 413 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern int getdate_err; +# 422 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern struct tm *getdate (const char *__string); +# 436 "/usr/riscv64-linux-gnu/include/time.h" 3 +extern int getdate_r (const char *__restrict __string, + struct tm *__restrict __resbufp); + + +} +# 44 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 +# 1 "/usr/riscv64-linux-gnu/include/fcntl.h" 1 3 +# 28 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern "C" { + + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/fcntl.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/fcntl.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/wordsize.h" 1 3 +# 25 "/usr/riscv64-linux-gnu/include/bits/fcntl.h" 2 3 +# 36 "/usr/riscv64-linux-gnu/include/bits/fcntl.h" 3 +struct flock + { + short int l_type; + short int l_whence; + + __off_t l_start; + __off_t l_len; + + + + + __pid_t l_pid; + }; + + +struct flock64 + { + short int l_type; + short int l_whence; + __off64_t l_start; + __off64_t l_len; + __pid_t l_pid; + }; + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/fcntl-linux.h" 1 3 +# 38 "/usr/riscv64-linux-gnu/include/bits/fcntl-linux.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/struct_iovec.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/bits/types/struct_iovec.h" 3 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 24 "/usr/riscv64-linux-gnu/include/bits/types/struct_iovec.h" 2 3 + + +struct iovec + { + void *iov_base; + size_t iov_len; + }; +# 39 "/usr/riscv64-linux-gnu/include/bits/fcntl-linux.h" 2 3 +# 265 "/usr/riscv64-linux-gnu/include/bits/fcntl-linux.h" 3 +enum __pid_type + { + F_OWNER_TID = 0, + F_OWNER_PID, + F_OWNER_PGRP, + F_OWNER_GID = F_OWNER_PGRP + }; + + +struct f_owner_ex + { + enum __pid_type type; + __pid_t pid; + }; +# 354 "/usr/riscv64-linux-gnu/include/bits/fcntl-linux.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/linux/falloc.h" 1 3 +# 355 "/usr/riscv64-linux-gnu/include/bits/fcntl-linux.h" 2 3 + + + +struct file_handle +{ + unsigned int handle_bytes; + int handle_type; + + unsigned char f_handle[0]; +}; +# 393 "/usr/riscv64-linux-gnu/include/bits/fcntl-linux.h" 3 +extern "C" { + + + + +extern __ssize_t readahead (int __fd, __off64_t __offset, size_t __count) + noexcept (true); + + + + + + +extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, + unsigned int __flags); + + + + + + +extern __ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); + + + + + +extern __ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, + unsigned int __flags); + + + + + +extern __ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); + + + + + + +extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); +# 448 "/usr/riscv64-linux-gnu/include/bits/fcntl-linux.h" 3 +extern int fallocate64 (int __fd, int __mode, __off64_t __offset, + __off64_t __len); + + + + +extern int name_to_handle_at (int __dfd, const char *__name, + struct file_handle *__handle, int *__mnt_id, + int __flags) noexcept (true); + + + + + +extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, + int __flags); + + + +} +# 63 "/usr/riscv64-linux-gnu/include/bits/fcntl.h" 2 3 +# 36 "/usr/riscv64-linux-gnu/include/fcntl.h" 2 3 +# 78 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/stat.h" 1 3 +# 25 "/usr/riscv64-linux-gnu/include/bits/stat.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/struct_stat.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/bits/struct_stat.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/wordsize.h" 1 3 +# 28 "/usr/riscv64-linux-gnu/include/bits/struct_stat.h" 2 3 +# 44 "/usr/riscv64-linux-gnu/include/bits/struct_stat.h" 3 +struct stat + { + __dev_t st_dev; + __ino_t st_ino; + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; + __dev_t __pad1; + __off_t st_size; + __blksize_t st_blksize; + int __pad2; + __blkcnt_t st_blocks; + + + + + + + + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; +# 79 "/usr/riscv64-linux-gnu/include/bits/struct_stat.h" 3 + int __glibc_reserved[2]; + }; + + + + +struct stat64 + { + __dev_t st_dev; + __ino64_t st_ino; + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; + __dev_t __pad1; + __off64_t st_size; + __blksize_t st_blksize; + int __pad2; + __blkcnt64_t st_blocks; + + + + + + + + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; +# 117 "/usr/riscv64-linux-gnu/include/bits/struct_stat.h" 3 + int __glibc_reserved[2]; + }; +# 26 "/usr/riscv64-linux-gnu/include/bits/stat.h" 2 3 +# 79 "/usr/riscv64-linux-gnu/include/fcntl.h" 2 3 +# 149 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern int fcntl (int __fd, int __cmd, ...); +# 158 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern int fcntl64 (int __fd, int __cmd, ...); +# 181 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern int open (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); +# 191 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern int open64 (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); +# 205 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern int openat (int __fd, const char *__file, int __oflag, ...) + __attribute__ ((__nonnull__ (2))); +# 216 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern int openat64 (int __fd, const char *__file, int __oflag, ...) + __attribute__ ((__nonnull__ (2))); +# 227 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern int creat (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1))); +# 237 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern int creat64 (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1))); +# 256 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern int lockf (int __fd, int __cmd, off_t __len); +# 265 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern int lockf64 (int __fd, int __cmd, off64_t __len); + + + + + + + +extern int posix_fadvise (int __fd, off_t __offset, off_t __len, + int __advise) noexcept (true); +# 285 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern int posix_fadvise64 (int __fd, off64_t __offset, off64_t __len, + int __advise) noexcept (true); +# 295 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern int posix_fallocate (int __fd, off_t __offset, off_t __len); +# 306 "/usr/riscv64-linux-gnu/include/fcntl.h" 3 +extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len); + + + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/fcntl2.h" 1 3 +# 26 "/usr/riscv64-linux-gnu/include/bits/fcntl2.h" 3 +extern int __open_2 (const char *__path, int __oflag) __attribute__ ((__nonnull__ (1))); +extern int __open_alias (const char *__path, int __oflag, ...) __asm__ ("" "open") + __attribute__ ((__nonnull__ (1))); + + + + + + +extern void __open_too_many_args (void) __attribute__((__error__ ("open can be called either with 2 or 3 arguments, not more"))) + ; +extern void __open_missing_mode (void) __attribute__((__error__ ("open with O_CREAT or O_TMPFILE in second argument needs 3 arguments"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +open (const char *__path, int __oflag, ...) +{ + if (__builtin_va_arg_pack_len () > 1) + __open_too_many_args (); + + if (__builtin_constant_p (__oflag)) + { + if ((((__oflag) & 0100) != 0 || ((__oflag) & (020000000 | 0200000)) == (020000000 | 0200000)) && __builtin_va_arg_pack_len () < 1) + { + __open_missing_mode (); + return __open_2 (__path, __oflag); + } + return __open_alias (__path, __oflag, __builtin_va_arg_pack ()); + } + + if (__builtin_va_arg_pack_len () < 1) + return __open_2 (__path, __oflag); + + return __open_alias (__path, __oflag, __builtin_va_arg_pack ()); +} + + + +extern int __open64_2 (const char *__path, int __oflag) __attribute__ ((__nonnull__ (1))); +extern int __open64_alias (const char *__path, int __oflag, ...) __asm__ ("" "open64") + __attribute__ ((__nonnull__ (1))); +extern void __open64_too_many_args (void) __attribute__((__error__ ("open64 can be called either with 2 or 3 arguments, not more"))) + ; +extern void __open64_missing_mode (void) __attribute__((__error__ ("open64 with O_CREAT or O_TMPFILE in second argument needs 3 arguments"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +open64 (const char *__path, int __oflag, ...) +{ + if (__builtin_va_arg_pack_len () > 1) + __open64_too_many_args (); + + if (__builtin_constant_p (__oflag)) + { + if ((((__oflag) & 0100) != 0 || ((__oflag) & (020000000 | 0200000)) == (020000000 | 0200000)) && __builtin_va_arg_pack_len () < 1) + { + __open64_missing_mode (); + return __open64_2 (__path, __oflag); + } + return __open64_alias (__path, __oflag, __builtin_va_arg_pack ()); + } + + if (__builtin_va_arg_pack_len () < 1) + return __open64_2 (__path, __oflag); + + return __open64_alias (__path, __oflag, __builtin_va_arg_pack ()); +} + + + + + +extern int __openat_2 (int __fd, const char *__path, int __oflag) + __attribute__ ((__nonnull__ (2))); +extern int __openat_alias (int __fd, const char *__path, int __oflag, ...) __asm__ ("" "openat") + + __attribute__ ((__nonnull__ (2))); +# 111 "/usr/riscv64-linux-gnu/include/bits/fcntl2.h" 3 +extern void __openat_too_many_args (void) __attribute__((__error__ ("openat can be called either with 3 or 4 arguments, not more"))) + ; +extern void __openat_missing_mode (void) __attribute__((__error__ ("openat with O_CREAT or O_TMPFILE in third argument needs 4 arguments"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +openat (int __fd, const char *__path, int __oflag, ...) +{ + if (__builtin_va_arg_pack_len () > 1) + __openat_too_many_args (); + + if (__builtin_constant_p (__oflag)) + { + if ((((__oflag) & 0100) != 0 || ((__oflag) & (020000000 | 0200000)) == (020000000 | 0200000)) && __builtin_va_arg_pack_len () < 1) + { + __openat_missing_mode (); + return __openat_2 (__fd, __path, __oflag); + } + return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); + } + + if (__builtin_va_arg_pack_len () < 1) + return __openat_2 (__fd, __path, __oflag); + + return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); +} + + + +extern int __openat64_2 (int __fd, const char *__path, int __oflag) + __attribute__ ((__nonnull__ (2))); +extern int __openat64_alias (int __fd, const char *__path, int __oflag, ...) __asm__ ("" "openat64") + + __attribute__ ((__nonnull__ (2))); +extern void __openat64_too_many_args (void) __attribute__((__error__ ("openat64 can be called either with 3 or 4 arguments, not more"))) + ; +extern void __openat64_missing_mode (void) __attribute__((__error__ ("openat64 with O_CREAT or O_TMPFILE in third argument needs 4 arguments"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +openat64 (int __fd, const char *__path, int __oflag, ...) +{ + if (__builtin_va_arg_pack_len () > 1) + __openat64_too_many_args (); + + if (__builtin_constant_p (__oflag)) + { + if ((((__oflag) & 0100) != 0 || ((__oflag) & (020000000 | 0200000)) == (020000000 | 0200000)) && __builtin_va_arg_pack_len () < 1) + { + __openat64_missing_mode (); + return __openat64_2 (__fd, __path, __oflag); + } + return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); + } + + if (__builtin_va_arg_pack_len () < 1) + return __openat64_2 (__fd, __path, __oflag); + + return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); +} +# 315 "/usr/riscv64-linux-gnu/include/fcntl.h" 2 3 + + +} +# 45 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 +# 1 "/usr/riscv64-linux-gnu/include/dlfcn.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/dlfcn.h" 3 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 25 "/usr/riscv64-linux-gnu/include/dlfcn.h" 2 3 + + +# 1 "/usr/riscv64-linux-gnu/include/bits/dlfcn.h" 1 3 +# 57 "/usr/riscv64-linux-gnu/include/bits/dlfcn.h" 3 +extern "C" { + + +extern void _dl_mcount_wrapper_check (void *__selfpc) noexcept (true); + +} +# 28 "/usr/riscv64-linux-gnu/include/dlfcn.h" 2 3 + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/dl_find_object.h" 1 3 +# 32 "/usr/riscv64-linux-gnu/include/dlfcn.h" 2 3 +# 46 "/usr/riscv64-linux-gnu/include/dlfcn.h" 3 +typedef long int Lmid_t; + + + + + + + +extern "C" { + + + +extern void *dlopen (const char *__file, int __mode) noexcept (true); + + + +extern int dlclose (void *__handle) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern void *dlsym (void *__restrict __handle, + const char *__restrict __name) noexcept (true) __attribute__ ((__nonnull__ (2))); + + + +extern void *dlmopen (Lmid_t __nsid, const char *__file, int __mode) noexcept (true); + + + +extern void *dlvsym (void *__restrict __handle, + const char *__restrict __name, + const char *__restrict __version) + noexcept (true) __attribute__ ((__nonnull__ (2, 3))); + + + + + +extern char *dlerror (void) noexcept (true); + + + + + +typedef struct +{ + const char *dli_fname; + void *dli_fbase; + const char *dli_sname; + void *dli_saddr; +} Dl_info; + + + +extern int dladdr (const void *__address, Dl_info *__info) + noexcept (true) __attribute__ ((__nonnull__ (2))); + + +extern int dladdr1 (const void *__address, Dl_info *__info, + void **__extra_info, int __flags) noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + +enum + { + + RTLD_DL_SYMENT = 1, + + + RTLD_DL_LINKMAP = 2 + }; + + + + + + + +extern int dlinfo (void *__restrict __handle, + int __request, void *__restrict __arg) + noexcept (true) __attribute__ ((__nonnull__ (1, 3))); + + +enum + { + + RTLD_DI_LMID = 1, + + + + RTLD_DI_LINKMAP = 2, + + RTLD_DI_CONFIGADDR = 3, + + + + + + + RTLD_DI_SERINFO = 4, + RTLD_DI_SERINFOSIZE = 5, + + + + RTLD_DI_ORIGIN = 6, + + RTLD_DI_PROFILENAME = 7, + RTLD_DI_PROFILEOUT = 8, + + + + + RTLD_DI_TLS_MODID = 9, + + + + + + RTLD_DI_TLS_DATA = 10, + + RTLD_DI_MAX = 10 + }; + + + + +typedef struct +{ + char *dls_name; + unsigned int dls_flags; +} Dl_serpath; + + + +typedef struct +{ + size_t dls_size; + unsigned int dls_cnt; + + + + + + __extension__ union + { + Dl_serpath dls_serpath[0]; + Dl_serpath __dls_serpath_pad[1]; + }; + + + +} Dl_serinfo; + +struct dl_find_object +{ + __extension__ unsigned long long int dlfo_flags; + void *dlfo_map_start; + void *dlfo_map_end; + struct link_map *dlfo_link_map; + void *dlfo_eh_frame; +# 217 "/usr/riscv64-linux-gnu/include/dlfcn.h" 3 + __extension__ unsigned long long int __dflo_reserved[7]; +}; + + + +int _dl_find_object (void *__address, struct dl_find_object *__result) noexcept (true); + + + + +} +# 46 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 +# 1 "/usr/riscv64-linux-gnu/include/pthread.h" 1 3 +# 22 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/sched.h" 1 3 +# 29 "/usr/riscv64-linux-gnu/include/sched.h" 3 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 30 "/usr/riscv64-linux-gnu/include/sched.h" 2 3 +# 43 "/usr/riscv64-linux-gnu/include/sched.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/sched.h" 1 3 +# 76 "/usr/riscv64-linux-gnu/include/bits/sched.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/struct_sched_param.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/bits/types/struct_sched_param.h" 3 +struct sched_param +{ + int sched_priority; +}; +# 77 "/usr/riscv64-linux-gnu/include/bits/sched.h" 2 3 + +extern "C" { + + + +extern int clone (int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg, ...) noexcept (true); + + +extern int unshare (int __flags) noexcept (true); + + +extern int sched_getcpu (void) noexcept (true); + + +extern int getcpu (unsigned int *, unsigned int *) noexcept (true); + + +extern int setns (int __fd, int __nstype) noexcept (true); + + +} +# 44 "/usr/riscv64-linux-gnu/include/sched.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/cpu-set.h" 1 3 +# 32 "/usr/riscv64-linux-gnu/include/bits/cpu-set.h" 3 +typedef unsigned long int __cpu_mask; + + + + + + +typedef struct +{ + __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; +} cpu_set_t; +# 115 "/usr/riscv64-linux-gnu/include/bits/cpu-set.h" 3 +extern "C" { + +extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) + noexcept (true); +extern cpu_set_t *__sched_cpualloc (size_t __count) noexcept (true) __attribute__ ((__warn_unused_result__)); +extern void __sched_cpufree (cpu_set_t *__set) noexcept (true); + +} +# 45 "/usr/riscv64-linux-gnu/include/sched.h" 2 3 + + + + + + +extern "C" { + + +extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) + noexcept (true); + + +extern int sched_getparam (__pid_t __pid, struct sched_param *__param) noexcept (true); + + +extern int sched_setscheduler (__pid_t __pid, int __policy, + const struct sched_param *__param) noexcept (true); + + +extern int sched_getscheduler (__pid_t __pid) noexcept (true); + + +extern int sched_yield (void) noexcept (true); + + +extern int sched_get_priority_max (int __algorithm) noexcept (true); + + +extern int sched_get_priority_min (int __algorithm) noexcept (true); + + + +extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) noexcept (true); +# 130 "/usr/riscv64-linux-gnu/include/sched.h" 3 +extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + const cpu_set_t *__cpuset) noexcept (true); + + +extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, + cpu_set_t *__cpuset) noexcept (true); + + +} +# 23 "/usr/riscv64-linux-gnu/include/pthread.h" 2 3 + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/setjmp.h" 1 3 +# 22 "/usr/riscv64-linux-gnu/include/bits/setjmp.h" 3 +typedef struct __jmp_buf_internal_tag + { + + long int __pc; + + long int __regs[12]; + + long int __sp; + + + + double __fpregs[12]; + + + + } __jmp_buf[1]; +# 28 "/usr/riscv64-linux-gnu/include/pthread.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/wordsize.h" 1 3 +# 29 "/usr/riscv64-linux-gnu/include/pthread.h" 2 3 + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/struct___jmp_buf_tag.h" 1 3 +# 26 "/usr/riscv64-linux-gnu/include/bits/types/struct___jmp_buf_tag.h" 3 +struct __jmp_buf_tag + { + + + + + __jmp_buf __jmpbuf; + int __mask_was_saved; + __sigset_t __saved_mask; + }; +# 32 "/usr/riscv64-linux-gnu/include/pthread.h" 2 3 + +# 1 "/usr/riscv64-linux-gnu/include/bits/pthread_stack_min-dynamic.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/bits/pthread_stack_min-dynamic.h" 3 +extern "C" { +extern long int __sysconf (int __name) noexcept (true); +} +# 34 "/usr/riscv64-linux-gnu/include/pthread.h" 2 3 + + + +enum +{ + PTHREAD_CREATE_JOINABLE, + + PTHREAD_CREATE_DETACHED + +}; + + + +enum +{ + PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_ADAPTIVE_NP + + , + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL + + + + , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP + +}; + + + + +enum +{ + PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_ROBUST, + PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST +}; + + + + + +enum +{ + PTHREAD_PRIO_NONE, + PTHREAD_PRIO_INHERIT, + PTHREAD_PRIO_PROTECT +}; +# 104 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +enum +{ + PTHREAD_RWLOCK_PREFER_READER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, + PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP +}; +# 124 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +enum +{ + PTHREAD_INHERIT_SCHED, + + PTHREAD_EXPLICIT_SCHED + +}; + + + +enum +{ + PTHREAD_SCOPE_SYSTEM, + + PTHREAD_SCOPE_PROCESS + +}; + + + +enum +{ + PTHREAD_PROCESS_PRIVATE, + + PTHREAD_PROCESS_SHARED + +}; +# 159 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +struct _pthread_cleanup_buffer +{ + void (*__routine) (void *); + void *__arg; + int __canceltype; + struct _pthread_cleanup_buffer *__prev; +}; + + +enum +{ + PTHREAD_CANCEL_ENABLE, + + PTHREAD_CANCEL_DISABLE + +}; +enum +{ + PTHREAD_CANCEL_DEFERRED, + + PTHREAD_CANCEL_ASYNCHRONOUS + +}; +# 197 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern "C" { + + + + +extern int pthread_create (pthread_t *__restrict __newthread, + const pthread_attr_t *__restrict __attr, + void *(*__start_routine) (void *), + void *__restrict __arg) noexcept (true) __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); + + + + + + + +extern int pthread_join (pthread_t __th, void **__thread_return); + + + + +extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) noexcept (true); +# 233 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, + const struct timespec *__abstime); +# 243 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return, + clockid_t __clockid, + const struct timespec *__abstime); +# 269 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_detach (pthread_t __th) noexcept (true); + + + +extern pthread_t pthread_self (void) noexcept (true) __attribute__ ((__const__)); + + +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) + noexcept (true) __attribute__ ((__const__)); + + + + + + + +extern int pthread_attr_init (pthread_attr_t *__attr) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_destroy (pthread_attr_t *__attr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, + int *__detachstate) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, + int __detachstate) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, + size_t *__guardsize) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setguardsize (pthread_attr_t *__attr, + size_t __guardsize) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, + struct sched_param *__restrict __param) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, + const struct sched_param *__restrict + __param) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict + __attr, int *__restrict __policy) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict + __attr, int *__restrict __inherit) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inherit) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, + int *__restrict __scope) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict + __attr, void **__restrict __stackaddr) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); + + + + + +extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, + void *__stackaddr) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); + + +extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict + __attr, size_t *__restrict __stacksize) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_attr_setstacksize (pthread_attr_t *__attr, + size_t __stacksize) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, + void **__restrict __stackaddr, + size_t *__restrict __stacksize) + noexcept (true) __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, + size_t __stacksize) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, + size_t __cpusetsize, + const cpu_set_t *__cpuset) + noexcept (true) __attribute__ ((__nonnull__ (1, 3))); + + + +extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, + size_t __cpusetsize, + cpu_set_t *__cpuset) + noexcept (true) __attribute__ ((__nonnull__ (1, 3))); + + +extern int pthread_getattr_default_np (pthread_attr_t *__attr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_setsigmask_np (pthread_attr_t *__attr, + const __sigset_t *sigmask); + + + + +extern int pthread_attr_getsigmask_np (const pthread_attr_t *__attr, + __sigset_t *sigmask); + + + + + + + +extern int pthread_setattr_default_np (const pthread_attr_t *__attr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + +extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) + noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + + + + +extern int pthread_setschedparam (pthread_t __target_thread, int __policy, + const struct sched_param *__param) + noexcept (true) __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getschedparam (pthread_t __target_thread, + int *__restrict __policy, + struct sched_param *__restrict __param) + noexcept (true) __attribute__ ((__nonnull__ (2, 3))); + + +extern int pthread_setschedprio (pthread_t __target_thread, int __prio) + noexcept (true); + + + + +extern int pthread_getname_np (pthread_t __target_thread, char *__buf, + size_t __buflen) + noexcept (true) __attribute__ ((__nonnull__ (2))); + + +extern int pthread_setname_np (pthread_t __target_thread, const char *__name) + noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + + +extern int pthread_getconcurrency (void) noexcept (true); + + +extern int pthread_setconcurrency (int __level) noexcept (true); + + + +extern int pthread_yield (void) noexcept (true); + +extern int pthread_yield (void) noexcept (true) __asm__ ("" "sched_yield") + __attribute__ ((__deprecated__ ("pthread_yield is deprecated, use sched_yield instead"))) + ; + + + + + + + +extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, + const cpu_set_t *__cpuset) + noexcept (true) __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, + cpu_set_t *__cpuset) + noexcept (true) __attribute__ ((__nonnull__ (3))); +# 509 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); +# 521 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_setcancelstate (int __state, int *__oldstate); + + + +extern int pthread_setcanceltype (int __type, int *__oldtype); + + +extern int pthread_cancel (pthread_t __th); + + + + +extern void pthread_testcancel (void); + + + + +struct __cancel_jmp_buf_tag +{ + __jmp_buf __cancel_jmp_buf; + int __mask_was_saved; +}; + +typedef struct +{ + struct __cancel_jmp_buf_tag __cancel_jmp_buf[1]; + void *__pad[4]; +} __pthread_unwind_buf_t __attribute__ ((__aligned__)); +# 557 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +struct __pthread_cleanup_frame +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; +}; +# 697 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) + ; +# 709 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) + ; +# 732 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) + ; +# 745 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) + ; + + + +extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) + __attribute__ ((__noreturn__)) + + __attribute__ ((__weak__)) + + ; +# 766 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int __sigsetjmp_cancel (struct __cancel_jmp_buf_tag __env[1], int __savemask) noexcept (true) __asm__ ("" "__sigsetjmp") + + + __attribute__ ((__returns_twice__)); +# 781 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_mutex_init (pthread_mutex_t *__mutex, + const pthread_mutexattr_t *__mutexattr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + +extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, + const struct timespec *__restrict + __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); +# 817 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex, + clockid_t __clockid, + const struct timespec *__restrict + __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 3))); +# 835 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutex_getprioceiling (const pthread_mutex_t * + __restrict __mutex, + int *__restrict __prioceiling) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, + int __prioceiling, + int *__restrict __old_ceiling) + noexcept (true) __attribute__ ((__nonnull__ (1, 3))); + + + + +extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_consistent_np (pthread_mutex_t *) noexcept (true) __asm__ ("" "pthread_mutex_consistent") + __attribute__ ((__nonnull__ (1))) + __attribute__ ((__deprecated__ ("pthread_mutex_consistent_np is deprecated, use pthread_mutex_consistent"))) + ; +# 874 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __pshared) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, + int __pshared) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict + __attr, int *__restrict __kind) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __protocol) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, + int __protocol) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __prioceiling) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, + int __prioceiling) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, + int *__robustness) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_getrobust_np (pthread_mutexattr_t *, int *) noexcept (true) __asm__ ("" "pthread_mutexattr_getrobust") + + __attribute__ ((__nonnull__ (1))) + __attribute__ ((__deprecated__ ("pthread_mutexattr_getrobust_np is deprecated, use pthread_mutexattr_getrobust"))) + ; + + + + + + +extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, + int __robustness) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *, int) noexcept (true) __asm__ ("" "pthread_mutexattr_setrobust") + + __attribute__ ((__nonnull__ (1))) + __attribute__ ((__deprecated__ ("pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust"))) + ; +# 967 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, + const pthread_rwlockattr_t *__restrict + __attr) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + +extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, + const struct timespec *__restrict + __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); +# 1004 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock, + clockid_t __clockid, + const struct timespec *__restrict + __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 3))); +# 1023 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + +extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, + const struct timespec *__restrict + __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); +# 1051 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock, + clockid_t __clockid, + const struct timespec *__restrict + __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 3))); +# 1071 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pshared) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pref) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, + int __pref) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int pthread_cond_init (pthread_cond_t *__restrict __cond, + const pthread_condattr_t *__restrict __cond_attr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_destroy (pthread_cond_t *__cond) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_signal (pthread_cond_t *__cond) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_broadcast (pthread_cond_t *__cond) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex) + __attribute__ ((__nonnull__ (1, 2))); +# 1145 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + const struct timespec *__restrict __abstime) + __attribute__ ((__nonnull__ (1, 2, 3))); +# 1171 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + __clockid_t __clock_id, + const struct timespec *__restrict __abstime) + __attribute__ ((__nonnull__ (1, 2, 4))); +# 1194 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_condattr_init (pthread_condattr_t *__attr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_getpshared (const pthread_condattr_t * + __restrict __attr, + int *__restrict __pshared) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, + int __pshared) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_condattr_getclock (const pthread_condattr_t * + __restrict __attr, + __clockid_t *__restrict __clock_id) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setclock (pthread_condattr_t *__attr, + __clockid_t __clock_id) + noexcept (true) __attribute__ ((__nonnull__ (1))); +# 1230 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_destroy (pthread_spinlock_t *__lock) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_lock (pthread_spinlock_t *__lock) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_trylock (pthread_spinlock_t *__lock) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_unlock (pthread_spinlock_t *__lock) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, + const pthread_barrierattr_t *__restrict + __attr, unsigned int __count) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_wait (pthread_barrier_t *__barrier) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * + __restrict __attr, + int *__restrict __pshared) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared) + noexcept (true) __attribute__ ((__nonnull__ (1))); +# 1297 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_key_delete (pthread_key_t __key) noexcept (true); + + +extern void *pthread_getspecific (pthread_key_t __key) noexcept (true); + + +extern int pthread_setspecific (pthread_key_t __key, + const void *__pointer) + noexcept (true) __attribute__ ((__access__ (__none__, 2))); + + + + +extern int pthread_getcpuclockid (pthread_t __thread_id, + __clockid_t *__clock_id) + noexcept (true) __attribute__ ((__nonnull__ (2))); +# 1332 "/usr/riscv64-linux-gnu/include/pthread.h" 3 +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) noexcept (true); + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2) noexcept (true) +{ + return __thread1 == __thread2; +} + + +} +# 47 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/limits.h" 1 3 4 +# 34 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/limits.h" 3 4 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/syslimits.h" 1 3 4 + + + + + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/limits.h" 1 3 4 +# 203 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/limits.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/limits.h" 1 3 4 +# 26 "/usr/riscv64-linux-gnu/include/limits.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/libc-header-start.h" 1 3 4 +# 27 "/usr/riscv64-linux-gnu/include/limits.h" 2 3 4 +# 195 "/usr/riscv64-linux-gnu/include/limits.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/posix1_lim.h" 1 3 4 +# 27 "/usr/riscv64-linux-gnu/include/bits/posix1_lim.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/wordsize.h" 1 3 4 +# 28 "/usr/riscv64-linux-gnu/include/bits/posix1_lim.h" 2 3 4 +# 161 "/usr/riscv64-linux-gnu/include/bits/posix1_lim.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/local_lim.h" 1 3 4 +# 38 "/usr/riscv64-linux-gnu/include/bits/local_lim.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/linux/limits.h" 1 3 4 +# 39 "/usr/riscv64-linux-gnu/include/bits/local_lim.h" 2 3 4 +# 162 "/usr/riscv64-linux-gnu/include/bits/posix1_lim.h" 2 3 4 +# 196 "/usr/riscv64-linux-gnu/include/limits.h" 2 3 4 + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/posix2_lim.h" 1 3 4 +# 200 "/usr/riscv64-linux-gnu/include/limits.h" 2 3 4 + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/xopen_lim.h" 1 3 4 +# 64 "/usr/riscv64-linux-gnu/include/bits/xopen_lim.h" 3 4 +# 1 "/usr/riscv64-linux-gnu/include/bits/uio_lim.h" 1 3 4 +# 65 "/usr/riscv64-linux-gnu/include/bits/xopen_lim.h" 2 3 4 +# 204 "/usr/riscv64-linux-gnu/include/limits.h" 2 3 4 +# 204 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/limits.h" 2 3 4 +# 8 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/syslimits.h" 2 3 4 +# 35 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/limits.h" 2 3 4 +# 49 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 +# 1 "/usr/riscv64-linux-gnu/include/errno.h" 1 3 +# 28 "/usr/riscv64-linux-gnu/include/errno.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/errno.h" 1 3 +# 26 "/usr/riscv64-linux-gnu/include/bits/errno.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/linux/errno.h" 1 3 +# 1 "/usr/riscv64-linux-gnu/include/asm/errno.h" 1 3 +# 1 "/usr/riscv64-linux-gnu/include/asm-generic/errno.h" 1 3 + + + + +# 1 "/usr/riscv64-linux-gnu/include/asm-generic/errno-base.h" 1 3 +# 6 "/usr/riscv64-linux-gnu/include/asm-generic/errno.h" 2 3 +# 2 "/usr/riscv64-linux-gnu/include/asm/errno.h" 2 3 +# 2 "/usr/riscv64-linux-gnu/include/linux/errno.h" 2 3 +# 27 "/usr/riscv64-linux-gnu/include/bits/errno.h" 2 3 +# 29 "/usr/riscv64-linux-gnu/include/errno.h" 2 3 + + + + + +extern "C" { + + +extern int *__errno_location (void) noexcept (true) __attribute__ ((__const__)); + + + + + + + +extern char *program_invocation_name; +extern char *program_invocation_short_name; + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/error_t.h" 1 3 +# 22 "/usr/riscv64-linux-gnu/include/bits/types/error_t.h" 3 +typedef int error_t; +# 49 "/usr/riscv64-linux-gnu/include/errno.h" 2 3 + + + +} +# 50 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 + + +# 1 "/usr/riscv64-linux-gnu/include/inttypes.h" 1 3 +# 266 "/usr/riscv64-linux-gnu/include/inttypes.h" 3 +extern "C" { + + + + +typedef struct + { + long int quot; + long int rem; + } imaxdiv_t; +# 290 "/usr/riscv64-linux-gnu/include/inttypes.h" 3 +extern intmax_t imaxabs (intmax_t __n) noexcept (true) __attribute__ ((__const__)); + + +extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) + noexcept (true) __attribute__ ((__const__)); + + +extern intmax_t strtoimax (const char *__restrict __nptr, + char **__restrict __endptr, int __base) noexcept (true); + + +extern uintmax_t strtoumax (const char *__restrict __nptr, + char ** __restrict __endptr, int __base) noexcept (true); + + +extern intmax_t wcstoimax (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + noexcept (true); + + +extern uintmax_t wcstoumax (const wchar_t *__restrict __nptr, + wchar_t ** __restrict __endptr, int __base) + noexcept (true); + +} +# 53 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 +# 1 "/usr/riscv64-linux-gnu/include/signal.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/signal.h" 3 +extern "C" { + + +# 1 "/usr/riscv64-linux-gnu/include/bits/signum-generic.h" 1 3 +# 76 "/usr/riscv64-linux-gnu/include/bits/signum-generic.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/signum-arch.h" 1 3 +# 77 "/usr/riscv64-linux-gnu/include/bits/signum-generic.h" 2 3 +# 31 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/sig_atomic_t.h" 1 3 + + + + + + + +typedef __sig_atomic_t sig_atomic_t; +# 33 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 +# 57 "/usr/riscv64-linux-gnu/include/signal.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/siginfo_t.h" 1 3 + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/wordsize.h" 1 3 +# 5 "/usr/riscv64-linux-gnu/include/bits/types/siginfo_t.h" 2 3 + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/__sigval_t.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/types/__sigval_t.h" 3 +union sigval +{ + int sival_int; + void *sival_ptr; +}; + +typedef union sigval __sigval_t; +# 7 "/usr/riscv64-linux-gnu/include/bits/types/siginfo_t.h" 2 3 +# 16 "/usr/riscv64-linux-gnu/include/bits/types/siginfo_t.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/siginfo-arch.h" 1 3 +# 17 "/usr/riscv64-linux-gnu/include/bits/types/siginfo_t.h" 2 3 +# 36 "/usr/riscv64-linux-gnu/include/bits/types/siginfo_t.h" 3 +typedef struct + { + int si_signo; + + int si_errno; + + int si_code; + + + + + + int __pad0; + + + union + { + int _pad[((128 / sizeof (int)) - 4)]; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + } _kill; + + + struct + { + int si_tid; + int si_overrun; + __sigval_t si_sigval; + } _timer; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + __sigval_t si_sigval; + } _rt; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + int si_status; + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + + + struct + { + void *si_addr; + + short int si_addr_lsb; + union + { + + struct + { + void *_lower; + void *_upper; + } _addr_bnd; + + __uint32_t _pkey; + } _bounds; + } _sigfault; + + + struct + { + long int si_band; + int si_fd; + } _sigpoll; + + + + struct + { + void *_call_addr; + int _syscall; + unsigned int _arch; + } _sigsys; + + } _sifields; + } siginfo_t ; +# 58 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/siginfo-consts.h" 1 3 +# 35 "/usr/riscv64-linux-gnu/include/bits/siginfo-consts.h" 3 +enum +{ + SI_ASYNCNL = -60, + SI_DETHREAD = -7, + + SI_TKILL, + SI_SIGIO, + + SI_ASYNCIO, + SI_MESGQ, + SI_TIMER, + + + + + + SI_QUEUE, + SI_USER, + SI_KERNEL = 0x80 +# 66 "/usr/riscv64-linux-gnu/include/bits/siginfo-consts.h" 3 +}; + + + + +enum +{ + ILL_ILLOPC = 1, + + ILL_ILLOPN, + + ILL_ILLADR, + + ILL_ILLTRP, + + ILL_PRVOPC, + + ILL_PRVREG, + + ILL_COPROC, + + ILL_BADSTK, + + ILL_BADIADDR + +}; + + +enum +{ + FPE_INTDIV = 1, + + FPE_INTOVF, + + FPE_FLTDIV, + + FPE_FLTOVF, + + FPE_FLTUND, + + FPE_FLTRES, + + FPE_FLTINV, + + FPE_FLTSUB, + + FPE_FLTUNK = 14, + + FPE_CONDTRAP + +}; + + +enum +{ + SEGV_MAPERR = 1, + + SEGV_ACCERR, + + SEGV_BNDERR, + + SEGV_PKUERR, + + SEGV_ACCADI, + + SEGV_ADIDERR, + + SEGV_ADIPERR, + + SEGV_MTEAERR, + + SEGV_MTESERR + +}; + + +enum +{ + BUS_ADRALN = 1, + + BUS_ADRERR, + + BUS_OBJERR, + + BUS_MCEERR_AR, + + BUS_MCEERR_AO + +}; + + + + +enum +{ + TRAP_BRKPT = 1, + + TRAP_TRACE, + + TRAP_BRANCH, + + TRAP_HWBKPT, + + TRAP_UNK + +}; + + + + +enum +{ + CLD_EXITED = 1, + + CLD_KILLED, + + CLD_DUMPED, + + CLD_TRAPPED, + + CLD_STOPPED, + + CLD_CONTINUED + +}; + + +enum +{ + POLL_IN = 1, + + POLL_OUT, + + POLL_MSG, + + POLL_ERR, + + POLL_PRI, + + POLL_HUP + +}; + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/siginfo-consts-arch.h" 1 3 +# 214 "/usr/riscv64-linux-gnu/include/bits/siginfo-consts.h" 2 3 +# 59 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/sigval_t.h" 1 3 +# 16 "/usr/riscv64-linux-gnu/include/bits/types/sigval_t.h" 3 +typedef __sigval_t sigval_t; +# 63 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/sigevent_t.h" 1 3 + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/wordsize.h" 1 3 +# 5 "/usr/riscv64-linux-gnu/include/bits/types/sigevent_t.h" 2 3 +# 22 "/usr/riscv64-linux-gnu/include/bits/types/sigevent_t.h" 3 +typedef struct sigevent + { + __sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + + union + { + int _pad[((64 / sizeof (int)) - 4)]; + + + + __pid_t _tid; + + struct + { + void (*_function) (__sigval_t); + pthread_attr_t *_attribute; + } _sigev_thread; + } _sigev_un; + } sigevent_t; +# 67 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/sigevent-consts.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/bits/sigevent-consts.h" 3 +enum +{ + SIGEV_SIGNAL = 0, + + SIGEV_NONE, + + SIGEV_THREAD, + + + SIGEV_THREAD_ID = 4 + + +}; +# 68 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 + + + + +typedef void (*__sighandler_t) (int); + + + + +extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) + noexcept (true); + +extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) + noexcept (true); + + + + + + +extern __sighandler_t signal (int __sig, __sighandler_t __handler) + noexcept (true); +# 112 "/usr/riscv64-linux-gnu/include/signal.h" 3 +extern int kill (__pid_t __pid, int __sig) noexcept (true); + + + + + + +extern int killpg (__pid_t __pgrp, int __sig) noexcept (true); + + + +extern int raise (int __sig) noexcept (true); + + + +extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) + noexcept (true); +extern int gsignal (int __sig) noexcept (true); + + + + +extern void psignal (int __sig, const char *__s); + + +extern void psiginfo (const siginfo_t *__pinfo, const char *__s); +# 151 "/usr/riscv64-linux-gnu/include/signal.h" 3 +extern int sigpause (int __sig) __asm__ ("__xpg_sigpause") + __attribute__ ((__deprecated__ ("Use the sigsuspend function instead"))); +# 173 "/usr/riscv64-linux-gnu/include/signal.h" 3 +extern int sigblock (int __mask) noexcept (true) __attribute__ ((__deprecated__)); + + +extern int sigsetmask (int __mask) noexcept (true) __attribute__ ((__deprecated__)); + + +extern int siggetmask (void) noexcept (true) __attribute__ ((__deprecated__)); +# 188 "/usr/riscv64-linux-gnu/include/signal.h" 3 +typedef __sighandler_t sighandler_t; + + + + +typedef __sighandler_t sig_t; + + + + + +extern int sigemptyset (sigset_t *__set) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int sigfillset (sigset_t *__set) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int sigaddset (sigset_t *__set, int __signo) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int sigdelset (sigset_t *__set, int __signo) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int sigismember (const sigset_t *__set, int __signo) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern int sigisemptyset (const sigset_t *__set) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int sigandset (sigset_t *__set, const sigset_t *__left, + const sigset_t *__right) noexcept (true) __attribute__ ((__nonnull__ (1, 2, 3))); + + +extern int sigorset (sigset_t *__set, const sigset_t *__left, + const sigset_t *__right) noexcept (true) __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/sigaction.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/bits/sigaction.h" 3 +struct sigaction + { + + + union + { + + __sighandler_t sa_handler; + + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; + + + + + + + + __sigset_t sa_mask; + + + int sa_flags; + + + void (*sa_restorer) (void); + }; +# 230 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 + + +extern int sigprocmask (int __how, const sigset_t *__restrict __set, + sigset_t *__restrict __oset) noexcept (true); + + + + + + +extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1))); + + +extern int sigaction (int __sig, const struct sigaction *__restrict __act, + struct sigaction *__restrict __oact) noexcept (true); + + +extern int sigpending (sigset_t *__set) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig) + __attribute__ ((__nonnull__ (1, 2))); + + + + + + + +extern int sigwaitinfo (const sigset_t *__restrict __set, + siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int sigtimedwait (const sigset_t *__restrict __set, + siginfo_t *__restrict __info, + const struct timespec *__restrict __timeout) + __attribute__ ((__nonnull__ (1))); +# 292 "/usr/riscv64-linux-gnu/include/signal.h" 3 +extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val) + noexcept (true); + + + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/sigcontext.h" 1 3 +# 25 "/usr/riscv64-linux-gnu/include/bits/sigcontext.h" 3 +struct sigcontext { + + unsigned long int gregs[32]; + unsigned long long int fpregs[66] __attribute__ ((__aligned__ (16))); +}; +# 302 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 + + +extern int sigreturn (struct sigcontext *__scp) noexcept (true); + + + + + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 312 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/stack_t.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/bits/types/stack_t.h" 3 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 24 "/usr/riscv64-linux-gnu/include/bits/types/stack_t.h" 2 3 + + +typedef struct + { + void *ss_sp; + int ss_flags; + size_t ss_size; + } stack_t; +# 314 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 + + +# 1 "/usr/riscv64-linux-gnu/include/sys/ucontext.h" 1 3 +# 29 "/usr/riscv64-linux-gnu/include/sys/ucontext.h" 3 +typedef unsigned long int __riscv_mc_gp_state[32]; +# 44 "/usr/riscv64-linux-gnu/include/sys/ucontext.h" 3 +typedef unsigned long int greg_t; + + +typedef __riscv_mc_gp_state gregset_t; + + +typedef union __riscv_mc_fp_state fpregset_t; + + +struct __riscv_mc_f_ext_state + { + unsigned int __f[32]; + unsigned int __fcsr; + }; + +struct __riscv_mc_d_ext_state + { + unsigned long long int __f[32]; + unsigned int __fcsr; + }; + +struct __riscv_mc_q_ext_state + { + unsigned long long int __f[64] __attribute__ ((__aligned__ (16))); + unsigned int __fcsr; + + + unsigned int __glibc_reserved[3]; + }; + +union __riscv_mc_fp_state + { + struct __riscv_mc_f_ext_state __f; + struct __riscv_mc_d_ext_state __d; + struct __riscv_mc_q_ext_state __q; + }; + +typedef struct mcontext_t + { + __riscv_mc_gp_state __gregs; + union __riscv_mc_fp_state __fpregs; + } mcontext_t; + + +typedef struct ucontext_t + { + unsigned long int __uc_flags; + struct ucontext_t *uc_link; + stack_t uc_stack; + sigset_t uc_sigmask; + + + + + char __glibc_reserved[1024 / 8 - sizeof (sigset_t)]; +# 107 "/usr/riscv64-linux-gnu/include/sys/ucontext.h" 3 + mcontext_t uc_mcontext; + } ucontext_t; +# 317 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 + + + + + + + +extern int siginterrupt (int __sig, int __interrupt) noexcept (true) + __attribute__ ((__deprecated__ ("Use sigaction with SA_RESTART instead"))); + +# 1 "/usr/riscv64-linux-gnu/include/bits/sigstack.h" 1 3 +# 328 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/sigstksz.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/sigstksz.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/unistd.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern "C" { +# 202 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/posix_opt.h" 1 3 +# 203 "/usr/riscv64-linux-gnu/include/unistd.h" 2 3 + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/environments.h" 1 3 +# 22 "/usr/riscv64-linux-gnu/include/bits/environments.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/wordsize.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/bits/environments.h" 2 3 +# 207 "/usr/riscv64-linux-gnu/include/unistd.h" 2 3 +# 226 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 227 "/usr/riscv64-linux-gnu/include/unistd.h" 2 3 +# 274 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +typedef __socklen_t socklen_t; +# 287 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern int access (const char *__name, int __type) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + +extern int euidaccess (const char *__name, int __type) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int eaccess (const char *__name, int __type) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int execveat (int __fd, const char *__path, char *const __argv[], + char *const __envp[], int __flags) + noexcept (true) __attribute__ ((__nonnull__ (2, 3))); + + + + + + +extern int faccessat (int __fd, const char *__file, int __type, int __flag) + noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +# 339 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern __off_t lseek (int __fd, __off_t __offset, int __whence) noexcept (true); +# 350 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) + noexcept (true); + + + + + + +extern int close (int __fd); + + + + +extern void closefrom (int __lowfd) noexcept (true); + + + + + + + +extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__write_only__, 2, 3))); + + + + + +extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__read_only__, 2, 3))); +# 389 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, + __off_t __offset) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__write_only__, 2, 3))); + + + + + + +extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, + __off_t __offset) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__read_only__, 2, 3))); +# 422 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__write_only__, 2, 3))); + + +extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, + __off64_t __offset) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__read_only__, 2, 3))); + + + + + + + +extern int pipe (int __pipedes[2]) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + +extern int pipe2 (int __pipedes[2], int __flags) noexcept (true) __attribute__ ((__warn_unused_result__)); +# 452 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern unsigned int alarm (unsigned int __seconds) noexcept (true); +# 464 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern unsigned int sleep (unsigned int __seconds); + + + + + + + +extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) + noexcept (true); + + + + + + +extern int usleep (__useconds_t __useconds); +# 489 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern int pause (void); + + + +extern int chown (const char *__file, __uid_t __owner, __gid_t __group) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int fchown (int __fd, __uid_t __owner, __gid_t __group) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + +extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int fchownat (int __fd, const char *__file, __uid_t __owner, + __gid_t __group, int __flag) + noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + +extern int chdir (const char *__path) noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int fchdir (int __fd) noexcept (true) __attribute__ ((__warn_unused_result__)); +# 531 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern char *getcwd (char *__buf, size_t __size) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + + +extern char *get_current_dir_name (void) noexcept (true); + + + + + + + +extern char *getwd (char *__buf) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__write_only__, 1))); + + + + +extern int dup (int __fd) noexcept (true) __attribute__ ((__warn_unused_result__)); + + +extern int dup2 (int __fd, int __fd2) noexcept (true); + + + + +extern int dup3 (int __fd, int __fd2, int __flags) noexcept (true); + + + +extern char **__environ; + +extern char **environ; + + + + + +extern int execve (const char *__path, char *const __argv[], + char *const __envp[]) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int fexecve (int __fd, char *const __argv[], char *const __envp[]) + noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + +extern int execv (const char *__path, char *const __argv[]) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int execle (const char *__path, const char *__arg, ...) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int execl (const char *__path, const char *__arg, ...) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int execvp (const char *__file, char *const __argv[]) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int execlp (const char *__file, const char *__arg, ...) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int execvpe (const char *__file, char *const __argv[], + char *const __envp[]) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int nice (int __inc) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + +extern void _exit (int __status) __attribute__ ((__noreturn__)); + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/confname.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/confname.h" 3 +enum + { + _PC_LINK_MAX, + + _PC_MAX_CANON, + + _PC_MAX_INPUT, + + _PC_NAME_MAX, + + _PC_PATH_MAX, + + _PC_PIPE_BUF, + + _PC_CHOWN_RESTRICTED, + + _PC_NO_TRUNC, + + _PC_VDISABLE, + + _PC_SYNC_IO, + + _PC_ASYNC_IO, + + _PC_PRIO_IO, + + _PC_SOCK_MAXBUF, + + _PC_FILESIZEBITS, + + _PC_REC_INCR_XFER_SIZE, + + _PC_REC_MAX_XFER_SIZE, + + _PC_REC_MIN_XFER_SIZE, + + _PC_REC_XFER_ALIGN, + + _PC_ALLOC_SIZE_MIN, + + _PC_SYMLINK_MAX, + + _PC_2_SYMLINKS + + }; + + +enum + { + _SC_ARG_MAX, + + _SC_CHILD_MAX, + + _SC_CLK_TCK, + + _SC_NGROUPS_MAX, + + _SC_OPEN_MAX, + + _SC_STREAM_MAX, + + _SC_TZNAME_MAX, + + _SC_JOB_CONTROL, + + _SC_SAVED_IDS, + + _SC_REALTIME_SIGNALS, + + _SC_PRIORITY_SCHEDULING, + + _SC_TIMERS, + + _SC_ASYNCHRONOUS_IO, + + _SC_PRIORITIZED_IO, + + _SC_SYNCHRONIZED_IO, + + _SC_FSYNC, + + _SC_MAPPED_FILES, + + _SC_MEMLOCK, + + _SC_MEMLOCK_RANGE, + + _SC_MEMORY_PROTECTION, + + _SC_MESSAGE_PASSING, + + _SC_SEMAPHORES, + + _SC_SHARED_MEMORY_OBJECTS, + + _SC_AIO_LISTIO_MAX, + + _SC_AIO_MAX, + + _SC_AIO_PRIO_DELTA_MAX, + + _SC_DELAYTIMER_MAX, + + _SC_MQ_OPEN_MAX, + + _SC_MQ_PRIO_MAX, + + _SC_VERSION, + + _SC_PAGESIZE, + + + _SC_RTSIG_MAX, + + _SC_SEM_NSEMS_MAX, + + _SC_SEM_VALUE_MAX, + + _SC_SIGQUEUE_MAX, + + _SC_TIMER_MAX, + + + + + _SC_BC_BASE_MAX, + + _SC_BC_DIM_MAX, + + _SC_BC_SCALE_MAX, + + _SC_BC_STRING_MAX, + + _SC_COLL_WEIGHTS_MAX, + + _SC_EQUIV_CLASS_MAX, + + _SC_EXPR_NEST_MAX, + + _SC_LINE_MAX, + + _SC_RE_DUP_MAX, + + _SC_CHARCLASS_NAME_MAX, + + + _SC_2_VERSION, + + _SC_2_C_BIND, + + _SC_2_C_DEV, + + _SC_2_FORT_DEV, + + _SC_2_FORT_RUN, + + _SC_2_SW_DEV, + + _SC_2_LOCALEDEF, + + + _SC_PII, + + _SC_PII_XTI, + + _SC_PII_SOCKET, + + _SC_PII_INTERNET, + + _SC_PII_OSI, + + _SC_POLL, + + _SC_SELECT, + + _SC_UIO_MAXIOV, + + _SC_IOV_MAX = _SC_UIO_MAXIOV, + + _SC_PII_INTERNET_STREAM, + + _SC_PII_INTERNET_DGRAM, + + _SC_PII_OSI_COTS, + + _SC_PII_OSI_CLTS, + + _SC_PII_OSI_M, + + _SC_T_IOV_MAX, + + + + _SC_THREADS, + + _SC_THREAD_SAFE_FUNCTIONS, + + _SC_GETGR_R_SIZE_MAX, + + _SC_GETPW_R_SIZE_MAX, + + _SC_LOGIN_NAME_MAX, + + _SC_TTY_NAME_MAX, + + _SC_THREAD_DESTRUCTOR_ITERATIONS, + + _SC_THREAD_KEYS_MAX, + + _SC_THREAD_STACK_MIN, + + _SC_THREAD_THREADS_MAX, + + _SC_THREAD_ATTR_STACKADDR, + + _SC_THREAD_ATTR_STACKSIZE, + + _SC_THREAD_PRIORITY_SCHEDULING, + + _SC_THREAD_PRIO_INHERIT, + + _SC_THREAD_PRIO_PROTECT, + + _SC_THREAD_PROCESS_SHARED, + + + _SC_NPROCESSORS_CONF, + + _SC_NPROCESSORS_ONLN, + + _SC_PHYS_PAGES, + + _SC_AVPHYS_PAGES, + + _SC_ATEXIT_MAX, + + _SC_PASS_MAX, + + + _SC_XOPEN_VERSION, + + _SC_XOPEN_XCU_VERSION, + + _SC_XOPEN_UNIX, + + _SC_XOPEN_CRYPT, + + _SC_XOPEN_ENH_I18N, + + _SC_XOPEN_SHM, + + + _SC_2_CHAR_TERM, + + _SC_2_C_VERSION, + + _SC_2_UPE, + + + _SC_XOPEN_XPG2, + + _SC_XOPEN_XPG3, + + _SC_XOPEN_XPG4, + + + _SC_CHAR_BIT, + + _SC_CHAR_MAX, + + _SC_CHAR_MIN, + + _SC_INT_MAX, + + _SC_INT_MIN, + + _SC_LONG_BIT, + + _SC_WORD_BIT, + + _SC_MB_LEN_MAX, + + _SC_NZERO, + + _SC_SSIZE_MAX, + + _SC_SCHAR_MAX, + + _SC_SCHAR_MIN, + + _SC_SHRT_MAX, + + _SC_SHRT_MIN, + + _SC_UCHAR_MAX, + + _SC_UINT_MAX, + + _SC_ULONG_MAX, + + _SC_USHRT_MAX, + + + _SC_NL_ARGMAX, + + _SC_NL_LANGMAX, + + _SC_NL_MSGMAX, + + _SC_NL_NMAX, + + _SC_NL_SETMAX, + + _SC_NL_TEXTMAX, + + + _SC_XBS5_ILP32_OFF32, + + _SC_XBS5_ILP32_OFFBIG, + + _SC_XBS5_LP64_OFF64, + + _SC_XBS5_LPBIG_OFFBIG, + + + _SC_XOPEN_LEGACY, + + _SC_XOPEN_REALTIME, + + _SC_XOPEN_REALTIME_THREADS, + + + _SC_ADVISORY_INFO, + + _SC_BARRIERS, + + _SC_BASE, + + _SC_C_LANG_SUPPORT, + + _SC_C_LANG_SUPPORT_R, + + _SC_CLOCK_SELECTION, + + _SC_CPUTIME, + + _SC_THREAD_CPUTIME, + + _SC_DEVICE_IO, + + _SC_DEVICE_SPECIFIC, + + _SC_DEVICE_SPECIFIC_R, + + _SC_FD_MGMT, + + _SC_FIFO, + + _SC_PIPE, + + _SC_FILE_ATTRIBUTES, + + _SC_FILE_LOCKING, + + _SC_FILE_SYSTEM, + + _SC_MONOTONIC_CLOCK, + + _SC_MULTI_PROCESS, + + _SC_SINGLE_PROCESS, + + _SC_NETWORKING, + + _SC_READER_WRITER_LOCKS, + + _SC_SPIN_LOCKS, + + _SC_REGEXP, + + _SC_REGEX_VERSION, + + _SC_SHELL, + + _SC_SIGNALS, + + _SC_SPAWN, + + _SC_SPORADIC_SERVER, + + _SC_THREAD_SPORADIC_SERVER, + + _SC_SYSTEM_DATABASE, + + _SC_SYSTEM_DATABASE_R, + + _SC_TIMEOUTS, + + _SC_TYPED_MEMORY_OBJECTS, + + _SC_USER_GROUPS, + + _SC_USER_GROUPS_R, + + _SC_2_PBS, + + _SC_2_PBS_ACCOUNTING, + + _SC_2_PBS_LOCATE, + + _SC_2_PBS_MESSAGE, + + _SC_2_PBS_TRACK, + + _SC_SYMLOOP_MAX, + + _SC_STREAMS, + + _SC_2_PBS_CHECKPOINT, + + + _SC_V6_ILP32_OFF32, + + _SC_V6_ILP32_OFFBIG, + + _SC_V6_LP64_OFF64, + + _SC_V6_LPBIG_OFFBIG, + + + _SC_HOST_NAME_MAX, + + _SC_TRACE, + + _SC_TRACE_EVENT_FILTER, + + _SC_TRACE_INHERIT, + + _SC_TRACE_LOG, + + + _SC_LEVEL1_ICACHE_SIZE, + + _SC_LEVEL1_ICACHE_ASSOC, + + _SC_LEVEL1_ICACHE_LINESIZE, + + _SC_LEVEL1_DCACHE_SIZE, + + _SC_LEVEL1_DCACHE_ASSOC, + + _SC_LEVEL1_DCACHE_LINESIZE, + + _SC_LEVEL2_CACHE_SIZE, + + _SC_LEVEL2_CACHE_ASSOC, + + _SC_LEVEL2_CACHE_LINESIZE, + + _SC_LEVEL3_CACHE_SIZE, + + _SC_LEVEL3_CACHE_ASSOC, + + _SC_LEVEL3_CACHE_LINESIZE, + + _SC_LEVEL4_CACHE_SIZE, + + _SC_LEVEL4_CACHE_ASSOC, + + _SC_LEVEL4_CACHE_LINESIZE, + + + + _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, + + _SC_RAW_SOCKETS, + + + _SC_V7_ILP32_OFF32, + + _SC_V7_ILP32_OFFBIG, + + _SC_V7_LP64_OFF64, + + _SC_V7_LPBIG_OFFBIG, + + + _SC_SS_REPL_MAX, + + + _SC_TRACE_EVENT_NAME_MAX, + + _SC_TRACE_NAME_MAX, + + _SC_TRACE_SYS_MAX, + + _SC_TRACE_USER_EVENT_MAX, + + + _SC_XOPEN_STREAMS, + + + _SC_THREAD_ROBUST_PRIO_INHERIT, + + _SC_THREAD_ROBUST_PRIO_PROTECT, + + + _SC_MINSIGSTKSZ, + + + _SC_SIGSTKSZ + + }; + + +enum + { + _CS_PATH, + + + _CS_V6_WIDTH_RESTRICTED_ENVS, + + + + _CS_GNU_LIBC_VERSION, + + _CS_GNU_LIBPTHREAD_VERSION, + + + _CS_V5_WIDTH_RESTRICTED_ENVS, + + + + _CS_V7_WIDTH_RESTRICTED_ENVS, + + + + _CS_LFS_CFLAGS = 1000, + + _CS_LFS_LDFLAGS, + + _CS_LFS_LIBS, + + _CS_LFS_LINTFLAGS, + + _CS_LFS64_CFLAGS, + + _CS_LFS64_LDFLAGS, + + _CS_LFS64_LIBS, + + _CS_LFS64_LINTFLAGS, + + + _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, + + _CS_XBS5_ILP32_OFF32_LDFLAGS, + + _CS_XBS5_ILP32_OFF32_LIBS, + + _CS_XBS5_ILP32_OFF32_LINTFLAGS, + + _CS_XBS5_ILP32_OFFBIG_CFLAGS, + + _CS_XBS5_ILP32_OFFBIG_LDFLAGS, + + _CS_XBS5_ILP32_OFFBIG_LIBS, + + _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, + + _CS_XBS5_LP64_OFF64_CFLAGS, + + _CS_XBS5_LP64_OFF64_LDFLAGS, + + _CS_XBS5_LP64_OFF64_LIBS, + + _CS_XBS5_LP64_OFF64_LINTFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_CFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_LIBS, + + _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, + + + _CS_POSIX_V6_ILP32_OFF32_CFLAGS, + + _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, + + _CS_POSIX_V6_ILP32_OFF32_LIBS, + + _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_LIBS, + + _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, + + _CS_POSIX_V6_LP64_OFF64_CFLAGS, + + _CS_POSIX_V6_LP64_OFF64_LDFLAGS, + + _CS_POSIX_V6_LP64_OFF64_LIBS, + + _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, + + + _CS_POSIX_V7_ILP32_OFF32_CFLAGS, + + _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, + + _CS_POSIX_V7_ILP32_OFF32_LIBS, + + _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, + + _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, + + _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, + + _CS_POSIX_V7_ILP32_OFFBIG_LIBS, + + _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, + + _CS_POSIX_V7_LP64_OFF64_CFLAGS, + + _CS_POSIX_V7_LP64_OFF64_LDFLAGS, + + _CS_POSIX_V7_LP64_OFF64_LIBS, + + _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, + + _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, + + _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, + + _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, + + _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, + + + _CS_V6_ENV, + + _CS_V7_ENV + + }; +# 631 "/usr/riscv64-linux-gnu/include/unistd.h" 2 3 + + +extern long int pathconf (const char *__path, int __name) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern long int fpathconf (int __fd, int __name) noexcept (true); + + +extern long int sysconf (int __name) noexcept (true); + + + +extern size_t confstr (int __name, char *__buf, size_t __len) noexcept (true) + __attribute__ ((__access__ (__write_only__, 2, 3))); + + + + +extern __pid_t getpid (void) noexcept (true); + + +extern __pid_t getppid (void) noexcept (true); + + +extern __pid_t getpgrp (void) noexcept (true); + + +extern __pid_t __getpgid (__pid_t __pid) noexcept (true); + +extern __pid_t getpgid (__pid_t __pid) noexcept (true); + + + + + + +extern int setpgid (__pid_t __pid, __pid_t __pgid) noexcept (true); +# 682 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern int setpgrp (void) noexcept (true); + + + + + + +extern __pid_t setsid (void) noexcept (true); + + + +extern __pid_t getsid (__pid_t __pid) noexcept (true); + + + +extern __uid_t getuid (void) noexcept (true); + + +extern __uid_t geteuid (void) noexcept (true); + + +extern __gid_t getgid (void) noexcept (true); + + +extern __gid_t getegid (void) noexcept (true); + + + + +extern int getgroups (int __size, __gid_t __list[]) noexcept (true) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__write_only__, 2, 1))); + + +extern int group_member (__gid_t __gid) noexcept (true); + + + + + + +extern int setuid (__uid_t __uid) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + +extern int setreuid (__uid_t __ruid, __uid_t __euid) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + +extern int seteuid (__uid_t __uid) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int setgid (__gid_t __gid) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + +extern int setregid (__gid_t __rgid, __gid_t __egid) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + +extern int setegid (__gid_t __gid) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + + +extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) + noexcept (true); + + + +extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) + noexcept (true); + + + +extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) + noexcept (true) __attribute__ ((__warn_unused_result__)); + + + +extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) + noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + + + +extern __pid_t fork (void) noexcept (true); + + + + + + + +extern __pid_t vfork (void) noexcept (true); + + + + + + +extern __pid_t _Fork (void) noexcept (true); + + + + + +extern char *ttyname (int __fd) noexcept (true); + + + +extern int ttyname_r (int __fd, char *__buf, size_t __buflen) + noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__write_only__, 2, 3))); + + + +extern int isatty (int __fd) noexcept (true); + + + + +extern int ttyslot (void) noexcept (true); + + + + +extern int link (const char *__from, const char *__to) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern int linkat (int __fromfd, const char *__from, int __tofd, + const char *__to, int __flags) + noexcept (true) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern int symlink (const char *__from, const char *__to) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern ssize_t readlink (const char *__restrict __path, + char *__restrict __buf, size_t __len) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__write_only__, 2, 3))); + + + + + +extern int symlinkat (const char *__from, int __tofd, + const char *__to) noexcept (true) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + +extern ssize_t readlinkat (int __fd, const char *__restrict __path, + char *__restrict __buf, size_t __len) + noexcept (true) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__write_only__, 3, 4))); + + + +extern int unlink (const char *__name) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern int unlinkat (int __fd, const char *__name, int __flag) + noexcept (true) __attribute__ ((__nonnull__ (2))); + + + +extern int rmdir (const char *__path) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + +extern __pid_t tcgetpgrp (int __fd) noexcept (true); + + +extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) noexcept (true); + + + + + + +extern char *getlogin (void); + + + + + + + +extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))) + __attribute__ ((__access__ (__write_only__, 1, 2))); + + + + +extern int setlogin (const char *__name) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/getopt_posix.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/bits/getopt_posix.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/getopt_core.h" 1 3 +# 28 "/usr/riscv64-linux-gnu/include/bits/getopt_core.h" 3 +extern "C" { + + + + + + + +extern char *optarg; +# 50 "/usr/riscv64-linux-gnu/include/bits/getopt_core.h" 3 +extern int optind; + + + + +extern int opterr; + + + +extern int optopt; +# 91 "/usr/riscv64-linux-gnu/include/bits/getopt_core.h" 3 +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + noexcept (true) __attribute__ ((__nonnull__ (2, 3))); + +} +# 28 "/usr/riscv64-linux-gnu/include/bits/getopt_posix.h" 2 3 + +extern "C" { +# 49 "/usr/riscv64-linux-gnu/include/bits/getopt_posix.h" 3 +} +# 904 "/usr/riscv64-linux-gnu/include/unistd.h" 2 3 + + + + + + + +extern int gethostname (char *__name, size_t __len) noexcept (true) __attribute__ ((__nonnull__ (1))) + __attribute__ ((__access__ (__write_only__, 1, 2))); + + + + + + +extern int sethostname (const char *__name, size_t __len) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2))); + + + +extern int sethostid (long int __id) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + + +extern int getdomainname (char *__name, size_t __len) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__write_only__, 1, 2))); +extern int setdomainname (const char *__name, size_t __len) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2))); + + + + +extern int vhangup (void) noexcept (true); + + +extern int revoke (const char *__file) noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int profil (unsigned short int *__sample_buffer, size_t __size, + size_t __offset, unsigned int __scale) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + +extern int acct (const char *__name) noexcept (true); + + + +extern char *getusershell (void) noexcept (true); +extern void endusershell (void) noexcept (true); +extern void setusershell (void) noexcept (true); + + + + + +extern int daemon (int __nochdir, int __noclose) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int chroot (const char *__path) noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int fsync (int __fd); + + + + + +extern int syncfs (int __fd) noexcept (true); + + + + + + +extern long int gethostid (void); + + +extern void sync (void) noexcept (true); + + + + + +extern int getpagesize (void) noexcept (true) __attribute__ ((__const__)); + + + + +extern int getdtablesize (void) noexcept (true); +# 1026 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern int truncate (const char *__file, __off_t __length) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 1038 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern int truncate64 (const char *__file, __off64_t __length) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 1049 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern int ftruncate (int __fd, __off_t __length) noexcept (true) __attribute__ ((__warn_unused_result__)); +# 1059 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern int ftruncate64 (int __fd, __off64_t __length) noexcept (true) __attribute__ ((__warn_unused_result__)); +# 1070 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern int brk (void *__addr) noexcept (true) __attribute__ ((__warn_unused_result__)); + + + + + +extern void *sbrk (intptr_t __delta) noexcept (true); +# 1091 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern long int syscall (long int __sysno, ...) noexcept (true); +# 1142 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +ssize_t copy_file_range (int __infd, __off64_t *__pinoff, + int __outfd, __off64_t *__poutoff, + size_t __length, unsigned int __flags); + + + + + +extern int fdatasync (int __fildes); +# 1159 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern char *crypt (const char *__key, const char *__salt) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + +extern void swab (const void *__restrict __from, void *__restrict __to, + ssize_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))) + __attribute__ ((__access__ (__read_only__, 1, 3))) + __attribute__ ((__access__ (__write_only__, 2, 3))); +# 1198 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +int getentropy (void *__buffer, size_t __length) __attribute__ ((__warn_unused_result__)) + __attribute__ ((__access__ (__write_only__, 1, 2))); +# 1208 "/usr/riscv64-linux-gnu/include/unistd.h" 3 +extern int close_range (unsigned int __fd, unsigned int __max_fd, + int __flags) noexcept (true); + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/unistd.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/bits/unistd.h" 3 +extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, + size_t __buflen) + __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); +extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") + + __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); +extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +read (int __fd, void *__buf, size_t __nbytes) +{ + return ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && (((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __read_alias (__fd, __buf, __nbytes) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)) : __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)))) + + ; +} + + +extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, + __off_t __offset, size_t __bufsize) + __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); +extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset, size_t __bufsize) + __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); +extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") + + + __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); +extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") + + + __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); +extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))) + ; +extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))) + ; + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) +{ + return ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && (((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __pread_alias (__fd, __buf, __nbytes, __offset) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __pread_chk_warn (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)) : __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)))) + + ; +} +# 89 "/usr/riscv64-linux-gnu/include/bits/unistd.h" 3 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) +{ + return ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && (((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __pread64_alias (__fd, __buf, __nbytes, __offset) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __pread64_chk_warn (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)) : __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)))) + + ; +} + + + + +extern ssize_t __readlink_chk (const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); +extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) noexcept (true) __asm__ ("" "readlink") + + + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); +extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) noexcept (true) __asm__ ("" "__readlink_chk") + + + + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t +__attribute__ ((__leaf__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) noexcept (true) + +{ + return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __readlink_alias (__path, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)) : __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)))) + + ; +} + + + +extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + noexcept (true) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4))); +extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) noexcept (true) __asm__ ("" "readlinkat") + + + + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4))); +extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) noexcept (true) __asm__ ("" "__readlinkat_chk") + + + + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t +__attribute__ ((__leaf__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) noexcept (true) + +{ + return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __readlinkat_alias (__fd, __path, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __readlinkat_chk_warn (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)) : __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)))) + + ; +} + + +extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) + noexcept (true) __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_alias (char *__buf, size_t __size) noexcept (true) __asm__ ("" "getcwd") + __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) noexcept (true) __asm__ ("" "__getcwd_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__leaf__)) getcwd (char *__buf, size_t __size) noexcept (true) +{ + return ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__size)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getcwd_alias (__buf, __size) : ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__size)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)) : __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)))) + + ; +} + + +extern char *__getwd_chk (char *__buf, size_t buflen) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))); +extern char *__getwd_warn (char *__buf) noexcept (true) __asm__ ("" "getwd") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__leaf__)) getwd (char *__buf) noexcept (true) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); + return __getwd_warn (__buf); +} + + +extern size_t __confstr_chk (int __name, char *__buf, size_t __len, + size_t __buflen) noexcept (true) + __attribute__ ((__access__ (__write_only__, 2, 3))); +extern size_t __confstr_alias (int __name, char *__buf, size_t __len) noexcept (true) __asm__ ("" "confstr") + + __attribute__ ((__access__ (__write_only__, 2, 3))); +extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) noexcept (true) __asm__ ("" "__confstr_chk") + + + __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t +__attribute__ ((__leaf__)) confstr (int __name, char *__buf, size_t __len) noexcept (true) +{ + return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __confstr_alias (__name, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)) : __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)))) + + ; +} + + +extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) + noexcept (true) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1))); +extern int __getgroups_alias (int __size, __gid_t __list[]) noexcept (true) __asm__ ("" "getgroups") + __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1))); +extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) noexcept (true) __asm__ ("" "__getgroups_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) getgroups (int __size, __gid_t __list[]) noexcept (true) +{ + return ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_object_size (__list, 2 > 1)) / (sizeof (__gid_t)))) && (((long unsigned int) (__size)) <= (__builtin_object_size (__list, 2 > 1)) / (sizeof (__gid_t)))) ? __getgroups_alias (__size, __list) : ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_object_size (__list, 2 > 1)) / (sizeof (__gid_t)))) && !(((long unsigned int) (__size)) <= (__builtin_object_size (__list, 2 > 1)) / (sizeof (__gid_t)))) ? __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)) : __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)))) + + ; +} + + +extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) noexcept (true) __attribute__ ((__nonnull__ (2))) + __attribute__ ((__access__ (__write_only__, 2, 3))); +extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) noexcept (true) __asm__ ("" "ttyname_r") + + __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) noexcept (true) __asm__ ("" "__ttyname_r_chk") + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen) noexcept (true) +{ + return ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __ttyname_r_alias (__fd, __buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)))) + + ; +} + + + +extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2))); +extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") + + + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +getlogin_r (char *__buf, size_t __buflen) +{ + return ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getlogin_r_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)))) + + ; +} + + + + +extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2))); +extern int __gethostname_alias (char *__buf, size_t __buflen) noexcept (true) __asm__ ("" "gethostname") + + __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2))); +extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) noexcept (true) __asm__ ("" "__gethostname_chk") + + + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) gethostname (char *__buf, size_t __buflen) noexcept (true) +{ + return ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __gethostname_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)))) + + ; +} + + + + +extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) + noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))); +extern int __getdomainname_alias (char *__buf, size_t __buflen) noexcept (true) __asm__ ("" "getdomainname") + + __attribute__ ((__nonnull__ (1))) + __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))); +extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) noexcept (true) __asm__ ("" "__getdomainname_chk") + + + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__leaf__)) getdomainname (char *__buf, size_t __buflen) noexcept (true) +{ + return ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getdomainname_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)))) + + ; +} +# 1215 "/usr/riscv64-linux-gnu/include/unistd.h" 2 3 + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/unistd_ext.h" 1 3 +# 34 "/usr/riscv64-linux-gnu/include/bits/unistd_ext.h" 3 +extern __pid_t gettid (void) noexcept (true); + + + +# 1 "/usr/riscv64-linux-gnu/include/linux/close_range.h" 1 3 +# 39 "/usr/riscv64-linux-gnu/include/bits/unistd_ext.h" 2 3 +# 1219 "/usr/riscv64-linux-gnu/include/unistd.h" 2 3 + +} +# 25 "/usr/riscv64-linux-gnu/include/bits/sigstksz.h" 2 3 +# 329 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/ss_flags.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/bits/ss_flags.h" 3 +enum +{ + SS_ONSTACK = 1, + + SS_DISABLE + +}; +# 330 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 + + + +extern int sigaltstack (const stack_t *__restrict __ss, + stack_t *__restrict __oss) noexcept (true); + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/struct_sigstack.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/bits/types/struct_sigstack.h" 3 +struct sigstack + { + void *ss_sp; + int ss_onstack; + }; +# 340 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 + + + + + + + +extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) + noexcept (true) __attribute__ ((__deprecated__)); + + + + + + +extern int sighold (int __sig) noexcept (true) + __attribute__ ((__deprecated__ ("Use the sigprocmask function instead"))); + + +extern int sigrelse (int __sig) noexcept (true) + __attribute__ ((__deprecated__ ("Use the sigprocmask function instead"))); + + +extern int sigignore (int __sig) noexcept (true) + __attribute__ ((__deprecated__ ("Use the signal function instead"))); + + +extern __sighandler_t sigset (int __sig, __sighandler_t __disp) noexcept (true) + __attribute__ ((__deprecated__ ("Use the signal and sigprocmask functions instead"))) + ; + + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/sigthread.h" 1 3 +# 31 "/usr/riscv64-linux-gnu/include/bits/sigthread.h" 3 +extern int pthread_sigmask (int __how, + const __sigset_t *__restrict __newmask, + __sigset_t *__restrict __oldmask)noexcept (true); + + +extern int pthread_kill (pthread_t __threadid, int __signo) noexcept (true); + + + +extern int pthread_sigqueue (pthread_t __threadid, int __signo, + const union sigval __value) noexcept (true); +# 377 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 + + + + + + +extern int __libc_current_sigrtmin (void) noexcept (true); + +extern int __libc_current_sigrtmax (void) noexcept (true); + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/signal_ext.h" 1 3 +# 29 "/usr/riscv64-linux-gnu/include/bits/signal_ext.h" 3 +extern int tgkill (__pid_t __tgid, __pid_t __tid, int __signal); +# 392 "/usr/riscv64-linux-gnu/include/signal.h" 2 3 + +} +# 54 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 + +# 1 "/usr/riscv64-linux-gnu/include/ucontext.h" 1 3 +# 26 "/usr/riscv64-linux-gnu/include/ucontext.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/indirect-return.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/ucontext.h" 2 3 + + + + +extern "C" { + + +extern int getcontext (ucontext_t *__ucp) noexcept (true); + + +extern int setcontext (const ucontext_t *__ucp) noexcept (true); + + + +extern int swapcontext (ucontext_t *__restrict __oucp, + const ucontext_t *__restrict __ucp) + noexcept (true) ; + + + + + + + +extern void makecontext (ucontext_t *__ucp, void (*__func) (void), + int __argc, ...) noexcept (true); + +} +# 56 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 + + + + + +# 1 "/usr/riscv64-linux-gnu/include/sys/time.h" 1 3 +# 34 "/usr/riscv64-linux-gnu/include/sys/time.h" 3 +extern "C" { +# 52 "/usr/riscv64-linux-gnu/include/sys/time.h" 3 +struct timezone + { + int tz_minuteswest; + int tz_dsttime; + }; +# 67 "/usr/riscv64-linux-gnu/include/sys/time.h" 3 +extern int gettimeofday (struct timeval *__restrict __tv, + void *__restrict __tz) noexcept (true) __attribute__ ((__nonnull__ (1))); +# 86 "/usr/riscv64-linux-gnu/include/sys/time.h" 3 +extern int settimeofday (const struct timeval *__tv, + const struct timezone *__tz) + noexcept (true); + + + + + +extern int adjtime (const struct timeval *__delta, + struct timeval *__olddelta) noexcept (true); +# 114 "/usr/riscv64-linux-gnu/include/sys/time.h" 3 +enum __itimer_which + { + + ITIMER_REAL = 0, + + + ITIMER_VIRTUAL = 1, + + + + ITIMER_PROF = 2 + + }; + + + +struct itimerval + { + + struct timeval it_interval; + + struct timeval it_value; + }; + + + + + + +typedef int __itimer_which_t; + + + + + +extern int getitimer (__itimer_which_t __which, + struct itimerval *__value) noexcept (true); + + + + +extern int setitimer (__itimer_which_t __which, + const struct itimerval *__restrict __new, + struct itimerval *__restrict __old) noexcept (true); + + + + +extern int utimes (const char *__file, const struct timeval __tvp[2]) + noexcept (true) __attribute__ ((__nonnull__ (1))); +# 189 "/usr/riscv64-linux-gnu/include/sys/time.h" 3 +extern int lutimes (const char *__file, const struct timeval __tvp[2]) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int futimes (int __fd, const struct timeval __tvp[2]) noexcept (true); +# 214 "/usr/riscv64-linux-gnu/include/sys/time.h" 3 +extern int futimesat (int __fd, const char *__file, + const struct timeval __tvp[2]) noexcept (true); +# 258 "/usr/riscv64-linux-gnu/include/sys/time.h" 3 +} +# 62 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" 2 +# 108 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" + +# 108 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" +inline int g_isnan(float f) { return isnan(f); } +inline int g_isnan(double f) { return isnan(f); } +# 119 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions_gcc.hpp" +inline int g_isfinite(jfloat f) { return isfinite(f); } +inline int g_isfinite(jdouble f) { return isfinite(f); } +# 37 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" 2 + +# 1 "/usr/riscv64-linux-gnu/include/c++/11/cstddef" 1 3 +# 42 "/usr/riscv64-linux-gnu/include/c++/11/cstddef" 3 + +# 43 "/usr/riscv64-linux-gnu/include/c++/11/cstddef" 3 + + + + + + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 51 "/usr/riscv64-linux-gnu/include/c++/11/cstddef" 2 3 + + +# 52 "/usr/riscv64-linux-gnu/include/c++/11/cstddef" 3 +extern "C++" +{ + +namespace std +{ + + using ::max_align_t; +} +# 191 "/usr/riscv64-linux-gnu/include/c++/11/cstddef" 3 +} +# 39 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" 2 +# 1 "/usr/riscv64-linux-gnu/include/c++/11/cstdint" 1 3 +# 32 "/usr/riscv64-linux-gnu/include/c++/11/cstdint" 3 + +# 33 "/usr/riscv64-linux-gnu/include/c++/11/cstdint" 3 +# 44 "/usr/riscv64-linux-gnu/include/c++/11/cstdint" 3 +namespace std +{ + + using ::int8_t; + using ::int16_t; + using ::int32_t; + using ::int64_t; + + using ::int_fast8_t; + using ::int_fast16_t; + using ::int_fast32_t; + using ::int_fast64_t; + + using ::int_least8_t; + using ::int_least16_t; + using ::int_least32_t; + using ::int_least64_t; + + using ::intmax_t; + using ::intptr_t; + + using ::uint8_t; + using ::uint16_t; + using ::uint32_t; + using ::uint64_t; + + using ::uint_fast8_t; + using ::uint_fast16_t; + using ::uint_fast32_t; + using ::uint_fast64_t; + + using ::uint_least8_t; + using ::uint_least16_t; + using ::uint_least32_t; + using ::uint_least64_t; + + using ::uintmax_t; + using ::uintptr_t; + + + + + +} +# 40 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" 2 +# 1 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 1 3 +# 32 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + +# 33 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + + + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + class tuple; + + template + class reference_wrapper; +# 64 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template + struct integral_constant + { + static constexpr _Tp value = __v; + typedef _Tp value_type; + typedef integral_constant<_Tp, __v> type; + constexpr operator value_type() const noexcept { return value; } + + + + + constexpr value_type operator()() const noexcept { return value; } + + }; + + template + constexpr _Tp integral_constant<_Tp, __v>::value; + + + using true_type = integral_constant; + + + using false_type = integral_constant; + + + + template + using __bool_constant = integral_constant; +# 104 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template + struct conditional; + + + template + struct __type_identity + { using type = _Type; }; + + template + using __type_identity_t = typename __type_identity<_Tp>::type; + + template + struct __or_; + + template<> + struct __or_<> + : public false_type + { }; + + template + struct __or_<_B1> + : public _B1 + { }; + + template + struct __or_<_B1, _B2> + : public conditional<_B1::value, _B1, _B2>::type + { }; + + template + struct __or_<_B1, _B2, _B3, _Bn...> + : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type + { }; + + template + struct __and_; + + template<> + struct __and_<> + : public true_type + { }; + + template + struct __and_<_B1> + : public _B1 + { }; + + template + struct __and_<_B1, _B2> + : public conditional<_B1::value, _B2, _B1>::type + { }; + + template + struct __and_<_B1, _B2, _B3, _Bn...> + : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type + { }; + + template + struct __not_ + : public __bool_constant + { }; +# 209 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template + struct is_reference; + template + struct is_function; + template + struct is_void; + template + struct remove_cv; + template + struct is_const; + + + template + struct __is_array_unknown_bounds; + + + + + template + constexpr true_type __is_complete_or_unbounded(__type_identity<_Tp>) + { return {}; } + + template + constexpr typename __or_< + is_reference<_NestedType>, + is_function<_NestedType>, + is_void<_NestedType>, + __is_array_unknown_bounds<_NestedType> + >::type __is_complete_or_unbounded(_TypeIdentity) + { return {}; } + + + + + + + template + struct __success_type + { typedef _Tp type; }; + + struct __failure_type + { }; + + + template + using __remove_cv_t = typename remove_cv<_Tp>::type; + + + + template + struct __is_void_helper + : public false_type { }; + + template<> + struct __is_void_helper + : public true_type { }; + + + + template + struct is_void + : public __is_void_helper<__remove_cv_t<_Tp>>::type + { }; + + + template + struct __is_integral_helper + : public false_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + + + + + template<> + struct __is_integral_helper + : public true_type { }; +# 310 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; +# 391 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template + struct is_integral + : public __is_integral_helper<__remove_cv_t<_Tp>>::type + { }; + + + template + struct __is_floating_point_helper + : public false_type { }; + + template<> + struct __is_floating_point_helper + : public true_type { }; + + template<> + struct __is_floating_point_helper + : public true_type { }; + + template<> + struct __is_floating_point_helper + : public true_type { }; +# 421 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template + struct is_floating_point + : public __is_floating_point_helper<__remove_cv_t<_Tp>>::type + { }; + + + template + struct is_array + : public false_type { }; + + template + struct is_array<_Tp[_Size]> + : public true_type { }; + + template + struct is_array<_Tp[]> + : public true_type { }; + + template + struct __is_pointer_helper + : public false_type { }; + + template + struct __is_pointer_helper<_Tp*> + : public true_type { }; + + + template + struct is_pointer + : public __is_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + + template + struct is_lvalue_reference + : public false_type { }; + + template + struct is_lvalue_reference<_Tp&> + : public true_type { }; + + + template + struct is_rvalue_reference + : public false_type { }; + + template + struct is_rvalue_reference<_Tp&&> + : public true_type { }; + + template + struct __is_member_object_pointer_helper + : public false_type { }; + + template + struct __is_member_object_pointer_helper<_Tp _Cp::*> + : public __not_>::type { }; + + + template + struct is_member_object_pointer + : public __is_member_object_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + template + struct __is_member_function_pointer_helper + : public false_type { }; + + template + struct __is_member_function_pointer_helper<_Tp _Cp::*> + : public is_function<_Tp>::type { }; + + + template + struct is_member_function_pointer + : public __is_member_function_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + + template + struct is_enum + : public integral_constant + { }; + + + template + struct is_union + : public integral_constant + { }; + + + template + struct is_class + : public integral_constant + { }; + + + template + struct is_function + : public __bool_constant::value> { }; + + template + struct is_function<_Tp&> + : public false_type { }; + + template + struct is_function<_Tp&&> + : public false_type { }; + + + + template + struct __is_null_pointer_helper + : public false_type { }; + + template<> + struct __is_null_pointer_helper + : public true_type { }; + + + template + struct is_null_pointer + : public __is_null_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + + + template + struct __is_nullptr_t + : public is_null_pointer<_Tp> + { } __attribute__ ((__deprecated__ ("use '" "std::is_null_pointer" "' instead"))); + + + + + template + struct is_reference + : public __or_, + is_rvalue_reference<_Tp>>::type + { }; + + + template + struct is_arithmetic + : public __or_, is_floating_point<_Tp>>::type + { }; + + + template + struct is_fundamental + : public __or_, is_void<_Tp>, + is_null_pointer<_Tp>>::type + { }; + + + template + struct is_object + : public __not_<__or_, is_reference<_Tp>, + is_void<_Tp>>>::type + { }; + + template + struct is_member_pointer; + + + template + struct is_scalar + : public __or_, is_enum<_Tp>, is_pointer<_Tp>, + is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type + { }; + + + template + struct is_compound + : public __not_>::type { }; + + + template + struct __is_member_pointer_helper + : public false_type { }; + + template + struct __is_member_pointer_helper<_Tp _Cp::*> + : public true_type { }; + + + + template + struct is_member_pointer + : public __is_member_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + template + struct is_same; + + + template + using __is_one_of = __or_...>; + + + template + using __is_signed_integer = __is_one_of<__remove_cv_t<_Tp>, + signed char, signed short, signed int, signed long, + signed long long +# 637 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + >; + + + template + using __is_unsigned_integer = __is_one_of<__remove_cv_t<_Tp>, + unsigned char, unsigned short, unsigned int, unsigned long, + unsigned long long +# 656 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + >; + + + template + using __is_standard_integer + = __or_<__is_signed_integer<_Tp>, __is_unsigned_integer<_Tp>>; + + + template using __void_t = void; + + + + template + struct __is_referenceable + : public false_type + { }; + + template + struct __is_referenceable<_Tp, __void_t<_Tp&>> + : public true_type + { }; + + + + + + template + struct is_const + : public false_type { }; + + template + struct is_const<_Tp const> + : public true_type { }; + + + template + struct is_volatile + : public false_type { }; + + template + struct is_volatile<_Tp volatile> + : public true_type { }; + + + template + struct is_trivial + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_copyable + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_standard_layout + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + + + template + struct + + is_pod + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + + template + struct + + is_literal_type + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_empty + : public integral_constant + { }; + + + template + struct is_polymorphic + : public integral_constant + { }; + + + + + + template + struct is_final + : public integral_constant + { }; + + + + template + struct is_abstract + : public integral_constant + { }; + + + template::value> + struct __is_signed_helper + : public false_type { }; + + template + struct __is_signed_helper<_Tp, true> + : public integral_constant + { }; + + + + template + struct is_signed + : public __is_signed_helper<_Tp>::type + { }; + + + template + struct is_unsigned + : public __and_, __not_>> + { }; + + + template + _Up + __declval(int); + + template + _Tp + __declval(long); + + + template + auto declval() noexcept -> decltype(__declval<_Tp>(0)); + + template + struct extent; + + template + struct remove_all_extents; + + + template + struct __is_array_known_bounds + : public integral_constant::value > 0)> + { }; + + template + struct __is_array_unknown_bounds + : public __and_, __not_>> + { }; +# 842 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + struct __do_is_destructible_impl + { + template().~_Tp())> + static true_type __test(int); + + template + static false_type __test(...); + }; + + template + struct __is_destructible_impl + : public __do_is_destructible_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template, + __is_array_unknown_bounds<_Tp>, + is_function<_Tp>>::value, + bool = __or_, is_scalar<_Tp>>::value> + struct __is_destructible_safe; + + template + struct __is_destructible_safe<_Tp, false, false> + : public __is_destructible_impl::type>::type + { }; + + template + struct __is_destructible_safe<_Tp, true, false> + : public false_type { }; + + template + struct __is_destructible_safe<_Tp, false, true> + : public true_type { }; + + + + template + struct is_destructible + : public __is_destructible_safe<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + + + + + struct __do_is_nt_destructible_impl + { + template + static __bool_constant().~_Tp())> + __test(int); + + template + static false_type __test(...); + }; + + template + struct __is_nt_destructible_impl + : public __do_is_nt_destructible_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template, + __is_array_unknown_bounds<_Tp>, + is_function<_Tp>>::value, + bool = __or_, is_scalar<_Tp>>::value> + struct __is_nt_destructible_safe; + + template + struct __is_nt_destructible_safe<_Tp, false, false> + : public __is_nt_destructible_impl::type>::type + { }; + + template + struct __is_nt_destructible_safe<_Tp, true, false> + : public false_type { }; + + template + struct __is_nt_destructible_safe<_Tp, false, true> + : public true_type { }; + + + + template + struct is_nothrow_destructible + : public __is_nt_destructible_safe<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct __is_constructible_impl + : public __bool_constant<__is_constructible(_Tp, _Args...)> + { }; + + + + template + struct is_constructible + : public __is_constructible_impl<_Tp, _Args...> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_default_constructible + : public __is_constructible_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template::value> + struct __is_copy_constructible_impl; + + template + struct __is_copy_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_copy_constructible_impl<_Tp, true> + : public __is_constructible_impl<_Tp, const _Tp&> + { }; + + + + template + struct is_copy_constructible + : public __is_copy_constructible_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template::value> + struct __is_move_constructible_impl; + + template + struct __is_move_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_move_constructible_impl<_Tp, true> + : public __is_constructible_impl<_Tp, _Tp&&> + { }; + + + + template + struct is_move_constructible + : public __is_move_constructible_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + using __is_nothrow_constructible_impl + = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>; + + + + template + struct is_nothrow_constructible + : public __is_nothrow_constructible_impl<_Tp, _Args...>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_nothrow_default_constructible + : public __bool_constant<__is_nothrow_constructible(_Tp)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template::value> + struct __is_nothrow_copy_constructible_impl; + + template + struct __is_nothrow_copy_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_nothrow_copy_constructible_impl<_Tp, true> + : public __is_nothrow_constructible_impl<_Tp, const _Tp&> + { }; + + + + template + struct is_nothrow_copy_constructible + : public __is_nothrow_copy_constructible_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template::value> + struct __is_nothrow_move_constructible_impl; + + template + struct __is_nothrow_move_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_nothrow_move_constructible_impl<_Tp, true> + : public __is_nothrow_constructible_impl<_Tp, _Tp&&> + { }; + + + + template + struct is_nothrow_move_constructible + : public __is_nothrow_move_constructible_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_assignable + : public __bool_constant<__is_assignable(_Tp, _Up)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_copy_assignable_impl; + + template + struct __is_copy_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_copy_assignable_impl<_Tp, true> + : public __bool_constant<__is_assignable(_Tp&, const _Tp&)> + { }; + + + template + struct is_copy_assignable + : public __is_copy_assignable_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_move_assignable_impl; + + template + struct __is_move_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_move_assignable_impl<_Tp, true> + : public __bool_constant<__is_assignable(_Tp&, _Tp&&)> + { }; + + + template + struct is_move_assignable + : public __is_move_assignable_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template + using __is_nothrow_assignable_impl + = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>; + + + template + struct is_nothrow_assignable + : public __is_nothrow_assignable_impl<_Tp, _Up> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_nt_copy_assignable_impl; + + template + struct __is_nt_copy_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_nt_copy_assignable_impl<_Tp, true> + : public __is_nothrow_assignable_impl<_Tp&, const _Tp&> + { }; + + + template + struct is_nothrow_copy_assignable + : public __is_nt_copy_assignable_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_nt_move_assignable_impl; + + template + struct __is_nt_move_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_nt_move_assignable_impl<_Tp, true> + : public __is_nothrow_assignable_impl<_Tp&, _Tp&&> + { }; + + + template + struct is_nothrow_move_assignable + : public __is_nt_move_assignable_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_constructible + : public __bool_constant<__is_trivially_constructible(_Tp, _Args...)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_default_constructible + : public __bool_constant<__is_trivially_constructible(_Tp)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + struct __do_is_implicitly_default_constructible_impl + { + template + static void __helper(const _Tp&); + + template + static true_type __test(const _Tp&, + decltype(__helper({}))* = 0); + + static false_type __test(...); + }; + + template + struct __is_implicitly_default_constructible_impl + : public __do_is_implicitly_default_constructible_impl + { + typedef decltype(__test(declval<_Tp>())) type; + }; + + template + struct __is_implicitly_default_constructible_safe + : public __is_implicitly_default_constructible_impl<_Tp>::type + { }; + + template + struct __is_implicitly_default_constructible + : public __and_<__is_constructible_impl<_Tp>, + __is_implicitly_default_constructible_safe<_Tp>> + { }; + + template::value> + struct __is_trivially_copy_constructible_impl; + + template + struct __is_trivially_copy_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_trivially_copy_constructible_impl<_Tp, true> + : public __and_<__is_copy_constructible_impl<_Tp>, + integral_constant> + { }; + + + template + struct is_trivially_copy_constructible + : public __is_trivially_copy_constructible_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_trivially_move_constructible_impl; + + template + struct __is_trivially_move_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_trivially_move_constructible_impl<_Tp, true> + : public __and_<__is_move_constructible_impl<_Tp>, + integral_constant> + { }; + + + template + struct is_trivially_move_constructible + : public __is_trivially_move_constructible_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_assignable + : public __bool_constant<__is_trivially_assignable(_Tp, _Up)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_trivially_copy_assignable_impl; + + template + struct __is_trivially_copy_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_trivially_copy_assignable_impl<_Tp, true> + : public __bool_constant<__is_trivially_assignable(_Tp&, const _Tp&)> + { }; + + + template + struct is_trivially_copy_assignable + : public __is_trivially_copy_assignable_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_trivially_move_assignable_impl; + + template + struct __is_trivially_move_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_trivially_move_assignable_impl<_Tp, true> + : public __bool_constant<__is_trivially_assignable(_Tp&, _Tp&&)> + { }; + + + template + struct is_trivially_move_assignable + : public __is_trivially_move_assignable_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_destructible + : public __and_<__is_destructible_safe<_Tp>, + __bool_constant<__has_trivial_destructor(_Tp)>> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + template + struct has_virtual_destructor + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + + + template + struct alignment_of + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct rank + : public integral_constant { }; + + template + struct rank<_Tp[_Size]> + : public integral_constant::value> { }; + + template + struct rank<_Tp[]> + : public integral_constant::value> { }; + + + template + struct extent + : public integral_constant { }; + + template + struct extent<_Tp[_Size], _Uint> + : public integral_constant::value> + { }; + + template + struct extent<_Tp[], _Uint> + : public integral_constant::value> + { }; + + + + + + template + struct is_same + + : public integral_constant + + + + { }; +# 1420 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template + struct is_base_of + : public integral_constant + { }; + + template, is_function<_To>, + is_array<_To>>::value> + struct __is_convertible_helper + { + typedef typename is_void<_To>::type type; + }; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + template + class __is_convertible_helper<_From, _To, false> + { + template + static void __test_aux(_To1) noexcept; + + template(std::declval<_From1>()))> + static true_type + __test(int); + + template + static false_type + __test(...); + + public: + typedef decltype(__test<_From, _To>(0)) type; + }; +#pragma GCC diagnostic pop + + + template + struct is_convertible + : public __is_convertible_helper<_From, _To>::type + { }; + + + template + using __is_array_convertible + = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>; + + template, is_function<_To>, + is_array<_To>>::value> + struct __is_nt_convertible_helper + : is_void<_To> + { }; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + template + class __is_nt_convertible_helper<_From, _To, false> + { + template + static void __test_aux(_To1) noexcept; + + template + static + __bool_constant(std::declval<_From1>()))> + __test(int); + + template + static false_type + __test(...); + + public: + using type = decltype(__test<_From, _To>(0)); + }; +#pragma GCC diagnostic pop +# 1512 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template + struct remove_const + { typedef _Tp type; }; + + template + struct remove_const<_Tp const> + { typedef _Tp type; }; + + + template + struct remove_volatile + { typedef _Tp type; }; + + template + struct remove_volatile<_Tp volatile> + { typedef _Tp type; }; + + + template + struct remove_cv + { using type = _Tp; }; + + template + struct remove_cv + { using type = _Tp; }; + + template + struct remove_cv + { using type = _Tp; }; + + template + struct remove_cv + { using type = _Tp; }; + + + template + struct add_const + { typedef _Tp const type; }; + + + template + struct add_volatile + { typedef _Tp volatile type; }; + + + template + struct add_cv + { + typedef typename + add_const::type>::type type; + }; + + + + + + + template + using remove_const_t = typename remove_const<_Tp>::type; + + + template + using remove_volatile_t = typename remove_volatile<_Tp>::type; + + + template + using remove_cv_t = typename remove_cv<_Tp>::type; + + + template + using add_const_t = typename add_const<_Tp>::type; + + + template + using add_volatile_t = typename add_volatile<_Tp>::type; + + + template + using add_cv_t = typename add_cv<_Tp>::type; + + + + + + template + struct remove_reference + { typedef _Tp type; }; + + template + struct remove_reference<_Tp&> + { typedef _Tp type; }; + + template + struct remove_reference<_Tp&&> + { typedef _Tp type; }; + + template::value> + struct __add_lvalue_reference_helper + { typedef _Tp type; }; + + template + struct __add_lvalue_reference_helper<_Tp, true> + { typedef _Tp& type; }; + + + template + struct add_lvalue_reference + : public __add_lvalue_reference_helper<_Tp> + { }; + + template::value> + struct __add_rvalue_reference_helper + { typedef _Tp type; }; + + template + struct __add_rvalue_reference_helper<_Tp, true> + { typedef _Tp&& type; }; + + + template + struct add_rvalue_reference + : public __add_rvalue_reference_helper<_Tp> + { }; + + + + template + using remove_reference_t = typename remove_reference<_Tp>::type; + + + template + using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type; + + + template + using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type; + + + + + + + + template + struct __cv_selector; + + template + struct __cv_selector<_Unqualified, false, false> + { typedef _Unqualified __type; }; + + template + struct __cv_selector<_Unqualified, false, true> + { typedef volatile _Unqualified __type; }; + + template + struct __cv_selector<_Unqualified, true, false> + { typedef const _Unqualified __type; }; + + template + struct __cv_selector<_Unqualified, true, true> + { typedef const volatile _Unqualified __type; }; + + template::value, + bool _IsVol = is_volatile<_Qualified>::value> + class __match_cv_qualifiers + { + typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match; + + public: + typedef typename __match::__type __type; + }; + + + template + struct __make_unsigned + { typedef _Tp __type; }; + + template<> + struct __make_unsigned + { typedef unsigned char __type; }; + + template<> + struct __make_unsigned + { typedef unsigned char __type; }; + + template<> + struct __make_unsigned + { typedef unsigned short __type; }; + + template<> + struct __make_unsigned + { typedef unsigned int __type; }; + + template<> + struct __make_unsigned + { typedef unsigned long __type; }; + + template<> + struct __make_unsigned + { typedef unsigned long long __type; }; +# 1736 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template::value, + bool _IsEnum = is_enum<_Tp>::value> + class __make_unsigned_selector; + + template + class __make_unsigned_selector<_Tp, true, false> + { + using __unsigned_type + = typename __make_unsigned<__remove_cv_t<_Tp>>::__type; + + public: + using __type + = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; + }; + + class __make_unsigned_selector_base + { + protected: + template struct _List { }; + + template + struct _List<_Tp, _Up...> : _List<_Up...> + { static constexpr size_t __size = sizeof(_Tp); }; + + template + struct __select; + + template + struct __select<_Sz, _List<_Uint, _UInts...>, true> + { using __type = _Uint; }; + + template + struct __select<_Sz, _List<_Uint, _UInts...>, false> + : __select<_Sz, _List<_UInts...>> + { }; + }; + + + template + class __make_unsigned_selector<_Tp, false, true> + : __make_unsigned_selector_base + { + + using _UInts = _List; + + using __unsigned_type = typename __select::__type; + + public: + using __type + = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; + }; + + + + + + + template<> + struct __make_unsigned + { + using __type + = typename __make_unsigned_selector::__type; + }; +# 1812 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template<> + struct __make_unsigned + { + using __type + = typename __make_unsigned_selector::__type; + }; + + template<> + struct __make_unsigned + { + using __type + = typename __make_unsigned_selector::__type; + }; + + + + + + + template + struct make_unsigned + { typedef typename __make_unsigned_selector<_Tp>::__type type; }; + + + template<> + struct make_unsigned; + + + + + template + struct __make_signed + { typedef _Tp __type; }; + + template<> + struct __make_signed + { typedef signed char __type; }; + + template<> + struct __make_signed + { typedef signed char __type; }; + + template<> + struct __make_signed + { typedef signed short __type; }; + + template<> + struct __make_signed + { typedef signed int __type; }; + + template<> + struct __make_signed + { typedef signed long __type; }; + + template<> + struct __make_signed + { typedef signed long long __type; }; +# 1892 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template::value, + bool _IsEnum = is_enum<_Tp>::value> + class __make_signed_selector; + + template + class __make_signed_selector<_Tp, true, false> + { + using __signed_type + = typename __make_signed<__remove_cv_t<_Tp>>::__type; + + public: + using __type + = typename __match_cv_qualifiers<_Tp, __signed_type>::__type; + }; + + + template + class __make_signed_selector<_Tp, false, true> + { + typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type; + + public: + typedef typename __make_signed_selector<__unsigned_type>::__type __type; + }; + + + + + + + template<> + struct __make_signed + { + using __type + = typename __make_signed_selector::__type; + }; +# 1940 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template<> + struct __make_signed + { + using __type + = typename __make_signed_selector::__type; + }; + + template<> + struct __make_signed + { + using __type + = typename __make_signed_selector::__type; + }; + + + + + + + template + struct make_signed + { typedef typename __make_signed_selector<_Tp>::__type type; }; + + + template<> + struct make_signed; + + + + template + using make_signed_t = typename make_signed<_Tp>::type; + + + template + using make_unsigned_t = typename make_unsigned<_Tp>::type; + + + + + + template + struct remove_extent + { typedef _Tp type; }; + + template + struct remove_extent<_Tp[_Size]> + { typedef _Tp type; }; + + template + struct remove_extent<_Tp[]> + { typedef _Tp type; }; + + + template + struct remove_all_extents + { typedef _Tp type; }; + + template + struct remove_all_extents<_Tp[_Size]> + { typedef typename remove_all_extents<_Tp>::type type; }; + + template + struct remove_all_extents<_Tp[]> + { typedef typename remove_all_extents<_Tp>::type type; }; + + + + template + using remove_extent_t = typename remove_extent<_Tp>::type; + + + template + using remove_all_extents_t = typename remove_all_extents<_Tp>::type; + + + + + template + struct __remove_pointer_helper + { typedef _Tp type; }; + + template + struct __remove_pointer_helper<_Tp, _Up*> + { typedef _Up type; }; + + + template + struct remove_pointer + : public __remove_pointer_helper<_Tp, __remove_cv_t<_Tp>> + { }; + + template, + is_void<_Tp>>::value> + struct __add_pointer_helper + { typedef _Tp type; }; + + template + struct __add_pointer_helper<_Tp, true> + { typedef typename remove_reference<_Tp>::type* type; }; + + + template + struct add_pointer + : public __add_pointer_helper<_Tp> + { }; + + + + template + using remove_pointer_t = typename remove_pointer<_Tp>::type; + + + template + using add_pointer_t = typename add_pointer<_Tp>::type; + + + template + struct __aligned_storage_msa + { + union __type + { + unsigned char __data[_Len]; + struct __attribute__((__aligned__)) { } __align; + }; + }; +# 2076 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template::__type)> + struct aligned_storage + { + union type + { + unsigned char __data[_Len]; + struct __attribute__((__aligned__((_Align)))) { } __align; + }; + }; + + template + struct __strictest_alignment + { + static const size_t _S_alignment = 0; + static const size_t _S_size = 0; + }; + + template + struct __strictest_alignment<_Tp, _Types...> + { + static const size_t _S_alignment = + alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment + ? alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment; + static const size_t _S_size = + sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size + ? sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size; + }; +# 2115 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template + struct aligned_union + { + private: + static_assert(sizeof...(_Types) != 0, "At least one type is required"); + + using __strictest = __strictest_alignment<_Types...>; + static const size_t _S_len = _Len > __strictest::_S_size + ? _Len : __strictest::_S_size; + public: + + static const size_t alignment_value = __strictest::_S_alignment; + + typedef typename aligned_storage<_S_len, alignment_value>::type type; + }; + + template + const size_t aligned_union<_Len, _Types...>::alignment_value; + + + + + + template::value, + bool _IsFunction = is_function<_Up>::value> + struct __decay_selector; + + + template + struct __decay_selector<_Up, false, false> + { typedef __remove_cv_t<_Up> __type; }; + + template + struct __decay_selector<_Up, true, false> + { typedef typename remove_extent<_Up>::type* __type; }; + + template + struct __decay_selector<_Up, false, true> + { typedef typename add_pointer<_Up>::type __type; }; + + + + template + class decay + { + typedef typename remove_reference<_Tp>::type __remove_type; + + public: + typedef typename __decay_selector<__remove_type>::__type type; + }; + + + + + template + struct __strip_reference_wrapper + { + typedef _Tp __type; + }; + + template + struct __strip_reference_wrapper > + { + typedef _Tp& __type; + }; + + + template + using __decay_t = typename decay<_Tp>::type; + + template + using __decay_and_strip = __strip_reference_wrapper<__decay_t<_Tp>>; + + + + + template + struct enable_if + { }; + + + template + struct enable_if + { typedef _Tp type; }; + + + + + template + using __enable_if_t = typename enable_if<_Cond, _Tp>::type; + + + template + using _Require = __enable_if_t<__and_<_Cond...>::value>; + + + template + using __remove_cvref_t + = typename remove_cv::type>::type; + + + + + template + struct conditional + { typedef _Iftrue type; }; + + + template + struct conditional + { typedef _Iffalse type; }; + + + template + struct common_type; + + + + + struct __do_common_type_impl + { + template + using __cond_t + = decltype(true ? std::declval<_Tp>() : std::declval<_Up>()); + + + + template + static __success_type<__decay_t<__cond_t<_Tp, _Up>>> + _S_test(int); +# 2255 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template + static __failure_type + _S_test_2(...); + + template + static decltype(_S_test_2<_Tp, _Up>(0)) + _S_test(...); + }; + + + template<> + struct common_type<> + { }; + + + template + struct common_type<_Tp0> + : public common_type<_Tp0, _Tp0> + { }; + + + template, typename _Dp2 = __decay_t<_Tp2>> + struct __common_type_impl + { + + + using type = common_type<_Dp1, _Dp2>; + }; + + template + struct __common_type_impl<_Tp1, _Tp2, _Tp1, _Tp2> + : private __do_common_type_impl + { + + + using type = decltype(_S_test<_Tp1, _Tp2>(0)); + }; + + + template + struct common_type<_Tp1, _Tp2> + : public __common_type_impl<_Tp1, _Tp2>::type + { }; + + template + struct __common_type_pack + { }; + + template + struct __common_type_fold; + + + template + struct common_type<_Tp1, _Tp2, _Rp...> + : public __common_type_fold, + __common_type_pack<_Rp...>> + { }; + + + + + template + struct __common_type_fold<_CTp, __common_type_pack<_Rp...>, + __void_t> + : public common_type + { }; + + + template + struct __common_type_fold<_CTp, _Rp, void> + { }; + + template::value> + struct __underlying_type_impl + { + using type = __underlying_type(_Tp); + }; + + template + struct __underlying_type_impl<_Tp, false> + { }; + + + + template + struct underlying_type + : public __underlying_type_impl<_Tp> + { }; + + + template + struct __declval_protector + { + static const bool __stop = false; + }; + + + + + + + template + auto declval() noexcept -> decltype(__declval<_Tp>(0)) + { + static_assert(__declval_protector<_Tp>::__stop, + "declval() must not be used!"); + return __declval<_Tp>(0); + } + + + template + struct result_of; + + + + + + + struct __invoke_memfun_ref { }; + struct __invoke_memfun_deref { }; + struct __invoke_memobj_ref { }; + struct __invoke_memobj_deref { }; + struct __invoke_other { }; + + + template + struct __result_of_success : __success_type<_Tp> + { using __invoke_type = _Tag; }; + + + struct __result_of_memfun_ref_impl + { + template + static __result_of_success().*std::declval<_Fp>())(std::declval<_Args>()...) + ), __invoke_memfun_ref> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_memfun_ref + : private __result_of_memfun_ref_impl + { + typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; + }; + + + struct __result_of_memfun_deref_impl + { + template + static __result_of_success()).*std::declval<_Fp>())(std::declval<_Args>()...) + ), __invoke_memfun_deref> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_memfun_deref + : private __result_of_memfun_deref_impl + { + typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; + }; + + + struct __result_of_memobj_ref_impl + { + template + static __result_of_success().*std::declval<_Fp>() + ), __invoke_memobj_ref> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_memobj_ref + : private __result_of_memobj_ref_impl + { + typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; + }; + + + struct __result_of_memobj_deref_impl + { + template + static __result_of_success()).*std::declval<_Fp>() + ), __invoke_memobj_deref> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_memobj_deref + : private __result_of_memobj_deref_impl + { + typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; + }; + + template + struct __result_of_memobj; + + template + struct __result_of_memobj<_Res _Class::*, _Arg> + { + typedef __remove_cvref_t<_Arg> _Argval; + typedef _Res _Class::* _MemPtr; + typedef typename conditional<__or_, + is_base_of<_Class, _Argval>>::value, + __result_of_memobj_ref<_MemPtr, _Arg>, + __result_of_memobj_deref<_MemPtr, _Arg> + >::type::type type; + }; + + template + struct __result_of_memfun; + + template + struct __result_of_memfun<_Res _Class::*, _Arg, _Args...> + { + typedef typename remove_reference<_Arg>::type _Argval; + typedef _Res _Class::* _MemPtr; + typedef typename conditional::value, + __result_of_memfun_ref<_MemPtr, _Arg, _Args...>, + __result_of_memfun_deref<_MemPtr, _Arg, _Args...> + >::type::type type; + }; + + + + + + + template> + struct __inv_unwrap + { + using type = _Tp; + }; + + template + struct __inv_unwrap<_Tp, reference_wrapper<_Up>> + { + using type = _Up&; + }; + + template + struct __result_of_impl + { + typedef __failure_type type; + }; + + template + struct __result_of_impl + : public __result_of_memobj<__decay_t<_MemPtr>, + typename __inv_unwrap<_Arg>::type> + { }; + + template + struct __result_of_impl + : public __result_of_memfun<__decay_t<_MemPtr>, + typename __inv_unwrap<_Arg>::type, _Args...> + { }; + + + struct __result_of_other_impl + { + template + static __result_of_success()(std::declval<_Args>()...) + ), __invoke_other> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_impl + : private __result_of_other_impl + { + typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type; + }; + + + template + struct __invoke_result + : public __result_of_impl< + is_member_object_pointer< + typename remove_reference<_Functor>::type + >::value, + is_member_function_pointer< + typename remove_reference<_Functor>::type + >::value, + _Functor, _ArgTypes... + >::type + { }; + + + template + struct result_of<_Functor(_ArgTypes...)> + : public __invoke_result<_Functor, _ArgTypes...> + { }; + + + + template::__type)> + using aligned_storage_t = typename aligned_storage<_Len, _Align>::type; + + template + using aligned_union_t = typename aligned_union<_Len, _Types...>::type; + + + template + using decay_t = typename decay<_Tp>::type; + + + template + using enable_if_t = typename enable_if<_Cond, _Tp>::type; + + + template + using conditional_t = typename conditional<_Cond, _Iftrue, _Iffalse>::type; + + + template + using common_type_t = typename common_type<_Tp...>::type; + + + template + using underlying_type_t = typename underlying_type<_Tp>::type; + + + template + using result_of_t = typename result_of<_Tp>::type; +# 2607 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template class _Op, typename... _Args> + struct __detector + { + using value_t = false_type; + using type = _Default; + }; + + + template class _Op, + typename... _Args> + struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...> + { + using value_t = true_type; + using type = _Op<_Args...>; + }; + + + template class _Op, + typename... _Args> + using __detected_or = __detector<_Default, void, _Op, _Args...>; + + + template class _Op, + typename... _Args> + using __detected_or_t + = typename __detected_or<_Default, _Op, _Args...>::type; +# 2649 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template + struct __is_swappable; + + template + struct __is_nothrow_swappable; + + template + struct __is_tuple_like_impl : false_type + { }; + + template + struct __is_tuple_like_impl> : true_type + { }; + + + template + struct __is_tuple_like + : public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type + { }; + + + template + + inline + _Require<__not_<__is_tuple_like<_Tp>>, + is_move_constructible<_Tp>, + is_move_assignable<_Tp>> + swap(_Tp&, _Tp&) + noexcept(__and_, + is_nothrow_move_assignable<_Tp>>::value); + + template + + inline + __enable_if_t<__is_swappable<_Tp>::value> + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + noexcept(__is_nothrow_swappable<_Tp>::value); + + + namespace __swappable_details { + using std::swap; + + struct __do_is_swappable_impl + { + template(), std::declval<_Tp&>()))> + static true_type __test(int); + + template + static false_type __test(...); + }; + + struct __do_is_nothrow_swappable_impl + { + template + static __bool_constant< + noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>())) + > __test(int); + + template + static false_type __test(...); + }; + + } + + template + struct __is_swappable_impl + : public __swappable_details::__do_is_swappable_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template + struct __is_nothrow_swappable_impl + : public __swappable_details::__do_is_nothrow_swappable_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template + struct __is_swappable + : public __is_swappable_impl<_Tp>::type + { }; + + template + struct __is_nothrow_swappable + : public __is_nothrow_swappable_impl<_Tp>::type + { }; +# 2876 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + template::value, typename = void> + struct __is_invocable_impl + : false_type + { + using __nothrow_type = false_type; + }; + + + template + struct __is_invocable_impl<_Result, _Ret, + true, + __void_t> + : true_type + { + using __nothrow_type = true_type; + }; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + + template + struct __is_invocable_impl<_Result, _Ret, + false, + __void_t> + { + private: + + + + static typename _Result::type _S_get() noexcept; + + template + static void _S_conv(_Tp) noexcept; + + + template(_S_get())), + bool _Noex = noexcept(_S_conv<_Tp>(_S_get()))> + static __bool_constant<_Check_Noex ? _Noex : true> + _S_test(int); + + template + static false_type + _S_test(...); + + public: + + using type = decltype(_S_test<_Ret>(1)); + + + using __nothrow_type = decltype(_S_test<_Ret, true>(1)); + }; +#pragma GCC diagnostic pop + + template + struct __is_invocable + : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type + { }; + + template + constexpr bool __call_is_nt(__invoke_memfun_ref) + { + using _Up = typename __inv_unwrap<_Tp>::type; + return noexcept((std::declval<_Up>().*std::declval<_Fn>())( + std::declval<_Args>()...)); + } + + template + constexpr bool __call_is_nt(__invoke_memfun_deref) + { + return noexcept(((*std::declval<_Tp>()).*std::declval<_Fn>())( + std::declval<_Args>()...)); + } + + template + constexpr bool __call_is_nt(__invoke_memobj_ref) + { + using _Up = typename __inv_unwrap<_Tp>::type; + return noexcept(std::declval<_Up>().*std::declval<_Fn>()); + } + + template + constexpr bool __call_is_nt(__invoke_memobj_deref) + { + return noexcept((*std::declval<_Tp>()).*std::declval<_Fn>()); + } + + template + constexpr bool __call_is_nt(__invoke_other) + { + return noexcept(std::declval<_Fn>()(std::declval<_Args>()...)); + } + + template + struct __call_is_nothrow + : __bool_constant< + std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{}) + > + { }; + + template + using __call_is_nothrow_ + = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>; + + + template + struct __is_nothrow_invocable + : __and_<__is_invocable<_Fn, _Args...>, + __call_is_nothrow_<_Fn, _Args...>>::type + { }; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + struct __nonesuchbase {}; + struct __nonesuch : private __nonesuchbase { + ~__nonesuch() = delete; + __nonesuch(__nonesuch const&) = delete; + void operator=(__nonesuch const&) = delete; + }; +#pragma GCC diagnostic pop +# 3598 "/usr/riscv64-linux-gnu/include/c++/11/type_traits" 3 + +} +# 41 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" 2 + + +# 42 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +class oopDesc; +# 179 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +inline intptr_t p2i(const volatile void* p) { + return (intptr_t) p; +} +# 190 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +extern "C" __attribute__((__warning__("use os::exit"))) void exit(int);; +extern "C" __attribute__((__warning__("use os::exit"))) void _exit(int);; +extern "C" __attribute__((__warning__("use os::strerror"))) char* strerror(int);; +extern "C" __attribute__((__warning__("use strtok_r"))) char* strtok(char*, const char*);; +extern "C" __attribute__((__warning__("use os::snprintf"))) int sprintf(char*, const char*, ...);; +extern "C" __attribute__((__warning__("use os::vsnprintf"))) int vsprintf(char*, const char*, va_list);; +extern "C" __attribute__((__warning__("use os::vsnprintf"))) int vsnprintf(char*, size_t, const char*, va_list);; + + + +extern "C" __attribute__((__warning__("use os::malloc"))) void* malloc(size_t size);; +extern "C" __attribute__((__warning__("use os::malloc and zero out manually"))) void* calloc(size_t nmemb, size_t size);; +extern "C" __attribute__((__warning__("use os::free"))) void free(void *ptr);; +extern "C" __attribute__((__warning__("use os::realloc"))) void* realloc(void *ptr, size_t size);; +extern "C" __attribute__((__warning__("use os::strdup"))) char* strdup(const char *s);; +extern "C" __attribute__((__warning__("don't use"))) char* strndup(const char *s, size_t n);; +extern "C" __attribute__((__warning__("don't use"))) int posix_memalign(void **memptr, size_t alignment, size_t size);; +extern "C" __attribute__((__warning__("don't use"))) void* aligned_alloc(size_t alignment, size_t size);; +extern "C" __attribute__((__warning__("use os::Posix::realpath"))) char* realpath(const char* path, char* resolved_path);; +extern "C" __attribute__((__warning__("use os::get_current_directory()"))) char* get_current_dir_name(void);; +extern "C" __attribute__((__warning__("use os::get_current_directory()"))) char* getwd(char *buf);; +extern "C" __attribute__((__warning__("don't use"))) wchar_t* wcsdup(const wchar_t *s);; +extern "C" __attribute__((__warning__("don't use"))) void* reallocf(void *ptr, size_t size);; + + + + +const int LogBytesPerShort = 1; +const int LogBytesPerInt = 2; + +const int LogBytesPerWord = 3; + + + +const int LogBytesPerLong = 3; + +const int BytesPerShort = 1 << LogBytesPerShort; +const int BytesPerInt = 1 << LogBytesPerInt; +const int BytesPerWord = 1 << LogBytesPerWord; +const int BytesPerLong = 1 << LogBytesPerLong; + +const int LogBitsPerByte = 3; +const int LogBitsPerShort = LogBitsPerByte + LogBytesPerShort; +const int LogBitsPerInt = LogBitsPerByte + LogBytesPerInt; +const int LogBitsPerWord = LogBitsPerByte + LogBytesPerWord; +const int LogBitsPerLong = LogBitsPerByte + LogBytesPerLong; + +const int BitsPerByte = 1 << LogBitsPerByte; +const int BitsPerShort = 1 << LogBitsPerShort; +const int BitsPerInt = 1 << LogBitsPerInt; +const int BitsPerWord = 1 << LogBitsPerWord; +const int BitsPerLong = 1 << LogBitsPerLong; + +const int WordAlignmentMask = (1 << LogBytesPerWord) - 1; +const int LongAlignmentMask = (1 << LogBytesPerLong) - 1; + +const int oopSize = sizeof(char*); +extern int heapOopSize; +const int wordSize = sizeof(char*); +const int longSize = sizeof(jlong); +const int jintSize = sizeof(jint); +const int size_tSize = sizeof(size_t); + +const int BytesPerOop = BytesPerWord; + +extern int LogBytesPerHeapOop; +extern int LogBitsPerHeapOop; +extern int BytesPerHeapOop; +extern int BitsPerHeapOop; + +const int BitsPerJavaInteger = 32; +const int BitsPerJavaLong = 64; +const int BitsPerSize_t = size_tSize * BitsPerByte; + + +const int jintAsStringSize = 12; + + + + + + + +class HeapWordImpl; +typedef HeapWordImpl* HeapWord; + + +class MetaWordImpl; +typedef MetaWordImpl* MetaWord; + + +const int HeapWordSize = sizeof(HeapWord); + +const int LogHeapWordSize = 3; + + + +const int HeapWordsPerLong = BytesPerLong / HeapWordSize; +const int LogHeapWordsPerLong = LogBytesPerLong - LogHeapWordSize; + + + +inline size_t heap_word_size(size_t byte_size) { + return (byte_size + (HeapWordSize-1)) >> LogHeapWordSize; +} + +inline jfloat jfloat_cast(jint x); +inline jdouble jdouble_cast(jlong x); +# 306 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +const jlong min_jlong = (0x8000000000000000LL); +const jlong max_jlong = (0x7fffffffffffffffLL); + + + +const jlong min_jlongDouble = (0x0000000000000001LL); +const jdouble min_jdouble = jdouble_cast(min_jlongDouble); +const jlong max_jlongDouble = (0x7fefffffffffffffLL); +const jdouble max_jdouble = jdouble_cast(max_jlongDouble); + +const size_t K = 1024; +const size_t M = K*K; +const size_t G = M*K; +const size_t HWperKB = K / sizeof(HeapWord); + + + + +const int MILLIUNITS = 1000; +const int MICROUNITS = 1000000; +const int NANOUNITS = 1000000000; +const int NANOUNITS_PER_MILLIUNIT = NANOUNITS / MILLIUNITS; + +const jlong NANOSECS_PER_SEC = (1000000000LL); +const jint NANOSECS_PER_MILLISEC = 1000000; + + + + + +inline int64_t nanos_to_millis(int64_t nanos) { + return nanos / NANOUNITS_PER_MILLIUNIT; +} +inline int64_t millis_to_nanos(int64_t millis) { + return millis * NANOUNITS_PER_MILLIUNIT; +} + + + + + + +inline const char* proper_unit_for_byte_size(size_t s) { + + if (s >= 100*G) { + return "G"; + } + + if (s >= 100*M) { + return "M"; + } else if (s >= 100*K) { + return "K"; + } else { + return "B"; + } +} + +template +inline T byte_size_in_proper_unit(T s) { + + if (s >= 100*G) { + return (T)(s/G); + } + + if (s >= 100*M) { + return (T)(s/M); + } else if (s >= 100*K) { + return (T)(s/K); + } else { + return s; + } +} + + + + +inline const char* exact_unit_for_byte_size(size_t s) { + + if (s >= G && (s % G) == 0) { + return "G"; + } + + if (s >= M && (s % M) == 0) { + return "M"; + } + if (s >= K && (s % K) == 0) { + return "K"; + } + return "B"; +} + +inline size_t byte_size_in_exact_unit(size_t s) { + + if (s >= G && (s % G) == 0) { + return s / G; + } + + if (s >= M && (s % M) == 0) { + return s / M; + } + if (s >= K && (s % K) == 0) { + return s / K; + } + return s; +} +# 428 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +typedef intptr_t intx; +typedef uintptr_t uintx; + +const intx min_intx = (intx)1 << (sizeof(intx)*BitsPerByte-1); +const intx max_intx = (uintx)min_intx - 1; +const uintx max_uintx = (uintx)-1; + + + + + + + +typedef unsigned int uint; + + + + + +typedef signed char s_char; +typedef unsigned char u_char; +typedef u_char* address; +# 462 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +inline size_t pointer_delta(const volatile void* left, + const volatile void* right, + size_t element_size) { + ; + return (((uintptr_t) left) - ((uintptr_t) right)) / element_size; +} + + +inline size_t pointer_delta(const HeapWord* left, const HeapWord* right) { + return pointer_delta(left, right, sizeof(HeapWord)); +} + +inline size_t pointer_delta(const MetaWord* left, const MetaWord* right) { + return pointer_delta(left, right, sizeof(MetaWord)); +} + + + + +template +inline int pointer_delta_as_int(const volatile T* left, const volatile T* right) { + size_t delta = pointer_delta(left, right, sizeof(T)); + ; + return static_cast(delta); +} +# 505 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +extern "C" { + typedef int (*_sort_Fn)(const void *, const void *); +} + + + +typedef uint8_t jubyte; +typedef uint16_t jushort; +typedef uint32_t juint; +typedef uint64_t julong; + + + + + + +typedef jubyte u1; +typedef jushort u2; +typedef juint u4; +typedef julong u8; + +const jubyte max_jubyte = (jubyte)-1; +const jushort max_jushort = (jushort)-1; +const juint max_juint = (juint)-1; +const julong max_julong = (julong)-1; + +typedef jbyte s1; +typedef jshort s2; +typedef jint s4; +typedef jlong s8; + +const jbyte min_jbyte = -(1 << 7); +const jbyte max_jbyte = (1 << 7) - 1; +const jshort min_jshort = -(1 << 15); +const jshort max_jshort = (1 << 15) - 1; + +const jint min_jint = (jint)1 << (sizeof(jint)*BitsPerByte-1); +const jint max_jint = (juint)min_jint - 1; + +const jint min_jintFloat = (jint)(0x00000001); +const jfloat min_jfloat = jfloat_cast(min_jintFloat); +const jint max_jintFloat = (jint)(0x7f7fffff); +const jfloat max_jfloat = jfloat_cast(max_jintFloat); + + + + +const int max_method_code_size = 64*K - 1; + + + +extern bool DumpSharedSpaces; +extern bool DynamicDumpSharedSpaces; +extern bool RequireSharedSpaces; +extern "C" { + +extern __attribute__((visibility("default"))) jboolean UseSharedSpaces; +} + + + + + + + +extern int MinObjAlignment; +extern int MinObjAlignmentInBytes; +extern int MinObjAlignmentInBytesMask; + +extern int LogMinObjAlignment; +extern int LogMinObjAlignmentInBytes; + + + +const uint64_t UnscaledOopHeapMax = (uint64_t(max_juint) + 1); + + +extern uint64_t OopEncodingHeapMax; +# 591 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/globalDefinitions_riscv.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/globalDefinitions_riscv.hpp" +const int StackAlignmentInBytes = 16; +const size_t pd_segfault_address = 1024; + + + +const bool CCallingConventionRequiresIntsAsLongs = false; +# 592 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" 2 +# 600 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +const bool support_IRIW_for_not_multiple_copy_atomic_cpu = false; +# 627 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +inline double fabsd(double value) { + return fabs(value); +} + + + +template +inline double percent_of(T numerator, T denominator) { + return denominator != 0 ? (double)numerator / (double)denominator * 100.0 : 0.0; +} + + + + +typedef union { + jfloat f; + jint i; +} FloatIntConv; + +typedef union { + jdouble d; + jlong l; + julong ul; +} DoubleLongConv; + +inline jint jint_cast (jfloat x) { return ((FloatIntConv*)&x)->i; } +inline jfloat jfloat_cast (jint x) { return ((FloatIntConv*)&x)->f; } + +inline jlong jlong_cast (jdouble x) { return ((DoubleLongConv*)&x)->l; } +inline julong julong_cast (jdouble x) { return ((DoubleLongConv*)&x)->ul; } +inline jdouble jdouble_cast (jlong x) { return ((DoubleLongConv*)&x)->d; } + +inline jint low (jlong value) { return jint(value); } +inline jint high(jlong value) { return jint(value >> 32); } + + + +inline void set_low (jlong* value, jint low ) { *value &= (jlong)0xffffffff << 32; + *value |= (jlong)(julong)(juint)low; } + +inline void set_high(jlong* value, jint high) { *value &= (jlong)(julong)(juint)0xffffffff; + *value |= (jlong)high << 32; } + +inline jlong jlong_from(jint h, jint l) { + jlong result = 0; + set_high(&result, h); + set_low(&result, l); + return result; +} + +union jlong_accessor { + jint words[2]; + jlong long_value; +}; + +void basic_types_init(); + + + +enum BasicType : u1 { + + T_BOOLEAN = JVM_T_BOOLEAN, + T_CHAR = JVM_T_CHAR, + T_FLOAT = JVM_T_FLOAT, + T_DOUBLE = JVM_T_DOUBLE, + T_BYTE = JVM_T_BYTE, + T_SHORT = JVM_T_SHORT, + T_INT = JVM_T_INT, + T_LONG = JVM_T_LONG, + + + + + + + + T_OBJECT = 12, + T_ARRAY = 13, + T_VOID = 14, + T_ADDRESS = 15, + T_NARROWOOP = 16, + T_METADATA = 17, + T_NARROWKLASS = 18, + T_CONFLICT = 19, + T_ILLEGAL = 99 +}; +# 728 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +inline bool is_java_type(BasicType t) { + return T_BOOLEAN <= t && t <= T_VOID; +} + +inline bool is_java_primitive(BasicType t) { + return T_BOOLEAN <= t && t <= T_LONG; +} + +inline bool is_subword_type(BasicType t) { + + return (t == T_BOOLEAN || t == T_CHAR || t == T_BYTE || t == T_SHORT); +} + +inline bool is_signed_subword_type(BasicType t) { + return (t == T_BYTE || t == T_SHORT); +} + +inline bool is_unsigned_subword_type(BasicType t) { + return (t == T_BOOLEAN || t == T_CHAR); +} + +inline bool is_double_word_type(BasicType t) { + return (t == T_DOUBLE || t == T_LONG); +} + +inline bool is_reference_type(BasicType t, bool include_narrow_oop = false) { + return (t == T_OBJECT || t == T_ARRAY || (include_narrow_oop && t == T_NARROWOOP)); +} + +inline bool is_integral_type(BasicType t) { + return is_subword_type(t) || t == T_INT || t == T_LONG; +} + +inline bool is_non_subword_integral_type(BasicType t) { + return t == T_INT || t == T_LONG; +} + +inline bool is_floating_point_type(BasicType t) { + return (t == T_FLOAT || t == T_DOUBLE); +} + +extern char type2char_tab[T_CONFLICT+1]; +inline char type2char(BasicType t) { return (uint)t < T_CONFLICT+1 ? type2char_tab[t] : 0; } +extern int type2size[T_CONFLICT+1]; +extern const char* type2name_tab[T_CONFLICT+1]; +extern BasicType name2type(const char* name); + +const char* type2name(BasicType t); + +inline jlong max_signed_integer(BasicType bt) { + if (bt == T_INT) { + return max_jint; + } + ; + return max_jlong; +} + +inline jlong min_signed_integer(BasicType bt) { + if (bt == T_INT) { + return min_jint; + } + ; + return min_jlong; +} + + + +extern size_t lcm(size_t a, size_t b); + + + +enum BasicTypeSize { + T_BOOLEAN_size = 1, + T_CHAR_size = 1, + T_FLOAT_size = 1, + T_DOUBLE_size = 2, + T_BYTE_size = 1, + T_SHORT_size = 1, + T_INT_size = 1, + T_LONG_size = 2, + T_OBJECT_size = 1, + T_ARRAY_size = 1, + T_NARROWOOP_size = 1, + T_NARROWKLASS_size = 1, + T_VOID_size = 0 +}; + + +inline int parameter_type_word_count(BasicType t) { + if (is_double_word_type(t)) return 2; + ; + ; + return 1; +} + + + +extern BasicType type2field[T_CONFLICT+1]; +extern BasicType type2wfield[T_CONFLICT+1]; + + + +enum ArrayElementSize { + T_BOOLEAN_aelem_bytes = 1, + T_CHAR_aelem_bytes = 2, + T_FLOAT_aelem_bytes = 4, + T_DOUBLE_aelem_bytes = 8, + T_BYTE_aelem_bytes = 1, + T_SHORT_aelem_bytes = 2, + T_INT_aelem_bytes = 4, + T_LONG_aelem_bytes = 8, + + T_OBJECT_aelem_bytes = 8, + T_ARRAY_aelem_bytes = 8, + + + + + T_NARROWOOP_aelem_bytes = 4, + T_NARROWKLASS_aelem_bytes = 4, + T_VOID_aelem_bytes = 0 +}; + +extern int _type2aelembytes[T_CONFLICT+1]; + + + +inline int type2aelembytes(BasicType t, bool allow_address = false) { return _type2aelembytes[t]; } + + +inline bool same_type_or_subword_size(BasicType t1, BasicType t2) { + return (t1 == t2) || (is_subword_type(t1) && type2aelembytes(t1) == type2aelembytes(t2)); +} + + + +class JavaValue { + + public: + typedef union JavaCallValue { + jfloat f; + jdouble d; + jint i; + jlong l; + jobject h; + oopDesc* o; + } JavaCallValue; + + private: + BasicType _type; + JavaCallValue _value; + + public: + JavaValue(BasicType t = T_ILLEGAL) { _type = t; } + + JavaValue(jfloat value) { + _type = T_FLOAT; + _value.f = value; + } + + JavaValue(jdouble value) { + _type = T_DOUBLE; + _value.d = value; + } + + jfloat get_jfloat() const { return _value.f; } + jdouble get_jdouble() const { return _value.d; } + jint get_jint() const { return _value.i; } + jlong get_jlong() const { return _value.l; } + jobject get_jobject() const { return _value.h; } + oopDesc* get_oop() const { return _value.o; } + JavaCallValue* get_value_addr() { return &_value; } + BasicType get_type() const { return _type; } + + void set_jfloat(jfloat f) { _value.f = f;} + void set_jdouble(jdouble d) { _value.d = d;} + void set_jint(jint i) { _value.i = i;} + void set_jlong(jlong l) { _value.l = l;} + void set_jobject(jobject h) { _value.h = h;} + void set_oop(oopDesc* o) { _value.o = o;} + void set_type(BasicType t) { _type = t; } + + jboolean get_jboolean() const { return (jboolean) (_value.i);} + jbyte get_jbyte() const { return (jbyte) (_value.i);} + jchar get_jchar() const { return (jchar) (_value.i);} + jshort get_jshort() const { return (jshort) (_value.i);} + +}; +# 927 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +enum TosState { + btos = 0, + ztos = 1, + ctos = 2, + stos = 3, + itos = 4, + ltos = 5, + ftos = 6, + dtos = 7, + atos = 8, + vtos = 9, + number_of_states, + ilgl +}; + + +inline TosState as_TosState(BasicType type) { + switch (type) { + case T_BYTE : return btos; + case T_BOOLEAN: return ztos; + case T_CHAR : return ctos; + case T_SHORT : return stos; + case T_INT : return itos; + case T_LONG : return ltos; + case T_FLOAT : return ftos; + case T_DOUBLE : return dtos; + case T_VOID : return vtos; + case T_ARRAY : + case T_OBJECT : return atos; + default : return ilgl; + } +} + +inline BasicType as_BasicType(TosState state) { + switch (state) { + case btos : return T_BYTE; + case ztos : return T_BOOLEAN; + case ctos : return T_CHAR; + case stos : return T_SHORT; + case itos : return T_INT; + case ltos : return T_LONG; + case ftos : return T_FLOAT; + case dtos : return T_DOUBLE; + case atos : return T_OBJECT; + case vtos : return T_VOID; + default : return T_ILLEGAL; + } +} + + + + +TosState as_TosState(BasicType type); +# 998 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +enum JavaThreadState { + _thread_uninitialized = 0, + _thread_new = 2, + _thread_new_trans = 3, + _thread_in_native = 4, + _thread_in_native_trans = 5, + _thread_in_vm = 6, + _thread_in_vm_trans = 7, + _thread_in_Java = 8, + _thread_in_Java_trans = 9, + _thread_blocked = 10, + _thread_blocked_trans = 11, + _thread_max_state = 12 +}; + +enum LockingMode { + + LM_MONITOR = 0, + + LM_LEGACY = 1, + + LM_LIGHTWEIGHT = 2 +}; + + + + +const jint badInt = -3; +const intptr_t badAddressVal = -2; +const intptr_t badOopVal = -1; +const intptr_t badHeapOopVal = (intptr_t) (0x2BAD4B0BBAADBABELL); +const int badStackSegVal = 0xCA; +const int badHandleValue = 0xBC; +const int badResourceValue = 0xAB; +const int freeBlockPad = 0xBA; +const int uninitBlockPad = 0xF1; +const juint uninitMetaWordVal= 0xf7f7f7f7; +const juint badHeapWordVal = 0xBAADBABE; +const juint badMetaWordVal = 0xBAADFADE; +const int badCodeHeapNewVal= 0xCC; +const int badCodeHeapFreeVal = 0xDD; +# 1047 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +const uint TASKQUEUE_SIZE = ( 1<<17); + + + + +const intptr_t AllBits = ~0; +const intptr_t NoBits = 0; +const jlong NoLongBits = 0; +const intptr_t OneBit = 1; + + + + + + + +inline void set_bits (intptr_t& x, intptr_t m) { x |= m; } +inline void clear_bits (intptr_t& x, intptr_t m) { x &= ~m; } +inline intptr_t mask_bits (intptr_t x, intptr_t m) { return x & m; } +inline jlong mask_long_bits (jlong x, jlong m) { return x & m; } +inline bool mask_bits_are_true (intptr_t flags, intptr_t mask) { return (flags & mask) == mask; } + + +inline void set_nth_bit(intptr_t& x, int n) { set_bits (x, (((n) >= BitsPerWord) ? 0 : (OneBit << (n)))); } +inline void clear_nth_bit(intptr_t& x, int n) { clear_bits(x, (((n) >= BitsPerWord) ? 0 : (OneBit << (n)))); } +inline bool is_set_nth_bit(intptr_t x, int n) { return mask_bits (x, (((n) >= BitsPerWord) ? 0 : (OneBit << (n)))) != NoBits; } + + +inline intptr_t bitfield(intptr_t x, int start_bit_no, int field_length) { + return mask_bits(x >> start_bit_no, ((((field_length) >= BitsPerWord) ? 0 : (OneBit << (field_length))) - 1)); +} +# 1098 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +template constexpr T MAX2(T a, T b) { return (a > b) ? a : b; } +template constexpr T MIN2(T a, T b) { return (a < b) ? a : b; } +template constexpr T MAX3(T a, T b, T c) { return MAX2(MAX2(a, b), c); } +template constexpr T MIN3(T a, T b, T c) { return MIN2(MIN2(a, b), c); } +template constexpr T MAX4(T a, T b, T c, T d) { return MAX2(MAX3(a, b, c), d); } +template constexpr T MIN4(T a, T b, T c, T d) { return MIN2(MIN3(a, b, c), d); } + +template inline T ABS(T x) { return (x > 0) ? x : -x; } + + +template +inline T clamp(T value, T min, T max) { + ; + return MIN2(MAX2(value, min), max); +} + +inline bool is_odd (intx x) { return x & 1; } +inline bool is_even(intx x) { return !is_odd(x); } + + + +static inline unsigned int uabs(unsigned int n) { + union { + unsigned int result; + int value; + }; + result = n; + if (value < 0) result = 0-result; + return result; +} +static inline julong uabs(julong n) { + union { + julong result; + jlong value; + }; + result = n; + if (value < 0) result = 0-result; + return result; +} +static inline julong uabs(jlong n) { return uabs((julong)n); } +static inline unsigned int uabs(int n) { return uabs((unsigned int)n); } + + +inline intx byte_size(void* from, void* to) { + return (address)to - (address)from; +} + + + +inline u2 extract_low_short_from_int(u4 x) { + return u2(x & 0xffff); +} + +inline u2 extract_high_short_from_int(u4 x) { + return u2((x >> 16) & 0xffff); +} + +inline int build_int_from_shorts( u2 low, u2 high ) { + return ((int)((unsigned int)high << 16) | (unsigned int)low); +} + + +template static void swap(T& a, T& b) { + T tmp = a; + a = b; + b = tmp; +} + + + +template char (&array_size_impl(T (&)[N]))[N]; +# 1189 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +inline jint java_add (jint in1, jint in2) { juint ures = static_cast(in1); ures += static_cast(in2); return reinterpret_cast(ures); } +inline jint java_subtract (jint in1, jint in2) { juint ures = static_cast(in1); ures -= static_cast(in2); return reinterpret_cast(ures); } +inline jint java_multiply (jint in1, jint in2) { juint ures = static_cast(in1); ures *= static_cast(in2); return reinterpret_cast(ures); } +inline jlong java_add (jlong in1, jlong in2) { julong ures = static_cast(in1); ures += static_cast(in2); return reinterpret_cast(ures); } +inline jlong java_subtract (jlong in1, jlong in2) { julong ures = static_cast(in1); ures -= static_cast(in2); return reinterpret_cast(ures); } +inline jlong java_multiply (jlong in1, jlong in2) { julong ures = static_cast(in1); ures *= static_cast(in2); return reinterpret_cast(ures); } + +inline jint java_negate(jint v) { return java_subtract((jint) 0, v); } +inline jlong java_negate(jlong v) { return java_subtract((jlong)0, v); } +# 1217 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +inline jint java_shift_left (jint lhs, jint rhs) { const uint rhs_mask = (sizeof(jint) * 8) - 1; static_assert((rhs_mask == 31 || rhs_mask == 63), "rhs_mask == 31 || rhs_mask == 63"); juint xres = static_cast(lhs); xres <<= (rhs & rhs_mask); return reinterpret_cast(xres); } +inline jlong java_shift_left (jlong lhs, jint rhs) { const uint rhs_mask = (sizeof(jlong) * 8) - 1; static_assert((rhs_mask == 31 || rhs_mask == 63), "rhs_mask == 31 || rhs_mask == 63"); julong xres = static_cast(lhs); xres <<= (rhs & rhs_mask); return reinterpret_cast(xres); } +# 1235 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +inline jint java_shift_right (jint lhs, jint rhs) { const uint rhs_mask = (sizeof(jint) * 8) - 1; static_assert((rhs_mask == 31 || rhs_mask == 63), "rhs_mask == 31 || rhs_mask == 63"); jint xres = static_cast(lhs); xres >>= (rhs & rhs_mask); return reinterpret_cast(xres); } +inline jlong java_shift_right (jlong lhs, jint rhs) { const uint rhs_mask = (sizeof(jlong) * 8) - 1; static_assert((rhs_mask == 31 || rhs_mask == 63), "rhs_mask == 31 || rhs_mask == 63"); jlong xres = static_cast(lhs); xres >>= (rhs & rhs_mask); return reinterpret_cast(xres); } + +inline jint java_shift_right_unsigned (jint lhs, jint rhs) { const uint rhs_mask = (sizeof(jint) * 8) - 1; static_assert((rhs_mask == 31 || rhs_mask == 63), "rhs_mask == 31 || rhs_mask == 63"); juint xres = static_cast(lhs); xres >>= (rhs & rhs_mask); return reinterpret_cast(xres); } +inline jlong java_shift_right_unsigned (jlong lhs, jint rhs) { const uint rhs_mask = (sizeof(jlong) * 8) - 1; static_assert((rhs_mask == 31 || rhs_mask == 63), "rhs_mask == 31 || rhs_mask == 63"); julong xres = static_cast(lhs); xres >>= (rhs & rhs_mask); return reinterpret_cast(xres); } +# 1258 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/globalDefinitions.hpp" +inline int saturated_add (int in1, int in2) { jlong res = static_cast(in1); res += static_cast(in2); if (res > max_jint) { res = max_jint; } else if (res < min_jint) { res = min_jint; } return static_cast(res); } +inline int saturated_add (int in1, uint in2) { jlong res = static_cast(in1); res += static_cast(in2); if (res > max_jint) { res = max_jint; } else if (res < min_jint) { res = min_jint; } return static_cast(res); } +inline int saturated_add (uint in1, int in2) { jlong res = static_cast(in1); res += static_cast(in2); if (res > max_jint) { res = max_jint; } else if (res < min_jint) { res = min_jint; } return static_cast(res); } +inline int saturated_add (uint in1, uint in2) { jlong res = static_cast(in1); res += static_cast(in2); if (res > max_jint) { res = max_jint; } else if (res < min_jint) { res = min_jint; } return static_cast(res); } + + + + +inline uint64_t multiply_high_unsigned(const uint64_t x, const uint64_t y) { + const uint64_t x1 = x >> 32u; + const uint64_t x2 = x & 0xFFFFFFFF; + const uint64_t y1 = y >> 32u; + const uint64_t y2 = y & 0xFFFFFFFF; + const uint64_t z2 = x2 * y2; + const uint64_t t = x1 * y2 + (z2 >> 32u); + uint64_t z1 = t & 0xFFFFFFFF; + const uint64_t z0 = t >> 32u; + z1 += x2 * y1; + + return x1 * y1 + z0 + (z1 >> 32u); +} + + + +inline int64_t multiply_high_signed(const int64_t x, const int64_t y) { + const jlong x1 = java_shift_right((jlong)x, 32); + const jlong x2 = x & 0xFFFFFFFF; + const jlong y1 = java_shift_right((jlong)y, 32); + const jlong y2 = y & 0xFFFFFFFF; + + const uint64_t z2 = (uint64_t)x2 * y2; + const int64_t t = x1 * y2 + (z2 >> 32u); + int64_t z1 = t & 0xFFFFFFFF; + const int64_t z0 = java_shift_right((jlong)t, 32); + z1 += x2 * y1; + + return x1 * y1 + z0 + java_shift_right((jlong)z1, 32); +} + + + + + +static inline void* dereference_vptr(const void* addr) { + return *(void**)addr; +} + + + + + +typedef const char* ccstr; +typedef const char* ccstrlist; + + + + +template unsigned primitive_hash(const K& k) { + unsigned hash = (unsigned)((uintptr_t)k); + return hash ^ (hash >> 3); +} + +template bool primitive_equals(const K& k0, const K& k1) { + return k0 == k1; +} + +template int primitive_compare(const K& k0, const K& k1) { + return ((k0 < k1) ? -1 : (k0 == k1) ? 0 : 1); +} + + + + + + + +template +std::add_rvalue_reference_t declval() noexcept; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" 2 + + +# 1 "/usr/riscv64-linux-gnu/include/c++/11/new" 1 3 +# 38 "/usr/riscv64-linux-gnu/include/c++/11/new" 3 + +# 39 "/usr/riscv64-linux-gnu/include/c++/11/new" 3 + + +# 1 "/usr/riscv64-linux-gnu/include/c++/11/bits/exception.h" 1 3 +# 34 "/usr/riscv64-linux-gnu/include/c++/11/bits/exception.h" 3 + +# 35 "/usr/riscv64-linux-gnu/include/c++/11/bits/exception.h" 3 + +#pragma GCC visibility push(default) + + + + +# 40 "/usr/riscv64-linux-gnu/include/c++/11/bits/exception.h" 3 +extern "C++" { + +namespace std +{ +# 61 "/usr/riscv64-linux-gnu/include/c++/11/bits/exception.h" 3 + class exception + { + public: + exception() noexcept { } + virtual ~exception() noexcept; + + exception(const exception&) = default; + exception& operator=(const exception&) = default; + exception(exception&&) = default; + exception& operator=(exception&&) = default; + + + + + virtual const char* + what() const noexcept; + }; + + + +} + +} + +#pragma GCC visibility pop +# 42 "/usr/riscv64-linux-gnu/include/c++/11/new" 2 3 + +#pragma GCC visibility push(default) + +extern "C++" { + +namespace std +{ + + + + + + + class bad_alloc : public exception + { + public: + bad_alloc() throw() { } + + + bad_alloc(const bad_alloc&) = default; + bad_alloc& operator=(const bad_alloc&) = default; + + + + + virtual ~bad_alloc() throw(); + + + virtual const char* what() const throw(); + }; + + + class bad_array_new_length : public bad_alloc + { + public: + bad_array_new_length() throw() { } + + + + virtual ~bad_array_new_length() throw(); + + + virtual const char* what() const throw(); + }; + + + + + + + struct nothrow_t + { + + explicit nothrow_t() = default; + + }; + + extern const nothrow_t nothrow; + + + + typedef void (*new_handler)(); + + + + new_handler set_new_handler(new_handler) throw(); + + + + new_handler get_new_handler() noexcept; + +} +# 126 "/usr/riscv64-linux-gnu/include/c++/11/new" 3 + void* operator new(std::size_t) + __attribute__((__externally_visible__)); + void* operator new[](std::size_t) + __attribute__((__externally_visible__)); +void operator delete(void*) noexcept + __attribute__((__externally_visible__)); +void operator delete[](void*) noexcept + __attribute__((__externally_visible__)); + +void operator delete(void*, std::size_t) noexcept + __attribute__((__externally_visible__)); +void operator delete[](void*, std::size_t) noexcept + __attribute__((__externally_visible__)); + + void* operator new(std::size_t, const std::nothrow_t&) noexcept + __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); + void* operator new[](std::size_t, const std::nothrow_t&) noexcept + __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); +void operator delete(void*, const std::nothrow_t&) noexcept + __attribute__((__externally_visible__)); +void operator delete[](void*, const std::nothrow_t&) noexcept + __attribute__((__externally_visible__)); +# 174 "/usr/riscv64-linux-gnu/include/c++/11/new" 3 + inline void* operator new(std::size_t, void* __p) noexcept +{ return __p; } + inline void* operator new[](std::size_t, void* __p) noexcept +{ return __p; } + + +inline void operator delete (void*, void*) noexcept { } +inline void operator delete[](void*, void*) noexcept { } + +} +# 230 "/usr/riscv64-linux-gnu/include/c++/11/new" 3 +#pragma GCC visibility pop +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" 2 + + +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" +class outputStream; +class Thread; +class JavaThread; + +class AllocFailStrategy { +public: + enum AllocFailEnum { EXIT_OOM, RETURN_NULL }; +}; +typedef AllocFailStrategy::AllocFailEnum AllocFailType; +# 142 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" +enum class MEMFLAGS : uint8_t { + mtJavaHeap, mtClass, mtThread, mtThreadStack, mtCode, mtGC, mtGCCardSet, mtCompiler, mtJVMCI, mtInternal, mtOther, mtSymbol, mtNMT, mtClassShared, mtChunk, mtTest, mtTracing, mtLogging, mtStatistics, mtArguments, mtModule, mtSafepoint, mtSynchronizer, mtServiceability, mtMetaspace, mtStringDedup, mtObjectMonitor, mtNone, + mt_number_of_types + +}; + +static_assert((sizeof(MEMFLAGS) == sizeof(uint8_t)), "sizeof(MEMFLAGS) == sizeof(uint8_t)"); + + + + + +constexpr MEMFLAGS mtJavaHeap = MEMFLAGS::mtJavaHeap; constexpr MEMFLAGS mtClass = MEMFLAGS::mtClass; constexpr MEMFLAGS mtThread = MEMFLAGS::mtThread; constexpr MEMFLAGS mtThreadStack = MEMFLAGS::mtThreadStack; constexpr MEMFLAGS mtCode = MEMFLAGS::mtCode; constexpr MEMFLAGS mtGC = MEMFLAGS::mtGC; constexpr MEMFLAGS mtGCCardSet = MEMFLAGS::mtGCCardSet; constexpr MEMFLAGS mtCompiler = MEMFLAGS::mtCompiler; constexpr MEMFLAGS mtJVMCI = MEMFLAGS::mtJVMCI; constexpr MEMFLAGS mtInternal = MEMFLAGS::mtInternal; constexpr MEMFLAGS mtOther = MEMFLAGS::mtOther; constexpr MEMFLAGS mtSymbol = MEMFLAGS::mtSymbol; constexpr MEMFLAGS mtNMT = MEMFLAGS::mtNMT; constexpr MEMFLAGS mtClassShared = MEMFLAGS::mtClassShared; constexpr MEMFLAGS mtChunk = MEMFLAGS::mtChunk; constexpr MEMFLAGS mtTest = MEMFLAGS::mtTest; constexpr MEMFLAGS mtTracing = MEMFLAGS::mtTracing; constexpr MEMFLAGS mtLogging = MEMFLAGS::mtLogging; constexpr MEMFLAGS mtStatistics = MEMFLAGS::mtStatistics; constexpr MEMFLAGS mtArguments = MEMFLAGS::mtArguments; constexpr MEMFLAGS mtModule = MEMFLAGS::mtModule; constexpr MEMFLAGS mtSafepoint = MEMFLAGS::mtSafepoint; constexpr MEMFLAGS mtSynchronizer = MEMFLAGS::mtSynchronizer; constexpr MEMFLAGS mtServiceability = MEMFLAGS::mtServiceability; constexpr MEMFLAGS mtMetaspace = MEMFLAGS::mtMetaspace; constexpr MEMFLAGS mtStringDedup = MEMFLAGS::mtStringDedup; constexpr MEMFLAGS mtObjectMonitor = MEMFLAGS::mtObjectMonitor; constexpr MEMFLAGS mtNone = MEMFLAGS::mtNone; + + +constexpr int mt_number_of_types = static_cast(MEMFLAGS::mt_number_of_types); + +extern bool NMT_track_callsite; + +class NativeCallStack; + + +char* AllocateHeap(size_t size, + MEMFLAGS flags, + const NativeCallStack& stack, + AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); +char* AllocateHeap(size_t size, + MEMFLAGS flags, + AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); + +char* ReallocateHeap(char *old, + size_t size, + MEMFLAGS flag, + AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); + + +void FreeHeap(void* p); + +class CHeapObjBase { + public: + inline __attribute__ ((always_inline)) void* operator new(size_t size, MEMFLAGS f) { + return AllocateHeap(size, f); + } + + inline __attribute__ ((always_inline)) void* operator new(size_t size, + MEMFLAGS f, + const NativeCallStack& stack) { + return AllocateHeap(size, f, stack); + } + + inline __attribute__ ((always_inline)) void* operator new(size_t size, + MEMFLAGS f, + const std::nothrow_t&, + const NativeCallStack& stack) throw() { + return AllocateHeap(size, f, stack, AllocFailStrategy::RETURN_NULL); + } + + inline __attribute__ ((always_inline)) void* operator new(size_t size, + MEMFLAGS f, + const std::nothrow_t&) throw() { + return AllocateHeap(size, f, AllocFailStrategy::RETURN_NULL); + } + + inline __attribute__ ((always_inline)) void* operator new[](size_t size, MEMFLAGS f) { + return AllocateHeap(size, f); + } + + inline __attribute__ ((always_inline)) void* operator new[](size_t size, + MEMFLAGS f, + const NativeCallStack& stack) { + return AllocateHeap(size, f, stack); + } + + inline __attribute__ ((always_inline)) void* operator new[](size_t size, + MEMFLAGS f, + const std::nothrow_t&, + const NativeCallStack& stack) throw() { + return AllocateHeap(size, f, stack, AllocFailStrategy::RETURN_NULL); + } + + inline __attribute__ ((always_inline)) void* operator new[](size_t size, + MEMFLAGS f, + const std::nothrow_t&) throw() { + return AllocateHeap(size, f, AllocFailStrategy::RETURN_NULL); + } + + void operator delete(void* p) { FreeHeap(p); } + void operator delete [] (void* p) { FreeHeap(p); } +}; + + +template +class CHeapObj { + public: + inline __attribute__ ((always_inline)) void* operator new(size_t size) { + return CHeapObjBase::operator new(size, F); + } + + inline __attribute__ ((always_inline)) void* operator new(size_t size, + const NativeCallStack& stack) { + return CHeapObjBase::operator new(size, F, stack); + } + + inline __attribute__ ((always_inline)) void* operator new(size_t size, const std::nothrow_t& nt, + const NativeCallStack& stack) throw() { + return CHeapObjBase::operator new(size, F, nt, stack); + } + + inline __attribute__ ((always_inline)) void* operator new(size_t size, const std::nothrow_t& nt) throw() { + return CHeapObjBase::operator new(size, F, nt); + } + + inline __attribute__ ((always_inline)) void* operator new[](size_t size) { + return CHeapObjBase::operator new[](size, F); + } + + inline __attribute__ ((always_inline)) void* operator new[](size_t size, + const NativeCallStack& stack) { + return CHeapObjBase::operator new[](size, F, stack); + } + + inline __attribute__ ((always_inline)) void* operator new[](size_t size, const std::nothrow_t& nt, + const NativeCallStack& stack) throw() { + return CHeapObjBase::operator new[](size, F, nt, stack); + } + + inline __attribute__ ((always_inline)) void* operator new[](size_t size, const std::nothrow_t& nt) throw() { + return CHeapObjBase::operator new[](size, F, nt); + } + + void operator delete(void* p) { + CHeapObjBase::operator delete(p); + } + + void operator delete [] (void* p) { + CHeapObjBase::operator delete[](p); + } +}; + + + + +class StackObj { + public: + void* operator new(size_t size) = delete; + void* operator new [](size_t size) = delete; + void operator delete(void* p) = delete; + void operator delete [](void* p) = delete; +}; +# 300 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" +class ClassLoaderData; +class MetaspaceClosure; + +class MetaspaceObj { +# 319 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" + friend class VMStructs; + + + + + + static void* _shared_metaspace_base; + static void* _shared_metaspace_top; + + public: + + + + + static bool is_valid(const MetaspaceObj* p); + + + static bool is_shared(const MetaspaceObj* p) { + + + return (((void*)p) < _shared_metaspace_top && + ((void*)p) >= _shared_metaspace_base); + } + bool is_shared() const { return MetaspaceObj::is_shared(this); } + + + + + + void print_address_on(outputStream* st) const; + + static void set_shared_metaspace_range(void* base, void* top) { + _shared_metaspace_base = base; + _shared_metaspace_top = top; + } + + static void* shared_metaspace_base() { return _shared_metaspace_base; } + static void* shared_metaspace_top() { return _shared_metaspace_top; } +# 379 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" + enum Type { + + ClassType, SymbolType, TypeArrayU1Type, TypeArrayU2Type, TypeArrayU4Type, TypeArrayU8Type, TypeArrayOtherType, MethodType, ConstMethodType, MethodDataType, ConstantPoolType, ConstantPoolCacheType, AnnotationsType, MethodCountersType, SharedClassPathEntryType, RecordComponentType, + _number_of_types + }; + + static const char * type_name(Type type) { + switch(type) { + case ClassType: return "Class"; case SymbolType: return "Symbol"; case TypeArrayU1Type: return "TypeArrayU1"; case TypeArrayU2Type: return "TypeArrayU2"; case TypeArrayU4Type: return "TypeArrayU4"; case TypeArrayU8Type: return "TypeArrayU8"; case TypeArrayOtherType: return "TypeArrayOther"; case MethodType: return "Method"; case ConstMethodType: return "ConstMethod"; case MethodDataType: return "MethodData"; case ConstantPoolType: return "ConstantPool"; case ConstantPoolCacheType: return "ConstantPoolCache"; case AnnotationsType: return "Annotations"; case MethodCountersType: return "MethodCounters"; case SharedClassPathEntryType: return "SharedClassPathEntry"; case RecordComponentType: return "RecordComponent"; + default: + do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/memory/allocation.hpp", 389); } while (0); + return nullptr; + } + } + + static MetaspaceObj::Type array_type(size_t elem_size) { + switch (elem_size) { + case 1: return TypeArrayU1Type; + case 2: return TypeArrayU2Type; + case 4: return TypeArrayU4Type; + case 8: return TypeArrayU8Type; + default: + return TypeArrayOtherType; + } + } + + void* operator new(size_t size, ClassLoaderData* loader_data, + size_t word_size, + Type type, JavaThread* thread) throw(); + + void* operator new(size_t size, ClassLoaderData* loader_data, + size_t word_size, + Type type) throw(); + void operator delete(void* p) { do { (*g_assert_poison) = 'X';; report_should_not_call("src/hotspot/share/memory/allocation.hpp", 412); } while (0); } + + + + + static bool is_read_only_by_default() { return false; } +}; + + + +class Arena; + +extern char* resource_allocate_bytes(size_t size, + AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); +extern char* resource_allocate_bytes(Thread* thread, size_t size, + AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); +extern char* resource_reallocate_bytes( char *old, size_t old_size, size_t new_size, + AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); +extern void resource_free_bytes( Thread* thread, char *old, size_t size ); + + + +class ResourceObj { + public: + void* operator new(size_t size) { + return resource_allocate_bytes(size); + } + + void* operator new(size_t size, const std::nothrow_t& nothrow_constant) throw() { + return resource_allocate_bytes(size, AllocFailStrategy::RETURN_NULL); + } + + void* operator new [](size_t size) throw() = delete; + void* operator new [](size_t size, const std::nothrow_t& nothrow_constant) throw() = delete; + + void operator delete(void* p) = delete; + void operator delete [](void* p) = delete; +}; + +class ArenaObj { + public: + void* operator new(size_t size, Arena *arena) throw(); + void* operator new [](size_t size, Arena *arena) throw() = delete; + + void* operator new [](size_t size) throw() = delete; + void* operator new [](size_t size, const std::nothrow_t& nothrow_constant) throw() = delete; + + void operator delete(void* p) = delete; + void operator delete [](void* p) = delete; +}; +# 470 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" +class AnyObj { + public: + enum allocation_type { STACK_OR_EMBEDDED = 0, RESOURCE_AREA, C_HEAP, ARENA, allocation_mask = 0x3 }; + static void set_allocation_type(address res, allocation_type type) {}; +# 496 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" + public: + + void* operator new(size_t size, MEMFLAGS flags) throw(); + void* operator new [](size_t size, MEMFLAGS flags) throw() = delete; + void* operator new(size_t size, const std::nothrow_t& nothrow_constant, MEMFLAGS flags) throw(); + void* operator new [](size_t size, const std::nothrow_t& nothrow_constant, MEMFLAGS flags) throw() = delete; + + + void* operator new(size_t size, Arena *arena); + void* operator new [](size_t size, Arena *arena) = delete; + + + void* operator new(size_t size) { + address res = (address)resource_allocate_bytes(size); + + return res; + } + void* operator new(size_t size, const std::nothrow_t& nothrow_constant) throw() { + address res = (address)resource_allocate_bytes(size, AllocFailStrategy::RETURN_NULL); + + return res; + } + + void* operator new [](size_t size) = delete; + void* operator new [](size_t size, const std::nothrow_t& nothrow_constant) = delete; + void operator delete(void* p); + void operator delete [](void* p) = delete; + + + + + + +}; +# 610 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" +class ReallocMark: public StackObj { +protected: + + +public: + ReallocMark() {}; + void check() {}; +}; +# 626 "/home/rehn/source/jdk/open/src/hotspot/share/memory/allocation.hpp" +template +class ArrayAllocator : public AllStatic { + private: + static bool should_use_malloc(size_t length); + + static E* allocate_malloc(size_t length, MEMFLAGS flags); + static E* allocate_mmap(size_t length, MEMFLAGS flags); + + static E* reallocate_malloc(E* addr, size_t new_length, MEMFLAGS flags); + + static void free_malloc(E* addr, size_t length); + static void free_mmap(E* addr, size_t length); + + public: + static E* allocate(size_t length, MEMFLAGS flags); + static E* reallocate(E* old_addr, size_t old_length, size_t new_length, MEMFLAGS flags); + static void free(E* addr, size_t length); +}; + + + +template +class MmapArrayAllocator : public AllStatic { + private: + static size_t size_for(size_t length); + + public: + static E* allocate_or_null(size_t length, MEMFLAGS flags); + static E* allocate(size_t length, MEMFLAGS flags); + static void free(E* addr, size_t length); +}; + + +template +class MallocArrayAllocator : public AllStatic { + public: + static size_t size_for(size_t length); + + static E* allocate(size_t length, MEMFLAGS flags); + static E* reallocate(E* addr, size_t new_length, MEMFLAGS flags); + static void free(E* addr); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classFileStream.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/bytes.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/bytes.hpp" +class Endian : AllStatic { +public: + enum Order { + LITTLE, + BIG, + JAVA = BIG, + NATIVE = + + LITTLE + + + + }; + + + + static inline bool is_Java_byte_ordering_different() { + return NATIVE != JAVA; + } +}; + +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/bytes_riscv.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/bytes_riscv.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/byteswap.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/byteswap.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/metaprogramming/enableIf.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/metaprogramming/enableIf.hpp" +template +using EnableIf = std::enable_if; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/byteswap.hpp" 2 + + + + + + +template +struct ByteswapImpl; + + + + + +template ::value), int> = 0> +inline T byteswap(T x) { + using U = std::make_unsigned_t; + return static_cast(ByteswapImpl{}(static_cast(x))); +} + + +template +struct ByteswapImpl { + inline constexpr T operator()(T x) const { + return x; + } +}; + + + + + +template +struct ByteswapFallbackImpl; + +template +struct ByteswapFallbackImpl { + inline constexpr uint16_t operator()(uint16_t x) const { + return (((x & 0x00ff) << 8) | ((x & 0xff00) >> 8)); + } +}; + +template +struct ByteswapFallbackImpl { + inline constexpr uint32_t operator()(uint32_t x) const { + return (((x & 0x000000ffU) << 24) | ((x & 0x0000ff00U) << 8) | + ((x & 0x00ff0000U) >> 8) | ((x & 0xff000000U) >> 24)); + } +}; + +template +struct ByteswapFallbackImpl { + inline constexpr uint64_t operator()(uint64_t x) const { + return (((x & 0x00000000000000ffUL) << 56) | ((x & 0x000000000000ff00UL) << 40) | + ((x & 0x0000000000ff0000UL) << 24) | ((x & 0x00000000ff000000UL) << 8) | + ((x & 0x000000ff00000000UL) >> 8) | ((x & 0x0000ff0000000000UL) >> 24) | + ((x & 0x00ff000000000000UL) >> 40) | ((x & 0xff00000000000000UL) >> 56)); + } +}; +# 133 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/byteswap.hpp" +template +struct ByteswapImpl : public ByteswapFallbackImpl {}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/bytes_riscv.hpp" 2 + +class Bytes: AllStatic { + public: + + + + static inline u2 get_native_u2(address p) { + if ((intptr_t(p) & 1) == 0) { + return *(u2*)p; + } else { + return ((u2)(p[1]) << 8) | + ((u2)(p[0])); + } + } + + static inline u4 get_native_u4(address p) { + switch (intptr_t(p) & 3) { + case 0: + return *(u4*)p; + + case 2: + return ((u4)(((u2*)p)[1]) << 16) | + ((u4)(((u2*)p)[0])); + + default: + return ((u4)(p[3]) << 24) | + ((u4)(p[2]) << 16) | + ((u4)(p[1]) << 8) | + ((u4)(p[0])); + } + } + + static inline u8 get_native_u8(address p) { + switch (intptr_t(p) & 7) { + case 0: + return *(u8*)p; + + case 4: + return ((u8)(((u4*)p)[1]) << 32) | + ((u8)(((u4*)p)[0])); + + case 2: + case 6: + return ((u8)(((u2*)p)[3]) << 48) | + ((u8)(((u2*)p)[2]) << 32) | + ((u8)(((u2*)p)[1]) << 16) | + ((u8)(((u2*)p)[0])); + + default: + return ((u8)(p[7]) << 56) | + ((u8)(p[6]) << 48) | + ((u8)(p[5]) << 40) | + ((u8)(p[4]) << 32) | + ((u8)(p[3]) << 24) | + ((u8)(p[2]) << 16) | + ((u8)(p[1]) << 8) | + ((u8)(p[0])); + } + } + + static inline void put_native_u2(address p, u2 x) { + if ((intptr_t(p) & 1) == 0) { + *(u2*)p = x; + } else { + p[1] = x >> 8; + p[0] = x; + } + } + + static inline void put_native_u4(address p, u4 x) { + switch (intptr_t(p) & 3) { + case 0: + *(u4*)p = x; + break; + + case 2: + ((u2*)p)[1] = x >> 16; + ((u2*)p)[0] = x; + break; + + default: + ((u1*)p)[3] = x >> 24; + ((u1*)p)[2] = x >> 16; + ((u1*)p)[1] = x >> 8; + ((u1*)p)[0] = x; + break; + } + } + + static inline void put_native_u8(address p, u8 x) { + switch (intptr_t(p) & 7) { + case 0: + *(u8*)p = x; + break; + + case 4: + ((u4*)p)[1] = x >> 32; + ((u4*)p)[0] = x; + break; + + case 2: + case 6: + ((u2*)p)[3] = x >> 48; + ((u2*)p)[2] = x >> 32; + ((u2*)p)[1] = x >> 16; + ((u2*)p)[0] = x; + break; + + default: + ((u1*)p)[7] = x >> 56; + ((u1*)p)[6] = x >> 48; + ((u1*)p)[5] = x >> 40; + ((u1*)p)[4] = x >> 32; + ((u1*)p)[3] = x >> 24; + ((u1*)p)[2] = x >> 16; + ((u1*)p)[1] = x >> 8; + ((u1*)p)[0] = x; + break; + } + } + + + + + + + static inline u2 get_Java_u2(address p) { return byteswap(get_native_u2(p)); } + static inline u4 get_Java_u4(address p) { return byteswap(get_native_u4(p)); } + static inline u8 get_Java_u8(address p) { return byteswap(get_native_u8(p)); } + + static inline void put_Java_u2(address p, u2 x) { put_native_u2(p, byteswap(x)); } + static inline void put_Java_u4(address p, u4 x) { put_native_u4(p, byteswap(x)); } + static inline void put_Java_u8(address p, u8 x) { put_native_u8(p, byteswap(x)); } +}; +# 52 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/bytes.hpp" 2 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classFileStream.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/exceptions.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/exceptions.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oopsHierarchy.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oopsHierarchy.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/metaprogramming/primitiveConversions.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/metaprogramming/primitiveConversions.hpp" +class PrimitiveConversions : public AllStatic { + + + template + static constexpr bool check_cast() { + return (sizeof(To) == sizeof(From)) && + (std::is_integral::value || std::is_integral::value); + } + +public: +# 59 "/home/rehn/source/jdk/open/src/hotspot/share/metaprogramming/primitiveConversions.hpp" + template = 0, + std::enable_if_t::value), int> = 0, + std::enable_if_t::value), int> = 0> + static constexpr To cast(From x) { + return static_cast(x); + } + + + + template()), int> = 0, + std::enable_if_t::value), int> = 0> + static constexpr To cast(From x) { + return static_cast(cast>(x)); + } + + template()), int> = 0, + std::enable_if_t::value), int> = 0> + static constexpr To cast(From x) { + return cast(static_cast>(x)); + } + + + + template()), int> = 0, + std::enable_if_t::value || std::is_pointer::value), int> = 0> + static To cast(From x) { + return reinterpret_cast(x); + } +# 99 "/home/rehn/source/jdk/open/src/hotspot/share/metaprogramming/primitiveConversions.hpp" + template()), int> = 0, + std::enable_if_t::value || std::is_floating_point::value), int> = 0 + > + static To cast(From x) { + union { From from; To to; } converter = { x }; + return converter.to; + } +# 117 "/home/rehn/source/jdk/open/src/hotspot/share/metaprogramming/primitiveConversions.hpp" + template + struct Translate : public std::false_type {}; +}; + + +template +struct PrimitiveConversions::Translate::value>> + : public std::true_type +{ + using Value = T; + using Decayed = std::underlying_type_t; + + static constexpr Decayed decay(Value x) { return static_cast(x); } + static constexpr Value recover(Decayed x) { return static_cast(x); } +}; + + + +template<> +struct PrimitiveConversions::Translate : public std::true_type { + typedef double Value; + typedef int64_t Decayed; + + static Decayed decay(Value x) { return PrimitiveConversions::cast(x); } + static Value recover(Decayed x) { return PrimitiveConversions::cast(x); } +}; + +template<> +struct PrimitiveConversions::Translate : public std::true_type { + typedef float Value; + typedef int32_t Decayed; + + static Decayed decay(Value x) { return PrimitiveConversions::cast(x); } + static Value recover(Decayed x) { return PrimitiveConversions::cast(x); } +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oopsHierarchy.hpp" 2 +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oopsHierarchy.hpp" +enum class narrowOop : uint32_t { null = 0 }; + +typedef void* OopOrNarrowOopStar; + + + +typedef class oopDesc* oop; +typedef class instanceOopDesc* instanceOop; +typedef class stackChunkOopDesc* stackChunkOop; +typedef class arrayOopDesc* arrayOop; +typedef class objArrayOopDesc* objArrayOop; +typedef class typeArrayOopDesc* typeArrayOop; +# 162 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oopsHierarchy.hpp" +template inline oop cast_to_oop(T value) { + return (oopDesc*)value; +} +template inline T cast_from_oop(oop o) { + return (T)(o); +} + +inline intptr_t p2i(narrowOop o) { + return static_cast(o); +} + + + + +class ConstMethod; +class ConstantPoolCache; +class MethodData; + +class Method; +class ConstantPool; + +class CompiledICHolder; + + + + +class Klass; +class InstanceKlass; +class InstanceMirrorKlass; +class InstanceClassLoaderKlass; +class InstanceRefKlass; +class InstanceStackChunkKlass; +class ArrayKlass; +class ObjArrayKlass; +class TypeArrayKlass; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/exceptions.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/ostream.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/ostream.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/timer.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/timer.hpp" +class elapsedTimer { + friend class VMStructs; + private: + jlong _counter; + jlong _start_counter; + bool _active; + public: + elapsedTimer() { _active = false; reset(); } + void add(elapsedTimer t); + void add_nanoseconds(jlong ns); + void start(); + void stop(); + void reset() { _counter = 0; } + double seconds() const; + jlong milliseconds() const; + jlong ticks() const { return _counter; } + jlong active_ticks() const; + bool is_active() const { return _active; } +}; + + +class TimeStamp { + private: + jlong _counter; + public: + TimeStamp() { _counter = 0; } + + bool is_updated() const { return _counter != 0; } + + void update(); + + void update_to(jlong ticks); + + + double seconds() const; + jlong milliseconds() const; + + jlong ticks() const { return _counter; } + + jlong ticks_since_update() const; +}; + +class TimeHelper { + public: + static double counter_to_seconds(jlong counter); + static double counter_to_millis(jlong counter); + static jlong millis_to_counter(jlong millis); + static jlong micros_to_counter(jlong micros); +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/ostream.hpp" 2 + + + + +# 45 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/ostream.hpp" +class outputStream : public CHeapObjBase { + private: + outputStream(outputStream const&) = delete; outputStream& operator=(outputStream const&) = delete; + + protected: + int _indentation; + int _position; + uint64_t _precount; + TimeStamp _stamp; + char* _scratch; + size_t _scratch_len; + + + bool update_position(const char* s, size_t len); + static const char* do_vsnprintf(char* buffer, size_t buflen, + const char* format, va_list ap, + bool add_cr, + size_t& result_len) __attribute__((format(printf, 3, 0))); + + + void do_vsnprintf_and_write_with_automatic_buffer(const char* format, va_list ap, bool add_cr) __attribute__((format(printf, 2, 0))); + + void do_vsnprintf_and_write_with_scratch_buffer(const char* format, va_list ap, bool add_cr) __attribute__((format(printf, 2, 0))); + + void do_vsnprintf_and_write(const char* format, va_list ap, bool add_cr) __attribute__((format(printf, 2, 0))); + + public: + + outputStream(); + outputStream(bool has_time_stamps); + + + outputStream& indent(); + void inc() { _indentation++; }; + void dec() { _indentation--; }; + void inc(int n) { _indentation += n; }; + void dec(int n) { _indentation -= n; }; + int indentation() const { return _indentation; } + void set_indentation(int i) { _indentation = i; } + void fill_to(int col); + void move_to(int col, int slop = 6, int min_space = 2); + + + int position() const { return _position; } + julong count() const { return _precount + _position; } + void set_count(julong count) { _precount = count - _position; } + void set_position(int pos) { _position = pos; } + + + void print(const char* format, ...) __attribute__((format(printf, 2, 3))); + void print_cr(const char* format, ...) __attribute__((format(printf, 2, 3))); + void vprint(const char *format, va_list argptr) __attribute__((format(printf, 2, 0))); + void vprint_cr(const char* format, va_list argptr) __attribute__((format(printf, 2, 0))); + void print_raw(const char* str) { write(str, strlen(str)); } + void print_raw(const char* str, size_t len) { write(str, len); } + void print_raw_cr(const char* str) { write(str, strlen(str)); cr(); } + void print_raw_cr(const char* str, size_t len){ write(str, len); cr(); } + void print_data(void* data, size_t len, bool with_ascii, bool rel_addr=true); + void put(char ch); + void sp(int count = 1); + void cr(); + void cr_indent(); + void bol() { if (_position > 0) cr(); } + + + + TimeStamp& time_stamp() { return _stamp; } + void stamp(); + void stamp(bool guard, const char* prefix, const char* suffix); + void stamp(bool guard) { + stamp(guard, "", ": "); + } + + void date_stamp(bool guard, const char* prefix, const char* suffix); + + void date_stamp(bool guard) { + date_stamp(guard, "", ": "); + } + + + void print_jlong(jlong value); + void print_julong(julong value); + + + virtual void flush() {} + virtual void write(const char* str, size_t len) = 0; + virtual void rotate_log(bool force, outputStream* out = nullptr) {} + virtual ~outputStream() {} + + + + void set_scratch_buffer(char* p, size_t len) { _scratch = p; _scratch_len = len; } + + void dec_cr() { dec(); cr(); } + void inc_cr() { inc(); cr(); } +}; + + + +extern outputStream* tty; + +class streamIndentor : public StackObj { + private: + outputStream* _str; + int _amount; + + public: + streamIndentor(outputStream* str, int amt = 2) : _str(str), _amount(amt) { + _str->inc(_amount); + } + ~streamIndentor() { _str->dec(_amount); } +}; + + +class ttyLocker: StackObj { + friend class ttyUnlocker; + private: + intx _holder; + + public: + static intx hold_tty(); + static void release_tty(intx holder); + static bool release_tty_if_locked(); + static void break_tty_lock_for_safepoint(intx holder); + + ttyLocker() { _holder = hold_tty(); } + ~ttyLocker() { release_tty(_holder); } +}; + + + +class ttyUnlocker: StackObj { + private: + bool _was_locked; + public: + ttyUnlocker() { + _was_locked = ttyLocker::release_tty_if_locked(); + } + ~ttyUnlocker() { + if (_was_locked) { + ttyLocker::hold_tty(); + } + } +}; + + + +class stringStream : public outputStream { + ; + char* _buffer; + size_t _written; + size_t _capacity; + const bool _is_fixed; + char _small_buffer[48]; + + + void grow(size_t new_capacity); + + + void zero_terminate(); + + public: + + + stringStream(size_t initial_capacity = 0); + + + stringStream(char* fixed_buffer, size_t fixed_buffer_size); + ~stringStream(); + virtual void write(const char* c, size_t len); + + + size_t size() const { return _written; } + + + const char* base() const { return _buffer; } + + + + const char* freeze() const { + ; + return _buffer; + }; + void reset(); + + char* as_string(bool c_heap = false) const; +}; + +class fileStream : public outputStream { + protected: + FILE* _file; + bool _need_close; + public: + fileStream() { _file = nullptr; _need_close = false; } + fileStream(const char* file_name); + fileStream(const char* file_name, const char* opentype); + fileStream(FILE* file, bool need_close = false) { _file = file; _need_close = need_close; } + ~fileStream(); + bool is_open() const { return _file != nullptr; } + virtual void write(const char* c, size_t len); + size_t read(void *data, size_t size, size_t count) { return _file != nullptr ? ::fread(data, size, count, _file) : 0; } + char* readln(char *data, int count); + int eof() { return _file != nullptr ? feof(_file) : -1; } + long fileSize(); + void rewind() { if (_file != nullptr) ::rewind(_file); } + void flush(); +}; + + + + + +class fdStream : public outputStream { + protected: + int _fd; + static fdStream _stdout_stream; + static fdStream _stderr_stream; + public: + fdStream(int fd = -1) : _fd(fd) { } + bool is_open() const { return _fd != -1; } + void set_fd(int fd) { _fd = fd; } + int fd() const { return _fd; } + virtual void write(const char* c, size_t len); + void flush() {}; + + + static fdStream* stdout_stream() { return &_stdout_stream; } + static fdStream* stderr_stream() { return &_stderr_stream; } +}; + + +class nullStream : public outputStream { +public: + void write(const char* c, size_t len) {} + void flush() {}; +}; + +void ostream_init(); +void ostream_init_log(); +void ostream_exit(); +void ostream_abort(); +const char* make_log_name(const char* log_name, const char* force_directory); + + + +class bufferedStream : public outputStream { + protected: + char* buffer; + size_t buffer_pos; + size_t buffer_max; + size_t buffer_length; + bool buffer_fixed; + bool truncated; + public: + bufferedStream(size_t initial_bufsize = 256, size_t bufmax = 1024*1024*10); + bufferedStream(char* fixed_buffer, size_t fixed_buffer_size, size_t bufmax = 1024*1024*10); + ~bufferedStream(); + virtual void write(const char* c, size_t len); + size_t size() { return buffer_pos; } + const char* base() { return buffer; } + void reset() { buffer_pos = 0; _precount = 0; _position = 0; } + char* as_string(); +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/exceptions.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/sizes.hpp" 1 +# 43 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/sizes.hpp" +enum class WordSize : int {}; + +constexpr WordSize in_WordSize(int size) { return static_cast(size); } +constexpr int in_words(WordSize x) { return static_cast(x); } + +enum class ByteSize : int {}; + +constexpr ByteSize in_ByteSize(int size) { return static_cast(size); } +constexpr int in_bytes(ByteSize x) { return static_cast(x); } + +constexpr ByteSize operator + (ByteSize x, ByteSize y) { return in_ByteSize(in_bytes(x) + in_bytes(y)); } +constexpr ByteSize operator - (ByteSize x, ByteSize y) { return in_ByteSize(in_bytes(x) - in_bytes(y)); } +constexpr ByteSize operator * (ByteSize x, int y) { return in_ByteSize(in_bytes(x) * y ); } + +constexpr bool operator == (ByteSize x, int y) { return in_bytes(x) == y; } +constexpr bool operator != (ByteSize x, int y) { return in_bytes(x) != y; } +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/exceptions.hpp" 2 +# 51 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/exceptions.hpp" +class JavaThread; +class Handle; +class Symbol; +class JavaCallArguments; +class methodHandle; + + + + + +class ThreadShadow: public CHeapObj { + friend class VMStructs; + friend class JVMCIVMStructs; + + protected: + oop _pending_exception; + const char* _exception_file; + int _exception_line; + friend void check_ThreadShadow(); + + + + + + + + virtual void unused_initial_virtual() { } + + public: + oop pending_exception() const { return _pending_exception; } + bool has_pending_exception() const { return _pending_exception != nullptr; } + const char* exception_file() const { return _exception_file; } + int exception_line() const { return _exception_line; } + + + static ByteSize pending_exception_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ThreadShadow)]; ThreadShadow* dummyObj = (ThreadShadow*)space; char* c = (char*)(void*)&dummyObj->_pending_exception; return (size_t)(c - space); }())); } + + + void set_pending_exception(oop exception, const char* file, int line); + + + void clear_pending_exception(); + + + void clear_pending_nonasync_exception(); + + ThreadShadow() : _pending_exception(nullptr), + _exception_file(nullptr), _exception_line(0) {} +}; + + + + + + + +class Exceptions { + static bool special_exception(JavaThread* thread, const char* file, int line, Handle exception); + static bool special_exception(JavaThread* thread, const char* file, int line, Symbol* name, const char* message); + + + static volatile int _out_of_memory_error_java_heap_errors; + static volatile int _out_of_memory_error_metaspace_errors; + static volatile int _out_of_memory_error_class_metaspace_errors; + + + static volatile int _linkage_errors; + public: + + + typedef enum { + safe_to_utf8 = 0, + unsafe_to_utf8 = 1 + } ExceptionMsgToUtf8Mode; + + static void _throw_oop(JavaThread* thread, const char* file, int line, oop exception); + static void _throw(JavaThread* thread, const char* file, int line, Handle exception, const char* msg = nullptr); + + static void _throw_msg(JavaThread* thread, const char* file, int line, Symbol* name, const char* message); + static void _throw_msg(JavaThread* thread, const char* file, int line, Symbol* name, const char* message, + Handle loader, Handle protection_domain); + + static void _throw_msg_cause(JavaThread* thread, const char* file, int line, Symbol* name, const char* message, Handle h_cause); + static void _throw_msg_cause(JavaThread* thread, const char* file, int line, Symbol* name, const char* message, Handle h_cause, + Handle h_loader, Handle h_protection_domain); + + static void _throw_cause(JavaThread* thread, const char* file, int line, Symbol* name, Handle h_cause); + static void _throw_cause(JavaThread* thread, const char* file, int line, Symbol* name, Handle h_cause, + Handle h_loader, Handle h_protection_domain); + + static void _throw_args(JavaThread* thread, const char* file, int line, + Symbol* name, Symbol* signature, + JavaCallArguments* args); + + + + static void fthrow(JavaThread* thread, const char* file, int line, Symbol* name, + const char* format, ...) __attribute__((format(printf, 5, 6))); + + + static Handle new_exception(JavaThread* thread, Symbol* name, + Symbol* signature, JavaCallArguments* args, + Handle loader, Handle protection_domain); + + static Handle new_exception(JavaThread* thread, Symbol* name, + Symbol* signature, JavaCallArguments* args, + Handle cause, + Handle loader, Handle protection_domain); + + static Handle new_exception(JavaThread* thread, Symbol* name, + Handle cause, + Handle loader, Handle protection_domain, + ExceptionMsgToUtf8Mode to_utf8_safe = safe_to_utf8); + + static Handle new_exception(JavaThread* thread, Symbol* name, + const char* message, Handle cause, + Handle loader, Handle protection_domain, + ExceptionMsgToUtf8Mode to_utf8_safe = safe_to_utf8); + + static Handle new_exception(JavaThread* thread, Symbol* name, + const char* message, + ExceptionMsgToUtf8Mode to_utf8_safe = safe_to_utf8); + + static void throw_stack_overflow_exception(JavaThread* thread, const char* file, int line, const methodHandle& method); + + static void wrap_dynamic_exception(bool is_indy, JavaThread* thread); + + + + static volatile int _stack_overflow_errors; + + static bool has_exception_counts(); + static void count_out_of_memory_exceptions(Handle exception); + static void print_exception_counts_on_error(outputStream* st); + + + static void debug_check_abort(Handle exception, const char* message = nullptr); + static void debug_check_abort_helper(Handle exception, const char* message = nullptr); + static void debug_check_abort(const char *value_string, const char* message = nullptr); + + + static void log_exception(Handle exception, const char* message); +}; +# 329 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/exceptions.hpp" +class ExceptionMark { + private: + JavaThread* _thread; + inline void check_no_pending_exception(); + + public: + ExceptionMark(); + ExceptionMark(JavaThread* thread); + ~ExceptionMark(); + + JavaThread* thread() { + return _thread; + } +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classFileStream.hpp" 2 + + + + + + + +class ClassPathEntry; + +class ClassFileStream: public ResourceObj { + private: + const u1* const _buffer_start; + const u1* const _buffer_end; + mutable const u1* _current; + const char* const _source; + bool _need_verify; + bool _from_boot_loader_modules_image; + void truncated_file_error(JavaThread* __the_thread__) const ; + + protected: + const u1* clone_buffer() const; + const char* clone_source() const; + + public: + static const bool verify; + + ClassFileStream(const u1* buffer, + int length, + const char* source, + bool verify_stream = verify, + bool from_boot_loader_modules_image = false); + + virtual const ClassFileStream* clone() const; + + + const u1* buffer() const { return _buffer_start; } + int length() const { return pointer_delta_as_int(_buffer_end, _buffer_start); } + const u1* current() const { return _current; } + void set_current(const u1* pos) const { + ; + _current = pos; + } + + + juint current_offset() const { + return (juint)(_current - _buffer_start); + } + const char* source() const { return _source; } + bool need_verify() const { return _need_verify; } + void set_verify(bool flag) { _need_verify = flag; } + bool from_boot_loader_modules_image() const { return _from_boot_loader_modules_image; } + + void check_truncated_file(bool b, JavaThread* __the_thread__) const { + if (b) { + truncated_file_error(__the_thread__); + } + } + + void guarantee_more(int size, JavaThread* __the_thread__) const { + size_t remaining = (size_t)(_buffer_end - _current); + unsigned int usize = (unsigned int)size; + check_truncated_file(usize > remaining, __the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception())) return ; (void)(0); + } + + + u1 get_u1_fast() const { + return *_current++; + } + u1 get_u1(JavaThread* __the_thread__) const { + if (_need_verify) { + guarantee_more(1, __the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); + } else { + ; + } + return get_u1_fast(); + } + + + u2 get_u2_fast() const { + u2 res = Bytes::get_Java_u2((address)_current); + _current += 2; + return res; + } + u2 get_u2(JavaThread* __the_thread__) const { + if (_need_verify) { + guarantee_more(2, __the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); + } else { + ; + } + return get_u2_fast(); + } + + + u4 get_u4_fast() const { + u4 res = Bytes::get_Java_u4((address)_current); + _current += 4; + return res; + } + + + u8 get_u8_fast() const { + u8 res = Bytes::get_Java_u8((address)_current); + _current += 8; + return res; + } + + + void skip_u1(int length, JavaThread* __the_thread__) const { + if (_need_verify) { + guarantee_more(length, __the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception())) return ; (void)(0); + } + skip_u1_fast(length); + } + void skip_u1_fast(int length) const { + _current += length; + } + + void skip_u2_fast(int length) const { + _current += 2 * length; + } + + void skip_u4_fast(int length) const { + _current += 4 * length; + } + + + bool at_eos() const { return _current == _buffer_end; } + + uint64_t compute_fingerprint() const; +}; +# 27 "/home/rehn/source/jdk/open/src/hotspot/share/prims/unsafe.cpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoader.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoader.hpp" +# 1 "/home/rehn/source/jdk/open/src/java.base/share/native/libjimage/jimage.hpp" 1 +# 35 "/home/rehn/source/jdk/open/src/java.base/share/native/libjimage/jimage.hpp" +class JImageFile; + +typedef jlong JImageLocationRef; +# 75 "/home/rehn/source/jdk/open/src/java.base/share/native/libjimage/jimage.hpp" +extern "C" __attribute__((visibility("default"))) JImageFile* +JIMAGE_Open(const char *name, jint* error); + +typedef JImageFile* (*JImageOpen_t)(const char *name, jint* error); +# 90 "/home/rehn/source/jdk/open/src/java.base/share/native/libjimage/jimage.hpp" +extern "C" __attribute__((visibility("default"))) void +JIMAGE_Close(JImageFile* jimage); + +typedef void (*JImageClose_t)(JImageFile* jimage); +# 109 "/home/rehn/source/jdk/open/src/java.base/share/native/libjimage/jimage.hpp" +extern "C" __attribute__((visibility("default"))) const char * +JIMAGE_PackageToModule(JImageFile* jimage, const char* package_name); + +typedef const char* (*JImagePackageToModule_t)(JImageFile* jimage, const char* package_name); +# 129 "/home/rehn/source/jdk/open/src/java.base/share/native/libjimage/jimage.hpp" +extern "C" __attribute__((visibility("default"))) JImageLocationRef JIMAGE_FindResource(JImageFile* jimage, + const char* module_name, const char* version, const char* name, + jlong* size); + +typedef JImageLocationRef(*JImageFindResource_t)(JImageFile* jimage, + const char* module_name, const char* version, const char* name, + jlong* size); +# 153 "/home/rehn/source/jdk/open/src/java.base/share/native/libjimage/jimage.hpp" +extern "C" __attribute__((visibility("default"))) jlong +JIMAGE_GetResource(JImageFile* jimage, JImageLocationRef location, + char* buffer, jlong size); + +typedef jlong(*JImageGetResource_t)(JImageFile* jimage, JImageLocationRef location, + char* buffer, jlong size); +# 184 "/home/rehn/source/jdk/open/src/java.base/share/native/libjimage/jimage.hpp" +typedef bool (*JImageResourceVisitor_t)(JImageFile* jimage, + const char* module_name, const char* version, const char* package, + const char* name, const char* extension, void* arg); + +extern "C" __attribute__((visibility("default"))) void +JIMAGE_ResourceIterator(JImageFile* jimage, + JImageResourceVisitor_t visitor, void *arg); + +typedef void (*JImageResourceIterator_t)(JImageFile* jimage, + JImageResourceVisitor_t visitor, void* arg); +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoader.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/handles.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/handles.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/memory/arena.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/memory/arena.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compiler_globals_pd.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compiler_globals_pd.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals_shared.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals_shared.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/align.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/align.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/checkedCast.hpp" 1 +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/checkedCast.hpp" +template +constexpr T2 checked_cast(T1 thing) { + T2 result = static_cast(thing); + ; + return result; +} +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/align.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/powerOfTwo.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/powerOfTwo.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/count_leading_zeros.hpp" 1 +# 37 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/count_leading_zeros.hpp" +template struct CountLeadingZerosImpl; + +template unsigned count_leading_zeros(T v) { + ; + return CountLeadingZerosImpl::doit(v); +} + + + + + + +template struct CountLeadingZerosImpl { + static unsigned doit(T v) { + return __builtin_clz((uint32_t)v & 0xFF) - 24u; + } +}; + +template struct CountLeadingZerosImpl { + static unsigned doit(T v) { + return __builtin_clz((uint32_t)v & 0xFFFF) - 16u; + } +}; + +template struct CountLeadingZerosImpl { + static unsigned doit(T v) { + return __builtin_clz(v); + } +}; + +template struct CountLeadingZerosImpl { + static unsigned doit(T v) { + return __builtin_clzll(v); + } +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/powerOfTwo.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/count_trailing_zeros.hpp" 1 +# 47 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/count_trailing_zeros.hpp" +inline unsigned count_trailing_zeros_32(uint32_t x) { + return __builtin_ctz(x); +} + +inline unsigned count_trailing_zeros_64(uint64_t x) { + return __builtin_ctzll(x); +} +# 110 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/count_trailing_zeros.hpp" +template::value), int> = 0, + std::enable_if_t = 0> +inline unsigned count_trailing_zeros(T x) { + ; + return (sizeof(x) <= sizeof(uint32_t)) ? + count_trailing_zeros_32(static_cast(x)) : + count_trailing_zeros_64(x); +} +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/powerOfTwo.hpp" 2 + + +# 1 "/usr/riscv64-linux-gnu/include/c++/11/limits" 1 3 +# 40 "/usr/riscv64-linux-gnu/include/c++/11/limits" 3 + +# 41 "/usr/riscv64-linux-gnu/include/c++/11/limits" 3 +# 158 "/usr/riscv64-linux-gnu/include/c++/11/limits" 3 + +# 158 "/usr/riscv64-linux-gnu/include/c++/11/limits" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + + + + + enum float_round_style + { + round_indeterminate = -1, + round_toward_zero = 0, + round_to_nearest = 1, + round_toward_infinity = 2, + round_toward_neg_infinity = 3 + }; + + + + + + + + enum float_denorm_style + { + + denorm_indeterminate = -1, + + denorm_absent = 0, + + denorm_present = 1 + }; +# 202 "/usr/riscv64-linux-gnu/include/c++/11/limits" 3 + struct __numeric_limits_base + { + + + static constexpr bool is_specialized = false; + + + + + static constexpr int digits = 0; + + + static constexpr int digits10 = 0; + + + + + static constexpr int max_digits10 = 0; + + + + static constexpr bool is_signed = false; + + + static constexpr bool is_integer = false; + + + + + static constexpr bool is_exact = false; + + + + static constexpr int radix = 0; + + + + static constexpr int min_exponent = 0; + + + + static constexpr int min_exponent10 = 0; + + + + + static constexpr int max_exponent = 0; + + + + static constexpr int max_exponent10 = 0; + + + static constexpr bool has_infinity = false; + + + + static constexpr bool has_quiet_NaN = false; + + + + static constexpr bool has_signaling_NaN = false; + + + static constexpr float_denorm_style has_denorm = denorm_absent; + + + + static constexpr bool has_denorm_loss = false; + + + + static constexpr bool is_iec559 = false; + + + + + static constexpr bool is_bounded = false; +# 288 "/usr/riscv64-linux-gnu/include/c++/11/limits" 3 + static constexpr bool is_modulo = false; + + + static constexpr bool traps = false; + + + static constexpr bool tinyness_before = false; + + + + + static constexpr float_round_style round_style = + round_toward_zero; + }; +# 311 "/usr/riscv64-linux-gnu/include/c++/11/limits" 3 + template + struct numeric_limits : public __numeric_limits_base + { + + + static constexpr _Tp + min() noexcept { return _Tp(); } + + + static constexpr _Tp + max() noexcept { return _Tp(); } + + + + + static constexpr _Tp + lowest() noexcept { return _Tp(); } + + + + + static constexpr _Tp + epsilon() noexcept { return _Tp(); } + + + static constexpr _Tp + round_error() noexcept { return _Tp(); } + + + static constexpr _Tp + infinity() noexcept { return _Tp(); } + + + + static constexpr _Tp + quiet_NaN() noexcept { return _Tp(); } + + + + static constexpr _Tp + signaling_NaN() noexcept { return _Tp(); } + + + + + static constexpr _Tp + denorm_min() noexcept { return _Tp(); } + }; + + + + + template + struct numeric_limits + : public numeric_limits<_Tp> { }; + + template + struct numeric_limits + : public numeric_limits<_Tp> { }; + + template + struct numeric_limits + : public numeric_limits<_Tp> { }; +# 383 "/usr/riscv64-linux-gnu/include/c++/11/limits" 3 + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr bool + min() noexcept { return false; } + + static constexpr bool + max() noexcept { return true; } + + + static constexpr bool + lowest() noexcept { return min(); } + + static constexpr int digits = 1; + static constexpr int digits10 = 0; + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr bool + epsilon() noexcept { return false; } + + static constexpr bool + round_error() noexcept { return false; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr bool + infinity() noexcept { return false; } + + static constexpr bool + quiet_NaN() noexcept { return false; } + + static constexpr bool + signaling_NaN() noexcept { return false; } + + static constexpr bool + denorm_min() noexcept { return false; } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + + + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr char + min() noexcept { return (((char)(-1) < 0) ? -(((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0) - 1 : (char)0); } + + static constexpr char + max() noexcept { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } + + + static constexpr char + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); + static constexpr int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = ((char)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr char + epsilon() noexcept { return 0; } + + static constexpr char + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr + char infinity() noexcept { return char(); } + + static constexpr char + quiet_NaN() noexcept { return char(); } + + static constexpr char + signaling_NaN() noexcept { return char(); } + + static constexpr char + denorm_min() noexcept { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr signed char + min() noexcept { return -0x7f - 1; } + + static constexpr signed char + max() noexcept { return 0x7f; } + + + static constexpr signed char + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr signed char + epsilon() noexcept { return 0; } + + static constexpr signed char + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr signed char + infinity() noexcept { return static_cast(0); } + + static constexpr signed char + quiet_NaN() noexcept { return static_cast(0); } + + static constexpr signed char + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr signed char + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned char + min() noexcept { return 0; } + + static constexpr unsigned char + max() noexcept { return 0x7f * 2U + 1; } + + + static constexpr unsigned char + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned char + epsilon() noexcept { return 0; } + + static constexpr unsigned char + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned char + infinity() noexcept + { return static_cast(0); } + + static constexpr unsigned char + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned char + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned char + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr wchar_t + min() noexcept { return (((wchar_t)(-1) < 0) ? -(((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0) - 1 : (wchar_t)0); } + + static constexpr wchar_t + max() noexcept { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } + + + static constexpr wchar_t + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = ((wchar_t)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr wchar_t + epsilon() noexcept { return 0; } + + static constexpr wchar_t + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr wchar_t + infinity() noexcept { return wchar_t(); } + + static constexpr wchar_t + quiet_NaN() noexcept { return wchar_t(); } + + static constexpr wchar_t + signaling_NaN() noexcept { return wchar_t(); } + + static constexpr wchar_t + denorm_min() noexcept { return wchar_t(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; +# 796 "/usr/riscv64-linux-gnu/include/c++/11/limits" 3 + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr char16_t + min() noexcept { return (((char16_t)(-1) < 0) ? -(((char16_t)(-1) < 0) ? (((((char16_t)1 << ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char16_t)0) - 1 : (char16_t)0); } + + static constexpr char16_t + max() noexcept { return (((char16_t)(-1) < 0) ? (((((char16_t)1 << ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char16_t)0); } + + static constexpr char16_t + lowest() noexcept { return min(); } + + static constexpr int digits = (sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)); + static constexpr int digits10 = ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) * 643L / 2136); + static constexpr int max_digits10 = 0; + static constexpr bool is_signed = ((char16_t)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr char16_t + epsilon() noexcept { return 0; } + + static constexpr char16_t + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr char16_t + infinity() noexcept { return char16_t(); } + + static constexpr char16_t + quiet_NaN() noexcept { return char16_t(); } + + static constexpr char16_t + signaling_NaN() noexcept { return char16_t(); } + + static constexpr char16_t + denorm_min() noexcept { return char16_t(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr char32_t + min() noexcept { return (((char32_t)(-1) < 0) ? -(((char32_t)(-1) < 0) ? (((((char32_t)1 << ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char32_t)0) - 1 : (char32_t)0); } + + static constexpr char32_t + max() noexcept { return (((char32_t)(-1) < 0) ? (((((char32_t)1 << ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char32_t)0); } + + static constexpr char32_t + lowest() noexcept { return min(); } + + static constexpr int digits = (sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)); + static constexpr int digits10 = ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) * 643L / 2136); + static constexpr int max_digits10 = 0; + static constexpr bool is_signed = ((char32_t)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr char32_t + epsilon() noexcept { return 0; } + + static constexpr char32_t + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr char32_t + infinity() noexcept { return char32_t(); } + + static constexpr char32_t + quiet_NaN() noexcept { return char32_t(); } + + static constexpr char32_t + signaling_NaN() noexcept { return char32_t(); } + + static constexpr char32_t + denorm_min() noexcept { return char32_t(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style = round_toward_zero; + }; + + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr short + min() noexcept { return -0x7fff - 1; } + + static constexpr short + max() noexcept { return 0x7fff; } + + + static constexpr short + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); + static constexpr int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr short + epsilon() noexcept { return 0; } + + static constexpr short + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr short + infinity() noexcept { return short(); } + + static constexpr short + quiet_NaN() noexcept { return short(); } + + static constexpr short + signaling_NaN() noexcept { return short(); } + + static constexpr short + denorm_min() noexcept { return short(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned short + min() noexcept { return 0; } + + static constexpr unsigned short + max() noexcept { return 0x7fff * 2U + 1; } + + + static constexpr unsigned short + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned short + epsilon() noexcept { return 0; } + + static constexpr unsigned short + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned short + infinity() noexcept + { return static_cast(0); } + + static constexpr unsigned short + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned short + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned short + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr int + min() noexcept { return -0x7fffffff - 1; } + + static constexpr int + max() noexcept { return 0x7fffffff; } + + + static constexpr int + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); + static constexpr int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr int + epsilon() noexcept { return 0; } + + static constexpr int + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr int + infinity() noexcept { return static_cast(0); } + + static constexpr int + quiet_NaN() noexcept { return static_cast(0); } + + static constexpr int + signaling_NaN() noexcept { return static_cast(0); } + + static constexpr int + denorm_min() noexcept { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned int + min() noexcept { return 0; } + + static constexpr unsigned int + max() noexcept { return 0x7fffffff * 2U + 1; } + + + static constexpr unsigned int + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned int + epsilon() noexcept { return 0; } + + static constexpr unsigned int + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned int + infinity() noexcept { return static_cast(0); } + + static constexpr unsigned int + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned int + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned int + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr long + min() noexcept { return -0x7fffffffffffffffL - 1; } + + static constexpr long + max() noexcept { return 0x7fffffffffffffffL; } + + + static constexpr long + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); + static constexpr int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr long + epsilon() noexcept { return 0; } + + static constexpr long + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr long + infinity() noexcept { return static_cast(0); } + + static constexpr long + quiet_NaN() noexcept { return static_cast(0); } + + static constexpr long + signaling_NaN() noexcept { return static_cast(0); } + + static constexpr long + denorm_min() noexcept { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned long + min() noexcept { return 0; } + + static constexpr unsigned long + max() noexcept { return 0x7fffffffffffffffL * 2UL + 1; } + + + static constexpr unsigned long + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned long + epsilon() noexcept { return 0; } + + static constexpr unsigned long + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned long + infinity() noexcept + { return static_cast(0); } + + static constexpr unsigned long + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned long + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned long + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr long long + min() noexcept { return -0x7fffffffffffffffLL - 1; } + + static constexpr long long + max() noexcept { return 0x7fffffffffffffffLL; } + + + static constexpr long long + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(long long) * 8 - ((long long)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr long long + epsilon() noexcept { return 0; } + + static constexpr long long + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr long long + infinity() noexcept { return static_cast(0); } + + static constexpr long long + quiet_NaN() noexcept { return static_cast(0); } + + static constexpr long long + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr long long + denorm_min() noexcept { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned long long + min() noexcept { return 0; } + + static constexpr unsigned long long + max() noexcept { return 0x7fffffffffffffffLL * 2ULL + 1; } + + + static constexpr unsigned long long + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned long long + epsilon() noexcept { return 0; } + + static constexpr unsigned long long + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned long long + infinity() noexcept + { return static_cast(0); } + + static constexpr unsigned long long + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned long long + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned long long + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; +# 1656 "/usr/riscv64-linux-gnu/include/c++/11/limits" 3 + template<> struct numeric_limits<__int128> { static constexpr bool is_specialized = true; static constexpr __int128 min() noexcept { return (((__int128)(-1) < 0) ? -(((__int128)(-1) < 0) ? (((((__int128)1 << ((128 - ((__int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(__int128)0) - 1 : (__int128)0); } static constexpr __int128 max() noexcept { return (((__int128)(-1) < 0) ? (((((__int128)1 << ((128 - ((__int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(__int128)0); } static constexpr int digits = 128 - 1; static constexpr int digits10 = (128 - 1) * 643L / 2136; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr __int128 epsilon() noexcept { return 0; } static constexpr __int128 round_error() noexcept { return 0; } static constexpr __int128 lowest() noexcept { return min(); } static constexpr int max_digits10 = 0; static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr __int128 infinity() noexcept { return static_cast<__int128>(0); } static constexpr __int128 quiet_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 signaling_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 denorm_min() noexcept { return static_cast<__int128>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr unsigned __int128 min() noexcept { return 0; } static constexpr unsigned __int128 max() noexcept { return (((unsigned __int128)(-1) < 0) ? (((((unsigned __int128)1 << ((128 - ((unsigned __int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(unsigned __int128)0); } static constexpr unsigned __int128 lowest() noexcept { return min(); } static constexpr int max_digits10 = 0; static constexpr int digits = 128; static constexpr int digits10 = 128 * 643L / 2136; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned __int128 epsilon() noexcept { return 0; } static constexpr unsigned __int128 round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned __int128 infinity() noexcept { return static_cast(0); } static constexpr unsigned __int128 quiet_NaN() noexcept { return static_cast(0); } static constexpr unsigned __int128 signaling_NaN() noexcept { return static_cast(0); } static constexpr unsigned __int128 denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; +# 1667 "/usr/riscv64-linux-gnu/include/c++/11/limits" 3 + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr float + min() noexcept { return 1.17549435082228750796873653722224568e-38F; } + + static constexpr float + max() noexcept { return 3.40282346638528859811704183484516925e+38F; } + + + static constexpr float + lowest() noexcept { return -3.40282346638528859811704183484516925e+38F; } + + + static constexpr int digits = 24; + static constexpr int digits10 = 6; + + static constexpr int max_digits10 + = (2 + (24) * 643L / 2136); + + static constexpr bool is_signed = true; + static constexpr bool is_integer = false; + static constexpr bool is_exact = false; + static constexpr int radix = 2; + + static constexpr float + epsilon() noexcept { return 1.19209289550781250000000000000000000e-7F; } + + static constexpr float + round_error() noexcept { return 0.5F; } + + static constexpr int min_exponent = (-125); + static constexpr int min_exponent10 = (-37); + static constexpr int max_exponent = 128; + static constexpr int max_exponent10 = 38; + + static constexpr bool has_infinity = 1; + static constexpr bool has_quiet_NaN = 1; + static constexpr bool has_signaling_NaN = has_quiet_NaN; + static constexpr float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static constexpr bool has_denorm_loss + = false; + + static constexpr float + infinity() noexcept { return __builtin_huge_valf(); } + + static constexpr float + quiet_NaN() noexcept { return __builtin_nanf(""); } + + static constexpr float + signaling_NaN() noexcept { return __builtin_nansf(""); } + + static constexpr float + denorm_min() noexcept { return 1.40129846432481707092372958328991613e-45F; } + + static constexpr bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = false; + static constexpr bool tinyness_before + = false; + static constexpr float_round_style round_style + = round_to_nearest; + }; + + + + + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr double + min() noexcept { return double(2.22507385850720138309023271733240406e-308L); } + + static constexpr double + max() noexcept { return double(1.79769313486231570814527423731704357e+308L); } + + + static constexpr double + lowest() noexcept { return -double(1.79769313486231570814527423731704357e+308L); } + + + static constexpr int digits = 53; + static constexpr int digits10 = 15; + + static constexpr int max_digits10 + = (2 + (53) * 643L / 2136); + + static constexpr bool is_signed = true; + static constexpr bool is_integer = false; + static constexpr bool is_exact = false; + static constexpr int radix = 2; + + static constexpr double + epsilon() noexcept { return double(2.22044604925031308084726333618164062e-16L); } + + static constexpr double + round_error() noexcept { return 0.5; } + + static constexpr int min_exponent = (-1021); + static constexpr int min_exponent10 = (-307); + static constexpr int max_exponent = 1024; + static constexpr int max_exponent10 = 308; + + static constexpr bool has_infinity = 1; + static constexpr bool has_quiet_NaN = 1; + static constexpr bool has_signaling_NaN = has_quiet_NaN; + static constexpr float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static constexpr bool has_denorm_loss + = false; + + static constexpr double + infinity() noexcept { return __builtin_huge_val(); } + + static constexpr double + quiet_NaN() noexcept { return __builtin_nan(""); } + + static constexpr double + signaling_NaN() noexcept { return __builtin_nans(""); } + + static constexpr double + denorm_min() noexcept { return double(4.94065645841246544176568792868221372e-324L); } + + static constexpr bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = false; + static constexpr bool tinyness_before + = false; + static constexpr float_round_style round_style + = round_to_nearest; + }; + + + + + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr long double + min() noexcept { return 3.36210314311209350626267781732175260e-4932L; } + + static constexpr long double + max() noexcept { return 1.18973149535723176508575932662800702e+4932L; } + + + static constexpr long double + lowest() noexcept { return -1.18973149535723176508575932662800702e+4932L; } + + + static constexpr int digits = 113; + static constexpr int digits10 = 33; + + static constexpr int max_digits10 + = (2 + (113) * 643L / 2136); + + static constexpr bool is_signed = true; + static constexpr bool is_integer = false; + static constexpr bool is_exact = false; + static constexpr int radix = 2; + + static constexpr long double + epsilon() noexcept { return 1.92592994438723585305597794258492732e-34L; } + + static constexpr long double + round_error() noexcept { return 0.5L; } + + static constexpr int min_exponent = (-16381); + static constexpr int min_exponent10 = (-4931); + static constexpr int max_exponent = 16384; + static constexpr int max_exponent10 = 4932; + + static constexpr bool has_infinity = 1; + static constexpr bool has_quiet_NaN = 1; + static constexpr bool has_signaling_NaN = has_quiet_NaN; + static constexpr float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static constexpr bool has_denorm_loss + = false; + + static constexpr long double + infinity() noexcept { return __builtin_huge_vall(); } + + static constexpr long double + quiet_NaN() noexcept { return __builtin_nanl(""); } + + static constexpr long double + signaling_NaN() noexcept { return __builtin_nansl(""); } + + static constexpr long double + denorm_min() noexcept { return 6.47517511943802511092443895822764655e-4966L; } + + static constexpr bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = false; + static constexpr bool tinyness_before = + false; + static constexpr float_round_style round_style = + round_to_nearest; + }; + + + + + + +} +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/powerOfTwo.hpp" 2 + + + + + +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/powerOfTwo.hpp" +template ::value), int> = 0> +constexpr T max_power_of_2() { + T max_val = std::numeric_limits::max(); + return max_val - (max_val >> 1); +} + + +template ::value), int> = 0> +constexpr bool is_power_of_2(T value) { + return (value > T(0)) && ((value & (value - 1)) == T(0)); +} + + + +template::value), int> = 0> +inline int log2i(T value) { + ; + const int bits = sizeof(value) * BitsPerByte; + return bits - count_leading_zeros(value) - 1; +} + + + + + +template::value), int> = 0> +inline int log2i_graceful(T value) { + if (value == 0) { + return -1; + } + const int bits = sizeof(value) * BitsPerByte; + return bits - count_leading_zeros(value) - 1; +} + + + +template::value), int> = 0> +inline int log2i_exact(T value) { + + + ; + return count_trailing_zeros(value); +} + + +inline int exact_log2(intptr_t value) { + return log2i_exact((uintptr_t)value); +} + + +inline int exact_log2_long(jlong value) { + return log2i_exact((julong)value); +} + + + +template::value), int> = 0> +inline T round_down_power_of_2(T value) { + ; + return T(1) << log2i(value); +} + + + + +template::value), int> = 0> +inline T round_up_power_of_2(T value) { + ; + + ; + if (is_power_of_2(value)) { + return value; + } + return T(1) << (log2i(value) + 1); +} + + + + +template ::value), int> = 0> +inline T next_power_of_2(T value) { + ; + return T(round_up_power_of_2(value + 1)); +} + + +template ::value), int> = 0> +inline T ceil_log2(T value) { + T ret; + for (ret = 1; ((T)1 << ret) < value; ++ret); + return ret; +} + + + + + +template::value), int> = 0> +inline T submultiple_power_of_2(T value) { + ; + return value & -value; +} +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/align.hpp" 2 + + + + + +template::value), int> = 0> +static constexpr T alignment_mask(T alignment) { + + ; + return alignment - 1; +} + + +template::value), int> = 0> +static constexpr auto alignment_mask(T alignment) { + return alignment_mask(static_cast>(alignment)); +} + + + + + + + +template::value), int> = 0> +constexpr bool is_aligned(T size, A alignment) { + return (size & alignment_mask(alignment)) == 0; +} + +template::value), int> = 0> +constexpr T align_down(T size, A alignment) { + + + + T result = T(size & ~T(alignment_mask(alignment))); + + ; + return result; +} + +template::value), int> = 0> +constexpr T align_up(T size, A alignment) { + T adjusted = checked_cast(size + alignment_mask(alignment)); + return align_down(adjusted, alignment); +} + + +template +constexpr T align_down_bounded(T size, A alignment) { + T aligned_size = align_down(size, alignment); + return (aligned_size > 0) ? aligned_size : T(alignment); +} + + + +template +inline T* align_up(T* ptr, A alignment) { + return (T*)align_up((uintptr_t)ptr, alignment); +} + +template +inline T* align_down(T* ptr, A alignment) { + return (T*)align_down((uintptr_t)ptr, alignment); +} + +template +inline bool is_aligned(T* ptr, A alignment) { + return is_aligned((uintptr_t)ptr, alignment); +} + + +template +inline T align_metadata_size(T size) { + return align_up(size, 1); +} + + +template +inline T align_object_size(T word_size) { + return align_up(word_size, MinObjAlignment); +} + +inline bool is_object_aligned(size_t word_size) { + return is_aligned(word_size, MinObjAlignment); +} + +inline bool is_object_aligned(const void* addr) { + return is_aligned(addr, MinObjAlignmentInBytes); +} + + +template +constexpr T align_object_offset(T offset) { + return align_up(offset, HeapWordsPerLong); +} + + + + + +template +inline T* clamp_address_in_page(T* addr, T* page_address, size_t page_size) { + if (align_down(addr, page_size) == align_down(page_address, page_size)) { + + return addr; + } else if (addr > page_address) { + + return align_down(page_address, page_size) + page_size; + } else { + + return align_down(page_address, page_size); + } +} +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals_shared.hpp" 2 + + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/float.h" 1 3 4 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals_shared.hpp" 2 +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compiler_globals_pd.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/c1/c1_globals_pd.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/c1/c1_globals_pd.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/c1_globals_riscv.hpp" 1 +# 59 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/c1_globals_riscv.hpp" +const bool pd_UseTypeProfile = false;; + +const bool pd_OptimizeSinglePrecision = true;; +const bool pd_CSEArrayLength = false;; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/c1/c1_globals_pd.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/os/linux/c1_globals_linux.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/c1/c1_globals_pd.hpp" 2 +# 37 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compiler_globals_pd.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/opto/c2_globals_pd.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/opto/c2_globals_pd.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/c2_globals_riscv.hpp" 1 +# 35 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/c2_globals_riscv.hpp" +const bool pd_BackgroundCompilation = true;; +const bool pd_CICompileOSR = true;; +const bool pd_InlineIntrinsics = true;; +const bool pd_PreferInterpreterNativeStubs = false;; +const bool pd_ProfileTraps = true;; +const bool pd_UseOnStackReplacement = true;; +const bool pd_ProfileInterpreter = true;; +const bool pd_TieredCompilation = true ;; +const intx pd_CompileThreshold = 10000;; + +const intx pd_OnStackReplacePercentage = 140;; +const intx pd_ConditionalMoveLimit = 0;; +const intx pd_FreqInlineSize = 325;; +const intx pd_MinJumpTableSize = 10;; +const intx pd_InteriorEntryAlignment = 16;; +const intx pd_NewSizeThreadIncrease = align_down((4*K) * 13 / 10, HeapWordSize);; +const intx pd_LoopUnrollLimit = 60;; +const intx pd_LoopPercentProfileLimit = 10;; + +const intx pd_InitialCodeCacheSize = 2496*K;; +const intx pd_CodeCacheExpansionSize = 64*K;; + + +const uint64_t pd_MaxRAM = 128ULL*G;; +const intx pd_RegisterCostAreaRatio = 16000;; + + + +const bool pd_OptoPeephole = false;; +const bool pd_UseCISCSpill = false;; +const bool pd_OptoScheduling = true;; +const bool pd_OptoBundling = false;; +const bool pd_OptoRegScheduling = false;; +const bool pd_SuperWordLoopUnrollAnalysis = true;; +const bool pd_IdealizeClearArrayNode = true;; + +const intx pd_ReservedCodeCacheSize = 48*M;; +const intx pd_NonProfiledCodeHeapSize = 21*M;; +const intx pd_ProfiledCodeHeapSize = 22*M;; +const intx pd_NonNMethodCodeHeapSize = 5*M;; +const uintx pd_CodeCacheMinBlockLength = 6;; +const uintx pd_CodeCacheMinimumUseSpace = 400*K;; + + +const bool pd_NeverActAsServerClassMachine = false;; + +const bool pd_TrapBasedRangeChecks = false;; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/opto/c2_globals_pd.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/os/linux/c2_globals_linux.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/opto/c2_globals_pd.hpp" 2 +# 40 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compiler_globals_pd.hpp" 2 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals.hpp" 2 + + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/globals_riscv.hpp" 1 +# 35 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/globals_riscv.hpp" +const bool pd_ImplicitNullChecks = true;; +const bool pd_TrapBasedNullChecks = false;; +const bool pd_UncommonNullCast = true;; + +const bool pd_DelayCompilerStubsGeneration = 1;; + +const uintx pd_CodeCacheSegmentSize = 64 +64;; +const intx pd_CodeEntryAlignment = 64;; +const intx pd_OptoLoopAlignment = 16;; +# 58 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/globals_riscv.hpp" +const intx pd_StackYellowPages = (2);; +const intx pd_StackRedPages = (1);; +const intx pd_StackShadowPages = (20 );; +const intx pd_StackReservedPages = (1);; + +const bool pd_VMContinuations = true;; + +const bool pd_RewriteBytecodes = true;; +const bool pd_RewriteFrequentPairs = true;; + +const bool pd_PreserveFramePointer = false;; + +const uintx pd_TypeProfileLevel = 111;; + +const bool pd_CompactStrings = true;; + + +const intx pd_InitArrayShortSize = BytesPerLong;; + +const intx pd_InlineSmallCode = 1000;; +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/os/linux/globals_linux.hpp" 1 +# 109 "/home/rehn/source/jdk/open/src/hotspot/os/linux/globals_linux.hpp" +const size_t pd_PreTouchParallelChunkSize = 4 * M;; +const bool pd_UseLargePages = false;; +const bool pd_UseLargePagesIndividualAllocation = false;; +const bool pd_UseThreadPriorities = true; ; +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/os_cpu/linux_riscv/globals_linux_riscv.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/os_cpu/linux_riscv/globals_linux_riscv.hpp" +const bool pd_DontYieldALot = false;; +const intx pd_ThreadStackSize = 2048;; +const intx pd_VMThreadStackSize = 2048;; + +const intx pd_CompilerThreadStackSize = 2048;; + +const uintx pd_JVMInvokeMethodSlack = 8192;; + + +const uintx pd_HeapBaseMinAddress = 2 * G;; +# 36 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals.hpp" 2 +# 111 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals.hpp" +const size_t defaultStringTableSize = 65536; +const size_t minimumStringTableSize = 128; +const size_t defaultSymbolTableSize = 32768; +const size_t minimumSymbolTableSize = 1024; +# 2005 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals.hpp" +extern "C" bool UseCompressedOops; extern "C" bool UseCompressedClassPointers; extern "C" int ObjectAlignmentInBytes; +extern "C" bool NearCpool; extern "C" bool UseBlockZeroing; extern "C" intx BlockZeroingLowLimit; extern "C" intx CacheLineSize; extern "C" bool TraceTraps; extern "C" bool UseConservativeFence; extern "C" bool AvoidUnalignedAccesses; extern "C" bool UseRVA20U64; extern "C" bool UseRVC; extern "C" bool UseRVA22U64; extern "C" bool UseRVV; extern "C" bool UseZba; extern "C" bool UseZbb; extern "C" bool UseZbs; extern "C" bool UseZic64b; extern "C" bool UseZicbom; extern "C" bool UseZicbop; extern "C" bool UseZicboz; extern "C" bool UseZtso; extern "C" bool UseZihintpause; extern "C" bool UseRVVForBigIntegerShiftIntrinsics; +const bool CheckCompressedOops = true; extern "C" uintx HeapSearchSteps; extern "C" uint HandshakeTimeout; extern "C" bool AlwaysSafeConstructors; extern "C" bool UnlockDiagnosticVMOptions; extern "C" bool UnlockExperimentalVMOptions; extern "C" bool JavaMonitorsInStackTrace; extern "C" bool UseLargePages; extern "C" bool UseLargePagesIndividualAllocation; const bool LargePagesIndividualAllocationInjectError = false; extern "C" bool UseNUMA; extern "C" bool UseNUMAInterleaving; extern "C" size_t NUMAInterleaveGranularity; extern "C" uintx NUMAChunkResizeWeight; extern "C" size_t NUMASpaceResizeRate; extern "C" bool UseAdaptiveNUMAChunkSizing; extern "C" bool NUMAStats; extern "C" uintx NUMAPageScanRate; extern "C" bool UseAES; extern "C" bool UseFMA; extern "C" bool UseSHA; extern "C" bool UseGHASHIntrinsics; extern "C" bool UseBASE64Intrinsics; extern "C" bool UsePoly1305Intrinsics; extern "C" size_t LargePageSizeInBytes; extern "C" size_t LargePageHeapSizeThreshold; extern "C" bool ForceTimeHighResolution; const bool TracePcPatching = false; const bool TraceRelocator = false; extern "C" bool SafepointALot; extern "C" bool HandshakeALot; extern "C" bool BackgroundCompilation; extern "C" bool MethodFlushing; const bool VerifyStack = false; extern "C" bool ForceUnreachable; const bool TraceDerivedPointers = false; const bool TraceCodeBlobStacks = false; const bool PrintRewrites = false; extern "C" bool UseInlineCaches; extern "C" bool InlineArrayCopy; extern "C" bool InlineObjectHash; extern "C" bool InlineNatives; extern "C" bool InlineMathNatives; extern "C" bool InlineClassNatives; extern "C" bool InlineThreadNatives; extern "C" bool InlineUnsafeOps; extern "C" bool UseAESIntrinsics; extern "C" bool UseAESCTRIntrinsics; extern "C" bool UseChaCha20Intrinsics; extern "C" bool UseMD5Intrinsics; extern "C" bool UseSHA1Intrinsics; extern "C" bool UseSHA256Intrinsics; extern "C" bool UseSHA512Intrinsics; extern "C" bool UseSHA3Intrinsics; extern "C" bool UseCRC32Intrinsics; extern "C" bool UseCRC32CIntrinsics; extern "C" bool UseAdler32Intrinsics; extern "C" bool UseVectorizedMismatchIntrinsic; extern "C" bool UseVectorizedHashCodeIntrinsic; extern "C" bool UseCopySignIntrinsic; extern "C" bool UseSignumIntrinsic; extern "C" bool DelayCompilerStubsGeneration; extern "C" ccstrlist DisableIntrinsic; extern "C" ccstrlist ControlIntrinsic; const bool TraceCallFixup = false; const bool DeoptimizeALot = false; const ccstrlist DeoptimizeOnlyAt = ""; const bool DeoptimizeRandom = false; const bool ZombieALot = false; const bool WalkStackALot = false; const bool DeoptimizeObjectsALot = false; const uint64_t DeoptimizeObjectsALotInterval = 5; const int DeoptimizeObjectsALotThreadCountSingle = 1; const int DeoptimizeObjectsALotThreadCountAll = 1; const bool VerifyLastFrame = false; extern "C" bool SafepointTimeout; extern "C" bool AbortVMOnSafepointTimeout; extern "C" uint64_t AbortVMOnSafepointTimeoutDelay; extern "C" bool AbortVMOnVMOperationTimeout; extern "C" intx AbortVMOnVMOperationTimeoutDelay; extern "C" bool MaxFDLimit; extern "C" bool LogEvents; extern "C" int LogEventsBufferEntries; extern "C" bool BytecodeVerificationRemote; extern "C" bool BytecodeVerificationLocal; const bool VerifyStackAtCalls = false; const bool TraceJavaAssertions = false; const bool VerifyCodeCache = false; const bool ZapResourceArea = false; const bool ZapVMHandleArea = false; const bool ZapStackSegments = false; const bool ZapUnusedHeapArea = false; const bool CheckZapUnusedHeapArea = false; const bool ZapFillerObjects = false; extern "C" bool ExecutingUnitTests; const uint ErrorHandlerTest = 0; const uint TestCrashInErrorHandler = 0; const bool TestSafeFetchInErrorHandler = false; const bool TestUnresponsiveErrorHandler = false; const bool Verbose = false; const bool PrintMiscellaneous = false; const bool WizardMode = false; extern "C" bool ShowMessageBoxOnError; extern "C" bool CreateCoredumpOnCrash; extern "C" uint64_t ErrorLogTimeout; extern "C" bool ErrorLogSecondaryErrorDetails; const intx TraceDwarfLevel = 0; extern "C" bool SuppressFatalErrorMessage; extern "C" ccstrlist OnError; extern "C" ccstrlist OnOutOfMemoryError; extern "C" bool HeapDumpBeforeFullGC; extern "C" bool HeapDumpAfterFullGC; extern "C" bool HeapDumpOnOutOfMemoryError; extern "C" ccstr HeapDumpPath; extern "C" int HeapDumpGzipLevel; extern "C" ccstr NativeMemoryTracking; extern "C" bool PrintNMTStatistics; extern "C" bool LogCompilation; extern "C" bool PrintCompilation; extern "C" intx RepeatCompilation; extern "C" bool PrintExtendedThreadInfo; extern "C" intx ScavengeRootsInCode; extern "C" bool AlwaysRestoreFPU; extern "C" bool PrintCompilation2; extern "C" bool PrintAdapterHandlers; extern "C" bool VerifyAdapterCalls; const bool VerifyAdapterSharing = false; extern "C" bool PrintAssembly; extern "C" ccstr PrintAssemblyOptions; const bool PrintNMethodStatistics = false; extern "C" bool PrintNMethods; extern "C" bool PrintNativeNMethods; const bool PrintDebugInfo = false; const bool PrintRelocations = false; const bool PrintDependencies = false; const bool PrintExceptionHandlers = false; const bool StressCompiledExceptionHandlers = false; const bool InterceptOSException = false; extern "C" bool PrintCodeCache; const bool PrintCodeCache2 = false; extern "C" bool PrintCodeCacheOnCompilation; extern "C" bool PrintCodeHeapAnalytics; extern "C" bool PrintStubCode; extern "C" bool StackTraceInThrowable; extern "C" bool OmitStackTraceInFastThrow; extern "C" bool ShowCodeDetailsInExceptionMessages; extern "C" bool PrintWarnings; extern "C" bool RegisterFinalizersAtInit; const bool RegisterReferences = true; const bool PrintCodeCacheExtension = false; const bool UsePrivilegedStack = true; extern "C" bool ClassUnloading; extern "C" bool ClassUnloadingWithConcurrentMark; const bool PrintSystemDictionaryAtExit = false; const bool PrintClassLoaderDataGraphAtExit = false; extern "C" bool AllowParallelDefineClass; extern "C" bool DontYieldALot; extern "C" bool DisablePrimordialThreadGuardPages; extern "C" bool DoJVMTIVirtualThreadTransitions; extern "C" intx AsyncDeflationInterval; extern "C" intx GuaranteedAsyncDeflationInterval; extern "C" size_t AvgMonitorsPerThreadEstimate; extern "C" intx MonitorDeflationMax; extern "C" int MonitorUsedDeflationThreshold; extern "C" uintx NoAsyncDeflationProgressMax; extern "C" intx hashCode; extern "C" bool ReduceSignalUsage; const bool LoadLineNumberTables = true; const bool LoadLocalVariableTables = true; const bool LoadLocalVariableTypeTables = true; extern "C" bool AllowUserSignalHandlers; extern "C" bool UseSignalChaining; extern "C" bool RestoreMXCSROnJNICalls; extern "C" bool CheckJNICalls; extern "C" bool UseFastJNIAccessors; extern "C" intx MaxJNILocalCapacity; extern "C" bool EagerXrunInit; extern "C" bool PreserveAllAnnotations; const uintx PreallocatedOutOfMemoryErrorCount = 4; extern "C" bool UseXMMForArrayCopy; const bool PrintFieldLayout = false; extern "C" int ContendedPaddingWidth; extern "C" bool EnableContended; extern "C" bool RestrictContended; extern "C" int DiagnoseSyncOnValueBasedClasses; extern "C" bool ExitOnOutOfMemoryError; extern "C" bool CrashOnOutOfMemoryError; const bool StressRewriter = false; extern "C" ccstr TraceJVMTI; extern "C" bool StressLdcRewrite; extern "C" bool AllowRedefinitionToAddDeleteMethods; const bool TraceBytecodes = false; const bool TraceICs = false; const bool TraceInvocationCounterOverflow = false; const bool TraceInlineCacheClearing = false; const bool VerifyDependencies = false; const bool TraceNewOopMapGeneration = false; const bool TraceNewOopMapGenerationDetailed = false; const bool TimeOopMap = false; const bool TimeOopMap2 = false; const bool TraceOopMapRewrites = false; const bool TraceICBuffer = false; const bool TraceCompiledIC = false; const bool FLSVerifyDictionary = false; extern "C" uintx ProcessDistributionStride; const bool TraceFinalizerRegistration = false; extern "C" bool IgnoreEmptyClassPaths; extern "C" bool PrintHeapAtSIGBREAK; extern "C" bool PrintClassHistogram; extern "C" double ObjectCountCutOffPercent; extern "C" bool VerifyBeforeIteration; extern "C" intx CICompilerCount; extern "C" bool UseDynamicNumberOfCompilerThreads; extern "C" bool ReduceNumberOfCompilerThreads; extern "C" bool TraceCompilerThreads; extern "C" ccstr LogClassLoadingCauseFor; const bool InjectCompilerCreationFailure = false; const bool GenerateSynchronizationCode = true; extern "C" bool ImplicitNullChecks; extern "C" bool TrapBasedNullChecks; extern "C" bool EnableThreadSMRStatistics; extern "C" bool UseNotificationThread; extern "C" bool Inline; extern "C" bool ClipInlining; const bool UseCHA = true; extern "C" bool UseVtableBasedCHA; extern "C" bool UseTypeProfile; extern "C" bool PrintInlining; extern "C" bool UsePopCountInstruction; const bool TraceMethodReplacement = false; extern "C" bool PrintMethodFlushingStatistics; extern "C" intx MinPassesBeforeFlush; const bool StressCodeBuffers = false; extern "C" bool DebugNonSafepoints; extern "C" bool PrintVMOptions; extern "C" bool IgnoreUnrecognizedVMOptions; extern "C" bool PrintCommandLineFlags; extern "C" bool PrintFlagsInitial; extern "C" bool PrintFlagsFinal; const bool PrintFlagsWithComments = false; extern "C" bool PrintFlagsRanges; extern "C" bool SerializeVMOutput; extern "C" bool DisplayVMOutput; extern "C" bool LogVMOutput; extern "C" ccstr LogFile; extern "C" ccstr ErrorFile; extern "C" bool ExtensiveErrorReports; extern "C" bool DisplayVMOutputToStderr; extern "C" bool DisplayVMOutputToStdout; extern "C" bool ErrorFileToStderr; extern "C" bool ErrorFileToStdout; const bool UseHeavyMonitors = false; const bool VerifyHeavyMonitors = false; extern "C" bool PrintStringTableStatistics; extern "C" bool VerifyStringTableAtExit; const bool PrintSymbolTableSizeHistogram = false; extern "C" ccstr AbortVMOnException; extern "C" ccstr AbortVMOnExceptionMessage; const bool DebugVtables = false; extern "C" bool RangeCheckElimination; const bool UncommonNullCast = pd_UncommonNullCast; const bool TypeProfileCasts = true; const bool TraceLivenessGen = false; const bool TraceLivenessQuery = false; const bool CollectIndexSetStatistics = false; const int FastAllocateSizeLimit = 128*K; extern "C" bool CompactStrings; extern "C" uint TypeProfileLevel; extern "C" int TypeProfileArgsLimit; extern "C" int TypeProfileParmsLimit; const bool CountCompiledCalls = false; const bool ICMissHistogram = false; extern "C" bool RewriteBytecodes; extern "C" bool RewriteFrequentPairs; extern "C" bool PrintInterpreter; extern "C" bool UseInterpreter; const bool UseFastSignatureHandlers = true; extern "C" bool UseLoopCounter; extern "C" bool UseOnStackReplacement; const bool TraceOnStackReplacement = false; extern "C" bool PreferInterpreterNativeStubs; const bool CountBytecodes = false; const bool PrintBytecodeHistogram = false; const bool PrintBytecodePairHistogram = false; extern "C" bool PrintSignatureHandlers; const bool VerifyOops = false; const bool CheckUnhandledOops = false; const bool VerifyJNIFields = false; const bool VerifyFPU = false; const bool VerifyActivationFrameSize = false; const bool TraceFrequencyInlining = false; const bool InlineIntrinsics = pd_InlineIntrinsics; extern "C" bool ProfileInterpreter; const bool ProfileTraps = pd_ProfileTraps; extern "C" intx ProfileMaturityPercentage; extern "C" bool PrintMethodData; const bool VerifyDataPointer = false; const bool CrashGCForDumpingJavaThread = false; extern "C" bool UseCompiler; extern "C" bool UseCounterDecay; const intx CounterHalfLifeTime = 30; const intx CounterDecayMinIntervalLength = 500; extern "C" bool AlwaysCompileLoopMethods; extern "C" int AllocatePrefetchStyle; extern "C" int AllocatePrefetchDistance; extern "C" int AllocatePrefetchLines; extern "C" int AllocateInstancePrefetchLines; extern "C" int AllocatePrefetchStepSize; extern "C" intx AllocatePrefetchInstr; extern "C" bool TraceDeoptimization; const bool PrintDeoptimizationDetails = false; const bool DebugDeoptimization = false; extern "C" double SelfDestructTimer; extern "C" int MaxJavaStackTraceDepth; extern "C" intx GuaranteedSafepointInterval; extern "C" double SafepointTimeoutDelay; extern "C" bool UseSystemMemoryBarrier; extern "C" intx NmethodSweepActivity; const intx MallocCatchPtr = -1; const int StackPrintLimit = 100; extern "C" int ErrorLogPrintCodeLimit; const int MaxElementPrintSize = 256; const intx MaxSubklassPrintSize = 4; const intx MaxForceInlineLevel = 100; const intx MethodHistogramCutoff = 100; const intx DontYieldALotInterval = 10; const intx DeoptimizeALotInterval = 5; const intx ZombieALotInterval = 5; extern "C" ccstr MallocLimit; extern "C" intx TypeProfileWidth; const intx BciProfileWidth = 2; extern "C" intx PerMethodRecompilationCutoff; extern "C" intx PerBytecodeRecompilationCutoff; extern "C" intx PerMethodTrapLimit; extern "C" intx PerMethodSpecTrapLimit; extern "C" intx PerBytecodeTrapLimit; extern "C" int SpecTrapLimitExtraEntries; extern "C" double InlineFrequencyRatio; extern "C" double MinInlineFrequencyRatio; const intx InlineThrowCount = 50; const intx InlineThrowMaxSize = 200; extern "C" size_t MetaspaceSize; extern "C" size_t MaxMetaspaceSize; extern "C" size_t CompressedClassSpaceSize; const size_t CompressedClassSpaceBaseAddress = 0; const bool RandomizeClassSpaceLocation = true; extern "C" bool PrintMetaspaceStatisticsAtExit; const bool MetaspaceGuardAllocations = false; extern "C" uintx MinHeapFreeRatio; extern "C" uintx MaxHeapFreeRatio; extern "C" bool ShrinkHeapInSteps; extern "C" intx SoftRefLRUPolicyMSPerMB; extern "C" size_t MinHeapDeltaBytes; extern "C" size_t MinMetaspaceExpansion; extern "C" uint MaxMetaspaceFreeRatio; extern "C" uint MinMetaspaceFreeRatio; extern "C" size_t MaxMetaspaceExpansion; extern "C" intx StackYellowPages; extern "C" intx StackRedPages; extern "C" intx StackReservedPages; extern "C" bool RestrictReservedStack; extern "C" intx StackShadowPages; extern "C" intx ThreadStackSize; extern "C" intx VMThreadStackSize; extern "C" intx CompilerThreadStackSize; const size_t JVMInvokeMethodSlack = pd_JVMInvokeMethodSlack; extern "C" uintx CodeCacheSegmentSize; extern "C" intx CodeEntryAlignment; extern "C" intx OptoLoopAlignment; extern "C" uintx InitialCodeCacheSize; const uintx CodeCacheMinimumUseSpace = pd_CodeCacheMinimumUseSpace; extern "C" bool SegmentedCodeCache; extern "C" uintx ReservedCodeCacheSize; extern "C" uintx NonProfiledCodeHeapSize; extern "C" uintx ProfiledCodeHeapSize; extern "C" uintx NonNMethodCodeHeapSize; extern "C" uintx CodeCacheExpansionSize; extern "C" uintx CodeCacheMinBlockLength; const bool ExitOnFullCodeCache = false; extern "C" bool UseCodeCacheFlushing; extern "C" double SweeperThreshold; extern "C" uintx StartAggressiveSweepingAt; const intx BinarySwitchThreshold = 5; const intx StopInterpreterAt = 0; const intx TraceBytecodesAt = 0; const intx TraceBytecodesStopAt = 0; extern "C" bool UseThreadPriorities; extern "C" int ThreadPriorityPolicy; extern "C" bool ThreadPriorityVerbose; extern "C" int CompilerThreadPriority; extern "C" int VMThreadPriority; extern "C" int JavaPriority1_To_OSPriority; extern "C" int JavaPriority2_To_OSPriority; extern "C" int JavaPriority3_To_OSPriority; extern "C" int JavaPriority4_To_OSPriority; extern "C" int JavaPriority5_To_OSPriority; extern "C" int JavaPriority6_To_OSPriority; extern "C" int JavaPriority7_To_OSPriority; extern "C" int JavaPriority8_To_OSPriority; extern "C" int JavaPriority9_To_OSPriority; extern "C" int JavaPriority10_To_OSPriority; extern "C" bool UseCriticalJavaThreadPriority; extern "C" bool UseCriticalCompilerThreadPriority; const intx NewCodeParameter = 0; const intx MinOopMapAllocation = 8; extern "C" intx CompileThreshold; extern "C" bool TieredCompilation; extern "C" uint64_t MaxDirectMemorySize; extern "C" bool UseNewCode; extern "C" bool UseNewCode2; extern "C" bool UseNewCode3; const bool UseDebuggerErgo = false; const bool UseDebuggerErgo1 = false; const bool UseDebuggerErgo2 = false; const bool EnableJVMTIStackDepthAsserts = true; extern "C" bool UsePerfData; extern "C" bool PerfDataSaveToFile; extern "C" ccstr PerfDataSaveFile; extern "C" int PerfDataSamplingInterval; extern "C" bool PerfDisableSharedMem; extern "C" int PerfDataMemorySize; extern "C" int PerfMaxStringConstLength; extern "C" bool PerfAllowAtExitRegistration; extern "C" bool PerfBypassFileSystemCheck; extern "C" int UnguardOnExecutionViolation; extern "C" bool ManagementServer; extern "C" bool DisableAttachMechanism; extern "C" bool StartAttachListener; extern "C" bool EnableDynamicAgentLoading; extern "C" bool PrintConcurrentLocks; extern "C" bool PrintMethodHandleStubs; extern "C" bool VerifyMethodHandles; extern "C" bool ShowHiddenFrames; extern "C" bool ShowCarrierFrames; extern "C" bool TrustFinalNonStaticFields; extern "C" bool FoldStableValues; extern "C" int UseBootstrapCallInfo; extern "C" bool PauseAtStartup; extern "C" ccstr PauseAtStartupFile; extern "C" bool PauseAtExit; extern "C" bool DTraceMethodProbes; extern "C" bool DTraceAllocProbes; extern "C" bool DTraceMonitorProbes; extern "C" bool RelaxAccessControlCheck; extern "C" uintx StringTableSize; extern "C" uintx SymbolTableSize; extern "C" bool UseStringDeduplication; extern "C" uint StringDeduplicationAgeThreshold; extern "C" size_t StringDeduplicationInitialTableSize; extern "C" double StringDeduplicationGrowTableLoad; extern "C" double StringDeduplicationShrinkTableLoad; extern "C" double StringDeduplicationTargetTableLoad; extern "C" size_t StringDeduplicationCleanupDeadMinimum; extern "C" int StringDeduplicationCleanupDeadPercent; extern "C" bool StringDeduplicationResizeALot; extern "C" uint64_t StringDeduplicationHashSeed; extern "C" bool WhiteBoxAPI; extern "C" size_t ArrayAllocatorMallocLimit; extern "C" bool AlwaysAtomicAccesses; extern "C" bool UseUnalignedAccesses; extern "C" bool PreserveFramePointer; extern "C" size_t AsyncLogBufferSize; extern "C" bool CheckIntrinsics; extern "C" intx InitArrayShortSize; extern "C" ccstr AllocateHeapAt; extern "C" bool VMContinuations; const bool LoomDeoptAfterThaw = false; const bool LoomVerifyAfterThaw = false; const bool VerifyContinuations = false; const bool UseContinuationFastPath = true; const int VerifyMetaspaceInterval = 0; extern "C" bool ShowRegistersOnAssert; extern "C" bool UseSwitchProfiling; const bool TraceMemoryWriteback = false; extern "C" bool FlightRecorder; extern "C" ccstr FlightRecorderOptions; extern "C" ccstr StartFlightRecording; extern "C" bool UseFastUnorderedTimeStamps; extern "C" bool UseEmptySlotsInSupers; extern "C" bool DeoptimizeNMethodBarriersALot; const bool VerifyCrossModifyFence = false ; extern "C" int LockingMode; extern "C" uint TrimNativeHeapInterval; +extern "C" bool UseOprofile; extern "C" bool UseLinuxPosixThreadCPUClocks; extern "C" bool UseHugeTLBFS; extern "C" bool UseTransparentHugePages; extern "C" bool LoadExecStackDllInVMThread; extern "C" bool UseSHM; extern "C" bool UseContainerSupport; extern "C" bool AdjustStackSizeForTLS; extern "C" bool DumpPrivateMappingsInCore; extern "C" bool DumpSharedMappingsInCore; extern "C" bool UseCpuAllocPath; extern "C" bool DumpPerfMapAtExit; extern "C" intx TimerSlack; extern "C" bool THPStackMitigation; const bool DelayThreadStartALot = false; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/memory/arena.hpp" 2 +# 42 "/home/rehn/source/jdk/open/src/hotspot/share/memory/arena.hpp" +class Chunk { + + private: + Chunk* _next; + const size_t _len; +public: + Chunk(Chunk const&) = delete; Chunk& operator=(Chunk const&) = delete; + + void operator delete(void*) = delete; + void* operator new(size_t) = delete; + + Chunk(size_t length); + + enum { + + + + + slack = 40, + + + + + + tiny_size = 256 - slack, + init_size = 1*K - slack, + medium_size= 10*K - slack, + size = 32*K - slack, + non_pool_size = init_size + 32 + }; + + static void chop(Chunk* chunk); + static void next_chop(Chunk* chunk); + static size_t aligned_overhead_size(void) { return (align_up((sizeof(Chunk)), BytesPerLong)); } + static size_t aligned_overhead_size(size_t byte_size) { return (align_up((byte_size), BytesPerLong)); } + + size_t length() const { return _len; } + Chunk* next() const { return _next; } + void set_next(Chunk* n) { _next = n; } + + char* bottom() const { return ((char*) this) + aligned_overhead_size(); } + char* top() const { return bottom() + _len; } + bool contains(char* p) const { return bottom() <= p && p <= top(); } +}; + + +class Arena : public CHeapObjBase { +protected: + friend class HandleMark; + friend class NoHandleMark; + friend class VMStructs; + + MEMFLAGS _flags; + + Chunk* _first; + Chunk* _chunk; + char* _hwm; + char* _max; + + void* grow(size_t x, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); + size_t _size_in_bytes; + + void* internal_amalloc(size_t x, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) { + ; + if (pointer_delta(_max, _hwm, 1) >= x) { + char *old = _hwm; + _hwm += x; + return old; + } else { + return grow(x, alloc_failmode); + } + } + + public: + + static void start_chunk_pool_cleaner_task(); + + Arena(MEMFLAGS memflag); + Arena(MEMFLAGS memflag, size_t init_size); + ~Arena(); + void destruct_contents(); + char* hwm() const { return _hwm; } + + + + void* Amalloc(size_t x, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) { + x = (align_up((x), BytesPerLong)); + + + + ; + ; + return internal_amalloc(x, alloc_failmode); + } + + + + void* AmallocWords(size_t x, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) { + ; + return internal_amalloc(x, alloc_failmode); + } + + + bool Afree(void *ptr, size_t size) { + if (ptr == nullptr) { + return true; + } + + + + if (((char*)ptr) + size == _hwm) { + _hwm = (char*)ptr; + return true; + } else { + + return false; + } + } + + void *Arealloc( void *old_ptr, size_t old_size, size_t new_size, + AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); + + + bool contains( const void *ptr ) const; + + + size_t used() const; + + + size_t size_in_bytes() const { return _size_in_bytes; }; + void set_size_in_bytes(size_t size); + +private: + + void reset(void) { + _first = _chunk = nullptr; + _hwm = _max = nullptr; + set_size_in_bytes(0); + } +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/handles.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oop.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oop.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/memory/memRegion.hpp" 1 +# 43 "/home/rehn/source/jdk/open/src/hotspot/share/memory/memRegion.hpp" +class MemRegion { + friend class VMStructs; +private: + HeapWord* _start; + size_t _word_size; + +public: + MemRegion() : _start(nullptr), _word_size(0) {}; + MemRegion(HeapWord* start, size_t word_size) : + _start(start), _word_size(word_size) {}; + MemRegion(HeapWord* start, HeapWord* end) : + _start(start), _word_size(pointer_delta(end, start)) { + ; + } + MemRegion(MetaWord* start, MetaWord* end) : + _start((HeapWord*)start), _word_size(pointer_delta(end, start)) { + ; + } + + MemRegion intersection(const MemRegion mr2) const; + + MemRegion _union(const MemRegion mr2) const; + + + MemRegion minus(const MemRegion mr2) const; + + HeapWord* start() const { return _start; } + HeapWord* end() const { return _start + _word_size; } + HeapWord* last() const { return _start + _word_size - 1; } + + void set_start(HeapWord* start) { _start = start; } + void set_end(HeapWord* end) { _word_size = pointer_delta(end, _start); } + void set_word_size(size_t word_size) { + _word_size = word_size; + } + + bool contains(const MemRegion mr2) const { + return _start <= mr2._start && end() >= mr2.end(); + } + bool contains(const void* addr) const { + return addr >= (void*)_start && addr < (void*)end(); + } + bool equals(const MemRegion mr2) const { + + return ((is_empty() && mr2.is_empty()) || + (start() == mr2.start() && end() == mr2.end())); + } + + size_t byte_size() const { return _word_size * sizeof(HeapWord); } + size_t word_size() const { return _word_size; } + + bool is_empty() const { return word_size() == 0; } + + + static MemRegion* create_array(size_t length, MEMFLAGS flags); + static void destroy_array(MemRegion* array, size_t length); +}; + + + +class MemRegionClosure : public StackObj { +public: + virtual void do_MemRegion(MemRegion mr) = 0; +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.hpp" 2 + + +class CodeBlob; +class nmethod; +class ReferenceDiscoverer; +class DataLayout; +class KlassClosure; +class ClassLoaderData; +class Symbol; +class Metadata; +class Thread; + + + +class Closure : public StackObj { }; + + +class ThreadClosure { + public: + virtual void do_thread(Thread* thread) = 0; +}; + + +class OopClosure : public Closure { + public: + virtual void do_oop(oop* o) = 0; + virtual void do_oop(narrowOop* o) = 0; +}; + +class DoNothingClosure : public OopClosure { + public: + virtual void do_oop(oop* p) {} + virtual void do_oop(narrowOop* p) {} +}; +extern DoNothingClosure do_nothing_cl; + + + + +class OopIterateClosure : public OopClosure { + private: + ReferenceDiscoverer* _ref_discoverer; + + protected: + OopIterateClosure(ReferenceDiscoverer* rd) : _ref_discoverer(rd) { } + OopIterateClosure() : _ref_discoverer(nullptr) { } + ~OopIterateClosure() { } + + void set_ref_discoverer_internal(ReferenceDiscoverer* rd) { _ref_discoverer = rd; } + + public: + ReferenceDiscoverer* ref_discoverer() const { return _ref_discoverer; } + + + + enum ReferenceIterationMode { + DO_DISCOVERY, + DO_DISCOVERED_AND_DISCOVERY, + DO_FIELDS, + DO_FIELDS_EXCEPT_REFERENT + }; + + + virtual ReferenceIterationMode reference_iteration_mode() { return DO_DISCOVERY; } +# 104 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.hpp" + virtual bool do_metadata() = 0; + virtual void do_klass(Klass* k) = 0; + virtual void do_cld(ClassLoaderData* cld) = 0; + + + virtual void do_method(Method* m) = 0; + + virtual void do_nmethod(nmethod* nm) = 0; +}; + + +class BasicOopIterateClosure : public OopIterateClosure { +public: + BasicOopIterateClosure(ReferenceDiscoverer* rd = nullptr) : OopIterateClosure(rd) {} + + virtual bool do_metadata() { return false; } + virtual void do_klass(Klass* k) { do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/memory/iterator.hpp", 120); } while (0); } + virtual void do_cld(ClassLoaderData* cld) { do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/memory/iterator.hpp", 121); } while (0); } + virtual void do_method(Method* m) { do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/memory/iterator.hpp", 122); } while (0); } + virtual void do_nmethod(nmethod* nm) { do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/memory/iterator.hpp", 123); } while (0); } +}; + + +class OopIterator { +public: + virtual void oops_do(OopClosure* cl) = 0; +}; + +enum class derived_base : intptr_t; +enum class derived_pointer : intptr_t; +class DerivedOopClosure : public Closure { + public: + enum { SkipNull = true }; + virtual void do_derived_oop(derived_base* base, derived_pointer* derived) = 0; +}; + +class KlassClosure : public Closure { + public: + virtual void do_klass(Klass* k) = 0; +}; + +class CLDClosure : public Closure { + public: + virtual void do_cld(ClassLoaderData* cld) = 0; +}; + +class MetadataClosure : public Closure { + public: + virtual void do_metadata(Metadata* md) = 0; +}; + + +class CLDToOopClosure : public CLDClosure { + OopClosure* _oop_closure; + int _cld_claim; + + public: + CLDToOopClosure(OopClosure* oop_closure, + int cld_claim) : + _oop_closure(oop_closure), + _cld_claim(cld_claim) {} + + void do_cld(ClassLoaderData* cld); +}; + +template +class ClaimingCLDToOopClosure : public CLDToOopClosure { +public: + ClaimingCLDToOopClosure(OopClosure* cl) : CLDToOopClosure(cl, claim) {} +}; + +class ClaimMetadataVisitingOopIterateClosure : public OopIterateClosure { + protected: + const int _claim; + + public: + ClaimMetadataVisitingOopIterateClosure(int claim, ReferenceDiscoverer* rd = nullptr) : + OopIterateClosure(rd), + _claim(claim) { } + + virtual bool do_metadata() { return true; } + virtual void do_klass(Klass* k); + virtual void do_cld(ClassLoaderData* cld); + virtual void do_method(Method* m); + virtual void do_nmethod(nmethod* nm); +}; + + + + +class MetadataVisitingOopIterateClosure: public ClaimMetadataVisitingOopIterateClosure { + public: + MetadataVisitingOopIterateClosure(ReferenceDiscoverer* rd = nullptr); +}; + + + +class ObjectClosure : public Closure { + public: + + virtual void do_object(oop obj) = 0; +}; + +class BoolObjectClosure : public Closure { + public: + virtual bool do_object_b(oop obj) = 0; +}; + +class OopFieldClosure { +public: + virtual void do_field(oop base, oop* p) = 0; +}; + +class AlwaysTrueClosure: public BoolObjectClosure { + public: + bool do_object_b(oop p) { return true; } +}; + +class AlwaysFalseClosure : public BoolObjectClosure { + public: + bool do_object_b(oop p) { return false; } +}; + + + +class ObjectToOopClosure: public ObjectClosure { + OopIterateClosure* _cl; +public: + void do_object(oop obj); + ObjectToOopClosure(OopIterateClosure* cl) : _cl(cl) {} +}; + + + +class Space; + +class SpaceClosure : public StackObj { + public: + + virtual void do_space(Space* s) = 0; +}; + + + + +class CodeBlobClosure : public Closure { + public: + + virtual void do_code_blob(CodeBlob* cb) = 0; +}; + + + +class CodeBlobToOopClosure : public CodeBlobClosure { + protected: + OopClosure* _cl; + bool _fix_relocations; + void do_nmethod(nmethod* nm); + public: + + + CodeBlobToOopClosure(OopClosure* cl, bool fix_relocations) : _cl(cl), _fix_relocations(fix_relocations) {} + virtual void do_code_blob(CodeBlob* cb); + + bool fix_relocations() const { return _fix_relocations; } + const static bool FixRelocations = true; +}; + +class MarkingCodeBlobClosure : public CodeBlobToOopClosure { + bool _keepalive_nmethods; + + public: + MarkingCodeBlobClosure(OopClosure* cl, bool fix_relocations, bool keepalive_nmethods) : + CodeBlobToOopClosure(cl, fix_relocations), + _keepalive_nmethods(keepalive_nmethods) {} + + + virtual void do_code_blob(CodeBlob* cb); +}; + +class NMethodClosure : public Closure { + public: + virtual void do_nmethod(nmethod* n) = 0; +}; + +class CodeBlobToNMethodClosure : public CodeBlobClosure { + NMethodClosure* const _nm_cl; + + public: + CodeBlobToNMethodClosure(NMethodClosure* nm_cl) : _nm_cl(nm_cl) {} + + virtual void do_code_blob(CodeBlob* cb); +}; + + + +class ObjectMonitor; + +class MonitorClosure : public StackObj { + public: + + virtual void do_monitor(ObjectMonitor* m) = 0; +}; + + +class VoidClosure : public StackObj { + public: + virtual void do_void() = 0; +}; +# 323 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.hpp" +class YieldClosure : public StackObj { +public: + virtual bool should_return() = 0; + + + virtual bool should_return_fine_grain() { return false; } +}; + +class SymbolClosure : public StackObj { + public: + virtual void do_symbol(Symbol**) = 0; +}; + +template +class CompareClosure : public Closure { +public: + virtual int do_compare(const E&, const E&) = 0; +}; + +class OopIteratorClosureDispatch { + public: + template static void oop_oop_iterate(OopClosureType* cl, oop obj, Klass* klass); + template static void oop_oop_iterate(OopClosureType* cl, oop obj, Klass* klass, MemRegion mr); + template static void oop_oop_iterate_backwards(OopClosureType* cl, oop obj, Klass* klass); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oop.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/compressedKlass.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/compressedKlass.hpp" +class outputStream; +class Klass; + + +typedef juint narrowKlass; + +const int LogKlassAlignmentInBytes = 3; +const int KlassAlignmentInBytes = 1 << LogKlassAlignmentInBytes; + + + + +const uint64_t KlassEncodingMetaspaceMax = (uint64_t(max_juint) + 1) << LogKlassAlignmentInBytes; + + +class CompressedKlassPointers : public AllStatic { + friend class VMStructs; + + static address _base; + static int _shift; + + + + + + + static size_t _range; + + static void set_base(address base); + static void set_range(size_t range); + static void set_shift(int shift); + +public: + + + + + static bool is_valid_base(address p); + + + + + static void initialize_for_given_encoding(address addr, size_t len, address requested_base, int requested_shift); + + + + + + + static void initialize(address addr, size_t len); + + static void print_mode(outputStream* st); + + static address base() { return _base; } + static size_t range() { return _range; } + static int shift() { return _shift; } + + static bool is_null(Klass* v) { return v == nullptr; } + static bool is_null(narrowKlass v) { return v == 0; } + + static inline Klass* decode_raw(narrowKlass v, address base, int shift); + static inline Klass* decode_raw(narrowKlass v); + static inline Klass* decode_not_null(narrowKlass v); + static inline Klass* decode_not_null(narrowKlass v, address base, int shift); + static inline Klass* decode(narrowKlass v); + static inline narrowKlass encode_not_null(Klass* v); + static inline narrowKlass encode_not_null(Klass* v, address base, int shift); + static inline narrowKlass encode(Klass* v); + +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oop.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessDecorators.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessDecorators.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/barrierSetConfig.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessDecorators.hpp" 2 +# 40 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessDecorators.hpp" +typedef uint64_t DecoratorSet; + + + +template +struct HasDecorator: public std::integral_constant {}; + + + +const DecoratorSet DECORATORS_NONE = (0ULL); + + + + + +const DecoratorSet INTERNAL_CONVERT_COMPRESSED_OOP = (1ULL) << 1; +const DecoratorSet INTERNAL_VALUE_IS_OOP = (1ULL) << 2; + + + + +const DecoratorSet INTERNAL_RT_USE_COMPRESSED_OOPS = (1ULL) << 5; + +const DecoratorSet INTERNAL_DECORATOR_MASK = INTERNAL_CONVERT_COMPRESSED_OOP | INTERNAL_VALUE_IS_OOP | + INTERNAL_RT_USE_COMPRESSED_OOPS; +# 124 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessDecorators.hpp" +const DecoratorSet MO_UNORDERED = (1ULL) << 6; +const DecoratorSet MO_RELAXED = (1ULL) << 7; +const DecoratorSet MO_ACQUIRE = (1ULL) << 8; +const DecoratorSet MO_RELEASE = (1ULL) << 9; +const DecoratorSet MO_SEQ_CST = (1ULL) << 10; +const DecoratorSet MO_DECORATOR_MASK = MO_UNORDERED | MO_RELAXED | + MO_ACQUIRE | MO_RELEASE | MO_SEQ_CST; +# 149 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessDecorators.hpp" +const DecoratorSet AS_RAW = (1ULL) << 11; +const DecoratorSet AS_NO_KEEPALIVE = (1ULL) << 12; +const DecoratorSet AS_NORMAL = (1ULL) << 13; +const DecoratorSet AS_DECORATOR_MASK = AS_RAW | AS_NO_KEEPALIVE | AS_NORMAL; +# 163 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessDecorators.hpp" +const DecoratorSet ON_STRONG_OOP_REF = (1ULL) << 14; +const DecoratorSet ON_WEAK_OOP_REF = (1ULL) << 15; +const DecoratorSet ON_PHANTOM_OOP_REF = (1ULL) << 16; +const DecoratorSet ON_UNKNOWN_OOP_REF = (1ULL) << 17; +const DecoratorSet ON_DECORATOR_MASK = ON_STRONG_OOP_REF | ON_WEAK_OOP_REF | + ON_PHANTOM_OOP_REF | ON_UNKNOWN_OOP_REF; +# 177 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessDecorators.hpp" +const DecoratorSet IN_HEAP = (1ULL) << 18; +const DecoratorSet IN_NATIVE = (1ULL) << 19; +const DecoratorSet IN_NMETHOD = (1ULL) << 20; +const DecoratorSet IN_DECORATOR_MASK = IN_HEAP | IN_NATIVE | IN_NMETHOD; + + + + + + + +const DecoratorSet IS_ARRAY = (1ULL) << 21; +const DecoratorSet IS_DEST_UNINITIALIZED = (1ULL) << 22; +const DecoratorSet IS_NOT_NULL = (1ULL) << 23; +# 202 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessDecorators.hpp" +const DecoratorSet ARRAYCOPY_CHECKCAST = (1ULL) << 24; +const DecoratorSet ARRAYCOPY_DISJOINT = (1ULL) << 25; +const DecoratorSet ARRAYCOPY_ARRAYOF = (1ULL) << 26; +const DecoratorSet ARRAYCOPY_ATOMIC = (1ULL) << 27; +const DecoratorSet ARRAYCOPY_ALIGNED = (1ULL) << 28; +const DecoratorSet ARRAYCOPY_DECORATOR_MASK = ARRAYCOPY_CHECKCAST | ARRAYCOPY_DISJOINT | + ARRAYCOPY_DISJOINT | ARRAYCOPY_ARRAYOF | + ARRAYCOPY_ATOMIC | ARRAYCOPY_ALIGNED; + + + + + +const DecoratorSet ACCESS_READ = (1ULL) << 29; +const DecoratorSet ACCESS_WRITE = (1ULL) << 30; + + +const DecoratorSet DECORATOR_LAST = (1ULL) << 30; + +namespace AccessInternal { + + + + template + struct DecoratorFixup: AllStatic { + + static const DecoratorSet ref_strength_default = input_decorators | + (((ON_DECORATOR_MASK & input_decorators) == 0 && (INTERNAL_VALUE_IS_OOP & input_decorators) != 0) ? + ON_STRONG_OOP_REF : DECORATORS_NONE); + + static const DecoratorSet memory_ordering_default = ref_strength_default | + ((MO_DECORATOR_MASK & ref_strength_default) == 0 ? MO_UNORDERED : DECORATORS_NONE); + + static const DecoratorSet barrier_strength_default = memory_ordering_default | + ((AS_DECORATOR_MASK & memory_ordering_default) == 0 ? AS_NORMAL : DECORATORS_NONE); + static const DecoratorSet value = barrier_strength_default; + }; + + + + inline DecoratorSet decorator_fixup(DecoratorSet input_decorators, BasicType type) { + + DecoratorSet with_oop_decorators = input_decorators |= (is_reference_type(type) ? INTERNAL_VALUE_IS_OOP : 0); + + DecoratorSet ref_strength_default = with_oop_decorators | + (((ON_DECORATOR_MASK & with_oop_decorators) == 0 && (INTERNAL_VALUE_IS_OOP & input_decorators) != 0) ? + ON_STRONG_OOP_REF : DECORATORS_NONE); + + DecoratorSet memory_ordering_default = ref_strength_default | + ((MO_DECORATOR_MASK & ref_strength_default) == 0 ? MO_UNORDERED : DECORATORS_NONE); + + DecoratorSet barrier_strength_default = memory_ordering_default | + ((AS_DECORATOR_MASK & memory_ordering_default) == 0 ? AS_NORMAL : DECORATORS_NONE); + return barrier_strength_default; + } +} +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oop.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/markWord.hpp" 1 +# 66 "/home/rehn/source/jdk/open/src/hotspot/share/oops/markWord.hpp" +class BasicLock; +class ObjectMonitor; +class JavaThread; +class outputStream; + +class markWord { + private: + uintptr_t _value; + + public: + explicit markWord(uintptr_t value) : _value(value) {} + + markWord() = default; + + + + ~markWord() = default; + markWord(const markWord&) = default; + markWord& operator=(const markWord&) = default; + + static markWord from_pointer(void* ptr) { + return markWord((uintptr_t)ptr); + } + void* to_pointer() const { + return (void*)_value; + } + + bool operator==(const markWord& other) const { + return _value == other._value; + } + bool operator!=(const markWord& other) const { + return !operator==(other); + } + + + uintptr_t value() const { return _value; } + + + static const int age_bits = 4; + static const int lock_bits = 2; + static const int first_unused_gap_bits = 1; + static const int max_hash_bits = BitsPerWord - age_bits - lock_bits - first_unused_gap_bits; + static const int hash_bits = max_hash_bits > 31 ? 31 : max_hash_bits; + static const int second_unused_gap_bits = 1 ; + + static const int lock_shift = 0; + static const int age_shift = lock_bits + first_unused_gap_bits; + static const int hash_shift = age_shift + age_bits + second_unused_gap_bits; + + static const uintptr_t lock_mask = ((((lock_bits) >= BitsPerWord) ? 0 : (OneBit << (lock_bits))) - 1); + static const uintptr_t lock_mask_in_place = lock_mask << lock_shift; + static const uintptr_t age_mask = ((((age_bits) >= BitsPerWord) ? 0 : (OneBit << (age_bits))) - 1); + static const uintptr_t age_mask_in_place = age_mask << age_shift; + static const uintptr_t hash_mask = ((((hash_bits) >= BitsPerWord) ? 0 : (OneBit << (hash_bits))) - 1); + static const uintptr_t hash_mask_in_place = hash_mask << hash_shift; + + static const uintptr_t locked_value = 0; + static const uintptr_t unlocked_value = 1; + static const uintptr_t monitor_value = 2; + static const uintptr_t marked_value = 3; + + static const uintptr_t no_hash = 0 ; + static const uintptr_t no_hash_in_place = (uintptr_t)no_hash << hash_shift; + static const uintptr_t no_lock_in_place = unlocked_value; + + static const uint max_age = age_mask; + + + static markWord zero() { return markWord(uintptr_t(0)); } + + + bool is_locked() const { + return (mask_bits(value(), lock_mask_in_place) != unlocked_value); + } + bool is_unlocked() const { + return (mask_bits(value(), lock_mask_in_place) == unlocked_value); + } + bool is_marked() const { + return (mask_bits(value(), lock_mask_in_place) == marked_value); + } + bool is_neutral() const { + return (mask_bits(value(), lock_mask_in_place) == unlocked_value); + } + + + + bool is_being_inflated() const { return (value() == 0); } +# 161 "/home/rehn/source/jdk/open/src/hotspot/share/oops/markWord.hpp" + static markWord INFLATING() { return zero(); } + + + bool must_be_preserved(const oopDesc* obj) const { + return (!is_unlocked() || !has_no_hash()); + } + + + + + markWord set_unlocked() const { + return markWord(value() | unlocked_value); + } + bool has_locker() const { + ; + return (value() & lock_mask_in_place) == locked_value; + } + BasicLock* locker() const { + ; + return (BasicLock*) value(); + } + + bool is_fast_locked() const { + ; + return (value() & lock_mask_in_place) == locked_value; + } + markWord set_fast_locked() const { + + return markWord(value() & ~lock_mask_in_place); + } + + bool has_monitor() const { + return ((value() & lock_mask_in_place) == monitor_value); + } + ObjectMonitor* monitor() const { + ; + + return (ObjectMonitor*) (value() ^ monitor_value); + } + bool has_displaced_mark_helper() const { + intptr_t lockbits = value() & lock_mask_in_place; + return LockingMode == LM_LIGHTWEIGHT ? lockbits == monitor_value + : (lockbits & unlocked_value) == 0; + } + markWord displaced_mark_helper() const; + void set_displaced_mark_helper(markWord m) const; + markWord copy_set_hash(intptr_t hash) const { + uintptr_t tmp = value() & (~hash_mask_in_place); + tmp |= ((hash & hash_mask) << hash_shift); + return markWord(tmp); + } + + + static markWord unused_mark() { + return markWord(marked_value); + } + + + static markWord encode(BasicLock* lock) { + return from_pointer(lock); + } + static markWord encode(ObjectMonitor* monitor) { + uintptr_t tmp = (uintptr_t) monitor; + return markWord(tmp | monitor_value); + } + + + markWord clear_lock_bits() { return markWord(value() & ~lock_mask_in_place); } + + + markWord set_marked() { return markWord((value() & ~lock_mask_in_place) | marked_value); } + markWord set_unmarked() { return markWord((value() & ~lock_mask_in_place) | unlocked_value); } + + uint age() const { return (uint) mask_bits(value() >> age_shift, age_mask); } + markWord set_age(uint v) const { + ; + return markWord((value() & ~age_mask_in_place) | ((v & age_mask) << age_shift)); + } + markWord incr_age() const { return age() == max_age ? markWord(_value) : set_age(age() + 1); } + + + intptr_t hash() const { + return mask_bits(value() >> hash_shift, hash_mask); + } + + bool has_no_hash() const { + return hash() == no_hash; + } + + + static markWord prototype() { + return markWord( no_hash_in_place | no_lock_in_place ); + } + + + void print_on(outputStream* st, bool print_monitor_info = true) const; + + + inline static markWord encode_pointer_as_mark(void* p) { return from_pointer(p).set_marked(); } + + + inline void* decode_pointer() { return (void*)clear_lock_bits().value(); } +}; + + +template<> +struct PrimitiveConversions::Translate : public std::true_type { + typedef markWord Value; + typedef uintptr_t Decayed; + + static Decayed decay(const Value& x) { return x.value(); } + static Value recover(Decayed x) { return Value(x); } +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oop.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/metadata.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/oops/metadata.hpp" +class Metadata : public MetaspaceObj { + + + public: + + + + int identity_hash() { return (int)(uintptr_t)this; } + + virtual bool is_metadata() const { return true; } + virtual bool is_klass() const { return false; } + virtual bool is_method() const { return false; } + virtual bool is_methodData() const { return false; } + virtual bool is_constantPool() const { return false; } + virtual bool is_methodCounters() const { return false; } + virtual int size() const = 0; + virtual MetaspaceObj::Type type() const = 0; + virtual const char* internal_name() const = 0; + virtual void metaspace_pointers_do(MetaspaceClosure* iter) {} + + void print() const; + void print_value() const; + + static void print_value_on_maybe_null(outputStream* st, const Metadata* m) { + if (nullptr == m) + st->print("null"); + else + m->print_value_on(st); + } + + virtual void print_on(outputStream* st) const; + virtual void print_value_on(outputStream* st) const = 0; + + char* print_value_string() const; + + + + virtual bool on_stack() const { return false; } + virtual void set_on_stack(const bool value); + + + + + static void mark_on_stack(Metadata* m) { m->set_on_stack(true); } +}; +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oop.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/orderAccess.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/orderAccess.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/vm_version.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/vm_version.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/vm_version_riscv.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/vm_version_riscv.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/abstract_vm_version.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/abstract_vm_version.hpp" +typedef enum { + NoDetectedVirtualization, + XenHVM, + XenPVHVM, + KVM, + VMWare, + HyperV, + HyperVRole, + PowerVM, + PowerFullPartitionMode, + PowerKVM +} VirtualizationType; + +class outputStream; +enum class vmIntrinsicID; + + + +class Abstract_VM_Version: AllStatic { + friend class VMStructs; + friend class JVMCIVMStructs; + + protected: + static const char* _s_vm_release; + static const char* _s_internal_vm_info_string; + + + static uint64_t _features; + static const char* _features_string; + + + static bool _supports_cx8; + static bool _supports_atomic_getset4; + static bool _supports_atomic_getset8; + static bool _supports_atomic_getadd4; + static bool _supports_atomic_getadd8; + static unsigned int _logical_processors_per_package; + static unsigned int _L1_data_cache_line_size; + static int _vm_major_version; + static int _vm_minor_version; + static int _vm_security_version; + static int _vm_patch_version; + static int _vm_build_number; + static unsigned int _data_cache_line_flush_size; + + public: + + static VirtualizationType _detected_virtualization; + + + + + + + + static void initialize() { } + + + + + + + static void early_initialize() { } + + + + + static void init_before_ergo() {} + + + static const char* vm_name(); + + static const char* vm_vendor(); + + static const char* vm_info_string(); + static const char* vm_release(); + static const char* vm_platform_string(); + + static int vm_major_version() { return _vm_major_version; } + static int vm_minor_version() { return _vm_minor_version; } + static int vm_security_version() { return _vm_security_version; } + static int vm_patch_version() { return _vm_patch_version; } + static int vm_build_number() { return _vm_build_number; } + + + static unsigned int jvm_version(); + + + static const char* internal_vm_info_string(); + static const char* jdk_debug_level(); + static const char* printable_jdk_debug_level(); + + static uint64_t features() { return _features; } + static const char* features_string() { return _features_string; } + static void insert_features_names(char* buf, size_t buflen, const char* features_names[]); + + static VirtualizationType get_detected_virtualization() { + return _detected_virtualization; + } + + + + static void print_platform_virtualization_info(outputStream*) { } + + + static bool supports_cx8() { + + return true; + + + + } + + + static bool supports_atomic_getset4() {return _supports_atomic_getset4;} + static bool supports_atomic_getset8() {return _supports_atomic_getset8;} + static bool supports_atomic_getadd4() {return _supports_atomic_getadd4;} + static bool supports_atomic_getadd8() {return _supports_atomic_getadd8;} + + static unsigned int logical_processors_per_package() { + return _logical_processors_per_package; + } + + static unsigned int L1_data_cache_line_size() { + return _L1_data_cache_line_size; + } + + + + + static unsigned int data_cache_line_flush_size() { + return _data_cache_line_flush_size; + } + + + static bool supports_data_cache_line_flush() { + return _data_cache_line_flush_size != 0; + } + + + + static uint parallel_worker_threads_denominator() { return 8; } + + + static bool supports_on_spin_wait() { return false; } + + + static bool supports_fast_class_init_checks() { return false; } + + + constexpr static bool supports_stack_watermark_barrier() { return false; } + + + static bool supports_float16() { return false; } + + + static bool is_intrinsic_supported(vmIntrinsicID id) { return true; } + + static bool profile_all_receivers_at_type_check() { return true; } + + static bool print_matching_lines_from_file(const char* filename, outputStream* st, const char* keywords_to_match[]); + + protected: + + static const size_t CPU_TYPE_DESC_BUF_SIZE = 256; + static const size_t CPU_DETAILED_DESC_BUF_SIZE = 4096; + + static int _no_of_threads; + static int _no_of_cores; + static int _no_of_sockets; + static bool _initialized; + static char _cpu_name[CPU_TYPE_DESC_BUF_SIZE]; + static char _cpu_desc[CPU_DETAILED_DESC_BUF_SIZE]; + + public: + static int number_of_threads(void); + static int number_of_cores(void); + static int number_of_sockets(void); + + static const char* cpu_name(void); + static const char* cpu_description(void); +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/vm_version_riscv.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/arguments.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/arguments.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logLevel.hpp" 1 +# 53 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logLevel.hpp" +class LogLevel : public AllStatic { + public: + enum type { + Off, + + Trace, Debug, Info, Warning, Error, + + Count, + Invalid, + NotMentioned, + First = Off + 1, + Last = Error, + Default = Warning, + Unspecified = Info + }; + + static const char *name(LogLevel::type level) { + ; + return _name[level]; + } + + static LogLevel::type from_string(const char* str); + static LogLevel::type fuzzy_match(const char *level); + + private: + static const char* _name[]; +}; + +typedef LogLevel::type LogLevelType; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/arguments.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTag.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTag.hpp" +class outputStream; +# 234 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTag.hpp" +class LogTag : public AllStatic { + public: + + + + static const size_t MaxTags = 5; + + enum type { + __NO_TAG, + + _add, _age, _alloc, _annotation, _arguments, _array, _attach, _barrier, _blocks, _bot, _breakpoint, _bytecode, _cause, _cds, _census, _class, _classhisto, _cleanup, _codecache, _compaction, _compilation, _condy, _constantpool, _constraints, _container, _continuations, _coops, _cpu, _cset, _data, _datacreation, _dcmd, _decoder, _defaultmethods, _deoptimization, _dependencies, _director, _dump, _dynamic, _ergo, _event, _exceptions, _exit, _fastlock, _finalizer, _fingerprint, _free, _freelist, _gc, _handshake, _hashtables, _heap, _heapdump, _humongous, _ihop, _iklass, _indy, _init, _inlining, _install, _interpreter, _itables, _jfr, _jit, _jni, _jvmci, _jvmti, _lambda, _library, _liveness, _load, _loader, _logging, _malloc, _map, _mark, _marking, _membername, _memops, _metadata, _metaspace, _methodcomparator, _methodhandles, _mirror, _mmu, _module, _monitorinflation, _monitormismatch, _native, _nestmates, _nmethod, _nmt, _normalize, _numa, _objecttagging, _obsolete, _oldobject, _oom, _oopmap, _oops, _oopstorage, _os, _owner, _page, _pagesize, _parser, _patch, _path, _perf, _periodic, _phases, _plab, _placeholders, _preempt, _preorder, _preview, _promotion, _protectiondomain, _ptrqueue, _purge, _record, _redefine, _ref, _refine, _region, _reloc, _remset, _resolve, _safepoint, _sampling, _scavenge, _sealed, _setting, _smr, _stackbarrier, _stackmap, _stacktrace, _stackwalk, _start, _startup, _startuptime, _state, _stats, _streaming, _stringdedup, _stringtable, _stubs, _subclass, _survivor, _suspend, _sweep, _symboltable, _system, _table, _task, _thread, _throttle, _timer, _tlab, _tracking, _trimnative, _unload, _unmap, _unshareable, _update, _valuebasedclasses, _verification, _verify, _vmmutex, _vmoperation, _vmthread, _vtables, _vtablestubs, + + Count + }; + + static const char* name(LogTag::type tag) { + return _name[tag]; + } + + static LogTag::type from_string(const char *str); + static LogTag::type fuzzy_match(const char *tag); + static void list_tags(outputStream* out); + + private: + static const char* const _name[]; +}; + +typedef LogTag::type LogTagType; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/arguments.hpp" 2 + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/java.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/java.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/os.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/os.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/os/posix/include/jvm_md.h" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/os/posix/include/jvm_md.h" +# 1 "/usr/riscv64-linux-gnu/include/dirent.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/dirent.h" 3 + +# 27 "/usr/riscv64-linux-gnu/include/dirent.h" 3 4 +extern "C" { +# 61 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/dirent.h" 1 3 +# 22 "/usr/riscv64-linux-gnu/include/bits/dirent.h" 3 +struct dirent + { + + __ino_t d_ino; + __off_t d_off; + + + + + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; + }; + + +struct dirent64 + { + __ino64_t d_ino; + __off64_t d_off; + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; + }; +# 62 "/usr/riscv64-linux-gnu/include/dirent.h" 2 3 +# 97 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +enum + { + DT_UNKNOWN = 0, + + DT_FIFO = 1, + + DT_CHR = 2, + + DT_DIR = 4, + + DT_BLK = 6, + + DT_REG = 8, + + DT_LNK = 10, + + DT_SOCK = 12, + + DT_WHT = 14 + + }; +# 127 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +typedef struct __dirstream DIR; + + + + + + +extern DIR *opendir (const char *__name) __attribute__ ((__nonnull__ (1))); + + + + + + +extern DIR *fdopendir (int __fd); + + + + + + + +extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1))); +# 162 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +extern struct dirent *readdir (DIR *__dirp) __attribute__ ((__nonnull__ (1))); +# 173 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +extern struct dirent64 *readdir64 (DIR *__dirp) __attribute__ ((__nonnull__ (1))); +# 183 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +extern int readdir_r (DIR *__restrict __dirp, + struct dirent *__restrict __entry, + struct dirent **__restrict __result) + __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__deprecated__)); +# 201 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +extern int readdir64_r (DIR *__restrict __dirp, + struct dirent64 *__restrict __entry, + struct dirent64 **__restrict __result) + __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__deprecated__)); + + + + +extern void rewinddir (DIR *__dirp) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + +extern void seekdir (DIR *__dirp, long int __pos) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern long int telldir (DIR *__dirp) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + +extern int dirfd (DIR *__dirp) noexcept (true) __attribute__ ((__nonnull__ (1))); +# 245 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 246 "/usr/riscv64-linux-gnu/include/dirent.h" 2 3 +# 255 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +extern int scandir (const char *__restrict __dir, + struct dirent ***__restrict __namelist, + int (*__selector) (const struct dirent *), + int (*__cmp) (const struct dirent **, + const struct dirent **)) + __attribute__ ((__nonnull__ (1, 2))); +# 278 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +extern int scandir64 (const char *__restrict __dir, + struct dirent64 ***__restrict __namelist, + int (*__selector) (const struct dirent64 *), + int (*__cmp) (const struct dirent64 **, + const struct dirent64 **)) + __attribute__ ((__nonnull__ (1, 2))); +# 293 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +extern int scandirat (int __dfd, const char *__restrict __dir, + struct dirent ***__restrict __namelist, + int (*__selector) (const struct dirent *), + int (*__cmp) (const struct dirent **, + const struct dirent **)) + __attribute__ ((__nonnull__ (2, 3))); +# 315 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +extern int scandirat64 (int __dfd, const char *__restrict __dir, + struct dirent64 ***__restrict __namelist, + int (*__selector) (const struct dirent64 *), + int (*__cmp) (const struct dirent64 **, + const struct dirent64 **)) + __attribute__ ((__nonnull__ (2, 3))); + + + + +extern int alphasort (const struct dirent **__e1, + const struct dirent **__e2) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 340 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +extern int alphasort64 (const struct dirent64 **__e1, + const struct dirent64 **__e2) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 353 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +extern __ssize_t getdirentries (int __fd, char *__restrict __buf, + size_t __nbytes, + __off_t *__restrict __basep) + noexcept (true) __attribute__ ((__nonnull__ (2, 4))); +# 370 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf, + size_t __nbytes, + __off64_t *__restrict __basep) + noexcept (true) __attribute__ ((__nonnull__ (2, 4))); + + + + + + +extern int versionsort (const struct dirent **__e1, + const struct dirent **__e2) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 396 "/usr/riscv64-linux-gnu/include/dirent.h" 3 +extern int versionsort64 (const struct dirent64 **__e1, + const struct dirent64 **__e2) + noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + +} + +# 1 "/usr/riscv64-linux-gnu/include/bits/dirent_ext.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/bits/dirent_ext.h" 3 +extern "C" { + + + + + +extern __ssize_t getdents64 (int __fd, void *__buffer, size_t __length) + noexcept (true) __attribute__ ((__nonnull__ (2))); + + +} +# 405 "/usr/riscv64-linux-gnu/include/dirent.h" 2 3 +# 35 "/home/rehn/source/jdk/open/src/hotspot/os/posix/include/jvm_md.h" 2 +# 1 "/usr/riscv64-linux-gnu/include/sys/param.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/sys/param.h" 3 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 24 "/usr/riscv64-linux-gnu/include/sys/param.h" 2 3 + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/limits.h" 1 3 4 +# 27 "/usr/riscv64-linux-gnu/include/sys/param.h" 2 3 + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/param.h" 1 3 +# 28 "/usr/riscv64-linux-gnu/include/bits/param.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/linux/param.h" 1 3 + + + + +# 1 "/usr/riscv64-linux-gnu/include/asm/param.h" 1 3 +# 1 "/usr/riscv64-linux-gnu/include/asm-generic/param.h" 1 3 +# 2 "/usr/riscv64-linux-gnu/include/asm/param.h" 2 3 +# 6 "/usr/riscv64-linux-gnu/include/linux/param.h" 2 3 +# 29 "/usr/riscv64-linux-gnu/include/bits/param.h" 2 3 +# 32 "/usr/riscv64-linux-gnu/include/sys/param.h" 2 3 +# 36 "/home/rehn/source/jdk/open/src/hotspot/os/posix/include/jvm_md.h" 2 + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 38 "/home/rehn/source/jdk/open/src/hotspot/os/posix/include/jvm_md.h" 2 +# 77 "/home/rehn/source/jdk/open/src/hotspot/os/posix/include/jvm_md.h" +# 1 "/usr/riscv64-linux-gnu/include/sys/stat.h" 1 3 +# 99 "/usr/riscv64-linux-gnu/include/sys/stat.h" 3 +extern "C" { + +# 1 "/usr/riscv64-linux-gnu/include/bits/stat.h" 1 3 +# 102 "/usr/riscv64-linux-gnu/include/sys/stat.h" 2 3 +# 205 "/usr/riscv64-linux-gnu/include/sys/stat.h" 3 +extern int stat (const char *__restrict __file, + struct stat *__restrict __buf) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int fstat (int __fd, struct stat *__buf) noexcept (true) __attribute__ ((__nonnull__ (2))); +# 240 "/usr/riscv64-linux-gnu/include/sys/stat.h" 3 +extern int stat64 (const char *__restrict __file, + struct stat64 *__restrict __buf) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); +extern int fstat64 (int __fd, struct stat64 *__buf) noexcept (true) __attribute__ ((__nonnull__ (2))); +# 264 "/usr/riscv64-linux-gnu/include/sys/stat.h" 3 +extern int fstatat (int __fd, const char *__restrict __file, + struct stat *__restrict __buf, int __flag) + noexcept (true) __attribute__ ((__nonnull__ (2, 3))); +# 291 "/usr/riscv64-linux-gnu/include/sys/stat.h" 3 +extern int fstatat64 (int __fd, const char *__restrict __file, + struct stat64 *__restrict __buf, int __flag) + noexcept (true) __attribute__ ((__nonnull__ (2, 3))); +# 313 "/usr/riscv64-linux-gnu/include/sys/stat.h" 3 +extern int lstat (const char *__restrict __file, + struct stat *__restrict __buf) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); +# 338 "/usr/riscv64-linux-gnu/include/sys/stat.h" 3 +extern int lstat64 (const char *__restrict __file, + struct stat64 *__restrict __buf) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); +# 352 "/usr/riscv64-linux-gnu/include/sys/stat.h" 3 +extern int chmod (const char *__file, __mode_t __mode) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + +extern int lchmod (const char *__file, __mode_t __mode) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + +extern int fchmod (int __fd, __mode_t __mode) noexcept (true); + + + + + +extern int fchmodat (int __fd, const char *__file, __mode_t __mode, + int __flag) + noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + + + + +extern __mode_t umask (__mode_t __mask) noexcept (true); + + + + +extern __mode_t getumask (void) noexcept (true); + + + +extern int mkdir (const char *__path, __mode_t __mode) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + +extern int mkdirat (int __fd, const char *__path, __mode_t __mode) + noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + + + +extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + +extern int mknodat (int __fd, const char *__path, __mode_t __mode, + __dev_t __dev) noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + + +extern int mkfifo (const char *__path, __mode_t __mode) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + +extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) + noexcept (true) __attribute__ ((__nonnull__ (2))); + + + + + + +extern int utimensat (int __fd, const char *__path, + const struct timespec __times[2], + int __flags) + noexcept (true) __attribute__ ((__nonnull__ (2))); +# 452 "/usr/riscv64-linux-gnu/include/sys/stat.h" 3 +extern int futimens (int __fd, const struct timespec __times[2]) noexcept (true); +# 465 "/usr/riscv64-linux-gnu/include/sys/stat.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/statx.h" 1 3 +# 31 "/usr/riscv64-linux-gnu/include/bits/statx.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/linux/stat.h" 1 3 + + + + +# 1 "/usr/riscv64-linux-gnu/include/linux/types.h" 1 3 + + + + +# 1 "/usr/riscv64-linux-gnu/include/asm/types.h" 1 3 +# 1 "/usr/riscv64-linux-gnu/include/asm-generic/types.h" 1 3 + + + + + + +# 1 "/usr/riscv64-linux-gnu/include/asm-generic/int-ll64.h" 1 3 +# 12 "/usr/riscv64-linux-gnu/include/asm-generic/int-ll64.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/asm/bitsperlong.h" 1 3 +# 12 "/usr/riscv64-linux-gnu/include/asm/bitsperlong.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/asm-generic/bitsperlong.h" 1 3 +# 13 "/usr/riscv64-linux-gnu/include/asm/bitsperlong.h" 2 3 +# 13 "/usr/riscv64-linux-gnu/include/asm-generic/int-ll64.h" 2 3 + + + + + + + +typedef __signed__ char __s8; +typedef unsigned char __u8; + +typedef __signed__ short __s16; +typedef unsigned short __u16; + +typedef __signed__ int __s32; +typedef unsigned int __u32; + + +__extension__ typedef __signed__ long long __s64; +__extension__ typedef unsigned long long __u64; +# 8 "/usr/riscv64-linux-gnu/include/asm-generic/types.h" 2 3 +# 2 "/usr/riscv64-linux-gnu/include/asm/types.h" 2 3 +# 6 "/usr/riscv64-linux-gnu/include/linux/types.h" 2 3 + + + +# 1 "/usr/riscv64-linux-gnu/include/linux/posix_types.h" 1 3 + + + + +# 1 "/usr/riscv64-linux-gnu/include/linux/stddef.h" 1 3 +# 6 "/usr/riscv64-linux-gnu/include/linux/posix_types.h" 2 3 +# 25 "/usr/riscv64-linux-gnu/include/linux/posix_types.h" 3 +typedef struct { + unsigned long fds_bits[1024 / (8 * sizeof(long))]; +} __kernel_fd_set; + + +typedef void (*__kernel_sighandler_t)(int); + + +typedef int __kernel_key_t; +typedef int __kernel_mqd_t; + +# 1 "/usr/riscv64-linux-gnu/include/asm/posix_types.h" 1 3 +# 1 "/usr/riscv64-linux-gnu/include/asm-generic/posix_types.h" 1 3 +# 15 "/usr/riscv64-linux-gnu/include/asm-generic/posix_types.h" 3 +typedef long __kernel_long_t; +typedef unsigned long __kernel_ulong_t; + + + +typedef __kernel_ulong_t __kernel_ino_t; + + + +typedef unsigned int __kernel_mode_t; + + + +typedef int __kernel_pid_t; + + + +typedef int __kernel_ipc_pid_t; + + + +typedef unsigned int __kernel_uid_t; +typedef unsigned int __kernel_gid_t; + + + +typedef __kernel_long_t __kernel_suseconds_t; + + + +typedef int __kernel_daddr_t; + + + +typedef unsigned int __kernel_uid32_t; +typedef unsigned int __kernel_gid32_t; + + + +typedef __kernel_uid_t __kernel_old_uid_t; +typedef __kernel_gid_t __kernel_old_gid_t; + + + +typedef unsigned int __kernel_old_dev_t; +# 72 "/usr/riscv64-linux-gnu/include/asm-generic/posix_types.h" 3 +typedef __kernel_ulong_t __kernel_size_t; +typedef __kernel_long_t __kernel_ssize_t; +typedef __kernel_long_t __kernel_ptrdiff_t; + + + + +typedef struct { + int val[2]; +} __kernel_fsid_t; + + + + + +typedef __kernel_long_t __kernel_off_t; +typedef long long __kernel_loff_t; +typedef __kernel_long_t __kernel_old_time_t; +typedef __kernel_long_t __kernel_time_t; +typedef long long __kernel_time64_t; +typedef __kernel_long_t __kernel_clock_t; +typedef int __kernel_timer_t; +typedef int __kernel_clockid_t; +typedef char * __kernel_caddr_t; +typedef unsigned short __kernel_uid16_t; +typedef unsigned short __kernel_gid16_t; +# 2 "/usr/riscv64-linux-gnu/include/asm/posix_types.h" 2 3 +# 37 "/usr/riscv64-linux-gnu/include/linux/posix_types.h" 2 3 +# 10 "/usr/riscv64-linux-gnu/include/linux/types.h" 2 3 +# 24 "/usr/riscv64-linux-gnu/include/linux/types.h" 3 +typedef __u16 __le16; +typedef __u16 __be16; +typedef __u32 __le32; +typedef __u32 __be32; +typedef __u64 __le64; +typedef __u64 __be64; + +typedef __u16 __sum16; +typedef __u32 __wsum; +# 47 "/usr/riscv64-linux-gnu/include/linux/types.h" 3 +typedef unsigned __poll_t; +# 6 "/usr/riscv64-linux-gnu/include/linux/stat.h" 2 3 +# 56 "/usr/riscv64-linux-gnu/include/linux/stat.h" 3 +struct statx_timestamp { + __s64 tv_sec; + __u32 tv_nsec; + __s32 __reserved; +}; +# 99 "/usr/riscv64-linux-gnu/include/linux/stat.h" 3 +struct statx { + + __u32 stx_mask; + __u32 stx_blksize; + __u64 stx_attributes; + + __u32 stx_nlink; + __u32 stx_uid; + __u32 stx_gid; + __u16 stx_mode; + __u16 __spare0[1]; + + __u64 stx_ino; + __u64 stx_size; + __u64 stx_blocks; + __u64 stx_attributes_mask; + + struct statx_timestamp stx_atime; + struct statx_timestamp stx_btime; + struct statx_timestamp stx_ctime; + struct statx_timestamp stx_mtime; + + __u32 stx_rdev_major; + __u32 stx_rdev_minor; + __u32 stx_dev_major; + __u32 stx_dev_minor; + + __u64 stx_mnt_id; + __u64 __spare2; + + __u64 __spare3[12]; + +}; +# 32 "/usr/riscv64-linux-gnu/include/bits/statx.h" 2 3 + + + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/statx-generic.h" 1 3 +# 25 "/usr/riscv64-linux-gnu/include/bits/statx-generic.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/struct_statx_timestamp.h" 1 3 +# 26 "/usr/riscv64-linux-gnu/include/bits/statx-generic.h" 2 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/types/struct_statx.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/bits/statx-generic.h" 2 3 +# 57 "/usr/riscv64-linux-gnu/include/bits/statx-generic.h" 3 +extern "C" { + + +int statx (int __dirfd, const char *__restrict __path, int __flags, + unsigned int __mask, struct statx *__restrict __buf) + noexcept (true) __attribute__ ((__nonnull__ (2, 5))); + +} +# 40 "/usr/riscv64-linux-gnu/include/bits/statx.h" 2 3 +# 466 "/usr/riscv64-linux-gnu/include/sys/stat.h" 2 3 + + +} +# 78 "/home/rehn/source/jdk/open/src/hotspot/os/posix/include/jvm_md.h" 2 + + + + + + +# 1 "/usr/riscv64-linux-gnu/include/sys/socket.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/sys/socket.h" 3 +extern "C" { + + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 29 "/usr/riscv64-linux-gnu/include/sys/socket.h" 2 3 + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/socket.h" 1 3 +# 27 "/usr/riscv64-linux-gnu/include/bits/socket.h" 3 +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/stddef.h" 1 3 4 +# 28 "/usr/riscv64-linux-gnu/include/bits/socket.h" 2 3 +# 38 "/usr/riscv64-linux-gnu/include/bits/socket.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/socket_type.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/socket_type.h" 3 +enum __socket_type +{ + SOCK_STREAM = 1, + + + SOCK_DGRAM = 2, + + + SOCK_RAW = 3, + + SOCK_RDM = 4, + + SOCK_SEQPACKET = 5, + + + SOCK_DCCP = 6, + + SOCK_PACKET = 10, + + + + + + + + SOCK_CLOEXEC = 02000000, + + + SOCK_NONBLOCK = 00004000 + + +}; +# 39 "/usr/riscv64-linux-gnu/include/bits/socket.h" 2 3 +# 177 "/usr/riscv64-linux-gnu/include/bits/socket.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/sockaddr.h" 1 3 +# 28 "/usr/riscv64-linux-gnu/include/bits/sockaddr.h" 3 +typedef unsigned short int sa_family_t; +# 178 "/usr/riscv64-linux-gnu/include/bits/socket.h" 2 3 + + +struct sockaddr + { + sa_family_t sa_family; + char sa_data[14]; + }; +# 193 "/usr/riscv64-linux-gnu/include/bits/socket.h" 3 +struct sockaddr_storage + { + sa_family_t ss_family; + char __ss_padding[(128 - (sizeof (unsigned short int)) - sizeof (unsigned long int))]; + unsigned long int __ss_align; + }; + + + +enum + { + MSG_OOB = 0x01, + + MSG_PEEK = 0x02, + + MSG_DONTROUTE = 0x04, + + + + MSG_TRYHARD = MSG_DONTROUTE, + + + MSG_CTRUNC = 0x08, + + MSG_PROXY = 0x10, + + MSG_TRUNC = 0x20, + + MSG_DONTWAIT = 0x40, + + MSG_EOR = 0x80, + + MSG_WAITALL = 0x100, + + MSG_FIN = 0x200, + + MSG_SYN = 0x400, + + MSG_CONFIRM = 0x800, + + MSG_RST = 0x1000, + + MSG_ERRQUEUE = 0x2000, + + MSG_NOSIGNAL = 0x4000, + + MSG_MORE = 0x8000, + + MSG_WAITFORONE = 0x10000, + + MSG_BATCH = 0x40000, + + MSG_ZEROCOPY = 0x4000000, + + MSG_FASTOPEN = 0x20000000, + + + MSG_CMSG_CLOEXEC = 0x40000000 + + + + }; + + + + +struct msghdr + { + void *msg_name; + socklen_t msg_namelen; + + struct iovec *msg_iov; + size_t msg_iovlen; + + void *msg_control; + size_t msg_controllen; + + + + + int msg_flags; + }; + + +struct cmsghdr + { + size_t cmsg_len; + + + + + int cmsg_level; + int cmsg_type; + + __extension__ unsigned char __cmsg_data []; + + }; +# 307 "/usr/riscv64-linux-gnu/include/bits/socket.h" 3 +extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, + struct cmsghdr *__cmsg) noexcept (true); + + + + +extern __inline __attribute__ ((__gnu_inline__)) struct cmsghdr * +__attribute__ ((__leaf__)) __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) noexcept (true) +{ + if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) + + return (struct cmsghdr *) 0; + + __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))); + if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control + + __mhdr->msg_controllen) + || ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) + > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) + + return (struct cmsghdr *) 0; + return __cmsg; +} + + + + +enum + { + SCM_RIGHTS = 0x01 + + + , SCM_CREDENTIALS = 0x02 + + + }; + + + +struct ucred +{ + pid_t pid; + uid_t uid; + gid_t gid; +}; + + + + +# 1 "/usr/riscv64-linux-gnu/include/asm/socket.h" 1 3 +# 1 "/usr/riscv64-linux-gnu/include/asm-generic/socket.h" 1 3 + + + + + +# 1 "/usr/riscv64-linux-gnu/include/asm/sockios.h" 1 3 +# 1 "/usr/riscv64-linux-gnu/include/asm-generic/sockios.h" 1 3 +# 2 "/usr/riscv64-linux-gnu/include/asm/sockios.h" 2 3 +# 7 "/usr/riscv64-linux-gnu/include/asm-generic/socket.h" 2 3 +# 2 "/usr/riscv64-linux-gnu/include/asm/socket.h" 2 3 +# 357 "/usr/riscv64-linux-gnu/include/bits/socket.h" 2 3 + + + + + + +struct linger + { + int l_onoff; + int l_linger; + }; +# 34 "/usr/riscv64-linux-gnu/include/sys/socket.h" 2 3 + + +# 1 "/usr/riscv64-linux-gnu/include/bits/types/struct_osockaddr.h" 1 3 + + + + + +struct osockaddr +{ + unsigned short int sa_family; + unsigned char sa_data[14]; +}; +# 37 "/usr/riscv64-linux-gnu/include/sys/socket.h" 2 3 + + + + +enum +{ + SHUT_RD = 0, + + SHUT_WR, + + SHUT_RDWR + +}; +# 90 "/usr/riscv64-linux-gnu/include/sys/socket.h" 3 +struct mmsghdr + { + struct msghdr msg_hdr; + unsigned int msg_len; + + }; + + + + + + +extern int socket (int __domain, int __type, int __protocol) noexcept (true); + + + + + +extern int socketpair (int __domain, int __type, int __protocol, + int __fds[2]) noexcept (true); + + +extern int bind (int __fd, const struct sockaddr * __addr, socklen_t __len) + noexcept (true); + + +extern int getsockname (int __fd, struct sockaddr *__restrict __addr, + socklen_t *__restrict __len) noexcept (true); +# 126 "/usr/riscv64-linux-gnu/include/sys/socket.h" 3 +extern int connect (int __fd, const struct sockaddr * __addr, socklen_t __len); + + + +extern int getpeername (int __fd, struct sockaddr *__restrict __addr, + socklen_t *__restrict __len) noexcept (true); + + + + + + +extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags); + + + + + + +extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags); + + + + + + +extern ssize_t sendto (int __fd, const void *__buf, size_t __n, + int __flags, const struct sockaddr * __addr, + socklen_t __addr_len); +# 163 "/usr/riscv64-linux-gnu/include/sys/socket.h" 3 +extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, + int __flags, struct sockaddr *__restrict __addr, + socklen_t *__restrict __addr_len); +# 174 "/usr/riscv64-linux-gnu/include/sys/socket.h" 3 +extern ssize_t sendmsg (int __fd, const struct msghdr *__message, + int __flags); +# 195 "/usr/riscv64-linux-gnu/include/sys/socket.h" 3 +extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags); +# 216 "/usr/riscv64-linux-gnu/include/sys/socket.h" 3 +extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); +# 235 "/usr/riscv64-linux-gnu/include/sys/socket.h" 3 +extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags, + struct timespec *__tmo); +# 255 "/usr/riscv64-linux-gnu/include/sys/socket.h" 3 +extern int getsockopt (int __fd, int __level, int __optname, + void *__restrict __optval, + socklen_t *__restrict __optlen) noexcept (true); +# 277 "/usr/riscv64-linux-gnu/include/sys/socket.h" 3 +extern int setsockopt (int __fd, int __level, int __optname, + const void *__optval, socklen_t __optlen) noexcept (true); +# 296 "/usr/riscv64-linux-gnu/include/sys/socket.h" 3 +extern int listen (int __fd, int __n) noexcept (true); +# 306 "/usr/riscv64-linux-gnu/include/sys/socket.h" 3 +extern int accept (int __fd, struct sockaddr *__restrict __addr, + socklen_t *__restrict __addr_len); + + + + + + +extern int accept4 (int __fd, struct sockaddr *__restrict __addr, + socklen_t *__restrict __addr_len, int __flags); +# 324 "/usr/riscv64-linux-gnu/include/sys/socket.h" 3 +extern int shutdown (int __fd, int __how) noexcept (true); + + + + +extern int sockatmark (int __fd) noexcept (true); + + + + + + + +extern int isfdtype (int __fd, int __fdtype) noexcept (true); + + + + + +# 1 "/usr/riscv64-linux-gnu/include/bits/socket2.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/bits/socket2.h" 3 +extern ssize_t __recv_chk (int __fd, void *__buf, size_t __n, size_t __buflen, + int __flags); +extern ssize_t __recv_alias (int __fd, void *__buf, size_t __n, int __flags) __asm__ ("" "recv") + ; +extern ssize_t __recv_chk_warn (int __fd, void *__buf, size_t __n, size_t __buflen, int __flags) __asm__ ("" "__recv_chk") + + + __attribute__((__warning__ ("recv called with bigger length than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) ssize_t +recv (int __fd, void *__buf, size_t __n, int __flags) +{ + size_t sz = __builtin_object_size (__buf, 0); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && (((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) + return __recv_alias (__fd, __buf, __n, __flags); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) + return __recv_chk_warn (__fd, __buf, __n, sz, __flags); + return __recv_chk (__fd, __buf, __n, sz, __flags); +} + +extern ssize_t __recvfrom_chk (int __fd, void *__restrict __buf, size_t __n, + size_t __buflen, int __flags, + struct sockaddr *__restrict __addr, + socklen_t *__restrict __addr_len); +extern ssize_t __recvfrom_alias (int __fd, void *__restrict __buf, size_t __n, int __flags, struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len) __asm__ ("" "recvfrom") + + + ; +extern ssize_t __recvfrom_chk_warn (int __fd, void *__restrict __buf, size_t __n, size_t __buflen, int __flags, struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len) __asm__ ("" "__recvfrom_chk") + + + + + __attribute__((__warning__ ("recvfrom called with bigger length than size of " "destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) ssize_t +recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, + struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len) +{ + size_t sz = __builtin_object_size (__buf, 0); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && (((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) + return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len); + if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) + return __recvfrom_chk_warn (__fd, __buf, __n, sz, __flags, __addr, + __addr_len); + return __recvfrom_chk (__fd, __buf, __n, sz, __flags, __addr, __addr_len); +} +# 344 "/usr/riscv64-linux-gnu/include/sys/socket.h" 2 3 + + +} +# 85 "/home/rehn/source/jdk/open/src/hotspot/os/posix/include/jvm_md.h" 2 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/os.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/osInfo.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/osInfo.hpp" + +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/osInfo.hpp" +class OSInfo : AllStatic { + static size_t _vm_page_size; + static size_t _vm_allocation_granularity; + +public: + + static size_t vm_page_size() { return _vm_page_size; } + + + static size_t vm_allocation_granularity() { return _vm_allocation_granularity; } + + static void set_vm_page_size(size_t n) { + ; + _vm_page_size = n; + } + + static void set_vm_allocation_granularity(size_t n) { + ; + _vm_allocation_granularity = n; + } +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/os.hpp" 2 + + + + + + + +class frame; +class JvmtiAgent; +# 108 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/os.hpp" +class Thread; +class JavaThread; +class NativeCallStack; +class methodHandle; +class OSThread; +class Mutex; + +struct jvmtiTimerInfo; + +template class GrowableArray; + + + + +enum OSReturn { + OS_OK = 0, + OS_ERR = -1, + OS_INTRPT = -2, + OS_TIMEOUT = -3, + OS_NOMEM = -5, + OS_NORESOURCE = -6 +}; + +enum ThreadPriority { + NoPriority = -1, + MinPriority = 1, + NormPriority = 5, + NearMaxPriority = 9, + MaxPriority = 10, + + CriticalPriority = 11 +}; + +enum WXMode { + WXWrite, + WXExec +}; + + + +const bool ExecMem = true; + + +typedef void (*java_call_t)(JavaValue* value, const methodHandle& method, JavaCallArguments* args, JavaThread* thread); + +class MallocTracker; + +class os: AllStatic { + friend class VMStructs; + friend class JVMCIVMStructs; + friend class MallocTracker; +# 168 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/os.hpp" + public: + + + class PageSizes { + size_t _v; + public: + PageSizes() : _v(0) {} + void add(size_t pagesize); + bool contains(size_t pagesize) const; + + size_t next_smaller(size_t pagesize) const; + + size_t next_larger(size_t pagesize) const; + + size_t largest() const; + + size_t smallest() const; + + void print_on(outputStream* st) const; + }; + + private: + static OSThread* _starting_thread; + static PageSizes _page_sizes; + + + + + static constexpr size_t _vm_min_address_default = 16 * M; + + static char* pd_reserve_memory(size_t bytes, bool executable); + + static char* pd_attempt_reserve_memory_at(char* addr, size_t bytes, bool executable); + + static bool pd_commit_memory(char* addr, size_t bytes, bool executable); + static bool pd_commit_memory(char* addr, size_t size, size_t alignment_hint, + bool executable); + + + static void pd_commit_memory_or_exit(char* addr, size_t bytes, + bool executable, const char* mesg); + static void pd_commit_memory_or_exit(char* addr, size_t size, + size_t alignment_hint, + bool executable, const char* mesg); + static bool pd_uncommit_memory(char* addr, size_t bytes, bool executable); + static bool pd_release_memory(char* addr, size_t bytes); + + static char* pd_attempt_map_memory_to_file_at(char* addr, size_t bytes, int file_desc); + + static char* pd_map_memory(int fd, const char* file_name, size_t file_offset, + char *addr, size_t bytes, bool read_only = false, + bool allow_exec = false); + static char* pd_remap_memory(int fd, const char* file_name, size_t file_offset, + char *addr, size_t bytes, bool read_only, + bool allow_exec); + static bool pd_unmap_memory(char *addr, size_t bytes); + static void pd_free_memory(char *addr, size_t bytes, size_t alignment_hint); + static void pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint); + + static char* pd_reserve_memory_special(size_t size, size_t alignment, size_t page_size, + + char* addr, bool executable); + static bool pd_release_memory_special(char* addr, size_t bytes); + + static size_t page_size_for_region(size_t region_size, size_t min_pages, bool must_be_aligned); + + + static void get_summary_cpu_info(char* buf, size_t buflen); + static void get_summary_os_info(char* buf, size_t buflen); + + static ssize_t pd_write(int fd, const void *buf, size_t nBytes); + + static void initialize_initial_active_processor_count(); + + static void pd_init_container_support(); + + public: + static void init(void); + + static void init_container_support() { + pd_init_container_support(); + } + + static void init_before_ergo(void); + + static jint init_2(void); + + + + static char** get_environ(); + + static bool have_special_privileges(); + + static jlong javaTimeMillis(); + static jlong javaTimeNanos(); + static void javaTimeNanos_info(jvmtiTimerInfo *info_ptr); + static void javaTimeSystemUTC(jlong &seconds, jlong &nanos); + static void run_periodic_checks(outputStream* st); + + + static double elapsedTime(); + + + + static bool getTimesSecs(double* process_real_time, + double* process_user_time, + double* process_system_time); + + + static jlong elapsed_counter(); + static jlong elapsed_frequency(); + + + + + + static bool supports_vtime(); + static double elapsedVTime(); + + + + + static char* local_time_string(char *buf, size_t buflen); + static struct tm* localtime_pd (const time_t* clock, struct tm* res); + static struct tm* gmtime_pd (const time_t* clock, struct tm* res); + + + static const size_t iso8601_timestamp_size = 29; + + + + + static char* iso8601_time(jlong milliseconds_since_19700101, char* buffer, + size_t buffer_length, bool utc = false); + + + + + static char* iso8601_time(char* buffer, size_t buffer_length, bool utc = false); + + + static inline bool is_MP() { + + + + + + + + return (_processor_count != 1); + } + + + + + + static julong available_memory(); + static julong free_memory(); + + static julong physical_memory(); + static bool has_allocatable_memory_limit(size_t* limit); + static bool is_server_class_machine(); + + + + static uint processor_id(); + + + static int processor_count() { + return _processor_count; + } + static void set_processor_count(int count) { _processor_count = count; } + + + + static int active_processor_count(); + + + + static int initial_active_processor_count() { + ; + return _initial_active_processor_count; + } + + + static void set_native_thread_name(const char *name); + + + + + inline static bool uses_stack_guard_pages(); + inline static bool must_commit_stack_guard_pages(); + inline static void map_stack_shadow_pages(address sp); + static bool stack_shadow_pages_available(Thread *thread, const methodHandle& method, address sp); + + private: + + + + + + + static size_t _compiler_thread_min_stack_allowed; + static size_t _java_thread_min_stack_allowed; + static size_t _vm_internal_thread_min_stack_allowed; + static size_t _os_min_stack_allowed; + + + static jint set_minimum_stack_sizes(); + + public: + + + static bool committed_in_range(address start, size_t size, address& committed_start, size_t& committed_size); + + + + + static size_t vm_page_size() { return OSInfo::vm_page_size(); } + + + + static const PageSizes& page_sizes() { return _page_sizes; } + + + + + static size_t page_size_for_region_aligned(size_t region_size, size_t min_pages); + + + + + static size_t page_size_for_region_unaligned(size_t region_size, size_t min_pages); + + + static size_t max_page_size() { return page_sizes().largest(); } + + + static size_t min_page_size() { return 4 * K; } + + + + + + + static void trace_page_sizes(const char* str, + const size_t region_min_size, + const size_t region_max_size, + const char* base, + const size_t size, + const size_t page_size); + static void trace_page_sizes_for_requested_size(const char* str, + const size_t requested_size, + const size_t requested_page_size, + const char* base, + const size_t size, + const size_t page_size); + + static size_t vm_allocation_granularity() { return OSInfo::vm_allocation_granularity(); } + + + static size_t vm_min_address(); + + inline static size_t cds_core_region_alignment(); + + + static char* reserve_memory(size_t bytes, bool executable = false, MEMFLAGS flags = mtNone); + + + static char* reserve_memory_aligned(size_t size, size_t alignment, bool executable = false); + + + + static char* attempt_reserve_memory_at(char* addr, size_t bytes, bool executable = false); + + + + static char* attempt_reserve_memory_between(char* min, char* max, size_t bytes, size_t alignment, bool randomize); + + static bool commit_memory(char* addr, size_t bytes, bool executable); + static bool commit_memory(char* addr, size_t size, size_t alignment_hint, + bool executable); + + + static void commit_memory_or_exit(char* addr, size_t bytes, + bool executable, const char* mesg); + static void commit_memory_or_exit(char* addr, size_t size, + size_t alignment_hint, + bool executable, const char* mesg); + static bool uncommit_memory(char* addr, size_t bytes, bool executable = false); + static bool release_memory(char* addr, size_t bytes); + + + static bool can_trim_native_heap(); + + + + + struct size_change_t { size_t before; size_t after; }; + static bool trim_native_heap(size_change_t* rss_change = nullptr); + + + static void print_memory_mappings(char* addr, size_t bytes, outputStream* st); + + static void print_memory_mappings(outputStream* st); + + + + + static void pretouch_memory(void* start, void* end, size_t page_size = vm_page_size()); + + enum ProtType { MEM_PROT_NONE, MEM_PROT_READ, MEM_PROT_RW, MEM_PROT_RWX }; + static bool protect_memory(char* addr, size_t bytes, ProtType prot, + bool is_committed = true); + + static bool guard_memory(char* addr, size_t bytes); + static bool unguard_memory(char* addr, size_t bytes); + static bool create_stack_guard_pages(char* addr, size_t bytes); + static bool pd_create_stack_guard_pages(char* addr, size_t bytes); + static bool remove_stack_guard_pages(char* addr, size_t bytes); + + + static int create_file_for_heap(const char* dir); + + + static char* map_memory_to_file(size_t size, int fd); + static char* map_memory_to_file_aligned(size_t size, size_t alignment, int fd); + static char* map_memory_to_file(char* base, size_t size, int fd); + static char* attempt_map_memory_to_file_at(char* base, size_t size, int fd); + + static char* replace_existing_mapping_with_file_mapping(char* base, size_t size, int fd); + + static char* map_memory(int fd, const char* file_name, size_t file_offset, + char *addr, size_t bytes, bool read_only = false, + bool allow_exec = false, MEMFLAGS flags = mtNone); + static char* remap_memory(int fd, const char* file_name, size_t file_offset, + char *addr, size_t bytes, bool read_only, + bool allow_exec); + static bool unmap_memory(char *addr, size_t bytes); + static void free_memory(char *addr, size_t bytes, size_t alignment_hint); + static void realign_memory(char *addr, size_t bytes, size_t alignment_hint); + + + static bool numa_has_group_homing(); + static void numa_make_local(char *addr, size_t bytes, int lgrp_hint); + static void numa_make_global(char *addr, size_t bytes); + static size_t numa_get_groups_num(); + static size_t numa_get_leaf_groups(int *ids, size_t size); + static bool numa_topology_changed(); + static int numa_get_group_id(); + static int numa_get_group_id_for_address(const void* address); + static bool numa_get_group_ids_for_range(const void** addresses, int* lgrp_ids, size_t count); + + + struct page_info { + size_t size; + int lgrp_id; + }; + static char* scan_pages(char *start, char* end, page_info* page_expected, page_info* page_found); + + static char* non_memory_address_word(); + + static char* reserve_memory_special(size_t size, size_t alignment, size_t page_size, + char* addr, bool executable); + static bool release_memory_special(char* addr, size_t bytes); + static void large_page_init(); + static size_t large_page_size(); + static bool can_commit_large_page_memory(); + static bool can_execute_large_page_memory(); + + + static bool is_readable_pointer(const void* p); + static bool is_readable_range(const void* from, const void* to); + + + + enum ThreadType { + vm_thread, + gc_thread, + java_thread, + compiler_thread, + watcher_thread, + asynclog_thread, + os_thread + }; + + static bool create_thread(Thread* thread, + ThreadType thr_type, + size_t req_stack_size = 0); + + + + static bool create_main_thread(JavaThread* thread); + + + + + + + static bool is_primordial_thread(void) + + + + + ; + + + static bool create_attached_thread(JavaThread* thread); + static void pd_start_thread(Thread* thread); + static void start_thread(Thread* thread); + + + static bool signal_thread(Thread* thread, int sig, const char* reason); + + static void free_thread(OSThread* osthread); + + + static intx current_thread_id(); + static int current_process_id(); + + + + + + static void naked_short_sleep(jlong ms); + static void naked_short_nanosleep(jlong ns); + + + static void naked_sleep(jlong millis); + + [[noreturn]] static void infinite_sleep(); + static void naked_yield () ; + static OSReturn set_priority(Thread* thread, ThreadPriority priority); + static OSReturn get_priority(const Thread* const thread, ThreadPriority& priority); + + static address fetch_frame_from_context(const void* ucVoid, intptr_t** sp, intptr_t** fp); + static frame fetch_frame_from_context(const void* ucVoid); + static frame fetch_compiled_frame_from_context(const void* ucVoid); + + static void breakpoint(); + static bool start_debugging(char *buf, int buflen); + + static address current_stack_pointer(); + static void current_stack_base_and_size(address* base, size_t* size); + + static void verify_stack_alignment() {}; + + static bool message_box(const char* title, const char* message); + + + + static int fork_and_exec(const char *cmd); + + + [[noreturn]] static void exit(int num); + + + + [[noreturn]] static void _exit(int num); + + + static void shutdown(); + + + + [[noreturn]] static void abort(bool dump_core, void *siginfo, const void *context); + [[noreturn]] static void abort(bool dump_core = true); + + + + + + + [[noreturn]] static void die(); + + + static int open(const char *path, int oflag, int mode); + static FILE* fdopen(int fd, const char* mode); + static FILE* fopen(const char* path, const char* mode); + static jlong lseek(int fd, jlong offset, int whence); + static bool file_exists(const char* file); + + + + static char* native_path(char *path); + static int ftruncate(int fd, jlong length); + static int get_fileno(FILE* fp); + static void flockfile(FILE* fp); + static void funlockfile(FILE* fp); + + static int compare_file_modified_times(const char* file1, const char* file2); + + static bool same_files(const char* file1, const char* file2); + + + + static ssize_t read_at(int fd, void *buf, unsigned int nBytes, jlong offset); + + static bool write(int fd, const void *buf, size_t nBytes); + + + static DIR* opendir(const char* dirname); + static struct dirent* readdir(DIR* dirp); + static int closedir(DIR* dirp); + + static const char* get_temp_directory(); + static const char* get_current_directory(char *buf, size_t buflen); + + + + static bool dll_build_name(char* buffer, size_t size, + const char* fname); + + + + + + static bool dll_locate_lib(char* buffer, size_t size, + const char* pathname, const char* fname); + + + + + + + static bool dll_address_to_function_name(address addr, char* buf, + int buflen, int* offset, + bool demangle = true); + + + + + + static bool dll_address_to_library_name(address addr, char* buf, + int buflen, int* offset); +# 715 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/os.hpp" + static bool print_function_and_library_name(outputStream* st, + address addr, + char* buf = nullptr, int buflen = 0, + bool shorten_paths = true, + bool demangle = true, + bool strip_arguments = false); + + + inline static void* resolve_function_descriptor(void* p); + + + static bool address_is_in_vm(address addr); + + + + + + static void* dll_load(const char *name, char *ebuf, int ebuflen); + + + static void* dll_lookup(void* handle, const char* name); + + + static void dll_unload(void *lib); + + + + + + + + typedef int (*LoadedModulesCallbackFunc)(const char *, address, address, void *); + + static int get_loaded_modules_info(LoadedModulesCallbackFunc callback, void *param); + + + static void* get_default_process_handle(); + + + static bool find_builtin_agent(JvmtiAgent *agent_lib, const char *syms[], + size_t syms_len); + + + static void *find_agent_function(JvmtiAgent *agent_lib, bool check_lib, + const char *syms[], size_t syms_len); + + + + static int vsnprintf(char* buf, size_t len, const char* fmt, va_list args) __attribute__((format(printf, 3, 0))); + static int snprintf(char* buf, size_t len, const char* fmt, ...) __attribute__((format(printf, 3, 4))); + + + + static int snprintf_checked(char* buf, size_t len, const char* fmt, ...) __attribute__((format(printf, 3, 4))); + + + static bool get_host_name(char* buf, size_t buflen); + + + + static void print_os_info(outputStream* st); + static void print_os_info_brief(outputStream* st); + static void print_cpu_info(outputStream* st, char* buf, size_t buflen); + static void pd_print_cpu_info(outputStream* st, char* buf, size_t buflen); + static void print_summary_info(outputStream* st, char* buf, size_t buflen); + static void print_memory_info(outputStream* st); + static void print_dll_info(outputStream* st); + static void print_environment_variables(outputStream* st, const char** env_list); + static void print_context(outputStream* st, const void* context); + static void print_tos_pc(outputStream* st, const void* context); + static void print_tos(outputStream* st, address sp); + static void print_instructions(outputStream* st, address pc, int unitsize = 1); + static void print_register_info(outputStream* st, const void* context, int& continuation); + static void print_register_info(outputStream* st, const void* context); + static bool signal_sent_by_kill(const void* siginfo); + static void print_siginfo(outputStream* st, const void* siginfo); + static void print_signal_handlers(outputStream* st, char* buf, size_t buflen); + static void print_date_and_time(outputStream* st, char* buf, size_t buflen); + + static void print_user_info(outputStream* st); + static void print_active_locale(outputStream* st); + + + static void print_dhm(outputStream* st, const char* startStr, long sec); + + static void print_location(outputStream* st, intptr_t x, bool verbose = false); + static size_t lasterror(char *buf, size_t len); + static int get_last_error(); + + + static void jfr_report_memory_info() ; +# 814 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/os.hpp" + static const char* strerror(int e); + + + + + + + static const char* errno_name(int e); + + + static void wait_for_keypress_at_exit(void); +# 837 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/os.hpp" + static bool is_first_C_frame(frame *fr); + static frame get_sender_for_C_frame(frame *fr); + + + static frame current_frame(); + + static void print_hex_dump(outputStream* st, address start, address end, int unitsize, + int bytes_per_line, address logical_start); + static void print_hex_dump(outputStream* st, address start, address end, int unitsize) { + print_hex_dump(st, start, end, unitsize, 16, start); + } + + + + static const char* exception_name(int exception_code, char* buf, size_t buflen); + + + static int get_signal_number(const char* signal_name); + + + static void* native_java_library(); + + + static void jvm_path(char *buf, jint buflen); + + + static void print_jni_name_prefix_on(outputStream* st, int args_size); + static void print_jni_name_suffix_on(outputStream* st, int args_size); + + + static void init_system_properties_values(); + + + static int stat(const char* path, struct stat* sbuf); + static bool dir_is_empty(const char* path); + + + static int create_binary_file(const char* path, bool rewrite_existing); + static jlong current_file_offset(int fd); + static jlong seek_to_file_offset(int fd, jlong offset); + + + + + + + + static int get_native_stack(address* stack, int size, int toSkip = 0); + + + static void* malloc (size_t size, MEMFLAGS flags, const NativeCallStack& stack); + static void* malloc (size_t size, MEMFLAGS flags); + static void* realloc (void *memblock, size_t size, MEMFLAGS flag, const NativeCallStack& stack); + static void* realloc (void *memblock, size_t size, MEMFLAGS flag); + + + static void free (void *memblock); + static char* strdup(const char *, MEMFLAGS flags = mtInternal); + + static char* strdup_check_oom(const char*, MEMFLAGS flags = mtInternal); + + + static int socket_close(int fd); + static ssize_t recv(int fd, char* buf, size_t nBytes, uint flags); + static ssize_t send(int fd, char* buf, size_t nBytes, uint flags); + static ssize_t raw_send(int fd, char* buf, size_t nBytes, uint flags); + static ssize_t connect(int fd, struct sockaddr* him, socklen_t len); + + + static void initialize_jdk_signal_support(JavaThread* __the_thread__); + static void signal_notify(int signal_number); + static int signal_wait(); + static void terminate_signal_thread(); + static int sigexitnum_pd(); + + + static int random(); + static int next_random(unsigned int rand_seed); + static void init_random(unsigned int initval); + + + static void os_exception_wrapper(java_call_t f, JavaValue* value, const methodHandle& method, JavaCallArguments* args, JavaThread* thread); + + + + + + + + static void check_dump_limit(char* buffer, size_t bufferSize); + + + + static int get_core_path(char* buffer, size_t bufferSize); +# 940 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/os.hpp" + static jlong current_thread_cpu_time(); + static jlong thread_cpu_time(Thread* t); + + + + + + static jlong current_thread_cpu_time(bool user_sys_cpu_time); + static jlong thread_cpu_time(Thread* t, bool user_sys_cpu_time); + + + + + static void current_thread_cpu_time_info(jvmtiTimerInfo *info_ptr); + static void thread_cpu_time_info(jvmtiTimerInfo *info_ptr); + + static bool is_thread_cpu_time_supported(); + + + static int loadavg(double loadavg[], int nelem); + + + static int extra_bang_size_in_bytes(); + + static char** split_path(const char* path, size_t* elements, size_t file_name_length); + + + static bool supports_map_sync(); + + public: + + + static const char* file_separator(); + static const char* line_separator(); + static const char* path_separator(); + + + inline static bool zero_page_read_protected(); + + static void setup_fpu(); + static juint cpu_microcode_revision(); + + static inline jlong rdtsc(); + + + + inline static bool register_code_area(char *low, char *high); +# 997 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/os.hpp" + class Linux; + + + + + + + class Posix; +# 1019 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/os.hpp" + public: + inline static bool platform_print_native_stack(outputStream* st, const void* context, + char *buf, int buf_size, address& lastpc); + + + static bool find(address pc, outputStream* st = tty); + + static bool dont_yield(); + + + static OSReturn set_native_priority(Thread* thread, int native_prio); + static OSReturn get_native_priority(const Thread* const thread, int* priority_ptr); + static int java_to_os_priority[CriticalPriority + 1]; + + + static const char* native_thread_creation_failed_msg() { + return "unable to create native thread: possibly out of memory or process/resource limits reached"; + } + + + + + + static void pause(); + + + + static char* build_agent_function_name(const char *sym, const char *cname, + bool is_absolute_path); + + + + + + + protected: + static volatile unsigned int _rand_seed; + static int _processor_count; + static int _initial_active_processor_count; + + static char* format_boot_path(const char* format_string, + const char* home, + int home_len, + char fileSep, + char pathSep); + static bool set_boot_path(char fileSep, char pathSep); + +}; + + + + + + +extern "C" int SpinPause(); +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/java.hpp" 2 + + +class Handle; +class JavaThread; +class Symbol; + + +extern void before_exit(JavaThread * thread, bool halt = false); + + +extern void vm_exit(int code); + + +extern void vm_direct_exit(int code); +extern void vm_direct_exit(int code, const char* message); + + +extern void vm_shutdown(); + +extern void vm_abort(bool dump_core=true); + + +extern void notify_vm_shutdown(); + + +extern void vm_exit_during_initialization(); +extern void vm_exit_during_initialization(Handle exception); +extern void vm_exit_during_initialization(Symbol* exception_name, const char* message); +extern void vm_exit_during_initialization(const char* error, const char* message = nullptr); +extern void vm_shutdown_during_initialization(const char* error, const char* message = nullptr); + +extern void vm_exit_during_cds_dumping(const char* error, const char* message = nullptr); + + + + + + +class JDK_Version { + friend class VMStructs; + friend class Universe; + friend void JDK_Version_init(); + private: + + static JDK_Version _current; + static const char* _java_version; + static const char* _runtime_name; + static const char* _runtime_version; + static const char* _runtime_vendor_version; + static const char* _runtime_vendor_vm_bug_url; + + int _major; + int _minor; + int _security; + int _patch; + int _build; + + bool is_valid() const { + return (_major != 0); + } + + + static void initialize(); + + public: + + JDK_Version() : + _major(0), _minor(0), _security(0), _patch(0), _build(0) + {} + + JDK_Version(int major, int minor = 0, int security = 0, + int patch = 0, int build = 0) : + _major(major), _minor(minor), _security(security), _patch(patch), _build(build) + {} + + + static JDK_Version current() { return _current; } + + + static JDK_Version jdk(int m) { + return JDK_Version(m); + } + + static JDK_Version undefined() { + return JDK_Version(0); + } + + bool is_undefined() const { + return _major == 0; + } + + int major_version() const { return _major; } + int minor_version() const { return _minor; } + int security_version() const { return _security; } + int patch_version() const { return _patch; } + int build_number() const { return _build; } + + + int compare(const JDK_Version& other) const; + + void to_string(char* buffer, size_t buflen) const; + + static const char* java_version() { + return _java_version; + } + static void set_java_version(const char* version) { + _java_version = os::strdup(version); + } + + static const char* runtime_name() { + return _runtime_name; + } + static void set_runtime_name(const char* name) { + _runtime_name = os::strdup(name); + } + + static const char* runtime_version() { + return _runtime_version; + } + static void set_runtime_version(const char* version) { + _runtime_version = os::strdup(version); + } + + static const char* runtime_vendor_version() { + return _runtime_vendor_version; + } + static void set_runtime_vendor_version(const char* vendor_version) { + _runtime_vendor_version = os::strdup(vendor_version); + } + + static const char* runtime_vendor_vm_bug_url() { + return _runtime_vendor_vm_bug_url; + } + static void set_runtime_vendor_vm_bug_url(const char* vendor_vm_bug_url) { + _runtime_vendor_vm_bug_url = os::strdup(vendor_vm_bug_url); + } + +}; +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/arguments.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/vmEnums.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/vmEnums.hpp" +enum class JavaThreadStatus : int; +enum class JVMFlagOrigin : int; +enum JVMFlagsEnum : int; +enum class vmClassID : int; +enum class vmIntrinsicID : int; +enum class vmSymbolID : int; +# 37 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/arguments.hpp" 2 + + + +class JVMFlag; + + +extern "C" { + typedef void ( *abort_hook_t)(void); + typedef void ( *exit_hook_t)(jint code); + typedef jint ( *vfprintf_hook_t)(FILE *fp, const char *format, va_list args) __attribute__((format(printf, 2, 0))); +} + + +struct SpecialFlag { + const char* name; + JDK_Version deprecated_in; + JDK_Version obsolete_in; + JDK_Version expired_in; +}; + +struct LegacyGCLogging { + const char* file; + int lastFlag; +}; + + + + + +class PathString : public CHeapObj { + protected: + char* _value; + public: + char* value() const { return _value; } + + + bool set_value(const char *value, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); + void append_value(const char *value); + + PathString(const char* value); + ~PathString(); + + + static int value_offset_in_bytes() { return (int)([]() { alignas(16) char space[sizeof (PathString)]; PathString* dummyObj = (PathString*)space; char* c = (char*)(void*)&dummyObj->_value; return (size_t)(c - space); }()); } +}; + + +class ModulePatchPath : public CHeapObj { +private: + char* _module_name; + PathString* _path; +public: + ModulePatchPath(const char* module_name, const char* path); + ~ModulePatchPath(); + + inline const char* module_name() const { return _module_name; } + inline char* path_string() const { return _path->value(); } +}; + + + + + + +class SystemProperty : public PathString { + private: + char* _key; + SystemProperty* _next; + bool _internal; + bool _writeable; + + public: + + char* value() const { return PathString::value(); } + const char* key() const { return _key; } + bool internal() const { return _internal; } + SystemProperty* next() const { return _next; } + void set_next(SystemProperty* next) { _next = next; } + bool writeable() const { return _writeable; } + + bool readable() const { + return !_internal || (strcmp(_key, "jdk.boot.class.path.append") == 0 && + value() != nullptr); + } +# 129 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/arguments.hpp" + void set_writeable_value(const char *value) { + if (writeable()) { + set_value(value); + } + } + void append_writeable_value(const char *value) { + if (writeable()) { + append_value(value); + } + } + + + SystemProperty(const char* key, const char* value, bool writeable, bool internal = false); + + + static int key_offset_in_bytes() { return (int)([]() { alignas(16) char space[sizeof (SystemProperty)]; SystemProperty* dummyObj = (SystemProperty*)space; char* c = (char*)(void*)&dummyObj->_key; return (size_t)(c - space); }()); } + static int next_offset_in_bytes() { return (int)([]() { alignas(16) char space[sizeof (SystemProperty)]; SystemProperty* dummyObj = (SystemProperty*)space; char* c = (char*)(void*)&dummyObj->_next; return (size_t)(c - space); }()); } +}; + + +class ScopedVMInitArgs; + +class Arguments : AllStatic { + friend class VMStructs; + friend class JvmtiExport; + friend class CodeCacheExtensions; + friend class ArgumentsTest; + friend class LargeOptionsTest; + public: + + enum Mode { + _int, + _mixed, + _comp + }; + + enum ArgsRange { + arg_unreadable = -3, + arg_too_small = -2, + arg_too_big = -1, + arg_in_range = 0 + }; + + enum PropertyAppendable { + AppendProperty, + AddProperty + }; + + enum PropertyWriteable { + WriteableProperty, + UnwriteableProperty + }; + + enum PropertyInternal { + InternalProperty, + ExternalProperty + }; + + private: + + + static char* _jvm_flags_file; + + static char** _jvm_flags_array; + static int _num_jvm_flags; + + static char** _jvm_args_array; + static int _num_jvm_args; + + static char* _java_command; + + + static SystemProperty* _system_properties; + + + static SystemProperty *_sun_boot_library_path; + static SystemProperty *_java_library_path; + static SystemProperty *_java_home; + static SystemProperty *_java_class_path; + static SystemProperty *_jdk_boot_class_path_append; + static SystemProperty *_vm_info; + + + + + static GrowableArray* _patch_mod_prefix; +# 224 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/arguments.hpp" + static PathString* _boot_class_path; + + + static bool _has_jimage; + + + + static char* _ext_dirs; + + + static const char* _java_vendor_url_bug; + + + + static const char* _sun_java_launcher; + + + static bool _sun_java_launcher_is_altjvm; + + + static LegacyGCLogging _legacyGCLogging; + + + static size_t _conservative_max_heap_alignment; + + + static Mode _mode; + static void set_mode_flags(Mode mode); + + + static bool _enable_preview; + + + static bool _AlwaysCompileLoopMethods; + static bool _UseOnStackReplacement; + static bool _BackgroundCompilation; + static bool _ClipInlining; + + + static void set_conservative_max_heap_alignment(); + static void set_use_compressed_oops(); + static void set_use_compressed_klass_ptrs(); + static jint set_ergonomics_flags(); + static void set_shared_spaces_flags_and_archive_paths(); + + + + static size_t limit_heap_by_allocatable_memory(size_t size); + + static void set_heap_size(); + + + static void set_bytecode_flags(); + + + static abort_hook_t _abort_hook; + static exit_hook_t _exit_hook; + static vfprintf_hook_t _vfprintf_hook; + + + static bool add_property(const char* prop, PropertyWriteable writeable=WriteableProperty, + PropertyInternal internal=ExternalProperty); + + + + + static bool create_module_property(const char* prop_name, const char* prop_value, PropertyInternal internal); + static bool create_numbered_module_property(const char* prop_base_name, const char* prop_value, unsigned int count); + + static int process_patch_mod_option(const char* patch_mod_tail, bool* patch_mod_javabase); + + + static jint set_aggressive_opts_flags(); + + static jint set_aggressive_heap_flags(); + + + static bool parse_argument(const char* arg, JVMFlagOrigin origin); + static bool process_argument(const char* arg, jboolean ignore_unrecognized, JVMFlagOrigin origin); + static void process_java_launcher_argument(const char*, void*); + static jint parse_options_environment_variable(const char* name, ScopedVMInitArgs* vm_args); + static jint parse_java_tool_options_environment_variable(ScopedVMInitArgs* vm_args); + static jint parse_java_options_environment_variable(ScopedVMInitArgs* vm_args); + static jint parse_vm_options_file(const char* file_name, ScopedVMInitArgs* vm_args); + static jint parse_options_buffer(const char* name, char* buffer, const size_t buf_len, ScopedVMInitArgs* vm_args); + static jint parse_xss(const JavaVMOption* option, const char* tail, intx* out_ThreadStackSize); + static jint insert_vm_options_file(const JavaVMInitArgs* args, + const char* vm_options_file, + const int vm_options_file_pos, + ScopedVMInitArgs* vm_options_file_args, + ScopedVMInitArgs* args_out); + static bool args_contains_vm_options_file_arg(const JavaVMInitArgs* args); + static jint expand_vm_options_as_needed(const JavaVMInitArgs* args_in, + ScopedVMInitArgs* mod_args, + JavaVMInitArgs** args_out); + static jint match_special_option_and_act(const JavaVMInitArgs* args, + ScopedVMInitArgs* args_out); + + static bool handle_deprecated_print_gc_flags(); + + static jint parse_vm_init_args(const JavaVMInitArgs *vm_options_args, + const JavaVMInitArgs *java_tool_options_args, + const JavaVMInitArgs *java_options_args, + const JavaVMInitArgs *cmd_line_args); + static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_mod_javabase, JVMFlagOrigin origin); + static jint finalize_vm_init_args(bool patch_mod_javabase); + static bool is_bad_option(const JavaVMOption* option, jboolean ignore, const char* option_type); + + static bool is_bad_option(const JavaVMOption* option, jboolean ignore) { + return is_bad_option(option, ignore, nullptr); + } + + static void describe_range_error(ArgsRange errcode); + static ArgsRange check_memory_size(julong size, julong min_size, julong max_size); + static ArgsRange parse_memory_size(const char* s, julong* long_arg, + julong min_size, julong max_size = max_uintx); + + + static void build_jvm_args(const char* arg); + static void build_jvm_flags(const char* arg); + static void add_string(char*** bldarray, int* count, const char* arg); + static const char* build_resource_string(char** args, int count); + + + + + static bool is_obsolete_flag(const char* flag_name, JDK_Version* version); + + + + + + + static int is_deprecated_flag(const char* flag_name, JDK_Version* version); + + + static const char* real_flag_name(const char *flag_name); + static JVMFlag* find_jvm_flag(const char* name, size_t name_length); + + + + static const char* handle_aliases_and_deprecation(const char* arg); + + static char* _default_shared_archive_path; + static char* SharedArchivePath; + static char* SharedDynamicArchivePath; + static size_t _default_SharedBaseAddress; + static void extract_shared_archive_paths(const char* archive_path, + char** base_archive_path, + char** top_archive_path) ; + + public: + static int num_archives(const char* archive_path) ; + + static jint parse(const JavaVMInitArgs* args); + + + + + static bool parse_uint(const char* value, uint* uintx_arg, + uint min_size); + + static jint apply_ergo(); + + static jint adjust_after_os(); + + + static bool check_vm_args_consistency(); + + static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized); + + static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; } + + static size_t max_heap_for_compressed_oops(); + + + static char** jvm_flags_array() { return _jvm_flags_array; } + static char** jvm_args_array() { return _jvm_args_array; } + static int num_jvm_flags() { return _num_jvm_flags; } + static int num_jvm_args() { return _num_jvm_args; } + + static const char* java_command() { return _java_command; } + + + static void print_on(outputStream* st); + static void print_summary_on(outputStream* st); + + + static const char* get_jvm_flags_file() { return _jvm_flags_file; } + static void set_jvm_flags_file(const char *value) { + if (_jvm_flags_file != nullptr) { + os::free(_jvm_flags_file); + } + _jvm_flags_file = os::strdup_check_oom(value); + } + + static const char* jvm_flags() { return build_resource_string(_jvm_flags_array, _num_jvm_flags); } + static const char* jvm_args() { return build_resource_string(_jvm_args_array, _num_jvm_args); } + static void print_jvm_flags_on(outputStream* st); + static void print_jvm_args_on(outputStream* st); + + + static SystemProperty* system_properties() { return _system_properties; } + static const char* get_property(const char* key); + + + static const char* java_vendor_url_bug() { return _java_vendor_url_bug; } + + + static const char* sun_java_launcher() { return _sun_java_launcher; } + + static bool created_by_java_launcher(); + + static bool sun_java_launcher_is_altjvm(); + + + static abort_hook_t abort_hook() { return _abort_hook; } + static exit_hook_t exit_hook() { return _exit_hook; } + static vfprintf_hook_t vfprintf_hook() { return _vfprintf_hook; } + + static const char* GetSharedArchivePath() { return SharedArchivePath; } + static const char* GetSharedDynamicArchivePath() { return SharedDynamicArchivePath; } + static size_t default_SharedBaseAddress() { return _default_SharedBaseAddress; } + + static void process_sun_java_launcher_properties(JavaVMInitArgs* args); + + + static void init_system_properties(); + + + static void init_version_specific_system_properties(); + + + static void update_vm_info_property(const char* vm_info) { + _vm_info->set_value(vm_info); + } + + + static void PropertyList_add(SystemProperty *element); + static void PropertyList_add(SystemProperty** plist, SystemProperty *element); + static void PropertyList_add(SystemProperty** plist, const char* k, const char* v, bool writeable, bool internal); + + static void PropertyList_unique_add(SystemProperty** plist, const char* k, const char* v, + PropertyAppendable append, PropertyWriteable writeable, + PropertyInternal internal); + static const char* PropertyList_get_value(SystemProperty* plist, const char* key); + static const char* PropertyList_get_readable_value(SystemProperty* plist, const char* key); + static int PropertyList_count(SystemProperty* pl); + static int PropertyList_readable_count(SystemProperty* pl); + + static bool is_internal_module_property(const char* option); + + + static void set_dll_dir(const char *value) { _sun_boot_library_path->set_value(value); } + static void set_java_home(const char *value) { _java_home->set_value(value); } + static void set_library_path(const char *value) { _java_library_path->set_value(value); } + static void set_ext_dirs(char *value) { _ext_dirs = os::strdup_check_oom(value); } + + + static void add_patch_mod_prefix(const char *module_name, const char *path, bool* patch_mod_javabase); + static void set_boot_class_path(const char *value, bool has_jimage) { + + ; + _boot_class_path->set_value(value); + _has_jimage = has_jimage; + } + static void append_sysclasspath(const char *value) { + _boot_class_path->append_value(value); + _jdk_boot_class_path_append->append_value(value); + } + + static GrowableArray* get_patch_mod_prefix() { return _patch_mod_prefix; } + static char* get_boot_class_path() { return _boot_class_path->value(); } + static bool has_jimage() { return _has_jimage; } + + static char* get_java_home() { return _java_home->value(); } + static char* get_dll_dir() { return _sun_boot_library_path->value(); } + static char* get_appclasspath() { return _java_class_path->value(); } + static void fix_appclasspath(); + + static char* get_default_shared_archive_path() ; + static void init_shared_archive_paths() ; + + + static Mode mode() { return _mode; } + static bool is_interpreter_only() { return mode() == _int; } + static bool is_compiler_only() { return mode() == _comp; } + + + + static void set_enable_preview() { _enable_preview = true; } + static bool enable_preview() { return _enable_preview; } + + + static bool copy_expand_pid(const char* src, size_t srclen, char* buf, size_t buflen); + + static void check_unsupported_dumping_properties() ; + + static bool check_unsupported_cds_runtime_properties() ; + + static bool atojulong(const char *s, julong* result); + + static bool has_jfr_option() ; + + static bool is_dumping_archive() { return DumpSharedSpaces || DynamicDumpSharedSpaces; } + + static void assert_is_dumping_archive() { + ; + } + + +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/vm_version_riscv.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals_extension.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals_extension.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/allFlags.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/allFlags.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/cds/cds_globals.hpp" 1 +# 100 "/home/rehn/source/jdk/open/src/hotspot/share/cds/cds_globals.hpp" +extern "C" bool VerifySharedSpaces; extern "C" bool RecordDynamicDumpInfo; extern "C" bool AutoCreateSharedArchive; extern "C" bool PrintSharedArchiveAndExit; extern "C" size_t SharedBaseAddress; extern "C" ccstr SharedArchiveConfigFile; extern "C" uint SharedSymbolTableBucketSize; extern "C" bool AllowArchivingWithJavaAgent; const ccstr ArchiveHeapTestClass = nullptr; extern "C" ccstr DumpLoadedClassList; extern "C" ccstr SharedClassListFile; extern "C" ccstr SharedArchiveFile; extern "C" ccstr ArchiveClassesAtExit; extern "C" ccstr ExtraSharedClassListFile; extern "C" int ArchiveRelocationMode; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/allFlags.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compiler_globals.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compiler_globals.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/c1/c1_globals.hpp" 1 +# 321 "/home/rehn/source/jdk/open/src/hotspot/share/c1/c1_globals.hpp" +const bool PrintC1Statistics = false; const bool PrintInitialBlockList = false; const bool PrintCFG = false; const bool PrintCFG0 = false; const bool PrintCFG1 = false; const bool PrintCFG2 = false; const bool PrintIRDuringConstruction = false; const bool PrintPhiFunctions = false; const bool PrintIR = false; const bool PrintIR0 = false; const bool PrintIR1 = false; const bool PrintIR2 = false; const bool PrintSimpleStubs = false; const bool UseC1Optimizations = true; const bool SelectivePhiFunctions = true; const bool OptimizeIfOps = true; const bool DoCEE = true; const bool PrintCEE = false; const bool UseLocalValueNumbering = true; const bool UseGlobalValueNumbering = true; extern "C" bool UseLoopInvariantCodeMotion; const bool TracePredicateFailedTraps = false; const bool StressLoopInvariantCodeMotion = false; const bool TraceRangeCheckElimination = false; const bool AssertRangeCheckElimination = false; const bool StressRangeCheckElimination = false; const bool PrintValueNumbering = false; extern "C" intx ValueMapInitialSize; extern "C" intx ValueMapMaxLoopSize; const bool EliminateBlocks = true; const bool PrintBlockElimination = false; const bool EliminateNullChecks = true; const bool PrintNullCheckElimination = false; const bool EliminateFieldAccess = true; const bool InlineMethodsWithExceptionHandlers = true; extern "C" bool InlineSynchronizedMethods; const bool CanonicalizeNodes = true; const bool PrintCanonicalization = false; const bool UseTableRanges = true; extern "C" intx C1MaxInlineSize; extern "C" intx C1MaxTrivialSize; extern "C" intx C1MaxInlineLevel; extern "C" intx C1MaxRecursiveInlineLevel; extern "C" intx C1InlineStackLimit; const intx NestedInliningSizeRatio = 90; const bool PrintIRWithLIR = false; const bool PrintLIRWithAssembly = false; const bool CommentedAssembly = false; const bool LIRTraceExecution = false; const bool CSEArrayLength = pd_CSEArrayLength; const intx TraceLinearScanLevel = 0; const bool StressLinearScan = false; extern "C" bool TimeLinearScan; const bool TimeEachLinearScan = false; const bool CountLinearScan = false; const bool C1Breakpoint = false; const bool ImplicitDiv0Checks = true; const bool PinAllInstructions = false; const bool UseFastNewInstance = true; const bool UseFastNewTypeArray = true; const bool UseFastNewObjectArray = true; const bool UseSlowPath = false; const bool GenerateArrayStoreCheck = true; const bool DeoptC1 = true; const bool PrintBailouts = false; const bool TracePatching = false; const bool PatchALot = false; const bool PrintNotLoaded = false; const bool PrintLIR = false; const bool BailoutAfterHIR = false; const bool BailoutAfterLIR = false; const bool BailoutOnExceptionHandlers = false; const bool InstallMethods = true; const intx NMethodSizeLimit = (64*K)*wordSize; const bool TraceFPUStack = false; const bool TraceFPURegisterUsage = false; const intx InstructionCountCutoff = 37000; const bool ComputeExactFPURegisterUsage = true; extern "C" bool C1ProfileCalls; extern "C" bool C1ProfileVirtualCalls; extern "C" bool C1ProfileInlinedCalls; extern "C" bool C1ProfileBranches; extern "C" bool C1ProfileCheckcasts; extern "C" bool C1OptimizeVirtualCallProfiling; extern "C" bool C1UpdateMethodData; const bool PrintCFGToFile = false; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compiler_globals.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/opto/c2_globals.hpp" 1 +# 786 "/home/rehn/source/jdk/open/src/hotspot/share/opto/c2_globals.hpp" +extern "C" bool StressLCM; extern "C" bool StressGCM; extern "C" bool StressIGVN; extern "C" bool StressCCP; extern "C" uint StressSeed; const bool StressMethodHandleLinkerInlining = false; const intx OptoPrologueNops = 0; extern "C" intx InteriorEntryAlignment; extern "C" intx MaxLoopPad; extern "C" intx MaxVectorSize; extern "C" intx ArrayOperationPartialInlineSize; extern "C" bool AlignVector; extern "C" intx NumberOfLoopInstrToAlign; const intx IndexSetWatch = 0; const intx OptoNodeListSize = 4; const intx OptoBlockListSize = 8; const intx OptoPeepholeAt = -1; const bool PrintIdeal = false; const bool PrintOpto = false; const bool PrintOptoInlining = false; const bool VerifyIdealNodeCount = false; const bool PrintIdealNodeCount = false; extern "C" bool IdealizeClearArrayNode; const bool OptoBreakpoint = false; const bool OptoBreakpointOSR = false; const uint64_t BreakAtNode = 0; const bool OptoBreakpointC2R = false; const bool OptoNoExecute = false; const bool PrintOptoStatistics = false; extern "C" bool PrintOptoAssembly; const bool OptoPeephole = pd_OptoPeephole; const bool PrintFrameConverterAssembly = false; const bool PrintParseStatistics = false; const bool PrintOptoPeephole = false; const bool PrintCFGBlockFreq = false; const bool TraceOptoParse = false; extern "C" intx LoopUnrollLimit; extern "C" intx LoopPercentProfileLimit; extern "C" intx LoopMaxUnroll; extern "C" bool SuperWordLoopUnrollAnalysis; const bool TraceSuperWordLoopUnrollAnalysis = false; extern "C" bool UseVectorMacroLogic; extern "C" intx LoopUnrollMin; extern "C" bool UseSubwordForMaxVector; extern "C" bool UseVectorCmov; const intx UnrollLimitForProfileCheck = 1; extern "C" intx MultiArrayExpandLimit; const bool TraceProfileTripCount = false; extern "C" bool UseCountedLoopSafepoints; extern "C" bool UseLoopPredicate; const bool TraceLoopPredicate = false; const bool TraceLoopOpts = false; const bool TraceLoopLimitCheck = false; const bool TraceRangeLimitCheck = false; extern "C" bool OptimizeFill; const bool TraceOptimizeFill = false; const bool OptoCoalesce = true; const bool UseUniqueSubclasses = true; extern "C" intx TrackedInitializationLimit; extern "C" bool ReduceFieldZeroing; extern "C" bool ReduceInitialCardMarks; extern "C" bool ReduceBulkZeroing; extern "C" bool UseFPUForSpilling; const intx RegisterCostAreaRatio = pd_RegisterCostAreaRatio; const bool UseCISCSpill = pd_UseCISCSpill; const bool VerifyGraphEdges = false; const bool VerifyDUIterators = true; const bool VerifyHashTableKeys = true; const bool VerifyRegisterAllocator = false; const intx FLOATPRESSURE = -1; const intx INTPRESSURE = -1; const bool TraceOptoPipelining = false; const bool TraceOptoOutput = false; extern "C" bool OptoScheduling; extern "C" bool OptoRegScheduling; extern "C" bool PartialPeelLoop; extern "C" intx PartialPeelNewPhiDelta; const bool TracePartialPeeling = false; extern "C" bool PartialPeelAtUnsignedTests; extern "C" bool ReassociateInvariants; extern "C" bool LoopUnswitching; const bool TraceLoopUnswitching = false; extern "C" bool AllowVectorizeOnDemand; extern "C" bool UseSuperWord; const bool SuperWordRTDepCheck = false; extern "C" bool SuperWordReductions; extern "C" bool UseCMoveUnconditionally; extern "C" bool DoReserveCopyInSuperWord; const bool TraceSuperWord = false; const bool TraceNewVectors = false; extern "C" bool OptoBundling; extern "C" intx ConditionalMoveLimit; const bool PrintIdealGraph = false; const intx PrintIdealGraphLevel = 0; const intx PrintIdealGraphPort = 4444; const ccstr PrintIdealGraphAddress = "127.0.0.1"; const ccstr PrintIdealGraphFile = nullptr; extern "C" bool UseBimorphicInlining; extern "C" bool UseOnlyInlinedBimorphic; const bool SubsumeLoads = true; const bool StressRecompilation = false; const intx ImplicitNullCheckThreshold = 3; extern "C" intx LoopOptsCount; extern "C" bool OptimizeUnstableIf; const intx NodeCountInliningCutoff = 18000; extern "C" intx MaxNodeLimit; extern "C" intx NodeLimitFudgeFactor; extern "C" bool UseJumpTables; extern "C" bool UseDivMod; extern "C" intx MinJumpTableSize; extern "C" intx MaxJumpTableSize; extern "C" intx MaxJumpTableSparseness; extern "C" bool EliminateLocks; extern "C" bool EliminateNestedLocks; const bool PrintLockStatistics = false; extern "C" bool PrintPreciseRTMLockingStatistics; const bool PrintEliminateLocks = false; extern "C" bool EliminateAutoBox; extern "C" intx AutoBoxCacheMax; extern "C" bool AggressiveUnboxing; const bool TracePostallocExpand = false; extern "C" bool ReduceAllocationMerges; const bool TraceReduceAllocationMerges = false; extern "C" bool DoEscapeAnalysis; extern "C" double EscapeAnalysisTimeout; const bool ExitEscapeAnalysisOnTimeout = true; const bool PrintEscapeAnalysis = false; extern "C" bool EliminateAllocations; const bool PrintEliminateAllocations = false; extern "C" intx EliminateAllocationArraySizeLimit; extern "C" intx EliminateAllocationFieldsLimit; extern "C" bool OptimizePtrCompare; const bool PrintOptimizePtrCompare = false; const bool VerifyConnectionGraph = true; extern "C" bool OptimizeStringConcat; const bool PrintOptimizeStringConcat = false; extern "C" intx ValueSearchLimit; extern "C" intx MaxLabelRootDepth; extern "C" intx DominatorSearchLimit; extern "C" bool BlockLayoutByFrequency; extern "C" intx BlockLayoutMinDiamondPercentage; extern "C" bool BlockLayoutRotateLoops; extern "C" bool InlineReflectionGetCallerClass; extern "C" bool InlineObjectCopy; extern "C" bool SpecialStringCompareTo; extern "C" bool SpecialStringIndexOf; extern "C" bool SpecialStringEquals; extern "C" bool SpecialArraysEquals; extern "C" bool SpecialEncodeISOArray; const bool BailoutToInterpreterForThrows = false; const bool ConvertCmpD2CmpF = true; const bool ConvertFloat2IntClipping = true; const bool MonomorphicArrayCheck = true; const bool TracePhaseCCP = false; const bool PrintDominators = false; extern "C" bool TraceSpilling; extern "C" bool TraceTypeProfile; const bool PoisonOSREntry = true; const bool SoftMatchFailure = true; const bool InlineAccessors = true; extern "C" intx TypeProfileMajorReceiverPercent; extern "C" bool PrintIntrinsics; const bool StressReflectiveCode = false; extern "C" bool DebugInlinedCalls; const bool VerifyLoopOptimizations = false; extern "C" bool ProfileDynamicTypes; const bool TraceIterativeGVN = false; const uint VerifyIterativeGVN = 0; const bool TraceCISCSpill = false; extern "C" bool SplitIfBlocks; const intx FreqCountInvocations = 1; const bool VerifyAliases = false; extern "C" intx MaxInlineLevel; extern "C" intx MaxRecursiveInlineLevel; extern "C" intx InlineSmallCode; extern "C" intx MaxInlineSize; extern "C" intx FreqInlineSize; extern "C" intx MaxTrivialSize; extern "C" bool IncrementalInline; extern "C" bool IncrementalInlineMH; extern "C" bool IncrementalInlineVirtual; const bool AlwaysIncrementalInline = false; extern "C" bool IncrementalInlineForceCleanup; extern "C" intx LiveNodeCountInliningCutoff; extern "C" bool OptimizeExpensiveOps; extern "C" bool UseMathExactIntrinsics; extern "C" bool UseCharacterCompareIntrinsics; extern "C" bool UseMultiplyToLenIntrinsic; extern "C" bool UseSquareToLenIntrinsic; extern "C" bool UseMulAddIntrinsic; extern "C" bool UseMontgomeryMultiplyIntrinsic; extern "C" bool UseMontgomerySquareIntrinsic; extern "C" bool EnableVectorSupport; extern "C" bool EnableVectorReboxing; extern "C" bool EnableVectorAggressiveReboxing; extern "C" bool UseVectorStubs; extern "C" bool UseTypeSpeculation; extern "C" bool UseInlineDepthForSpeculativeTypes; extern "C" bool TrapBasedRangeChecks; extern "C" intx ArrayCopyLoadStoreMaxElem; const bool StressArrayCopyMacroNode = false; const bool RenumberLiveNodes = true; extern "C" uintx LoopStripMiningIter; extern "C" uintx LoopStripMiningIterShortLoop; extern "C" bool UseProfiledLoopPredicate; extern "C" bool ExpandSubTypeCheckAtParseTime; const uintx StressLongCountedLoop = 0; extern "C" bool DuplicateBackedge; const bool StressDuplicateBackedge = false; extern "C" bool VerifyReceiverTypes; extern "C" intx TypeProfileSubTypeCheckCommonThreshold; +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compiler_globals.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jvmci/jvmci_globals.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/jvmci/jvmci_globals.hpp" +class fileStream; +# 194 "/home/rehn/source/jdk/open/src/hotspot/share/jvmci/jvmci_globals.hpp" +extern "C" bool EnableJVMCI; extern "C" bool UseGraalJIT; extern "C" bool EnableJVMCIProduct; extern "C" bool UseJVMCICompiler; extern "C" uint JVMCIThreadsPerNativeLibraryRuntime; extern "C" uint JVMCICompilerIdleDelay; extern "C" bool JVMCIPrintProperties; extern "C" bool BootstrapJVMCI; extern "C" bool EagerJVMCI; extern "C" bool PrintBootstrap; extern "C" intx JVMCIThreads; extern "C" intx JVMCIHostThreads; extern "C" intx JVMCIEventLogLevel; extern "C" intx JVMCITraceLevel; extern "C" intx JVMCICounterSize; extern "C" bool JVMCICountersExcludeCompiler; const bool JVMCIUseFastLocking = true; extern "C" intx JVMCINMethodSizeLimit; extern "C" ccstr JVMCILibPath; extern "C" ccstr JVMCILibDumpJNIConfig; extern "C" bool UseJVMCINativeLibrary; extern "C" double JVMCINativeLibraryThreadFraction; extern "C" ccstr JVMCINativeLibraryErrorFile; extern "C" bool LibJVMCICompilerThreadHidden; + + + + +class JVMCIGlobals { + private: + static fileStream* _jni_config_file; + public: + + + + + static bool check_jvmci_flags_are_consistent(); + + + static bool enable_jvmci_product_mode(JVMFlagOrigin origin, bool use_graal_jit); + + + static bool gc_supports_jvmci(); + + + static void check_jvmci_supported_gc(); + + static fileStream* get_jni_config_file() { return _jni_config_file; } +}; +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compiler_globals.hpp" 2 +# 385 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compiler_globals.hpp" +extern "C" bool CIPrintCompilerName; extern "C" bool CIPrintCompileQueue; const bool CIPrintRequests = false; extern "C" bool CITime; const bool CITimeVerbose = false; const bool CITimeEach = false; const bool CICountOSR = false; const bool CICountNative = false; const bool CICompileNatives = true; const bool CICompileOSR = pd_CICompileOSR; const bool CIPrintMethodCodes = false; const bool CIPrintTypeFlow = false; const bool CITraceTypeFlow = false; extern "C" bool CICompilerCountPerCPU; const intx CICrashAt = -1; const bool CIObjectFactoryVerify = false; const intx CIStart = 0; const intx CIStop = max_jint; const intx CIStartOSR = 0; const intx CIStopOSR = max_jint; const intx CIBreakAtOSR = -1; const intx CIBreakAt = -1; extern "C" double CompileThresholdScaling; extern "C" intx Tier0InvokeNotifyFreqLog; extern "C" intx Tier2InvokeNotifyFreqLog; extern "C" intx Tier3InvokeNotifyFreqLog; extern "C" intx Tier23InlineeNotifyFreqLog; extern "C" intx Tier0BackedgeNotifyFreqLog; extern "C" intx Tier2BackedgeNotifyFreqLog; extern "C" intx Tier3BackedgeNotifyFreqLog; extern "C" intx Tier2CompileThreshold; extern "C" intx Tier2BackEdgeThreshold; extern "C" intx Tier3InvocationThreshold; extern "C" intx Tier3MinInvocationThreshold; extern "C" intx Tier3CompileThreshold; extern "C" intx Tier3BackEdgeThreshold; extern "C" intx Tier4InvocationThreshold; extern "C" intx Tier4MinInvocationThreshold; extern "C" intx Tier4CompileThreshold; extern "C" intx Tier4BackEdgeThreshold; extern "C" intx Tier0Delay; extern "C" intx TieredOldPercentage; extern "C" intx Tier3DelayOn; extern "C" intx Tier3DelayOff; extern "C" intx Tier3LoadFeedback; extern "C" intx Tier4LoadFeedback; extern "C" intx TieredCompileTaskTimeout; extern "C" intx TieredStopAtLevel; extern "C" intx Tier0ProfilingStartPercentage; extern "C" uintx IncreaseFirstTierCompileThresholdAt; extern "C" intx TieredRateUpdateMinTime; extern "C" intx TieredRateUpdateMaxTime; extern "C" ccstr CompilationMode; extern "C" bool PrintTieredEvents; extern "C" intx OnStackReplacePercentage; extern "C" intx InterpreterProfilePercentage; extern "C" ccstrlist CompileOnly; extern "C" ccstr CompileCommandFile; extern "C" ccstr CompilerDirectivesFile; extern "C" ccstrlist CompileCommand; extern "C" bool ReplayCompiles; extern "C" bool ReplayReduce; extern "C" ccstr ReplayDataFile; extern "C" ccstr InlineDataFile; extern "C" intx ReplaySuppressInitializers; extern "C" bool ReplayIgnoreInitErrors; extern "C" bool DumpReplayDataOnError; extern "C" bool CompilerDirectivesIgnoreCompileCommands; extern "C" bool CompilerDirectivesPrint; extern "C" int CompilerDirectivesLimit; extern "C" bool EstimateArgEscape; extern "C" intx BCEATraceLevel; extern "C" intx MaxBCEAEstimateLevel; extern "C" intx MaxBCEAEstimateSize; extern "C" bool AbortVMOnCompilationFailure; const intx OSROnlyBCI = -1; const intx DesiredMethodLimit = 8000; extern "C" bool DontCompileHugeMethods; const intx HugeMethodLimit = 8000; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/allFlags.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gc_globals.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gc_globals.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/epsilon/epsilon_globals.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gc_globals.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/g1/g1_globals.hpp" 1 +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gc_globals.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/parallel/parallel_globals.hpp" 1 +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gc_globals.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/serial/serial_globals.hpp" 1 +# 41 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gc_globals.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp" 1 +# 44 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gc_globals.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/z/shared/z_shared_globals.hpp" 1 +# 27 "/home/rehn/source/jdk/open/src/hotspot/share/gc/z/shared/z_shared_globals.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/x/x_globals.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/gc/z/shared/z_shared_globals.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/z/z_globals.hpp" 1 +# 27 "/home/rehn/source/jdk/open/src/hotspot/share/gc/z/z_globals.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/z/zGlobals.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/gc/z/zGlobals.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/gc/z/zGlobals_riscv.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/gc/z/zGlobals_riscv.hpp" +const size_t ZPlatformCacheLineSize = 64; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/gc/z/zGlobals.hpp" 2 + + +const char* const ZName = "The Z Garbage Collector"; + + +const size_t ZGranuleSizeShift = 21; +const size_t ZGranuleSize = (size_t)1 << ZGranuleSizeShift; + + +const size_t ZVirtualToPhysicalRatio = 16; + + +const size_t ZMaxVirtualReservations = 100; + + +const size_t ZPageSizeSmallShift = ZGranuleSizeShift; +extern size_t ZPageSizeMediumShift; + + +const size_t ZPageSizeSmall = (size_t)1 << ZPageSizeSmallShift; +extern size_t ZPageSizeMedium; + + +const size_t ZObjectSizeLimitSmall = ZPageSizeSmall / 8; +extern size_t ZObjectSizeLimitMedium; + + +extern const int& ZObjectAlignmentSmallShift; +extern int ZObjectAlignmentMediumShift; +const int ZObjectAlignmentLargeShift = ZGranuleSizeShift; + + +extern const int& ZObjectAlignmentSmall; +extern int ZObjectAlignmentMedium; +const int ZObjectAlignmentLarge = 1 << ZObjectAlignmentLargeShift; + + +const size_t ZCacheLineSize = ZPlatformCacheLineSize; + + + +const size_t ZMarkStackSpaceExpandSize = (size_t)1 << 25; + + +const size_t ZMarkStackSizeShift = 11; +const size_t ZMarkStackSize = (size_t)1 << ZMarkStackSizeShift; +const size_t ZMarkStackHeaderSize = (size_t)1 << 4; +const size_t ZMarkStackSlots = (ZMarkStackSize - ZMarkStackHeaderSize) / sizeof(uintptr_t); +const size_t ZMarkStackMagazineSize = (size_t)1 << 15; +const size_t ZMarkStackMagazineSlots = (ZMarkStackMagazineSize / ZMarkStackSize) - 1; + + +const size_t ZMarkStripeShift = ZGranuleSizeShift; + + +const size_t ZMarkStripesMax = 16; + + +const size_t ZMarkCacheSize = 1024; + + +const size_t ZMarkPartialArrayMinSizeShift = 12; +const size_t ZMarkPartialArrayMinSize = (size_t)1 << ZMarkPartialArrayMinSizeShift; +const size_t ZMarkPartialArrayMinLength = ZMarkPartialArrayMinSize / oopSize; + + +const size_t ZMarkProactiveFlushMax = 10; + + +const uint64_t ZMarkCompleteTimeout = 200; +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/gc/z/z_globals.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/z/zPageAge.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/gc/z/zPageAge.hpp" +enum class ZPageAge : uint8_t { + eden, + survivor1, + survivor2, + survivor3, + survivor4, + survivor5, + survivor6, + survivor7, + survivor8, + survivor9, + survivor10, + survivor11, + survivor12, + survivor13, + survivor14, + old +}; + +constexpr uint ZPageAgeMax = static_cast(ZPageAge::old); +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/gc/z/z_globals.hpp" 2 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/gc/z/shared/z_shared_globals.hpp" 2 +# 47 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gc_globals.hpp" 2 +# 698 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gc_globals.hpp" +extern "C" size_t EpsilonPrintHeapSteps; extern "C" size_t EpsilonUpdateCountersStep; extern "C" size_t EpsilonMaxTLABSize; extern "C" bool EpsilonElasticTLAB; extern "C" bool EpsilonElasticTLABDecay; extern "C" double EpsilonTLABElasticity; extern "C" size_t EpsilonTLABDecayTime; extern "C" size_t EpsilonMinHeapExpand; extern "C" bool G1UseAdaptiveIHOP; extern "C" size_t G1AdaptiveIHOPNumInitialSamples; extern "C" uint G1ConfidencePercent; extern "C" intx G1SummarizeRSetStatsPeriod; extern "C" double G1ConcMarkStepDurationMillis; extern "C" uint G1RefProcDrainInterval; extern "C" bool G1UseReferencePrecleaning; extern "C" double G1LastPLABAverageOccupancy; extern "C" size_t G1SATBBufferSize; const intx G1SATBProcessCompletedThreshold = 20; extern "C" uint G1SATBBufferEnqueueingThresholdPercent; extern "C" uint G1ExpandByPercentOfAvailable; extern "C" size_t G1UpdateBufferSize; extern "C" uint G1RSetUpdatingPauseTimePercent; extern "C" bool G1UseConcRefinement; const uint G1RemSetArrayOfCardsEntriesBase = 8; extern "C" uint G1RemSetArrayOfCardsEntries; extern "C" uint G1RemSetHowlMaxNumBuckets; extern "C" uint G1RemSetHowlNumBuckets; extern "C" uint G1RemSetCoarsenHowlBitmapToHowlFullPercent; extern "C" uint G1RemSetCoarsenHowlToFullPercent; const size_t G1MaxVerifyFailures = +# 698 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gc_globals.hpp" 3 4 +(18446744073709551615UL) +# 698 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gc_globals.hpp" +; extern "C" uint G1ReservePercent; extern "C" size_t G1HeapRegionSize; extern "C" uint G1ConcRefinementThreads; extern "C" uint G1MaxNewSizePercent; extern "C" uint G1NewSizePercent; extern "C" uint G1MixedGCLiveThresholdPercent; extern "C" uint G1RetainRegionLiveThresholdPercent; extern "C" uint G1HeapWastePercent; extern "C" uintx G1MixedGCCountTarget; extern "C" uint G1EagerReclaimRemSetThreshold; extern "C" size_t G1RebuildRemSetChunkSize; extern "C" uint G1OldCSetRegionThresholdPercent; extern "C" bool G1VerifyHeapRegionCodeRoots; const bool G1VerifyBitmaps = false; extern "C" uintx G1PeriodicGCInterval; extern "C" bool G1PeriodicGCInvokesConcurrent; extern "C" double G1PeriodicGCSystemLoadThreshold; extern "C" uint G1RemSetFreeMemoryRescheduleDelayMillis; extern "C" double G1RemSetFreeMemoryStepDurationMillis; extern "C" double G1RemSetFreeMemoryKeepExcessRatio; extern "C" uint G1RestoreRetainedRegionChunksPerWorker; extern "C" uint G1NumCardsCostSampleThreshold; extern "C" uintx HeapMaximumCompactionInterval; extern "C" uintx HeapFirstMaximumCompactionCount; extern "C" bool UseMaximumCompactionOnSystemGC; extern "C" size_t ParallelOldDeadWoodLimiterMean; extern "C" size_t ParallelOldDeadWoodLimiterStdDev; extern "C" bool PSChunkLargeArrays; extern "C" size_t ShenandoahRegionSize; extern "C" size_t ShenandoahTargetNumRegions; extern "C" size_t ShenandoahMinRegionSize; extern "C" size_t ShenandoahMaxRegionSize; extern "C" intx ShenandoahHumongousThreshold; extern "C" ccstr ShenandoahGCMode; extern "C" ccstr ShenandoahGCHeuristics; extern "C" uintx ShenandoahUnloadClassesFrequency; extern "C" uintx ShenandoahGarbageThreshold; extern "C" uintx ShenandoahInitFreeThreshold; extern "C" uintx ShenandoahMinFreeThreshold; extern "C" uintx ShenandoahAllocationThreshold; extern "C" uintx ShenandoahAllocSpikeFactor; extern "C" uintx ShenandoahLearningSteps; extern "C" uintx ShenandoahImmediateThreshold; extern "C" uintx ShenandoahAdaptiveSampleFrequencyHz; extern "C" uintx ShenandoahAdaptiveSampleSizeSeconds; extern "C" double ShenandoahAdaptiveInitialConfidence; extern "C" double ShenandoahAdaptiveInitialSpikeThreshold; extern "C" double ShenandoahAdaptiveDecayFactor; extern "C" uintx ShenandoahGuaranteedGCInterval; extern "C" bool ShenandoahAlwaysClearSoftRefs; extern "C" bool ShenandoahUncommit; extern "C" uintx ShenandoahUncommitDelay; extern "C" bool ShenandoahRegionSampling; extern "C" int ShenandoahRegionSamplingRate; extern "C" uintx ShenandoahControlIntervalMin; extern "C" uintx ShenandoahControlIntervalMax; extern "C" uintx ShenandoahControlIntervalAdjustPeriod; extern "C" bool ShenandoahVerify; extern "C" intx ShenandoahVerifyLevel; extern "C" bool ShenandoahElasticTLAB; extern "C" uintx ShenandoahEvacReserve; extern "C" double ShenandoahEvacWaste; extern "C" bool ShenandoahEvacReserveOverflow; extern "C" bool ShenandoahPacing; extern "C" uintx ShenandoahPacingMaxDelay; extern "C" uintx ShenandoahPacingIdleSlack; extern "C" uintx ShenandoahPacingCycleSlack; extern "C" double ShenandoahPacingSurcharge; extern "C" uintx ShenandoahCriticalFreeThreshold; extern "C" bool ShenandoahDegeneratedGC; extern "C" uintx ShenandoahFullGCThreshold; extern "C" bool ShenandoahImplicitGCInvokesConcurrent; extern "C" bool ShenandoahHumongousMoves; extern "C" bool ShenandoahOOMDuringEvacALot; extern "C" bool ShenandoahAllocFailureALot; extern "C" intx ShenandoahMarkScanPrefetch; extern "C" uintx ShenandoahMarkLoopStride; extern "C" uintx ShenandoahParallelRegionStride; extern "C" size_t ShenandoahSATBBufferSize; extern "C" uintx ShenandoahMaxSATBBufferFlushes; extern "C" bool ShenandoahSuspendibleWorkers; extern "C" bool ShenandoahSATBBarrier; extern "C" bool ShenandoahIUBarrier; extern "C" bool ShenandoahCASBarrier; extern "C" bool ShenandoahCloneBarrier; extern "C" bool ShenandoahLoadRefBarrier; extern "C" bool ShenandoahNMethodBarrier; extern "C" bool ShenandoahStackWatermarkBarrier; const bool ShenandoahVerifyOptoBarriers = false; extern "C" bool ShenandoahLoopOptsAfterExpansion; extern "C" bool ShenandoahSelfFixing; extern "C" double ZAllocationSpikeTolerance; extern "C" double ZFragmentationLimit; extern "C" size_t ZMarkStackSpaceLimit; extern "C" double ZCollectionInterval; extern "C" bool ZProactive; extern "C" bool ZUncommit; extern "C" uintx ZUncommitDelay; extern "C" double ZAsyncUnmappingLimit; extern "C" uint ZStatisticsInterval; extern "C" bool ZStressRelocateInPlace; extern "C" bool ZVerifyRoots; extern "C" bool ZVerifyObjects; extern "C" bool ZVerifyMarking; extern "C" bool ZVerifyForwarding; extern "C" bool ZVerifyViews; extern "C" double ZYoungCompactionLimit; extern "C" double ZCollectionIntervalMinor; extern "C" double ZCollectionIntervalMajor; extern "C" bool ZCollectionIntervalOnly; extern "C" bool ZBufferStoreBarriers; extern "C" uint ZYoungGCThreads; extern "C" uint ZOldGCThreads; extern "C" uintx ZIndexDistributorStrategy; extern "C" bool ZVerifyRemembered; const bool ZVerifyOops = false; extern "C" int ZTenuringThreshold; const size_t ZForceDiscontiguousHeapReservations = 0; extern "C" bool UseSerialGC; extern "C" bool UseG1GC; extern "C" bool UseParallelGC; extern "C" bool UseEpsilonGC; extern "C" bool UseZGC; extern "C" bool ZGenerational; extern "C" bool UseShenandoahGC; extern "C" uint ParallelGCThreads; extern "C" bool UseDynamicNumberOfGCThreads; extern "C" bool InjectGCWorkerCreationFailure; extern "C" size_t HeapSizePerGCThread; extern "C" uint ConcGCThreads; extern "C" bool AlwaysTenure; extern "C" bool NeverTenure; extern "C" bool ScavengeBeforeFullGC; extern "C" bool ExplicitGCInvokesConcurrent; extern "C" uint GCLockerEdenExpansionPercent; extern "C" uintx GCLockerRetryAllocationCount; extern "C" uint ParallelGCBufferWastePct; extern "C" uint TargetPLABWastePct; extern "C" uint PLABWeight; extern "C" bool ResizePLAB; extern "C" int ParGCArrayScanChunk; extern "C" bool AlwaysPreTouch; extern "C" bool AlwaysPreTouchStacks; extern "C" size_t PreTouchParallelChunkSize; extern "C" size_t MarkStackSizeMax; extern "C" size_t MarkStackSize; extern "C" bool ParallelRefProcEnabled; extern "C" bool ParallelRefProcBalancingEnabled; extern "C" size_t ReferencesPerThread; extern "C" uint InitiatingHeapOccupancyPercent; const bool ScavengeALot = false; const bool FullGCALot = false; const bool GCALotAtAllSafepoints = false; const bool PromotionFailureALot = false; const uintx PromotionFailureALotCount = 1000; const uintx PromotionFailureALotInterval = 5; extern "C" uintx WorkStealingSleepMillis; extern "C" uintx WorkStealingYieldsBeforeSleep; extern "C" uintx WorkStealingHardSpins; extern "C" uintx WorkStealingSpinToYieldRatio; const uintx ObjArrayMarkingStride = 2048; const bool MetadataAllocationFailALot = false; const uintx MetadataAllocationFailALotInterval = 1000; extern "C" bool NeverActAsServerClassMachine; extern "C" bool AlwaysActAsServerClassMachine; extern "C" uint64_t MaxRAM; extern "C" bool AggressiveHeap; extern "C" size_t ErgoHeapSizeLimit; extern "C" uintx MaxRAMFraction; extern "C" uintx MinRAMFraction; extern "C" uintx InitialRAMFraction; extern "C" double MaxRAMPercentage; extern "C" double MinRAMPercentage; extern "C" double InitialRAMPercentage; extern "C" int ActiveProcessorCount; const uintx MaxVirtMemFraction = 2; extern "C" bool UseAdaptiveSizePolicy; extern "C" bool UsePSAdaptiveSurvivorSizePolicy; extern "C" bool UseAdaptiveGenerationSizePolicyAtMinorCollection; extern "C" bool UseAdaptiveGenerationSizePolicyAtMajorCollection; extern "C" bool UseAdaptiveSizePolicyWithSystemGC; const intx PSAdaptiveSizePolicyResizeVirtualSpaceAlot = -1; extern "C" uint AdaptiveSizeThroughPutPolicy; extern "C" uintx AdaptiveSizePolicyInitializingSteps; const uintx AdaptiveSizePolicyReadyThreshold = 5; extern "C" uintx AdaptiveSizePolicyOutputInterval; extern "C" bool UseAdaptiveSizePolicyFootprintGoal; extern "C" uint AdaptiveSizePolicyWeight; extern "C" uint AdaptiveTimeWeight; extern "C" uint PausePadding; extern "C" uint PromotedPadding; extern "C" uint SurvivorPadding; extern "C" uint ThresholdTolerance; extern "C" uint AdaptiveSizePolicyCollectionCostMargin; extern "C" uint YoungGenerationSizeIncrement; extern "C" uint YoungGenerationSizeSupplement; extern "C" uintx YoungGenerationSizeSupplementDecay; extern "C" uint TenuredGenerationSizeIncrement; extern "C" uint TenuredGenerationSizeSupplement; extern "C" uintx TenuredGenerationSizeSupplementDecay; extern "C" uintx MaxGCPauseMillis; extern "C" uintx GCPauseIntervalMillis; extern "C" uintx MaxGCMinorPauseMillis; extern "C" uint GCTimeRatio; extern "C" uintx AdaptiveSizeDecrementScaleFactor; extern "C" bool UseAdaptiveSizeDecayMajorGCCost; extern "C" uintx AdaptiveSizeMajorGCDecayTimeScale; extern "C" uintx MinSurvivorRatio; extern "C" uintx InitialSurvivorRatio; extern "C" size_t BaseFootPrintEstimate; extern "C" bool UseGCOverheadLimit; extern "C" uint GCTimeLimit; extern "C" uint GCHeapFreeLimit; const uintx GCOverheadLimitThreshold = 5; extern "C" intx PrefetchCopyIntervalInBytes; extern "C" intx PrefetchScanIntervalInBytes; extern "C" bool VerifyDuringStartup; extern "C" bool VerifyBeforeExit; extern "C" bool VerifyBeforeGC; extern "C" bool VerifyAfterGC; extern "C" bool VerifyDuringGC; extern "C" int VerifyArchivedFields; extern "C" ccstrlist VerifyGCType; extern "C" ccstrlist VerifySubSet; extern "C" bool DeferInitialCardMark; extern "C" bool UseCondCardMark; extern "C" bool VerifyRememberedSets; extern "C" bool VerifyObjectStartArray; extern "C" bool DisableExplicitGC; extern "C" bool PrintGC; extern "C" bool PrintGCDetails; const intx ConcGCYieldTimeout = 0; const int ScavengeALotInterval = 1; const int FullGCALotInterval = 1; const int FullGCALotStart = 0; const int FullGCALotDummies = 32*K; extern "C" size_t MinHeapSize; extern "C" size_t InitialHeapSize; extern "C" size_t MaxHeapSize; extern "C" size_t SoftMaxHeapSize; extern "C" size_t OldSize; extern "C" size_t NewSize; extern "C" size_t MaxNewSize; extern "C" size_t HeapBaseMinAddress; extern "C" size_t PretenureSizeThreshold; extern "C" uintx SurvivorRatio; extern "C" uintx NewRatio; extern "C" size_t NewSizeThreadIncrease; extern "C" uintx QueuedAllocationWarningCount; extern "C" uintx VerifyGCStartAt; extern "C" int VerifyGCLevel; extern "C" uint MaxTenuringThreshold; extern "C" uint InitialTenuringThreshold; extern "C" uint TargetSurvivorRatio; extern "C" uint MarkSweepDeadRatio; extern "C" uint MarkSweepAlwaysCompactCount; const uintx GCExpandToAllocateDelayMillis = 0; extern "C" uint GCDrainStackTargetSize; extern "C" uint GCCardSizeInBytes; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/allFlags.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/tlab_globals.hpp" 1 +# 91 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/tlab_globals.hpp" +extern "C" bool UseTLAB; extern "C" bool ResizeTLAB; extern "C" bool ZeroTLAB; extern "C" bool TLABStats; extern "C" size_t MinTLABSize; extern "C" size_t TLABSize; extern "C" size_t YoungPLABSize; extern "C" size_t OldPLABSize; extern "C" uintx TLABAllocationWeight; extern "C" uintx TLABWasteTargetPercent; extern "C" uintx TLABRefillWasteFraction; extern "C" uintx TLABWasteIncrement; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/allFlags.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/debug_globals.hpp" 1 +# 93 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/debug_globals.hpp" + +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/allFlags.hpp" 2 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals_extension.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/jvmFlag.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/jvmFlag.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/enumIterator.hpp" 1 +# 80 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/enumIterator.hpp" +template struct EnumeratorRange; + + +struct EnumeratorRangeImpl : AllStatic { + template using Underlying = std::underlying_type_t; + + + template::value), int> = 0> + static constexpr Underlying start_value(U first) { + return static_cast>(first); + } + + + template::value), int> = 0> + static constexpr Underlying end_value(U last) { + Underlying value = static_cast>(last); + ; + return static_cast>(value + 1); + } +}; +# 122 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/enumIterator.hpp" +template +class EnumIterationTraits : AllStatic { + using RangeType = EnumeratorRange; + +public: + + using Underlying = std::underlying_type_t; + + + static constexpr Underlying _start = RangeType::_start; + + + static constexpr Underlying _end = RangeType::_end; + + static_assert(_start != _end, "empty range"); + static_assert(_start <= _end, "invalid range"); + + + + + template + static constexpr void assert_in_range(V value, + V start = PrimitiveConversions::cast(_start), + V end = PrimitiveConversions::cast(_end)) { + ; + ; + } + + + static constexpr Underlying underlying_value(T value) { + return static_cast(value); + } + + + static constexpr T enumerator(Underlying value) { + return static_cast(value); + } +}; + +template +class EnumIterator { + using Traits = EnumIterationTraits; + + using Underlying = typename Traits::Underlying; + Underlying _value; + + constexpr void assert_in_bounds() const { + ; + } + +public: + using EnumType = T; + + + constexpr EnumIterator() : _value(Traits::_end) {} + + + constexpr explicit EnumIterator(T value) : + _value(Traits::underlying_value(value)) + { + Traits::assert_in_range(value); + } + + + constexpr bool operator==(EnumIterator other) const { + return _value == other._value; + } + + + constexpr bool operator!=(EnumIterator other) const { + return _value != other._value; + } + + + + constexpr T operator*() const { + assert_in_bounds(); + return Traits::enumerator(_value); + } + + + + constexpr EnumIterator& operator++() { + assert_in_bounds(); + ++_value; + return *this; + } + + + + constexpr EnumIterator operator++(int) { + assert_in_bounds(); + EnumIterator result = *this; + ++_value; + return result; + } +}; + +template +class EnumRange { + using Traits = EnumIterationTraits; + using Underlying = typename Traits::Underlying; + + Underlying _start; + Underlying _end; + + constexpr void assert_not_empty() const { + ; + } + +public: + using EnumType = T; + using Iterator = EnumIterator; + + + constexpr EnumRange() : + EnumRange(Traits::enumerator(Traits::_start)) {} + + + constexpr explicit EnumRange(T start) : + EnumRange(start, Traits::enumerator(Traits::_end)) {} + + + + constexpr EnumRange(T start, T end) : + _start(Traits::underlying_value(start)), + _end(Traits::underlying_value(end)) + { + Traits::assert_in_range(start); + Traits::assert_in_range(end); + ; + } + + + constexpr Iterator begin() const { + return Iterator(Traits::enumerator(_start)); + } + + + constexpr Iterator end() const { + return Iterator(Traits::enumerator(_end)); + } + + + constexpr size_t size() const { + return static_cast(_end - _start); + } + + + + constexpr T first() const { + assert_not_empty(); + return Traits::enumerator(_start); + } + + + + constexpr T last() const { + assert_not_empty(); + return Traits::enumerator(_end - 1); + } + + + + constexpr size_t index(T value) const { + Traits::assert_in_range(value, first(), last()); + return static_cast(Traits::underlying_value(value) - _start); + } +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/jvmFlag.hpp" 2 + + + + +class outputStream; + +enum class JVMFlagOrigin : int { + + + + DEFAULT = 0, + COMMAND_LINE = 1, + ENVIRON_VAR = 2, + CONFIG_FILE = 3, + MANAGEMENT = 4, + ERGONOMIC = 5, + ATTACH_ON_DEMAND = 6, + INTERNAL = 7, + JIMAGE_RESOURCE = 8, +}; + +template<> struct EnumeratorRange { static constexpr EnumeratorRangeImpl::Underlying _start{EnumeratorRangeImpl::start_value(JVMFlagOrigin::DEFAULT)}; static constexpr EnumeratorRangeImpl::Underlying _end{EnumeratorRangeImpl::end_value(JVMFlagOrigin::JIMAGE_RESOURCE)}; };; + +class JVMFlag { + friend class VMStructs; + +public: + enum Flags : int { + VALUE_ORIGIN_BITS = 4, + VALUE_ORIGIN_MASK = ((((VALUE_ORIGIN_BITS) >= BitsPerWord) ? 0 : (OneBit << (VALUE_ORIGIN_BITS))) - 1), + + + KIND_PRODUCT = 1 << 4, + KIND_MANAGEABLE = 1 << 5, + KIND_DIAGNOSTIC = 1 << 6, + KIND_EXPERIMENTAL = 1 << 7, + KIND_NOT_PRODUCT = 1 << 8, + KIND_DEVELOP = 1 << 9, + KIND_PLATFORM_DEPENDENT = 1 << 10, + KIND_C1 = 1 << 11, + KIND_C2 = 1 << 12, + KIND_ARCH = 1 << 13, + KIND_LP64_PRODUCT = 1 << 14, + KIND_JVMCI = 1 << 15, + + + + + + + + WAS_SET_ON_COMMAND_LINE = 1 << 17, + + KIND_MASK = ~(VALUE_ORIGIN_MASK | WAS_SET_ON_COMMAND_LINE) + }; + + enum Error { + + SUCCESS = 0, + + MISSING_NAME, + + MISSING_VALUE, + + WRONG_FORMAT, + + NON_WRITABLE, + + OUT_OF_BOUNDS, + + VIOLATES_CONSTRAINT, + + INVALID_FLAG, + + COMMAND_LINE_ONLY, + + SET_ONLY_ONCE, + + CONSTANT, + + ERR_OTHER + }; + + enum MsgType { + NONE = 0, + DIAGNOSTIC_FLAG_BUT_LOCKED, + EXPERIMENTAL_FLAG_BUT_LOCKED, + DEVELOPER_FLAG_BUT_PRODUCT_BUILD, + NOTPRODUCT_FLAG_BUT_PRODUCT_BUILD + }; +# 134 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/jvmFlag.hpp" + enum FlagType : int { + TYPE_bool, TYPE_int, TYPE_uint, TYPE_intx, TYPE_uintx, TYPE_uint64_t, TYPE_size_t, TYPE_double, + + TYPE_ccstr, + TYPE_ccstrlist, + NUM_FLAG_TYPES + }; + +private: + void* _addr; + const char* _name; + Flags _flags; + int _type; + + + +public: + + static JVMFlag* flags; + + + static size_t numFlags; + +private: + static JVMFlag* find_flag(const char* name, size_t length, bool allow_locked, bool return_flag); + +public: + constexpr JVMFlag() : _addr(), _name(), _flags(), _type() {} + + constexpr JVMFlag(int flag_enum, FlagType type, const char* name, + void* addr, int flags, int extra_flags, const char* doc); + + constexpr JVMFlag(int flag_enum, FlagType type, const char* name, + void* addr, int flags, const char* doc); + + static JVMFlag* find_flag(const char* name) { + return find_flag(name, strlen(name), false, false); + } + static JVMFlag* find_declared_flag(const char* name, size_t length) { + return find_flag(name, length, true, true); + } + static JVMFlag* find_declared_flag(const char* name) { + return find_declared_flag(name, strlen(name)); + } + + static JVMFlag* fuzzy_match(const char* name, size_t length, bool allow_locked = false); + + static void assert_valid_flag_enum(JVMFlagsEnum i) {}; + static void check_all_flag_declarations() {}; + + inline JVMFlagsEnum flag_enum() const { + JVMFlagsEnum i = static_cast(this - JVMFlag::flags); + assert_valid_flag_enum(i); + return i; + } + + static JVMFlag* flag_from_enum(JVMFlagsEnum flag_enum) { + assert_valid_flag_enum(flag_enum); + return &JVMFlag::flags[flag_enum]; + } + + + + + + bool is_bool() const { return _type == TYPE_bool;} bool get_bool() const { ; return *((bool*) _addr); } bool is_int() const { return _type == TYPE_int;} int get_int() const { ; return *((int*) _addr); } bool is_uint() const { return _type == TYPE_uint;} uint get_uint() const { ; return *((uint*) _addr); } bool is_intx() const { return _type == TYPE_intx;} intx get_intx() const { ; return *((intx*) _addr); } bool is_uintx() const { return _type == TYPE_uintx;} uintx get_uintx() const { ; return *((uintx*) _addr); } bool is_uint64_t() const { return _type == TYPE_uint64_t;} uint64_t get_uint64_t() const { ; return *((uint64_t*) _addr); } bool is_size_t() const { return _type == TYPE_size_t;} size_t get_size_t() const { ; return *((size_t*) _addr); } bool is_double() const { return _type == TYPE_double;} double get_double() const { ; return *((double*) _addr); } + + bool is_ccstr() const { return _type == TYPE_ccstr || _type == TYPE_ccstrlist; } + bool ccstr_accumulates() const { return _type == TYPE_ccstrlist; } + ccstr get_ccstr() const { ; return *((ccstr*) _addr); } + void set_ccstr(ccstr value) { ; *((ccstr*) _addr) = value; } + + + + + const char* type_string() const { + return type_string_for((FlagType)_type); + } + + static const char* type_string_for(FlagType t) { + switch(t) { + case TYPE_bool: return "bool"; case TYPE_int: return "int"; case TYPE_uint: return "uint"; case TYPE_intx: return "intx"; case TYPE_uintx: return "uintx"; case TYPE_uint64_t: return "uint64_t"; case TYPE_size_t: return "size_t"; case TYPE_double: return "double"; + case TYPE_ccstr: return "ccstr"; + case TYPE_ccstrlist: return "ccstrlist"; + default: + do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/runtime/flags/jvmFlag.hpp", 219); } while (0); + return "unknown"; + } + } + + int type() const { return _type; } + const char* name() const { return _name; } + + + + template T read() const { + assert_compatible_type(_type); + return *static_cast(_addr); + } + + template void write(T value) { + assert_compatible_type(_type); + *static_cast(_addr) = value; + } + + JVMFlagOrigin get_origin() const { return JVMFlagOrigin(_flags & VALUE_ORIGIN_MASK); } + void set_origin(JVMFlagOrigin origin); + + bool is_default() const { return (get_origin() == JVMFlagOrigin::DEFAULT); } + bool is_ergonomic() const { return (get_origin() == JVMFlagOrigin::ERGONOMIC); } + bool is_command_line() const { return (_flags & WAS_SET_ON_COMMAND_LINE) != 0; } + void set_command_line() { _flags = Flags(_flags | WAS_SET_ON_COMMAND_LINE); } + bool is_jimage_resource() const { return (get_origin() == JVMFlagOrigin::JIMAGE_RESOURCE); } + bool is_product() const { return (_flags & KIND_PRODUCT) != 0; } + bool is_manageable() const { return (_flags & KIND_MANAGEABLE) != 0; } + bool is_diagnostic() const { return (_flags & KIND_DIAGNOSTIC) != 0; } + bool is_experimental() const { return (_flags & KIND_EXPERIMENTAL) != 0; } + bool is_notproduct() const { return (_flags & KIND_NOT_PRODUCT) != 0; } + bool is_develop() const { return (_flags & KIND_DEVELOP) != 0; } + + bool is_constant_in_binary() const; + + bool is_unlocker() const; + bool is_unlocked() const; + + + bool is_writeable() const { return is_manageable(); } + + bool is_external() const { return is_manageable(); } + + void clear_diagnostic(); + void clear_experimental(); + void set_product(); + + JVMFlag::MsgType get_locked_message(char*, int) const; + + static bool is_default(JVMFlagsEnum flag); + static bool is_ergo(JVMFlagsEnum flag); + static bool is_cmdline(JVMFlagsEnum flag); + static bool is_jimage_resource(JVMFlagsEnum flag); + static void setOnCmdLine(JVMFlagsEnum flag); + + + + void print_on(outputStream* st, bool withComments = false, bool printRanges = false) const; + void print_kind(outputStream* st, unsigned int width) const; + void print_origin(outputStream* st, unsigned int width) const; + void print_as_flag(outputStream* st) const; + +private: + + + + static void assert_valid_type_enum(int type_enum) { + ; + } + + + + template + static constexpr int type_signature() { + return int(sizeof(T)) | + (((std::is_integral::value) ? 1 : 0) << 8) | + (((std::is_signed::value) ? 1 : 0) << 9) | + (((std::is_pointer::value) ? 1 : 0) << 10); + } + + static const int type_signatures[]; + +public: + template + static void assert_compatible_type(int type_enum) { + ; + } + + template + static bool is_compatible_type(int type_enum) { + assert_valid_type_enum(type_enum); + return type_signatures[type_enum] == type_signature(); + } + +public: + static void printSetFlags(outputStream* out); + + + static void printFlags(outputStream* out, bool withComments, bool printRanges = false, bool skipDefaults = false); + static void printError(bool verbose, const char* msg, ...) __attribute__((format(printf, 2, 3))); + + static void verify() {}; +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals_extension.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/jvmFlagAccess.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/jvmFlagAccess.hpp" +class FlagAccessImpl; +class JVMFlagLimit; +class outputStream; +# 53 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/jvmFlagAccess.hpp" +class JVMFlagAccess : AllStatic { + inline static const FlagAccessImpl* access_impl(const JVMFlag* flag); + static JVMFlag::Error set_impl(JVMFlag* flag, void* value, JVMFlagOrigin origin); + static JVMFlag::Error set_or_assert(JVMFlagsEnum flag_enum, int type_enum, void* value, JVMFlagOrigin origin); + + static bool is_correct_type(const JVMFlag* flag, int type_enum) { + if (type_enum == JVMFlag::TYPE_ccstr) { + if (!flag->is_ccstr()) { + return false; + } + } else { + if (flag->type() != type_enum) { + return false; + } + } + return true; + } + +public: + static JVMFlag::Error check_range(const JVMFlag* flag, bool verbose); + static JVMFlag::Error check_constraint(const JVMFlag* flag, void * func, bool verbose); + static void print_range(outputStream* st, const JVMFlag* flag, const JVMFlagLimit* range); + static void print_range(outputStream* st, const JVMFlag* flag); + + template + static JVMFlag::Error get(const JVMFlag* flag, T* value) { + + + ; + + if (flag == nullptr) { + return JVMFlag::INVALID_FLAG; + } + if (!is_correct_type(flag, type_enum)) { + return JVMFlag::WRONG_FORMAT; + } + + *value = flag->read(); + return JVMFlag::SUCCESS; + } + + + + + + template + static JVMFlag::Error set(JVMFlagsEnum flag_enum, T value, JVMFlagOrigin origin) { + return set_or_assert(flag_enum, type_enum, &value, origin); + } + + + + + + template + static JVMFlag::Error set(JVMFlag* flag, T* value, JVMFlagOrigin origin) { + + + ; + + if (flag == nullptr) { + return JVMFlag::INVALID_FLAG; + } + if (!is_correct_type(flag, type_enum)) { + return JVMFlag::WRONG_FORMAT; + } + + return set_impl(flag, (void*)value, origin); + } + + + + + static JVMFlag::Error set_ccstr(JVMFlag* flag, ccstr* value, JVMFlagOrigin origin); + + + static JVMFlag::Error get_ccstr(const JVMFlag* flag, ccstr* value) { + return get(flag, value); + } + + static JVMFlag::Error set_bool (JVMFlag* f, bool* v, JVMFlagOrigin origin) { return set (f, v, origin); } + static JVMFlag::Error set_int (JVMFlag* f, int* v, JVMFlagOrigin origin) { return set (f, v, origin); } + static JVMFlag::Error set_uint (JVMFlag* f, uint* v, JVMFlagOrigin origin) { return set (f, v, origin); } + static JVMFlag::Error set_intx (JVMFlag* f, intx* v, JVMFlagOrigin origin) { return set (f, v, origin); } + static JVMFlag::Error set_uintx (JVMFlag* f, uintx* v, JVMFlagOrigin origin) { return set (f, v, origin); } + static JVMFlag::Error set_uint64_t(JVMFlag* f, uint64_t* v, JVMFlagOrigin origin) { return set(f, v, origin); } + static JVMFlag::Error set_size_t (JVMFlag* f, size_t* v, JVMFlagOrigin origin) { return set (f, v, origin); } + static JVMFlag::Error set_double (JVMFlag* f, double* v, JVMFlagOrigin origin) { return set (f, v, origin); } +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals_extension.hpp" 2 +# 40 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals_extension.hpp" +enum JVMFlagsEnum : int { + INVALID_JVMFlagsEnum = -1, + Flag_UseCompressedOops_enum, Flag_UseCompressedClassPointers_enum, Flag_ObjectAlignmentInBytes_enum, Flag_NearCpool_enum, Flag_UseBlockZeroing_enum, Flag_BlockZeroingLowLimit_enum, Flag_CacheLineSize_enum, Flag_TraceTraps_enum, Flag_UseConservativeFence_enum, Flag_AvoidUnalignedAccesses_enum, Flag_UseRVA20U64_enum, Flag_UseRVC_enum, Flag_UseRVA22U64_enum, Flag_UseRVV_enum, Flag_UseZba_enum, Flag_UseZbb_enum, Flag_UseZbs_enum, Flag_UseZic64b_enum, Flag_UseZicbom_enum, Flag_UseZicbop_enum, Flag_UseZicboz_enum, Flag_UseZtso_enum, Flag_UseZihintpause_enum, Flag_UseRVVForBigIntegerShiftIntrinsics_enum, Flag_VerifySharedSpaces_enum, Flag_RecordDynamicDumpInfo_enum, Flag_AutoCreateSharedArchive_enum, Flag_PrintSharedArchiveAndExit_enum, Flag_SharedBaseAddress_enum, Flag_SharedArchiveConfigFile_enum, Flag_SharedSymbolTableBucketSize_enum, Flag_AllowArchivingWithJavaAgent_enum, Flag_ArchiveHeapTestClass_enum, Flag_DumpLoadedClassList_enum, Flag_SharedClassListFile_enum, Flag_SharedArchiveFile_enum, Flag_ArchiveClassesAtExit_enum, Flag_ExtraSharedClassListFile_enum, Flag_ArchiveRelocationMode_enum, Flag_EnableJVMCI_enum, Flag_UseGraalJIT_enum, Flag_EnableJVMCIProduct_enum, Flag_UseJVMCICompiler_enum, Flag_JVMCIThreadsPerNativeLibraryRuntime_enum, Flag_JVMCICompilerIdleDelay_enum, Flag_JVMCIPrintProperties_enum, Flag_BootstrapJVMCI_enum, Flag_EagerJVMCI_enum, Flag_PrintBootstrap_enum, Flag_JVMCIThreads_enum, Flag_JVMCIHostThreads_enum, Flag_JVMCIEventLogLevel_enum, Flag_JVMCITraceLevel_enum, Flag_JVMCICounterSize_enum, Flag_JVMCICountersExcludeCompiler_enum, Flag_JVMCIUseFastLocking_enum, Flag_JVMCINMethodSizeLimit_enum, Flag_JVMCILibPath_enum, Flag_JVMCILibDumpJNIConfig_enum, Flag_UseJVMCINativeLibrary_enum, Flag_JVMCINativeLibraryThreadFraction_enum, Flag_JVMCINativeLibraryErrorFile_enum, Flag_LibJVMCICompilerThreadHidden_enum, Flag_PrintC1Statistics_enum, Flag_PrintInitialBlockList_enum, Flag_PrintCFG_enum, Flag_PrintCFG0_enum, Flag_PrintCFG1_enum, Flag_PrintCFG2_enum, Flag_PrintIRDuringConstruction_enum, Flag_PrintPhiFunctions_enum, Flag_PrintIR_enum, Flag_PrintIR0_enum, Flag_PrintIR1_enum, Flag_PrintIR2_enum, Flag_PrintSimpleStubs_enum, Flag_UseC1Optimizations_enum, Flag_SelectivePhiFunctions_enum, Flag_OptimizeIfOps_enum, Flag_DoCEE_enum, Flag_PrintCEE_enum, Flag_UseLocalValueNumbering_enum, Flag_UseGlobalValueNumbering_enum, Flag_UseLoopInvariantCodeMotion_enum, Flag_TracePredicateFailedTraps_enum, Flag_StressLoopInvariantCodeMotion_enum, Flag_TraceRangeCheckElimination_enum, Flag_AssertRangeCheckElimination_enum, Flag_StressRangeCheckElimination_enum, Flag_PrintValueNumbering_enum, Flag_ValueMapInitialSize_enum, Flag_ValueMapMaxLoopSize_enum, Flag_EliminateBlocks_enum, Flag_PrintBlockElimination_enum, Flag_EliminateNullChecks_enum, Flag_PrintNullCheckElimination_enum, Flag_EliminateFieldAccess_enum, Flag_InlineMethodsWithExceptionHandlers_enum, Flag_InlineSynchronizedMethods_enum, Flag_CanonicalizeNodes_enum, Flag_PrintCanonicalization_enum, Flag_UseTableRanges_enum, Flag_C1MaxInlineSize_enum, Flag_C1MaxTrivialSize_enum, Flag_C1MaxInlineLevel_enum, Flag_C1MaxRecursiveInlineLevel_enum, Flag_C1InlineStackLimit_enum, Flag_NestedInliningSizeRatio_enum, Flag_PrintIRWithLIR_enum, Flag_PrintLIRWithAssembly_enum, Flag_CommentedAssembly_enum, Flag_LIRTraceExecution_enum, Flag_CSEArrayLength_enum, Flag_TraceLinearScanLevel_enum, Flag_StressLinearScan_enum, Flag_TimeLinearScan_enum, Flag_TimeEachLinearScan_enum, Flag_CountLinearScan_enum, Flag_C1Breakpoint_enum, Flag_ImplicitDiv0Checks_enum, Flag_PinAllInstructions_enum, Flag_UseFastNewInstance_enum, Flag_UseFastNewTypeArray_enum, Flag_UseFastNewObjectArray_enum, Flag_UseSlowPath_enum, Flag_GenerateArrayStoreCheck_enum, Flag_DeoptC1_enum, Flag_PrintBailouts_enum, Flag_TracePatching_enum, Flag_PatchALot_enum, Flag_PrintNotLoaded_enum, Flag_PrintLIR_enum, Flag_BailoutAfterHIR_enum, Flag_BailoutAfterLIR_enum, Flag_BailoutOnExceptionHandlers_enum, Flag_InstallMethods_enum, Flag_NMethodSizeLimit_enum, Flag_TraceFPUStack_enum, Flag_TraceFPURegisterUsage_enum, Flag_InstructionCountCutoff_enum, Flag_ComputeExactFPURegisterUsage_enum, Flag_C1ProfileCalls_enum, Flag_C1ProfileVirtualCalls_enum, Flag_C1ProfileInlinedCalls_enum, Flag_C1ProfileBranches_enum, Flag_C1ProfileCheckcasts_enum, Flag_C1OptimizeVirtualCallProfiling_enum, Flag_C1UpdateMethodData_enum, Flag_PrintCFGToFile_enum, Flag_StressLCM_enum, Flag_StressGCM_enum, Flag_StressIGVN_enum, Flag_StressCCP_enum, Flag_StressSeed_enum, Flag_StressMethodHandleLinkerInlining_enum, Flag_OptoPrologueNops_enum, Flag_InteriorEntryAlignment_enum, Flag_MaxLoopPad_enum, Flag_MaxVectorSize_enum, Flag_ArrayOperationPartialInlineSize_enum, Flag_AlignVector_enum, Flag_NumberOfLoopInstrToAlign_enum, Flag_IndexSetWatch_enum, Flag_OptoNodeListSize_enum, Flag_OptoBlockListSize_enum, Flag_OptoPeepholeAt_enum, Flag_PrintIdeal_enum, Flag_PrintOpto_enum, Flag_PrintOptoInlining_enum, Flag_VerifyIdealNodeCount_enum, Flag_PrintIdealNodeCount_enum, Flag_IdealizeClearArrayNode_enum, Flag_OptoBreakpoint_enum, Flag_OptoBreakpointOSR_enum, Flag_BreakAtNode_enum, Flag_OptoBreakpointC2R_enum, Flag_OptoNoExecute_enum, Flag_PrintOptoStatistics_enum, Flag_PrintOptoAssembly_enum, Flag_OptoPeephole_enum, Flag_PrintFrameConverterAssembly_enum, Flag_PrintParseStatistics_enum, Flag_PrintOptoPeephole_enum, Flag_PrintCFGBlockFreq_enum, Flag_TraceOptoParse_enum, Flag_LoopUnrollLimit_enum, Flag_LoopPercentProfileLimit_enum, Flag_LoopMaxUnroll_enum, Flag_SuperWordLoopUnrollAnalysis_enum, Flag_TraceSuperWordLoopUnrollAnalysis_enum, Flag_UseVectorMacroLogic_enum, Flag_LoopUnrollMin_enum, Flag_UseSubwordForMaxVector_enum, Flag_UseVectorCmov_enum, Flag_UnrollLimitForProfileCheck_enum, Flag_MultiArrayExpandLimit_enum, Flag_TraceProfileTripCount_enum, Flag_UseCountedLoopSafepoints_enum, Flag_UseLoopPredicate_enum, Flag_TraceLoopPredicate_enum, Flag_TraceLoopOpts_enum, Flag_TraceLoopLimitCheck_enum, Flag_TraceRangeLimitCheck_enum, Flag_OptimizeFill_enum, Flag_TraceOptimizeFill_enum, Flag_OptoCoalesce_enum, Flag_UseUniqueSubclasses_enum, Flag_TrackedInitializationLimit_enum, Flag_ReduceFieldZeroing_enum, Flag_ReduceInitialCardMarks_enum, Flag_ReduceBulkZeroing_enum, Flag_UseFPUForSpilling_enum, Flag_RegisterCostAreaRatio_enum, Flag_UseCISCSpill_enum, Flag_VerifyGraphEdges_enum, Flag_VerifyDUIterators_enum, Flag_VerifyHashTableKeys_enum, Flag_VerifyRegisterAllocator_enum, Flag_FLOATPRESSURE_enum, Flag_INTPRESSURE_enum, Flag_TraceOptoPipelining_enum, Flag_TraceOptoOutput_enum, Flag_OptoScheduling_enum, Flag_OptoRegScheduling_enum, Flag_PartialPeelLoop_enum, Flag_PartialPeelNewPhiDelta_enum, Flag_TracePartialPeeling_enum, Flag_PartialPeelAtUnsignedTests_enum, Flag_ReassociateInvariants_enum, Flag_LoopUnswitching_enum, Flag_TraceLoopUnswitching_enum, Flag_AllowVectorizeOnDemand_enum, Flag_UseSuperWord_enum, Flag_SuperWordRTDepCheck_enum, Flag_SuperWordReductions_enum, Flag_UseCMoveUnconditionally_enum, Flag_DoReserveCopyInSuperWord_enum, Flag_TraceSuperWord_enum, Flag_TraceNewVectors_enum, Flag_OptoBundling_enum, Flag_ConditionalMoveLimit_enum, Flag_PrintIdealGraph_enum, Flag_PrintIdealGraphLevel_enum, Flag_PrintIdealGraphPort_enum, Flag_PrintIdealGraphAddress_enum, Flag_PrintIdealGraphFile_enum, Flag_UseBimorphicInlining_enum, Flag_UseOnlyInlinedBimorphic_enum, Flag_SubsumeLoads_enum, Flag_StressRecompilation_enum, Flag_ImplicitNullCheckThreshold_enum, Flag_LoopOptsCount_enum, Flag_OptimizeUnstableIf_enum, Flag_NodeCountInliningCutoff_enum, Flag_MaxNodeLimit_enum, Flag_NodeLimitFudgeFactor_enum, Flag_UseJumpTables_enum, Flag_UseDivMod_enum, Flag_MinJumpTableSize_enum, Flag_MaxJumpTableSize_enum, Flag_MaxJumpTableSparseness_enum, Flag_EliminateLocks_enum, Flag_EliminateNestedLocks_enum, Flag_PrintLockStatistics_enum, Flag_PrintPreciseRTMLockingStatistics_enum, Flag_PrintEliminateLocks_enum, Flag_EliminateAutoBox_enum, Flag_AutoBoxCacheMax_enum, Flag_AggressiveUnboxing_enum, Flag_TracePostallocExpand_enum, Flag_ReduceAllocationMerges_enum, Flag_TraceReduceAllocationMerges_enum, Flag_DoEscapeAnalysis_enum, Flag_EscapeAnalysisTimeout_enum, Flag_ExitEscapeAnalysisOnTimeout_enum, Flag_PrintEscapeAnalysis_enum, Flag_EliminateAllocations_enum, Flag_PrintEliminateAllocations_enum, Flag_EliminateAllocationArraySizeLimit_enum, Flag_EliminateAllocationFieldsLimit_enum, Flag_OptimizePtrCompare_enum, Flag_PrintOptimizePtrCompare_enum, Flag_VerifyConnectionGraph_enum, Flag_OptimizeStringConcat_enum, Flag_PrintOptimizeStringConcat_enum, Flag_ValueSearchLimit_enum, Flag_MaxLabelRootDepth_enum, Flag_DominatorSearchLimit_enum, Flag_BlockLayoutByFrequency_enum, Flag_BlockLayoutMinDiamondPercentage_enum, Flag_BlockLayoutRotateLoops_enum, Flag_InlineReflectionGetCallerClass_enum, Flag_InlineObjectCopy_enum, Flag_SpecialStringCompareTo_enum, Flag_SpecialStringIndexOf_enum, Flag_SpecialStringEquals_enum, Flag_SpecialArraysEquals_enum, Flag_SpecialEncodeISOArray_enum, Flag_BailoutToInterpreterForThrows_enum, Flag_ConvertCmpD2CmpF_enum, Flag_ConvertFloat2IntClipping_enum, Flag_MonomorphicArrayCheck_enum, Flag_TracePhaseCCP_enum, Flag_PrintDominators_enum, Flag_TraceSpilling_enum, Flag_TraceTypeProfile_enum, Flag_PoisonOSREntry_enum, Flag_SoftMatchFailure_enum, Flag_InlineAccessors_enum, Flag_TypeProfileMajorReceiverPercent_enum, Flag_PrintIntrinsics_enum, Flag_StressReflectiveCode_enum, Flag_DebugInlinedCalls_enum, Flag_VerifyLoopOptimizations_enum, Flag_ProfileDynamicTypes_enum, Flag_TraceIterativeGVN_enum, Flag_VerifyIterativeGVN_enum, Flag_TraceCISCSpill_enum, Flag_SplitIfBlocks_enum, Flag_FreqCountInvocations_enum, Flag_VerifyAliases_enum, Flag_MaxInlineLevel_enum, Flag_MaxRecursiveInlineLevel_enum, Flag_InlineSmallCode_enum, Flag_MaxInlineSize_enum, Flag_FreqInlineSize_enum, Flag_MaxTrivialSize_enum, Flag_IncrementalInline_enum, Flag_IncrementalInlineMH_enum, Flag_IncrementalInlineVirtual_enum, Flag_AlwaysIncrementalInline_enum, Flag_IncrementalInlineForceCleanup_enum, Flag_LiveNodeCountInliningCutoff_enum, Flag_OptimizeExpensiveOps_enum, Flag_UseMathExactIntrinsics_enum, Flag_UseCharacterCompareIntrinsics_enum, Flag_UseMultiplyToLenIntrinsic_enum, Flag_UseSquareToLenIntrinsic_enum, Flag_UseMulAddIntrinsic_enum, Flag_UseMontgomeryMultiplyIntrinsic_enum, Flag_UseMontgomerySquareIntrinsic_enum, Flag_EnableVectorSupport_enum, Flag_EnableVectorReboxing_enum, Flag_EnableVectorAggressiveReboxing_enum, Flag_UseVectorStubs_enum, Flag_UseTypeSpeculation_enum, Flag_UseInlineDepthForSpeculativeTypes_enum, Flag_TrapBasedRangeChecks_enum, Flag_ArrayCopyLoadStoreMaxElem_enum, Flag_StressArrayCopyMacroNode_enum, Flag_RenumberLiveNodes_enum, Flag_LoopStripMiningIter_enum, Flag_LoopStripMiningIterShortLoop_enum, Flag_UseProfiledLoopPredicate_enum, Flag_ExpandSubTypeCheckAtParseTime_enum, Flag_StressLongCountedLoop_enum, Flag_DuplicateBackedge_enum, Flag_StressDuplicateBackedge_enum, Flag_VerifyReceiverTypes_enum, Flag_TypeProfileSubTypeCheckCommonThreshold_enum, Flag_CIPrintCompilerName_enum, Flag_CIPrintCompileQueue_enum, Flag_CIPrintRequests_enum, Flag_CITime_enum, Flag_CITimeVerbose_enum, Flag_CITimeEach_enum, Flag_CICountOSR_enum, Flag_CICountNative_enum, Flag_CICompileNatives_enum, Flag_CICompileOSR_enum, Flag_CIPrintMethodCodes_enum, Flag_CIPrintTypeFlow_enum, Flag_CITraceTypeFlow_enum, Flag_CICompilerCountPerCPU_enum, Flag_CICrashAt_enum, Flag_CIObjectFactoryVerify_enum, Flag_CIStart_enum, Flag_CIStop_enum, Flag_CIStartOSR_enum, Flag_CIStopOSR_enum, Flag_CIBreakAtOSR_enum, Flag_CIBreakAt_enum, Flag_CompileThresholdScaling_enum, Flag_Tier0InvokeNotifyFreqLog_enum, Flag_Tier2InvokeNotifyFreqLog_enum, Flag_Tier3InvokeNotifyFreqLog_enum, Flag_Tier23InlineeNotifyFreqLog_enum, Flag_Tier0BackedgeNotifyFreqLog_enum, Flag_Tier2BackedgeNotifyFreqLog_enum, Flag_Tier3BackedgeNotifyFreqLog_enum, Flag_Tier2CompileThreshold_enum, Flag_Tier2BackEdgeThreshold_enum, Flag_Tier3InvocationThreshold_enum, Flag_Tier3MinInvocationThreshold_enum, Flag_Tier3CompileThreshold_enum, Flag_Tier3BackEdgeThreshold_enum, Flag_Tier4InvocationThreshold_enum, Flag_Tier4MinInvocationThreshold_enum, Flag_Tier4CompileThreshold_enum, Flag_Tier4BackEdgeThreshold_enum, Flag_Tier0Delay_enum, Flag_TieredOldPercentage_enum, Flag_Tier3DelayOn_enum, Flag_Tier3DelayOff_enum, Flag_Tier3LoadFeedback_enum, Flag_Tier4LoadFeedback_enum, Flag_TieredCompileTaskTimeout_enum, Flag_TieredStopAtLevel_enum, Flag_Tier0ProfilingStartPercentage_enum, Flag_IncreaseFirstTierCompileThresholdAt_enum, Flag_TieredRateUpdateMinTime_enum, Flag_TieredRateUpdateMaxTime_enum, Flag_CompilationMode_enum, Flag_PrintTieredEvents_enum, Flag_OnStackReplacePercentage_enum, Flag_InterpreterProfilePercentage_enum, Flag_CompileOnly_enum, Flag_CompileCommandFile_enum, Flag_CompilerDirectivesFile_enum, Flag_CompileCommand_enum, Flag_ReplayCompiles_enum, Flag_ReplayReduce_enum, Flag_ReplayDataFile_enum, Flag_InlineDataFile_enum, Flag_ReplaySuppressInitializers_enum, Flag_ReplayIgnoreInitErrors_enum, Flag_DumpReplayDataOnError_enum, Flag_CompilerDirectivesIgnoreCompileCommands_enum, Flag_CompilerDirectivesPrint_enum, Flag_CompilerDirectivesLimit_enum, Flag_EstimateArgEscape_enum, Flag_BCEATraceLevel_enum, Flag_MaxBCEAEstimateLevel_enum, Flag_MaxBCEAEstimateSize_enum, Flag_AbortVMOnCompilationFailure_enum, Flag_OSROnlyBCI_enum, Flag_DesiredMethodLimit_enum, Flag_DontCompileHugeMethods_enum, Flag_HugeMethodLimit_enum, Flag_CheckCompressedOops_enum, Flag_HeapSearchSteps_enum, Flag_HandshakeTimeout_enum, Flag_AlwaysSafeConstructors_enum, Flag_UnlockDiagnosticVMOptions_enum, Flag_UnlockExperimentalVMOptions_enum, Flag_JavaMonitorsInStackTrace_enum, Flag_UseLargePages_enum, Flag_UseLargePagesIndividualAllocation_enum, Flag_LargePagesIndividualAllocationInjectError_enum, Flag_UseNUMA_enum, Flag_UseNUMAInterleaving_enum, Flag_NUMAInterleaveGranularity_enum, Flag_NUMAChunkResizeWeight_enum, Flag_NUMASpaceResizeRate_enum, Flag_UseAdaptiveNUMAChunkSizing_enum, Flag_NUMAStats_enum, Flag_NUMAPageScanRate_enum, Flag_UseAES_enum, Flag_UseFMA_enum, Flag_UseSHA_enum, Flag_UseGHASHIntrinsics_enum, Flag_UseBASE64Intrinsics_enum, Flag_UsePoly1305Intrinsics_enum, Flag_LargePageSizeInBytes_enum, Flag_LargePageHeapSizeThreshold_enum, Flag_ForceTimeHighResolution_enum, Flag_TracePcPatching_enum, Flag_TraceRelocator_enum, Flag_SafepointALot_enum, Flag_HandshakeALot_enum, Flag_BackgroundCompilation_enum, Flag_MethodFlushing_enum, Flag_VerifyStack_enum, Flag_ForceUnreachable_enum, Flag_TraceDerivedPointers_enum, Flag_TraceCodeBlobStacks_enum, Flag_PrintRewrites_enum, Flag_UseInlineCaches_enum, Flag_InlineArrayCopy_enum, Flag_InlineObjectHash_enum, Flag_InlineNatives_enum, Flag_InlineMathNatives_enum, Flag_InlineClassNatives_enum, Flag_InlineThreadNatives_enum, Flag_InlineUnsafeOps_enum, Flag_UseAESIntrinsics_enum, Flag_UseAESCTRIntrinsics_enum, Flag_UseChaCha20Intrinsics_enum, Flag_UseMD5Intrinsics_enum, Flag_UseSHA1Intrinsics_enum, Flag_UseSHA256Intrinsics_enum, Flag_UseSHA512Intrinsics_enum, Flag_UseSHA3Intrinsics_enum, Flag_UseCRC32Intrinsics_enum, Flag_UseCRC32CIntrinsics_enum, Flag_UseAdler32Intrinsics_enum, Flag_UseVectorizedMismatchIntrinsic_enum, Flag_UseVectorizedHashCodeIntrinsic_enum, Flag_UseCopySignIntrinsic_enum, Flag_UseSignumIntrinsic_enum, Flag_DelayCompilerStubsGeneration_enum, Flag_DisableIntrinsic_enum, Flag_ControlIntrinsic_enum, Flag_TraceCallFixup_enum, Flag_DeoptimizeALot_enum, Flag_DeoptimizeOnlyAt_enum, Flag_DeoptimizeRandom_enum, Flag_ZombieALot_enum, Flag_WalkStackALot_enum, Flag_DeoptimizeObjectsALot_enum, Flag_DeoptimizeObjectsALotInterval_enum, Flag_DeoptimizeObjectsALotThreadCountSingle_enum, Flag_DeoptimizeObjectsALotThreadCountAll_enum, Flag_VerifyLastFrame_enum, Flag_SafepointTimeout_enum, Flag_AbortVMOnSafepointTimeout_enum, Flag_AbortVMOnSafepointTimeoutDelay_enum, Flag_AbortVMOnVMOperationTimeout_enum, Flag_AbortVMOnVMOperationTimeoutDelay_enum, Flag_MaxFDLimit_enum, Flag_LogEvents_enum, Flag_LogEventsBufferEntries_enum, Flag_BytecodeVerificationRemote_enum, Flag_BytecodeVerificationLocal_enum, Flag_VerifyStackAtCalls_enum, Flag_TraceJavaAssertions_enum, Flag_VerifyCodeCache_enum, Flag_ZapResourceArea_enum, Flag_ZapVMHandleArea_enum, Flag_ZapStackSegments_enum, Flag_ZapUnusedHeapArea_enum, Flag_CheckZapUnusedHeapArea_enum, Flag_ZapFillerObjects_enum, Flag_ExecutingUnitTests_enum, Flag_ErrorHandlerTest_enum, Flag_TestCrashInErrorHandler_enum, Flag_TestSafeFetchInErrorHandler_enum, Flag_TestUnresponsiveErrorHandler_enum, Flag_Verbose_enum, Flag_PrintMiscellaneous_enum, Flag_WizardMode_enum, Flag_ShowMessageBoxOnError_enum, Flag_CreateCoredumpOnCrash_enum, Flag_ErrorLogTimeout_enum, Flag_ErrorLogSecondaryErrorDetails_enum, Flag_TraceDwarfLevel_enum, Flag_SuppressFatalErrorMessage_enum, Flag_OnError_enum, Flag_OnOutOfMemoryError_enum, Flag_HeapDumpBeforeFullGC_enum, Flag_HeapDumpAfterFullGC_enum, Flag_HeapDumpOnOutOfMemoryError_enum, Flag_HeapDumpPath_enum, Flag_HeapDumpGzipLevel_enum, Flag_NativeMemoryTracking_enum, Flag_PrintNMTStatistics_enum, Flag_LogCompilation_enum, Flag_PrintCompilation_enum, Flag_RepeatCompilation_enum, Flag_PrintExtendedThreadInfo_enum, Flag_ScavengeRootsInCode_enum, Flag_AlwaysRestoreFPU_enum, Flag_PrintCompilation2_enum, Flag_PrintAdapterHandlers_enum, Flag_VerifyAdapterCalls_enum, Flag_VerifyAdapterSharing_enum, Flag_PrintAssembly_enum, Flag_PrintAssemblyOptions_enum, Flag_PrintNMethodStatistics_enum, Flag_PrintNMethods_enum, Flag_PrintNativeNMethods_enum, Flag_PrintDebugInfo_enum, Flag_PrintRelocations_enum, Flag_PrintDependencies_enum, Flag_PrintExceptionHandlers_enum, Flag_StressCompiledExceptionHandlers_enum, Flag_InterceptOSException_enum, Flag_PrintCodeCache_enum, Flag_PrintCodeCache2_enum, Flag_PrintCodeCacheOnCompilation_enum, Flag_PrintCodeHeapAnalytics_enum, Flag_PrintStubCode_enum, Flag_StackTraceInThrowable_enum, Flag_OmitStackTraceInFastThrow_enum, Flag_ShowCodeDetailsInExceptionMessages_enum, Flag_PrintWarnings_enum, Flag_RegisterFinalizersAtInit_enum, Flag_RegisterReferences_enum, Flag_PrintCodeCacheExtension_enum, Flag_UsePrivilegedStack_enum, Flag_ClassUnloading_enum, Flag_ClassUnloadingWithConcurrentMark_enum, Flag_PrintSystemDictionaryAtExit_enum, Flag_PrintClassLoaderDataGraphAtExit_enum, Flag_AllowParallelDefineClass_enum, Flag_DontYieldALot_enum, Flag_DisablePrimordialThreadGuardPages_enum, Flag_DoJVMTIVirtualThreadTransitions_enum, Flag_AsyncDeflationInterval_enum, Flag_GuaranteedAsyncDeflationInterval_enum, Flag_AvgMonitorsPerThreadEstimate_enum, Flag_MonitorDeflationMax_enum, Flag_MonitorUsedDeflationThreshold_enum, Flag_NoAsyncDeflationProgressMax_enum, Flag_hashCode_enum, Flag_ReduceSignalUsage_enum, Flag_LoadLineNumberTables_enum, Flag_LoadLocalVariableTables_enum, Flag_LoadLocalVariableTypeTables_enum, Flag_AllowUserSignalHandlers_enum, Flag_UseSignalChaining_enum, Flag_RestoreMXCSROnJNICalls_enum, Flag_CheckJNICalls_enum, Flag_UseFastJNIAccessors_enum, Flag_MaxJNILocalCapacity_enum, Flag_EagerXrunInit_enum, Flag_PreserveAllAnnotations_enum, Flag_PreallocatedOutOfMemoryErrorCount_enum, Flag_UseXMMForArrayCopy_enum, Flag_PrintFieldLayout_enum, Flag_ContendedPaddingWidth_enum, Flag_EnableContended_enum, Flag_RestrictContended_enum, Flag_DiagnoseSyncOnValueBasedClasses_enum, Flag_ExitOnOutOfMemoryError_enum, Flag_CrashOnOutOfMemoryError_enum, Flag_StressRewriter_enum, Flag_TraceJVMTI_enum, Flag_StressLdcRewrite_enum, Flag_AllowRedefinitionToAddDeleteMethods_enum, Flag_TraceBytecodes_enum, Flag_TraceICs_enum, Flag_TraceInvocationCounterOverflow_enum, Flag_TraceInlineCacheClearing_enum, Flag_VerifyDependencies_enum, Flag_TraceNewOopMapGeneration_enum, Flag_TraceNewOopMapGenerationDetailed_enum, Flag_TimeOopMap_enum, Flag_TimeOopMap2_enum, Flag_TraceOopMapRewrites_enum, Flag_TraceICBuffer_enum, Flag_TraceCompiledIC_enum, Flag_FLSVerifyDictionary_enum, Flag_ProcessDistributionStride_enum, Flag_TraceFinalizerRegistration_enum, Flag_IgnoreEmptyClassPaths_enum, Flag_PrintHeapAtSIGBREAK_enum, Flag_PrintClassHistogram_enum, Flag_ObjectCountCutOffPercent_enum, Flag_VerifyBeforeIteration_enum, Flag_CICompilerCount_enum, Flag_UseDynamicNumberOfCompilerThreads_enum, Flag_ReduceNumberOfCompilerThreads_enum, Flag_TraceCompilerThreads_enum, Flag_LogClassLoadingCauseFor_enum, Flag_InjectCompilerCreationFailure_enum, Flag_GenerateSynchronizationCode_enum, Flag_ImplicitNullChecks_enum, Flag_TrapBasedNullChecks_enum, Flag_EnableThreadSMRStatistics_enum, Flag_UseNotificationThread_enum, Flag_Inline_enum, Flag_ClipInlining_enum, Flag_UseCHA_enum, Flag_UseVtableBasedCHA_enum, Flag_UseTypeProfile_enum, Flag_PrintInlining_enum, Flag_UsePopCountInstruction_enum, Flag_TraceMethodReplacement_enum, Flag_PrintMethodFlushingStatistics_enum, Flag_MinPassesBeforeFlush_enum, Flag_StressCodeBuffers_enum, Flag_DebugNonSafepoints_enum, Flag_PrintVMOptions_enum, Flag_IgnoreUnrecognizedVMOptions_enum, Flag_PrintCommandLineFlags_enum, Flag_PrintFlagsInitial_enum, Flag_PrintFlagsFinal_enum, Flag_PrintFlagsWithComments_enum, Flag_PrintFlagsRanges_enum, Flag_SerializeVMOutput_enum, Flag_DisplayVMOutput_enum, Flag_LogVMOutput_enum, Flag_LogFile_enum, Flag_ErrorFile_enum, Flag_ExtensiveErrorReports_enum, Flag_DisplayVMOutputToStderr_enum, Flag_DisplayVMOutputToStdout_enum, Flag_ErrorFileToStderr_enum, Flag_ErrorFileToStdout_enum, Flag_UseHeavyMonitors_enum, Flag_VerifyHeavyMonitors_enum, Flag_PrintStringTableStatistics_enum, Flag_VerifyStringTableAtExit_enum, Flag_PrintSymbolTableSizeHistogram_enum, Flag_AbortVMOnException_enum, Flag_AbortVMOnExceptionMessage_enum, Flag_DebugVtables_enum, Flag_RangeCheckElimination_enum, Flag_UncommonNullCast_enum, Flag_TypeProfileCasts_enum, Flag_TraceLivenessGen_enum, Flag_TraceLivenessQuery_enum, Flag_CollectIndexSetStatistics_enum, Flag_FastAllocateSizeLimit_enum, Flag_CompactStrings_enum, Flag_TypeProfileLevel_enum, Flag_TypeProfileArgsLimit_enum, Flag_TypeProfileParmsLimit_enum, Flag_CountCompiledCalls_enum, Flag_ICMissHistogram_enum, Flag_RewriteBytecodes_enum, Flag_RewriteFrequentPairs_enum, Flag_PrintInterpreter_enum, Flag_UseInterpreter_enum, Flag_UseFastSignatureHandlers_enum, Flag_UseLoopCounter_enum, Flag_UseOnStackReplacement_enum, Flag_TraceOnStackReplacement_enum, Flag_PreferInterpreterNativeStubs_enum, Flag_CountBytecodes_enum, Flag_PrintBytecodeHistogram_enum, Flag_PrintBytecodePairHistogram_enum, Flag_PrintSignatureHandlers_enum, Flag_VerifyOops_enum, Flag_CheckUnhandledOops_enum, Flag_VerifyJNIFields_enum, Flag_VerifyFPU_enum, Flag_VerifyActivationFrameSize_enum, Flag_TraceFrequencyInlining_enum, Flag_InlineIntrinsics_enum, Flag_ProfileInterpreter_enum, Flag_ProfileTraps_enum, Flag_ProfileMaturityPercentage_enum, Flag_PrintMethodData_enum, Flag_VerifyDataPointer_enum, Flag_CrashGCForDumpingJavaThread_enum, Flag_UseCompiler_enum, Flag_UseCounterDecay_enum, Flag_CounterHalfLifeTime_enum, Flag_CounterDecayMinIntervalLength_enum, Flag_AlwaysCompileLoopMethods_enum, Flag_AllocatePrefetchStyle_enum, Flag_AllocatePrefetchDistance_enum, Flag_AllocatePrefetchLines_enum, Flag_AllocateInstancePrefetchLines_enum, Flag_AllocatePrefetchStepSize_enum, Flag_AllocatePrefetchInstr_enum, Flag_TraceDeoptimization_enum, Flag_PrintDeoptimizationDetails_enum, Flag_DebugDeoptimization_enum, Flag_SelfDestructTimer_enum, Flag_MaxJavaStackTraceDepth_enum, Flag_GuaranteedSafepointInterval_enum, Flag_SafepointTimeoutDelay_enum, Flag_UseSystemMemoryBarrier_enum, Flag_NmethodSweepActivity_enum, Flag_MallocCatchPtr_enum, Flag_StackPrintLimit_enum, Flag_ErrorLogPrintCodeLimit_enum, Flag_MaxElementPrintSize_enum, Flag_MaxSubklassPrintSize_enum, Flag_MaxForceInlineLevel_enum, Flag_MethodHistogramCutoff_enum, Flag_DontYieldALotInterval_enum, Flag_DeoptimizeALotInterval_enum, Flag_ZombieALotInterval_enum, Flag_MallocLimit_enum, Flag_TypeProfileWidth_enum, Flag_BciProfileWidth_enum, Flag_PerMethodRecompilationCutoff_enum, Flag_PerBytecodeRecompilationCutoff_enum, Flag_PerMethodTrapLimit_enum, Flag_PerMethodSpecTrapLimit_enum, Flag_PerBytecodeTrapLimit_enum, Flag_SpecTrapLimitExtraEntries_enum, Flag_InlineFrequencyRatio_enum, Flag_MinInlineFrequencyRatio_enum, Flag_InlineThrowCount_enum, Flag_InlineThrowMaxSize_enum, Flag_MetaspaceSize_enum, Flag_MaxMetaspaceSize_enum, Flag_CompressedClassSpaceSize_enum, Flag_CompressedClassSpaceBaseAddress_enum, Flag_RandomizeClassSpaceLocation_enum, Flag_PrintMetaspaceStatisticsAtExit_enum, Flag_MetaspaceGuardAllocations_enum, Flag_MinHeapFreeRatio_enum, Flag_MaxHeapFreeRatio_enum, Flag_ShrinkHeapInSteps_enum, Flag_SoftRefLRUPolicyMSPerMB_enum, Flag_MinHeapDeltaBytes_enum, Flag_MinMetaspaceExpansion_enum, Flag_MaxMetaspaceFreeRatio_enum, Flag_MinMetaspaceFreeRatio_enum, Flag_MaxMetaspaceExpansion_enum, Flag_StackYellowPages_enum, Flag_StackRedPages_enum, Flag_StackReservedPages_enum, Flag_RestrictReservedStack_enum, Flag_StackShadowPages_enum, Flag_ThreadStackSize_enum, Flag_VMThreadStackSize_enum, Flag_CompilerThreadStackSize_enum, Flag_JVMInvokeMethodSlack_enum, Flag_CodeCacheSegmentSize_enum, Flag_CodeEntryAlignment_enum, Flag_OptoLoopAlignment_enum, Flag_InitialCodeCacheSize_enum, Flag_CodeCacheMinimumUseSpace_enum, Flag_SegmentedCodeCache_enum, Flag_ReservedCodeCacheSize_enum, Flag_NonProfiledCodeHeapSize_enum, Flag_ProfiledCodeHeapSize_enum, Flag_NonNMethodCodeHeapSize_enum, Flag_CodeCacheExpansionSize_enum, Flag_CodeCacheMinBlockLength_enum, Flag_ExitOnFullCodeCache_enum, Flag_UseCodeCacheFlushing_enum, Flag_SweeperThreshold_enum, Flag_StartAggressiveSweepingAt_enum, Flag_BinarySwitchThreshold_enum, Flag_StopInterpreterAt_enum, Flag_TraceBytecodesAt_enum, Flag_TraceBytecodesStopAt_enum, Flag_UseThreadPriorities_enum, Flag_ThreadPriorityPolicy_enum, Flag_ThreadPriorityVerbose_enum, Flag_CompilerThreadPriority_enum, Flag_VMThreadPriority_enum, Flag_JavaPriority1_To_OSPriority_enum, Flag_JavaPriority2_To_OSPriority_enum, Flag_JavaPriority3_To_OSPriority_enum, Flag_JavaPriority4_To_OSPriority_enum, Flag_JavaPriority5_To_OSPriority_enum, Flag_JavaPriority6_To_OSPriority_enum, Flag_JavaPriority7_To_OSPriority_enum, Flag_JavaPriority8_To_OSPriority_enum, Flag_JavaPriority9_To_OSPriority_enum, Flag_JavaPriority10_To_OSPriority_enum, Flag_UseCriticalJavaThreadPriority_enum, Flag_UseCriticalCompilerThreadPriority_enum, Flag_NewCodeParameter_enum, Flag_MinOopMapAllocation_enum, Flag_CompileThreshold_enum, Flag_TieredCompilation_enum, Flag_MaxDirectMemorySize_enum, Flag_UseNewCode_enum, Flag_UseNewCode2_enum, Flag_UseNewCode3_enum, Flag_UseDebuggerErgo_enum, Flag_UseDebuggerErgo1_enum, Flag_UseDebuggerErgo2_enum, Flag_EnableJVMTIStackDepthAsserts_enum, Flag_UsePerfData_enum, Flag_PerfDataSaveToFile_enum, Flag_PerfDataSaveFile_enum, Flag_PerfDataSamplingInterval_enum, Flag_PerfDisableSharedMem_enum, Flag_PerfDataMemorySize_enum, Flag_PerfMaxStringConstLength_enum, Flag_PerfAllowAtExitRegistration_enum, Flag_PerfBypassFileSystemCheck_enum, Flag_UnguardOnExecutionViolation_enum, Flag_ManagementServer_enum, Flag_DisableAttachMechanism_enum, Flag_StartAttachListener_enum, Flag_EnableDynamicAgentLoading_enum, Flag_PrintConcurrentLocks_enum, Flag_PrintMethodHandleStubs_enum, Flag_VerifyMethodHandles_enum, Flag_ShowHiddenFrames_enum, Flag_ShowCarrierFrames_enum, Flag_TrustFinalNonStaticFields_enum, Flag_FoldStableValues_enum, Flag_UseBootstrapCallInfo_enum, Flag_PauseAtStartup_enum, Flag_PauseAtStartupFile_enum, Flag_PauseAtExit_enum, Flag_DTraceMethodProbes_enum, Flag_DTraceAllocProbes_enum, Flag_DTraceMonitorProbes_enum, Flag_RelaxAccessControlCheck_enum, Flag_StringTableSize_enum, Flag_SymbolTableSize_enum, Flag_UseStringDeduplication_enum, Flag_StringDeduplicationAgeThreshold_enum, Flag_StringDeduplicationInitialTableSize_enum, Flag_StringDeduplicationGrowTableLoad_enum, Flag_StringDeduplicationShrinkTableLoad_enum, Flag_StringDeduplicationTargetTableLoad_enum, Flag_StringDeduplicationCleanupDeadMinimum_enum, Flag_StringDeduplicationCleanupDeadPercent_enum, Flag_StringDeduplicationResizeALot_enum, Flag_StringDeduplicationHashSeed_enum, Flag_WhiteBoxAPI_enum, Flag_ArrayAllocatorMallocLimit_enum, Flag_AlwaysAtomicAccesses_enum, Flag_UseUnalignedAccesses_enum, Flag_PreserveFramePointer_enum, Flag_AsyncLogBufferSize_enum, Flag_CheckIntrinsics_enum, Flag_InitArrayShortSize_enum, Flag_AllocateHeapAt_enum, Flag_VMContinuations_enum, Flag_LoomDeoptAfterThaw_enum, Flag_LoomVerifyAfterThaw_enum, Flag_VerifyContinuations_enum, Flag_UseContinuationFastPath_enum, Flag_VerifyMetaspaceInterval_enum, Flag_ShowRegistersOnAssert_enum, Flag_UseSwitchProfiling_enum, Flag_TraceMemoryWriteback_enum, Flag_FlightRecorder_enum, Flag_FlightRecorderOptions_enum, Flag_StartFlightRecording_enum, Flag_UseFastUnorderedTimeStamps_enum, Flag_UseEmptySlotsInSupers_enum, Flag_DeoptimizeNMethodBarriersALot_enum, Flag_VerifyCrossModifyFence_enum, Flag_LockingMode_enum, Flag_TrimNativeHeapInterval_enum, Flag_UseOprofile_enum, Flag_UseLinuxPosixThreadCPUClocks_enum, Flag_UseHugeTLBFS_enum, Flag_UseTransparentHugePages_enum, Flag_LoadExecStackDllInVMThread_enum, Flag_UseSHM_enum, Flag_UseContainerSupport_enum, Flag_AdjustStackSizeForTLS_enum, Flag_DumpPrivateMappingsInCore_enum, Flag_DumpSharedMappingsInCore_enum, Flag_UseCpuAllocPath_enum, Flag_DumpPerfMapAtExit_enum, Flag_TimerSlack_enum, Flag_THPStackMitigation_enum, Flag_DelayThreadStartALot_enum, Flag_EpsilonPrintHeapSteps_enum, Flag_EpsilonUpdateCountersStep_enum, Flag_EpsilonMaxTLABSize_enum, Flag_EpsilonElasticTLAB_enum, Flag_EpsilonElasticTLABDecay_enum, Flag_EpsilonTLABElasticity_enum, Flag_EpsilonTLABDecayTime_enum, Flag_EpsilonMinHeapExpand_enum, Flag_G1UseAdaptiveIHOP_enum, Flag_G1AdaptiveIHOPNumInitialSamples_enum, Flag_G1ConfidencePercent_enum, Flag_G1SummarizeRSetStatsPeriod_enum, Flag_G1ConcMarkStepDurationMillis_enum, Flag_G1RefProcDrainInterval_enum, Flag_G1UseReferencePrecleaning_enum, Flag_G1LastPLABAverageOccupancy_enum, Flag_G1SATBBufferSize_enum, Flag_G1SATBProcessCompletedThreshold_enum, Flag_G1SATBBufferEnqueueingThresholdPercent_enum, Flag_G1ExpandByPercentOfAvailable_enum, Flag_G1UpdateBufferSize_enum, Flag_G1RSetUpdatingPauseTimePercent_enum, Flag_G1UseConcRefinement_enum, Flag_G1RemSetArrayOfCardsEntriesBase_enum, Flag_G1RemSetArrayOfCardsEntries_enum, Flag_G1RemSetHowlMaxNumBuckets_enum, Flag_G1RemSetHowlNumBuckets_enum, Flag_G1RemSetCoarsenHowlBitmapToHowlFullPercent_enum, Flag_G1RemSetCoarsenHowlToFullPercent_enum, Flag_G1MaxVerifyFailures_enum, Flag_G1ReservePercent_enum, Flag_G1HeapRegionSize_enum, Flag_G1ConcRefinementThreads_enum, Flag_G1MaxNewSizePercent_enum, Flag_G1NewSizePercent_enum, Flag_G1MixedGCLiveThresholdPercent_enum, Flag_G1RetainRegionLiveThresholdPercent_enum, Flag_G1HeapWastePercent_enum, Flag_G1MixedGCCountTarget_enum, Flag_G1EagerReclaimRemSetThreshold_enum, Flag_G1RebuildRemSetChunkSize_enum, Flag_G1OldCSetRegionThresholdPercent_enum, Flag_G1VerifyHeapRegionCodeRoots_enum, Flag_G1VerifyBitmaps_enum, Flag_G1PeriodicGCInterval_enum, Flag_G1PeriodicGCInvokesConcurrent_enum, Flag_G1PeriodicGCSystemLoadThreshold_enum, Flag_G1RemSetFreeMemoryRescheduleDelayMillis_enum, Flag_G1RemSetFreeMemoryStepDurationMillis_enum, Flag_G1RemSetFreeMemoryKeepExcessRatio_enum, Flag_G1RestoreRetainedRegionChunksPerWorker_enum, Flag_G1NumCardsCostSampleThreshold_enum, Flag_HeapMaximumCompactionInterval_enum, Flag_HeapFirstMaximumCompactionCount_enum, Flag_UseMaximumCompactionOnSystemGC_enum, Flag_ParallelOldDeadWoodLimiterMean_enum, Flag_ParallelOldDeadWoodLimiterStdDev_enum, Flag_PSChunkLargeArrays_enum, Flag_ShenandoahRegionSize_enum, Flag_ShenandoahTargetNumRegions_enum, Flag_ShenandoahMinRegionSize_enum, Flag_ShenandoahMaxRegionSize_enum, Flag_ShenandoahHumongousThreshold_enum, Flag_ShenandoahGCMode_enum, Flag_ShenandoahGCHeuristics_enum, Flag_ShenandoahUnloadClassesFrequency_enum, Flag_ShenandoahGarbageThreshold_enum, Flag_ShenandoahInitFreeThreshold_enum, Flag_ShenandoahMinFreeThreshold_enum, Flag_ShenandoahAllocationThreshold_enum, Flag_ShenandoahAllocSpikeFactor_enum, Flag_ShenandoahLearningSteps_enum, Flag_ShenandoahImmediateThreshold_enum, Flag_ShenandoahAdaptiveSampleFrequencyHz_enum, Flag_ShenandoahAdaptiveSampleSizeSeconds_enum, Flag_ShenandoahAdaptiveInitialConfidence_enum, Flag_ShenandoahAdaptiveInitialSpikeThreshold_enum, Flag_ShenandoahAdaptiveDecayFactor_enum, Flag_ShenandoahGuaranteedGCInterval_enum, Flag_ShenandoahAlwaysClearSoftRefs_enum, Flag_ShenandoahUncommit_enum, Flag_ShenandoahUncommitDelay_enum, Flag_ShenandoahRegionSampling_enum, Flag_ShenandoahRegionSamplingRate_enum, Flag_ShenandoahControlIntervalMin_enum, Flag_ShenandoahControlIntervalMax_enum, Flag_ShenandoahControlIntervalAdjustPeriod_enum, Flag_ShenandoahVerify_enum, Flag_ShenandoahVerifyLevel_enum, Flag_ShenandoahElasticTLAB_enum, Flag_ShenandoahEvacReserve_enum, Flag_ShenandoahEvacWaste_enum, Flag_ShenandoahEvacReserveOverflow_enum, Flag_ShenandoahPacing_enum, Flag_ShenandoahPacingMaxDelay_enum, Flag_ShenandoahPacingIdleSlack_enum, Flag_ShenandoahPacingCycleSlack_enum, Flag_ShenandoahPacingSurcharge_enum, Flag_ShenandoahCriticalFreeThreshold_enum, Flag_ShenandoahDegeneratedGC_enum, Flag_ShenandoahFullGCThreshold_enum, Flag_ShenandoahImplicitGCInvokesConcurrent_enum, Flag_ShenandoahHumongousMoves_enum, Flag_ShenandoahOOMDuringEvacALot_enum, Flag_ShenandoahAllocFailureALot_enum, Flag_ShenandoahMarkScanPrefetch_enum, Flag_ShenandoahMarkLoopStride_enum, Flag_ShenandoahParallelRegionStride_enum, Flag_ShenandoahSATBBufferSize_enum, Flag_ShenandoahMaxSATBBufferFlushes_enum, Flag_ShenandoahSuspendibleWorkers_enum, Flag_ShenandoahSATBBarrier_enum, Flag_ShenandoahIUBarrier_enum, Flag_ShenandoahCASBarrier_enum, Flag_ShenandoahCloneBarrier_enum, Flag_ShenandoahLoadRefBarrier_enum, Flag_ShenandoahNMethodBarrier_enum, Flag_ShenandoahStackWatermarkBarrier_enum, Flag_ShenandoahVerifyOptoBarriers_enum, Flag_ShenandoahLoopOptsAfterExpansion_enum, Flag_ShenandoahSelfFixing_enum, Flag_ZAllocationSpikeTolerance_enum, Flag_ZFragmentationLimit_enum, Flag_ZMarkStackSpaceLimit_enum, Flag_ZCollectionInterval_enum, Flag_ZProactive_enum, Flag_ZUncommit_enum, Flag_ZUncommitDelay_enum, Flag_ZAsyncUnmappingLimit_enum, Flag_ZStatisticsInterval_enum, Flag_ZStressRelocateInPlace_enum, Flag_ZVerifyRoots_enum, Flag_ZVerifyObjects_enum, Flag_ZVerifyMarking_enum, Flag_ZVerifyForwarding_enum, Flag_ZVerifyViews_enum, Flag_ZYoungCompactionLimit_enum, Flag_ZCollectionIntervalMinor_enum, Flag_ZCollectionIntervalMajor_enum, Flag_ZCollectionIntervalOnly_enum, Flag_ZBufferStoreBarriers_enum, Flag_ZYoungGCThreads_enum, Flag_ZOldGCThreads_enum, Flag_ZIndexDistributorStrategy_enum, Flag_ZVerifyRemembered_enum, Flag_ZVerifyOops_enum, Flag_ZTenuringThreshold_enum, Flag_ZForceDiscontiguousHeapReservations_enum, Flag_UseSerialGC_enum, Flag_UseG1GC_enum, Flag_UseParallelGC_enum, Flag_UseEpsilonGC_enum, Flag_UseZGC_enum, Flag_ZGenerational_enum, Flag_UseShenandoahGC_enum, Flag_ParallelGCThreads_enum, Flag_UseDynamicNumberOfGCThreads_enum, Flag_InjectGCWorkerCreationFailure_enum, Flag_HeapSizePerGCThread_enum, Flag_ConcGCThreads_enum, Flag_AlwaysTenure_enum, Flag_NeverTenure_enum, Flag_ScavengeBeforeFullGC_enum, Flag_ExplicitGCInvokesConcurrent_enum, Flag_GCLockerEdenExpansionPercent_enum, Flag_GCLockerRetryAllocationCount_enum, Flag_ParallelGCBufferWastePct_enum, Flag_TargetPLABWastePct_enum, Flag_PLABWeight_enum, Flag_ResizePLAB_enum, Flag_ParGCArrayScanChunk_enum, Flag_AlwaysPreTouch_enum, Flag_AlwaysPreTouchStacks_enum, Flag_PreTouchParallelChunkSize_enum, Flag_MarkStackSizeMax_enum, Flag_MarkStackSize_enum, Flag_ParallelRefProcEnabled_enum, Flag_ParallelRefProcBalancingEnabled_enum, Flag_ReferencesPerThread_enum, Flag_InitiatingHeapOccupancyPercent_enum, Flag_ScavengeALot_enum, Flag_FullGCALot_enum, Flag_GCALotAtAllSafepoints_enum, Flag_PromotionFailureALot_enum, Flag_PromotionFailureALotCount_enum, Flag_PromotionFailureALotInterval_enum, Flag_WorkStealingSleepMillis_enum, Flag_WorkStealingYieldsBeforeSleep_enum, Flag_WorkStealingHardSpins_enum, Flag_WorkStealingSpinToYieldRatio_enum, Flag_ObjArrayMarkingStride_enum, Flag_MetadataAllocationFailALot_enum, Flag_MetadataAllocationFailALotInterval_enum, Flag_NeverActAsServerClassMachine_enum, Flag_AlwaysActAsServerClassMachine_enum, Flag_MaxRAM_enum, Flag_AggressiveHeap_enum, Flag_ErgoHeapSizeLimit_enum, Flag_MaxRAMFraction_enum, Flag_MinRAMFraction_enum, Flag_InitialRAMFraction_enum, Flag_MaxRAMPercentage_enum, Flag_MinRAMPercentage_enum, Flag_InitialRAMPercentage_enum, Flag_ActiveProcessorCount_enum, Flag_MaxVirtMemFraction_enum, Flag_UseAdaptiveSizePolicy_enum, Flag_UsePSAdaptiveSurvivorSizePolicy_enum, Flag_UseAdaptiveGenerationSizePolicyAtMinorCollection_enum, Flag_UseAdaptiveGenerationSizePolicyAtMajorCollection_enum, Flag_UseAdaptiveSizePolicyWithSystemGC_enum, Flag_PSAdaptiveSizePolicyResizeVirtualSpaceAlot_enum, Flag_AdaptiveSizeThroughPutPolicy_enum, Flag_AdaptiveSizePolicyInitializingSteps_enum, Flag_AdaptiveSizePolicyReadyThreshold_enum, Flag_AdaptiveSizePolicyOutputInterval_enum, Flag_UseAdaptiveSizePolicyFootprintGoal_enum, Flag_AdaptiveSizePolicyWeight_enum, Flag_AdaptiveTimeWeight_enum, Flag_PausePadding_enum, Flag_PromotedPadding_enum, Flag_SurvivorPadding_enum, Flag_ThresholdTolerance_enum, Flag_AdaptiveSizePolicyCollectionCostMargin_enum, Flag_YoungGenerationSizeIncrement_enum, Flag_YoungGenerationSizeSupplement_enum, Flag_YoungGenerationSizeSupplementDecay_enum, Flag_TenuredGenerationSizeIncrement_enum, Flag_TenuredGenerationSizeSupplement_enum, Flag_TenuredGenerationSizeSupplementDecay_enum, Flag_MaxGCPauseMillis_enum, Flag_GCPauseIntervalMillis_enum, Flag_MaxGCMinorPauseMillis_enum, Flag_GCTimeRatio_enum, Flag_AdaptiveSizeDecrementScaleFactor_enum, Flag_UseAdaptiveSizeDecayMajorGCCost_enum, Flag_AdaptiveSizeMajorGCDecayTimeScale_enum, Flag_MinSurvivorRatio_enum, Flag_InitialSurvivorRatio_enum, Flag_BaseFootPrintEstimate_enum, Flag_UseGCOverheadLimit_enum, Flag_GCTimeLimit_enum, Flag_GCHeapFreeLimit_enum, Flag_GCOverheadLimitThreshold_enum, Flag_PrefetchCopyIntervalInBytes_enum, Flag_PrefetchScanIntervalInBytes_enum, Flag_VerifyDuringStartup_enum, Flag_VerifyBeforeExit_enum, Flag_VerifyBeforeGC_enum, Flag_VerifyAfterGC_enum, Flag_VerifyDuringGC_enum, Flag_VerifyArchivedFields_enum, Flag_VerifyGCType_enum, Flag_VerifySubSet_enum, Flag_DeferInitialCardMark_enum, Flag_UseCondCardMark_enum, Flag_VerifyRememberedSets_enum, Flag_VerifyObjectStartArray_enum, Flag_DisableExplicitGC_enum, Flag_PrintGC_enum, Flag_PrintGCDetails_enum, Flag_ConcGCYieldTimeout_enum, Flag_ScavengeALotInterval_enum, Flag_FullGCALotInterval_enum, Flag_FullGCALotStart_enum, Flag_FullGCALotDummies_enum, Flag_MinHeapSize_enum, Flag_InitialHeapSize_enum, Flag_MaxHeapSize_enum, Flag_SoftMaxHeapSize_enum, Flag_OldSize_enum, Flag_NewSize_enum, Flag_MaxNewSize_enum, Flag_HeapBaseMinAddress_enum, Flag_PretenureSizeThreshold_enum, Flag_SurvivorRatio_enum, Flag_NewRatio_enum, Flag_NewSizeThreadIncrease_enum, Flag_QueuedAllocationWarningCount_enum, Flag_VerifyGCStartAt_enum, Flag_VerifyGCLevel_enum, Flag_MaxTenuringThreshold_enum, Flag_InitialTenuringThreshold_enum, Flag_TargetSurvivorRatio_enum, Flag_MarkSweepDeadRatio_enum, Flag_MarkSweepAlwaysCompactCount_enum, Flag_GCExpandToAllocateDelayMillis_enum, Flag_GCDrainStackTargetSize_enum, Flag_GCCardSizeInBytes_enum, Flag_UseTLAB_enum, Flag_ResizeTLAB_enum, Flag_ZeroTLAB_enum, Flag_TLABStats_enum, Flag_MinTLABSize_enum, Flag_TLABSize_enum, Flag_YoungPLABSize_enum, Flag_OldPLABSize_enum, Flag_TLABAllocationWeight_enum, Flag_TLABWasteTargetPercent_enum, Flag_TLABRefillWasteFraction_enum, Flag_TLABWasteIncrement_enum, + + + + + + + NUM_JVMFlagsEnum +}; +# 63 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/globals_extension.hpp" +inline JVMFlag::Error Flag_UseCompressedOops_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCompressedOops_enum, value, origin); } inline JVMFlag::Error Flag_UseCompressedClassPointers_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCompressedClassPointers_enum, value, origin); } inline JVMFlag::Error Flag_ObjectAlignmentInBytes_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ObjectAlignmentInBytes_enum, value, origin); } inline JVMFlag::Error Flag_NearCpool_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NearCpool_enum, value, origin); } inline JVMFlag::Error Flag_UseBlockZeroing_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseBlockZeroing_enum, value, origin); } inline JVMFlag::Error Flag_BlockZeroingLowLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_BlockZeroingLowLimit_enum, value, origin); } inline JVMFlag::Error Flag_CacheLineSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CacheLineSize_enum, value, origin); } inline JVMFlag::Error Flag_TraceTraps_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TraceTraps_enum, value, origin); } inline JVMFlag::Error Flag_UseConservativeFence_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseConservativeFence_enum, value, origin); } inline JVMFlag::Error Flag_AvoidUnalignedAccesses_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AvoidUnalignedAccesses_enum, value, origin); } inline JVMFlag::Error Flag_UseRVA20U64_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseRVA20U64_enum, value, origin); } inline JVMFlag::Error Flag_UseRVC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseRVC_enum, value, origin); } inline JVMFlag::Error Flag_UseRVA22U64_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseRVA22U64_enum, value, origin); } inline JVMFlag::Error Flag_UseRVV_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseRVV_enum, value, origin); } inline JVMFlag::Error Flag_UseZba_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseZba_enum, value, origin); } inline JVMFlag::Error Flag_UseZbb_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseZbb_enum, value, origin); } inline JVMFlag::Error Flag_UseZbs_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseZbs_enum, value, origin); } inline JVMFlag::Error Flag_UseZic64b_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseZic64b_enum, value, origin); } inline JVMFlag::Error Flag_UseZicbom_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseZicbom_enum, value, origin); } inline JVMFlag::Error Flag_UseZicbop_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseZicbop_enum, value, origin); } inline JVMFlag::Error Flag_UseZicboz_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseZicboz_enum, value, origin); } inline JVMFlag::Error Flag_UseZtso_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseZtso_enum, value, origin); } inline JVMFlag::Error Flag_UseZihintpause_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseZihintpause_enum, value, origin); } inline JVMFlag::Error Flag_UseRVVForBigIntegerShiftIntrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseRVVForBigIntegerShiftIntrinsics_enum, value, origin); } inline JVMFlag::Error Flag_VerifySharedSpaces_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifySharedSpaces_enum, value, origin); } inline JVMFlag::Error Flag_RecordDynamicDumpInfo_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_RecordDynamicDumpInfo_enum, value, origin); } inline JVMFlag::Error Flag_AutoCreateSharedArchive_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AutoCreateSharedArchive_enum, value, origin); } inline JVMFlag::Error Flag_PrintSharedArchiveAndExit_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintSharedArchiveAndExit_enum, value, origin); } inline JVMFlag::Error Flag_SharedBaseAddress_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SharedBaseAddress_enum, value, origin); } inline JVMFlag::Error Flag_SharedArchiveConfigFile_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SharedArchiveConfigFile_enum, value, origin); } inline JVMFlag::Error Flag_SharedSymbolTableBucketSize_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SharedSymbolTableBucketSize_enum, value, origin); } inline JVMFlag::Error Flag_AllowArchivingWithJavaAgent_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AllowArchivingWithJavaAgent_enum, value, origin); } inline JVMFlag::Error Flag_DumpLoadedClassList_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DumpLoadedClassList_enum, value, origin); } inline JVMFlag::Error Flag_SharedClassListFile_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SharedClassListFile_enum, value, origin); } inline JVMFlag::Error Flag_SharedArchiveFile_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SharedArchiveFile_enum, value, origin); } inline JVMFlag::Error Flag_ArchiveClassesAtExit_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ArchiveClassesAtExit_enum, value, origin); } inline JVMFlag::Error Flag_ExtraSharedClassListFile_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ExtraSharedClassListFile_enum, value, origin); } inline JVMFlag::Error Flag_ArchiveRelocationMode_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ArchiveRelocationMode_enum, value, origin); } inline JVMFlag::Error Flag_EnableJVMCI_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EnableJVMCI_enum, value, origin); } inline JVMFlag::Error Flag_UseGraalJIT_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseGraalJIT_enum, value, origin); } inline JVMFlag::Error Flag_EnableJVMCIProduct_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EnableJVMCIProduct_enum, value, origin); } inline JVMFlag::Error Flag_UseJVMCICompiler_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseJVMCICompiler_enum, value, origin); } inline JVMFlag::Error Flag_JVMCIThreadsPerNativeLibraryRuntime_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCIThreadsPerNativeLibraryRuntime_enum, value, origin); } inline JVMFlag::Error Flag_JVMCICompilerIdleDelay_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCICompilerIdleDelay_enum, value, origin); } inline JVMFlag::Error Flag_JVMCIPrintProperties_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCIPrintProperties_enum, value, origin); } inline JVMFlag::Error Flag_BootstrapJVMCI_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_BootstrapJVMCI_enum, value, origin); } inline JVMFlag::Error Flag_EagerJVMCI_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EagerJVMCI_enum, value, origin); } inline JVMFlag::Error Flag_PrintBootstrap_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintBootstrap_enum, value, origin); } inline JVMFlag::Error Flag_JVMCIThreads_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCIThreads_enum, value, origin); } inline JVMFlag::Error Flag_JVMCIHostThreads_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCIHostThreads_enum, value, origin); } inline JVMFlag::Error Flag_JVMCIEventLogLevel_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCIEventLogLevel_enum, value, origin); } inline JVMFlag::Error Flag_JVMCITraceLevel_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCITraceLevel_enum, value, origin); } inline JVMFlag::Error Flag_JVMCICounterSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCICounterSize_enum, value, origin); } inline JVMFlag::Error Flag_JVMCICountersExcludeCompiler_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCICountersExcludeCompiler_enum, value, origin); } inline JVMFlag::Error Flag_JVMCINMethodSizeLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCINMethodSizeLimit_enum, value, origin); } inline JVMFlag::Error Flag_JVMCILibPath_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCILibPath_enum, value, origin); } inline JVMFlag::Error Flag_JVMCILibDumpJNIConfig_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCILibDumpJNIConfig_enum, value, origin); } inline JVMFlag::Error Flag_UseJVMCINativeLibrary_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseJVMCINativeLibrary_enum, value, origin); } inline JVMFlag::Error Flag_JVMCINativeLibraryThreadFraction_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCINativeLibraryThreadFraction_enum, value, origin); } inline JVMFlag::Error Flag_JVMCINativeLibraryErrorFile_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JVMCINativeLibraryErrorFile_enum, value, origin); } inline JVMFlag::Error Flag_LibJVMCICompilerThreadHidden_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LibJVMCICompilerThreadHidden_enum, value, origin); } inline JVMFlag::Error Flag_UseLoopInvariantCodeMotion_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseLoopInvariantCodeMotion_enum, value, origin); } inline JVMFlag::Error Flag_ValueMapInitialSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ValueMapInitialSize_enum, value, origin); } inline JVMFlag::Error Flag_ValueMapMaxLoopSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ValueMapMaxLoopSize_enum, value, origin); } inline JVMFlag::Error Flag_InlineSynchronizedMethods_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InlineSynchronizedMethods_enum, value, origin); } inline JVMFlag::Error Flag_C1MaxInlineSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_C1MaxInlineSize_enum, value, origin); } inline JVMFlag::Error Flag_C1MaxTrivialSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_C1MaxTrivialSize_enum, value, origin); } inline JVMFlag::Error Flag_C1MaxInlineLevel_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_C1MaxInlineLevel_enum, value, origin); } inline JVMFlag::Error Flag_C1MaxRecursiveInlineLevel_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_C1MaxRecursiveInlineLevel_enum, value, origin); } inline JVMFlag::Error Flag_C1InlineStackLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_C1InlineStackLimit_enum, value, origin); } inline JVMFlag::Error Flag_TimeLinearScan_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TimeLinearScan_enum, value, origin); } inline JVMFlag::Error Flag_C1ProfileCalls_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_C1ProfileCalls_enum, value, origin); } inline JVMFlag::Error Flag_C1ProfileVirtualCalls_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_C1ProfileVirtualCalls_enum, value, origin); } inline JVMFlag::Error Flag_C1ProfileInlinedCalls_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_C1ProfileInlinedCalls_enum, value, origin); } inline JVMFlag::Error Flag_C1ProfileBranches_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_C1ProfileBranches_enum, value, origin); } inline JVMFlag::Error Flag_C1ProfileCheckcasts_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_C1ProfileCheckcasts_enum, value, origin); } inline JVMFlag::Error Flag_C1OptimizeVirtualCallProfiling_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_C1OptimizeVirtualCallProfiling_enum, value, origin); } inline JVMFlag::Error Flag_C1UpdateMethodData_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_C1UpdateMethodData_enum, value, origin); } inline JVMFlag::Error Flag_StressLCM_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StressLCM_enum, value, origin); } inline JVMFlag::Error Flag_StressGCM_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StressGCM_enum, value, origin); } inline JVMFlag::Error Flag_StressIGVN_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StressIGVN_enum, value, origin); } inline JVMFlag::Error Flag_StressCCP_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StressCCP_enum, value, origin); } inline JVMFlag::Error Flag_StressSeed_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StressSeed_enum, value, origin); } inline JVMFlag::Error Flag_InteriorEntryAlignment_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InteriorEntryAlignment_enum, value, origin); } inline JVMFlag::Error Flag_MaxLoopPad_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxLoopPad_enum, value, origin); } inline JVMFlag::Error Flag_MaxVectorSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxVectorSize_enum, value, origin); } inline JVMFlag::Error Flag_ArrayOperationPartialInlineSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ArrayOperationPartialInlineSize_enum, value, origin); } inline JVMFlag::Error Flag_AlignVector_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AlignVector_enum, value, origin); } inline JVMFlag::Error Flag_NumberOfLoopInstrToAlign_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NumberOfLoopInstrToAlign_enum, value, origin); } inline JVMFlag::Error Flag_IdealizeClearArrayNode_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_IdealizeClearArrayNode_enum, value, origin); } inline JVMFlag::Error Flag_PrintOptoAssembly_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintOptoAssembly_enum, value, origin); } inline JVMFlag::Error Flag_LoopUnrollLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LoopUnrollLimit_enum, value, origin); } inline JVMFlag::Error Flag_LoopPercentProfileLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LoopPercentProfileLimit_enum, value, origin); } inline JVMFlag::Error Flag_LoopMaxUnroll_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LoopMaxUnroll_enum, value, origin); } inline JVMFlag::Error Flag_SuperWordLoopUnrollAnalysis_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SuperWordLoopUnrollAnalysis_enum, value, origin); } inline JVMFlag::Error Flag_UseVectorMacroLogic_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseVectorMacroLogic_enum, value, origin); } inline JVMFlag::Error Flag_LoopUnrollMin_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LoopUnrollMin_enum, value, origin); } inline JVMFlag::Error Flag_UseSubwordForMaxVector_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSubwordForMaxVector_enum, value, origin); } inline JVMFlag::Error Flag_UseVectorCmov_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseVectorCmov_enum, value, origin); } inline JVMFlag::Error Flag_MultiArrayExpandLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MultiArrayExpandLimit_enum, value, origin); } inline JVMFlag::Error Flag_UseCountedLoopSafepoints_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCountedLoopSafepoints_enum, value, origin); } inline JVMFlag::Error Flag_UseLoopPredicate_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseLoopPredicate_enum, value, origin); } inline JVMFlag::Error Flag_OptimizeFill_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OptimizeFill_enum, value, origin); } inline JVMFlag::Error Flag_TrackedInitializationLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TrackedInitializationLimit_enum, value, origin); } inline JVMFlag::Error Flag_ReduceFieldZeroing_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReduceFieldZeroing_enum, value, origin); } inline JVMFlag::Error Flag_ReduceInitialCardMarks_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReduceInitialCardMarks_enum, value, origin); } inline JVMFlag::Error Flag_ReduceBulkZeroing_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReduceBulkZeroing_enum, value, origin); } inline JVMFlag::Error Flag_UseFPUForSpilling_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseFPUForSpilling_enum, value, origin); } inline JVMFlag::Error Flag_OptoScheduling_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OptoScheduling_enum, value, origin); } inline JVMFlag::Error Flag_OptoRegScheduling_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OptoRegScheduling_enum, value, origin); } inline JVMFlag::Error Flag_PartialPeelLoop_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PartialPeelLoop_enum, value, origin); } inline JVMFlag::Error Flag_PartialPeelNewPhiDelta_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PartialPeelNewPhiDelta_enum, value, origin); } inline JVMFlag::Error Flag_PartialPeelAtUnsignedTests_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PartialPeelAtUnsignedTests_enum, value, origin); } inline JVMFlag::Error Flag_ReassociateInvariants_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReassociateInvariants_enum, value, origin); } inline JVMFlag::Error Flag_LoopUnswitching_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LoopUnswitching_enum, value, origin); } inline JVMFlag::Error Flag_AllowVectorizeOnDemand_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AllowVectorizeOnDemand_enum, value, origin); } inline JVMFlag::Error Flag_UseSuperWord_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSuperWord_enum, value, origin); } inline JVMFlag::Error Flag_SuperWordReductions_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SuperWordReductions_enum, value, origin); } inline JVMFlag::Error Flag_UseCMoveUnconditionally_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCMoveUnconditionally_enum, value, origin); } inline JVMFlag::Error Flag_DoReserveCopyInSuperWord_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DoReserveCopyInSuperWord_enum, value, origin); } inline JVMFlag::Error Flag_OptoBundling_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OptoBundling_enum, value, origin); } inline JVMFlag::Error Flag_ConditionalMoveLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ConditionalMoveLimit_enum, value, origin); } inline JVMFlag::Error Flag_UseBimorphicInlining_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseBimorphicInlining_enum, value, origin); } inline JVMFlag::Error Flag_UseOnlyInlinedBimorphic_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseOnlyInlinedBimorphic_enum, value, origin); } inline JVMFlag::Error Flag_LoopOptsCount_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LoopOptsCount_enum, value, origin); } inline JVMFlag::Error Flag_OptimizeUnstableIf_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OptimizeUnstableIf_enum, value, origin); } inline JVMFlag::Error Flag_MaxNodeLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxNodeLimit_enum, value, origin); } inline JVMFlag::Error Flag_NodeLimitFudgeFactor_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NodeLimitFudgeFactor_enum, value, origin); } inline JVMFlag::Error Flag_UseJumpTables_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseJumpTables_enum, value, origin); } inline JVMFlag::Error Flag_UseDivMod_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseDivMod_enum, value, origin); } inline JVMFlag::Error Flag_MinJumpTableSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MinJumpTableSize_enum, value, origin); } inline JVMFlag::Error Flag_MaxJumpTableSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxJumpTableSize_enum, value, origin); } inline JVMFlag::Error Flag_MaxJumpTableSparseness_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxJumpTableSparseness_enum, value, origin); } inline JVMFlag::Error Flag_EliminateLocks_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EliminateLocks_enum, value, origin); } inline JVMFlag::Error Flag_EliminateNestedLocks_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EliminateNestedLocks_enum, value, origin); } inline JVMFlag::Error Flag_PrintPreciseRTMLockingStatistics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintPreciseRTMLockingStatistics_enum, value, origin); } inline JVMFlag::Error Flag_EliminateAutoBox_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EliminateAutoBox_enum, value, origin); } inline JVMFlag::Error Flag_AutoBoxCacheMax_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AutoBoxCacheMax_enum, value, origin); } inline JVMFlag::Error Flag_AggressiveUnboxing_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AggressiveUnboxing_enum, value, origin); } inline JVMFlag::Error Flag_ReduceAllocationMerges_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReduceAllocationMerges_enum, value, origin); } inline JVMFlag::Error Flag_DoEscapeAnalysis_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DoEscapeAnalysis_enum, value, origin); } inline JVMFlag::Error Flag_EscapeAnalysisTimeout_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EscapeAnalysisTimeout_enum, value, origin); } inline JVMFlag::Error Flag_EliminateAllocations_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EliminateAllocations_enum, value, origin); } inline JVMFlag::Error Flag_EliminateAllocationArraySizeLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EliminateAllocationArraySizeLimit_enum, value, origin); } inline JVMFlag::Error Flag_EliminateAllocationFieldsLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EliminateAllocationFieldsLimit_enum, value, origin); } inline JVMFlag::Error Flag_OptimizePtrCompare_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OptimizePtrCompare_enum, value, origin); } inline JVMFlag::Error Flag_OptimizeStringConcat_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OptimizeStringConcat_enum, value, origin); } inline JVMFlag::Error Flag_ValueSearchLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ValueSearchLimit_enum, value, origin); } inline JVMFlag::Error Flag_MaxLabelRootDepth_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxLabelRootDepth_enum, value, origin); } inline JVMFlag::Error Flag_DominatorSearchLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DominatorSearchLimit_enum, value, origin); } inline JVMFlag::Error Flag_BlockLayoutByFrequency_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_BlockLayoutByFrequency_enum, value, origin); } inline JVMFlag::Error Flag_BlockLayoutMinDiamondPercentage_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_BlockLayoutMinDiamondPercentage_enum, value, origin); } inline JVMFlag::Error Flag_BlockLayoutRotateLoops_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_BlockLayoutRotateLoops_enum, value, origin); } inline JVMFlag::Error Flag_InlineReflectionGetCallerClass_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InlineReflectionGetCallerClass_enum, value, origin); } inline JVMFlag::Error Flag_InlineObjectCopy_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InlineObjectCopy_enum, value, origin); } inline JVMFlag::Error Flag_SpecialStringCompareTo_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SpecialStringCompareTo_enum, value, origin); } inline JVMFlag::Error Flag_SpecialStringIndexOf_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SpecialStringIndexOf_enum, value, origin); } inline JVMFlag::Error Flag_SpecialStringEquals_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SpecialStringEquals_enum, value, origin); } inline JVMFlag::Error Flag_SpecialArraysEquals_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SpecialArraysEquals_enum, value, origin); } inline JVMFlag::Error Flag_SpecialEncodeISOArray_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SpecialEncodeISOArray_enum, value, origin); } inline JVMFlag::Error Flag_TraceSpilling_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TraceSpilling_enum, value, origin); } inline JVMFlag::Error Flag_TraceTypeProfile_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TraceTypeProfile_enum, value, origin); } inline JVMFlag::Error Flag_TypeProfileMajorReceiverPercent_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TypeProfileMajorReceiverPercent_enum, value, origin); } inline JVMFlag::Error Flag_PrintIntrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintIntrinsics_enum, value, origin); } inline JVMFlag::Error Flag_DebugInlinedCalls_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DebugInlinedCalls_enum, value, origin); } inline JVMFlag::Error Flag_ProfileDynamicTypes_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ProfileDynamicTypes_enum, value, origin); } inline JVMFlag::Error Flag_SplitIfBlocks_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SplitIfBlocks_enum, value, origin); } inline JVMFlag::Error Flag_MaxInlineLevel_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxInlineLevel_enum, value, origin); } inline JVMFlag::Error Flag_MaxRecursiveInlineLevel_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxRecursiveInlineLevel_enum, value, origin); } inline JVMFlag::Error Flag_InlineSmallCode_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InlineSmallCode_enum, value, origin); } inline JVMFlag::Error Flag_MaxInlineSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxInlineSize_enum, value, origin); } inline JVMFlag::Error Flag_FreqInlineSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_FreqInlineSize_enum, value, origin); } inline JVMFlag::Error Flag_MaxTrivialSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxTrivialSize_enum, value, origin); } inline JVMFlag::Error Flag_IncrementalInline_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_IncrementalInline_enum, value, origin); } inline JVMFlag::Error Flag_IncrementalInlineMH_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_IncrementalInlineMH_enum, value, origin); } inline JVMFlag::Error Flag_IncrementalInlineVirtual_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_IncrementalInlineVirtual_enum, value, origin); } inline JVMFlag::Error Flag_IncrementalInlineForceCleanup_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_IncrementalInlineForceCleanup_enum, value, origin); } inline JVMFlag::Error Flag_LiveNodeCountInliningCutoff_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LiveNodeCountInliningCutoff_enum, value, origin); } inline JVMFlag::Error Flag_OptimizeExpensiveOps_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OptimizeExpensiveOps_enum, value, origin); } inline JVMFlag::Error Flag_UseMathExactIntrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseMathExactIntrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseCharacterCompareIntrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCharacterCompareIntrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseMultiplyToLenIntrinsic_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseMultiplyToLenIntrinsic_enum, value, origin); } inline JVMFlag::Error Flag_UseSquareToLenIntrinsic_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSquareToLenIntrinsic_enum, value, origin); } inline JVMFlag::Error Flag_UseMulAddIntrinsic_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseMulAddIntrinsic_enum, value, origin); } inline JVMFlag::Error Flag_UseMontgomeryMultiplyIntrinsic_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseMontgomeryMultiplyIntrinsic_enum, value, origin); } inline JVMFlag::Error Flag_UseMontgomerySquareIntrinsic_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseMontgomerySquareIntrinsic_enum, value, origin); } inline JVMFlag::Error Flag_EnableVectorSupport_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EnableVectorSupport_enum, value, origin); } inline JVMFlag::Error Flag_EnableVectorReboxing_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EnableVectorReboxing_enum, value, origin); } inline JVMFlag::Error Flag_EnableVectorAggressiveReboxing_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EnableVectorAggressiveReboxing_enum, value, origin); } inline JVMFlag::Error Flag_UseVectorStubs_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseVectorStubs_enum, value, origin); } inline JVMFlag::Error Flag_UseTypeSpeculation_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseTypeSpeculation_enum, value, origin); } inline JVMFlag::Error Flag_UseInlineDepthForSpeculativeTypes_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseInlineDepthForSpeculativeTypes_enum, value, origin); } inline JVMFlag::Error Flag_TrapBasedRangeChecks_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TrapBasedRangeChecks_enum, value, origin); } inline JVMFlag::Error Flag_ArrayCopyLoadStoreMaxElem_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ArrayCopyLoadStoreMaxElem_enum, value, origin); } inline JVMFlag::Error Flag_LoopStripMiningIter_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LoopStripMiningIter_enum, value, origin); } inline JVMFlag::Error Flag_LoopStripMiningIterShortLoop_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LoopStripMiningIterShortLoop_enum, value, origin); } inline JVMFlag::Error Flag_UseProfiledLoopPredicate_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseProfiledLoopPredicate_enum, value, origin); } inline JVMFlag::Error Flag_ExpandSubTypeCheckAtParseTime_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ExpandSubTypeCheckAtParseTime_enum, value, origin); } inline JVMFlag::Error Flag_DuplicateBackedge_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DuplicateBackedge_enum, value, origin); } inline JVMFlag::Error Flag_VerifyReceiverTypes_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyReceiverTypes_enum, value, origin); } inline JVMFlag::Error Flag_TypeProfileSubTypeCheckCommonThreshold_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TypeProfileSubTypeCheckCommonThreshold_enum, value, origin); } inline JVMFlag::Error Flag_CIPrintCompilerName_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CIPrintCompilerName_enum, value, origin); } inline JVMFlag::Error Flag_CIPrintCompileQueue_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CIPrintCompileQueue_enum, value, origin); } inline JVMFlag::Error Flag_CITime_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CITime_enum, value, origin); } inline JVMFlag::Error Flag_CICompilerCountPerCPU_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CICompilerCountPerCPU_enum, value, origin); } inline JVMFlag::Error Flag_CompileThresholdScaling_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompileThresholdScaling_enum, value, origin); } inline JVMFlag::Error Flag_Tier0InvokeNotifyFreqLog_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier0InvokeNotifyFreqLog_enum, value, origin); } inline JVMFlag::Error Flag_Tier2InvokeNotifyFreqLog_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier2InvokeNotifyFreqLog_enum, value, origin); } inline JVMFlag::Error Flag_Tier3InvokeNotifyFreqLog_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier3InvokeNotifyFreqLog_enum, value, origin); } inline JVMFlag::Error Flag_Tier23InlineeNotifyFreqLog_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier23InlineeNotifyFreqLog_enum, value, origin); } inline JVMFlag::Error Flag_Tier0BackedgeNotifyFreqLog_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier0BackedgeNotifyFreqLog_enum, value, origin); } inline JVMFlag::Error Flag_Tier2BackedgeNotifyFreqLog_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier2BackedgeNotifyFreqLog_enum, value, origin); } inline JVMFlag::Error Flag_Tier3BackedgeNotifyFreqLog_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier3BackedgeNotifyFreqLog_enum, value, origin); } inline JVMFlag::Error Flag_Tier2CompileThreshold_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier2CompileThreshold_enum, value, origin); } inline JVMFlag::Error Flag_Tier2BackEdgeThreshold_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier2BackEdgeThreshold_enum, value, origin); } inline JVMFlag::Error Flag_Tier3InvocationThreshold_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier3InvocationThreshold_enum, value, origin); } inline JVMFlag::Error Flag_Tier3MinInvocationThreshold_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier3MinInvocationThreshold_enum, value, origin); } inline JVMFlag::Error Flag_Tier3CompileThreshold_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier3CompileThreshold_enum, value, origin); } inline JVMFlag::Error Flag_Tier3BackEdgeThreshold_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier3BackEdgeThreshold_enum, value, origin); } inline JVMFlag::Error Flag_Tier4InvocationThreshold_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier4InvocationThreshold_enum, value, origin); } inline JVMFlag::Error Flag_Tier4MinInvocationThreshold_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier4MinInvocationThreshold_enum, value, origin); } inline JVMFlag::Error Flag_Tier4CompileThreshold_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier4CompileThreshold_enum, value, origin); } inline JVMFlag::Error Flag_Tier4BackEdgeThreshold_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier4BackEdgeThreshold_enum, value, origin); } inline JVMFlag::Error Flag_Tier0Delay_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier0Delay_enum, value, origin); } inline JVMFlag::Error Flag_TieredOldPercentage_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TieredOldPercentage_enum, value, origin); } inline JVMFlag::Error Flag_Tier3DelayOn_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier3DelayOn_enum, value, origin); } inline JVMFlag::Error Flag_Tier3DelayOff_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier3DelayOff_enum, value, origin); } inline JVMFlag::Error Flag_Tier3LoadFeedback_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier3LoadFeedback_enum, value, origin); } inline JVMFlag::Error Flag_Tier4LoadFeedback_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier4LoadFeedback_enum, value, origin); } inline JVMFlag::Error Flag_TieredCompileTaskTimeout_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TieredCompileTaskTimeout_enum, value, origin); } inline JVMFlag::Error Flag_TieredStopAtLevel_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TieredStopAtLevel_enum, value, origin); } inline JVMFlag::Error Flag_Tier0ProfilingStartPercentage_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Tier0ProfilingStartPercentage_enum, value, origin); } inline JVMFlag::Error Flag_IncreaseFirstTierCompileThresholdAt_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_IncreaseFirstTierCompileThresholdAt_enum, value, origin); } inline JVMFlag::Error Flag_TieredRateUpdateMinTime_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TieredRateUpdateMinTime_enum, value, origin); } inline JVMFlag::Error Flag_TieredRateUpdateMaxTime_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TieredRateUpdateMaxTime_enum, value, origin); } inline JVMFlag::Error Flag_CompilationMode_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompilationMode_enum, value, origin); } inline JVMFlag::Error Flag_PrintTieredEvents_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintTieredEvents_enum, value, origin); } inline JVMFlag::Error Flag_OnStackReplacePercentage_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OnStackReplacePercentage_enum, value, origin); } inline JVMFlag::Error Flag_InterpreterProfilePercentage_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InterpreterProfilePercentage_enum, value, origin); } inline JVMFlag::Error Flag_CompileOnly_set(ccstrlist value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompileOnly_enum, value, origin); } inline JVMFlag::Error Flag_CompileCommandFile_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompileCommandFile_enum, value, origin); } inline JVMFlag::Error Flag_CompilerDirectivesFile_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompilerDirectivesFile_enum, value, origin); } inline JVMFlag::Error Flag_CompileCommand_set(ccstrlist value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompileCommand_enum, value, origin); } inline JVMFlag::Error Flag_ReplayCompiles_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReplayCompiles_enum, value, origin); } inline JVMFlag::Error Flag_ReplayReduce_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReplayReduce_enum, value, origin); } inline JVMFlag::Error Flag_ReplayDataFile_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReplayDataFile_enum, value, origin); } inline JVMFlag::Error Flag_InlineDataFile_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InlineDataFile_enum, value, origin); } inline JVMFlag::Error Flag_ReplaySuppressInitializers_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReplaySuppressInitializers_enum, value, origin); } inline JVMFlag::Error Flag_ReplayIgnoreInitErrors_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReplayIgnoreInitErrors_enum, value, origin); } inline JVMFlag::Error Flag_DumpReplayDataOnError_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DumpReplayDataOnError_enum, value, origin); } inline JVMFlag::Error Flag_CompilerDirectivesIgnoreCompileCommands_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompilerDirectivesIgnoreCompileCommands_enum, value, origin); } inline JVMFlag::Error Flag_CompilerDirectivesPrint_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompilerDirectivesPrint_enum, value, origin); } inline JVMFlag::Error Flag_CompilerDirectivesLimit_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompilerDirectivesLimit_enum, value, origin); } inline JVMFlag::Error Flag_EstimateArgEscape_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EstimateArgEscape_enum, value, origin); } inline JVMFlag::Error Flag_BCEATraceLevel_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_BCEATraceLevel_enum, value, origin); } inline JVMFlag::Error Flag_MaxBCEAEstimateLevel_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxBCEAEstimateLevel_enum, value, origin); } inline JVMFlag::Error Flag_MaxBCEAEstimateSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxBCEAEstimateSize_enum, value, origin); } inline JVMFlag::Error Flag_AbortVMOnCompilationFailure_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AbortVMOnCompilationFailure_enum, value, origin); } inline JVMFlag::Error Flag_DontCompileHugeMethods_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DontCompileHugeMethods_enum, value, origin); } inline JVMFlag::Error Flag_HeapSearchSteps_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_HeapSearchSteps_enum, value, origin); } inline JVMFlag::Error Flag_HandshakeTimeout_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_HandshakeTimeout_enum, value, origin); } inline JVMFlag::Error Flag_AlwaysSafeConstructors_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AlwaysSafeConstructors_enum, value, origin); } inline JVMFlag::Error Flag_UnlockDiagnosticVMOptions_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UnlockDiagnosticVMOptions_enum, value, origin); } inline JVMFlag::Error Flag_UnlockExperimentalVMOptions_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UnlockExperimentalVMOptions_enum, value, origin); } inline JVMFlag::Error Flag_JavaMonitorsInStackTrace_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JavaMonitorsInStackTrace_enum, value, origin); } inline JVMFlag::Error Flag_UseLargePages_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseLargePages_enum, value, origin); } inline JVMFlag::Error Flag_UseLargePagesIndividualAllocation_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseLargePagesIndividualAllocation_enum, value, origin); } inline JVMFlag::Error Flag_UseNUMA_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseNUMA_enum, value, origin); } inline JVMFlag::Error Flag_UseNUMAInterleaving_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseNUMAInterleaving_enum, value, origin); } inline JVMFlag::Error Flag_NUMAInterleaveGranularity_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NUMAInterleaveGranularity_enum, value, origin); } inline JVMFlag::Error Flag_NUMAChunkResizeWeight_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NUMAChunkResizeWeight_enum, value, origin); } inline JVMFlag::Error Flag_NUMASpaceResizeRate_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NUMASpaceResizeRate_enum, value, origin); } inline JVMFlag::Error Flag_UseAdaptiveNUMAChunkSizing_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseAdaptiveNUMAChunkSizing_enum, value, origin); } inline JVMFlag::Error Flag_NUMAStats_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NUMAStats_enum, value, origin); } inline JVMFlag::Error Flag_NUMAPageScanRate_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NUMAPageScanRate_enum, value, origin); } inline JVMFlag::Error Flag_UseAES_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseAES_enum, value, origin); } inline JVMFlag::Error Flag_UseFMA_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseFMA_enum, value, origin); } inline JVMFlag::Error Flag_UseSHA_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSHA_enum, value, origin); } inline JVMFlag::Error Flag_UseGHASHIntrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseGHASHIntrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseBASE64Intrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseBASE64Intrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UsePoly1305Intrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UsePoly1305Intrinsics_enum, value, origin); } inline JVMFlag::Error Flag_LargePageSizeInBytes_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LargePageSizeInBytes_enum, value, origin); } inline JVMFlag::Error Flag_LargePageHeapSizeThreshold_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LargePageHeapSizeThreshold_enum, value, origin); } inline JVMFlag::Error Flag_ForceTimeHighResolution_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ForceTimeHighResolution_enum, value, origin); } inline JVMFlag::Error Flag_SafepointALot_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SafepointALot_enum, value, origin); } inline JVMFlag::Error Flag_HandshakeALot_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_HandshakeALot_enum, value, origin); } inline JVMFlag::Error Flag_BackgroundCompilation_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_BackgroundCompilation_enum, value, origin); } inline JVMFlag::Error Flag_MethodFlushing_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MethodFlushing_enum, value, origin); } inline JVMFlag::Error Flag_ForceUnreachable_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ForceUnreachable_enum, value, origin); } inline JVMFlag::Error Flag_UseInlineCaches_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseInlineCaches_enum, value, origin); } inline JVMFlag::Error Flag_InlineArrayCopy_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InlineArrayCopy_enum, value, origin); } inline JVMFlag::Error Flag_InlineObjectHash_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InlineObjectHash_enum, value, origin); } inline JVMFlag::Error Flag_InlineNatives_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InlineNatives_enum, value, origin); } inline JVMFlag::Error Flag_InlineMathNatives_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InlineMathNatives_enum, value, origin); } inline JVMFlag::Error Flag_InlineClassNatives_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InlineClassNatives_enum, value, origin); } inline JVMFlag::Error Flag_InlineThreadNatives_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InlineThreadNatives_enum, value, origin); } inline JVMFlag::Error Flag_InlineUnsafeOps_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InlineUnsafeOps_enum, value, origin); } inline JVMFlag::Error Flag_UseAESIntrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseAESIntrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseAESCTRIntrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseAESCTRIntrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseChaCha20Intrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseChaCha20Intrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseMD5Intrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseMD5Intrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseSHA1Intrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSHA1Intrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseSHA256Intrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSHA256Intrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseSHA512Intrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSHA512Intrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseSHA3Intrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSHA3Intrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseCRC32Intrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCRC32Intrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseCRC32CIntrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCRC32CIntrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseAdler32Intrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseAdler32Intrinsics_enum, value, origin); } inline JVMFlag::Error Flag_UseVectorizedMismatchIntrinsic_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseVectorizedMismatchIntrinsic_enum, value, origin); } inline JVMFlag::Error Flag_UseVectorizedHashCodeIntrinsic_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseVectorizedHashCodeIntrinsic_enum, value, origin); } inline JVMFlag::Error Flag_UseCopySignIntrinsic_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCopySignIntrinsic_enum, value, origin); } inline JVMFlag::Error Flag_UseSignumIntrinsic_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSignumIntrinsic_enum, value, origin); } inline JVMFlag::Error Flag_DelayCompilerStubsGeneration_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DelayCompilerStubsGeneration_enum, value, origin); } inline JVMFlag::Error Flag_DisableIntrinsic_set(ccstrlist value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DisableIntrinsic_enum, value, origin); } inline JVMFlag::Error Flag_ControlIntrinsic_set(ccstrlist value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ControlIntrinsic_enum, value, origin); } inline JVMFlag::Error Flag_SafepointTimeout_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SafepointTimeout_enum, value, origin); } inline JVMFlag::Error Flag_AbortVMOnSafepointTimeout_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AbortVMOnSafepointTimeout_enum, value, origin); } inline JVMFlag::Error Flag_AbortVMOnSafepointTimeoutDelay_set(uint64_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AbortVMOnSafepointTimeoutDelay_enum, value, origin); } inline JVMFlag::Error Flag_AbortVMOnVMOperationTimeout_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AbortVMOnVMOperationTimeout_enum, value, origin); } inline JVMFlag::Error Flag_AbortVMOnVMOperationTimeoutDelay_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AbortVMOnVMOperationTimeoutDelay_enum, value, origin); } inline JVMFlag::Error Flag_MaxFDLimit_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxFDLimit_enum, value, origin); } inline JVMFlag::Error Flag_LogEvents_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LogEvents_enum, value, origin); } inline JVMFlag::Error Flag_LogEventsBufferEntries_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LogEventsBufferEntries_enum, value, origin); } inline JVMFlag::Error Flag_BytecodeVerificationRemote_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_BytecodeVerificationRemote_enum, value, origin); } inline JVMFlag::Error Flag_BytecodeVerificationLocal_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_BytecodeVerificationLocal_enum, value, origin); } inline JVMFlag::Error Flag_ExecutingUnitTests_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ExecutingUnitTests_enum, value, origin); } inline JVMFlag::Error Flag_ShowMessageBoxOnError_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShowMessageBoxOnError_enum, value, origin); } inline JVMFlag::Error Flag_CreateCoredumpOnCrash_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CreateCoredumpOnCrash_enum, value, origin); } inline JVMFlag::Error Flag_ErrorLogTimeout_set(uint64_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ErrorLogTimeout_enum, value, origin); } inline JVMFlag::Error Flag_ErrorLogSecondaryErrorDetails_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ErrorLogSecondaryErrorDetails_enum, value, origin); } inline JVMFlag::Error Flag_SuppressFatalErrorMessage_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SuppressFatalErrorMessage_enum, value, origin); } inline JVMFlag::Error Flag_OnError_set(ccstrlist value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OnError_enum, value, origin); } inline JVMFlag::Error Flag_OnOutOfMemoryError_set(ccstrlist value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OnOutOfMemoryError_enum, value, origin); } inline JVMFlag::Error Flag_HeapDumpBeforeFullGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_HeapDumpBeforeFullGC_enum, value, origin); } inline JVMFlag::Error Flag_HeapDumpAfterFullGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_HeapDumpAfterFullGC_enum, value, origin); } inline JVMFlag::Error Flag_HeapDumpOnOutOfMemoryError_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_HeapDumpOnOutOfMemoryError_enum, value, origin); } inline JVMFlag::Error Flag_HeapDumpPath_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_HeapDumpPath_enum, value, origin); } inline JVMFlag::Error Flag_HeapDumpGzipLevel_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_HeapDumpGzipLevel_enum, value, origin); } inline JVMFlag::Error Flag_NativeMemoryTracking_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NativeMemoryTracking_enum, value, origin); } inline JVMFlag::Error Flag_PrintNMTStatistics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintNMTStatistics_enum, value, origin); } inline JVMFlag::Error Flag_LogCompilation_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LogCompilation_enum, value, origin); } inline JVMFlag::Error Flag_PrintCompilation_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintCompilation_enum, value, origin); } inline JVMFlag::Error Flag_RepeatCompilation_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_RepeatCompilation_enum, value, origin); } inline JVMFlag::Error Flag_PrintExtendedThreadInfo_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintExtendedThreadInfo_enum, value, origin); } inline JVMFlag::Error Flag_ScavengeRootsInCode_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ScavengeRootsInCode_enum, value, origin); } inline JVMFlag::Error Flag_AlwaysRestoreFPU_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AlwaysRestoreFPU_enum, value, origin); } inline JVMFlag::Error Flag_PrintCompilation2_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintCompilation2_enum, value, origin); } inline JVMFlag::Error Flag_PrintAdapterHandlers_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintAdapterHandlers_enum, value, origin); } inline JVMFlag::Error Flag_VerifyAdapterCalls_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyAdapterCalls_enum, value, origin); } inline JVMFlag::Error Flag_PrintAssembly_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintAssembly_enum, value, origin); } inline JVMFlag::Error Flag_PrintAssemblyOptions_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintAssemblyOptions_enum, value, origin); } inline JVMFlag::Error Flag_PrintNMethods_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintNMethods_enum, value, origin); } inline JVMFlag::Error Flag_PrintNativeNMethods_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintNativeNMethods_enum, value, origin); } inline JVMFlag::Error Flag_PrintCodeCache_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintCodeCache_enum, value, origin); } inline JVMFlag::Error Flag_PrintCodeCacheOnCompilation_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintCodeCacheOnCompilation_enum, value, origin); } inline JVMFlag::Error Flag_PrintCodeHeapAnalytics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintCodeHeapAnalytics_enum, value, origin); } inline JVMFlag::Error Flag_PrintStubCode_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintStubCode_enum, value, origin); } inline JVMFlag::Error Flag_StackTraceInThrowable_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StackTraceInThrowable_enum, value, origin); } inline JVMFlag::Error Flag_OmitStackTraceInFastThrow_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OmitStackTraceInFastThrow_enum, value, origin); } inline JVMFlag::Error Flag_ShowCodeDetailsInExceptionMessages_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShowCodeDetailsInExceptionMessages_enum, value, origin); } inline JVMFlag::Error Flag_PrintWarnings_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintWarnings_enum, value, origin); } inline JVMFlag::Error Flag_RegisterFinalizersAtInit_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_RegisterFinalizersAtInit_enum, value, origin); } inline JVMFlag::Error Flag_ClassUnloading_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ClassUnloading_enum, value, origin); } inline JVMFlag::Error Flag_ClassUnloadingWithConcurrentMark_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ClassUnloadingWithConcurrentMark_enum, value, origin); } inline JVMFlag::Error Flag_AllowParallelDefineClass_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AllowParallelDefineClass_enum, value, origin); } inline JVMFlag::Error Flag_DontYieldALot_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DontYieldALot_enum, value, origin); } inline JVMFlag::Error Flag_DisablePrimordialThreadGuardPages_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DisablePrimordialThreadGuardPages_enum, value, origin); } inline JVMFlag::Error Flag_DoJVMTIVirtualThreadTransitions_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DoJVMTIVirtualThreadTransitions_enum, value, origin); } inline JVMFlag::Error Flag_AsyncDeflationInterval_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AsyncDeflationInterval_enum, value, origin); } inline JVMFlag::Error Flag_GuaranteedAsyncDeflationInterval_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_GuaranteedAsyncDeflationInterval_enum, value, origin); } inline JVMFlag::Error Flag_AvgMonitorsPerThreadEstimate_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AvgMonitorsPerThreadEstimate_enum, value, origin); } inline JVMFlag::Error Flag_MonitorDeflationMax_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MonitorDeflationMax_enum, value, origin); } inline JVMFlag::Error Flag_MonitorUsedDeflationThreshold_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MonitorUsedDeflationThreshold_enum, value, origin); } inline JVMFlag::Error Flag_NoAsyncDeflationProgressMax_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NoAsyncDeflationProgressMax_enum, value, origin); } inline JVMFlag::Error Flag_hashCode_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_hashCode_enum, value, origin); } inline JVMFlag::Error Flag_ReduceSignalUsage_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReduceSignalUsage_enum, value, origin); } inline JVMFlag::Error Flag_AllowUserSignalHandlers_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AllowUserSignalHandlers_enum, value, origin); } inline JVMFlag::Error Flag_UseSignalChaining_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSignalChaining_enum, value, origin); } inline JVMFlag::Error Flag_RestoreMXCSROnJNICalls_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_RestoreMXCSROnJNICalls_enum, value, origin); } inline JVMFlag::Error Flag_CheckJNICalls_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CheckJNICalls_enum, value, origin); } inline JVMFlag::Error Flag_UseFastJNIAccessors_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseFastJNIAccessors_enum, value, origin); } inline JVMFlag::Error Flag_MaxJNILocalCapacity_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxJNILocalCapacity_enum, value, origin); } inline JVMFlag::Error Flag_EagerXrunInit_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EagerXrunInit_enum, value, origin); } inline JVMFlag::Error Flag_PreserveAllAnnotations_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PreserveAllAnnotations_enum, value, origin); } inline JVMFlag::Error Flag_UseXMMForArrayCopy_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseXMMForArrayCopy_enum, value, origin); } inline JVMFlag::Error Flag_ContendedPaddingWidth_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ContendedPaddingWidth_enum, value, origin); } inline JVMFlag::Error Flag_EnableContended_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EnableContended_enum, value, origin); } inline JVMFlag::Error Flag_RestrictContended_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_RestrictContended_enum, value, origin); } inline JVMFlag::Error Flag_DiagnoseSyncOnValueBasedClasses_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DiagnoseSyncOnValueBasedClasses_enum, value, origin); } inline JVMFlag::Error Flag_ExitOnOutOfMemoryError_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ExitOnOutOfMemoryError_enum, value, origin); } inline JVMFlag::Error Flag_CrashOnOutOfMemoryError_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CrashOnOutOfMemoryError_enum, value, origin); } inline JVMFlag::Error Flag_TraceJVMTI_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TraceJVMTI_enum, value, origin); } inline JVMFlag::Error Flag_StressLdcRewrite_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StressLdcRewrite_enum, value, origin); } inline JVMFlag::Error Flag_AllowRedefinitionToAddDeleteMethods_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AllowRedefinitionToAddDeleteMethods_enum, value, origin); } inline JVMFlag::Error Flag_ProcessDistributionStride_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ProcessDistributionStride_enum, value, origin); } inline JVMFlag::Error Flag_IgnoreEmptyClassPaths_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_IgnoreEmptyClassPaths_enum, value, origin); } inline JVMFlag::Error Flag_PrintHeapAtSIGBREAK_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintHeapAtSIGBREAK_enum, value, origin); } inline JVMFlag::Error Flag_PrintClassHistogram_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintClassHistogram_enum, value, origin); } inline JVMFlag::Error Flag_ObjectCountCutOffPercent_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ObjectCountCutOffPercent_enum, value, origin); } inline JVMFlag::Error Flag_VerifyBeforeIteration_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyBeforeIteration_enum, value, origin); } inline JVMFlag::Error Flag_CICompilerCount_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CICompilerCount_enum, value, origin); } inline JVMFlag::Error Flag_UseDynamicNumberOfCompilerThreads_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseDynamicNumberOfCompilerThreads_enum, value, origin); } inline JVMFlag::Error Flag_ReduceNumberOfCompilerThreads_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReduceNumberOfCompilerThreads_enum, value, origin); } inline JVMFlag::Error Flag_TraceCompilerThreads_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TraceCompilerThreads_enum, value, origin); } inline JVMFlag::Error Flag_LogClassLoadingCauseFor_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LogClassLoadingCauseFor_enum, value, origin); } inline JVMFlag::Error Flag_ImplicitNullChecks_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ImplicitNullChecks_enum, value, origin); } inline JVMFlag::Error Flag_TrapBasedNullChecks_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TrapBasedNullChecks_enum, value, origin); } inline JVMFlag::Error Flag_EnableThreadSMRStatistics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EnableThreadSMRStatistics_enum, value, origin); } inline JVMFlag::Error Flag_UseNotificationThread_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseNotificationThread_enum, value, origin); } inline JVMFlag::Error Flag_Inline_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_Inline_enum, value, origin); } inline JVMFlag::Error Flag_ClipInlining_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ClipInlining_enum, value, origin); } inline JVMFlag::Error Flag_UseVtableBasedCHA_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseVtableBasedCHA_enum, value, origin); } inline JVMFlag::Error Flag_UseTypeProfile_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseTypeProfile_enum, value, origin); } inline JVMFlag::Error Flag_PrintInlining_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintInlining_enum, value, origin); } inline JVMFlag::Error Flag_UsePopCountInstruction_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UsePopCountInstruction_enum, value, origin); } inline JVMFlag::Error Flag_PrintMethodFlushingStatistics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintMethodFlushingStatistics_enum, value, origin); } inline JVMFlag::Error Flag_MinPassesBeforeFlush_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MinPassesBeforeFlush_enum, value, origin); } inline JVMFlag::Error Flag_DebugNonSafepoints_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DebugNonSafepoints_enum, value, origin); } inline JVMFlag::Error Flag_PrintVMOptions_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintVMOptions_enum, value, origin); } inline JVMFlag::Error Flag_IgnoreUnrecognizedVMOptions_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_IgnoreUnrecognizedVMOptions_enum, value, origin); } inline JVMFlag::Error Flag_PrintCommandLineFlags_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintCommandLineFlags_enum, value, origin); } inline JVMFlag::Error Flag_PrintFlagsInitial_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintFlagsInitial_enum, value, origin); } inline JVMFlag::Error Flag_PrintFlagsFinal_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintFlagsFinal_enum, value, origin); } inline JVMFlag::Error Flag_PrintFlagsRanges_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintFlagsRanges_enum, value, origin); } inline JVMFlag::Error Flag_SerializeVMOutput_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SerializeVMOutput_enum, value, origin); } inline JVMFlag::Error Flag_DisplayVMOutput_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DisplayVMOutput_enum, value, origin); } inline JVMFlag::Error Flag_LogVMOutput_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LogVMOutput_enum, value, origin); } inline JVMFlag::Error Flag_LogFile_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LogFile_enum, value, origin); } inline JVMFlag::Error Flag_ErrorFile_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ErrorFile_enum, value, origin); } inline JVMFlag::Error Flag_ExtensiveErrorReports_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ExtensiveErrorReports_enum, value, origin); } inline JVMFlag::Error Flag_DisplayVMOutputToStderr_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DisplayVMOutputToStderr_enum, value, origin); } inline JVMFlag::Error Flag_DisplayVMOutputToStdout_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DisplayVMOutputToStdout_enum, value, origin); } inline JVMFlag::Error Flag_ErrorFileToStderr_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ErrorFileToStderr_enum, value, origin); } inline JVMFlag::Error Flag_ErrorFileToStdout_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ErrorFileToStdout_enum, value, origin); } inline JVMFlag::Error Flag_PrintStringTableStatistics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintStringTableStatistics_enum, value, origin); } inline JVMFlag::Error Flag_VerifyStringTableAtExit_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyStringTableAtExit_enum, value, origin); } inline JVMFlag::Error Flag_AbortVMOnException_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AbortVMOnException_enum, value, origin); } inline JVMFlag::Error Flag_AbortVMOnExceptionMessage_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AbortVMOnExceptionMessage_enum, value, origin); } inline JVMFlag::Error Flag_RangeCheckElimination_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_RangeCheckElimination_enum, value, origin); } inline JVMFlag::Error Flag_CompactStrings_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompactStrings_enum, value, origin); } inline JVMFlag::Error Flag_TypeProfileLevel_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TypeProfileLevel_enum, value, origin); } inline JVMFlag::Error Flag_TypeProfileArgsLimit_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TypeProfileArgsLimit_enum, value, origin); } inline JVMFlag::Error Flag_TypeProfileParmsLimit_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TypeProfileParmsLimit_enum, value, origin); } inline JVMFlag::Error Flag_RewriteBytecodes_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_RewriteBytecodes_enum, value, origin); } inline JVMFlag::Error Flag_RewriteFrequentPairs_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_RewriteFrequentPairs_enum, value, origin); } inline JVMFlag::Error Flag_PrintInterpreter_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintInterpreter_enum, value, origin); } inline JVMFlag::Error Flag_UseInterpreter_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseInterpreter_enum, value, origin); } inline JVMFlag::Error Flag_UseLoopCounter_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseLoopCounter_enum, value, origin); } inline JVMFlag::Error Flag_UseOnStackReplacement_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseOnStackReplacement_enum, value, origin); } inline JVMFlag::Error Flag_PreferInterpreterNativeStubs_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PreferInterpreterNativeStubs_enum, value, origin); } inline JVMFlag::Error Flag_PrintSignatureHandlers_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintSignatureHandlers_enum, value, origin); } inline JVMFlag::Error Flag_ProfileInterpreter_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ProfileInterpreter_enum, value, origin); } inline JVMFlag::Error Flag_ProfileMaturityPercentage_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ProfileMaturityPercentage_enum, value, origin); } inline JVMFlag::Error Flag_PrintMethodData_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintMethodData_enum, value, origin); } inline JVMFlag::Error Flag_UseCompiler_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCompiler_enum, value, origin); } inline JVMFlag::Error Flag_UseCounterDecay_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCounterDecay_enum, value, origin); } inline JVMFlag::Error Flag_AlwaysCompileLoopMethods_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AlwaysCompileLoopMethods_enum, value, origin); } inline JVMFlag::Error Flag_AllocatePrefetchStyle_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AllocatePrefetchStyle_enum, value, origin); } inline JVMFlag::Error Flag_AllocatePrefetchDistance_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AllocatePrefetchDistance_enum, value, origin); } inline JVMFlag::Error Flag_AllocatePrefetchLines_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AllocatePrefetchLines_enum, value, origin); } inline JVMFlag::Error Flag_AllocateInstancePrefetchLines_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AllocateInstancePrefetchLines_enum, value, origin); } inline JVMFlag::Error Flag_AllocatePrefetchStepSize_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AllocatePrefetchStepSize_enum, value, origin); } inline JVMFlag::Error Flag_AllocatePrefetchInstr_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AllocatePrefetchInstr_enum, value, origin); } inline JVMFlag::Error Flag_TraceDeoptimization_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TraceDeoptimization_enum, value, origin); } inline JVMFlag::Error Flag_SelfDestructTimer_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SelfDestructTimer_enum, value, origin); } inline JVMFlag::Error Flag_MaxJavaStackTraceDepth_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxJavaStackTraceDepth_enum, value, origin); } inline JVMFlag::Error Flag_GuaranteedSafepointInterval_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_GuaranteedSafepointInterval_enum, value, origin); } inline JVMFlag::Error Flag_SafepointTimeoutDelay_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SafepointTimeoutDelay_enum, value, origin); } inline JVMFlag::Error Flag_UseSystemMemoryBarrier_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSystemMemoryBarrier_enum, value, origin); } inline JVMFlag::Error Flag_NmethodSweepActivity_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NmethodSweepActivity_enum, value, origin); } inline JVMFlag::Error Flag_ErrorLogPrintCodeLimit_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ErrorLogPrintCodeLimit_enum, value, origin); } inline JVMFlag::Error Flag_MallocLimit_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MallocLimit_enum, value, origin); } inline JVMFlag::Error Flag_TypeProfileWidth_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TypeProfileWidth_enum, value, origin); } inline JVMFlag::Error Flag_PerMethodRecompilationCutoff_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PerMethodRecompilationCutoff_enum, value, origin); } inline JVMFlag::Error Flag_PerBytecodeRecompilationCutoff_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PerBytecodeRecompilationCutoff_enum, value, origin); } inline JVMFlag::Error Flag_PerMethodTrapLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PerMethodTrapLimit_enum, value, origin); } inline JVMFlag::Error Flag_PerMethodSpecTrapLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PerMethodSpecTrapLimit_enum, value, origin); } inline JVMFlag::Error Flag_PerBytecodeTrapLimit_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PerBytecodeTrapLimit_enum, value, origin); } inline JVMFlag::Error Flag_SpecTrapLimitExtraEntries_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SpecTrapLimitExtraEntries_enum, value, origin); } inline JVMFlag::Error Flag_InlineFrequencyRatio_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InlineFrequencyRatio_enum, value, origin); } inline JVMFlag::Error Flag_MinInlineFrequencyRatio_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MinInlineFrequencyRatio_enum, value, origin); } inline JVMFlag::Error Flag_MetaspaceSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MetaspaceSize_enum, value, origin); } inline JVMFlag::Error Flag_MaxMetaspaceSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxMetaspaceSize_enum, value, origin); } inline JVMFlag::Error Flag_CompressedClassSpaceSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompressedClassSpaceSize_enum, value, origin); } inline JVMFlag::Error Flag_PrintMetaspaceStatisticsAtExit_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintMetaspaceStatisticsAtExit_enum, value, origin); } inline JVMFlag::Error Flag_MinHeapFreeRatio_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MinHeapFreeRatio_enum, value, origin); } inline JVMFlag::Error Flag_MaxHeapFreeRatio_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxHeapFreeRatio_enum, value, origin); } inline JVMFlag::Error Flag_ShrinkHeapInSteps_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShrinkHeapInSteps_enum, value, origin); } inline JVMFlag::Error Flag_SoftRefLRUPolicyMSPerMB_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SoftRefLRUPolicyMSPerMB_enum, value, origin); } inline JVMFlag::Error Flag_MinHeapDeltaBytes_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MinHeapDeltaBytes_enum, value, origin); } inline JVMFlag::Error Flag_MinMetaspaceExpansion_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MinMetaspaceExpansion_enum, value, origin); } inline JVMFlag::Error Flag_MaxMetaspaceFreeRatio_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxMetaspaceFreeRatio_enum, value, origin); } inline JVMFlag::Error Flag_MinMetaspaceFreeRatio_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MinMetaspaceFreeRatio_enum, value, origin); } inline JVMFlag::Error Flag_MaxMetaspaceExpansion_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxMetaspaceExpansion_enum, value, origin); } inline JVMFlag::Error Flag_StackYellowPages_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StackYellowPages_enum, value, origin); } inline JVMFlag::Error Flag_StackRedPages_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StackRedPages_enum, value, origin); } inline JVMFlag::Error Flag_StackReservedPages_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StackReservedPages_enum, value, origin); } inline JVMFlag::Error Flag_RestrictReservedStack_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_RestrictReservedStack_enum, value, origin); } inline JVMFlag::Error Flag_StackShadowPages_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StackShadowPages_enum, value, origin); } inline JVMFlag::Error Flag_ThreadStackSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ThreadStackSize_enum, value, origin); } inline JVMFlag::Error Flag_VMThreadStackSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VMThreadStackSize_enum, value, origin); } inline JVMFlag::Error Flag_CompilerThreadStackSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompilerThreadStackSize_enum, value, origin); } inline JVMFlag::Error Flag_CodeCacheSegmentSize_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CodeCacheSegmentSize_enum, value, origin); } inline JVMFlag::Error Flag_CodeEntryAlignment_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CodeEntryAlignment_enum, value, origin); } inline JVMFlag::Error Flag_OptoLoopAlignment_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OptoLoopAlignment_enum, value, origin); } inline JVMFlag::Error Flag_InitialCodeCacheSize_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InitialCodeCacheSize_enum, value, origin); } inline JVMFlag::Error Flag_SegmentedCodeCache_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SegmentedCodeCache_enum, value, origin); } inline JVMFlag::Error Flag_ReservedCodeCacheSize_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReservedCodeCacheSize_enum, value, origin); } inline JVMFlag::Error Flag_NonProfiledCodeHeapSize_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NonProfiledCodeHeapSize_enum, value, origin); } inline JVMFlag::Error Flag_ProfiledCodeHeapSize_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ProfiledCodeHeapSize_enum, value, origin); } inline JVMFlag::Error Flag_NonNMethodCodeHeapSize_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NonNMethodCodeHeapSize_enum, value, origin); } inline JVMFlag::Error Flag_CodeCacheExpansionSize_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CodeCacheExpansionSize_enum, value, origin); } inline JVMFlag::Error Flag_CodeCacheMinBlockLength_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CodeCacheMinBlockLength_enum, value, origin); } inline JVMFlag::Error Flag_UseCodeCacheFlushing_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCodeCacheFlushing_enum, value, origin); } inline JVMFlag::Error Flag_SweeperThreshold_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SweeperThreshold_enum, value, origin); } inline JVMFlag::Error Flag_StartAggressiveSweepingAt_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StartAggressiveSweepingAt_enum, value, origin); } inline JVMFlag::Error Flag_UseThreadPriorities_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseThreadPriorities_enum, value, origin); } inline JVMFlag::Error Flag_ThreadPriorityPolicy_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ThreadPriorityPolicy_enum, value, origin); } inline JVMFlag::Error Flag_ThreadPriorityVerbose_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ThreadPriorityVerbose_enum, value, origin); } inline JVMFlag::Error Flag_CompilerThreadPriority_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompilerThreadPriority_enum, value, origin); } inline JVMFlag::Error Flag_VMThreadPriority_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VMThreadPriority_enum, value, origin); } inline JVMFlag::Error Flag_JavaPriority1_To_OSPriority_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JavaPriority1_To_OSPriority_enum, value, origin); } inline JVMFlag::Error Flag_JavaPriority2_To_OSPriority_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JavaPriority2_To_OSPriority_enum, value, origin); } inline JVMFlag::Error Flag_JavaPriority3_To_OSPriority_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JavaPriority3_To_OSPriority_enum, value, origin); } inline JVMFlag::Error Flag_JavaPriority4_To_OSPriority_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JavaPriority4_To_OSPriority_enum, value, origin); } inline JVMFlag::Error Flag_JavaPriority5_To_OSPriority_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JavaPriority5_To_OSPriority_enum, value, origin); } inline JVMFlag::Error Flag_JavaPriority6_To_OSPriority_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JavaPriority6_To_OSPriority_enum, value, origin); } inline JVMFlag::Error Flag_JavaPriority7_To_OSPriority_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JavaPriority7_To_OSPriority_enum, value, origin); } inline JVMFlag::Error Flag_JavaPriority8_To_OSPriority_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JavaPriority8_To_OSPriority_enum, value, origin); } inline JVMFlag::Error Flag_JavaPriority9_To_OSPriority_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JavaPriority9_To_OSPriority_enum, value, origin); } inline JVMFlag::Error Flag_JavaPriority10_To_OSPriority_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_JavaPriority10_To_OSPriority_enum, value, origin); } inline JVMFlag::Error Flag_UseCriticalJavaThreadPriority_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCriticalJavaThreadPriority_enum, value, origin); } inline JVMFlag::Error Flag_UseCriticalCompilerThreadPriority_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCriticalCompilerThreadPriority_enum, value, origin); } inline JVMFlag::Error Flag_CompileThreshold_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CompileThreshold_enum, value, origin); } inline JVMFlag::Error Flag_TieredCompilation_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TieredCompilation_enum, value, origin); } inline JVMFlag::Error Flag_MaxDirectMemorySize_set(uint64_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxDirectMemorySize_enum, value, origin); } inline JVMFlag::Error Flag_UseNewCode_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseNewCode_enum, value, origin); } inline JVMFlag::Error Flag_UseNewCode2_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseNewCode2_enum, value, origin); } inline JVMFlag::Error Flag_UseNewCode3_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseNewCode3_enum, value, origin); } inline JVMFlag::Error Flag_UsePerfData_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UsePerfData_enum, value, origin); } inline JVMFlag::Error Flag_PerfDataSaveToFile_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PerfDataSaveToFile_enum, value, origin); } inline JVMFlag::Error Flag_PerfDataSaveFile_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PerfDataSaveFile_enum, value, origin); } inline JVMFlag::Error Flag_PerfDataSamplingInterval_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PerfDataSamplingInterval_enum, value, origin); } inline JVMFlag::Error Flag_PerfDisableSharedMem_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PerfDisableSharedMem_enum, value, origin); } inline JVMFlag::Error Flag_PerfDataMemorySize_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PerfDataMemorySize_enum, value, origin); } inline JVMFlag::Error Flag_PerfMaxStringConstLength_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PerfMaxStringConstLength_enum, value, origin); } inline JVMFlag::Error Flag_PerfAllowAtExitRegistration_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PerfAllowAtExitRegistration_enum, value, origin); } inline JVMFlag::Error Flag_PerfBypassFileSystemCheck_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PerfBypassFileSystemCheck_enum, value, origin); } inline JVMFlag::Error Flag_UnguardOnExecutionViolation_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UnguardOnExecutionViolation_enum, value, origin); } inline JVMFlag::Error Flag_ManagementServer_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ManagementServer_enum, value, origin); } inline JVMFlag::Error Flag_DisableAttachMechanism_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DisableAttachMechanism_enum, value, origin); } inline JVMFlag::Error Flag_StartAttachListener_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StartAttachListener_enum, value, origin); } inline JVMFlag::Error Flag_EnableDynamicAgentLoading_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EnableDynamicAgentLoading_enum, value, origin); } inline JVMFlag::Error Flag_PrintConcurrentLocks_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintConcurrentLocks_enum, value, origin); } inline JVMFlag::Error Flag_PrintMethodHandleStubs_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintMethodHandleStubs_enum, value, origin); } inline JVMFlag::Error Flag_VerifyMethodHandles_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyMethodHandles_enum, value, origin); } inline JVMFlag::Error Flag_ShowHiddenFrames_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShowHiddenFrames_enum, value, origin); } inline JVMFlag::Error Flag_ShowCarrierFrames_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShowCarrierFrames_enum, value, origin); } inline JVMFlag::Error Flag_TrustFinalNonStaticFields_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TrustFinalNonStaticFields_enum, value, origin); } inline JVMFlag::Error Flag_FoldStableValues_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_FoldStableValues_enum, value, origin); } inline JVMFlag::Error Flag_UseBootstrapCallInfo_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseBootstrapCallInfo_enum, value, origin); } inline JVMFlag::Error Flag_PauseAtStartup_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PauseAtStartup_enum, value, origin); } inline JVMFlag::Error Flag_PauseAtStartupFile_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PauseAtStartupFile_enum, value, origin); } inline JVMFlag::Error Flag_PauseAtExit_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PauseAtExit_enum, value, origin); } inline JVMFlag::Error Flag_DTraceMethodProbes_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DTraceMethodProbes_enum, value, origin); } inline JVMFlag::Error Flag_DTraceAllocProbes_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DTraceAllocProbes_enum, value, origin); } inline JVMFlag::Error Flag_DTraceMonitorProbes_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DTraceMonitorProbes_enum, value, origin); } inline JVMFlag::Error Flag_RelaxAccessControlCheck_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_RelaxAccessControlCheck_enum, value, origin); } inline JVMFlag::Error Flag_StringTableSize_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StringTableSize_enum, value, origin); } inline JVMFlag::Error Flag_SymbolTableSize_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SymbolTableSize_enum, value, origin); } inline JVMFlag::Error Flag_UseStringDeduplication_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseStringDeduplication_enum, value, origin); } inline JVMFlag::Error Flag_StringDeduplicationAgeThreshold_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StringDeduplicationAgeThreshold_enum, value, origin); } inline JVMFlag::Error Flag_StringDeduplicationInitialTableSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StringDeduplicationInitialTableSize_enum, value, origin); } inline JVMFlag::Error Flag_StringDeduplicationGrowTableLoad_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StringDeduplicationGrowTableLoad_enum, value, origin); } inline JVMFlag::Error Flag_StringDeduplicationShrinkTableLoad_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StringDeduplicationShrinkTableLoad_enum, value, origin); } inline JVMFlag::Error Flag_StringDeduplicationTargetTableLoad_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StringDeduplicationTargetTableLoad_enum, value, origin); } inline JVMFlag::Error Flag_StringDeduplicationCleanupDeadMinimum_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StringDeduplicationCleanupDeadMinimum_enum, value, origin); } inline JVMFlag::Error Flag_StringDeduplicationCleanupDeadPercent_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StringDeduplicationCleanupDeadPercent_enum, value, origin); } inline JVMFlag::Error Flag_StringDeduplicationResizeALot_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StringDeduplicationResizeALot_enum, value, origin); } inline JVMFlag::Error Flag_StringDeduplicationHashSeed_set(uint64_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StringDeduplicationHashSeed_enum, value, origin); } inline JVMFlag::Error Flag_WhiteBoxAPI_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_WhiteBoxAPI_enum, value, origin); } inline JVMFlag::Error Flag_ArrayAllocatorMallocLimit_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ArrayAllocatorMallocLimit_enum, value, origin); } inline JVMFlag::Error Flag_AlwaysAtomicAccesses_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AlwaysAtomicAccesses_enum, value, origin); } inline JVMFlag::Error Flag_UseUnalignedAccesses_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseUnalignedAccesses_enum, value, origin); } inline JVMFlag::Error Flag_PreserveFramePointer_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PreserveFramePointer_enum, value, origin); } inline JVMFlag::Error Flag_AsyncLogBufferSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AsyncLogBufferSize_enum, value, origin); } inline JVMFlag::Error Flag_CheckIntrinsics_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_CheckIntrinsics_enum, value, origin); } inline JVMFlag::Error Flag_InitArrayShortSize_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InitArrayShortSize_enum, value, origin); } inline JVMFlag::Error Flag_AllocateHeapAt_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AllocateHeapAt_enum, value, origin); } inline JVMFlag::Error Flag_VMContinuations_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VMContinuations_enum, value, origin); } inline JVMFlag::Error Flag_ShowRegistersOnAssert_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShowRegistersOnAssert_enum, value, origin); } inline JVMFlag::Error Flag_UseSwitchProfiling_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSwitchProfiling_enum, value, origin); } inline JVMFlag::Error Flag_FlightRecorder_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_FlightRecorder_enum, value, origin); } inline JVMFlag::Error Flag_FlightRecorderOptions_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_FlightRecorderOptions_enum, value, origin); } inline JVMFlag::Error Flag_StartFlightRecording_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_StartFlightRecording_enum, value, origin); } inline JVMFlag::Error Flag_UseFastUnorderedTimeStamps_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseFastUnorderedTimeStamps_enum, value, origin); } inline JVMFlag::Error Flag_UseEmptySlotsInSupers_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseEmptySlotsInSupers_enum, value, origin); } inline JVMFlag::Error Flag_DeoptimizeNMethodBarriersALot_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DeoptimizeNMethodBarriersALot_enum, value, origin); } inline JVMFlag::Error Flag_LockingMode_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LockingMode_enum, value, origin); } inline JVMFlag::Error Flag_TrimNativeHeapInterval_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TrimNativeHeapInterval_enum, value, origin); } inline JVMFlag::Error Flag_UseOprofile_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseOprofile_enum, value, origin); } inline JVMFlag::Error Flag_UseLinuxPosixThreadCPUClocks_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseLinuxPosixThreadCPUClocks_enum, value, origin); } inline JVMFlag::Error Flag_UseHugeTLBFS_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseHugeTLBFS_enum, value, origin); } inline JVMFlag::Error Flag_UseTransparentHugePages_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseTransparentHugePages_enum, value, origin); } inline JVMFlag::Error Flag_LoadExecStackDllInVMThread_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_LoadExecStackDllInVMThread_enum, value, origin); } inline JVMFlag::Error Flag_UseSHM_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSHM_enum, value, origin); } inline JVMFlag::Error Flag_UseContainerSupport_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseContainerSupport_enum, value, origin); } inline JVMFlag::Error Flag_AdjustStackSizeForTLS_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AdjustStackSizeForTLS_enum, value, origin); } inline JVMFlag::Error Flag_DumpPrivateMappingsInCore_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DumpPrivateMappingsInCore_enum, value, origin); } inline JVMFlag::Error Flag_DumpSharedMappingsInCore_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DumpSharedMappingsInCore_enum, value, origin); } inline JVMFlag::Error Flag_UseCpuAllocPath_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCpuAllocPath_enum, value, origin); } inline JVMFlag::Error Flag_DumpPerfMapAtExit_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DumpPerfMapAtExit_enum, value, origin); } inline JVMFlag::Error Flag_TimerSlack_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TimerSlack_enum, value, origin); } inline JVMFlag::Error Flag_THPStackMitigation_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_THPStackMitigation_enum, value, origin); } inline JVMFlag::Error Flag_EpsilonPrintHeapSteps_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EpsilonPrintHeapSteps_enum, value, origin); } inline JVMFlag::Error Flag_EpsilonUpdateCountersStep_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EpsilonUpdateCountersStep_enum, value, origin); } inline JVMFlag::Error Flag_EpsilonMaxTLABSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EpsilonMaxTLABSize_enum, value, origin); } inline JVMFlag::Error Flag_EpsilonElasticTLAB_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EpsilonElasticTLAB_enum, value, origin); } inline JVMFlag::Error Flag_EpsilonElasticTLABDecay_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EpsilonElasticTLABDecay_enum, value, origin); } inline JVMFlag::Error Flag_EpsilonTLABElasticity_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EpsilonTLABElasticity_enum, value, origin); } inline JVMFlag::Error Flag_EpsilonTLABDecayTime_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EpsilonTLABDecayTime_enum, value, origin); } inline JVMFlag::Error Flag_EpsilonMinHeapExpand_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_EpsilonMinHeapExpand_enum, value, origin); } inline JVMFlag::Error Flag_G1UseAdaptiveIHOP_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1UseAdaptiveIHOP_enum, value, origin); } inline JVMFlag::Error Flag_G1AdaptiveIHOPNumInitialSamples_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1AdaptiveIHOPNumInitialSamples_enum, value, origin); } inline JVMFlag::Error Flag_G1ConfidencePercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1ConfidencePercent_enum, value, origin); } inline JVMFlag::Error Flag_G1SummarizeRSetStatsPeriod_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1SummarizeRSetStatsPeriod_enum, value, origin); } inline JVMFlag::Error Flag_G1ConcMarkStepDurationMillis_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1ConcMarkStepDurationMillis_enum, value, origin); } inline JVMFlag::Error Flag_G1RefProcDrainInterval_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1RefProcDrainInterval_enum, value, origin); } inline JVMFlag::Error Flag_G1UseReferencePrecleaning_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1UseReferencePrecleaning_enum, value, origin); } inline JVMFlag::Error Flag_G1LastPLABAverageOccupancy_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1LastPLABAverageOccupancy_enum, value, origin); } inline JVMFlag::Error Flag_G1SATBBufferSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1SATBBufferSize_enum, value, origin); } inline JVMFlag::Error Flag_G1SATBBufferEnqueueingThresholdPercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1SATBBufferEnqueueingThresholdPercent_enum, value, origin); } inline JVMFlag::Error Flag_G1ExpandByPercentOfAvailable_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1ExpandByPercentOfAvailable_enum, value, origin); } inline JVMFlag::Error Flag_G1UpdateBufferSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1UpdateBufferSize_enum, value, origin); } inline JVMFlag::Error Flag_G1RSetUpdatingPauseTimePercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1RSetUpdatingPauseTimePercent_enum, value, origin); } inline JVMFlag::Error Flag_G1UseConcRefinement_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1UseConcRefinement_enum, value, origin); } inline JVMFlag::Error Flag_G1RemSetArrayOfCardsEntries_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1RemSetArrayOfCardsEntries_enum, value, origin); } inline JVMFlag::Error Flag_G1RemSetHowlMaxNumBuckets_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1RemSetHowlMaxNumBuckets_enum, value, origin); } inline JVMFlag::Error Flag_G1RemSetHowlNumBuckets_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1RemSetHowlNumBuckets_enum, value, origin); } inline JVMFlag::Error Flag_G1RemSetCoarsenHowlBitmapToHowlFullPercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1RemSetCoarsenHowlBitmapToHowlFullPercent_enum, value, origin); } inline JVMFlag::Error Flag_G1RemSetCoarsenHowlToFullPercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1RemSetCoarsenHowlToFullPercent_enum, value, origin); } inline JVMFlag::Error Flag_G1ReservePercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1ReservePercent_enum, value, origin); } inline JVMFlag::Error Flag_G1HeapRegionSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1HeapRegionSize_enum, value, origin); } inline JVMFlag::Error Flag_G1ConcRefinementThreads_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1ConcRefinementThreads_enum, value, origin); } inline JVMFlag::Error Flag_G1MaxNewSizePercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1MaxNewSizePercent_enum, value, origin); } inline JVMFlag::Error Flag_G1NewSizePercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1NewSizePercent_enum, value, origin); } inline JVMFlag::Error Flag_G1MixedGCLiveThresholdPercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1MixedGCLiveThresholdPercent_enum, value, origin); } inline JVMFlag::Error Flag_G1RetainRegionLiveThresholdPercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1RetainRegionLiveThresholdPercent_enum, value, origin); } inline JVMFlag::Error Flag_G1HeapWastePercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1HeapWastePercent_enum, value, origin); } inline JVMFlag::Error Flag_G1MixedGCCountTarget_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1MixedGCCountTarget_enum, value, origin); } inline JVMFlag::Error Flag_G1EagerReclaimRemSetThreshold_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1EagerReclaimRemSetThreshold_enum, value, origin); } inline JVMFlag::Error Flag_G1RebuildRemSetChunkSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1RebuildRemSetChunkSize_enum, value, origin); } inline JVMFlag::Error Flag_G1OldCSetRegionThresholdPercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1OldCSetRegionThresholdPercent_enum, value, origin); } inline JVMFlag::Error Flag_G1VerifyHeapRegionCodeRoots_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1VerifyHeapRegionCodeRoots_enum, value, origin); } inline JVMFlag::Error Flag_G1PeriodicGCInterval_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1PeriodicGCInterval_enum, value, origin); } inline JVMFlag::Error Flag_G1PeriodicGCInvokesConcurrent_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1PeriodicGCInvokesConcurrent_enum, value, origin); } inline JVMFlag::Error Flag_G1PeriodicGCSystemLoadThreshold_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1PeriodicGCSystemLoadThreshold_enum, value, origin); } inline JVMFlag::Error Flag_G1RemSetFreeMemoryRescheduleDelayMillis_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1RemSetFreeMemoryRescheduleDelayMillis_enum, value, origin); } inline JVMFlag::Error Flag_G1RemSetFreeMemoryStepDurationMillis_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1RemSetFreeMemoryStepDurationMillis_enum, value, origin); } inline JVMFlag::Error Flag_G1RemSetFreeMemoryKeepExcessRatio_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1RemSetFreeMemoryKeepExcessRatio_enum, value, origin); } inline JVMFlag::Error Flag_G1RestoreRetainedRegionChunksPerWorker_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1RestoreRetainedRegionChunksPerWorker_enum, value, origin); } inline JVMFlag::Error Flag_G1NumCardsCostSampleThreshold_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_G1NumCardsCostSampleThreshold_enum, value, origin); } inline JVMFlag::Error Flag_HeapMaximumCompactionInterval_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_HeapMaximumCompactionInterval_enum, value, origin); } inline JVMFlag::Error Flag_HeapFirstMaximumCompactionCount_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_HeapFirstMaximumCompactionCount_enum, value, origin); } inline JVMFlag::Error Flag_UseMaximumCompactionOnSystemGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseMaximumCompactionOnSystemGC_enum, value, origin); } inline JVMFlag::Error Flag_ParallelOldDeadWoodLimiterMean_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ParallelOldDeadWoodLimiterMean_enum, value, origin); } inline JVMFlag::Error Flag_ParallelOldDeadWoodLimiterStdDev_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ParallelOldDeadWoodLimiterStdDev_enum, value, origin); } inline JVMFlag::Error Flag_PSChunkLargeArrays_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PSChunkLargeArrays_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahRegionSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahRegionSize_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahTargetNumRegions_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahTargetNumRegions_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahMinRegionSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahMinRegionSize_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahMaxRegionSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahMaxRegionSize_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahHumongousThreshold_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahHumongousThreshold_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahGCMode_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahGCMode_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahGCHeuristics_set(ccstr value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahGCHeuristics_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahUnloadClassesFrequency_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahUnloadClassesFrequency_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahGarbageThreshold_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahGarbageThreshold_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahInitFreeThreshold_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahInitFreeThreshold_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahMinFreeThreshold_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahMinFreeThreshold_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahAllocationThreshold_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahAllocationThreshold_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahAllocSpikeFactor_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahAllocSpikeFactor_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahLearningSteps_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahLearningSteps_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahImmediateThreshold_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahImmediateThreshold_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahAdaptiveSampleFrequencyHz_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahAdaptiveSampleFrequencyHz_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahAdaptiveSampleSizeSeconds_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahAdaptiveSampleSizeSeconds_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahAdaptiveInitialConfidence_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahAdaptiveInitialConfidence_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahAdaptiveInitialSpikeThreshold_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahAdaptiveInitialSpikeThreshold_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahAdaptiveDecayFactor_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahAdaptiveDecayFactor_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahGuaranteedGCInterval_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahGuaranteedGCInterval_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahAlwaysClearSoftRefs_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahAlwaysClearSoftRefs_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahUncommit_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahUncommit_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahUncommitDelay_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahUncommitDelay_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahRegionSampling_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahRegionSampling_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahRegionSamplingRate_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahRegionSamplingRate_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahControlIntervalMin_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahControlIntervalMin_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahControlIntervalMax_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahControlIntervalMax_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahControlIntervalAdjustPeriod_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahControlIntervalAdjustPeriod_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahVerify_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahVerify_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahVerifyLevel_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahVerifyLevel_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahElasticTLAB_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahElasticTLAB_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahEvacReserve_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahEvacReserve_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahEvacWaste_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahEvacWaste_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahEvacReserveOverflow_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahEvacReserveOverflow_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahPacing_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahPacing_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahPacingMaxDelay_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahPacingMaxDelay_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahPacingIdleSlack_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahPacingIdleSlack_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahPacingCycleSlack_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahPacingCycleSlack_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahPacingSurcharge_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahPacingSurcharge_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahCriticalFreeThreshold_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahCriticalFreeThreshold_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahDegeneratedGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahDegeneratedGC_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahFullGCThreshold_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahFullGCThreshold_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahImplicitGCInvokesConcurrent_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahImplicitGCInvokesConcurrent_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahHumongousMoves_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahHumongousMoves_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahOOMDuringEvacALot_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahOOMDuringEvacALot_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahAllocFailureALot_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahAllocFailureALot_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahMarkScanPrefetch_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahMarkScanPrefetch_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahMarkLoopStride_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahMarkLoopStride_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahParallelRegionStride_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahParallelRegionStride_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahSATBBufferSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahSATBBufferSize_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahMaxSATBBufferFlushes_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahMaxSATBBufferFlushes_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahSuspendibleWorkers_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahSuspendibleWorkers_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahSATBBarrier_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahSATBBarrier_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahIUBarrier_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahIUBarrier_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahCASBarrier_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahCASBarrier_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahCloneBarrier_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahCloneBarrier_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahLoadRefBarrier_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahLoadRefBarrier_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahNMethodBarrier_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahNMethodBarrier_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahStackWatermarkBarrier_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahStackWatermarkBarrier_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahLoopOptsAfterExpansion_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahLoopOptsAfterExpansion_enum, value, origin); } inline JVMFlag::Error Flag_ShenandoahSelfFixing_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ShenandoahSelfFixing_enum, value, origin); } inline JVMFlag::Error Flag_ZAllocationSpikeTolerance_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZAllocationSpikeTolerance_enum, value, origin); } inline JVMFlag::Error Flag_ZFragmentationLimit_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZFragmentationLimit_enum, value, origin); } inline JVMFlag::Error Flag_ZMarkStackSpaceLimit_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZMarkStackSpaceLimit_enum, value, origin); } inline JVMFlag::Error Flag_ZCollectionInterval_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZCollectionInterval_enum, value, origin); } inline JVMFlag::Error Flag_ZProactive_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZProactive_enum, value, origin); } inline JVMFlag::Error Flag_ZUncommit_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZUncommit_enum, value, origin); } inline JVMFlag::Error Flag_ZUncommitDelay_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZUncommitDelay_enum, value, origin); } inline JVMFlag::Error Flag_ZAsyncUnmappingLimit_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZAsyncUnmappingLimit_enum, value, origin); } inline JVMFlag::Error Flag_ZStatisticsInterval_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZStatisticsInterval_enum, value, origin); } inline JVMFlag::Error Flag_ZStressRelocateInPlace_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZStressRelocateInPlace_enum, value, origin); } inline JVMFlag::Error Flag_ZVerifyRoots_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZVerifyRoots_enum, value, origin); } inline JVMFlag::Error Flag_ZVerifyObjects_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZVerifyObjects_enum, value, origin); } inline JVMFlag::Error Flag_ZVerifyMarking_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZVerifyMarking_enum, value, origin); } inline JVMFlag::Error Flag_ZVerifyForwarding_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZVerifyForwarding_enum, value, origin); } inline JVMFlag::Error Flag_ZVerifyViews_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZVerifyViews_enum, value, origin); } inline JVMFlag::Error Flag_ZYoungCompactionLimit_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZYoungCompactionLimit_enum, value, origin); } inline JVMFlag::Error Flag_ZCollectionIntervalMinor_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZCollectionIntervalMinor_enum, value, origin); } inline JVMFlag::Error Flag_ZCollectionIntervalMajor_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZCollectionIntervalMajor_enum, value, origin); } inline JVMFlag::Error Flag_ZCollectionIntervalOnly_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZCollectionIntervalOnly_enum, value, origin); } inline JVMFlag::Error Flag_ZBufferStoreBarriers_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZBufferStoreBarriers_enum, value, origin); } inline JVMFlag::Error Flag_ZYoungGCThreads_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZYoungGCThreads_enum, value, origin); } inline JVMFlag::Error Flag_ZOldGCThreads_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZOldGCThreads_enum, value, origin); } inline JVMFlag::Error Flag_ZIndexDistributorStrategy_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZIndexDistributorStrategy_enum, value, origin); } inline JVMFlag::Error Flag_ZVerifyRemembered_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZVerifyRemembered_enum, value, origin); } inline JVMFlag::Error Flag_ZTenuringThreshold_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZTenuringThreshold_enum, value, origin); } inline JVMFlag::Error Flag_UseSerialGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseSerialGC_enum, value, origin); } inline JVMFlag::Error Flag_UseG1GC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseG1GC_enum, value, origin); } inline JVMFlag::Error Flag_UseParallelGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseParallelGC_enum, value, origin); } inline JVMFlag::Error Flag_UseEpsilonGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseEpsilonGC_enum, value, origin); } inline JVMFlag::Error Flag_UseZGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseZGC_enum, value, origin); } inline JVMFlag::Error Flag_ZGenerational_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZGenerational_enum, value, origin); } inline JVMFlag::Error Flag_UseShenandoahGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseShenandoahGC_enum, value, origin); } inline JVMFlag::Error Flag_ParallelGCThreads_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ParallelGCThreads_enum, value, origin); } inline JVMFlag::Error Flag_UseDynamicNumberOfGCThreads_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseDynamicNumberOfGCThreads_enum, value, origin); } inline JVMFlag::Error Flag_InjectGCWorkerCreationFailure_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InjectGCWorkerCreationFailure_enum, value, origin); } inline JVMFlag::Error Flag_HeapSizePerGCThread_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_HeapSizePerGCThread_enum, value, origin); } inline JVMFlag::Error Flag_ConcGCThreads_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ConcGCThreads_enum, value, origin); } inline JVMFlag::Error Flag_AlwaysTenure_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AlwaysTenure_enum, value, origin); } inline JVMFlag::Error Flag_NeverTenure_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NeverTenure_enum, value, origin); } inline JVMFlag::Error Flag_ScavengeBeforeFullGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ScavengeBeforeFullGC_enum, value, origin); } inline JVMFlag::Error Flag_ExplicitGCInvokesConcurrent_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ExplicitGCInvokesConcurrent_enum, value, origin); } inline JVMFlag::Error Flag_GCLockerEdenExpansionPercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_GCLockerEdenExpansionPercent_enum, value, origin); } inline JVMFlag::Error Flag_GCLockerRetryAllocationCount_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_GCLockerRetryAllocationCount_enum, value, origin); } inline JVMFlag::Error Flag_ParallelGCBufferWastePct_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ParallelGCBufferWastePct_enum, value, origin); } inline JVMFlag::Error Flag_TargetPLABWastePct_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TargetPLABWastePct_enum, value, origin); } inline JVMFlag::Error Flag_PLABWeight_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PLABWeight_enum, value, origin); } inline JVMFlag::Error Flag_ResizePLAB_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ResizePLAB_enum, value, origin); } inline JVMFlag::Error Flag_ParGCArrayScanChunk_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ParGCArrayScanChunk_enum, value, origin); } inline JVMFlag::Error Flag_AlwaysPreTouch_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AlwaysPreTouch_enum, value, origin); } inline JVMFlag::Error Flag_AlwaysPreTouchStacks_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AlwaysPreTouchStacks_enum, value, origin); } inline JVMFlag::Error Flag_PreTouchParallelChunkSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PreTouchParallelChunkSize_enum, value, origin); } inline JVMFlag::Error Flag_MarkStackSizeMax_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MarkStackSizeMax_enum, value, origin); } inline JVMFlag::Error Flag_MarkStackSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MarkStackSize_enum, value, origin); } inline JVMFlag::Error Flag_ParallelRefProcEnabled_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ParallelRefProcEnabled_enum, value, origin); } inline JVMFlag::Error Flag_ParallelRefProcBalancingEnabled_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ParallelRefProcBalancingEnabled_enum, value, origin); } inline JVMFlag::Error Flag_ReferencesPerThread_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ReferencesPerThread_enum, value, origin); } inline JVMFlag::Error Flag_InitiatingHeapOccupancyPercent_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InitiatingHeapOccupancyPercent_enum, value, origin); } inline JVMFlag::Error Flag_WorkStealingSleepMillis_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_WorkStealingSleepMillis_enum, value, origin); } inline JVMFlag::Error Flag_WorkStealingYieldsBeforeSleep_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_WorkStealingYieldsBeforeSleep_enum, value, origin); } inline JVMFlag::Error Flag_WorkStealingHardSpins_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_WorkStealingHardSpins_enum, value, origin); } inline JVMFlag::Error Flag_WorkStealingSpinToYieldRatio_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_WorkStealingSpinToYieldRatio_enum, value, origin); } inline JVMFlag::Error Flag_NeverActAsServerClassMachine_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NeverActAsServerClassMachine_enum, value, origin); } inline JVMFlag::Error Flag_AlwaysActAsServerClassMachine_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AlwaysActAsServerClassMachine_enum, value, origin); } inline JVMFlag::Error Flag_MaxRAM_set(uint64_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxRAM_enum, value, origin); } inline JVMFlag::Error Flag_AggressiveHeap_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AggressiveHeap_enum, value, origin); } inline JVMFlag::Error Flag_ErgoHeapSizeLimit_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ErgoHeapSizeLimit_enum, value, origin); } inline JVMFlag::Error Flag_MaxRAMFraction_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxRAMFraction_enum, value, origin); } inline JVMFlag::Error Flag_MinRAMFraction_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MinRAMFraction_enum, value, origin); } inline JVMFlag::Error Flag_InitialRAMFraction_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InitialRAMFraction_enum, value, origin); } inline JVMFlag::Error Flag_MaxRAMPercentage_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxRAMPercentage_enum, value, origin); } inline JVMFlag::Error Flag_MinRAMPercentage_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MinRAMPercentage_enum, value, origin); } inline JVMFlag::Error Flag_InitialRAMPercentage_set(double value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InitialRAMPercentage_enum, value, origin); } inline JVMFlag::Error Flag_ActiveProcessorCount_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ActiveProcessorCount_enum, value, origin); } inline JVMFlag::Error Flag_UseAdaptiveSizePolicy_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseAdaptiveSizePolicy_enum, value, origin); } inline JVMFlag::Error Flag_UsePSAdaptiveSurvivorSizePolicy_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UsePSAdaptiveSurvivorSizePolicy_enum, value, origin); } inline JVMFlag::Error Flag_UseAdaptiveGenerationSizePolicyAtMinorCollection_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseAdaptiveGenerationSizePolicyAtMinorCollection_enum, value, origin); } inline JVMFlag::Error Flag_UseAdaptiveGenerationSizePolicyAtMajorCollection_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseAdaptiveGenerationSizePolicyAtMajorCollection_enum, value, origin); } inline JVMFlag::Error Flag_UseAdaptiveSizePolicyWithSystemGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseAdaptiveSizePolicyWithSystemGC_enum, value, origin); } inline JVMFlag::Error Flag_AdaptiveSizeThroughPutPolicy_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AdaptiveSizeThroughPutPolicy_enum, value, origin); } inline JVMFlag::Error Flag_AdaptiveSizePolicyInitializingSteps_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AdaptiveSizePolicyInitializingSteps_enum, value, origin); } inline JVMFlag::Error Flag_AdaptiveSizePolicyOutputInterval_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AdaptiveSizePolicyOutputInterval_enum, value, origin); } inline JVMFlag::Error Flag_UseAdaptiveSizePolicyFootprintGoal_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseAdaptiveSizePolicyFootprintGoal_enum, value, origin); } inline JVMFlag::Error Flag_AdaptiveSizePolicyWeight_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AdaptiveSizePolicyWeight_enum, value, origin); } inline JVMFlag::Error Flag_AdaptiveTimeWeight_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AdaptiveTimeWeight_enum, value, origin); } inline JVMFlag::Error Flag_PausePadding_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PausePadding_enum, value, origin); } inline JVMFlag::Error Flag_PromotedPadding_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PromotedPadding_enum, value, origin); } inline JVMFlag::Error Flag_SurvivorPadding_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SurvivorPadding_enum, value, origin); } inline JVMFlag::Error Flag_ThresholdTolerance_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ThresholdTolerance_enum, value, origin); } inline JVMFlag::Error Flag_AdaptiveSizePolicyCollectionCostMargin_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AdaptiveSizePolicyCollectionCostMargin_enum, value, origin); } inline JVMFlag::Error Flag_YoungGenerationSizeIncrement_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_YoungGenerationSizeIncrement_enum, value, origin); } inline JVMFlag::Error Flag_YoungGenerationSizeSupplement_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_YoungGenerationSizeSupplement_enum, value, origin); } inline JVMFlag::Error Flag_YoungGenerationSizeSupplementDecay_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_YoungGenerationSizeSupplementDecay_enum, value, origin); } inline JVMFlag::Error Flag_TenuredGenerationSizeIncrement_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TenuredGenerationSizeIncrement_enum, value, origin); } inline JVMFlag::Error Flag_TenuredGenerationSizeSupplement_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TenuredGenerationSizeSupplement_enum, value, origin); } inline JVMFlag::Error Flag_TenuredGenerationSizeSupplementDecay_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TenuredGenerationSizeSupplementDecay_enum, value, origin); } inline JVMFlag::Error Flag_MaxGCPauseMillis_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxGCPauseMillis_enum, value, origin); } inline JVMFlag::Error Flag_GCPauseIntervalMillis_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_GCPauseIntervalMillis_enum, value, origin); } inline JVMFlag::Error Flag_MaxGCMinorPauseMillis_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxGCMinorPauseMillis_enum, value, origin); } inline JVMFlag::Error Flag_GCTimeRatio_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_GCTimeRatio_enum, value, origin); } inline JVMFlag::Error Flag_AdaptiveSizeDecrementScaleFactor_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AdaptiveSizeDecrementScaleFactor_enum, value, origin); } inline JVMFlag::Error Flag_UseAdaptiveSizeDecayMajorGCCost_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseAdaptiveSizeDecayMajorGCCost_enum, value, origin); } inline JVMFlag::Error Flag_AdaptiveSizeMajorGCDecayTimeScale_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_AdaptiveSizeMajorGCDecayTimeScale_enum, value, origin); } inline JVMFlag::Error Flag_MinSurvivorRatio_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MinSurvivorRatio_enum, value, origin); } inline JVMFlag::Error Flag_InitialSurvivorRatio_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InitialSurvivorRatio_enum, value, origin); } inline JVMFlag::Error Flag_BaseFootPrintEstimate_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_BaseFootPrintEstimate_enum, value, origin); } inline JVMFlag::Error Flag_UseGCOverheadLimit_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseGCOverheadLimit_enum, value, origin); } inline JVMFlag::Error Flag_GCTimeLimit_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_GCTimeLimit_enum, value, origin); } inline JVMFlag::Error Flag_GCHeapFreeLimit_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_GCHeapFreeLimit_enum, value, origin); } inline JVMFlag::Error Flag_PrefetchCopyIntervalInBytes_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrefetchCopyIntervalInBytes_enum, value, origin); } inline JVMFlag::Error Flag_PrefetchScanIntervalInBytes_set(intx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrefetchScanIntervalInBytes_enum, value, origin); } inline JVMFlag::Error Flag_VerifyDuringStartup_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyDuringStartup_enum, value, origin); } inline JVMFlag::Error Flag_VerifyBeforeExit_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyBeforeExit_enum, value, origin); } inline JVMFlag::Error Flag_VerifyBeforeGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyBeforeGC_enum, value, origin); } inline JVMFlag::Error Flag_VerifyAfterGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyAfterGC_enum, value, origin); } inline JVMFlag::Error Flag_VerifyDuringGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyDuringGC_enum, value, origin); } inline JVMFlag::Error Flag_VerifyArchivedFields_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyArchivedFields_enum, value, origin); } inline JVMFlag::Error Flag_VerifyGCType_set(ccstrlist value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyGCType_enum, value, origin); } inline JVMFlag::Error Flag_VerifySubSet_set(ccstrlist value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifySubSet_enum, value, origin); } inline JVMFlag::Error Flag_DeferInitialCardMark_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DeferInitialCardMark_enum, value, origin); } inline JVMFlag::Error Flag_UseCondCardMark_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseCondCardMark_enum, value, origin); } inline JVMFlag::Error Flag_VerifyRememberedSets_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyRememberedSets_enum, value, origin); } inline JVMFlag::Error Flag_VerifyObjectStartArray_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyObjectStartArray_enum, value, origin); } inline JVMFlag::Error Flag_DisableExplicitGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_DisableExplicitGC_enum, value, origin); } inline JVMFlag::Error Flag_PrintGC_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintGC_enum, value, origin); } inline JVMFlag::Error Flag_PrintGCDetails_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PrintGCDetails_enum, value, origin); } inline JVMFlag::Error Flag_MinHeapSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MinHeapSize_enum, value, origin); } inline JVMFlag::Error Flag_InitialHeapSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InitialHeapSize_enum, value, origin); } inline JVMFlag::Error Flag_MaxHeapSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxHeapSize_enum, value, origin); } inline JVMFlag::Error Flag_SoftMaxHeapSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SoftMaxHeapSize_enum, value, origin); } inline JVMFlag::Error Flag_OldSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OldSize_enum, value, origin); } inline JVMFlag::Error Flag_NewSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NewSize_enum, value, origin); } inline JVMFlag::Error Flag_MaxNewSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxNewSize_enum, value, origin); } inline JVMFlag::Error Flag_HeapBaseMinAddress_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_HeapBaseMinAddress_enum, value, origin); } inline JVMFlag::Error Flag_PretenureSizeThreshold_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_PretenureSizeThreshold_enum, value, origin); } inline JVMFlag::Error Flag_SurvivorRatio_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_SurvivorRatio_enum, value, origin); } inline JVMFlag::Error Flag_NewRatio_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NewRatio_enum, value, origin); } inline JVMFlag::Error Flag_NewSizeThreadIncrease_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_NewSizeThreadIncrease_enum, value, origin); } inline JVMFlag::Error Flag_QueuedAllocationWarningCount_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_QueuedAllocationWarningCount_enum, value, origin); } inline JVMFlag::Error Flag_VerifyGCStartAt_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyGCStartAt_enum, value, origin); } inline JVMFlag::Error Flag_VerifyGCLevel_set(int value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_VerifyGCLevel_enum, value, origin); } inline JVMFlag::Error Flag_MaxTenuringThreshold_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MaxTenuringThreshold_enum, value, origin); } inline JVMFlag::Error Flag_InitialTenuringThreshold_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_InitialTenuringThreshold_enum, value, origin); } inline JVMFlag::Error Flag_TargetSurvivorRatio_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TargetSurvivorRatio_enum, value, origin); } inline JVMFlag::Error Flag_MarkSweepDeadRatio_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MarkSweepDeadRatio_enum, value, origin); } inline JVMFlag::Error Flag_MarkSweepAlwaysCompactCount_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MarkSweepAlwaysCompactCount_enum, value, origin); } inline JVMFlag::Error Flag_GCDrainStackTargetSize_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_GCDrainStackTargetSize_enum, value, origin); } inline JVMFlag::Error Flag_GCCardSizeInBytes_set(uint value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_GCCardSizeInBytes_enum, value, origin); } inline JVMFlag::Error Flag_UseTLAB_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_UseTLAB_enum, value, origin); } inline JVMFlag::Error Flag_ResizeTLAB_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ResizeTLAB_enum, value, origin); } inline JVMFlag::Error Flag_ZeroTLAB_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_ZeroTLAB_enum, value, origin); } inline JVMFlag::Error Flag_TLABStats_set(bool value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TLABStats_enum, value, origin); } inline JVMFlag::Error Flag_MinTLABSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_MinTLABSize_enum, value, origin); } inline JVMFlag::Error Flag_TLABSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TLABSize_enum, value, origin); } inline JVMFlag::Error Flag_YoungPLABSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_YoungPLABSize_enum, value, origin); } inline JVMFlag::Error Flag_OldPLABSize_set(size_t value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_OldPLABSize_enum, value, origin); } inline JVMFlag::Error Flag_TLABAllocationWeight_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TLABAllocationWeight_enum, value, origin); } inline JVMFlag::Error Flag_TLABWasteTargetPercent_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TLABWasteTargetPercent_enum, value, origin); } inline JVMFlag::Error Flag_TLABRefillWasteFraction_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TLABRefillWasteFraction_enum, value, origin); } inline JVMFlag::Error Flag_TLABWasteIncrement_set(uintx value, JVMFlagOrigin origin) { return JVMFlagAccess::set(Flag_TLABWasteIncrement_enum, value, origin); } +# 34 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/vm_version_riscv.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/growableArray.hpp" 1 +# 72 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/growableArray.hpp" +class GrowableArrayBase : public AnyObj { + friend class VMStructs; + +protected: + + int _len; + + int _capacity; + + GrowableArrayBase(int capacity, int initial_len) : + _len(initial_len), + _capacity(capacity) { + ; + } + + ~GrowableArrayBase() {} + +public: + int length() const { return _len; } + int capacity() const { return _capacity; } + + bool is_empty() const { return _len == 0; } + bool is_nonempty() const { return _len != 0; } + bool is_full() const { return _len == _capacity; } + + void clear() { _len = 0; } + void trunc_to(int length) { + ; + _len = length; + } +}; + +template class GrowableArrayIterator; +template class GrowableArrayFilterIterator; +# 116 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/growableArray.hpp" +template +class GrowableArrayView : public GrowableArrayBase { +protected: + E* _data; + + GrowableArrayView(E* data, int capacity, int initial_len) : + GrowableArrayBase(capacity, initial_len), _data(data) {} + + ~GrowableArrayView() {} + +public: + const static GrowableArrayView EMPTY; + + bool operator==(const GrowableArrayView& rhs) const { + if (_len != rhs._len) + return false; + for (int i = 0; i < _len; i++) { + if (at(i) != rhs.at(i)) { + return false; + } + } + return true; + } + + bool operator!=(const GrowableArrayView& rhs) const { + return !(*this == rhs); + } + + E& at(int i) { + ; + return _data[i]; + } + + E const& at(int i) const { + ; + return _data[i]; + } + + E* adr_at(int i) const { + ; + return &_data[i]; + } + + E first() const { + ; + return _data[0]; + } + + E top() const { + ; + return _data[_len-1]; + } + + E last() const { + return top(); + } + + GrowableArrayIterator begin() const { + return GrowableArrayIterator(this, 0); + } + + GrowableArrayIterator end() const { + return GrowableArrayIterator(this, length()); + } + + E pop() { + ; + return _data[--_len]; + } + + void at_put(int i, const E& elem) { + ; + _data[i] = elem; + } + + bool contains(const E& elem) const { + for (int i = 0; i < _len; i++) { + if (_data[i] == elem) return true; + } + return false; + } + + int find(const E& elem) const { + for (int i = 0; i < _len; i++) { + if (_data[i] == elem) return i; + } + return -1; + } + + int find_from_end(const E& elem) const { + for (int i = _len-1; i >= 0; i--) { + if (_data[i] == elem) return i; + } + return -1; + } + + int find(void* token, bool f(void*, E)) const { + for (int i = 0; i < _len; i++) { + if (f(token, _data[i])) return i; + } + return -1; + } + + int find_from_end(void* token, bool f(void*, E)) const { + + for (int i = _len-1; i >= 0; i--) { + if (f(token, _data[i])) return i; + } + return -1; + } + + + + void remove(const E& elem) { + + bool removed = remove_if_existing(elem); + if (removed) return; + do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/utilities/growableArray.hpp", 233); } while (0); + } + + bool remove_if_existing(const E& elem) { + + for (int i = 0; i < _len; i++) { + if (_data[i] == elem) { + remove_at(i); + return true; + } + } + return false; + } + + void remove_at(int index) { + ; + for (int j = index + 1; j < _len; j++) { + _data[j-1] = _data[j]; + } + _len--; + } + + + void remove_till(int idx) { + remove_range(0, idx); + } + + + void remove_range(int start, int end) { + ; + ; + + for (int i = start, j = end; j < length(); i++, j++) { + at_put(i, at(j)); + } + trunc_to(length() - (end - start)); + } + + + void delete_at(int index) { + ; + if (index < --_len) { + + _data[index] = _data[_len]; + } + } + + void sort(int f(E*, E*)) { + qsort(_data, length(), sizeof(E), (_sort_Fn)f); + } + + void sort(int f(E*, E*), int stride) { + qsort(_data, length() / stride, sizeof(E) * stride, (_sort_Fn)f); + } + + template int find_sorted(const K& key, bool& found) const { + found = false; + int min = 0; + int max = length() - 1; + + while (max >= min) { + int mid = (int)(((uint)max + min) / 2); + E value = at(mid); + int diff = compare(key, value); + if (diff > 0) { + min = mid + 1; + } else if (diff < 0) { + max = mid - 1; + } else { + found = true; + return mid; + } + } + return min; + } + + template + int find_sorted(CompareClosure* cc, const K& key, bool& found) { + found = false; + int min = 0; + int max = length() - 1; + + while (max >= min) { + int mid = (int)(((uint)max + min) / 2); + E value = at(mid); + int diff = cc->do_compare(key, value); + if (diff > 0) { + min = mid + 1; + } else if (diff < 0) { + max = mid - 1; + } else { + found = true; + return mid; + } + } + return min; + } + + void print() const { + tty->print("Growable Array " "0x%016" +# 332 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/growableArray.hpp" 3 + "l" "x" +# 332 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/growableArray.hpp" + , p2i(this)); + tty->print(": length %d (capacity %d) { ", _len, _capacity); + for (int i = 0; i < _len; i++) { + tty->print("0x%016" +# 335 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/growableArray.hpp" 3 + "l" "x" +# 335 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/growableArray.hpp" + " ", *(intptr_t*)&(_data[i])); + } + tty->print("}\n"); + } +}; + +template +const GrowableArrayView GrowableArrayView::EMPTY(nullptr, 0, 0); + +template +class GrowableArrayFromArray : public GrowableArrayView { +public: + + GrowableArrayFromArray(E* data, int len) : + GrowableArrayView(data, len, len) {} +}; +# 360 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/growableArray.hpp" +template +class GrowableArrayWithAllocator : public GrowableArrayView { + friend class VMStructs; + + void expand_to(int j); + void grow(int j); + +protected: + GrowableArrayWithAllocator(E* data, int capacity) : + GrowableArrayView(data, capacity, 0) { + for (int i = 0; i < capacity; i++) { + ::new ((void*)&data[i]) E(); + } + } + + GrowableArrayWithAllocator(E* data, int capacity, int initial_len, const E& filler) : + GrowableArrayView(data, capacity, initial_len) { + int i = 0; + for (; i < initial_len; i++) { + ::new ((void*)&data[i]) E(filler); + } + for (; i < capacity; i++) { + ::new ((void*)&data[i]) E(); + } + } + + ~GrowableArrayWithAllocator() {} + +public: + int append(const E& elem) { + if (this->_len == this->_capacity) grow(this->_len); + int idx = this->_len++; + this->_data[idx] = elem; + return idx; + } + + bool append_if_missing(const E& elem) { + + bool missed = !this->contains(elem); + if (missed) append(elem); + return missed; + } + + void push(const E& elem) { append(elem); } + + E at_grow(int i, const E& fill = E()) { + ; + if (i >= this->_len) { + if (i >= this->_capacity) grow(i); + for (int j = this->_len; j <= i; j++) + this->_data[j] = fill; + this->_len = i+1; + } + return this->_data[i]; + } + + void at_put_grow(int i, const E& elem, const E& fill = E()) { + ; + if (i >= this->_len) { + if (i >= this->_capacity) grow(i); + for (int j = this->_len; j < i; j++) + this->_data[j] = fill; + this->_len = i+1; + } + this->_data[i] = elem; + } + + + void insert_before(const int idx, const E& elem) { + ; + if (this->_len == this->_capacity) grow(this->_len); + for (int j = this->_len - 1; j >= idx; j--) { + this->_data[j + 1] = this->_data[j]; + } + this->_len++; + this->_data[idx] = elem; + } + + void insert_before(const int idx, const GrowableArrayView* array) { + ; + int array_len = array->length(); + int new_len = this->_len + array_len; + if (new_len >= this->_capacity) grow(new_len); + + for (int j = this->_len - 1; j >= idx; j--) { + this->_data[j + array_len] = this->_data[j]; + } + + for (int j = 0; j < array_len; j++) { + this->_data[idx + j] = array->at(j); + } + + this->_len += array_len; + } + + void appendAll(const GrowableArrayView* l) { + for (int i = 0; i < l->length(); i++) { + this->at_put_grow(this->_len, l->at(i), E()); + } + } + + + + + + template E insert_sorted(const E& key) { + bool found; + int location = GrowableArrayView::template find_sorted(key, found); + if (!found) { + insert_before(location, key); + } + return this->at(location); + } + + E insert_sorted(CompareClosure* cc, const E& key) { + bool found; + int location = find_sorted(cc, key, found); + if (!found) { + insert_before(location, key); + } + return this->at(location); + } + + void swap(GrowableArrayWithAllocator* other) { + ::swap(this->_data, other->_data); + ::swap(this->_len, other->_len); + ::swap(this->_capacity, other->_capacity); + } + + + void reserve(int new_capacity); + + + void shrink_to_fit(); + + void clear_and_deallocate(); +}; + +template +void GrowableArrayWithAllocator::expand_to(int new_capacity) { + int old_capacity = this->_capacity; + + ; + this->_capacity = new_capacity; + E* newData = static_cast(this)->allocate(); + int i = 0; + for ( ; i < this->_len; i++) ::new ((void*)&newData[i]) E(this->_data[i]); + for ( ; i < this->_capacity; i++) ::new ((void*)&newData[i]) E(); + for (i = 0; i < old_capacity; i++) this->_data[i].~E(); + if (this->_data != nullptr) { + static_cast(this)->deallocate(this->_data); + } + this->_data = newData; +} + +template +void GrowableArrayWithAllocator::grow(int j) { + + expand_to(next_power_of_2(j)); +} + +template +void GrowableArrayWithAllocator::reserve(int new_capacity) { + if (new_capacity > this->_capacity) { + expand_to(new_capacity); + } +} + +template +void GrowableArrayWithAllocator::shrink_to_fit() { + int old_capacity = this->_capacity; + int len = this->_len; + ; + + + if (len == old_capacity) { + return; + } + + + E* old_data = this->_data; + E* new_data = nullptr; + this->_capacity = len; + if (len > 0) { + new_data = static_cast(this)->allocate(); + for (int i = 0; i < len; ++i) ::new (&new_data[i]) E(old_data[i]); + } + + for (int i = 0; i < old_capacity; ++i) old_data[i].~E(); + if (old_data != nullptr) { + static_cast(this)->deallocate(old_data); + } + + this->_data = new_data; +} + +template +void GrowableArrayWithAllocator::clear_and_deallocate() { + this->clear(); + this->shrink_to_fit(); +} + +class GrowableArrayResourceAllocator { +public: + static void* allocate(int max, int element_size); +}; + + +class GrowableArrayArenaAllocator { +public: + static void* allocate(int max, int element_size, Arena* arena); +}; + + +class GrowableArrayCHeapAllocator { +public: + static void* allocate(int max, int element_size, MEMFLAGS memflags); + static void deallocate(void* mem); +}; +# 597 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/growableArray.hpp" +class GrowableArrayMetadata { + uintptr_t _bits; + + + + + + static uintptr_t bits() { + return 0; + } + + + static uintptr_t bits(MEMFLAGS memflags) { + ; + return (uintptr_t(memflags) << 1) | 1; + } + + + static uintptr_t bits(Arena* arena) { + ; + return uintptr_t(arena); + } + +public: + + GrowableArrayMetadata() : + _bits(bits()) + { + } + + + GrowableArrayMetadata(Arena* arena) : + _bits(bits(arena)) + { + } + + + GrowableArrayMetadata(MEMFLAGS memflags) : + _bits(bits(memflags)) + { + } +# 659 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/growableArray.hpp" + bool on_C_heap() const { return (_bits & 1) == 1; } + bool on_resource_area() const { return _bits == 0; } + bool on_arena() const { return (_bits & 1) == 0 && _bits != 0; } + + Arena* arena() const { return (Arena*)_bits; } + MEMFLAGS memflags() const { return MEMFLAGS(_bits >> 1); } +}; +# 684 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/growableArray.hpp" +template +class GrowableArray : public GrowableArrayWithAllocator > { + friend class GrowableArrayWithAllocator >; + friend class GrowableArrayTest; + + static E* allocate(int max) { + return (E*)GrowableArrayResourceAllocator::allocate(max, sizeof(E)); + } + + static E* allocate(int max, MEMFLAGS memflags) { + return (E*)GrowableArrayCHeapAllocator::allocate(max, sizeof(E), memflags); + } + + static E* allocate(int max, Arena* arena) { + return (E*)GrowableArrayArenaAllocator::allocate(max, sizeof(E), arena); + } + + GrowableArrayMetadata _metadata; + + void init_checks() const { } + + + bool on_C_heap() const { return _metadata.on_C_heap(); } + bool on_resource_area() const { return _metadata.on_resource_area(); } + bool on_arena() const { return _metadata.on_arena(); } + + E* allocate() { + if (on_resource_area()) { + ; + return allocate(this->_capacity); + } + + if (on_C_heap()) { + return allocate(this->_capacity, _metadata.memflags()); + } + + ; + return allocate(this->_capacity, _metadata.arena()); + } + + void deallocate(E* mem) { + if (on_C_heap()) { + GrowableArrayCHeapAllocator::deallocate(mem); + } + } + +public: + GrowableArray() : GrowableArray(2 ) {} + + explicit GrowableArray(int initial_capacity) : + GrowableArrayWithAllocator >( + allocate(initial_capacity), + initial_capacity), + _metadata() { + init_checks(); + } + + GrowableArray(int initial_capacity, MEMFLAGS memflags) : + GrowableArrayWithAllocator >( + allocate(initial_capacity, memflags), + initial_capacity), + _metadata(memflags) { + init_checks(); + } + + GrowableArray(int initial_capacity, int initial_len, const E& filler) : + GrowableArrayWithAllocator >( + allocate(initial_capacity), + initial_capacity, initial_len, filler), + _metadata() { + init_checks(); + } + + GrowableArray(int initial_capacity, int initial_len, const E& filler, MEMFLAGS memflags) : + GrowableArrayWithAllocator >( + allocate(initial_capacity, memflags), + initial_capacity, initial_len, filler), + _metadata(memflags) { + init_checks(); + } + + GrowableArray(Arena* arena, int initial_capacity, int initial_len, const E& filler) : + GrowableArrayWithAllocator >( + allocate(initial_capacity, arena), + initial_capacity, initial_len, filler), + _metadata(arena) { + init_checks(); + } + + ~GrowableArray() { + if (on_C_heap()) { + this->clear_and_deallocate(); + } + } +}; + + +template +class GrowableArrayCHeap : public GrowableArrayWithAllocator > { + friend class GrowableArrayWithAllocator >; + + static_assert((F != mtNone), "F != mtNone"); + + static E* allocate(int max, MEMFLAGS flags) { + if (max == 0) { + return nullptr; + } + + return (E*)GrowableArrayCHeapAllocator::allocate(max, sizeof(E), flags); + } + + GrowableArrayCHeap(GrowableArrayCHeap const&) = delete; GrowableArrayCHeap& operator=(GrowableArrayCHeap const&) = delete; + + E* allocate() { + return allocate(this->_capacity, F); + } + + void deallocate(E* mem) { + GrowableArrayCHeapAllocator::deallocate(mem); + } + +public: + GrowableArrayCHeap(int initial_capacity = 0) : + GrowableArrayWithAllocator >( + allocate(initial_capacity, F), + initial_capacity) {} + + GrowableArrayCHeap(int initial_capacity, int initial_len, const E& filler) : + GrowableArrayWithAllocator >( + allocate(initial_capacity, F), + initial_capacity, initial_len, filler) {} + + ~GrowableArrayCHeap() { + this->clear_and_deallocate(); + } + + void* operator new(size_t size) { + return AnyObj::operator new(size, F); + } + + void* operator new(size_t size, const std::nothrow_t& nothrow_constant) throw() { + return AnyObj::operator new(size, nothrow_constant, F); + } + void operator delete(void *p) { + AnyObj::operator delete(p); + } +}; + + + +template +class GrowableArrayIterator : public StackObj { + friend class GrowableArrayView; + template friend class GrowableArrayFilterIterator; + + private: + const GrowableArrayView* _array; + int _position; + + + GrowableArrayIterator(const GrowableArrayView* array, int position) : _array(array), _position(position) { + ; + } + + public: + GrowableArrayIterator() : _array(nullptr), _position(0) { } + GrowableArrayIterator& operator++() { ++_position; return *this; } + E operator*() { return _array->at(_position); } + + bool operator==(const GrowableArrayIterator& rhs) { + ; + return _position == rhs._position; + } + + bool operator!=(const GrowableArrayIterator& rhs) { + ; + return _position != rhs._position; + } +}; + + +template +class GrowableArrayFilterIterator : public StackObj { + friend class GrowableArrayView; + + private: + const GrowableArrayView* _array; + int _position; + UnaryPredicate _predicate; + + public: + GrowableArrayFilterIterator(const GrowableArrayIterator& begin, UnaryPredicate filter_predicate) : + _array(begin._array), _position(begin._position), _predicate(filter_predicate) { + + while(_position != _array->length() && !_predicate(_array->at(_position))) { + ++_position; + } + } + + GrowableArrayFilterIterator& operator++() { + do { + + ++_position; + } while(_position != _array->length() && !_predicate(_array->at(_position))); + return *this; + } + + E operator*() { return _array->at(_position); } + + bool operator==(const GrowableArrayIterator& rhs) { + ; + return _position == rhs._position; + } + + bool operator!=(const GrowableArrayIterator& rhs) { + ; + return _position != rhs._position; + } + + bool operator==(const GrowableArrayFilterIterator& rhs) { + ; + return _position == rhs._position; + } + + bool operator!=(const GrowableArrayFilterIterator& rhs) { + ; + return _position != rhs._position; + } +}; + + +typedef GrowableArray intArray; +typedef GrowableArray intStack; +typedef GrowableArray boolArray; +# 36 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/vm_version_riscv.hpp" 2 + + +class RiscvHwprobe; + +class VM_Version : public Abstract_VM_Version { + friend RiscvHwprobe; + private: + class RVFeatureValue { + const char* const _pretty; + const bool _feature_string; + const uint64_t _feature_bit; + bool _enabled; + int64_t _value; + public: + RVFeatureValue(const char* pretty, int bit_num, bool fstring) : + _pretty(pretty), _feature_string(fstring), _feature_bit((((bit_num) >= BitsPerWord) ? 0 : (OneBit << (bit_num)))), + _enabled(false), _value(-1) { + } + void enable_feature(int64_t value = 0) { + _enabled = true; + _value = value; + } + const char* pretty() { return _pretty; } + uint64_t feature_bit() { return _feature_bit; } + bool feature_string() { return _feature_string; } + bool enabled() { return _enabled; } + int64_t value() { return _value; } + virtual void update_flag() = 0; + }; +# 153 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/vm_version_riscv.hpp" + struct ext_IRVFeatureValue : public RVFeatureValue { ext_IRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static ext_IRVFeatureValue ext_I; struct ext_MRVFeatureValue : public RVFeatureValue { ext_MRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static ext_MRVFeatureValue ext_M; struct ext_ARVFeatureValue : public RVFeatureValue { ext_ARVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static ext_ARVFeatureValue ext_A; struct ext_FRVFeatureValue : public RVFeatureValue { ext_FRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static ext_FRVFeatureValue ext_F; struct ext_DRVFeatureValue : public RVFeatureValue { ext_DRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static ext_DRVFeatureValue ext_D; struct ext_CRVFeatureValue : public RVFeatureValue { ext_CRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() { ; if ((JVMFlag::is_default(Flag_UseRVC_enum))) { ((UseRVC) = (true)); } }; }; static ext_CRVFeatureValue ext_C; struct ext_QRVFeatureValue : public RVFeatureValue { ext_QRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static ext_QRVFeatureValue ext_Q; struct ext_HRVFeatureValue : public RVFeatureValue { ext_HRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static ext_HRVFeatureValue ext_H; struct ext_VRVFeatureValue : public RVFeatureValue { ext_VRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() { ; if ((JVMFlag::is_default(Flag_UseRVV_enum))) { ((UseRVV) = (true)); } }; }; static ext_VRVFeatureValue ext_V; struct ext_ZicbomRVFeatureValue : public RVFeatureValue { ext_ZicbomRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() { ; if ((JVMFlag::is_default(Flag_UseZicbom_enum))) { ((UseZicbom) = (true)); } }; }; static ext_ZicbomRVFeatureValue ext_Zicbom; struct ext_ZicbozRVFeatureValue : public RVFeatureValue { ext_ZicbozRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() { ; if ((JVMFlag::is_default(Flag_UseZicboz_enum))) { ((UseZicboz) = (true)); } }; }; static ext_ZicbozRVFeatureValue ext_Zicboz; struct ext_ZicbopRVFeatureValue : public RVFeatureValue { ext_ZicbopRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() { ; if ((JVMFlag::is_default(Flag_UseZicbop_enum))) { ((UseZicbop) = (true)); } }; }; static ext_ZicbopRVFeatureValue ext_Zicbop; struct ext_ZbaRVFeatureValue : public RVFeatureValue { ext_ZbaRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() { ; if ((JVMFlag::is_default(Flag_UseZba_enum))) { ((UseZba) = (true)); } }; }; static ext_ZbaRVFeatureValue ext_Zba; struct ext_ZbbRVFeatureValue : public RVFeatureValue { ext_ZbbRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() { ; if ((JVMFlag::is_default(Flag_UseZbb_enum))) { ((UseZbb) = (true)); } }; }; static ext_ZbbRVFeatureValue ext_Zbb; struct ext_ZbcRVFeatureValue : public RVFeatureValue { ext_ZbcRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static ext_ZbcRVFeatureValue ext_Zbc; struct ext_ZbsRVFeatureValue : public RVFeatureValue { ext_ZbsRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() { ; if ((JVMFlag::is_default(Flag_UseZbs_enum))) { ((UseZbs) = (true)); } }; }; static ext_ZbsRVFeatureValue ext_Zbs; struct ext_ZicsrRVFeatureValue : public RVFeatureValue { ext_ZicsrRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static ext_ZicsrRVFeatureValue ext_Zicsr; struct ext_ZifenceiRVFeatureValue : public RVFeatureValue { ext_ZifenceiRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static ext_ZifenceiRVFeatureValue ext_Zifencei; struct ext_Zic64bRVFeatureValue : public RVFeatureValue { ext_Zic64bRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() { ; if ((JVMFlag::is_default(Flag_UseZic64b_enum))) { ((UseZic64b) = (true)); } }; }; static ext_Zic64bRVFeatureValue ext_Zic64b; struct ext_ZtsoRVFeatureValue : public RVFeatureValue { ext_ZtsoRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() { ; if ((JVMFlag::is_default(Flag_UseZtso_enum))) { ((UseZtso) = (true)); } }; }; static ext_ZtsoRVFeatureValue ext_Ztso; struct ext_ZihintpauseRVFeatureValue : public RVFeatureValue { ext_ZihintpauseRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() { ; if ((JVMFlag::is_default(Flag_UseZihintpause_enum))) { ((UseZihintpause) = (true)); } }; }; static ext_ZihintpauseRVFeatureValue ext_Zihintpause; struct mvendoridRVFeatureValue : public RVFeatureValue { mvendoridRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static mvendoridRVFeatureValue mvendorid; struct marchidRVFeatureValue : public RVFeatureValue { marchidRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static marchidRVFeatureValue marchid; struct mimpidRVFeatureValue : public RVFeatureValue { mimpidRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static mimpidRVFeatureValue mimpid; struct unaligned_accessRVFeatureValue : public RVFeatureValue { unaligned_accessRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static unaligned_accessRVFeatureValue unaligned_access; struct satp_modeRVFeatureValue : public RVFeatureValue { satp_modeRVFeatureValue(const char* pretty, int bit, bool fstring) : RVFeatureValue(pretty, bit, fstring) {} void update_flag() {}; }; static satp_modeRVFeatureValue satp_mode; + + + + enum VM_MODE : int { + VM_NOTSET = -1, + VM_MBARE = 0, + VM_SV39 = 39, + VM_SV48 = 48, + VM_SV57 = 57, + VM_SV64 = 64 + }; + + static VM_MODE parse_satp_mode(const char* vm_mode); + + + enum UNALIGNED_ACCESS : int { + MISALIGNED_UNKNOWN = 0, + MISALIGNED_EMULATED = 1, + MISALIGNED_SLOW = 2, + MISALIGNED_FAST = 3, + MISALIGNED_UNSUPPORTED = 4 + }; + + + static RVFeatureValue* _feature_list[]; + + + static void setup_cpu_available_features(); + + static void os_aux_features(); + static char* os_uarch_additional_features(); + static void vendor_features(); + + static void rivos_features(); + + + static uint32_t cpu_vector_length(); + static uint32_t _initial_vector_length; + + + static void c2_initialize(); + + + public: + + static void initialize(); + static void initialize_cpu_information(); + + constexpr static bool supports_stack_watermark_barrier() { return true; } + + static bool supports_on_spin_wait() { return UseZihintpause; } +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/vm_version.hpp" 2 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/orderAccess.hpp" 2 +# 238 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/orderAccess.hpp" +class OrderAccess : public AllStatic { + public: + + static void loadload(); + static void storestore(); + static void loadstore(); + static void storeload(); + + static void acquire(); + static void release(); + static void fence(); + + static void cross_modify_fence() { + cross_modify_fence_impl(); + cross_modify_fence_verify(); + } + + + + + static void loadload_for_IRIW() { + + + + loadload(); + + } +private: + + + + static void StubRoutines_fence(); + + static void cross_modify_fence_impl(); + + static void cross_modify_fence_verify() {}; +}; + +# 1 "/home/rehn/source/jdk/open/src/hotspot/os_cpu/linux_riscv/orderAccess_linux_riscv.hpp" 1 +# 35 "/home/rehn/source/jdk/open/src/hotspot/os_cpu/linux_riscv/orderAccess_linux_riscv.hpp" +inline void OrderAccess::loadload() { acquire(); } +inline void OrderAccess::storestore() { release(); } +inline void OrderAccess::loadstore() { acquire(); } +inline void OrderAccess::storeload() { fence(); } + + + + + +inline void OrderAccess::acquire() { + __atomic_thread_fence(2);; +} + +inline void OrderAccess::release() { + __atomic_thread_fence(3);; +} + +inline void OrderAccess::fence() { + __sync_synchronize(); +} + +inline void OrderAccess::cross_modify_fence_impl() { +} +# 277 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/orderAccess.hpp" 2 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" 2 + + + + + + +enum atomic_memory_order { + + + memory_order_relaxed = 0, + memory_order_acquire = 2, + memory_order_release = 3, + memory_order_acq_rel = 4, + memory_order_seq_cst = 5, + + memory_order_conservative = 8 +}; + +enum ScopedFenceType { + X_ACQUIRE + , RELEASE_X + , RELEASE_X_FENCE +}; + +class Atomic : AllStatic { +public: +# 80 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" + template + inline static void store(volatile D* dest, T store_value); + + template + inline static void release_store(volatile D* dest, T store_value); + + template + inline static void release_store_fence(volatile D* dest, T store_value); + + + + + template + inline static T load(const volatile T* dest); + + template + inline static T load_acquire(const volatile T* dest); + + + + + + template + inline static D add(D volatile* dest, I add_value, + atomic_memory_order order = memory_order_conservative); + + + template + inline static D fetch_then_add(D volatile* dest, I add_value, + atomic_memory_order order = memory_order_conservative); + + template + inline static D sub(D volatile* dest, I sub_value, + atomic_memory_order order = memory_order_conservative); + + + + + + + template + inline static void inc(D volatile* dest, + atomic_memory_order order = memory_order_conservative); + + + + + + + template + inline static void dec(D volatile* dest, + atomic_memory_order order = memory_order_conservative); + + + + + + + + template + inline static D xchg(volatile D* dest, T exchange_value, + atomic_memory_order order = memory_order_conservative); + + + + + + + template + inline static D cmpxchg(D volatile* dest, + U compare_value, + T exchange_value, + atomic_memory_order order = memory_order_conservative); + + + + + + + template + inline static bool replace_if_null(D* volatile* dest, T* value, + atomic_memory_order order = memory_order_conservative); +# 177 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" + template + static T fetch_then_and(volatile T* dest, T bits, + atomic_memory_order order = memory_order_conservative) { + static_assert(std::is_integral::value, "bitop with non-integral type"); + return PlatformBitops().fetch_then_and(dest, bits, order); + } + + + + + + template + static T fetch_then_or(volatile T* dest, T bits, + atomic_memory_order order = memory_order_conservative) { + static_assert(std::is_integral::value, "bitop with non-integral type"); + return PlatformBitops().fetch_then_or(dest, bits, order); + } + + + + + + template + static T fetch_then_xor(volatile T* dest, T bits, + atomic_memory_order order = memory_order_conservative) { + static_assert(std::is_integral::value, "bitop with non-integral type"); + return PlatformBitops().fetch_then_xor(dest, bits, order); + } + + + + + + template + static T and_then_fetch(volatile T* dest, T bits, + atomic_memory_order order = memory_order_conservative) { + static_assert(std::is_integral::value, "bitop with non-integral type"); + return PlatformBitops().and_then_fetch(dest, bits, order); + } + + + + + + template + static T or_then_fetch(volatile T* dest, T bits, + atomic_memory_order order = memory_order_conservative) { + static_assert(std::is_integral::value, "bitop with non-integral type"); + return PlatformBitops().or_then_fetch(dest, bits, order); + } + + + + + + template + static T xor_then_fetch(volatile T* dest, T bits, + atomic_memory_order order = memory_order_conservative) { + static_assert(std::is_integral::value, "bitop with non-integral type"); + return PlatformBitops().xor_then_fetch(dest, bits, order); + } + +private: + + + + + template struct IsPointerConvertible; + +protected: + + + + template + struct StoreImpl; +# 273 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" + template struct PlatformStore; + + + + + template + struct LoadImpl; +# 296 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" + template struct PlatformLoad; + + + template struct PlatformOrderedStore; + template struct PlatformOrderedLoad; + +private: + + + + template + struct AddImpl; +# 346 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" + template struct PlatformAdd; +# 357 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" + template + static D add_using_helper(Fn fn, D volatile* dest, I add_value); + + + + + + template + struct CmpxchgImpl; +# 386 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" + template struct PlatformCmpxchg; +# 395 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" + template + static T cmpxchg_using_helper(Fn fn, + T volatile* dest, + T compare_value, + T exchange_value); + + + + +public: + struct CmpxchgByteUsingInt; +private: + + + + + + template + struct XchgImpl; +# 433 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" + template struct PlatformXchg; +# 442 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" + template + static T xchg_using_helper(Fn fn, + T volatile* dest, + T exchange_value); +# 478 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" + template class PlatformBitops; + + + class PrefetchBitopsUsingCmpxchg; + class PostfetchBitopsUsingCmpxchg; + class PostfetchBitopsUsingPrefetch; +}; + +template +struct Atomic::IsPointerConvertible : AllStatic { + + + typedef char yes; + typedef char (&no)[2]; + + static yes test(To*); + static no test(...); + static From* test_value; + + static const bool value = (sizeof(yes) == sizeof(test(test_value))); +}; + + +template +struct Atomic::LoadImpl< + T, + PlatformOp, + typename EnableIf::value || std::is_pointer::value>::type> +{ + T operator()(T const volatile* dest) const { + + return PlatformOp()(dest); + } +}; +# 520 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" +template +struct Atomic::LoadImpl< + T, + PlatformOp, + typename EnableIf::value>::type> +{ + T operator()(T const volatile* dest) const { + typedef PrimitiveConversions::Translate Translator; + typedef typename Translator::Decayed Decayed; + static_assert((sizeof(T) == sizeof(Decayed)), "sizeof(T) == sizeof(Decayed)"); + Decayed result = PlatformOp()(reinterpret_cast(dest)); + return Translator::recover(result); + } +}; + + + + + + + +template +struct Atomic::PlatformLoad { + template + T operator()(T const volatile* dest) const { + static_assert((sizeof(T) <= sizeof(void*)), "sizeof(T) <= sizeof(void*)"); + return *dest; + } +}; + + + + +template +struct Atomic::StoreImpl< + T, T, + PlatformOp, + typename EnableIf::value>::type> +{ + void operator()(T volatile* dest, T new_value) const { + + PlatformOp()(dest, new_value); + } +}; + + + + + + +template +struct Atomic::StoreImpl< + D*, T*, + PlatformOp, + typename EnableIf::value>::type> +{ + void operator()(D* volatile* dest, T* new_value) const { + + D* value = new_value; + PlatformOp()(dest, value); + } +}; + + + + + + + +template +struct Atomic::StoreImpl< + T, T, + PlatformOp, + typename EnableIf::value>::type> +{ + void operator()(T volatile* dest, T new_value) const { + typedef PrimitiveConversions::Translate Translator; + typedef typename Translator::Decayed Decayed; + static_assert((sizeof(T) == sizeof(Decayed)), "sizeof(T) == sizeof(Decayed)"); + PlatformOp()(reinterpret_cast(dest), + Translator::decay(new_value)); + } +}; + + + + + + + +template +struct Atomic::PlatformStore { + template + void operator()(T volatile* dest, + T new_value) const { + static_assert((sizeof(T) <= sizeof(void*)), "sizeof(T) <= sizeof(void*)"); + (void)const_cast(*dest = new_value); + } +}; + +template +inline void Atomic::inc(D volatile* dest, atomic_memory_order order) { + static_assert((std::is_pointer::value || std::is_integral::value), "std::is_pointer::value || std::is_integral::value"); + using I = std::conditional_t::value, ptrdiff_t, D>; + Atomic::add(dest, I(1), order); +} + +template +inline void Atomic::dec(D volatile* dest, atomic_memory_order order) { + static_assert((std::is_pointer::value || std::is_integral::value), "std::is_pointer::value || std::is_integral::value"); + using I = std::conditional_t::value, ptrdiff_t, D>; + +#pragma warning(suppress: 4146) + Atomic::add(dest, I(-1), order); +} + +template +inline D Atomic::sub(D volatile* dest, I sub_value, atomic_memory_order order) { + static_assert((std::is_pointer::value || std::is_integral::value), "std::is_pointer::value || std::is_integral::value"); + static_assert((std::is_integral::value), "std::is_integral::value"); + + + using PI = std::conditional_t::value, intptr_t, uintptr_t>; + using AddendType = std::conditional_t::value, PI, D>; + + static_assert((std::is_signed::value == std::is_signed::value), "std::is_signed::value == std::is_signed::value"); + static_assert((sizeof(I) <= sizeof(AddendType)), "sizeof(I) <= sizeof(AddendType)"); + AddendType addend = sub_value; + +#pragma warning(suppress: 4146) + return Atomic::add(dest, -addend, order); +} + + + + + + +template +struct Atomic::PlatformCmpxchg { + template + T operator()(T volatile* dest, + T compare_value, + T exchange_value, + atomic_memory_order order) const; +}; + + + + +struct Atomic::CmpxchgByteUsingInt { + static uint8_t get_byte_in_int(uint32_t n, uint32_t idx); + static uint32_t set_byte_in_int(uint32_t n, uint8_t b, uint32_t idx); + template + T operator()(T volatile* dest, + T compare_value, + T exchange_value, + atomic_memory_order order) const; +}; + + + + + + +template +struct Atomic::PlatformXchg { + template + T operator()(T volatile* dest, + T exchange_value, + atomic_memory_order order) const; +}; + + +class Atomic::PrefetchBitopsUsingCmpxchg { + template + T bitop(T volatile* dest, atomic_memory_order order, Op operation) const { + T old_value; + T new_value; + T fetched_value = Atomic::load(dest); + do { + old_value = fetched_value; + new_value = operation(old_value); + fetched_value = Atomic::cmpxchg(dest, old_value, new_value, order); + } while (old_value != fetched_value); + return fetched_value; + } + +public: + template + T fetch_then_and(T volatile* dest, T bits, atomic_memory_order order) const { + return bitop(dest, order, [&](T value) -> T { return value & bits; }); + } + + template + T fetch_then_or(T volatile* dest, T bits, atomic_memory_order order) const { + return bitop(dest, order, [&](T value) -> T { return value | bits; }); + } + + template + T fetch_then_xor(T volatile* dest, T bits, atomic_memory_order order) const { + return bitop(dest, order, [&](T value) -> T { return value ^ bits; }); + } +}; + + +class Atomic::PostfetchBitopsUsingCmpxchg { + template + T bitop(T volatile* dest, atomic_memory_order order, Op operation) const { + T old_value; + T new_value; + T fetched_value = Atomic::load(dest); + do { + old_value = fetched_value; + new_value = operation(old_value); + fetched_value = Atomic::cmpxchg(dest, old_value, new_value, order); + } while (old_value != fetched_value); + return new_value; + } + +public: + template + T and_then_fetch(T volatile* dest, T bits, atomic_memory_order order) const { + return bitop(dest, order, [&](T value) -> T { return value & bits; }); + } + + template + T or_then_fetch(T volatile* dest, T bits, atomic_memory_order order) const { + return bitop(dest, order, [&](T value) -> T { return value | bits; }); + } + + template + T xor_then_fetch(T volatile* dest, T bits, atomic_memory_order order) const { + return bitop(dest, order, [&](T value) -> T { return value ^ bits; }); + } +}; + + + +class Atomic::PostfetchBitopsUsingPrefetch { +public: + template + T and_then_fetch(T volatile* dest, T bits, atomic_memory_order order) const { + return bits & Atomic::fetch_then_and(dest, bits, order); + } + + template + T or_then_fetch(T volatile* dest, T bits, atomic_memory_order order) const { + return bits | Atomic::fetch_then_or(dest, bits, order); + } + + template + T xor_then_fetch(T volatile* dest, T bits, atomic_memory_order order) const { + return bits ^ Atomic::fetch_then_xor(dest, bits, order); + } +}; + + + + +template +class Atomic::PlatformBitops + : public PrefetchBitopsUsingCmpxchg, + public PostfetchBitopsUsingCmpxchg +{}; + +template +class ScopedFenceGeneral: public StackObj { + public: + void prefix() {} + void postfix() {} +}; + + + + + +template<> inline void ScopedFenceGeneral::postfix() { OrderAccess::acquire(); } +template<> inline void ScopedFenceGeneral::prefix() { OrderAccess::release(); } +template<> inline void ScopedFenceGeneral::prefix() { OrderAccess::release(); } +template<> inline void ScopedFenceGeneral::postfix() { OrderAccess::fence(); } + +template +class ScopedFence : public ScopedFenceGeneral { + void *const _field; + public: + ScopedFence(void *const field) : _field(field) { prefix(); } + ~ScopedFence() { postfix(); } + void prefix() { ScopedFenceGeneral::prefix(); } + void postfix() { ScopedFenceGeneral::postfix(); } +}; + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/os_cpu/linux_riscv/atomic_linux_riscv.hpp" 1 +# 36 "/home/rehn/source/jdk/open/src/hotspot/os_cpu/linux_riscv/atomic_linux_riscv.hpp" +template +struct Atomic::PlatformAdd { + template + D add_then_fetch(D volatile* dest, I add_value, atomic_memory_order order) const { + if (order != memory_order_relaxed) { + __sync_synchronize(); + } + + D res = __atomic_add_fetch(dest, add_value, 0); + + if (order != memory_order_relaxed) { + __sync_synchronize(); + } + return res; + } + + template + D fetch_then_add(D volatile* dest, I add_value, atomic_memory_order order) const { + return add_then_fetch(dest, add_value, order) - add_value; + } +}; + +template +template +inline T Atomic::PlatformXchg::operator()(T volatile* dest, + T exchange_value, + atomic_memory_order order) const { + static_assert((byte_size == sizeof(T)), "byte_size == sizeof(T)"); + if (order != memory_order_relaxed) { + __sync_synchronize(); + } + + T res = __atomic_exchange_n(dest, exchange_value, 0); + + if (order != memory_order_relaxed) { + __sync_synchronize(); + } + return res; +} + + +template +template +inline T Atomic::PlatformCmpxchg::operator()(T volatile* dest __attribute__((unused)), + T compare_value, + T exchange_value, + atomic_memory_order order) const { + static_assert((byte_size == sizeof(T)), "byte_size == sizeof(T)"); + if (order != memory_order_relaxed) { + __sync_synchronize(); + } + + __atomic_compare_exchange(dest, &compare_value, &exchange_value, false, + 0, 0); + + if (order != memory_order_relaxed) { + __sync_synchronize(); + } + return compare_value; +} + +template +struct Atomic::PlatformOrderedLoad +{ + template + T operator()(const volatile T* p) const { T data; __atomic_load(const_cast(p), &data, 2); return data; } +}; + +template +struct Atomic::PlatformOrderedStore +{ + template + void operator()(volatile T* p, T v) const { __atomic_store(const_cast(p), &v, 3); } +}; + +template +struct Atomic::PlatformOrderedStore +{ + template + void operator()(volatile T* p, T v) const { release_store(p, v); OrderAccess::fence(); } +}; +# 815 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" 2 +# 823 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" +template +inline T Atomic::load(const volatile T* dest) { + return LoadImpl >()(dest); +} + +template +struct Atomic::PlatformOrderedLoad { + template + T operator()(const volatile T* p) const { + ScopedFence f((void*)p); + return Atomic::load(p); + } +}; + +template +inline T Atomic::load_acquire(const volatile T* p) { + return LoadImpl >()(p); +} + +template +inline void Atomic::store(volatile D* dest, T store_value) { + StoreImpl >()(dest, store_value); +} + +template +struct Atomic::PlatformOrderedStore { + template + void operator()(volatile T* p, T v) const { + ScopedFence f((void*)p); + Atomic::store(p, v); + } +}; + +template +inline void Atomic::release_store(volatile D* p, T v) { + StoreImpl >()(p, v); +} + +template +inline void Atomic::release_store_fence(volatile D* p, T v) { + StoreImpl >()(p, v); +} + +template +inline D Atomic::add(D volatile* dest, I add_value, + atomic_memory_order order) { + return AddImpl::add_then_fetch(dest, add_value, order); +} + +template +inline D Atomic::fetch_then_add(D volatile* dest, I add_value, + atomic_memory_order order) { + return AddImpl::fetch_then_add(dest, add_value, order); +} + +template +struct Atomic::AddImpl< + D, I, + typename EnableIf::value && + std::is_integral::value && + (sizeof(I) <= sizeof(D)) && + (std::is_signed::value == std::is_signed::value)>::type> +{ + static D add_then_fetch(D volatile* dest, I add_value, atomic_memory_order order) { + D addend = add_value; + return PlatformAdd().add_then_fetch(dest, addend, order); + } + static D fetch_then_add(D volatile* dest, I add_value, atomic_memory_order order) { + D addend = add_value; + return PlatformAdd().fetch_then_add(dest, addend, order); + } +}; + +template +struct Atomic::AddImpl< + P*, I, + typename EnableIf::value && (sizeof(I) <= sizeof(P*))>::type> +{ + static_assert((sizeof(intptr_t) == sizeof(P*)), "sizeof(intptr_t) == sizeof(P*)"); + static_assert((sizeof(uintptr_t) == sizeof(P*)), "sizeof(uintptr_t) == sizeof(P*)"); + + + + using SI = std::conditional_t::value, intptr_t, uintptr_t>; + + + using UP = const char*; + + + static SI scale_addend(SI add_value) { + return add_value * SI(sizeof(P)); + } + + + + + + + static UP volatile* unscale_dest(P* volatile* dest) { + return (UP volatile*) dest; + } + + + static P* scale_result(UP result) { + return (P*) result; + } + + static P* add_then_fetch(P* volatile* dest, I addend, atomic_memory_order order) { + return scale_result(PlatformAdd().add_then_fetch(unscale_dest(dest), + scale_addend(addend), + order)); + } + + static P* fetch_then_add(P* volatile* dest, I addend, atomic_memory_order order) { + return scale_result(PlatformAdd().fetch_then_add(unscale_dest(dest), + scale_addend(addend), + order)); + } +}; + +template +inline D Atomic::add_using_helper(Fn fn, D volatile* dest, I add_value) { + return PrimitiveConversions::cast( + fn(PrimitiveConversions::cast(add_value), + reinterpret_cast(dest))); +} + +template +inline D Atomic::cmpxchg(D volatile* dest, + U compare_value, + T exchange_value, + atomic_memory_order order) { + return CmpxchgImpl()(dest, compare_value, exchange_value, order); +} + +template +inline bool Atomic::replace_if_null(D* volatile* dest, T* value, + atomic_memory_order order) { + + + + D* expected_null = nullptr; + return expected_null == cmpxchg(dest, expected_null, value, order); +} + + + + +template +struct Atomic::CmpxchgImpl< + T, T, T, + typename EnableIf::value>::type> +{ + T operator()(T volatile* dest, T compare_value, T exchange_value, + atomic_memory_order order) const { + + return PlatformCmpxchg()(dest, + compare_value, + exchange_value, + order); + } +}; +# 995 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" +template +struct Atomic::CmpxchgImpl< + D*, U*, T*, + typename EnableIf::value && + std::is_same, + std::remove_cv_t>::value>::type> +{ + D* operator()(D* volatile* dest, U* compare_value, T* exchange_value, + atomic_memory_order order) const { + + D* new_value = exchange_value; + + + D* old_value = const_cast(compare_value); + return PlatformCmpxchg()(dest, old_value, new_value, order); + } +}; +# 1020 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" +template +struct Atomic::CmpxchgImpl< + T, T, T, + typename EnableIf::value>::type> +{ + T operator()(T volatile* dest, T compare_value, T exchange_value, + atomic_memory_order order) const { + typedef PrimitiveConversions::Translate Translator; + typedef typename Translator::Decayed Decayed; + static_assert((sizeof(T) == sizeof(Decayed)), "sizeof(T) == sizeof(Decayed)"); + return Translator::recover( + cmpxchg(reinterpret_cast(dest), + Translator::decay(compare_value), + Translator::decay(exchange_value), + order)); + } +}; + +template +inline T Atomic::cmpxchg_using_helper(Fn fn, + T volatile* dest, + T compare_value, + T exchange_value) { + static_assert((sizeof(Type) == sizeof(T)), "sizeof(Type) == sizeof(T)"); + return PrimitiveConversions::cast( + fn(PrimitiveConversions::cast(exchange_value), + reinterpret_cast(dest), + PrimitiveConversions::cast(compare_value))); +} + +inline uint32_t Atomic::CmpxchgByteUsingInt::set_byte_in_int(uint32_t n, + uint8_t b, + uint32_t idx) { + uint32_t bitsIdx = BitsPerByte * idx; + return (n & ~(static_cast(0xff) << bitsIdx)) + | (static_cast(b) << bitsIdx); +} + +inline uint8_t Atomic::CmpxchgByteUsingInt::get_byte_in_int(uint32_t n, + uint32_t idx) { + uint32_t bitsIdx = BitsPerByte * idx; + return (uint8_t)(n >> bitsIdx); +} + +template +inline T Atomic::CmpxchgByteUsingInt::operator()(T volatile* dest, + T compare_value, + T exchange_value, + atomic_memory_order order) const { + static_assert((sizeof(T) == sizeof(uint8_t)), "sizeof(T) == sizeof(uint8_t)"); + uint8_t canon_exchange_value = exchange_value; + uint8_t canon_compare_value = compare_value; + volatile uint32_t* aligned_dest + = reinterpret_cast(align_down(dest, sizeof(uint32_t))); + size_t offset = pointer_delta(dest, aligned_dest, 1); + + uint32_t idx = (Endian::NATIVE == Endian::BIG) + ? (sizeof(uint32_t) - 1 - offset) + : offset; + + + + uint32_t cur = set_byte_in_int(Atomic::load(aligned_dest), canon_compare_value, idx); + + + + do { + + + uint32_t new_value = set_byte_in_int(cur, canon_exchange_value, idx); + + uint32_t res = cmpxchg(aligned_dest, cur, new_value, order); + if (res == cur) break; + + + + cur = res; + + } while (get_byte_in_int(cur, idx) == canon_compare_value); + + return PrimitiveConversions::cast(get_byte_in_int(cur, idx)); +} + + + + +template +struct Atomic::XchgImpl< + T, T, + typename EnableIf::value>::type> +{ + T operator()(T volatile* dest, T exchange_value, atomic_memory_order order) const { + + return PlatformXchg()(dest, exchange_value, order); + } +}; + + + + + + +template +struct Atomic::XchgImpl< + D*, T*, + typename EnableIf::value>::type> +{ + D* operator()(D* volatile* dest, T* exchange_value, atomic_memory_order order) const { + + D* new_value = exchange_value; + return PlatformXchg()(dest, new_value, order); + } +}; +# 1141 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/atomic.hpp" +template +struct Atomic::XchgImpl< + T, T, + typename EnableIf::value>::type> +{ + T operator()(T volatile* dest, T exchange_value, atomic_memory_order order) const { + typedef PrimitiveConversions::Translate Translator; + typedef typename Translator::Decayed Decayed; + static_assert((sizeof(T) == sizeof(Decayed)), "sizeof(T) == sizeof(Decayed)"); + return Translator::recover( + xchg(reinterpret_cast(dest), + Translator::decay(exchange_value), + order)); + } +}; + +template +inline T Atomic::xchg_using_helper(Fn fn, + T volatile* dest, + T exchange_value) { + static_assert((sizeof(Type) == sizeof(T)), "sizeof(Type) == sizeof(T)"); + + return PrimitiveConversions::cast( + fn(PrimitiveConversions::cast(exchange_value), + reinterpret_cast(dest))); +} + +template +inline D Atomic::xchg(volatile D* dest, T exchange_value, atomic_memory_order order) { + return XchgImpl()(dest, exchange_value, order); +} +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oop.hpp" 2 +# 47 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oop.hpp" +class OopClosure; +class FilteringClosure; + +class PSPromotionManager; +class ParCompactionManager; + +class oopDesc { + friend class VMStructs; + friend class JVMCIVMStructs; + private: + volatile markWord _mark; + union _metadata { + Klass* _klass; + narrowKlass _compressed_klass; + } _metadata; + + + + oopDesc(oopDesc const&) = delete; oopDesc& operator=(oopDesc const&) = delete; + + public: + + oopDesc() = default; + + inline markWord mark() const; + inline markWord mark_acquire() const; + inline markWord* mark_addr() const; + + inline void set_mark(markWord m); + static inline void set_mark(HeapWord* mem, markWord m); + static inline void release_set_mark(HeapWord* mem, markWord m); + + inline void release_set_mark(markWord m); + inline markWord cas_set_mark(markWord new_mark, markWord old_mark); + inline markWord cas_set_mark(markWord new_mark, markWord old_mark, atomic_memory_order order); + + + + inline void init_mark(); + + inline Klass* klass() const; + inline Klass* klass_or_null() const; + inline Klass* klass_or_null_acquire() const; + + inline Klass* klass_raw() const; + + void set_narrow_klass(narrowKlass nk) ; + inline void set_klass(Klass* k); + static inline void release_set_klass(HeapWord* mem, Klass* k); + + + static inline void set_klass_gap(HeapWord* mem, int z); + + + static constexpr int header_size() { return sizeof(oopDesc)/HeapWordSize; } + + + inline bool is_a(Klass* k) const; + + + inline size_t size(); + + + + inline size_t size_given_klass(Klass* klass); + + + inline bool is_instance() const; + inline bool is_instanceRef() const; + inline bool is_stackChunk() const; + inline bool is_array() const; + inline bool is_objArray() const; + inline bool is_typeArray() const; + + + bool is_instance_noinline() const; + bool is_instanceRef_noinline() const; + bool is_stackChunk_noinline() const; + bool is_array_noinline() const; + bool is_objArray_noinline() const; + bool is_typeArray_noinline() const; + + protected: + inline oop as_oop() const { return const_cast(this); } + + public: + template + inline T* field_addr(int offset) const; + + template inline size_t field_offset(T* p) const; + + + + + inline static int compare(oop o1, oop o2) { + void* o1_addr = (void*)o1; + void* o2_addr = (void*)o2; + if (o1_addr < o2_addr) { + return -1; + } else if (o1_addr > o2_addr) { + return 1; + } else { + return 0; + } + } + + + template + oop obj_field_access(int offset) const; + oop obj_field(int offset) const; + + void obj_field_put(int offset, oop value); + void obj_field_put_raw(int offset, oop value); + void obj_field_put_volatile(int offset, oop value); + template + void obj_field_put_access(int offset, oop value); + + Metadata* metadata_field(int offset) const; + void metadata_field_put(int offset, Metadata* value); + + Metadata* metadata_field_acquire(int offset) const; + void release_metadata_field_put(int offset, Metadata* value); + + jbyte byte_field(int offset) const; + void byte_field_put(int offset, jbyte contents); + + jchar char_field(int offset) const; + void char_field_put(int offset, jchar contents); + + jboolean bool_field(int offset) const; + void bool_field_put(int offset, jboolean contents); + jboolean bool_field_volatile(int offset) const; + void bool_field_put_volatile(int offset, jboolean contents); + + jint int_field(int offset) const; + void int_field_put(int offset, jint contents); + + jshort short_field(int offset) const; + void short_field_put(int offset, jshort contents); + + jlong long_field(int offset) const; + void long_field_put(int offset, jlong contents); + + jfloat float_field(int offset) const; + void float_field_put(int offset, jfloat contents); + + jdouble double_field(int offset) const; + void double_field_put(int offset, jdouble contents); + + address address_field(int offset) const; + void address_field_put(int offset, address contents); + + oop obj_field_acquire(int offset) const; + void release_obj_field_put(int offset, oop value); + + jbyte byte_field_acquire(int offset) const; + void release_byte_field_put(int offset, jbyte contents); + + jchar char_field_acquire(int offset) const; + void release_char_field_put(int offset, jchar contents); + + jboolean bool_field_acquire(int offset) const; + void release_bool_field_put(int offset, jboolean contents); + + jint int_field_acquire(int offset) const; + void release_int_field_put(int offset, jint contents); + + jshort short_field_acquire(int offset) const; + void release_short_field_put(int offset, jshort contents); + + jlong long_field_acquire(int offset) const; + void release_long_field_put(int offset, jlong contents); + + jfloat float_field_acquire(int offset) const; + void release_float_field_put(int offset, jfloat contents); + + jdouble double_field_acquire(int offset) const; + void release_double_field_put(int offset, jdouble contents); + + address address_field_acquire(int offset) const; + void release_address_field_put(int offset, address contents); + + + void print_on(outputStream* st) const; + void print_value_on(outputStream* st) const; + void print_address_on(outputStream* st) const; + void print_name_on(outputStream* st) const; + + + void print(); + void print_value(); + void print_address(); + + + char* print_string(); + char* print_value_string(); + + + static void verify_on(outputStream* st, oopDesc* oop_desc); + static void verify(oopDesc* oopDesc); + + + inline bool is_locked() const; + inline bool is_unlocked() const; + + + static bool is_oop(oop obj, bool ignore_mark_word = false); + static bool is_oop_or_null(oop obj, bool ignore_mark_word = false); + + + inline bool is_gc_marked() const; + + + inline bool is_forwarded() const; + + inline void forward_to(oop p); + + + + + + inline oop forward_to_atomic(oop p, markWord compare, atomic_memory_order order = memory_order_conservative); + + inline oop forwardee() const; + + + inline uint age() const; + inline void incr_age(); + + template + inline void oop_iterate(OopClosureType* cl); + + template + inline void oop_iterate(OopClosureType* cl, MemRegion mr); + + template + inline size_t oop_iterate_size(OopClosureType* cl); + + template + inline size_t oop_iterate_size(OopClosureType* cl, MemRegion mr); + + template + inline void oop_iterate_backwards(OopClosureType* cl); + + template + inline void oop_iterate_backwards(OopClosureType* cl, Klass* klass); + + inline static bool is_instanceof_or_null(oop obj, Klass* klass); + + + inline intptr_t identity_hash(); + intptr_t slow_identity_hash(); + inline bool fast_no_hash_check(); + + + inline bool has_displaced_mark() const; + inline markWord displaced_mark() const; + inline void set_displaced_mark(markWord m); + + + inline bool mark_must_be_preserved() const; + inline bool mark_must_be_preserved(markWord m) const; + + static bool has_klass_gap(); + + + static int mark_offset_in_bytes() { return (int)([]() { alignas(16) char space[sizeof (oopDesc)]; oopDesc* dummyObj = (oopDesc*)space; char* c = (char*)(void*)&dummyObj->_mark; return (size_t)(c - space); }()); } + static int klass_offset_in_bytes() { return (int)([]() { alignas(16) char space[sizeof (oopDesc)]; oopDesc* dummyObj = (oopDesc*)space; char* c = (char*)(void*)&dummyObj->_metadata._klass; return (size_t)(c - space); }()); } + static int klass_gap_offset_in_bytes() { + ; + return klass_offset_in_bytes() + sizeof(narrowKlass); + } + + + static void* load_klass_raw(oop obj); + static void* load_oop_raw(oop obj, int offset); + + +}; + + + + + + +static_assert(std::is_trivially_default_constructible::value, "required"); +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/handles.hpp" 2 + + +class InstanceKlass; +class Klass; +class Thread; +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/handles.hpp" +class Handle { + private: + oop* _handle; + + protected: + oop obj() const { return _handle == nullptr ? (oop)nullptr : *_handle; } + oop non_null_obj() const { ; return *_handle; } + + public: + + Handle() { _handle = nullptr; } + inline Handle(Thread* thread, oop obj); + + + oop operator () () const { return obj(); } + oop operator -> () const { return non_null_obj(); } + + bool operator == (oop o) const { return obj() == o; } + bool operator != (oop o) const { return obj() != o; } + bool operator == (const Handle& h) const { return obj() == h.obj(); } + bool operator != (const Handle& h) const { return obj() != h.obj(); } + + + bool is_null() const { return _handle == nullptr; } + bool not_null() const { return _handle != nullptr; } + + + void print() { obj()->print(); } + + + + + Handle(oop *handle, bool dummy) { _handle = handle; } + + + + oop* raw_value() const { return _handle; } + static oop raw_resolve(oop *handle) { return handle == nullptr ? (oop)nullptr : *handle; } + + inline void replace(oop obj); +}; +# 126 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/handles.hpp" +class instanceHandle: public Handle { protected: instanceOop obj() const { return (instanceOop)Handle::obj(); } instanceOop non_null_obj() const { return (instanceOop)Handle::non_null_obj(); } public: instanceHandle () : Handle() {} inline instanceHandle (Thread* thread, instanceOop obj); instanceHandle (oop *handle, bool dummy) : Handle(handle, dummy) {} instanceOop operator () () const { return obj(); } instanceOop operator -> () const { return non_null_obj(); } }; +class stackChunkHandle: public Handle { protected: stackChunkOop obj() const { return (stackChunkOop)Handle::obj(); } stackChunkOop non_null_obj() const { return (stackChunkOop)Handle::non_null_obj(); } public: stackChunkHandle () : Handle() {} inline stackChunkHandle (Thread* thread, stackChunkOop obj); stackChunkHandle (oop *handle, bool dummy) : Handle(handle, dummy) {} stackChunkOop operator () () const { return obj(); } stackChunkOop operator -> () const { return non_null_obj(); } }; +class arrayHandle: public Handle { protected: arrayOop obj() const { return (arrayOop)Handle::obj(); } arrayOop non_null_obj() const { return (arrayOop)Handle::non_null_obj(); } public: arrayHandle () : Handle() {} inline arrayHandle (Thread* thread, arrayOop obj); arrayHandle (oop *handle, bool dummy) : Handle(handle, dummy) {} arrayOop operator () () const { return obj(); } arrayOop operator -> () const { return non_null_obj(); } }; +class objArrayHandle: public Handle { protected: objArrayOop obj() const { return (objArrayOop)Handle::obj(); } objArrayOop non_null_obj() const { return (objArrayOop)Handle::non_null_obj(); } public: objArrayHandle () : Handle() {} inline objArrayHandle (Thread* thread, objArrayOop obj); objArrayHandle (oop *handle, bool dummy) : Handle(handle, dummy) {} objArrayOop operator () () const { return obj(); } objArrayOop operator -> () const { return non_null_obj(); } }; +class typeArrayHandle: public Handle { protected: typeArrayOop obj() const { return (typeArrayOop)Handle::obj(); } typeArrayOop non_null_obj() const { return (typeArrayOop)Handle::non_null_obj(); } public: typeArrayHandle () : Handle() {} inline typeArrayHandle (Thread* thread, typeArrayOop obj); typeArrayHandle (oop *handle, bool dummy) : Handle(handle, dummy) {} typeArrayOop operator () () const { return obj(); } typeArrayOop operator -> () const { return non_null_obj(); } }; +# 174 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/handles.hpp" +class methodHandle; class methodHandle : public StackObj { Method* _value; Thread* _thread; protected: Method* obj() const { return _value; } Method* non_null_obj() const { ; return _value; } public: methodHandle () : _value(nullptr), _thread(nullptr) {} methodHandle (Thread* thread, Method* obj); methodHandle (const methodHandle &h); methodHandle& operator=(const methodHandle &s); ~methodHandle (); void remove(); Method* operator () () const { return obj(); } Method* operator -> () const { return non_null_obj(); } bool operator == (Method* o) const { return obj() == o; } bool operator == (const methodHandle& h) const { return obj() == h.obj(); } bool is_null() const { return _value == nullptr; } bool not_null() const { return _value != nullptr; } }; +class constantPoolHandle; class constantPoolHandle : public StackObj { ConstantPool* _value; Thread* _thread; protected: ConstantPool* obj() const { return _value; } ConstantPool* non_null_obj() const { ; return _value; } public: constantPoolHandle () : _value(nullptr), _thread(nullptr) {} constantPoolHandle (Thread* thread, ConstantPool* obj); constantPoolHandle (const constantPoolHandle &h); constantPoolHandle& operator=(const constantPoolHandle &s); ~constantPoolHandle (); void remove(); ConstantPool* operator () () const { return obj(); } ConstantPool* operator -> () const { return non_null_obj(); } bool operator == (ConstantPool* o) const { return obj() == o; } bool operator == (const constantPoolHandle& h) const { return obj() == h.obj(); } bool is_null() const { return _value == nullptr; } bool not_null() const { return _value != nullptr; } }; + + + +class HandleArea: public Arena { + friend class HandleMark; + friend class NoHandleMark; + friend class ResetNoHandleMark; + + + + + HandleArea* _prev; + public: + + HandleArea(HandleArea* prev) : Arena(mtThread, Chunk::tiny_size) { + ; + ; + _prev = prev; + } + + + private: + oop* real_allocate_handle(oop obj) { + oop* handle = (oop*)internal_amalloc(oopSize); + *handle = obj; + return handle; + } + public: + + + + + oop* allocate_handle(oop obj) { return real_allocate_handle(obj); } + oop* allocate_null_handle() { return allocate_handle(nullptr); } + + + + void oops_do(OopClosure* f); + + +}; +# 241 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/handles.hpp" +class HandleMark { + private: + Thread *_thread; + HandleArea *_area; + Chunk *_chunk; + char *_hwm, *_max; + size_t _size_in_bytes; + + HandleMark* _previous_handle_mark; + + void initialize(Thread* thread); + void set_previous_handle_mark(HandleMark* mark) { _previous_handle_mark = mark; } + HandleMark* previous_handle_mark() const { return _previous_handle_mark; } + + size_t size_in_bytes() const { return _size_in_bytes; } + + void chop_later_chunks(); + public: + HandleMark(Thread* thread) { initialize(thread); } + ~HandleMark(); + + + + void push(); + + void pop_and_restore(); + + void* operator new(size_t size) throw(); + void* operator new [](size_t size) throw(); + void operator delete(void* p); + void operator delete[](void* p); +}; + + + + + +class NoHandleMark: public StackObj { + public: + + + + + NoHandleMark() {} + ~NoHandleMark() {} + +}; + + + + + +class ResetNoHandleMark: public StackObj { + int _no_handle_mark_nesting; + public: + + + + + ResetNoHandleMark() {} + ~ResetNoHandleMark() {} + +}; + + + + + + +class HandleMarkCleaner: public StackObj { + private: + Thread* _thread; + public: + inline HandleMarkCleaner(Thread* thread); + inline ~HandleMarkCleaner(); +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoader.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/perfDataTypes.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/perfDataTypes.hpp" +class PerfLongSampleHelper; +class PerfLongConstant; +class PerfLongCounter; +class PerfLongVariable; +class PerfStringVariable; + +typedef PerfLongSampleHelper PerfSampleHelper; +typedef PerfLongConstant PerfConstant; +typedef PerfLongCounter PerfCounter; +typedef PerfLongVariable PerfVariable; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoader.hpp" 2 +# 42 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoader.hpp" +class JImageFile; +class ClassFileStream; +class PackageEntry; +template class GrowableArray; + +class ClassPathEntry : public CHeapObj { +private: + ClassPathEntry* volatile _next; +protected: + const char* copy_path(const char*path); +public: + ClassPathEntry* next() const; + virtual ~ClassPathEntry() {} + void set_next(ClassPathEntry* next); + + virtual bool is_modules_image() const { return false; } + virtual bool is_jar_file() const { return false; } + + virtual bool from_class_path_attr() const { return false; } + virtual const char* name() const = 0; + virtual JImageFile* jimage() const { return nullptr; } + virtual void close_jimage() {} + + ClassPathEntry() : _next(nullptr) {} + + + virtual ClassFileStream* open_stream(JavaThread* current, const char* name) = 0; + + virtual ClassFileStream* open_stream_for_loader(JavaThread* current, const char* name, ClassLoaderData* loader_data) { + return open_stream(current, name); + } +}; + +class ClassPathDirEntry: public ClassPathEntry { + private: + const char* _dir; + public: + const char* name() const { return _dir; } + ClassPathDirEntry(const char* dir) { + _dir = copy_path(dir); + } + virtual ~ClassPathDirEntry(); + ClassFileStream* open_stream(JavaThread* current, const char* name); +}; + + +typedef void* jzfile; +typedef struct { + char *name; + jlong time; + jlong size; + jlong csize; + jint crc; + char *comment; + jbyte *extra; + jlong pos; +} jzentry; + +class ClassPathZipEntry: public ClassPathEntry { + private: + jzfile* _zip; + const char* _zip_name; + bool _from_class_path_attr; + public: + bool is_jar_file() const { return true; } + bool from_class_path_attr() const { return _from_class_path_attr; } + const char* name() const { return _zip_name; } + ClassPathZipEntry(jzfile* zip, const char* zip_name, bool is_boot_append, bool from_class_path_attr); + virtual ~ClassPathZipEntry(); + u1* open_entry(JavaThread* current, const char* name, jint* filesize, bool nul_terminate); + ClassFileStream* open_stream(JavaThread* current, const char* name); +}; + + + +class ClassPathImageEntry: public ClassPathEntry { +private: + const char* _name; + +public: + bool is_modules_image() const; + const char* name() const { return _name == nullptr ? "" : _name; } + JImageFile* jimage() const; + JImageFile* jimage_non_null() const; + void close_jimage(); + ClassPathImageEntry(JImageFile* jimage, const char* name); + virtual ~ClassPathImageEntry() { do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/classfile/classLoader.hpp", 128); } while (0); } + ClassFileStream* open_stream(JavaThread* current, const char* name); + ClassFileStream* open_stream_for_loader(JavaThread* current, const char* name, ClassLoaderData* loader_data); +}; + + + + + +class ModuleClassPathList : public CHeapObj { +private: + Symbol* _module_name; + + ClassPathEntry* _module_first_entry; + ClassPathEntry* _module_last_entry; +public: + Symbol* module_name() const { return _module_name; } + ClassPathEntry* module_first_entry() const { return _module_first_entry; } + ModuleClassPathList(Symbol* module_name); + ~ModuleClassPathList(); + void add_to_list(ClassPathEntry* new_entry); +}; + +class ClassLoader: AllStatic { + public: + enum ClassLoaderType { + BOOT_LOADER = 1, + PLATFORM_LOADER = 2, + APP_LOADER = 3 + }; + protected: + + + static PerfCounter* _perf_accumulated_time; + static PerfCounter* _perf_classes_inited; + static PerfCounter* _perf_class_init_time; + static PerfCounter* _perf_class_init_selftime; + static PerfCounter* _perf_classes_verified; + static PerfCounter* _perf_class_verify_time; + static PerfCounter* _perf_class_verify_selftime; + static PerfCounter* _perf_classes_linked; + static PerfCounter* _perf_class_link_time; + static PerfCounter* _perf_class_link_selftime; + static PerfCounter* _perf_sys_class_lookup_time; + static PerfCounter* _perf_shared_classload_time; + static PerfCounter* _perf_sys_classload_time; + static PerfCounter* _perf_app_classload_time; + static PerfCounter* _perf_app_classload_selftime; + static PerfCounter* _perf_app_classload_count; + static PerfCounter* _perf_define_appclasses; + static PerfCounter* _perf_define_appclass_time; + static PerfCounter* _perf_define_appclass_selftime; + static PerfCounter* _perf_app_classfile_bytes_read; + static PerfCounter* _perf_sys_classfile_bytes_read; + + static PerfCounter* _unsafe_defineClassCallCounter; +# 197 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoader.hpp" + static GrowableArray* _patch_mod_entries; + + + + + + static ClassPathEntry* _jrt_entry; + static GrowableArray* _exploded_entries; + enum { EXPLODED_ENTRY_SIZE = 80 }; + + + + + static ClassPathEntry* volatile _first_append_entry_list; + static ClassPathEntry* first_append_entry() { + return Atomic::load_acquire(&_first_append_entry_list); + } + + + static ClassPathEntry* volatile _last_append_entry; + + + static ClassPathEntry* _app_classpath_entries; + static ClassPathEntry* _last_app_classpath_entry; + static ClassPathEntry* _module_path_entries; + static ClassPathEntry* _last_module_path_entry; + static void setup_app_search_path(JavaThread* current, const char* class_path); + static void setup_module_search_path(JavaThread* current, const char* path); + static bool add_to_app_classpath_entries(JavaThread* current, + ClassPathEntry* entry, + bool check_for_duplicates); + static void add_to_module_path_entries(const char* path, ClassPathEntry* entry); + + + + static void* _zip_handle; + public: + static ClassPathEntry* app_classpath_entries() {return _app_classpath_entries;} + static ClassPathEntry* module_path_entries() {return _module_path_entries;} + + static bool has_bootclasspath_append() { return first_append_entry() != nullptr; } + + protected: + + + + + static void setup_bootstrap_search_path(JavaThread* current); + static void setup_bootstrap_search_path_impl(JavaThread* current, const char *class_path); + static void setup_patch_mod_entries(); + static void create_javabase(); + + static void* dll_lookup(void* lib, const char* name, const char* path); + static void load_java_library(); + static void load_zip_library(); + static void load_jimage_library(); + + private: + static int _libzip_loaded; + static void release_load_zip_library(); + + public: + static inline void load_zip_library_if_needed(); + static void* zip_library_handle() { return _zip_handle; } + static jzfile* open_zip_file(const char* canonical_path, char** error_msg, JavaThread* thread); + static ClassPathEntry* create_class_path_entry(JavaThread* current, + const char *path, const struct stat* st, + bool is_boot_append, + bool from_class_path_attr); + + + + static char* get_canonical_path(const char* orig, Thread* thread); + static const char* file_name_for_class_name(const char* class_name, + int class_name_len); + static PackageEntry* get_package_entry(Symbol* pkg_name, ClassLoaderData* loader_data); + static int crc32(int crc, const char* buf, int len); + static bool update_class_path_entry_list(JavaThread* current, + const char *path, + bool check_for_duplicates, + bool is_boot_append, + bool from_class_path_attr); + static void print_bootclasspath(); + + + static PerfCounter* perf_accumulated_time() { return _perf_accumulated_time; } + static PerfCounter* perf_classes_inited() { return _perf_classes_inited; } + static PerfCounter* perf_class_init_time() { return _perf_class_init_time; } + static PerfCounter* perf_class_init_selftime() { return _perf_class_init_selftime; } + static PerfCounter* perf_classes_verified() { return _perf_classes_verified; } + static PerfCounter* perf_class_verify_time() { return _perf_class_verify_time; } + static PerfCounter* perf_class_verify_selftime() { return _perf_class_verify_selftime; } + static PerfCounter* perf_classes_linked() { return _perf_classes_linked; } + static PerfCounter* perf_class_link_time() { return _perf_class_link_time; } + static PerfCounter* perf_class_link_selftime() { return _perf_class_link_selftime; } + static PerfCounter* perf_sys_class_lookup_time() { return _perf_sys_class_lookup_time; } + static PerfCounter* perf_shared_classload_time() { return _perf_shared_classload_time; } + static PerfCounter* perf_sys_classload_time() { return _perf_sys_classload_time; } + static PerfCounter* perf_app_classload_time() { return _perf_app_classload_time; } + static PerfCounter* perf_app_classload_selftime() { return _perf_app_classload_selftime; } + static PerfCounter* perf_app_classload_count() { return _perf_app_classload_count; } + static PerfCounter* perf_define_appclasses() { return _perf_define_appclasses; } + static PerfCounter* perf_define_appclass_time() { return _perf_define_appclass_time; } + static PerfCounter* perf_define_appclass_selftime() { return _perf_define_appclass_selftime; } + static PerfCounter* perf_app_classfile_bytes_read() { return _perf_app_classfile_bytes_read; } + static PerfCounter* perf_sys_classfile_bytes_read() { return _perf_sys_classfile_bytes_read; } + + + static PerfCounter* unsafe_defineClassCallCounter() { + return _unsafe_defineClassCallCounter; + } + + + static bool has_jrt_entry() { return (_jrt_entry != nullptr); } + static ClassPathEntry* get_jrt_entry() { return _jrt_entry; } + static void close_jrt_image(); + + + static void add_to_exploded_build_list(JavaThread* current, Symbol* module_name); + + + static ClassFileStream* search_module_entries(JavaThread* current, + const GrowableArray* const module_list, + const char* const class_name, + const char* const file_name); + + + static InstanceKlass* load_class(Symbol* class_name, bool search_append_only, JavaThread* __the_thread__); + + + + + + + + static oop get_system_package(const char* name, JavaThread* __the_thread__); + + + + + + static objArrayOop get_system_packages(JavaThread* __the_thread__); + + + static void initialize(JavaThread* __the_thread__); + static void classLoader_init2(JavaThread* current); + static void initialize_shared_path(JavaThread* current); + static void initialize_module_path(JavaThread* __the_thread__); + + static int compute_Object_vtable(); + + static ClassPathEntry* classpath_entry(int n); + + static bool is_in_patch_mod_entries(Symbol* module_name); + + + + + + + static int num_boot_classpath_entries(); + + static ClassPathEntry* get_next_boot_classpath_entry(ClassPathEntry* e); + + + + static int num_app_classpath_entries(); + + + + static int num_module_path_entries(); + static void exit_with_path_failure(const char* error, const char* message); + static char* skip_uri_protocol(char* source); + static void record_result(JavaThread* current, InstanceKlass* ik, + const ClassFileStream* stream, bool redefined); + + + static char* lookup_vm_options(); + + + + static bool is_module_observable(const char* module_name); + + static JImageLocationRef jimage_find_resource(JImageFile* jf, const char* module_name, + const char* file_name, jlong &size); + + static void trace_class_path(const char* msg, const char* name = nullptr); + + + static jlong classloader_time_ms(); + static jlong class_method_total_size(); + static jlong class_init_count(); + static jlong class_init_time_ms(); + static jlong class_verify_time_ms(); + static jlong class_link_count(); + static jlong class_link_time_ms(); + + + static void add_to_boot_append_entries(ClassPathEntry* new_entry); + + + static ClassPathZipEntry* create_class_path_zip_entry(const char *apath, bool is_boot_append); + + static bool string_ends_with(const char* str, const char* str_to_find); + + + + + static Symbol* package_from_class_name(const Symbol* class_name, bool* bad_class_name = nullptr); + + + static void verify() {}; +}; +# 418 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoader.hpp" +class PerfClassTraceTime { + public: + enum { + CLASS_LOAD = 0, + CLASS_LINK = 1, + CLASS_VERIFY = 2, + CLASS_CLINIT = 3, + DEFINE_CLASS = 4, + EVENT_TYPE_COUNT = 5 + }; + protected: + + + + elapsedTimer _t; + PerfLongCounter* _timep; + PerfLongCounter* _selftimep; + PerfLongCounter* _eventp; + + + + + int* _recursion_counters; + elapsedTimer* _timers; + int _event_type; + int _prev_active_event; + + public: + + inline PerfClassTraceTime(PerfLongCounter* timep, + PerfLongCounter* selftimep, + PerfLongCounter* eventp, + int* recursion_counters, + elapsedTimer* timers, + int type ) : + _timep(timep), _selftimep(selftimep), _eventp(eventp), _recursion_counters(recursion_counters), _timers(timers), _event_type(type) { + initialize(); + } + + inline PerfClassTraceTime(PerfLongCounter* timep, + elapsedTimer* timers, + int type ) : + _timep(timep), _selftimep(nullptr), _eventp(nullptr), _recursion_counters(nullptr), _timers(timers), _event_type(type) { + initialize(); + } + + ~PerfClassTraceTime(); + void initialize(); +}; +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/prims/unsafe.cpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoadInfo.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoadInfo.hpp" +class InstanceKlass; + +template class GrowableArray; + +class ClassInstanceInfo : public StackObj { + private: + InstanceKlass* _dynamic_nest_host; + Handle _class_data; + + public: + ClassInstanceInfo() { + _dynamic_nest_host = nullptr; + _class_data = Handle(); + } + ClassInstanceInfo(InstanceKlass* dynamic_nest_host, Handle class_data) { + _dynamic_nest_host = dynamic_nest_host; + _class_data = class_data; + } + + InstanceKlass* dynamic_nest_host() const { return _dynamic_nest_host; } + Handle class_data() const { return _class_data; } + friend class ClassLoadInfo; +}; + +class ClassLoadInfo : public StackObj { + private: + Handle _protection_domain; + ClassInstanceInfo _class_hidden_info; + bool _is_hidden; + bool _is_strong_hidden; + bool _can_access_vm_annotations; + + public: + ClassLoadInfo(Handle protection_domain) { + _protection_domain = protection_domain; + _class_hidden_info._dynamic_nest_host = nullptr; + _class_hidden_info._class_data = Handle(); + _is_hidden = false; + _is_strong_hidden = false; + _can_access_vm_annotations = false; + } + + ClassLoadInfo(Handle protection_domain, InstanceKlass* dynamic_nest_host, + Handle class_data, bool is_hidden, bool is_strong_hidden, + bool can_access_vm_annotations) { + _protection_domain = protection_domain; + _class_hidden_info._dynamic_nest_host = dynamic_nest_host; + _class_hidden_info._class_data = class_data; + _is_hidden = is_hidden; + _is_strong_hidden = is_strong_hidden; + _can_access_vm_annotations = can_access_vm_annotations; + } + + Handle protection_domain() const { return _protection_domain; } + const ClassInstanceInfo* class_hidden_info_ptr() const { return &_class_hidden_info; } + bool is_hidden() const { return _is_hidden; } + bool is_strong_hidden() const { return _is_strong_hidden; } + bool can_access_vm_annotations() const { return _can_access_vm_annotations; } +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/prims/unsafe.cpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.inline.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/vmClasses.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/vmClasses.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/vmClassID.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/vmClassID.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/vmClassMacros.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/vmClassID.hpp" 2 + + +enum class vmClassID : int { + + Object_klass_knum, java_lang_Object_knum = Object_klass_knum, String_klass_knum, java_lang_String_knum = String_klass_knum, Class_klass_knum, java_lang_Class_knum = Class_klass_knum, Cloneable_klass_knum, java_lang_Cloneable_knum = Cloneable_klass_knum, ClassLoader_klass_knum, java_lang_ClassLoader_knum = ClassLoader_klass_knum, Serializable_klass_knum, java_io_Serializable_knum = Serializable_klass_knum, System_klass_knum, java_lang_System_knum = System_klass_knum, Throwable_klass_knum, java_lang_Throwable_knum = Throwable_klass_knum, Error_klass_knum, java_lang_Error_knum = Error_klass_knum, Exception_klass_knum, java_lang_Exception_knum = Exception_klass_knum, RuntimeException_klass_knum, java_lang_RuntimeException_knum = RuntimeException_klass_knum, SecurityManager_klass_knum, java_lang_SecurityManager_knum = SecurityManager_klass_knum, ProtectionDomain_klass_knum, java_security_ProtectionDomain_knum = ProtectionDomain_klass_knum, AccessControlContext_klass_knum, java_security_AccessControlContext_knum = AccessControlContext_klass_knum, AccessController_klass_knum, java_security_AccessController_knum = AccessController_klass_knum, SecureClassLoader_klass_knum, java_security_SecureClassLoader_knum = SecureClassLoader_klass_knum, ClassNotFoundException_klass_knum, java_lang_ClassNotFoundException_knum = ClassNotFoundException_klass_knum, Record_klass_knum, java_lang_Record_knum = Record_klass_knum, NoClassDefFoundError_klass_knum, java_lang_NoClassDefFoundError_knum = NoClassDefFoundError_klass_knum, LinkageError_klass_knum, java_lang_LinkageError_knum = LinkageError_klass_knum, ClassCastException_klass_knum, java_lang_ClassCastException_knum = ClassCastException_klass_knum, ArrayStoreException_klass_knum, java_lang_ArrayStoreException_knum = ArrayStoreException_klass_knum, VirtualMachineError_klass_knum, java_lang_VirtualMachineError_knum = VirtualMachineError_klass_knum, InternalError_klass_knum, java_lang_InternalError_knum = InternalError_klass_knum, OutOfMemoryError_klass_knum, java_lang_OutOfMemoryError_knum = OutOfMemoryError_klass_knum, StackOverflowError_klass_knum, java_lang_StackOverflowError_knum = StackOverflowError_klass_knum, IllegalMonitorStateException_klass_knum, java_lang_IllegalMonitorStateException_knum = IllegalMonitorStateException_klass_knum, Reference_klass_knum, java_lang_ref_Reference_knum = Reference_klass_knum, SoftReference_klass_knum, java_lang_ref_SoftReference_knum = SoftReference_klass_knum, WeakReference_klass_knum, java_lang_ref_WeakReference_knum = WeakReference_klass_knum, FinalReference_klass_knum, java_lang_ref_FinalReference_knum = FinalReference_klass_knum, PhantomReference_klass_knum, java_lang_ref_PhantomReference_knum = PhantomReference_klass_knum, Finalizer_klass_knum, java_lang_ref_Finalizer_knum = Finalizer_klass_knum, Thread_klass_knum, java_lang_Thread_knum = Thread_klass_knum, Thread_FieldHolder_klass_knum, java_lang_Thread_FieldHolder_knum = Thread_FieldHolder_klass_knum, Thread_Constants_klass_knum, java_lang_Thread_Constants_knum = Thread_Constants_klass_knum, ThreadGroup_klass_knum, java_lang_ThreadGroup_knum = ThreadGroup_klass_knum, BaseVirtualThread_klass_knum, java_lang_BaseVirtualThread_knum = BaseVirtualThread_klass_knum, VirtualThread_klass_knum, java_lang_VirtualThread_knum = VirtualThread_klass_knum, BoundVirtualThread_klass_knum, java_lang_BoundVirtualThread_knum = BoundVirtualThread_klass_knum, Properties_klass_knum, java_util_Properties_knum = Properties_klass_knum, Module_klass_knum, java_lang_Module_knum = Module_klass_knum, reflect_AccessibleObject_klass_knum, java_lang_reflect_AccessibleObject_knum = reflect_AccessibleObject_klass_knum, reflect_Field_klass_knum, java_lang_reflect_Field_knum = reflect_Field_klass_knum, reflect_Parameter_klass_knum, java_lang_reflect_Parameter_knum = reflect_Parameter_klass_knum, reflect_Method_klass_knum, java_lang_reflect_Method_knum = reflect_Method_klass_knum, reflect_Constructor_klass_knum, java_lang_reflect_Constructor_knum = reflect_Constructor_klass_knum, Runnable_klass_knum, java_lang_Runnable_knum = Runnable_klass_knum, ContinuationScope_klass_knum, jdk_internal_vm_ContinuationScope_knum = ContinuationScope_klass_knum, Continuation_klass_knum, jdk_internal_vm_Continuation_knum = Continuation_klass_knum, StackChunk_klass_knum, jdk_internal_vm_StackChunk_knum = StackChunk_klass_knum, reflect_MethodAccessorImpl_klass_knum, reflect_MethodAccessorImpl_knum = reflect_MethodAccessorImpl_klass_knum, reflect_DelegatingClassLoader_klass_knum, reflect_DelegatingClassLoader_knum = reflect_DelegatingClassLoader_klass_knum, reflect_ConstantPool_klass_knum, reflect_ConstantPool_knum = reflect_ConstantPool_klass_knum, reflect_CallerSensitive_klass_knum, reflect_CallerSensitive_knum = reflect_CallerSensitive_klass_knum, reflect_DirectConstructorHandleAccessor_NativeAccessor_klass_knum, reflect_DirectConstructorHandleAccessor_NativeAccessor_knum = reflect_DirectConstructorHandleAccessor_NativeAccessor_klass_knum, reflect_SerializationConstructorAccessorImpl_klass_knum, reflect_SerializationConstructorAccessorImpl_knum = reflect_SerializationConstructorAccessorImpl_klass_knum, DirectMethodHandle_klass_knum, java_lang_invoke_DirectMethodHandle_knum = DirectMethodHandle_klass_knum, MethodHandle_klass_knum, java_lang_invoke_MethodHandle_knum = MethodHandle_klass_knum, VarHandle_klass_knum, java_lang_invoke_VarHandle_knum = VarHandle_klass_knum, MemberName_klass_knum, java_lang_invoke_MemberName_knum = MemberName_klass_knum, ResolvedMethodName_klass_knum, java_lang_invoke_ResolvedMethodName_knum = ResolvedMethodName_klass_knum, MethodHandleNatives_klass_knum, java_lang_invoke_MethodHandleNatives_knum = MethodHandleNatives_klass_knum, LambdaForm_klass_knum, java_lang_invoke_LambdaForm_knum = LambdaForm_klass_knum, MethodType_klass_knum, java_lang_invoke_MethodType_knum = MethodType_klass_knum, BootstrapMethodError_klass_knum, java_lang_BootstrapMethodError_knum = BootstrapMethodError_klass_knum, CallSite_klass_knum, java_lang_invoke_CallSite_knum = CallSite_klass_knum, NativeEntryPoint_klass_knum, jdk_internal_foreign_abi_NativeEntryPoint_knum = NativeEntryPoint_klass_knum, ABIDescriptor_klass_knum, jdk_internal_foreign_abi_ABIDescriptor_knum = ABIDescriptor_klass_knum, VMStorage_klass_knum, jdk_internal_foreign_abi_VMStorage_knum = VMStorage_klass_knum, CallConv_klass_knum, jdk_internal_foreign_abi_CallConv_knum = CallConv_klass_knum, Context_klass_knum, java_lang_invoke_MethodHandleNatives_CallSiteContext_knum = Context_klass_knum, ConstantCallSite_klass_knum, java_lang_invoke_ConstantCallSite_knum = ConstantCallSite_klass_knum, MutableCallSite_klass_knum, java_lang_invoke_MutableCallSite_knum = MutableCallSite_klass_knum, VolatileCallSite_klass_knum, java_lang_invoke_VolatileCallSite_knum = VolatileCallSite_klass_knum, AssertionStatusDirectives_klass_knum, java_lang_AssertionStatusDirectives_knum = AssertionStatusDirectives_klass_knum, StringBuffer_klass_knum, java_lang_StringBuffer_knum = StringBuffer_klass_knum, StringBuilder_klass_knum, java_lang_StringBuilder_knum = StringBuilder_klass_knum, UnsafeConstants_klass_knum, jdk_internal_misc_UnsafeConstants_knum = UnsafeConstants_klass_knum, internal_Unsafe_klass_knum, jdk_internal_misc_Unsafe_knum = internal_Unsafe_klass_knum, module_Modules_klass_knum, jdk_internal_module_Modules_knum = module_Modules_klass_knum, ByteArrayInputStream_klass_knum, java_io_ByteArrayInputStream_knum = ByteArrayInputStream_klass_knum, URL_klass_knum, java_net_URL_knum = URL_klass_knum, URLClassLoader_klass_knum, java_net_URLClassLoader_knum = URLClassLoader_klass_knum, Enum_klass_knum, java_lang_Enum_knum = Enum_klass_knum, Jar_Manifest_klass_knum, java_util_jar_Manifest_knum = Jar_Manifest_klass_knum, jdk_internal_loader_BuiltinClassLoader_klass_knum, jdk_internal_loader_BuiltinClassLoader_knum = jdk_internal_loader_BuiltinClassLoader_klass_knum, jdk_internal_loader_ClassLoaders_klass_knum, jdk_internal_loader_ClassLoaders_knum = jdk_internal_loader_ClassLoaders_klass_knum, jdk_internal_loader_ClassLoaders_AppClassLoader_klass_knum, jdk_internal_loader_ClassLoaders_AppClassLoader_knum = jdk_internal_loader_ClassLoaders_AppClassLoader_klass_knum, jdk_internal_loader_ClassLoaders_PlatformClassLoader_klass_knum, jdk_internal_loader_ClassLoaders_PlatformClassLoader_knum = jdk_internal_loader_ClassLoaders_PlatformClassLoader_klass_knum, CodeSource_klass_knum, java_security_CodeSource_knum = CodeSource_klass_knum, ConcurrentHashMap_klass_knum, java_util_concurrent_ConcurrentHashMap_knum = ConcurrentHashMap_klass_knum, ArrayList_klass_knum, java_util_ArrayList_knum = ArrayList_klass_knum, StackTraceElement_klass_knum, java_lang_StackTraceElement_knum = StackTraceElement_klass_knum, nio_Buffer_klass_knum, java_nio_Buffer_knum = nio_Buffer_klass_knum, StackWalker_klass_knum, java_lang_StackWalker_knum = StackWalker_klass_knum, AbstractStackWalker_klass_knum, java_lang_StackStreamFactory_AbstractStackWalker_knum = AbstractStackWalker_klass_knum, ClassFrameInfo_klass_knum, java_lang_ClassFrameInfo_knum = ClassFrameInfo_klass_knum, StackFrameInfo_klass_knum, java_lang_StackFrameInfo_knum = StackFrameInfo_klass_knum, LiveStackFrameInfo_klass_knum, java_lang_LiveStackFrameInfo_knum = LiveStackFrameInfo_klass_knum, java_util_concurrent_locks_AbstractOwnableSynchronizer_klass_knum, java_util_concurrent_locks_AbstractOwnableSynchronizer_knum = java_util_concurrent_locks_AbstractOwnableSynchronizer_klass_knum, Boolean_klass_knum, java_lang_Boolean_knum = Boolean_klass_knum, Character_klass_knum, java_lang_Character_knum = Character_klass_knum, Float_klass_knum, java_lang_Float_knum = Float_klass_knum, Double_klass_knum, java_lang_Double_knum = Double_klass_knum, Byte_klass_knum, java_lang_Byte_knum = Byte_klass_knum, Short_klass_knum, java_lang_Short_knum = Short_klass_knum, Integer_klass_knum, java_lang_Integer_knum = Integer_klass_knum, Long_klass_knum, java_lang_Long_knum = Long_klass_knum, Iterator_klass_knum, java_util_Iterator_knum = Iterator_klass_knum, RecordComponent_klass_knum, java_lang_reflect_RecordComponent_knum = RecordComponent_klass_knum, vector_VectorSupport_klass_knum, jdk_internal_vm_vector_VectorSupport_knum = vector_VectorSupport_klass_knum, vector_VectorPayload_klass_knum, jdk_internal_vm_vector_VectorPayload_knum = vector_VectorPayload_klass_knum, vector_Vector_klass_knum, jdk_internal_vm_vector_Vector_knum = vector_Vector_klass_knum, vector_VectorMask_klass_knum, jdk_internal_vm_vector_VectorMask_knum = vector_VectorMask_klass_knum, vector_VectorShuffle_klass_knum, jdk_internal_vm_vector_VectorShuffle_knum = vector_VectorShuffle_klass_knum, FillerObject_klass_knum, jdk_internal_vm_FillerObject_knum = FillerObject_klass_knum, + + + LIMIT, + FIRST = 0, + LAST = LIMIT - 1 +}; + +template<> struct EnumeratorRange { static constexpr EnumeratorRangeImpl::Underlying _start{EnumeratorRangeImpl::start_value(vmClassID::FIRST)}; static constexpr EnumeratorRangeImpl::Underlying _end{EnumeratorRangeImpl::end_value(vmClassID::LAST)}; };; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/vmClasses.hpp" 2 + + + + +class ClassLoaderData; +class InstanceKlass; +class MetaspaceClosure; + +class vmClasses : AllStatic { + friend class VMStructs; + + static vmClassID check_id(vmClassID id) { + ; + return id; + } + + static int as_int(vmClassID id) { + return static_cast(check_id(id)); + } + + static vmClassID as_id(int i) { + vmClassID id = static_cast(i); + return check_id(id); + } + + static InstanceKlass* check_klass(InstanceKlass* k) { + ; + return k; + } + + static bool is_loaded(InstanceKlass* klass); + static bool resolve(vmClassID id, JavaThread* __the_thread__); + static void resolve_until(vmClassID limit_id, vmClassID &start_id, JavaThread* __the_thread__); + static void resolve_through(vmClassID last_id, vmClassID &start_id, JavaThread* __the_thread__) { + int limit = as_int(last_id) + 1; + resolve_until(as_id(limit), start_id, __the_thread__); + } + + static void resolve_shared_class(InstanceKlass* klass, ClassLoaderData* loader_data, Handle domain, JavaThread* __the_thread__) ; + + + + + + + static InstanceKlass* _klasses[]; + + + static InstanceKlass* _box_klasses[]; + + + + +public: + + + + + static InstanceKlass* Object_klass() { return check_klass(_klasses[static_cast(vmClassID::Object_klass_knum)]); } static InstanceKlass** Object_klass_addr() { return &_klasses[static_cast(vmClassID::Object_klass_knum)]; } static bool Object_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Object_klass_knum)]); } static InstanceKlass* String_klass() { return check_klass(_klasses[static_cast(vmClassID::String_klass_knum)]); } static InstanceKlass** String_klass_addr() { return &_klasses[static_cast(vmClassID::String_klass_knum)]; } static bool String_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::String_klass_knum)]); } static InstanceKlass* Class_klass() { return check_klass(_klasses[static_cast(vmClassID::Class_klass_knum)]); } static InstanceKlass** Class_klass_addr() { return &_klasses[static_cast(vmClassID::Class_klass_knum)]; } static bool Class_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Class_klass_knum)]); } static InstanceKlass* Cloneable_klass() { return check_klass(_klasses[static_cast(vmClassID::Cloneable_klass_knum)]); } static InstanceKlass** Cloneable_klass_addr() { return &_klasses[static_cast(vmClassID::Cloneable_klass_knum)]; } static bool Cloneable_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Cloneable_klass_knum)]); } static InstanceKlass* ClassLoader_klass() { return check_klass(_klasses[static_cast(vmClassID::ClassLoader_klass_knum)]); } static InstanceKlass** ClassLoader_klass_addr() { return &_klasses[static_cast(vmClassID::ClassLoader_klass_knum)]; } static bool ClassLoader_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ClassLoader_klass_knum)]); } static InstanceKlass* Serializable_klass() { return check_klass(_klasses[static_cast(vmClassID::Serializable_klass_knum)]); } static InstanceKlass** Serializable_klass_addr() { return &_klasses[static_cast(vmClassID::Serializable_klass_knum)]; } static bool Serializable_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Serializable_klass_knum)]); } static InstanceKlass* System_klass() { return check_klass(_klasses[static_cast(vmClassID::System_klass_knum)]); } static InstanceKlass** System_klass_addr() { return &_klasses[static_cast(vmClassID::System_klass_knum)]; } static bool System_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::System_klass_knum)]); } static InstanceKlass* Throwable_klass() { return check_klass(_klasses[static_cast(vmClassID::Throwable_klass_knum)]); } static InstanceKlass** Throwable_klass_addr() { return &_klasses[static_cast(vmClassID::Throwable_klass_knum)]; } static bool Throwable_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Throwable_klass_knum)]); } static InstanceKlass* Error_klass() { return check_klass(_klasses[static_cast(vmClassID::Error_klass_knum)]); } static InstanceKlass** Error_klass_addr() { return &_klasses[static_cast(vmClassID::Error_klass_knum)]; } static bool Error_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Error_klass_knum)]); } static InstanceKlass* Exception_klass() { return check_klass(_klasses[static_cast(vmClassID::Exception_klass_knum)]); } static InstanceKlass** Exception_klass_addr() { return &_klasses[static_cast(vmClassID::Exception_klass_knum)]; } static bool Exception_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Exception_klass_knum)]); } static InstanceKlass* RuntimeException_klass() { return check_klass(_klasses[static_cast(vmClassID::RuntimeException_klass_knum)]); } static InstanceKlass** RuntimeException_klass_addr() { return &_klasses[static_cast(vmClassID::RuntimeException_klass_knum)]; } static bool RuntimeException_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::RuntimeException_klass_knum)]); } static InstanceKlass* SecurityManager_klass() { return check_klass(_klasses[static_cast(vmClassID::SecurityManager_klass_knum)]); } static InstanceKlass** SecurityManager_klass_addr() { return &_klasses[static_cast(vmClassID::SecurityManager_klass_knum)]; } static bool SecurityManager_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::SecurityManager_klass_knum)]); } static InstanceKlass* ProtectionDomain_klass() { return check_klass(_klasses[static_cast(vmClassID::ProtectionDomain_klass_knum)]); } static InstanceKlass** ProtectionDomain_klass_addr() { return &_klasses[static_cast(vmClassID::ProtectionDomain_klass_knum)]; } static bool ProtectionDomain_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ProtectionDomain_klass_knum)]); } static InstanceKlass* AccessControlContext_klass() { return check_klass(_klasses[static_cast(vmClassID::AccessControlContext_klass_knum)]); } static InstanceKlass** AccessControlContext_klass_addr() { return &_klasses[static_cast(vmClassID::AccessControlContext_klass_knum)]; } static bool AccessControlContext_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::AccessControlContext_klass_knum)]); } static InstanceKlass* AccessController_klass() { return check_klass(_klasses[static_cast(vmClassID::AccessController_klass_knum)]); } static InstanceKlass** AccessController_klass_addr() { return &_klasses[static_cast(vmClassID::AccessController_klass_knum)]; } static bool AccessController_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::AccessController_klass_knum)]); } static InstanceKlass* SecureClassLoader_klass() { return check_klass(_klasses[static_cast(vmClassID::SecureClassLoader_klass_knum)]); } static InstanceKlass** SecureClassLoader_klass_addr() { return &_klasses[static_cast(vmClassID::SecureClassLoader_klass_knum)]; } static bool SecureClassLoader_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::SecureClassLoader_klass_knum)]); } static InstanceKlass* ClassNotFoundException_klass() { return check_klass(_klasses[static_cast(vmClassID::ClassNotFoundException_klass_knum)]); } static InstanceKlass** ClassNotFoundException_klass_addr() { return &_klasses[static_cast(vmClassID::ClassNotFoundException_klass_knum)]; } static bool ClassNotFoundException_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ClassNotFoundException_klass_knum)]); } static InstanceKlass* Record_klass() { return check_klass(_klasses[static_cast(vmClassID::Record_klass_knum)]); } static InstanceKlass** Record_klass_addr() { return &_klasses[static_cast(vmClassID::Record_klass_knum)]; } static bool Record_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Record_klass_knum)]); } static InstanceKlass* NoClassDefFoundError_klass() { return check_klass(_klasses[static_cast(vmClassID::NoClassDefFoundError_klass_knum)]); } static InstanceKlass** NoClassDefFoundError_klass_addr() { return &_klasses[static_cast(vmClassID::NoClassDefFoundError_klass_knum)]; } static bool NoClassDefFoundError_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::NoClassDefFoundError_klass_knum)]); } static InstanceKlass* LinkageError_klass() { return check_klass(_klasses[static_cast(vmClassID::LinkageError_klass_knum)]); } static InstanceKlass** LinkageError_klass_addr() { return &_klasses[static_cast(vmClassID::LinkageError_klass_knum)]; } static bool LinkageError_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::LinkageError_klass_knum)]); } static InstanceKlass* ClassCastException_klass() { return check_klass(_klasses[static_cast(vmClassID::ClassCastException_klass_knum)]); } static InstanceKlass** ClassCastException_klass_addr() { return &_klasses[static_cast(vmClassID::ClassCastException_klass_knum)]; } static bool ClassCastException_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ClassCastException_klass_knum)]); } static InstanceKlass* ArrayStoreException_klass() { return check_klass(_klasses[static_cast(vmClassID::ArrayStoreException_klass_knum)]); } static InstanceKlass** ArrayStoreException_klass_addr() { return &_klasses[static_cast(vmClassID::ArrayStoreException_klass_knum)]; } static bool ArrayStoreException_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ArrayStoreException_klass_knum)]); } static InstanceKlass* VirtualMachineError_klass() { return check_klass(_klasses[static_cast(vmClassID::VirtualMachineError_klass_knum)]); } static InstanceKlass** VirtualMachineError_klass_addr() { return &_klasses[static_cast(vmClassID::VirtualMachineError_klass_knum)]; } static bool VirtualMachineError_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::VirtualMachineError_klass_knum)]); } static InstanceKlass* InternalError_klass() { return check_klass(_klasses[static_cast(vmClassID::InternalError_klass_knum)]); } static InstanceKlass** InternalError_klass_addr() { return &_klasses[static_cast(vmClassID::InternalError_klass_knum)]; } static bool InternalError_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::InternalError_klass_knum)]); } static InstanceKlass* OutOfMemoryError_klass() { return check_klass(_klasses[static_cast(vmClassID::OutOfMemoryError_klass_knum)]); } static InstanceKlass** OutOfMemoryError_klass_addr() { return &_klasses[static_cast(vmClassID::OutOfMemoryError_klass_knum)]; } static bool OutOfMemoryError_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::OutOfMemoryError_klass_knum)]); } static InstanceKlass* StackOverflowError_klass() { return check_klass(_klasses[static_cast(vmClassID::StackOverflowError_klass_knum)]); } static InstanceKlass** StackOverflowError_klass_addr() { return &_klasses[static_cast(vmClassID::StackOverflowError_klass_knum)]; } static bool StackOverflowError_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::StackOverflowError_klass_knum)]); } static InstanceKlass* IllegalMonitorStateException_klass() { return check_klass(_klasses[static_cast(vmClassID::IllegalMonitorStateException_klass_knum)]); } static InstanceKlass** IllegalMonitorStateException_klass_addr() { return &_klasses[static_cast(vmClassID::IllegalMonitorStateException_klass_knum)]; } static bool IllegalMonitorStateException_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::IllegalMonitorStateException_klass_knum)]); } static InstanceKlass* Reference_klass() { return check_klass(_klasses[static_cast(vmClassID::Reference_klass_knum)]); } static InstanceKlass** Reference_klass_addr() { return &_klasses[static_cast(vmClassID::Reference_klass_knum)]; } static bool Reference_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Reference_klass_knum)]); } static InstanceKlass* SoftReference_klass() { return check_klass(_klasses[static_cast(vmClassID::SoftReference_klass_knum)]); } static InstanceKlass** SoftReference_klass_addr() { return &_klasses[static_cast(vmClassID::SoftReference_klass_knum)]; } static bool SoftReference_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::SoftReference_klass_knum)]); } static InstanceKlass* WeakReference_klass() { return check_klass(_klasses[static_cast(vmClassID::WeakReference_klass_knum)]); } static InstanceKlass** WeakReference_klass_addr() { return &_klasses[static_cast(vmClassID::WeakReference_klass_knum)]; } static bool WeakReference_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::WeakReference_klass_knum)]); } static InstanceKlass* FinalReference_klass() { return check_klass(_klasses[static_cast(vmClassID::FinalReference_klass_knum)]); } static InstanceKlass** FinalReference_klass_addr() { return &_klasses[static_cast(vmClassID::FinalReference_klass_knum)]; } static bool FinalReference_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::FinalReference_klass_knum)]); } static InstanceKlass* PhantomReference_klass() { return check_klass(_klasses[static_cast(vmClassID::PhantomReference_klass_knum)]); } static InstanceKlass** PhantomReference_klass_addr() { return &_klasses[static_cast(vmClassID::PhantomReference_klass_knum)]; } static bool PhantomReference_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::PhantomReference_klass_knum)]); } static InstanceKlass* Finalizer_klass() { return check_klass(_klasses[static_cast(vmClassID::Finalizer_klass_knum)]); } static InstanceKlass** Finalizer_klass_addr() { return &_klasses[static_cast(vmClassID::Finalizer_klass_knum)]; } static bool Finalizer_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Finalizer_klass_knum)]); } static InstanceKlass* Thread_klass() { return check_klass(_klasses[static_cast(vmClassID::Thread_klass_knum)]); } static InstanceKlass** Thread_klass_addr() { return &_klasses[static_cast(vmClassID::Thread_klass_knum)]; } static bool Thread_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Thread_klass_knum)]); } static InstanceKlass* Thread_FieldHolder_klass() { return check_klass(_klasses[static_cast(vmClassID::Thread_FieldHolder_klass_knum)]); } static InstanceKlass** Thread_FieldHolder_klass_addr() { return &_klasses[static_cast(vmClassID::Thread_FieldHolder_klass_knum)]; } static bool Thread_FieldHolder_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Thread_FieldHolder_klass_knum)]); } static InstanceKlass* Thread_Constants_klass() { return check_klass(_klasses[static_cast(vmClassID::Thread_Constants_klass_knum)]); } static InstanceKlass** Thread_Constants_klass_addr() { return &_klasses[static_cast(vmClassID::Thread_Constants_klass_knum)]; } static bool Thread_Constants_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Thread_Constants_klass_knum)]); } static InstanceKlass* ThreadGroup_klass() { return check_klass(_klasses[static_cast(vmClassID::ThreadGroup_klass_knum)]); } static InstanceKlass** ThreadGroup_klass_addr() { return &_klasses[static_cast(vmClassID::ThreadGroup_klass_knum)]; } static bool ThreadGroup_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ThreadGroup_klass_knum)]); } static InstanceKlass* BaseVirtualThread_klass() { return check_klass(_klasses[static_cast(vmClassID::BaseVirtualThread_klass_knum)]); } static InstanceKlass** BaseVirtualThread_klass_addr() { return &_klasses[static_cast(vmClassID::BaseVirtualThread_klass_knum)]; } static bool BaseVirtualThread_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::BaseVirtualThread_klass_knum)]); } static InstanceKlass* VirtualThread_klass() { return check_klass(_klasses[static_cast(vmClassID::VirtualThread_klass_knum)]); } static InstanceKlass** VirtualThread_klass_addr() { return &_klasses[static_cast(vmClassID::VirtualThread_klass_knum)]; } static bool VirtualThread_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::VirtualThread_klass_knum)]); } static InstanceKlass* BoundVirtualThread_klass() { return check_klass(_klasses[static_cast(vmClassID::BoundVirtualThread_klass_knum)]); } static InstanceKlass** BoundVirtualThread_klass_addr() { return &_klasses[static_cast(vmClassID::BoundVirtualThread_klass_knum)]; } static bool BoundVirtualThread_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::BoundVirtualThread_klass_knum)]); } static InstanceKlass* Properties_klass() { return check_klass(_klasses[static_cast(vmClassID::Properties_klass_knum)]); } static InstanceKlass** Properties_klass_addr() { return &_klasses[static_cast(vmClassID::Properties_klass_knum)]; } static bool Properties_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Properties_klass_knum)]); } static InstanceKlass* Module_klass() { return check_klass(_klasses[static_cast(vmClassID::Module_klass_knum)]); } static InstanceKlass** Module_klass_addr() { return &_klasses[static_cast(vmClassID::Module_klass_knum)]; } static bool Module_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Module_klass_knum)]); } static InstanceKlass* reflect_AccessibleObject_klass() { return check_klass(_klasses[static_cast(vmClassID::reflect_AccessibleObject_klass_knum)]); } static InstanceKlass** reflect_AccessibleObject_klass_addr() { return &_klasses[static_cast(vmClassID::reflect_AccessibleObject_klass_knum)]; } static bool reflect_AccessibleObject_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::reflect_AccessibleObject_klass_knum)]); } static InstanceKlass* reflect_Field_klass() { return check_klass(_klasses[static_cast(vmClassID::reflect_Field_klass_knum)]); } static InstanceKlass** reflect_Field_klass_addr() { return &_klasses[static_cast(vmClassID::reflect_Field_klass_knum)]; } static bool reflect_Field_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::reflect_Field_klass_knum)]); } static InstanceKlass* reflect_Parameter_klass() { return check_klass(_klasses[static_cast(vmClassID::reflect_Parameter_klass_knum)]); } static InstanceKlass** reflect_Parameter_klass_addr() { return &_klasses[static_cast(vmClassID::reflect_Parameter_klass_knum)]; } static bool reflect_Parameter_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::reflect_Parameter_klass_knum)]); } static InstanceKlass* reflect_Method_klass() { return check_klass(_klasses[static_cast(vmClassID::reflect_Method_klass_knum)]); } static InstanceKlass** reflect_Method_klass_addr() { return &_klasses[static_cast(vmClassID::reflect_Method_klass_knum)]; } static bool reflect_Method_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::reflect_Method_klass_knum)]); } static InstanceKlass* reflect_Constructor_klass() { return check_klass(_klasses[static_cast(vmClassID::reflect_Constructor_klass_knum)]); } static InstanceKlass** reflect_Constructor_klass_addr() { return &_klasses[static_cast(vmClassID::reflect_Constructor_klass_knum)]; } static bool reflect_Constructor_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::reflect_Constructor_klass_knum)]); } static InstanceKlass* Runnable_klass() { return check_klass(_klasses[static_cast(vmClassID::Runnable_klass_knum)]); } static InstanceKlass** Runnable_klass_addr() { return &_klasses[static_cast(vmClassID::Runnable_klass_knum)]; } static bool Runnable_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Runnable_klass_knum)]); } static InstanceKlass* ContinuationScope_klass() { return check_klass(_klasses[static_cast(vmClassID::ContinuationScope_klass_knum)]); } static InstanceKlass** ContinuationScope_klass_addr() { return &_klasses[static_cast(vmClassID::ContinuationScope_klass_knum)]; } static bool ContinuationScope_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ContinuationScope_klass_knum)]); } static InstanceKlass* Continuation_klass() { return check_klass(_klasses[static_cast(vmClassID::Continuation_klass_knum)]); } static InstanceKlass** Continuation_klass_addr() { return &_klasses[static_cast(vmClassID::Continuation_klass_knum)]; } static bool Continuation_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Continuation_klass_knum)]); } static InstanceKlass* StackChunk_klass() { return check_klass(_klasses[static_cast(vmClassID::StackChunk_klass_knum)]); } static InstanceKlass** StackChunk_klass_addr() { return &_klasses[static_cast(vmClassID::StackChunk_klass_knum)]; } static bool StackChunk_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::StackChunk_klass_knum)]); } static InstanceKlass* reflect_MethodAccessorImpl_klass() { return check_klass(_klasses[static_cast(vmClassID::reflect_MethodAccessorImpl_klass_knum)]); } static InstanceKlass** reflect_MethodAccessorImpl_klass_addr() { return &_klasses[static_cast(vmClassID::reflect_MethodAccessorImpl_klass_knum)]; } static bool reflect_MethodAccessorImpl_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::reflect_MethodAccessorImpl_klass_knum)]); } static InstanceKlass* reflect_DelegatingClassLoader_klass() { return check_klass(_klasses[static_cast(vmClassID::reflect_DelegatingClassLoader_klass_knum)]); } static InstanceKlass** reflect_DelegatingClassLoader_klass_addr() { return &_klasses[static_cast(vmClassID::reflect_DelegatingClassLoader_klass_knum)]; } static bool reflect_DelegatingClassLoader_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::reflect_DelegatingClassLoader_klass_knum)]); } static InstanceKlass* reflect_ConstantPool_klass() { return check_klass(_klasses[static_cast(vmClassID::reflect_ConstantPool_klass_knum)]); } static InstanceKlass** reflect_ConstantPool_klass_addr() { return &_klasses[static_cast(vmClassID::reflect_ConstantPool_klass_knum)]; } static bool reflect_ConstantPool_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::reflect_ConstantPool_klass_knum)]); } static InstanceKlass* reflect_CallerSensitive_klass() { return check_klass(_klasses[static_cast(vmClassID::reflect_CallerSensitive_klass_knum)]); } static InstanceKlass** reflect_CallerSensitive_klass_addr() { return &_klasses[static_cast(vmClassID::reflect_CallerSensitive_klass_knum)]; } static bool reflect_CallerSensitive_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::reflect_CallerSensitive_klass_knum)]); } static InstanceKlass* reflect_DirectConstructorHandleAccessor_NativeAccessor_klass() { return check_klass(_klasses[static_cast(vmClassID::reflect_DirectConstructorHandleAccessor_NativeAccessor_klass_knum)]); } static InstanceKlass** reflect_DirectConstructorHandleAccessor_NativeAccessor_klass_addr() { return &_klasses[static_cast(vmClassID::reflect_DirectConstructorHandleAccessor_NativeAccessor_klass_knum)]; } static bool reflect_DirectConstructorHandleAccessor_NativeAccessor_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::reflect_DirectConstructorHandleAccessor_NativeAccessor_klass_knum)]); } static InstanceKlass* reflect_SerializationConstructorAccessorImpl_klass() { return check_klass(_klasses[static_cast(vmClassID::reflect_SerializationConstructorAccessorImpl_klass_knum)]); } static InstanceKlass** reflect_SerializationConstructorAccessorImpl_klass_addr() { return &_klasses[static_cast(vmClassID::reflect_SerializationConstructorAccessorImpl_klass_knum)]; } static bool reflect_SerializationConstructorAccessorImpl_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::reflect_SerializationConstructorAccessorImpl_klass_knum)]); } static InstanceKlass* DirectMethodHandle_klass() { return check_klass(_klasses[static_cast(vmClassID::DirectMethodHandle_klass_knum)]); } static InstanceKlass** DirectMethodHandle_klass_addr() { return &_klasses[static_cast(vmClassID::DirectMethodHandle_klass_knum)]; } static bool DirectMethodHandle_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::DirectMethodHandle_klass_knum)]); } static InstanceKlass* MethodHandle_klass() { return check_klass(_klasses[static_cast(vmClassID::MethodHandle_klass_knum)]); } static InstanceKlass** MethodHandle_klass_addr() { return &_klasses[static_cast(vmClassID::MethodHandle_klass_knum)]; } static bool MethodHandle_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::MethodHandle_klass_knum)]); } static InstanceKlass* VarHandle_klass() { return check_klass(_klasses[static_cast(vmClassID::VarHandle_klass_knum)]); } static InstanceKlass** VarHandle_klass_addr() { return &_klasses[static_cast(vmClassID::VarHandle_klass_knum)]; } static bool VarHandle_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::VarHandle_klass_knum)]); } static InstanceKlass* MemberName_klass() { return check_klass(_klasses[static_cast(vmClassID::MemberName_klass_knum)]); } static InstanceKlass** MemberName_klass_addr() { return &_klasses[static_cast(vmClassID::MemberName_klass_knum)]; } static bool MemberName_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::MemberName_klass_knum)]); } static InstanceKlass* ResolvedMethodName_klass() { return check_klass(_klasses[static_cast(vmClassID::ResolvedMethodName_klass_knum)]); } static InstanceKlass** ResolvedMethodName_klass_addr() { return &_klasses[static_cast(vmClassID::ResolvedMethodName_klass_knum)]; } static bool ResolvedMethodName_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ResolvedMethodName_klass_knum)]); } static InstanceKlass* MethodHandleNatives_klass() { return check_klass(_klasses[static_cast(vmClassID::MethodHandleNatives_klass_knum)]); } static InstanceKlass** MethodHandleNatives_klass_addr() { return &_klasses[static_cast(vmClassID::MethodHandleNatives_klass_knum)]; } static bool MethodHandleNatives_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::MethodHandleNatives_klass_knum)]); } static InstanceKlass* LambdaForm_klass() { return check_klass(_klasses[static_cast(vmClassID::LambdaForm_klass_knum)]); } static InstanceKlass** LambdaForm_klass_addr() { return &_klasses[static_cast(vmClassID::LambdaForm_klass_knum)]; } static bool LambdaForm_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::LambdaForm_klass_knum)]); } static InstanceKlass* MethodType_klass() { return check_klass(_klasses[static_cast(vmClassID::MethodType_klass_knum)]); } static InstanceKlass** MethodType_klass_addr() { return &_klasses[static_cast(vmClassID::MethodType_klass_knum)]; } static bool MethodType_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::MethodType_klass_knum)]); } static InstanceKlass* BootstrapMethodError_klass() { return check_klass(_klasses[static_cast(vmClassID::BootstrapMethodError_klass_knum)]); } static InstanceKlass** BootstrapMethodError_klass_addr() { return &_klasses[static_cast(vmClassID::BootstrapMethodError_klass_knum)]; } static bool BootstrapMethodError_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::BootstrapMethodError_klass_knum)]); } static InstanceKlass* CallSite_klass() { return check_klass(_klasses[static_cast(vmClassID::CallSite_klass_knum)]); } static InstanceKlass** CallSite_klass_addr() { return &_klasses[static_cast(vmClassID::CallSite_klass_knum)]; } static bool CallSite_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::CallSite_klass_knum)]); } static InstanceKlass* NativeEntryPoint_klass() { return check_klass(_klasses[static_cast(vmClassID::NativeEntryPoint_klass_knum)]); } static InstanceKlass** NativeEntryPoint_klass_addr() { return &_klasses[static_cast(vmClassID::NativeEntryPoint_klass_knum)]; } static bool NativeEntryPoint_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::NativeEntryPoint_klass_knum)]); } static InstanceKlass* ABIDescriptor_klass() { return check_klass(_klasses[static_cast(vmClassID::ABIDescriptor_klass_knum)]); } static InstanceKlass** ABIDescriptor_klass_addr() { return &_klasses[static_cast(vmClassID::ABIDescriptor_klass_knum)]; } static bool ABIDescriptor_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ABIDescriptor_klass_knum)]); } static InstanceKlass* VMStorage_klass() { return check_klass(_klasses[static_cast(vmClassID::VMStorage_klass_knum)]); } static InstanceKlass** VMStorage_klass_addr() { return &_klasses[static_cast(vmClassID::VMStorage_klass_knum)]; } static bool VMStorage_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::VMStorage_klass_knum)]); } static InstanceKlass* CallConv_klass() { return check_klass(_klasses[static_cast(vmClassID::CallConv_klass_knum)]); } static InstanceKlass** CallConv_klass_addr() { return &_klasses[static_cast(vmClassID::CallConv_klass_knum)]; } static bool CallConv_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::CallConv_klass_knum)]); } static InstanceKlass* Context_klass() { return check_klass(_klasses[static_cast(vmClassID::Context_klass_knum)]); } static InstanceKlass** Context_klass_addr() { return &_klasses[static_cast(vmClassID::Context_klass_knum)]; } static bool Context_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Context_klass_knum)]); } static InstanceKlass* ConstantCallSite_klass() { return check_klass(_klasses[static_cast(vmClassID::ConstantCallSite_klass_knum)]); } static InstanceKlass** ConstantCallSite_klass_addr() { return &_klasses[static_cast(vmClassID::ConstantCallSite_klass_knum)]; } static bool ConstantCallSite_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ConstantCallSite_klass_knum)]); } static InstanceKlass* MutableCallSite_klass() { return check_klass(_klasses[static_cast(vmClassID::MutableCallSite_klass_knum)]); } static InstanceKlass** MutableCallSite_klass_addr() { return &_klasses[static_cast(vmClassID::MutableCallSite_klass_knum)]; } static bool MutableCallSite_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::MutableCallSite_klass_knum)]); } static InstanceKlass* VolatileCallSite_klass() { return check_klass(_klasses[static_cast(vmClassID::VolatileCallSite_klass_knum)]); } static InstanceKlass** VolatileCallSite_klass_addr() { return &_klasses[static_cast(vmClassID::VolatileCallSite_klass_knum)]; } static bool VolatileCallSite_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::VolatileCallSite_klass_knum)]); } static InstanceKlass* AssertionStatusDirectives_klass() { return check_klass(_klasses[static_cast(vmClassID::AssertionStatusDirectives_klass_knum)]); } static InstanceKlass** AssertionStatusDirectives_klass_addr() { return &_klasses[static_cast(vmClassID::AssertionStatusDirectives_klass_knum)]; } static bool AssertionStatusDirectives_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::AssertionStatusDirectives_klass_knum)]); } static InstanceKlass* StringBuffer_klass() { return check_klass(_klasses[static_cast(vmClassID::StringBuffer_klass_knum)]); } static InstanceKlass** StringBuffer_klass_addr() { return &_klasses[static_cast(vmClassID::StringBuffer_klass_knum)]; } static bool StringBuffer_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::StringBuffer_klass_knum)]); } static InstanceKlass* StringBuilder_klass() { return check_klass(_klasses[static_cast(vmClassID::StringBuilder_klass_knum)]); } static InstanceKlass** StringBuilder_klass_addr() { return &_klasses[static_cast(vmClassID::StringBuilder_klass_knum)]; } static bool StringBuilder_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::StringBuilder_klass_knum)]); } static InstanceKlass* UnsafeConstants_klass() { return check_klass(_klasses[static_cast(vmClassID::UnsafeConstants_klass_knum)]); } static InstanceKlass** UnsafeConstants_klass_addr() { return &_klasses[static_cast(vmClassID::UnsafeConstants_klass_knum)]; } static bool UnsafeConstants_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::UnsafeConstants_klass_knum)]); } static InstanceKlass* internal_Unsafe_klass() { return check_klass(_klasses[static_cast(vmClassID::internal_Unsafe_klass_knum)]); } static InstanceKlass** internal_Unsafe_klass_addr() { return &_klasses[static_cast(vmClassID::internal_Unsafe_klass_knum)]; } static bool internal_Unsafe_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::internal_Unsafe_klass_knum)]); } static InstanceKlass* module_Modules_klass() { return check_klass(_klasses[static_cast(vmClassID::module_Modules_klass_knum)]); } static InstanceKlass** module_Modules_klass_addr() { return &_klasses[static_cast(vmClassID::module_Modules_klass_knum)]; } static bool module_Modules_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::module_Modules_klass_knum)]); } static InstanceKlass* ByteArrayInputStream_klass() { return check_klass(_klasses[static_cast(vmClassID::ByteArrayInputStream_klass_knum)]); } static InstanceKlass** ByteArrayInputStream_klass_addr() { return &_klasses[static_cast(vmClassID::ByteArrayInputStream_klass_knum)]; } static bool ByteArrayInputStream_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ByteArrayInputStream_klass_knum)]); } static InstanceKlass* URL_klass() { return check_klass(_klasses[static_cast(vmClassID::URL_klass_knum)]); } static InstanceKlass** URL_klass_addr() { return &_klasses[static_cast(vmClassID::URL_klass_knum)]; } static bool URL_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::URL_klass_knum)]); } static InstanceKlass* URLClassLoader_klass() { return check_klass(_klasses[static_cast(vmClassID::URLClassLoader_klass_knum)]); } static InstanceKlass** URLClassLoader_klass_addr() { return &_klasses[static_cast(vmClassID::URLClassLoader_klass_knum)]; } static bool URLClassLoader_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::URLClassLoader_klass_knum)]); } static InstanceKlass* Enum_klass() { return check_klass(_klasses[static_cast(vmClassID::Enum_klass_knum)]); } static InstanceKlass** Enum_klass_addr() { return &_klasses[static_cast(vmClassID::Enum_klass_knum)]; } static bool Enum_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Enum_klass_knum)]); } static InstanceKlass* Jar_Manifest_klass() { return check_klass(_klasses[static_cast(vmClassID::Jar_Manifest_klass_knum)]); } static InstanceKlass** Jar_Manifest_klass_addr() { return &_klasses[static_cast(vmClassID::Jar_Manifest_klass_knum)]; } static bool Jar_Manifest_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Jar_Manifest_klass_knum)]); } static InstanceKlass* jdk_internal_loader_BuiltinClassLoader_klass() { return check_klass(_klasses[static_cast(vmClassID::jdk_internal_loader_BuiltinClassLoader_klass_knum)]); } static InstanceKlass** jdk_internal_loader_BuiltinClassLoader_klass_addr() { return &_klasses[static_cast(vmClassID::jdk_internal_loader_BuiltinClassLoader_klass_knum)]; } static bool jdk_internal_loader_BuiltinClassLoader_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::jdk_internal_loader_BuiltinClassLoader_klass_knum)]); } static InstanceKlass* jdk_internal_loader_ClassLoaders_klass() { return check_klass(_klasses[static_cast(vmClassID::jdk_internal_loader_ClassLoaders_klass_knum)]); } static InstanceKlass** jdk_internal_loader_ClassLoaders_klass_addr() { return &_klasses[static_cast(vmClassID::jdk_internal_loader_ClassLoaders_klass_knum)]; } static bool jdk_internal_loader_ClassLoaders_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::jdk_internal_loader_ClassLoaders_klass_knum)]); } static InstanceKlass* jdk_internal_loader_ClassLoaders_AppClassLoader_klass() { return check_klass(_klasses[static_cast(vmClassID::jdk_internal_loader_ClassLoaders_AppClassLoader_klass_knum)]); } static InstanceKlass** jdk_internal_loader_ClassLoaders_AppClassLoader_klass_addr() { return &_klasses[static_cast(vmClassID::jdk_internal_loader_ClassLoaders_AppClassLoader_klass_knum)]; } static bool jdk_internal_loader_ClassLoaders_AppClassLoader_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::jdk_internal_loader_ClassLoaders_AppClassLoader_klass_knum)]); } static InstanceKlass* jdk_internal_loader_ClassLoaders_PlatformClassLoader_klass() { return check_klass(_klasses[static_cast(vmClassID::jdk_internal_loader_ClassLoaders_PlatformClassLoader_klass_knum)]); } static InstanceKlass** jdk_internal_loader_ClassLoaders_PlatformClassLoader_klass_addr() { return &_klasses[static_cast(vmClassID::jdk_internal_loader_ClassLoaders_PlatformClassLoader_klass_knum)]; } static bool jdk_internal_loader_ClassLoaders_PlatformClassLoader_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::jdk_internal_loader_ClassLoaders_PlatformClassLoader_klass_knum)]); } static InstanceKlass* CodeSource_klass() { return check_klass(_klasses[static_cast(vmClassID::CodeSource_klass_knum)]); } static InstanceKlass** CodeSource_klass_addr() { return &_klasses[static_cast(vmClassID::CodeSource_klass_knum)]; } static bool CodeSource_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::CodeSource_klass_knum)]); } static InstanceKlass* ConcurrentHashMap_klass() { return check_klass(_klasses[static_cast(vmClassID::ConcurrentHashMap_klass_knum)]); } static InstanceKlass** ConcurrentHashMap_klass_addr() { return &_klasses[static_cast(vmClassID::ConcurrentHashMap_klass_knum)]; } static bool ConcurrentHashMap_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ConcurrentHashMap_klass_knum)]); } static InstanceKlass* ArrayList_klass() { return check_klass(_klasses[static_cast(vmClassID::ArrayList_klass_knum)]); } static InstanceKlass** ArrayList_klass_addr() { return &_klasses[static_cast(vmClassID::ArrayList_klass_knum)]; } static bool ArrayList_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ArrayList_klass_knum)]); } static InstanceKlass* StackTraceElement_klass() { return check_klass(_klasses[static_cast(vmClassID::StackTraceElement_klass_knum)]); } static InstanceKlass** StackTraceElement_klass_addr() { return &_klasses[static_cast(vmClassID::StackTraceElement_klass_knum)]; } static bool StackTraceElement_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::StackTraceElement_klass_knum)]); } static InstanceKlass* nio_Buffer_klass() { return check_klass(_klasses[static_cast(vmClassID::nio_Buffer_klass_knum)]); } static InstanceKlass** nio_Buffer_klass_addr() { return &_klasses[static_cast(vmClassID::nio_Buffer_klass_knum)]; } static bool nio_Buffer_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::nio_Buffer_klass_knum)]); } static InstanceKlass* StackWalker_klass() { return check_klass(_klasses[static_cast(vmClassID::StackWalker_klass_knum)]); } static InstanceKlass** StackWalker_klass_addr() { return &_klasses[static_cast(vmClassID::StackWalker_klass_knum)]; } static bool StackWalker_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::StackWalker_klass_knum)]); } static InstanceKlass* AbstractStackWalker_klass() { return check_klass(_klasses[static_cast(vmClassID::AbstractStackWalker_klass_knum)]); } static InstanceKlass** AbstractStackWalker_klass_addr() { return &_klasses[static_cast(vmClassID::AbstractStackWalker_klass_knum)]; } static bool AbstractStackWalker_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::AbstractStackWalker_klass_knum)]); } static InstanceKlass* ClassFrameInfo_klass() { return check_klass(_klasses[static_cast(vmClassID::ClassFrameInfo_klass_knum)]); } static InstanceKlass** ClassFrameInfo_klass_addr() { return &_klasses[static_cast(vmClassID::ClassFrameInfo_klass_knum)]; } static bool ClassFrameInfo_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ClassFrameInfo_klass_knum)]); } static InstanceKlass* StackFrameInfo_klass() { return check_klass(_klasses[static_cast(vmClassID::StackFrameInfo_klass_knum)]); } static InstanceKlass** StackFrameInfo_klass_addr() { return &_klasses[static_cast(vmClassID::StackFrameInfo_klass_knum)]; } static bool StackFrameInfo_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::StackFrameInfo_klass_knum)]); } static InstanceKlass* LiveStackFrameInfo_klass() { return check_klass(_klasses[static_cast(vmClassID::LiveStackFrameInfo_klass_knum)]); } static InstanceKlass** LiveStackFrameInfo_klass_addr() { return &_klasses[static_cast(vmClassID::LiveStackFrameInfo_klass_knum)]; } static bool LiveStackFrameInfo_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::LiveStackFrameInfo_klass_knum)]); } static InstanceKlass* java_util_concurrent_locks_AbstractOwnableSynchronizer_klass() { return check_klass(_klasses[static_cast(vmClassID::java_util_concurrent_locks_AbstractOwnableSynchronizer_klass_knum)]); } static InstanceKlass** java_util_concurrent_locks_AbstractOwnableSynchronizer_klass_addr() { return &_klasses[static_cast(vmClassID::java_util_concurrent_locks_AbstractOwnableSynchronizer_klass_knum)]; } static bool java_util_concurrent_locks_AbstractOwnableSynchronizer_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::java_util_concurrent_locks_AbstractOwnableSynchronizer_klass_knum)]); } static InstanceKlass* Boolean_klass() { return check_klass(_klasses[static_cast(vmClassID::Boolean_klass_knum)]); } static InstanceKlass** Boolean_klass_addr() { return &_klasses[static_cast(vmClassID::Boolean_klass_knum)]; } static bool Boolean_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Boolean_klass_knum)]); } static InstanceKlass* Character_klass() { return check_klass(_klasses[static_cast(vmClassID::Character_klass_knum)]); } static InstanceKlass** Character_klass_addr() { return &_klasses[static_cast(vmClassID::Character_klass_knum)]; } static bool Character_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Character_klass_knum)]); } static InstanceKlass* Float_klass() { return check_klass(_klasses[static_cast(vmClassID::Float_klass_knum)]); } static InstanceKlass** Float_klass_addr() { return &_klasses[static_cast(vmClassID::Float_klass_knum)]; } static bool Float_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Float_klass_knum)]); } static InstanceKlass* Double_klass() { return check_klass(_klasses[static_cast(vmClassID::Double_klass_knum)]); } static InstanceKlass** Double_klass_addr() { return &_klasses[static_cast(vmClassID::Double_klass_knum)]; } static bool Double_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Double_klass_knum)]); } static InstanceKlass* Byte_klass() { return check_klass(_klasses[static_cast(vmClassID::Byte_klass_knum)]); } static InstanceKlass** Byte_klass_addr() { return &_klasses[static_cast(vmClassID::Byte_klass_knum)]; } static bool Byte_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Byte_klass_knum)]); } static InstanceKlass* Short_klass() { return check_klass(_klasses[static_cast(vmClassID::Short_klass_knum)]); } static InstanceKlass** Short_klass_addr() { return &_klasses[static_cast(vmClassID::Short_klass_knum)]; } static bool Short_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Short_klass_knum)]); } static InstanceKlass* Integer_klass() { return check_klass(_klasses[static_cast(vmClassID::Integer_klass_knum)]); } static InstanceKlass** Integer_klass_addr() { return &_klasses[static_cast(vmClassID::Integer_klass_knum)]; } static bool Integer_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Integer_klass_knum)]); } static InstanceKlass* Long_klass() { return check_klass(_klasses[static_cast(vmClassID::Long_klass_knum)]); } static InstanceKlass** Long_klass_addr() { return &_klasses[static_cast(vmClassID::Long_klass_knum)]; } static bool Long_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Long_klass_knum)]); } static InstanceKlass* Iterator_klass() { return check_klass(_klasses[static_cast(vmClassID::Iterator_klass_knum)]); } static InstanceKlass** Iterator_klass_addr() { return &_klasses[static_cast(vmClassID::Iterator_klass_knum)]; } static bool Iterator_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Iterator_klass_knum)]); } static InstanceKlass* RecordComponent_klass() { return check_klass(_klasses[static_cast(vmClassID::RecordComponent_klass_knum)]); } static InstanceKlass** RecordComponent_klass_addr() { return &_klasses[static_cast(vmClassID::RecordComponent_klass_knum)]; } static bool RecordComponent_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::RecordComponent_klass_knum)]); } static InstanceKlass* vector_VectorSupport_klass() { return check_klass(_klasses[static_cast(vmClassID::vector_VectorSupport_klass_knum)]); } static InstanceKlass** vector_VectorSupport_klass_addr() { return &_klasses[static_cast(vmClassID::vector_VectorSupport_klass_knum)]; } static bool vector_VectorSupport_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::vector_VectorSupport_klass_knum)]); } static InstanceKlass* vector_VectorPayload_klass() { return check_klass(_klasses[static_cast(vmClassID::vector_VectorPayload_klass_knum)]); } static InstanceKlass** vector_VectorPayload_klass_addr() { return &_klasses[static_cast(vmClassID::vector_VectorPayload_klass_knum)]; } static bool vector_VectorPayload_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::vector_VectorPayload_klass_knum)]); } static InstanceKlass* vector_Vector_klass() { return check_klass(_klasses[static_cast(vmClassID::vector_Vector_klass_knum)]); } static InstanceKlass** vector_Vector_klass_addr() { return &_klasses[static_cast(vmClassID::vector_Vector_klass_knum)]; } static bool vector_Vector_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::vector_Vector_klass_knum)]); } static InstanceKlass* vector_VectorMask_klass() { return check_klass(_klasses[static_cast(vmClassID::vector_VectorMask_klass_knum)]); } static InstanceKlass** vector_VectorMask_klass_addr() { return &_klasses[static_cast(vmClassID::vector_VectorMask_klass_knum)]; } static bool vector_VectorMask_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::vector_VectorMask_klass_knum)]); } static InstanceKlass* vector_VectorShuffle_klass() { return check_klass(_klasses[static_cast(vmClassID::vector_VectorShuffle_klass_knum)]); } static InstanceKlass** vector_VectorShuffle_klass_addr() { return &_klasses[static_cast(vmClassID::vector_VectorShuffle_klass_knum)]; } static bool vector_VectorShuffle_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::vector_VectorShuffle_klass_knum)]); } static InstanceKlass* FillerObject_klass() { return check_klass(_klasses[static_cast(vmClassID::FillerObject_klass_knum)]); } static InstanceKlass** FillerObject_klass_addr() { return &_klasses[static_cast(vmClassID::FillerObject_klass_knum)]; } static bool FillerObject_klass_is_loaded() { return is_loaded(_klasses[static_cast(vmClassID::FillerObject_klass_knum)]); }; + + + static InstanceKlass* klass_at(vmClassID id) { + return _klasses[as_int(id)]; + } + + static InstanceKlass** klass_addr_at(vmClassID id) { + return &_klasses[as_int(id)]; + } + + static void metaspace_pointers_do(MetaspaceClosure* it); + static void resolve_all(JavaThread* __the_thread__); + + static BasicType box_klass_type(Klass* k); + + static InstanceKlass* box_klass(BasicType t) { + ; + return check_klass(_box_klasses[t]); + } + + static bool Object_klass_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Object_klass_knum)]); } + static bool Class_klass_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Class_klass_knum)]); } + static bool Cloneable_klass_loaded() { return is_loaded(_klasses[static_cast(vmClassID::Cloneable_klass_knum)]); } + static bool Parameter_klass_loaded() { return is_loaded(_klasses[static_cast(vmClassID::reflect_Parameter_klass_knum)]); } + static bool ClassLoader_klass_loaded() { return is_loaded(_klasses[static_cast(vmClassID::ClassLoader_klass_knum)]); } +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/memory/referenceType.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/memory/referenceType.hpp" +enum ReferenceType { + REF_NONE, + REF_SOFT, + REF_WEAK, + REF_FINAL, + REF_PHANTOM +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/annotations.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/annotations.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/array.hpp" 1 +# 36 "/home/rehn/source/jdk/open/src/hotspot/share/oops/array.hpp" +template +class Array: public MetaspaceObj { + friend class ArchiveBuilder; + friend class MetadataFactory; + friend class VMStructs; + friend class JVMCIVMStructs; + friend class MethodHandleCompiler; + friend class WhiteBox; + friend class FieldInfoStream; +protected: + int _length; + T _data[1]; + + void initialize(int length) { + _length = length; + } + + private: + Array(Array const&) = delete; Array& operator=(Array const&) = delete; + + inline void* operator new(size_t size, ClassLoaderData* loader_data, int length, JavaThread* __the_thread__) throw(); + + static size_t byte_sizeof(int length, size_t elm_byte_size) { + return sizeof(Array) + MAX2(length - 1, 0) * elm_byte_size; + } + static size_t byte_sizeof(int length) { return byte_sizeof(length, sizeof(T)); } + + + + + static int bytes_to_length(size_t bytes) { + ; + + if (sizeof(Array) >= bytes) { + return 0; + } + + size_t left = bytes - sizeof(Array); + ; + + size_t elements = left / sizeof(T); + ; + + int length = (int)elements; + + + + ; + + return length; + } + + explicit Array(int length) : _length(length) { + ; + } + + Array(int length, T init) : _length(length) { + ; + for (int i = 0; i < length; i++) { + data()[i] = init; + } + } + + public: + + + int length() const { return _length; } + + T* data() { + return reinterpret_cast( + reinterpret_cast(this) + base_offset_in_bytes()); + } + + const T* data() const { + return reinterpret_cast( + reinterpret_cast(this) + base_offset_in_bytes()); + } + + bool is_empty() const { return length() == 0; } + + int index_of(const T& x) const { + int i = length(); + while (i-- > 0 && data()[i] != x) ; + + return i; + } + + + bool contains(const T& x) const { return index_of(x) >= 0; } + + T at(int i) const { ; return data()[i]; } + void at_put(const int i, const T& x) { ; data()[i] = x; } + T* adr_at(const int i) { ; return &data()[i]; } + int find(const T& x) { return index_of(x); } + + T at_acquire(const int i) { return Atomic::load_acquire(adr_at(i)); } + void release_at_put(int i, T x) { Atomic::release_store(adr_at(i), x); } + + static int size(int length) { + size_t bytes = align_up(byte_sizeof(length), BytesPerWord); + size_t words = bytes / BytesPerWord; + + ; + + return (int)words; + } + int size() { + return size(_length); + } + + static int length_offset_in_bytes() { return (int) (([]() { alignas(16) char space[sizeof (Array)]; Array* dummyObj = (Array*)space; char* c = (char*)(void*)&dummyObj->_length; return (size_t)(c - space); }())); } + + static int base_offset_in_bytes() { return (int) (([]() { alignas(16) char space[sizeof (Array)]; Array* dummyObj = (Array*)space; char* c = (char*)(void*)&dummyObj->_data; return (size_t)(c - space); }())); }; + + + void print_value_on(outputStream* st) const { + st->print("Array(" "0x%016" +# 152 "/home/rehn/source/jdk/open/src/hotspot/share/oops/array.hpp" 3 + "l" "x" +# 152 "/home/rehn/source/jdk/open/src/hotspot/share/oops/array.hpp" + ")", p2i(this)); + } +# 163 "/home/rehn/source/jdk/open/src/hotspot/share/oops/array.hpp" +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/annotations.hpp" 2 + + + + + +class ClassLoaderData; +class outputStream; + +typedef Array AnnotationArray; + + + + + +class Annotations: public MetaspaceObj { + friend class VMStructs; + friend class JVMCIVMStructs; + + + + + + AnnotationArray* _class_annotations; + + + Array* _fields_annotations; + + AnnotationArray* _class_type_annotations; + Array* _fields_type_annotations; + + public: + + static Annotations* allocate(ClassLoaderData* loader_data, JavaThread* __the_thread__); + + static void free_contents(ClassLoaderData* loader_data, Array* p); + void deallocate_contents(ClassLoaderData* loader_data); + + + + static int size() { return sizeof(Annotations) / wordSize; } + + + static bool is_read_only_by_default() { return true; } + + + Annotations() : _class_annotations(nullptr), + _fields_annotations(nullptr), + _class_type_annotations(nullptr), + _fields_type_annotations(nullptr) {} + + AnnotationArray* class_annotations() const { return _class_annotations; } + Array* fields_annotations() const { return _fields_annotations; } + AnnotationArray* class_type_annotations() const { return _class_type_annotations; } + Array* fields_type_annotations() const { return _fields_type_annotations; } + + void set_class_annotations(AnnotationArray* md) { _class_annotations = md; } + void set_fields_annotations(Array* md) { _fields_annotations = md; } + void set_class_type_annotations(AnnotationArray* cta) { _class_type_annotations = cta; } + void set_fields_type_annotations(Array* fta) { _fields_type_annotations = fta; } + + + static typeArrayOop make_java_array(AnnotationArray* annotations, JavaThread* __the_thread__); + + bool is_klass() const { return false; } + void metaspace_pointers_do(MetaspaceClosure* it); + MetaspaceObj::Type type() const { return AnnotationsType; } + + private: + static julong count_bytes(Array* p); + public: + const char* internal_name() const { return "{annotations}"; } + + + + void print_value_on(outputStream* st) const; +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constMethod.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constMethod.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constMethodFlags.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constMethodFlags.hpp" +class outputStream; + + + + + +class ConstMethodFlags { + friend class VMStructs; + friend class JVMCIVMStructs; +# 64 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constMethodFlags.hpp" + enum { + _misc_has_linenumber_table = 1 << 0, _misc_has_checked_exceptions = 1 << 1, _misc_has_localvariable_table = 1 << 2, _misc_has_exception_table = 1 << 3, _misc_has_generic_signature = 1 << 4, _misc_has_method_parameters = 1 << 5, _misc_is_overpass = 1 << 6, _misc_has_method_annotations = 1 << 7, _misc_has_parameter_annotations = 1 << 8, _misc_has_type_annotations = 1 << 9, _misc_has_default_annotations = 1 << 10, _misc_caller_sensitive = 1 << 11, _misc_is_hidden = 1 << 12, _misc_has_injected_profile = 1 << 13, _misc_intrinsic_candidate = 1 << 14, _misc_reserved_stack_access = 1 << 15, _misc_is_scoped = 1 << 16, _misc_changes_current_thread = 1 << 17, _misc_jvmti_mount_transition = 1 << 18, + }; + + + + u4 _flags; + + public: + + ConstMethodFlags() : _flags(0) {} + + + + + + + + bool has_linenumber_table() const { return (_flags & _misc_has_linenumber_table) != 0; } void set_has_linenumber_table() { _flags |= _misc_has_linenumber_table; } bool has_checked_exceptions() const { return (_flags & _misc_has_checked_exceptions) != 0; } void set_has_checked_exceptions() { _flags |= _misc_has_checked_exceptions; } bool has_localvariable_table() const { return (_flags & _misc_has_localvariable_table) != 0; } void set_has_localvariable_table() { _flags |= _misc_has_localvariable_table; } bool has_exception_table() const { return (_flags & _misc_has_exception_table) != 0; } void set_has_exception_table() { _flags |= _misc_has_exception_table; } bool has_generic_signature() const { return (_flags & _misc_has_generic_signature) != 0; } void set_has_generic_signature() { _flags |= _misc_has_generic_signature; } bool has_method_parameters() const { return (_flags & _misc_has_method_parameters) != 0; } void set_has_method_parameters() { _flags |= _misc_has_method_parameters; } bool is_overpass() const { return (_flags & _misc_is_overpass) != 0; } void set_is_overpass() { _flags |= _misc_is_overpass; } bool has_method_annotations() const { return (_flags & _misc_has_method_annotations) != 0; } void set_has_method_annotations() { _flags |= _misc_has_method_annotations; } bool has_parameter_annotations() const { return (_flags & _misc_has_parameter_annotations) != 0; } void set_has_parameter_annotations() { _flags |= _misc_has_parameter_annotations; } bool has_type_annotations() const { return (_flags & _misc_has_type_annotations) != 0; } void set_has_type_annotations() { _flags |= _misc_has_type_annotations; } bool has_default_annotations() const { return (_flags & _misc_has_default_annotations) != 0; } void set_has_default_annotations() { _flags |= _misc_has_default_annotations; } bool caller_sensitive() const { return (_flags & _misc_caller_sensitive) != 0; } void set_caller_sensitive() { _flags |= _misc_caller_sensitive; } bool is_hidden() const { return (_flags & _misc_is_hidden) != 0; } void set_is_hidden() { _flags |= _misc_is_hidden; } bool has_injected_profile() const { return (_flags & _misc_has_injected_profile) != 0; } void set_has_injected_profile() { _flags |= _misc_has_injected_profile; } bool intrinsic_candidate() const { return (_flags & _misc_intrinsic_candidate) != 0; } void set_intrinsic_candidate() { _flags |= _misc_intrinsic_candidate; } bool reserved_stack_access() const { return (_flags & _misc_reserved_stack_access) != 0; } void set_reserved_stack_access() { _flags |= _misc_reserved_stack_access; } bool is_scoped() const { return (_flags & _misc_is_scoped) != 0; } void set_is_scoped() { _flags |= _misc_is_scoped; } bool changes_current_thread() const { return (_flags & _misc_changes_current_thread) != 0; } void set_changes_current_thread() { _flags |= _misc_changes_current_thread; } bool jvmti_mount_transition() const { return (_flags & _misc_jvmti_mount_transition) != 0; } void set_jvmti_mount_transition() { _flags |= _misc_jvmti_mount_transition; } + + + int as_int() const { return _flags; } + void print_on(outputStream* st) const; +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constMethod.hpp" 2 +# 93 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constMethod.hpp" +class CheckedExceptionElement { + public: + u2 class_cp_index; +}; + + + +class LocalVariableTableElement { + public: + u2 start_bci; + u2 length; + u2 name_cp_index; + u2 descriptor_cp_index; + u2 signature_cp_index; + u2 slot; +}; + + +class ExceptionTableElement { + public: + u2 start_pc; + u2 end_pc; + u2 handler_pc; + u2 catch_type_index; +}; + + +class MethodParametersElement { + public: + u2 name_cp_index; + u2 flags; +}; +# 145 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constMethod.hpp" +class InlineTableSizes : StackObj { + + int _localvariable_table_length; int _compressed_linenumber_size; int _exception_table_length; int _checked_exceptions_length; int _method_parameters_length; int _generic_signature_index; int _method_annotations_length; int _parameter_annotations_length; int _type_annotations_length; int _default_annotations_length; + int _end; + public: + InlineTableSizes( + int localvariable_table_length, int compressed_linenumber_size, int exception_table_length, int checked_exceptions_length, int method_parameters_length, int generic_signature_index, int method_annotations_length, int parameter_annotations_length, int type_annotations_length, int default_annotations_length, + int end) : + _localvariable_table_length(localvariable_table_length), _compressed_linenumber_size(compressed_linenumber_size), _exception_table_length(exception_table_length), _checked_exceptions_length(checked_exceptions_length), _method_parameters_length(method_parameters_length), _generic_signature_index(generic_signature_index), _method_annotations_length(method_annotations_length), _parameter_annotations_length(parameter_annotations_length), _type_annotations_length(type_annotations_length), _default_annotations_length(default_annotations_length), + _end(end) {} + + + InlineTableSizes() : + _localvariable_table_length(0), _compressed_linenumber_size(0), _exception_table_length(0), _checked_exceptions_length(0), _method_parameters_length(0), _generic_signature_index(0), _method_annotations_length(0), _parameter_annotations_length(0), _type_annotations_length(0), _default_annotations_length(0), + _end(0) {} + + + int localvariable_table_length() const { return _localvariable_table_length; } int compressed_linenumber_size() const { return _compressed_linenumber_size; } int exception_table_length() const { return _exception_table_length; } int checked_exceptions_length() const { return _checked_exceptions_length; } int method_parameters_length() const { return _method_parameters_length; } int generic_signature_index() const { return _generic_signature_index; } int method_annotations_length() const { return _method_annotations_length; } int parameter_annotations_length() const { return _parameter_annotations_length; } int type_annotations_length() const { return _type_annotations_length; } int default_annotations_length() const { return _default_annotations_length; } +}; + + + + + + +class ConstMethod : public MetaspaceObj { + friend class VMStructs; + friend class JVMCIVMStructs; + +public: + typedef enum { NORMAL, OVERPASS } MethodType; + +private: + + + + + + + + volatile uint64_t _fingerprint; + + + + + ConstantPool* _constants; + + + Array* _stackmap_data; + + int _constMethod_size; + ConstMethodFlags _flags; + u1 _result_type; + + + u2 _code_size; + u2 _name_index; + u2 _signature_index; + u2 _method_idnum; + + + u2 _max_stack; + u2 _max_locals; + u2 _size_of_parameters; + u2 _num_stack_arg_slots; + u2 _orig_method_idnum; + + + ConstMethod(int byte_code_size, + InlineTableSizes* sizes, + MethodType is_overpass, + int size); + + void set_size_of_parameters(int size) { _size_of_parameters = checked_cast(size); } + void set_num_stack_arg_slots(int n) { _num_stack_arg_slots = checked_cast(n); } + void set_result_type(BasicType rt) { ; + _result_type = (u1)rt; } +public: + + static ConstMethod* allocate(ClassLoaderData* loader_data, + int byte_code_size, + InlineTableSizes* sizes, + MethodType mt, + JavaThread* __the_thread__); + + + void set_inlined_tables_length(InlineTableSizes* sizes); + + + + + + bool has_linenumber_table() const { return _flags.has_linenumber_table(); } void set_has_linenumber_table() { _flags.set_has_linenumber_table(); } bool has_checked_exceptions() const { return _flags.has_checked_exceptions(); } void set_has_checked_exceptions() { _flags.set_has_checked_exceptions(); } bool has_localvariable_table() const { return _flags.has_localvariable_table(); } void set_has_localvariable_table() { _flags.set_has_localvariable_table(); } bool has_exception_table() const { return _flags.has_exception_table(); } void set_has_exception_table() { _flags.set_has_exception_table(); } bool has_generic_signature() const { return _flags.has_generic_signature(); } void set_has_generic_signature() { _flags.set_has_generic_signature(); } bool has_method_parameters() const { return _flags.has_method_parameters(); } void set_has_method_parameters() { _flags.set_has_method_parameters(); } bool is_overpass() const { return _flags.is_overpass(); } void set_is_overpass() { _flags.set_is_overpass(); } bool has_method_annotations() const { return _flags.has_method_annotations(); } void set_has_method_annotations() { _flags.set_has_method_annotations(); } bool has_parameter_annotations() const { return _flags.has_parameter_annotations(); } void set_has_parameter_annotations() { _flags.set_has_parameter_annotations(); } bool has_type_annotations() const { return _flags.has_type_annotations(); } void set_has_type_annotations() { _flags.set_has_type_annotations(); } bool has_default_annotations() const { return _flags.has_default_annotations(); } void set_has_default_annotations() { _flags.set_has_default_annotations(); } bool caller_sensitive() const { return _flags.caller_sensitive(); } void set_caller_sensitive() { _flags.set_caller_sensitive(); } bool is_hidden() const { return _flags.is_hidden(); } void set_is_hidden() { _flags.set_is_hidden(); } bool has_injected_profile() const { return _flags.has_injected_profile(); } void set_has_injected_profile() { _flags.set_has_injected_profile(); } bool intrinsic_candidate() const { return _flags.intrinsic_candidate(); } void set_intrinsic_candidate() { _flags.set_intrinsic_candidate(); } bool reserved_stack_access() const { return _flags.reserved_stack_access(); } void set_reserved_stack_access() { _flags.set_reserved_stack_access(); } bool is_scoped() const { return _flags.is_scoped(); } void set_is_scoped() { _flags.set_is_scoped(); } bool changes_current_thread() const { return _flags.changes_current_thread(); } void set_changes_current_thread() { _flags.set_changes_current_thread(); } bool jvmti_mount_transition() const { return _flags.jvmti_mount_transition(); } void set_jvmti_mount_transition() { _flags.set_jvmti_mount_transition(); } + + + MethodType method_type() const { + return (_flags.is_overpass()) ? OVERPASS : NORMAL; + } + + void set_method_type(MethodType mt) { + if (mt != NORMAL) { + set_is_overpass(); + } + } + + + ConstantPool* constants() const { return _constants; } + void set_constants(ConstantPool* c) { _constants = c; } + + Method* method() const; + + + Array* stackmap_data() const { return _stackmap_data; } + void set_stackmap_data(Array* sd) { _stackmap_data = sd; } + void copy_stackmap_data(ClassLoaderData* loader_data, u1* sd, int length, JavaThread* __the_thread__); + bool has_stackmap_table() const { return _stackmap_data != nullptr; } + + void init_fingerprint() { + const uint64_t initval = (0x8000000000000000ULL); + _fingerprint = initval; + } + + uint64_t fingerprint() const { + + + uint high_fp = (uint)(_fingerprint >> 32); + if ((int) _fingerprint == 0 || high_fp == 0x80000000) { + return 0L; + } else { + return _fingerprint; + } + } + + uint64_t set_fingerprint(uint64_t new_fingerprint) { + + + + + _fingerprint = new_fingerprint; + + ; + + ; + return new_fingerprint; + } + + + u2 name_index() const { return _name_index; } + void set_name_index(int index) { _name_index = checked_cast(index); } + + + u2 signature_index() const { return _signature_index; } + void set_signature_index(int index) { _signature_index = checked_cast(index); } + + + u2 generic_signature_index() const { + if (has_generic_signature()) { + return *generic_signature_index_addr(); + } else { + return 0; + } + } + void set_generic_signature_index(u2 index) { + ; + u2* addr = generic_signature_index_addr(); + *addr = index; + } + + + static int header_size() { + return align_up((int)sizeof(ConstMethod), wordSize) / wordSize; + } + + + static int size(int code_size, InlineTableSizes* sizes); + + int size() const { return _constMethod_size;} + void set_constMethod_size(int size) { _constMethod_size = size; } + + + static bool is_read_only_by_default() { return true; } + + + u2 code_size() const { return _code_size; } + void set_code_size(int size) { + + ; + ; + _code_size = (u2)size; + } + + + + u_char* compressed_linenumber_table() const; + u2* generic_signature_index_addr() const; + u2* checked_exceptions_length_addr() const; + u2* localvariable_table_length_addr() const; + u2* exception_table_length_addr() const; + u2* method_parameters_length_addr() const; + + + u2 checked_exceptions_length() const; + CheckedExceptionElement* checked_exceptions_start() const; + + + u2 localvariable_table_length() const; + LocalVariableTableElement* localvariable_table_start() const; + + + u2 exception_table_length() const; + ExceptionTableElement* exception_table_start() const; + + + + + + + + int method_parameters_length() const; + MethodParametersElement* method_parameters_start() const; + + AnnotationArray** method_annotations_addr() const; + AnnotationArray* method_annotations() const { + return has_method_annotations() ? *(method_annotations_addr()) : nullptr; + } + void set_method_annotations(AnnotationArray* anno) { + *(method_annotations_addr()) = anno; + } + + AnnotationArray** parameter_annotations_addr() const; + AnnotationArray* parameter_annotations() const { + return has_parameter_annotations() ? *(parameter_annotations_addr()) : nullptr; + } + void set_parameter_annotations(AnnotationArray* anno) { + *(parameter_annotations_addr()) = anno; + } + + AnnotationArray** type_annotations_addr() const; + AnnotationArray* type_annotations() const { + return has_type_annotations() ? *(type_annotations_addr()) : nullptr; + } + void set_type_annotations(AnnotationArray* anno) { + *(type_annotations_addr()) = anno; + } + + AnnotationArray** default_annotations_addr() const; + AnnotationArray* default_annotations() const { + return has_default_annotations() ? *(default_annotations_addr()) : nullptr; + } + void set_default_annotations(AnnotationArray* anno) { + *(default_annotations_addr()) = anno; + } + + int method_annotations_length() const { + return has_method_annotations() ? method_annotations()->length() : 0; + } + int parameter_annotations_length() const { + return has_parameter_annotations() ? parameter_annotations()->length() : 0; + } + int type_annotations_length() const { + return has_type_annotations() ? type_annotations()->length() : 0; + } + int default_annotations_length() const { + return has_default_annotations() ? default_annotations()->length() : 0; + } + + + void copy_annotations_from(ClassLoaderData* loader_data, ConstMethod* cm, JavaThread* __the_thread__); + + + void set_code(address code) { + if (code_size() > 0) { + memcpy(code_base(), code, code_size()); + } + } + address code_base() const { return (address) (this+1); } + address code_end() const { return code_base() + code_size(); } + bool contains(address bcp) const { return code_base() <= bcp + && bcp < code_end(); } + + static ByteSize codes_offset() + { return in_ByteSize(sizeof(ConstMethod)); } + + static ByteSize constants_offset() + { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstMethod)]; ConstMethod* dummyObj = (ConstMethod*)space; char* c = (char*)(void*)&dummyObj->_constants; return (size_t)(c - space); }())); } + + static ByteSize max_stack_offset() + { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstMethod)]; ConstMethod* dummyObj = (ConstMethod*)space; char* c = (char*)(void*)&dummyObj->_max_stack; return (size_t)(c - space); }())); } + static ByteSize size_of_locals_offset() + { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstMethod)]; ConstMethod* dummyObj = (ConstMethod*)space; char* c = (char*)(void*)&dummyObj->_max_locals; return (size_t)(c - space); }())); } + static ByteSize size_of_parameters_offset() + { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstMethod)]; ConstMethod* dummyObj = (ConstMethod*)space; char* c = (char*)(void*)&dummyObj->_size_of_parameters; return (size_t)(c - space); }())); } + + static ByteSize result_type_offset() + { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstMethod)]; ConstMethod* dummyObj = (ConstMethod*)space; char* c = (char*)(void*)&dummyObj->_result_type; return (size_t)(c - space); }())); } + + + static const u2 MAX_IDNUM; + static const u2 UNSET_IDNUM; + u2 method_idnum() const { return _method_idnum; } + void set_method_idnum(u2 idnum) { _method_idnum = idnum; } + + u2 orig_method_idnum() const { return _orig_method_idnum; } + void set_orig_method_idnum(u2 idnum) { _orig_method_idnum = idnum; } + + + void compute_from_signature(Symbol* sig, bool is_static); + + + u2 max_stack() const { return _max_stack; } + void set_max_stack(int size) { _max_stack = checked_cast(size); } + + + u2 max_locals() const { return _max_locals; } + void set_max_locals(int size) { _max_locals = checked_cast(size); } + + + u2 size_of_parameters() const { return _size_of_parameters; } + + + u2 num_stack_arg_slots() const { return _num_stack_arg_slots; } + + + BasicType result_type() const { ; + return (BasicType)_result_type; } + + + void deallocate_contents(ClassLoaderData* loader_data); + bool is_klass() const { return false; } + + + void metaspace_pointers_do(MetaspaceClosure* it); + MetaspaceObj::Type type() const { return ConstMethodType; } +private: + + + + + + address constMethod_end() const + { return (address)((intptr_t*)this + _constMethod_size); } + + + u2* last_u2_element() const; + + public: + + void print_on (outputStream* st) const; + void print_value_on(outputStream* st) const; + + const char* internal_name() const { return "{constMethod}"; } + + + void verify_on(outputStream* st); +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/fieldInfo.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/fieldInfo.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/typeArrayOop.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/typeArrayOop.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/arrayOop.hpp" 1 +# 42 "/home/rehn/source/jdk/open/src/hotspot/share/oops/arrayOop.hpp" +class arrayOopDesc : public oopDesc { + friend class VMStructs; + friend class arrayOopDescTest; + + + + + + + + static int header_size_in_bytes() { + size_t hs = align_up(length_offset_in_bytes() + sizeof(int), + HeapWordSize); + + + + + + + return (int)hs; + } + + + static int* length_addr_impl(void* obj_ptr) { + char* ptr = static_cast(obj_ptr); + return reinterpret_cast(ptr + length_offset_in_bytes()); + } + + + + + static bool element_type_should_be_aligned(BasicType type) { + return type == T_DOUBLE || type == T_LONG; + } + + public: + + + + static int length_offset_in_bytes() { + return UseCompressedClassPointers ? klass_gap_offset_in_bytes() : + sizeof(arrayOopDesc); + } + + + static int base_offset_in_bytes(BasicType type) { + return header_size(type) * HeapWordSize; + } + + + + void* base(BasicType type) const { + return reinterpret_cast(cast_from_oop(as_oop()) + base_offset_in_bytes(type)); + } + + template + static T* obj_offset_to_raw(arrayOop obj, size_t offset_in_bytes, T* raw) { + if (obj != nullptr) { + ; + char* base = reinterpret_cast((void*) obj); + raw = reinterpret_cast(base + offset_in_bytes); + } else { + ; + } + return raw; + } + + + bool is_within_bounds(int index) const { return 0 <= index && index < length(); } + + + + int length() const { return *length_addr_impl(const_cast(this)); } + void set_length(int length) { *length_addr_impl(this) = length; } + + int* length_addr() { + return length_addr_impl(this); + } + + static void set_length(HeapWord* mem, int length) { + *length_addr_impl(mem) = length; + } + + + + + + static int header_size(BasicType type) { + size_t typesize_in_bytes = header_size_in_bytes(); + return (int)(element_type_should_be_aligned(type) + ? align_object_offset(typesize_in_bytes/HeapWordSize) + : typesize_in_bytes/HeapWordSize); + } + + + + + + static int32_t max_array_length(BasicType type) { + ; + ; + + const size_t max_element_words_per_size_t = + align_down(( +# 145 "/home/rehn/source/jdk/open/src/hotspot/share/oops/arrayOop.hpp" 3 4 + (18446744073709551615UL) +# 145 "/home/rehn/source/jdk/open/src/hotspot/share/oops/arrayOop.hpp" + /HeapWordSize - header_size(type)), MinObjAlignment); + const size_t max_elements_per_size_t = + HeapWordSize * max_element_words_per_size_t / type2aelembytes(type); + if ((size_t)max_jint < max_elements_per_size_t) { + + + + + return align_down(max_jint - header_size(type), MinObjAlignment); + } + return (int32_t)max_elements_per_size_t; + } + +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/typeArrayOop.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/typeArrayKlass.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/typeArrayKlass.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/arrayKlass.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/arrayKlass.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oopHandle.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oopHandle.hpp" +class OopStorage; + + + + + + +class OopHandle { + friend class VMStructs; +private: + oop* _obj; + +public: + OopHandle() : _obj(nullptr) {} + explicit OopHandle(oop* w) : _obj(w) {} + OopHandle(OopStorage* storage, oop obj); + + OopHandle(const OopHandle& copy) : _obj(copy._obj) {} + + OopHandle& operator=(const OopHandle& copy) { + + + ; + _obj = copy._obj; + return *this; + } + + void swap(OopHandle& copy) { + ::swap(_obj, copy._obj); + } + + inline oop resolve() const; + inline oop peek() const; + + bool is_empty() const { return _obj == nullptr; } + + inline void release(OopStorage* storage); + + inline void replace(oop obj); + + inline oop xchg(oop new_value); + + oop* ptr_raw() const { return _obj; } +}; + + + +template<> +struct PrimitiveConversions::Translate : public std::true_type { + typedef OopHandle Value; + typedef oop* Decayed; + + static Decayed decay(Value x) { return x.ptr_raw(); } + static Value recover(Decayed x) { return OopHandle(x); } +}; +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/accessFlags.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/accessFlags.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/include/jvm_constants.h" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/accessFlags.hpp" 2 + + + + + + +class outputStream; + +enum { + + + + JVM_ACC_WRITTEN_FLAGS = 0x00007FFF, + + + + + + JVM_ACC_HAS_FINALIZER = 0x40000000, + JVM_ACC_IS_CLONEABLE_FAST = (int)0x80000000, + JVM_ACC_IS_HIDDEN_CLASS = 0x04000000, + JVM_ACC_IS_VALUE_BASED_CLASS = 0x08000000, +}; + + +class AccessFlags { + friend class VMStructs; + private: + jint _flags; + + public: + AccessFlags() : _flags(0) {} + explicit AccessFlags(jint flags) : _flags(flags) {} + + + bool is_public () const { return (_flags & JVM_ACC_PUBLIC ) != 0; } + bool is_private () const { return (_flags & JVM_ACC_PRIVATE ) != 0; } + bool is_protected () const { return (_flags & JVM_ACC_PROTECTED ) != 0; } + bool is_static () const { return (_flags & JVM_ACC_STATIC ) != 0; } + bool is_final () const { return (_flags & JVM_ACC_FINAL ) != 0; } + bool is_synchronized() const { return (_flags & JVM_ACC_SYNCHRONIZED) != 0; } + bool is_super () const { return (_flags & JVM_ACC_SUPER ) != 0; } + bool is_volatile () const { return (_flags & JVM_ACC_VOLATILE ) != 0; } + bool is_transient () const { return (_flags & JVM_ACC_TRANSIENT ) != 0; } + bool is_native () const { return (_flags & JVM_ACC_NATIVE ) != 0; } + bool is_interface () const { return (_flags & JVM_ACC_INTERFACE ) != 0; } + bool is_abstract () const { return (_flags & JVM_ACC_ABSTRACT ) != 0; } + + + bool is_synthetic () const { return (_flags & JVM_ACC_SYNTHETIC ) != 0; } + + + bool has_finalizer () const { return (_flags & JVM_ACC_HAS_FINALIZER ) != 0; } + bool is_cloneable_fast () const { return (_flags & JVM_ACC_IS_CLONEABLE_FAST ) != 0; } + bool is_hidden_class () const { return (_flags & JVM_ACC_IS_HIDDEN_CLASS ) != 0; } + bool is_value_based_class () const { return (_flags & JVM_ACC_IS_VALUE_BASED_CLASS ) != 0; } + + + jint get_flags () const { return (_flags & JVM_ACC_WRITTEN_FLAGS); } + + + void set_field_flags(jint flags) { + ; + _flags = (flags & (JVM_ACC_PUBLIC | JVM_ACC_PRIVATE | JVM_ACC_PROTECTED | JVM_ACC_STATIC | JVM_ACC_FINAL | JVM_ACC_VOLATILE | JVM_ACC_TRANSIENT | JVM_ACC_ENUM | JVM_ACC_SYNTHETIC)); + } + void set_flags(jint flags) { _flags = (flags & JVM_ACC_WRITTEN_FLAGS); } + + private: + friend class Klass; + friend class ClassFileParser; + + + + + void set_is_synthetic() { _flags |= JVM_ACC_SYNTHETIC; } + + + + void set_has_finalizer() { _flags |= JVM_ACC_HAS_FINALIZER; } + void set_is_cloneable_fast() { _flags |= JVM_ACC_IS_CLONEABLE_FAST; } + void set_is_hidden_class() { _flags |= JVM_ACC_IS_HIDDEN_CLASS; } + void set_is_value_based_class() { _flags |= JVM_ACC_IS_VALUE_BASED_CLASS; } + + public: + + jshort as_short() const { return (jshort)_flags; } + jint as_int() const { return _flags; } + + inline friend AccessFlags accessFlags_from(jint flags); + + + + void print_on(outputStream* st) const; + + + +}; + +inline AccessFlags accessFlags_from(jint flags) { + AccessFlags af; + af._flags = flags; + return af; +} +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/utilities/jfrTypes.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/utilities/jfrTypes.hpp" +# 1 "/home/rehn/source/jdk/open/build/relgcc11/hotspot/variant-server/gensrc/jfrfiles/jfrEventIds.hpp" 1 +# 9 "/home/rehn/source/jdk/open/build/relgcc11/hotspot/variant-server/gensrc/jfrfiles/jfrEventIds.hpp" +enum JfrEventId { + JfrMetadataEvent = 0, + JfrCheckpointEvent = 1, + JfrDurationEvent = 2, + JfrInstantEvent = 3, + JfrValueEvent = 4, + JfrTextEvent = 5, + JfrZThreadDebugEvent = 6, + JfrResidentSetSizeEvent = 7, + JfrThreadStartEvent = 8, + JfrThreadEndEvent = 9, + JfrThreadParkEvent = 10, + JfrJavaMonitorEnterEvent = 11, + JfrJavaMonitorWaitEvent = 12, + JfrJavaMonitorInflateEvent = 13, + JfrSyncOnValueBasedClassEvent = 14, + JfrContinuationFreezeEvent = 15, + JfrContinuationThawEvent = 16, + JfrContinuationFreezeFastEvent = 17, + JfrContinuationFreezeSlowEvent = 18, + JfrContinuationThawFastEvent = 19, + JfrContinuationThawSlowEvent = 20, + JfrReservedStackActivationEvent = 21, + JfrClassLoadEvent = 22, + JfrClassDefineEvent = 23, + JfrClassRedefinitionEvent = 24, + JfrRedefineClassesEvent = 25, + JfrRetransformClassesEvent = 26, + JfrClassUnloadEvent = 27, + JfrIntFlagChangedEvent = 28, + JfrUnsignedIntFlagChangedEvent = 29, + JfrLongFlagChangedEvent = 30, + JfrUnsignedLongFlagChangedEvent = 31, + JfrDoubleFlagChangedEvent = 32, + JfrBooleanFlagChangedEvent = 33, + JfrStringFlagChangedEvent = 34, + JfrGCHeapSummaryEvent = 35, + JfrGCHeapMemoryUsageEvent = 36, + JfrGCHeapMemoryPoolUsageEvent = 37, + JfrMetaspaceSummaryEvent = 38, + JfrMetaspaceGCThresholdEvent = 39, + JfrMetaspaceAllocationFailureEvent = 40, + JfrMetaspaceOOMEvent = 41, + JfrMetaspaceChunkFreeListSummaryEvent = 42, + JfrPSHeapSummaryEvent = 43, + JfrG1HeapSummaryEvent = 44, + JfrGarbageCollectionEvent = 45, + JfrSystemGCEvent = 46, + JfrParallelOldGarbageCollectionEvent = 47, + JfrYoungGarbageCollectionEvent = 48, + JfrOldGarbageCollectionEvent = 49, + JfrG1GarbageCollectionEvent = 50, + JfrG1MMUEvent = 51, + JfrEvacuationInformationEvent = 52, + JfrGCReferenceStatisticsEvent = 53, + JfrObjectCountAfterGCEvent = 54, + JfrG1EvacuationYoungStatisticsEvent = 55, + JfrG1EvacuationOldStatisticsEvent = 56, + JfrG1BasicIHOPEvent = 57, + JfrG1AdaptiveIHOPEvent = 58, + JfrPromoteObjectInNewPLABEvent = 59, + JfrPromoteObjectOutsidePLABEvent = 60, + JfrPromotionFailedEvent = 61, + JfrEvacuationFailedEvent = 62, + JfrConcurrentModeFailureEvent = 63, + JfrGCCPUTimeEvent = 64, + JfrGCPhasePauseEvent = 65, + JfrGCPhasePauseLevel1Event = 66, + JfrGCPhasePauseLevel2Event = 67, + JfrGCPhasePauseLevel3Event = 68, + JfrGCPhasePauseLevel4Event = 69, + JfrGCPhaseConcurrentEvent = 70, + JfrGCPhaseConcurrentLevel1Event = 71, + JfrGCPhaseConcurrentLevel2Event = 72, + JfrGCPhaseParallelEvent = 73, + JfrAllocationRequiringGCEvent = 74, + JfrTenuringDistributionEvent = 75, + JfrG1HeapRegionTypeChangeEvent = 76, + JfrJITRestartEvent = 77, + JfrCompilationEvent = 78, + JfrCompilerPhaseEvent = 79, + JfrCompilationFailureEvent = 80, + JfrCompilerInliningEvent = 81, + JfrCodeCacheFullEvent = 82, + JfrDeoptimizationEvent = 83, + JfrSafepointBeginEvent = 84, + JfrSafepointStateSynchronizationEvent = 85, + JfrSafepointCleanupEvent = 86, + JfrSafepointCleanupTaskEvent = 87, + JfrSafepointEndEvent = 88, + JfrExecuteVMOperationEvent = 89, + JfrShutdownEvent = 90, + JfrObjectAllocationInNewTLABEvent = 91, + JfrObjectAllocationOutsideTLABEvent = 92, + JfrObjectAllocationSampleEvent = 93, + JfrOldObjectSampleEvent = 94, + JfrNativeMemoryUsageEvent = 95, + JfrNativeMemoryUsageTotalEvent = 96, + JfrDumpReasonEvent = 97, + JfrDataLossEvent = 98, + JfrJVMInformationEvent = 99, + JfrOSInformationEvent = 100, + JfrVirtualizationInformationEvent = 101, + JfrInitialSystemPropertyEvent = 102, + JfrInitialEnvironmentVariableEvent = 103, + JfrSystemProcessEvent = 104, + JfrCPUInformationEvent = 105, + JfrCPUTimeStampCounterEvent = 106, + JfrCPULoadEvent = 107, + JfrThreadCPULoadEvent = 108, + JfrThreadContextSwitchRateEvent = 109, + JfrNetworkUtilizationEvent = 110, + JfrJavaThreadStatisticsEvent = 111, + JfrClassLoadingStatisticsEvent = 112, + JfrClassLoaderStatisticsEvent = 113, + JfrSymbolTableStatisticsEvent = 114, + JfrStringTableStatisticsEvent = 115, + JfrThreadAllocationStatisticsEvent = 116, + JfrPhysicalMemoryEvent = 117, + JfrExecutionSampleEvent = 118, + JfrNativeMethodSampleEvent = 119, + JfrThreadDumpEvent = 120, + JfrNativeLibraryEvent = 121, + JfrNativeLibraryLoadEvent = 122, + JfrNativeLibraryUnloadEvent = 123, + JfrModuleRequireEvent = 124, + JfrModuleExportEvent = 125, + JfrCompilerStatisticsEvent = 126, + JfrCompilerConfigurationEvent = 127, + JfrCodeCacheStatisticsEvent = 128, + JfrCodeCacheConfigurationEvent = 129, + JfrIntFlagEvent = 130, + JfrUnsignedIntFlagEvent = 131, + JfrLongFlagEvent = 132, + JfrUnsignedLongFlagEvent = 133, + JfrDoubleFlagEvent = 134, + JfrBooleanFlagEvent = 135, + JfrStringFlagEvent = 136, + JfrObjectCountEvent = 137, + JfrG1HeapRegionInformationEvent = 138, + JfrGCConfigurationEvent = 139, + JfrGCSurvivorConfigurationEvent = 140, + JfrGCTLABConfigurationEvent = 141, + JfrGCHeapConfigurationEvent = 142, + JfrYoungGenerationConfigurationEvent = 143, + JfrZYoungGarbageCollectionEvent = 144, + JfrZOldGarbageCollectionEvent = 145, + JfrZAllocationStallEvent = 146, + JfrZPageAllocationEvent = 147, + JfrZRelocationSetEvent = 148, + JfrZRelocationSetGroupEvent = 149, + JfrZStatisticsCounterEvent = 150, + JfrZStatisticsSamplerEvent = 151, + JfrZThreadPhaseEvent = 152, + JfrZUncommitEvent = 153, + JfrZUnmapEvent = 154, + JfrShenandoahHeapRegionStateChangeEvent = 155, + JfrShenandoahHeapRegionInformationEvent = 156, + JfrFlushEvent = 157, + JfrHeapDumpEvent = 158, + JfrGCLockerEvent = 159, + JfrFinalizerStatisticsEvent = 160, + JfrJavaAgentEvent = 161, + JfrNativeAgentEvent = 162, +}; +typedef enum JfrEventId JfrEventId; + +static const JfrEventId FIRST_EVENT_ID = JfrDurationEvent; +static const JfrEventId LAST_EVENT_ID = JfrNativeAgentEvent; +static const int NUMBER_OF_EVENTS = 161; +static const int NUMBER_OF_RESERVED_EVENTS = 2; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/utilities/jfrTypes.hpp" 2 +# 1 "/home/rehn/source/jdk/open/build/relgcc11/hotspot/variant-server/gensrc/jfrfiles/jfrTypes.hpp" 1 +# 12 "/home/rehn/source/jdk/open/build/relgcc11/hotspot/variant-server/gensrc/jfrfiles/jfrTypes.hpp" +enum JfrTypeId { + TYPE_VIRTUALSPACE = 163, + TYPE_OBJECTSPACE = 164, + TYPE_METASPACESIZES = 165, + TYPE_COPYFAILED = 166, + TYPE_G1EVACUATIONSTATISTICS = 167, + TYPE_CALLEEMETHOD = 168, + TYPE_SHENANDOAHHEAPREGIONSTATE = 169, + TYPE_DEOPTIMIZATIONREASON = 170, + TYPE_DEOPTIMIZATIONACTION = 171, + TYPE_BYTECODE = 172, + TYPE_COMPILERTYPE = 173, + TYPE_ZPAGETYPETYPE = 174, + TYPE_ZSTATISTICSCOUNTERTYPE = 175, + TYPE_ZSTATISTICSSAMPLERTYPE = 176, + TYPE_NETWORKINTERFACENAME = 177, + TYPE_THREAD = 178, + TYPE_THREADGROUP = 179, + TYPE_CLASS = 180, + TYPE_CLASSLOADER = 181, + TYPE_METHOD = 182, + TYPE_SYMBOL = 183, + TYPE_THREADSTATE = 184, + TYPE_GCNAME = 185, + TYPE_GCCAUSE = 186, + TYPE_GCWHEN = 187, + TYPE_G1HEAPREGIONTYPE = 188, + TYPE_G1YCTYPE = 189, + TYPE_GCTHRESHOLDUPDATER = 190, + TYPE_REFERENCETYPE = 191, + TYPE_METADATATYPE = 192, + TYPE_METASPACEOBJECTTYPE = 193, + TYPE_NARROWOOPMODE = 194, + TYPE_VMOPERATIONTYPE = 195, + TYPE_COMPILERPHASETYPE = 196, + TYPE_FLAGVALUEORIGIN = 197, + TYPE_CODEBLOBTYPE = 198, + TYPE_INFLATECAUSE = 199, + TYPE_MODULE = 200, + TYPE_PACKAGE = 201, + TYPE_STACKTRACE = 202, + TYPE_FRAMETYPE = 203, + TYPE_OLDOBJECTROOTSYSTEM = 204, + TYPE_OLDOBJECTROOTTYPE = 205, + TYPE_OLDOBJECTGCROOT = 206, + TYPE_OLDOBJECTARRAY = 207, + TYPE_OLDOBJECTFIELD = 208, + TYPE_OLDOBJECT = 209, + TYPE_REFERENCE = 210, + TYPE_STACKFRAME = 211, + TYPE_CHUNKHEADER = 212, + TYPE_NMTTYPE = 213, + TYPE_JAVAMONITORADDRESS = 214, + TYPE_SAFEPOINTID = 215, + TYPE_GCID = 216, + TYPE_COMPILEID = 217, + TYPE_SWEEPID = 218, + TYPE_FLUSHID = 219, + TYPE_CLASSREDEFINITIONID = 220, + TYPE_LONG = 221, + TYPE_INT = 222, + TYPE_SHORT = 223, + TYPE_BYTE = 224, + TYPE_DOUBLE = 225, + TYPE_FLOAT = 226, + TYPE_BOOLEAN = 227, + TYPE_CHAR = 228, + TYPE_STRING = 229, +}; + +static const JfrTypeId FIRST_TYPE_ID = TYPE_VIRTUALSPACE; +static const JfrTypeId LAST_TYPE_ID = TYPE_STRING; + +class JfrType : public AllStatic { + public: + static jlong name_to_id(const char* type_name) { + if (strcmp(type_name, "java.lang.Class") == 0) { + return TYPE_CLASS; + } + if (strcmp(type_name, "java.lang.Thread") == 0) { + return TYPE_THREAD; + } + if (strcmp(type_name, "long") == 0) { + return TYPE_LONG; + } + if (strcmp(type_name, "int") == 0) { + return TYPE_INT; + } + if (strcmp(type_name, "short") == 0) { + return TYPE_SHORT; + } + if (strcmp(type_name, "byte") == 0) { + return TYPE_BYTE; + } + if (strcmp(type_name, "double") == 0) { + return TYPE_DOUBLE; + } + if (strcmp(type_name, "float") == 0) { + return TYPE_FLOAT; + } + if (strcmp(type_name, "boolean") == 0) { + return TYPE_BOOLEAN; + } + if (strcmp(type_name, "char") == 0) { + return TYPE_CHAR; + } + if (strcmp(type_name, "java.lang.String") == 0) { + return TYPE_STRING; + } + if (strcmp(type_name, "jdk.types.StackTrace") == 0) { + return TYPE_STACKTRACE; + } + return -1; + } +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/utilities/jfrTypes.hpp" 2 + + +typedef u8 traceid; +typedef int fio_fd; + +const int invalid_fd = -1; +const jlong invalid_offset = -1; +const int64_t invalid_time = -1; +const u4 STACK_DEPTH_DEFAULT = 64; +const u4 MIN_STACK_DEPTH = 1; +const u4 MAX_STACK_DEPTH = 2048; + +enum ReservedEvent { + EVENT_METADATA = 0, + EVENT_CHECKPOINT = 1 +}; + +enum EventStartTime { + UNTIMED, + TIMED +}; + +enum JfrCheckpointType { + GENERIC, + FLUSH, + HEADER, + STATICS = 4, + THREADS = 8 +}; + +enum JfrCheckpointBufferKind { + JFR_GLOBAL, + JFR_THREADLOCAL, + JFR_VIRTUAL_THREADLOCAL +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp" 2 + + + +class ClassLoaderData; +class Klass; +class Method; +class ModuleEntry; +class PackageEntry; +# 79 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp" +class JfrTraceId : public AllStatic { + public: + static void assign(const Klass* klass); + static void assign(const ModuleEntry* module); + static void assign(const PackageEntry* package); + static void assign(const ClassLoaderData* cld); + static traceid assign_primitive_klass_id(); + + + static traceid load(const Klass* klass); + static traceid load(jclass jc, bool raw = false); + static traceid load(const Method* method); + static traceid load(const Klass* klass, const Method* method); + static traceid load(const ModuleEntry* module); + static traceid load(const PackageEntry* package); + static traceid load(const ClassLoaderData* cld); + static traceid load_leakp(const Klass* klass, const Method* method); + + + static traceid load_raw(const Klass* klass); + static traceid load_raw(jclass jc); + static traceid load_raw(const Method* method); + static traceid load_raw(const ModuleEntry* module); + static traceid load_raw(const PackageEntry* package); + static traceid load_raw(const ClassLoaderData* cld); + + + static void remove(const Klass* klass); + static void remove(const Method* method); + static void restore(const Klass* klass); + + + + static bool in_visible_set(const Klass* k); + static bool in_visible_set(const jclass jc); + + + static bool is_jdk_jfr_event(const Klass* k); + static bool is_jdk_jfr_event(const jclass jc); + static void tag_as_jdk_jfr_event(const Klass* k); + + + static bool is_jdk_jfr_event_sub(const Klass* k); + static bool is_jdk_jfr_event_sub(const jclass jc); + static void tag_as_jdk_jfr_event_sub(const Klass* k); + static void tag_as_jdk_jfr_event_sub(const jclass jc); + static void untag_jdk_jfr_event_sub(const Klass* k); + + static bool in_jdk_jfr_event_hierarchy(const Klass* k); + static bool in_jdk_jfr_event_hierarchy(const jclass jc); + + + static bool is_event_host(const Klass* k); + static bool is_event_host(const jclass jc); + static void tag_as_event_host(const Klass* k); + static void tag_as_event_host(const jclass jc); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp" 2 +# 47 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp" +class JfrTraceFlag { + private: + mutable uint16_t _flags; + public: + JfrTraceFlag() : _flags(0) {} + bool is_set(uint16_t flag) const { + return (_flags & flag) != 0; + } + + uint16_t flags() const { + return _flags; + } + + void set_flags(uint16_t flags) const { + _flags = flags; + } + + uint8_t* flags_addr() const { + + return reinterpret_cast(&_flags); + + + + } + + uint8_t* meta_addr() const { + + return reinterpret_cast(&_flags) + 1; + + + + } +}; +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.hpp" 2 +# 55 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.hpp" +template class Array; +template class GrowableArray; +class ClassLoaderData; +class fieldDescriptor; +class klassVtable; +class ModuleEntry; +class PackageEntry; +class ParCompactionManager; +class PSPromotionManager; +class vtableEntry; + +class Klass : public Metadata { + friend class VMStructs; + friend class JVMCIVMStructs; + public: + + enum KlassKind { + InstanceKlassKind, + InstanceRefKlassKind, + InstanceMirrorKlassKind, + InstanceClassLoaderKlassKind, + InstanceStackChunkKlassKind, + TypeArrayKlassKind, + ObjArrayKlassKind, + UnknownKlassKind + }; + + static const uint KLASS_KIND_COUNT = ObjArrayKlassKind + 1; + protected: + + + + + + + enum { _primary_super_limit = 8 }; +# 118 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.hpp" + jint _layout_helper; + + + + + const KlassKind _kind; + + + jint _modifier_flags; + + + + + + + + juint _super_check_offset; + + + + Symbol* _name; + + + Klass* _secondary_super_cache; + + Array* _secondary_supers; + + Klass* _primary_supers[_primary_super_limit]; + + OopHandle _java_mirror; + + Klass* _super; + + Klass* volatile _subklass; + + Klass* volatile _next_sibling; + + + Klass* _next_link; + + + + ClassLoaderData* _class_loader_data; + + int _vtable_len; + + + + AccessFlags _access_flags; + + mutable traceid _trace_id; + +private: + + + + + s2 _shared_class_path_index; + + + + u2 _shared_class_flags; + enum CDSSharedClassFlags { + _is_shared_class = 1 << 0, + _archived_lambda_proxy_is_available = 1 << 1, + _has_value_based_class_annotation = 1 << 2, + _verified_at_dump_time = 1 << 3, + _has_archived_enum_objs = 1 << 4, + + + _is_generated_shared_class = 1 << 5 + }; + + + int _archived_mirror_index; + +protected: + + + Klass(KlassKind kind); + Klass() : _kind(UnknownKlassKind) { ; } + + void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, JavaThread* __the_thread__) throw(); + + public: + int kind() { return _kind; } + + enum class DefaultsLookupMode { find, skip }; + enum class OverpassLookupMode { find, skip }; + enum class StaticLookupMode { find, skip }; + enum class PrivateLookupMode { find, skip }; + + virtual bool is_klass() const { return true; } + + + + + Klass* super() const { return _super; } + void set_super(Klass* k) { _super = k; } + + + void initialize_supers(Klass* k, Array* transitive_interfaces, JavaThread* __the_thread__); + + + virtual GrowableArray* compute_secondary_supers(int num_extra_slots, + Array* transitive_interfaces); + + + virtual InstanceKlass* java_super() const { return nullptr; } + + juint super_check_offset() const { return _super_check_offset; } + void set_super_check_offset(juint o) { _super_check_offset = o; } + + Klass* secondary_super_cache() const { return _secondary_super_cache; } + void set_secondary_super_cache(Klass* k) { _secondary_super_cache = k; } + + Array* secondary_supers() const { return _secondary_supers; } + void set_secondary_supers(Array* k) { _secondary_supers = k; } + + + + Klass* primary_super_of_depth(juint i) const { + ; + Klass* super = _primary_supers[i]; + ; + return super; + } + + + + bool can_be_primary_super() const { + const juint secondary_offset = in_bytes(secondary_super_cache_offset()); + return super_check_offset() != secondary_offset; + } + virtual bool can_be_primary_super_slow() const; + + + juint super_depth() const { + if (!can_be_primary_super()) { + return primary_super_limit(); + } else { + juint d = (super_check_offset() - in_bytes(primary_supers_offset())) / sizeof(Klass*); + ; + ; + return d; + } + } + + + oop java_mirror() const; + oop java_mirror_no_keepalive() const; + void set_java_mirror(Handle m); + + oop archived_java_mirror() ; + void set_archived_java_mirror(int mirror_index) ; + + + OopHandle java_mirror_handle() const { return _java_mirror; } + void swap_java_mirror_handle(OopHandle& mirror) { _java_mirror.swap(mirror); } + + + + void clear_java_mirror_handle() { _java_mirror = OopHandle(); } + + + jint modifier_flags() const { return _modifier_flags; } + void set_modifier_flags(jint flags) { _modifier_flags = flags; } + + + int layout_helper() const { return _layout_helper; } + void set_layout_helper(int lh) { _layout_helper = lh; } + + + + + + Klass* subklass(bool log = false) const; + Klass* next_sibling(bool log = false) const; + + InstanceKlass* superklass() const; + void append_to_sibling_list(); + + void set_next_link(Klass* k) { _next_link = k; } + Klass* next_link() const { return _next_link; } + Klass** next_link_addr() { return &_next_link; } + + + ClassLoaderData* class_loader_data() const { return _class_loader_data; } + void set_class_loader_data(ClassLoaderData* loader_data) { _class_loader_data = loader_data; } + + s2 shared_classpath_index() const { + return _shared_class_path_index; + }; + + void set_shared_classpath_index(s2 index) { + _shared_class_path_index = index; + }; + + bool has_archived_mirror_index() const { + return _archived_mirror_index >= 0; + ; + } + + void clear_archived_mirror_index() ; + + void set_lambda_proxy_is_available() { + _shared_class_flags |= _archived_lambda_proxy_is_available; + } + void clear_lambda_proxy_is_available() { + _shared_class_flags &= (u2)(~_archived_lambda_proxy_is_available); + } + bool lambda_proxy_is_available() const { + return (_shared_class_flags & _archived_lambda_proxy_is_available) != 0; + + } + + void set_has_value_based_class_annotation() { + _shared_class_flags |= _has_value_based_class_annotation; + } + void clear_has_value_based_class_annotation() { + _shared_class_flags &= (u2)(~_has_value_based_class_annotation); + } + bool has_value_based_class_annotation() const { + return (_shared_class_flags & _has_value_based_class_annotation) != 0; + + } + + void set_verified_at_dump_time() { + _shared_class_flags |= _verified_at_dump_time; + } + bool verified_at_dump_time() const { + return (_shared_class_flags & _verified_at_dump_time) != 0; + + } + + void set_has_archived_enum_objs() { + _shared_class_flags |= _has_archived_enum_objs; + } + bool has_archived_enum_objs() const { + return (_shared_class_flags & _has_archived_enum_objs) != 0; + + } + + void set_is_generated_shared_class() { + _shared_class_flags |= _is_generated_shared_class; + } + bool is_generated_shared_class() const { + return (_shared_class_flags & _is_generated_shared_class) != 0; + + } + + bool is_shared() const { + return (_shared_class_flags & _is_shared_class) != 0; + + } + + void set_is_shared() { + _shared_class_flags |= _is_shared_class; + } + + + virtual ModuleEntry* module() const = 0; + virtual PackageEntry* package() const = 0; + + protected: + void set_subklass(Klass* s); + void set_next_sibling(Klass* s); + + public: + + + static ByteSize super_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Klass)]; Klass* dummyObj = (Klass*)space; char* c = (char*)(void*)&dummyObj->_super; return (size_t)(c - space); }())); } + static ByteSize super_check_offset_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Klass)]; Klass* dummyObj = (Klass*)space; char* c = (char*)(void*)&dummyObj->_super_check_offset; return (size_t)(c - space); }())); } + static ByteSize primary_supers_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Klass)]; Klass* dummyObj = (Klass*)space; char* c = (char*)(void*)&dummyObj->_primary_supers; return (size_t)(c - space); }())); } + static ByteSize secondary_super_cache_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Klass)]; Klass* dummyObj = (Klass*)space; char* c = (char*)(void*)&dummyObj->_secondary_super_cache; return (size_t)(c - space); }())); } + static ByteSize secondary_supers_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Klass)]; Klass* dummyObj = (Klass*)space; char* c = (char*)(void*)&dummyObj->_secondary_supers; return (size_t)(c - space); }())); } + static ByteSize java_mirror_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Klass)]; Klass* dummyObj = (Klass*)space; char* c = (char*)(void*)&dummyObj->_java_mirror; return (size_t)(c - space); }())); } + static ByteSize class_loader_data_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Klass)]; Klass* dummyObj = (Klass*)space; char* c = (char*)(void*)&dummyObj->_class_loader_data; return (size_t)(c - space); }())); } + static ByteSize modifier_flags_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Klass)]; Klass* dummyObj = (Klass*)space; char* c = (char*)(void*)&dummyObj->_modifier_flags; return (size_t)(c - space); }())); } + static ByteSize layout_helper_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Klass)]; Klass* dummyObj = (Klass*)space; char* c = (char*)(void*)&dummyObj->_layout_helper; return (size_t)(c - space); }())); } + static ByteSize access_flags_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Klass)]; Klass* dummyObj = (Klass*)space; char* c = (char*)(void*)&dummyObj->_access_flags; return (size_t)(c - space); }())); } + + static ByteSize subklass_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Klass)]; Klass* dummyObj = (Klass*)space; char* c = (char*)(void*)&dummyObj->_subklass; return (size_t)(c - space); }())); } + static ByteSize next_sibling_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Klass)]; Klass* dummyObj = (Klass*)space; char* c = (char*)(void*)&dummyObj->_next_sibling; return (size_t)(c - space); }())); } + + + + static const int _lh_neutral_value = 0; + static const int _lh_instance_slow_path_bit = 0x01; + static const int _lh_log2_element_size_shift = BitsPerByte*0; + static const int _lh_log2_element_size_mask = BitsPerLong-1; + static const int _lh_element_type_shift = BitsPerByte*1; + static const int _lh_element_type_mask = ((((BitsPerByte) >= BitsPerWord) ? 0 : (OneBit << (BitsPerByte))) - 1); + static const int _lh_header_size_shift = BitsPerByte*2; + static const int _lh_header_size_mask = ((((BitsPerByte) >= BitsPerWord) ? 0 : (OneBit << (BitsPerByte))) - 1); + static const int _lh_array_tag_bits = 2; + static const int _lh_array_tag_shift = BitsPerInt - _lh_array_tag_bits; + static const int _lh_array_tag_obj_value = ~0x01; + + static const unsigned int _lh_array_tag_type_value = 0Xffffffff; + + static int layout_helper_size_in_bytes(jint lh) { + ; + return (int) lh & ~_lh_instance_slow_path_bit; + } + static bool layout_helper_needs_slow_path(jint lh) { + ; + return (lh & _lh_instance_slow_path_bit) != 0; + } + static bool layout_helper_is_instance(jint lh) { + return (jint)lh > (jint)_lh_neutral_value; + } + static bool layout_helper_is_array(jint lh) { + return (jint)lh < (jint)_lh_neutral_value; + } + static bool layout_helper_is_typeArray(jint lh) { + + return (juint)lh >= (juint)(_lh_array_tag_type_value << _lh_array_tag_shift); + } + static bool layout_helper_is_objArray(jint lh) { + + return (jint)lh < (jint)(_lh_array_tag_type_value << _lh_array_tag_shift); + } + static int layout_helper_header_size(jint lh) { + ; + int hsize = (lh >> _lh_header_size_shift) & _lh_header_size_mask; + ; + return hsize; + } + static BasicType layout_helper_element_type(jint lh) { + ; + int btvalue = (lh >> _lh_element_type_shift) & _lh_element_type_mask; + ; + return (BasicType) btvalue; + } + + + + static int layout_helper_boolean_diffbit() { + jint zlh = array_layout_helper(T_BOOLEAN); + jint blh = array_layout_helper(T_BYTE); + ; + int diffbit = 1; + while ((diffbit & (zlh ^ blh)) == 0 && (diffbit & zlh) == 0) { + diffbit <<= 1; + ; + } + return diffbit; + } + + static int layout_helper_log2_element_size(jint lh) { + ; + int l2esz = (lh >> _lh_log2_element_size_shift) & _lh_log2_element_size_mask; + + ; + return l2esz; + } + static jint array_layout_helper(jint tag, int hsize, BasicType etype, int log2_esize) { + return (tag << _lh_array_tag_shift) + | (hsize << _lh_header_size_shift) + | ((int)etype << _lh_element_type_shift) + | (log2_esize << _lh_log2_element_size_shift); + } + static jint instance_layout_helper(jint size, bool slow_path_flag) { + return (size << LogBytesPerWord) + | (slow_path_flag ? _lh_instance_slow_path_bit : 0); + } + static int layout_helper_to_size_helper(jint lh) { + ; + + return lh >> LogBytesPerWord; + } + + static jint array_layout_helper(BasicType etype); + + + static juint primary_super_limit() { return _primary_super_limit; } + + + klassVtable vtable() const; + int vtable_length() const { return _vtable_len; } + + + bool is_subclass_of(const Klass* k) const; + + bool is_subtype_of(Klass* k) const { + juint off = k->super_check_offset(); + Klass* sup = *(Klass**)( (address)this + off ); + const juint secondary_offset = in_bytes(secondary_super_cache_offset()); + if (sup == k) { + return true; + } else if (off != secondary_offset) { + return false; + } else { + return search_secondary_supers(k); + } + } + + bool search_secondary_supers(Klass* k) const; + + + Klass *LCA( Klass *k ); + + + + virtual void check_valid_for_instantiation(bool throwError, JavaThread* __the_thread__); + + + virtual void copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, JavaThread* __the_thread__); + + + virtual bool should_be_initialized() const { return false; } + + virtual void initialize(JavaThread* __the_thread__); + virtual Klass* find_field(Symbol* name, Symbol* signature, fieldDescriptor* fd) const; + virtual Method* uncached_lookup_method(const Symbol* name, const Symbol* signature, + OverpassLookupMode overpass_mode, + PrivateLookupMode = PrivateLookupMode::find) const; + public: + Method* lookup_method(const Symbol* name, const Symbol* signature) const { + return uncached_lookup_method(name, signature, OverpassLookupMode::find); + } + + + virtual ArrayKlass* array_klass(int rank, JavaThread* __the_thread__) = 0; + + + virtual ArrayKlass* array_klass(JavaThread* __the_thread__) = 0; + + + virtual ArrayKlass* array_klass_or_null(int rank) = 0; + virtual ArrayKlass* array_klass_or_null() = 0; + + virtual oop protection_domain() const = 0; + + oop class_loader() const; + + inline oop klass_holder() const; + + protected: + + + static void check_array_allocation_length(int length, int max_length, JavaThread* __the_thread__); + + void set_vtable_length(int len) { _vtable_len= len; } + + vtableEntry* start_of_vtable() const; + + void restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, JavaThread* __the_thread__); + + public: + Method* method_at_vtable(int index); + + static ByteSize vtable_start_offset(); + static ByteSize vtable_length_offset() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Klass)]; Klass* dummyObj = (Klass*)space; char* c = (char*)(void*)&dummyObj->_vtable_len; return (size_t)(c - space); }())); + } + + + + virtual void remove_unshareable_info(); + virtual void remove_java_mirror(); + + bool is_unshareable_info_restored() const { + ; + if (has_archived_mirror_index()) { + + return false; + } else if (_java_mirror.ptr_raw() == nullptr) { + return false; + } else { + return true; + } + } + + + public: + + + + + virtual size_t oop_size(oop obj) const = 0; + + + virtual int size() const = 0; + + + + + + const char* external_name() const; + + + + + + virtual const char* signature_name() const; + + const char* joint_in_module_of_loader(const Klass* class2, bool include_parent_loader = false) const; + const char* class_in_module_of_loader(bool use_are = false, bool include_parent_loader = false) const; + + + const char* external_kind() const; +# 630 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.hpp" + public: +# 644 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.hpp" + bool is_instance_klass() const { return _kind <= InstanceStackChunkKlassKind; } + + bool is_other_instance_klass() const { return _kind == InstanceKlassKind; } + bool is_reference_instance_klass() const { return _kind == InstanceRefKlassKind; } + bool is_mirror_instance_klass() const { return _kind == InstanceMirrorKlassKind; } + bool is_class_loader_instance_klass() const { return _kind == InstanceClassLoaderKlassKind; } + bool is_array_klass() const { return _kind >= TypeArrayKlassKind; } + bool is_stack_chunk_instance_klass() const { return _kind == InstanceStackChunkKlassKind; } + bool is_objArray_klass() const { return _kind == ObjArrayKlassKind; } + bool is_typeArray_klass() const { return _kind == TypeArrayKlassKind; } + + + + AccessFlags access_flags() const { return _access_flags; } + void set_access_flags(AccessFlags flags) { _access_flags = flags; } + + bool is_public() const { return _access_flags.is_public(); } + bool is_final() const { return _access_flags.is_final(); } + bool is_interface() const { return _access_flags.is_interface(); } + bool is_abstract() const { return _access_flags.is_abstract(); } + bool is_super() const { return _access_flags.is_super(); } + bool is_synthetic() const { return _access_flags.is_synthetic(); } + void set_is_synthetic() { _access_flags.set_is_synthetic(); } + bool has_finalizer() const { return _access_flags.has_finalizer(); } + void set_has_finalizer() { _access_flags.set_has_finalizer(); } + bool is_hidden() const { return access_flags().is_hidden_class(); } + void set_is_hidden() { _access_flags.set_is_hidden_class(); } + bool is_value_based() { return _access_flags.is_value_based_class(); } + void set_is_value_based() { _access_flags.set_is_value_based_class(); } + + inline bool is_non_strong_hidden() const; + + bool is_cloneable() const; + void set_is_cloneable(); + + traceid trace_id() const { return _trace_id; } traceid* trace_id_addr() const { return &_trace_id; } void set_trace_id(traceid id) const { _trace_id = id; }; + + virtual void metaspace_pointers_do(MetaspaceClosure* iter); + virtual MetaspaceObj::Type type() const { return ClassType; } + + inline bool is_loader_alive() const; + + void clean_subklass(); + + static void clean_weak_klass_links(bool unloading_occurred, bool clean_alive_klasses = true); + static void clean_subklass_tree() { + clean_weak_klass_links( true , false); + } + + + + Klass *up_cast_abstract(); + + + Symbol* name() const { return _name; } + void set_name(Symbol* n); + + virtual void release_C_heap_structures(bool release_constant_pool = true); + + public: + virtual jint compute_modifier_flags() const = 0; + + + virtual jint jvmti_class_status() const; + + + virtual void print_on(outputStream* st) const; + + virtual void oop_print_value_on(oop obj, outputStream* st); + virtual void oop_print_on (oop obj, outputStream* st); + + virtual const char* internal_name() const = 0; + + + virtual void verify_on(outputStream* st); + void verify() { verify_on(tty); } + + + + + + virtual void oop_verify_on(oop obj, outputStream* st); + + + static bool is_valid(Klass* k); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/arrayKlass.hpp" 2 + +class fieldDescriptor; +class klassVtable; +class ObjArrayKlass; + + + +class ArrayKlass: public Klass { + friend class VMStructs; + private: + + + int _dimension; + ObjArrayKlass* volatile _higher_dimension; + ArrayKlass* volatile _lower_dimension; + + protected: + + + + ArrayKlass(Symbol* name, KlassKind kind); + ArrayKlass() { ; } + + public: + + + + + int dimension() const { return _dimension; } + void set_dimension(int dimension) { _dimension = dimension; } + + ObjArrayKlass* higher_dimension() const { return _higher_dimension; } + inline ObjArrayKlass* higher_dimension_acquire() const; + void set_higher_dimension(ObjArrayKlass* k) { _higher_dimension = k; } + inline void release_set_higher_dimension(ObjArrayKlass* k); + + ArrayKlass* lower_dimension() const { return _lower_dimension; } + void set_lower_dimension(ArrayKlass* k) { _lower_dimension = k; } + + + int array_header_in_bytes() const { return layout_helper_header_size(layout_helper()); } + int log2_element_size() const { return layout_helper_log2_element_size(layout_helper()); } + + BasicType element_type() const { return layout_helper_element_type(layout_helper()); } + + virtual InstanceKlass* java_super() const; + + + + + virtual oop multi_allocate(int rank, jint* sizes, JavaThread* __the_thread__); + objArrayOop allocate_arrayArray(int n, int length, JavaThread* __the_thread__); + + + Klass* find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const; + + + Method* uncached_lookup_method(const Symbol* name, + const Symbol* signature, + OverpassLookupMode overpass_mode, + PrivateLookupMode private_mode = PrivateLookupMode::find) const; + + static ArrayKlass* cast(Klass* k) { + return const_cast(cast(const_cast(k))); + } + + static const ArrayKlass* cast(const Klass* k) { + ; + return static_cast(k); + } + + GrowableArray* compute_secondary_supers(int num_extra_slots, + Array* transitive_interfaces); + + + static int static_size(int header_size); + + virtual void metaspace_pointers_do(MetaspaceClosure* iter); + + + static void complete_create_array_klass(ArrayKlass* k, Klass* super_klass, ModuleEntry* module, JavaThread* __the_thread__); + + + + jint compute_modifier_flags() const; + + + jint jvmti_class_status() const; + + + + virtual void remove_unshareable_info(); + virtual void remove_java_mirror(); + void restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, JavaThread* __the_thread__); + void cds_print_value_on(outputStream* st) const; + + + void log_array_class_load(Klass* k); + + void print_on(outputStream* st) const; + void print_value_on(outputStream* st) const; + + void oop_print_on(oop obj, outputStream* st); + + + void verify_on(outputStream* st); + + void oop_verify_on(oop obj, outputStream* st); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/typeArrayKlass.hpp" 2 + +class ClassLoaderData; + + + + +class TypeArrayKlass : public ArrayKlass { + friend class VMStructs; + + public: + static const KlassKind Kind = TypeArrayKlassKind; + + private: + jint _max_length; + + + TypeArrayKlass(BasicType type, Symbol* name); + static TypeArrayKlass* allocate(ClassLoaderData* loader_data, BasicType type, Symbol* name, JavaThread* __the_thread__); + public: + TypeArrayKlass() {} + + + jint max_length() { return _max_length; } + void set_max_length(jint m) { _max_length = m; } + + + + + + static TypeArrayKlass* create_klass(BasicType type, const char* name_str, + JavaThread* __the_thread__); + static TypeArrayKlass* create_klass(BasicType type, JavaThread* __the_thread__) { + return create_klass(type, external_name(type), __the_thread__); + } + + size_t oop_size(oop obj) const; + + + typeArrayOop allocate_common(int length, bool do_zero, JavaThread* __the_thread__); + typeArrayOop allocate(int length, JavaThread* __the_thread__) { return allocate_common(length, true, __the_thread__); } + oop multi_allocate(int rank, jint* sizes, JavaThread* __the_thread__); + + oop protection_domain() const { return nullptr; } + + + void copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, JavaThread* __the_thread__); + + + + + private: + + inline void oop_oop_iterate_impl(oop obj, OopIterateClosure* closure); + + public: + + template + inline void oop_oop_iterate(oop obj, OopClosureType* closure); + + + template + inline void oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr); + + + template + inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure); + + public: + + virtual ArrayKlass* array_klass(int n, JavaThread* __the_thread__); + virtual ArrayKlass* array_klass_or_null(int n); + + + virtual ArrayKlass* array_klass(JavaThread* __the_thread__); + virtual ArrayKlass* array_klass_or_null(); + + static TypeArrayKlass* cast(Klass* k) { + return const_cast(cast(const_cast(k))); + } + + static const TypeArrayKlass* cast(const Klass* k) { + ; + return static_cast(k); + } + + + static const char* external_name(BasicType type); + + + static int header_size() { return sizeof(TypeArrayKlass)/wordSize; } + int size() const { return ArrayKlass::static_size(header_size()); } + + + void initialize(JavaThread* __the_thread__); + + public: + + void oop_print_on(oop obj, outputStream* st); + void oop_print_elements_on(typeArrayOop ta, outputStream* st); + void print_on(outputStream* st) const; + void print_value_on(outputStream* st) const; + + public: + const char* internal_name() const; + + ModuleEntry* module() const; + PackageEntry* package() const; +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/oops/typeArrayOop.hpp" 2 + + + + +# 1 "/usr/lib/gcc-cross/riscv64-linux-gnu/11/include/limits.h" 1 3 4 +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/oops/typeArrayOop.hpp" 2 + +namespace TypeToBT { + template BasicType to_basic_type(); + template<> inline BasicType to_basic_type() { return T_BOOLEAN; } + template<> inline BasicType to_basic_type() { return T_BYTE; } + template<> inline BasicType to_basic_type() { return T_CHAR; } + template<> inline BasicType to_basic_type() { return T_SHORT; } + template<> inline BasicType to_basic_type() { return T_INT; } + template<> inline BasicType to_basic_type() { return T_LONG; } + template<> inline BasicType to_basic_type() { return T_FLOAT; } + template<> inline BasicType to_basic_type() { return T_DOUBLE; } +}; + +class typeArrayOopDesc : public arrayOopDesc { +private: + template + static BasicType bt() { return TypeToBT::to_basic_type(); } + + protected: + jchar* char_base() const; + jboolean* bool_base() const; + jbyte* byte_base() const; + jint* int_base() const; + jlong* long_base() const; + jshort* short_base() const; + jfloat* float_base() const; + jdouble* double_base() const; + + friend class TypeArrayKlass; + + public: + template + static ptrdiff_t element_offset(int index) { + return arrayOopDesc::base_offset_in_bytes(bt()) + sizeof(T) * index; + } + + jbyte* byte_at_addr(int which) const; + jboolean* bool_at_addr(int which) const; + jchar* char_at_addr(int which) const; + jint* int_at_addr(int which) const; + jshort* short_at_addr(int which) const; + jushort* ushort_at_addr(int which) const; + jlong* long_at_addr(int which) const; + jfloat* float_at_addr(int which) const; + jdouble* double_at_addr(int which) const; + + jbyte byte_at(int which) const; + void byte_at_put(int which, jbyte contents); + + jboolean bool_at(int which) const; + void bool_at_put(int which, jboolean contents); + + jchar char_at(int which) const; + void char_at_put(int which, jchar contents); + + jint int_at(int which) const; + void int_at_put(int which, jint contents); + + jshort short_at(int which) const; + void short_at_put(int which, jshort contents); + + jushort ushort_at(int which) const; + void ushort_at_put(int which, jushort contents); + + jlong long_at(int which) const; + void long_at_put(int which, jlong contents); + + jfloat float_at(int which) const; + void float_at_put(int which, jfloat contents); + + jdouble double_at(int which) const; + void double_at_put(int which, jdouble contents); + + jbyte byte_at_acquire(int which) const; + void release_byte_at_put(int which, jbyte contents); + + Symbol* symbol_at(int which) const; + void symbol_at_put(int which, Symbol* contents); + + + + + + private: + static size_t object_size(int lh, int length) { + int instance_header_size = Klass::layout_helper_header_size(lh); + int element_shift = Klass::layout_helper_log2_element_size(lh); + ; + ; + + julong size_in_bytes = (juint)length; + size_in_bytes <<= element_shift; + size_in_bytes += instance_header_size; + julong size_in_words = ((size_in_bytes + (HeapWordSize-1)) >> LogHeapWordSize); + ; + + return align_object_size((size_t)size_in_words); + } + + public: + inline size_t object_size(const TypeArrayKlass* tk) const; +}; + + +static_assert(std::is_trivially_default_constructible::value, "required"); +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/oops/fieldInfo.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/unsigned5.hpp" 1 +# 84 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/unsigned5.hpp" +class UNSIGNED5 : AllStatic { + private: + + static const int lg_H = 6; + static const int H = 1< + struct ArrayGetSet { + uint8_t operator()(ARR a, OFF i) const { return a[i]; }; + void operator()(ARR a, OFF i, uint8_t b) const { a[i] = b; }; + + + + }; + + + + + + + + template> + static uint32_t read_uint(ARR array, OFF& offset_rw, OFF limit, GET get = GET()) { + const OFF pos = offset_rw; + static_assert((sizeof(get(array, pos)) == 1), "sizeof(get(array, pos)) == 1"); + const uint32_t b_0 = (uint8_t) get(array, pos); + ; + uint32_t sum = b_0 - X; + if (sum < L) { + offset_rw = pos + 1; + return sum; + } + + int lg_H_i = lg_H; + for (int i = 1; ; i++) { + ; + const uint32_t b_i = (uint8_t) get(array, pos + i); + ; + sum += (b_i - X) << lg_H_i; + if (b_i < X+L || i == MAX_LENGTH-1) { + offset_rw = pos + i + 1; + return sum; + } + lg_H_i += lg_H; + } + } + + + + + + template> + static void write_uint(uint32_t value, ARR array, OFF& offset_rw, OFF limit, SET set = SET()) { + const OFF pos = offset_rw; + if (value < L) { + const uint32_t b_0 = X + value; + ; + set(array, pos, (uint8_t)b_0); + offset_rw = pos + 1; + return; + } + uint32_t sum = value; + for (int i = 0; ; i++) { + if (sum < L || i == MAX_LENGTH-1) { + + uint32_t b_i = X + sum; + ; + set(array, pos + i, (uint8_t)b_i); + offset_rw = pos + i + 1; + return; + } + sum -= L; + uint32_t b_i = X + L + (sum % H); + ; + set(array, pos + i, (uint8_t)b_i); + sum >>= lg_H; + } + } + + + static constexpr int encoded_length(uint32_t value) { + + + + uint32_t sum = 0; + uint32_t lg_H_i = 0; + for (uint32_t i = 0; ; i++) { + if (value <= sum + ((L-1) << lg_H_i) || i == MAX_LENGTH-1) { + return i + 1; + } + sum += (MAX_b - X) << lg_H_i; + lg_H_i += lg_H; + } + } + + + + static constexpr uint32_t max_encoded_in_length(uint32_t len) { + ; + if (len >= MAX_LENGTH) return MAX_VALUE; + + + uint32_t all_combinations = 0; + uint32_t combinations_i = L; + for (uint32_t i = 0; i < len; i++) { + + all_combinations += combinations_i; + combinations_i <<= lg_H; + } + return all_combinations - 1; + } + + + template + static constexpr bool fits_in_limit(uint32_t value, OFF offset, OFF limit) { + ; + return (offset + MAX_LENGTH <= limit || + offset + encoded_length(value) <= limit); + } + + + + + template> + static int check_length(ARR array, OFF offset, OFF limit = 0, + GET get = GET()) { + const OFF pos = offset; + static_assert((sizeof(get(array, pos)) == 1), "sizeof(get(array, pos)) == 1"); + const uint32_t b_0 = (uint8_t) get(array, pos); + if (b_0 < X+L) { + return (b_0 < X) ? 0 : 1; + } + + for (int i = 1; ; i++) { + if (limit != 0 && pos + i >= limit) return 0; + const uint32_t b_i = (uint8_t) get(array, pos + i); + if (b_i < X) return 0; + if (b_i < X+L || i == MAX_LENGTH-1) { + return i + 1; + } + } + } + + template> + static void write_uint_grow(uint32_t value, + ARR& array, OFF& offset, OFF& limit, + GFN grow, SET set = SET()) { + ; + const OFF pos = offset; + if (!fits_in_limit(value, pos, limit)) { + grow(MAX_LENGTH); + ; + } + write_uint(value, array, offset, limit, set); + } +# 259 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/unsigned5.hpp" + template> + class Reader { + ARR _array; + OFF _limit; + OFF _position; + int next_length() { + return UNSIGNED5::check_length(_array, _position, _limit, GET()); + } + public: + Reader(ARR array, OFF limit = 0) + : _array(array), _limit(limit) { _position = 0; } + uint32_t next_uint() { + return UNSIGNED5::read_uint(_array, _position, _limit, GET()); + } + bool has_next() { + return next_length() != 0; + } + + int try_skip(int count) { + int actual = 0; + while (actual < count && has_next()) { + int len = next_length(); + if (len == 0) break; + _position += len; + } + return actual; + } + ARR array() { return _array; } + OFF limit() { return _limit; } + OFF position() { return _position; } + void set_position(OFF position) { _position = position; } +# 300 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/unsigned5.hpp" + void print(int count = -1) { print_on(tty, count); } + + + + + + + + void print_on(outputStream* st, int count = -1, + const char* left = nullptr, const char* right = nullptr); + }; +# 319 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/unsigned5.hpp" + template> + class Writer { + ARR& _array; + OFF* const _limit_ptr; + OFF _position; + public: + Writer(const ARR& array) + : _array(const_cast(array)), _limit_ptr(nullptr), _position(0) { + + + ; + } + Writer(ARR& array, OFF& limit) + : _array(array), _limit_ptr(&limit), _position(0) { + + + + ; + } + void accept_uint(uint32_t value) { + const OFF lim = has_limit() ? limit() : 0; + UNSIGNED5::write_uint(value, _array, _position, lim, SET()); + } + template + void accept_grow(uint32_t value, GFN grow) { + ; + UNSIGNED5::write_uint_grow(value, _array, _position, *_limit_ptr, + grow, SET()); + } + + + + template + void ensure_remaining_grow(int request_remaining, GFN grow) { + const OFF have = remaining(); + if (have < request_remaining) { + grow(have - request_remaining); + ; + } + } + + void end_byte(uint8_t extra_byte = 0) { + SET()(_array, _position++, extra_byte); + } + ARR array() { return _array; } + OFF position() { return _position; } + void set_position(OFF position) { _position = position; } + bool has_limit() { return _limit_ptr != nullptr; } + OFF limit() { ; return *_limit_ptr; } + OFF remaining() { return limit() - position(); } + }; +# 380 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/unsigned5.hpp" + template + class Sizer { + OFF _position; + int _count; + public: + Sizer() { _position = 0; _count = 0; } + + + + + void accept_uint(uint32_t value) { + _position += encoded_length(value); + _count++; + } + OFF position() { return _position; } + int count() { return _count; } + }; + + + + + static uint32_t encode_sign(int32_t value) { return ((uint32_t)value << 1) ^ (value >> 31); } + static int32_t decode_sign(uint32_t value) { return (value >> 1) ^ -(int32_t)(value & 1); } + + template> + static OFF print(ARR array, OFF offset = 0, OFF limit = 0, + GET get = GET()) { + print_count(-1, array, offset, limit, get); + } + template> + static OFF print_count(int count, + ARR array, OFF offset = 0, OFF limit = 0, + GET get = GET()) { + Reader r(array, offset); + + r.print_on(tty, count); + return r.position(); + } +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/fieldInfo.hpp" 2 + + +static constexpr u4 flag_mask(int pos) { + return (u4)1 << pos; +} + + + + +template +struct ArrayHelper { + uint8_t operator()(ARR a, OFF i) const { return a->at(i); }; + void operator()(ARR a, OFF i, uint8_t b) const { a->at_put(i,b); }; + + + +}; + + + + + + + +class FieldInfo { + friend class fieldDescriptor; + friend class JavaFieldStream; + friend class ClassFileParser; + friend class FieldInfoStream; + friend class FieldStreamBase; + friend class FieldInfoReader; + friend class VMStructs; + + public: + + class FieldFlags { + friend class VMStructs; + friend class JVMCIVMStructs; + + + + + enum FieldFlagBitPosition { + _ff_initialized, + _ff_injected, + _ff_generic, + _ff_stable, + _ff_contended, + }; + + + + static const u4 _optional_item_bit_mask = + flag_mask((int)_ff_initialized) | + flag_mask((int)_ff_generic) | + flag_mask((int)_ff_contended); + + + u4 _flags; + + bool test_flag(FieldFlagBitPosition pos) const { + return (_flags & flag_mask(pos)) != 0; + } + void update_flag(FieldFlagBitPosition pos, bool z) { + if (z) _flags |= flag_mask(pos); + else _flags &= ~flag_mask(pos); + } + + public: + FieldFlags(u4 flags) { + _flags = flags; + } + u4 as_uint() const { return _flags; } + bool has_any_optionals() const { + return (_flags & _optional_item_bit_mask) != 0; + } + + bool is_initialized() const { return test_flag(_ff_initialized); } + bool is_injected() const { return test_flag(_ff_injected); } + bool is_generic() const { return test_flag(_ff_generic); } + bool is_stable() const { return test_flag(_ff_stable); } + bool is_contended() const { return test_flag(_ff_contended); } + + void update_initialized(bool z) { update_flag(_ff_initialized, z); } + void update_injected(bool z) { update_flag(_ff_injected, z); } + void update_generic(bool z) { update_flag(_ff_generic, z); } + void update_stable(bool z) { update_flag(_ff_stable, z); } + void update_contended(bool z) { update_flag(_ff_contended, z); } + }; + + private: + + + + + + + u4 _index; + u2 _name_index; + u2 _signature_index; + u4 _offset; + AccessFlags _access_flags; + FieldFlags _field_flags; + u2 _initializer_index; + u2 _generic_signature_index; + u2 _contention_group; + + public: + + FieldInfo() : _name_index(0), + _signature_index(0), + _offset(0), + _access_flags(AccessFlags(0)), + _field_flags(FieldFlags(0)), + _initializer_index(0), + _generic_signature_index(0), + _contention_group(0) { } + + FieldInfo(AccessFlags access_flags, u2 name_index, u2 signature_index, u2 initval_index, FieldInfo::FieldFlags fflags) : + _name_index(name_index), + _signature_index(signature_index), + _offset(0), + _access_flags(access_flags), + _field_flags(fflags), + _initializer_index(initval_index), + _generic_signature_index(0), + _contention_group(0) { + if (initval_index != 0) { + _field_flags.update_initialized(true); + } + } + + u4 index() const { return _index; } + void set_index(u4 index) { _index = index; } + u2 name_index() const { return _name_index; } + void set_name_index(u2 index) { _name_index = index; } + u2 signature_index() const { return _signature_index; } + void set_signature_index(u2 index) { _signature_index = index; } + u4 offset() const { return _offset; } + void set_offset(u4 offset) { _offset = offset; } + AccessFlags access_flags() const { return _access_flags; } + FieldFlags field_flags() const { return _field_flags; } + FieldFlags* field_flags_addr() { return &_field_flags; } + u2 initializer_index() const { return _initializer_index; } + void set_initializer_index(u2 index) { _initializer_index = index; } + u2 generic_signature_index() const { return _generic_signature_index; } + void set_generic_signature_index(u2 index) { _generic_signature_index = index; } + u2 contention_group() const { return _contention_group; } + + bool is_contended() const { + return _field_flags.is_contended(); + } + + u2 contended_group() const { + ; + return _contention_group; + } + + void set_contended_group(u2 group) { + _field_flags.update_contended(true); + _contention_group = group; + } + + bool is_offset_set() const { + return _offset != 0; + } + + inline Symbol* name(ConstantPool* cp) const; + + inline Symbol* signature(ConstantPool* cp) const; + + inline Symbol* lookup_symbol(int symbol_index) const; + + void print(outputStream* os, ConstantPool* cp); + void static print_from_growable_array(outputStream* os, GrowableArray* array, ConstantPool* cp); +}; + +class FieldInfoStream; + + +template +class Mapper { + CON* _consumer; + int _next_index; +public: + Mapper(CON* consumer) : _consumer(consumer) { _next_index = 0; } + int next_index() const { return _next_index; } + void set_next_index(int next_index) { _next_index = next_index; } + CON* consumer() const { return _consumer; } + void map_field_info(const FieldInfo& fi); +}; + + + +class FieldInfoReader { + friend class FieldInfoStream; + friend class ClassFileParser; + friend class FieldStreamBase; + friend class FieldInfo; + + UNSIGNED5::Reader _r; + int _next_index; + + public: + FieldInfoReader(const Array* fi); + + private: + uint32_t next_uint() { return _r.next_uint(); } + void skip(int n) { int s = _r.try_skip(n); ; } + +public: + int has_next() { return _r.has_next(); } + int position() { return _r.position(); } + int next_index() { return _next_index; } + void read_field_info(FieldInfo& fi); + + FieldInfoReader& skip_field_info(); + + + + FieldInfoReader& skip_to_field_info(int n); + + + FieldInfoReader& set_position_and_next_index(int position, int next_index); +}; +# 267 "/home/rehn/source/jdk/open/src/hotspot/share/oops/fieldInfo.hpp" +class FieldInfoStream : AllStatic { + friend class fieldDescriptor; + friend class JavaFieldStream; + friend class FieldStreamBase; + friend class ClassFileParser; + + public: + static int num_java_fields(const Array* fis); + static int num_injected_java_fields(const Array* fis); + static int num_total_fields(const Array* fis); + + static Array* create_FieldInfoStream(GrowableArray* fields, int java_fields, int injected_fields, + ClassLoaderData* loader_data, JavaThread* __the_thread__); + static GrowableArray* create_FieldInfoArray(const Array* fis, int* java_fields_count, int* injected_fields_count); + static void print_from_fieldinfo_stream(Array* fis, outputStream* os, ConstantPool* cp); +}; + +class FieldStatus { + enum FieldStatusBitPosition { + _fs_access_watched, + _fs_modification_watched, + _initialized_final_update + }; + + + u1 _flags; + static constexpr u1 flag_mask(FieldStatusBitPosition pos) { return (u1)1 << (int)pos; } + bool test_flag(FieldStatusBitPosition pos) { return (_flags & flag_mask(pos)) != 0; } + + void update_flag(FieldStatusBitPosition pos, bool z); + + static void atomic_set_bits(u1& flags, u1 mask); + static void atomic_clear_bits(u1& flags, u1 mask); + + public: + FieldStatus() { _flags = 0; } + FieldStatus(u1 flags) { _flags = flags; } + u1 as_uint() { return _flags; } + + bool is_access_watched() { return test_flag(_fs_access_watched); } + bool is_modification_watched() { return test_flag(_fs_modification_watched); } + bool is_initialized_final_update() { return test_flag(_initialized_final_update); } + + void update_access_watched(bool z); + void update_modification_watched(bool z); + void update_initialized_final_update(bool z); +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlassFlags.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlassFlags.hpp" +class ClassLoaderData; + + + + + + + +class InstanceKlassFlags { + friend class VMStructs; + friend class JVMCIVMStructs; +# 61 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlassFlags.hpp" + enum { + _misc_rewritten = 1 << 0, _misc_has_nonstatic_fields = 1 << 1, _misc_should_verify_class = 1 << 2, _misc_is_contended = 1 << 3, _misc_has_nonstatic_concrete_methods = 1 << 4, _misc_declares_nonstatic_concrete_methods = 1 << 5, _misc_shared_loading_failed = 1 << 6, _misc_is_shared_boot_class = 1 << 7, _misc_is_shared_platform_class = 1 << 8, _misc_is_shared_app_class = 1 << 9, _misc_has_contended_annotations = 1 << 10, _misc_has_localvariable_table = 1 << 11, _misc_has_miranda_methods = 1 << 12, _misc_has_vanilla_constructor = 1 << 13, _misc_has_final_method = 1 << 14, + }; +# 75 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlassFlags.hpp" + enum { + _misc_is_being_redefined = 1 << 0, _misc_has_resolved_methods = 1 << 1, _misc_has_been_redefined = 1 << 2, _misc_is_scratch_class = 1 << 3, _misc_is_marked_dependent = 1 << 4, + }; + + + u2 shared_loader_type_bits() const { + return _misc_is_shared_boot_class|_misc_is_shared_platform_class|_misc_is_shared_app_class; + } + + + u2 _flags; + + + u1 _status; + + public: + + InstanceKlassFlags() : _flags(0), _status(0) {} +# 101 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlassFlags.hpp" + bool rewritten() const { return (_flags & _misc_rewritten) != 0; } void set_rewritten(bool b) { assert_is_safe(rewritten()); if (b) _flags |= _misc_rewritten; } bool has_nonstatic_fields() const { return (_flags & _misc_has_nonstatic_fields) != 0; } void set_has_nonstatic_fields(bool b) { assert_is_safe(has_nonstatic_fields()); if (b) _flags |= _misc_has_nonstatic_fields; } bool should_verify_class() const { return (_flags & _misc_should_verify_class) != 0; } void set_should_verify_class(bool b) { assert_is_safe(should_verify_class()); if (b) _flags |= _misc_should_verify_class; } bool is_contended() const { return (_flags & _misc_is_contended) != 0; } void set_is_contended(bool b) { assert_is_safe(is_contended()); if (b) _flags |= _misc_is_contended; } bool has_nonstatic_concrete_methods() const { return (_flags & _misc_has_nonstatic_concrete_methods) != 0; } void set_has_nonstatic_concrete_methods(bool b) { assert_is_safe(has_nonstatic_concrete_methods()); if (b) _flags |= _misc_has_nonstatic_concrete_methods; } bool declares_nonstatic_concrete_methods() const { return (_flags & _misc_declares_nonstatic_concrete_methods) != 0; } void set_declares_nonstatic_concrete_methods(bool b) { assert_is_safe(declares_nonstatic_concrete_methods()); if (b) _flags |= _misc_declares_nonstatic_concrete_methods; } bool shared_loading_failed() const { return (_flags & _misc_shared_loading_failed) != 0; } void set_shared_loading_failed(bool b) { assert_is_safe(shared_loading_failed()); if (b) _flags |= _misc_shared_loading_failed; } bool is_shared_boot_class() const { return (_flags & _misc_is_shared_boot_class) != 0; } void set_is_shared_boot_class(bool b) { assert_is_safe(is_shared_boot_class()); if (b) _flags |= _misc_is_shared_boot_class; } bool is_shared_platform_class() const { return (_flags & _misc_is_shared_platform_class) != 0; } void set_is_shared_platform_class(bool b) { assert_is_safe(is_shared_platform_class()); if (b) _flags |= _misc_is_shared_platform_class; } bool is_shared_app_class() const { return (_flags & _misc_is_shared_app_class) != 0; } void set_is_shared_app_class(bool b) { assert_is_safe(is_shared_app_class()); if (b) _flags |= _misc_is_shared_app_class; } bool has_contended_annotations() const { return (_flags & _misc_has_contended_annotations) != 0; } void set_has_contended_annotations(bool b) { assert_is_safe(has_contended_annotations()); if (b) _flags |= _misc_has_contended_annotations; } bool has_localvariable_table() const { return (_flags & _misc_has_localvariable_table) != 0; } void set_has_localvariable_table(bool b) { assert_is_safe(has_localvariable_table()); if (b) _flags |= _misc_has_localvariable_table; } bool has_miranda_methods() const { return (_flags & _misc_has_miranda_methods) != 0; } void set_has_miranda_methods(bool b) { assert_is_safe(has_miranda_methods()); if (b) _flags |= _misc_has_miranda_methods; } bool has_vanilla_constructor() const { return (_flags & _misc_has_vanilla_constructor) != 0; } void set_has_vanilla_constructor(bool b) { assert_is_safe(has_vanilla_constructor()); if (b) _flags |= _misc_has_vanilla_constructor; } bool has_final_method() const { return (_flags & _misc_has_final_method) != 0; } void set_has_final_method(bool b) { assert_is_safe(has_final_method()); if (b) _flags |= _misc_has_final_method; } + + + bool is_shared_unregistered_class() const { + return (_flags & shared_loader_type_bits()) == 0; + } + + void set_shared_class_loader_type(s2 loader_type); + + void assign_class_loader_type(const ClassLoaderData* cld); + void assert_is_safe(bool set) {}; +# 123 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlassFlags.hpp" + bool is_being_redefined() const { return (_status & _misc_is_being_redefined) != 0; } void set_is_being_redefined(bool b) { if (b) { atomic_set_bits(_misc_is_being_redefined); } else { atomic_clear_bits(_misc_is_being_redefined); } } bool has_resolved_methods() const { return (_status & _misc_has_resolved_methods) != 0; } void set_has_resolved_methods(bool b) { if (b) { atomic_set_bits(_misc_has_resolved_methods); } else { atomic_clear_bits(_misc_has_resolved_methods); } } bool has_been_redefined() const { return (_status & _misc_has_been_redefined) != 0; } void set_has_been_redefined(bool b) { if (b) { atomic_set_bits(_misc_has_been_redefined); } else { atomic_clear_bits(_misc_has_been_redefined); } } bool is_scratch_class() const { return (_status & _misc_is_scratch_class) != 0; } void set_is_scratch_class(bool b) { if (b) { atomic_set_bits(_misc_is_scratch_class); } else { atomic_clear_bits(_misc_is_scratch_class); } } bool is_marked_dependent() const { return (_status & _misc_is_marked_dependent) != 0; } void set_is_marked_dependent(bool b) { if (b) { atomic_set_bits(_misc_is_marked_dependent); } else { atomic_clear_bits(_misc_is_marked_dependent); } } + + + void atomic_set_bits(u1 bits) { Atomic::fetch_then_or(&_status, bits); } + void atomic_clear_bits(u1 bits) { Atomic::fetch_then_and(&_status, (u1)(~bits)); } + void print_on(outputStream* st) const; +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceOop.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceOop.hpp" +class instanceOopDesc : public oopDesc { + public: + + static int header_size() { return sizeof(instanceOopDesc)/HeapWordSize; } + + + static int base_offset_in_bytes() { + return (UseCompressedClassPointers) ? + klass_gap_offset_in_bytes() : + sizeof(instanceOopDesc); + + } +}; + + +static_assert(std::is_trivially_default_constructible::value, "required"); +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/vmregTypes.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/code/vmregTypes.hpp" +class VMRegImpl; +typedef VMRegImpl* VMReg; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/oopMap.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/oopMap.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/compressedStream.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/code/compressedStream.hpp" +class CompressedStream : public ResourceObj { + friend class VMStructs; + protected: + u_char* _buffer; + int _position; + + public: + CompressedStream(u_char* buffer, int position = 0) { + _buffer = buffer; + _position = position; + } + + u_char* buffer() const { return _buffer; } + + + int position() const { return _position; } + void set_position(int position) { _position = position; } +}; + + +class CompressedReadStream : public CompressedStream { + private: + inline u_char read() { return _buffer[_position++]; } + + public: + CompressedReadStream(u_char* buffer, int position = 0) + : CompressedStream(buffer, position) {} + + jboolean read_bool() { return (jboolean) read(); } + jbyte read_byte() { return (jbyte ) read(); } + jchar read_char() { return (jchar ) read_int(); } + jshort read_short() { return (jshort ) read_signed_int(); } + jint read_signed_int(); + jfloat read_float(); + jdouble read_double(); + jlong read_long(); + + jint read_int() { + return UNSIGNED5::read_uint(_buffer, _position, 0); + } +}; + + +class CompressedWriteStream : public CompressedStream { + private: + bool full() { + return _position >= _size; + } + void store(u_char b) { + _buffer[_position++] = b; + } + void write(u_char b) { + if (full()) grow(); + store(b); + } + void grow(); + + protected: + int _size; + + public: + CompressedWriteStream(int initial_size); + CompressedWriteStream(u_char* buffer, int initial_size, int position = 0) + : CompressedStream(buffer, position) { _size = initial_size; } + + void write_bool(jboolean value) { write(value); } + void write_byte(jbyte value) { write(value); } + void write_char(jchar value) { write_int(value); } + void write_short(jshort value) { write_signed_int(value); } + void write_signed_int(jint value) { write_int(UNSIGNED5::encode_sign(value)); } + void write_float(jfloat value); + void write_double(jdouble value); + void write_long(jlong value); + + void write_int(juint value) { + UNSIGNED5::write_uint_grow(value, _buffer, _position, _size, + [&](int){ grow(); }); + } +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/oopMap.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/vmreg.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/code/vmreg.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/asm/register.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/asm/register.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/population_count.hpp" 1 +# 46 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/population_count.hpp" +template +inline unsigned population_count(T x) { + static_assert((BitsPerWord <= 128), "BitsPerWord <= 128"); + static_assert((BitsPerByte == 8), "BitsPerByte == 8"); + static_assert((std::is_integral::value), "std::is_integral::value"); + static_assert((!std::is_signed::value), "!std::is_signed::value"); + + + + using P = std::conditional_t<(sizeof(T) < sizeof(unsigned)), unsigned, T>; + const T all = ~T(0); + const P fives = all/3; + const P threes = (all/15) * 3; + const P z_ones = all/255; + const P z_effs = z_ones * 15; + P r = x; + r -= ((r >> 1) & fives); + r = (r & threes) + ((r >> 2) & threes); + r = ((r + (r >> 4)) & z_effs) * z_ones; + + + + return checked_cast(static_cast(r) >> (((sizeof(T) - 1) * BitsPerByte))); +} +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/asm/register.hpp" 2 + + +class AbstractRegisterImpl; +typedef AbstractRegisterImpl* AbstractRegister; +# 44 "/home/rehn/source/jdk/open/src/hotspot/share/asm/register.hpp" +class AbstractRegisterImpl { + protected: + int value() const { return (int)(intx)this; } +}; +# 90 "/home/rehn/source/jdk/open/src/hotspot/share/asm/register.hpp" +template class RegSetIterator; +template class ReverseRegSetIterator; + + +template +class AbstractRegSet { + uint32_t _bitset; + + AbstractRegSet(uint32_t bitset) : _bitset(bitset) { } + +public: + + AbstractRegSet() : _bitset(0) { } + + AbstractRegSet(RegImpl r1) : _bitset(1 << r1->encoding()) { } + + AbstractRegSet operator+(const AbstractRegSet aSet) const { + AbstractRegSet result(_bitset | aSet._bitset); + return result; + } + + AbstractRegSet operator-(const AbstractRegSet aSet) const { + AbstractRegSet result(_bitset & ~aSet._bitset); + return result; + } + + AbstractRegSet &operator+=(const AbstractRegSet aSet) { + *this = *this + aSet; + return *this; + } + + AbstractRegSet &operator-=(const AbstractRegSet aSet) { + *this = *this - aSet; + return *this; + } + + static AbstractRegSet of(RegImpl r1) { + return AbstractRegSet(r1); + } + + static AbstractRegSet of(RegImpl r1, RegImpl r2) { + return of(r1) + r2; + } + + static AbstractRegSet of(RegImpl r1, RegImpl r2, RegImpl r3) { + return of(r1, r2) + r3; + } + + static AbstractRegSet of(RegImpl r1, RegImpl r2, RegImpl r3, RegImpl r4) { + return of(r1, r2, r3) + r4; + } + + static AbstractRegSet range(RegImpl start, RegImpl end) { + int start_enc = start->encoding(); + int end_enc = end->encoding(); + ; + uint32_t bits = ~0; + bits <<= start_enc; + bits <<= 31 - end_enc; + bits >>= 31 - end_enc; + + return AbstractRegSet(bits); + } + + uint size() const { return population_count(_bitset); } + + uint32_t bits() const { return _bitset; } + +private: + + RegImpl first(); + RegImpl last(); + +public: + + friend class RegSetIterator; + friend class ReverseRegSetIterator; + + RegSetIterator begin(); + ReverseRegSetIterator rbegin(); +}; + +template +class RegSetIterator { + AbstractRegSet _regs; + +public: + RegSetIterator(AbstractRegSet x): _regs(x) {} + RegSetIterator(const RegSetIterator& mit) : _regs(mit._regs) {} + + RegSetIterator& operator++() { + RegImpl r = _regs.first(); + if (r->is_valid()) + _regs -= r; + return *this; + } + + RegSetIterator& operator=(const RegSetIterator& mit) { + _regs= mit._regs; + return *this; + } + bool operator==(const RegSetIterator& rhs) const { + return _regs.bits() == rhs._regs.bits(); + } + bool operator!=(const RegSetIterator& rhs) const { + return ! (rhs == *this); + } + + RegImpl operator*() { + return _regs.first(); + } + + AbstractRegSet remaining() const { + return _regs; + } +}; + +template +inline RegSetIterator AbstractRegSet::begin() { + return RegSetIterator(*this); +} + +template +class ReverseRegSetIterator { + AbstractRegSet _regs; + +public: + ReverseRegSetIterator(AbstractRegSet x): _regs(x) {} + ReverseRegSetIterator(const ReverseRegSetIterator& mit) : _regs(mit._regs) {} + + ReverseRegSetIterator& operator++() { + RegImpl r = _regs.last(); + if (r->is_valid()) + _regs -= r; + return *this; + } + + bool operator==(const ReverseRegSetIterator& rhs) const { + return _regs.bits() == rhs._regs.bits(); + } + bool operator!=(const ReverseRegSetIterator& rhs) const { + return ! (rhs == *this); + } + + RegImpl operator*() { + return _regs.last(); + } +}; + +template +inline ReverseRegSetIterator AbstractRegSet::rbegin() { + return ReverseRegSetIterator(*this); +} + +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/register_riscv.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/register_riscv.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/asm/register.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/register_riscv.hpp" 2 +# 47 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/register_riscv.hpp" +class VMRegImpl; +typedef VMRegImpl* VMReg; + +class Register { + private: + int _encoding; + + constexpr explicit Register(int encoding) : _encoding(encoding) {} + + public: + enum { + number_of_registers = 32, + max_slots_per_register = 2, + + + + compressed_register_base = 8, + compressed_register_top = 15, + }; + + class RegisterImpl: public AbstractRegisterImpl { + friend class Register; + + static constexpr const RegisterImpl* first(); + + public: + + constexpr int raw_encoding() const { return checked_cast(this - first()); } + constexpr int encoding() const { ; return raw_encoding(); } + constexpr bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; } + + + int compressed_raw_encoding() const { + return raw_encoding() - compressed_register_base; + } + + int compressed_encoding() const { + ; + return encoding() - compressed_register_base; + } + + bool is_compressed_valid() const { + return raw_encoding() >= compressed_register_base && + raw_encoding() <= compressed_register_top; + } + + + inline Register successor() const; + + VMReg as_VMReg() const; + + const char* name() const; + }; + + inline friend constexpr Register as_Register(int encoding); + + constexpr Register() : _encoding(-1) {} + + int operator==(const Register r) const { return _encoding == r._encoding; } + int operator!=(const Register r) const { return _encoding != r._encoding; } + + constexpr const RegisterImpl* operator->() const { return RegisterImpl::first() + _encoding; } +}; + +extern Register::RegisterImpl all_RegisterImpls[Register::number_of_registers + 1] __attribute__ ((visibility ("internal"))); + +inline constexpr const Register::RegisterImpl* Register::RegisterImpl::first() { + return all_RegisterImpls + 1; +} + +constexpr Register noreg = Register(); + +inline constexpr Register as_Register(int encoding) { + if (0 <= encoding && encoding < Register::number_of_registers) { + return Register(encoding); + } + return noreg; +} + +inline Register Register::RegisterImpl::successor() const { + ; + return as_Register(encoding() + 1); +} + + +constexpr Register x0 = as_Register( 0); +constexpr Register x1 = as_Register( 1); +constexpr Register x2 = as_Register( 2); +constexpr Register x3 = as_Register( 3); +constexpr Register x4 = as_Register( 4); +constexpr Register x5 = as_Register( 5); +constexpr Register x6 = as_Register( 6); +constexpr Register x7 = as_Register( 7); +constexpr Register x8 = as_Register( 8); +constexpr Register x9 = as_Register( 9); +constexpr Register x10 = as_Register(10); +constexpr Register x11 = as_Register(11); +constexpr Register x12 = as_Register(12); +constexpr Register x13 = as_Register(13); +constexpr Register x14 = as_Register(14); +constexpr Register x15 = as_Register(15); +constexpr Register x16 = as_Register(16); +constexpr Register x17 = as_Register(17); +constexpr Register x18 = as_Register(18); +constexpr Register x19 = as_Register(19); +constexpr Register x20 = as_Register(20); +constexpr Register x21 = as_Register(21); +constexpr Register x22 = as_Register(22); +constexpr Register x23 = as_Register(23); +constexpr Register x24 = as_Register(24); +constexpr Register x25 = as_Register(25); +constexpr Register x26 = as_Register(26); +constexpr Register x27 = as_Register(27); +constexpr Register x28 = as_Register(28); +constexpr Register x29 = as_Register(29); +constexpr Register x30 = as_Register(30); +constexpr Register x31 = as_Register(31); + + +class FloatRegister { + private: + int _encoding; + + constexpr explicit FloatRegister(int encoding) : _encoding(encoding) {} + + public: + inline friend constexpr FloatRegister as_FloatRegister(int encoding); + + enum { + number_of_registers = 32, + max_slots_per_register = 2, + + + compressed_register_base = 8, + compressed_register_top = 15, + }; + + class FloatRegisterImpl: public AbstractRegisterImpl { + friend class FloatRegister; + + static constexpr const FloatRegisterImpl* first(); + + public: + + constexpr int raw_encoding() const { return checked_cast(this - first()); } + constexpr int encoding() const { ; return raw_encoding(); } + constexpr bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; } + + + int compressed_raw_encoding() const { + return raw_encoding() - compressed_register_base; + } + + int compressed_encoding() const { + ; + return encoding() - compressed_register_base; + } + + bool is_compressed_valid() const { + return raw_encoding() >= compressed_register_base && + raw_encoding() <= compressed_register_top; + } + + + inline FloatRegister successor() const; + + VMReg as_VMReg() const; + + const char* name() const; + }; + + constexpr FloatRegister() : _encoding(-1) {} + + int operator==(const FloatRegister r) const { return _encoding == r._encoding; } + int operator!=(const FloatRegister r) const { return _encoding != r._encoding; } + + constexpr const FloatRegisterImpl* operator->() const { return FloatRegisterImpl::first() + _encoding; } +}; + +extern FloatRegister::FloatRegisterImpl all_FloatRegisterImpls[FloatRegister::number_of_registers + 1] __attribute__ ((visibility ("internal"))); + +inline constexpr const FloatRegister::FloatRegisterImpl* FloatRegister::FloatRegisterImpl::first() { + return all_FloatRegisterImpls + 1; +} + +constexpr FloatRegister fnoreg = FloatRegister(); + +inline constexpr FloatRegister as_FloatRegister(int encoding) { + if (0 <= encoding && encoding < FloatRegister::number_of_registers) { + return FloatRegister(encoding); + } + return fnoreg; +} + +inline FloatRegister FloatRegister::FloatRegisterImpl::successor() const { + ; + return as_FloatRegister(encoding() + 1); +} + + +constexpr FloatRegister f0 = as_FloatRegister( 0); +constexpr FloatRegister f1 = as_FloatRegister( 1); +constexpr FloatRegister f2 = as_FloatRegister( 2); +constexpr FloatRegister f3 = as_FloatRegister( 3); +constexpr FloatRegister f4 = as_FloatRegister( 4); +constexpr FloatRegister f5 = as_FloatRegister( 5); +constexpr FloatRegister f6 = as_FloatRegister( 6); +constexpr FloatRegister f7 = as_FloatRegister( 7); +constexpr FloatRegister f8 = as_FloatRegister( 8); +constexpr FloatRegister f9 = as_FloatRegister( 9); +constexpr FloatRegister f10 = as_FloatRegister(10); +constexpr FloatRegister f11 = as_FloatRegister(11); +constexpr FloatRegister f12 = as_FloatRegister(12); +constexpr FloatRegister f13 = as_FloatRegister(13); +constexpr FloatRegister f14 = as_FloatRegister(14); +constexpr FloatRegister f15 = as_FloatRegister(15); +constexpr FloatRegister f16 = as_FloatRegister(16); +constexpr FloatRegister f17 = as_FloatRegister(17); +constexpr FloatRegister f18 = as_FloatRegister(18); +constexpr FloatRegister f19 = as_FloatRegister(19); +constexpr FloatRegister f20 = as_FloatRegister(20); +constexpr FloatRegister f21 = as_FloatRegister(21); +constexpr FloatRegister f22 = as_FloatRegister(22); +constexpr FloatRegister f23 = as_FloatRegister(23); +constexpr FloatRegister f24 = as_FloatRegister(24); +constexpr FloatRegister f25 = as_FloatRegister(25); +constexpr FloatRegister f26 = as_FloatRegister(26); +constexpr FloatRegister f27 = as_FloatRegister(27); +constexpr FloatRegister f28 = as_FloatRegister(28); +constexpr FloatRegister f29 = as_FloatRegister(29); +constexpr FloatRegister f30 = as_FloatRegister(30); +constexpr FloatRegister f31 = as_FloatRegister(31); + + +class VectorRegister { + int _encoding; + + constexpr explicit VectorRegister(int encoding) : _encoding(encoding) {} + + public: + inline friend constexpr VectorRegister as_VectorRegister(int encoding); + + enum { + number_of_registers = 32, + max_slots_per_register = 4 + }; + + class VectorRegisterImpl: public AbstractRegisterImpl { + friend class VectorRegister; + + static constexpr const VectorRegisterImpl* first(); + + public: + + constexpr int raw_encoding() const { return checked_cast(this - first()); } + constexpr int encoding() const { ; return raw_encoding(); } + constexpr bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; } + + + inline VectorRegister successor() const; + + VMReg as_VMReg() const; + + const char* name() const; + }; + + constexpr VectorRegister() : _encoding(-1) {} + + int operator==(const VectorRegister r) const { return _encoding == r._encoding; } + int operator!=(const VectorRegister r) const { return _encoding != r._encoding; } + + constexpr const VectorRegisterImpl* operator->() const { return VectorRegisterImpl::first() + _encoding; } +}; + +extern VectorRegister::VectorRegisterImpl all_VectorRegisterImpls[VectorRegister::number_of_registers + 1] __attribute__ ((visibility ("internal"))); + +inline constexpr const VectorRegister::VectorRegisterImpl* VectorRegister::VectorRegisterImpl::first() { + return all_VectorRegisterImpls + 1; +} + +constexpr VectorRegister vnoreg = VectorRegister(); + +inline constexpr VectorRegister as_VectorRegister(int encoding) { + if (0 <= encoding && encoding < VectorRegister::number_of_registers) { + return VectorRegister(encoding); + } + return vnoreg; +} + +inline VectorRegister VectorRegister::VectorRegisterImpl::successor() const { + ; + return as_VectorRegister(encoding() + 1); +} + + +constexpr VectorRegister v0 = as_VectorRegister( 0); +constexpr VectorRegister v1 = as_VectorRegister( 1); +constexpr VectorRegister v2 = as_VectorRegister( 2); +constexpr VectorRegister v3 = as_VectorRegister( 3); +constexpr VectorRegister v4 = as_VectorRegister( 4); +constexpr VectorRegister v5 = as_VectorRegister( 5); +constexpr VectorRegister v6 = as_VectorRegister( 6); +constexpr VectorRegister v7 = as_VectorRegister( 7); +constexpr VectorRegister v8 = as_VectorRegister( 8); +constexpr VectorRegister v9 = as_VectorRegister( 9); +constexpr VectorRegister v10 = as_VectorRegister(10); +constexpr VectorRegister v11 = as_VectorRegister(11); +constexpr VectorRegister v12 = as_VectorRegister(12); +constexpr VectorRegister v13 = as_VectorRegister(13); +constexpr VectorRegister v14 = as_VectorRegister(14); +constexpr VectorRegister v15 = as_VectorRegister(15); +constexpr VectorRegister v16 = as_VectorRegister(16); +constexpr VectorRegister v17 = as_VectorRegister(17); +constexpr VectorRegister v18 = as_VectorRegister(18); +constexpr VectorRegister v19 = as_VectorRegister(19); +constexpr VectorRegister v20 = as_VectorRegister(20); +constexpr VectorRegister v21 = as_VectorRegister(21); +constexpr VectorRegister v22 = as_VectorRegister(22); +constexpr VectorRegister v23 = as_VectorRegister(23); +constexpr VectorRegister v24 = as_VectorRegister(24); +constexpr VectorRegister v25 = as_VectorRegister(25); +constexpr VectorRegister v26 = as_VectorRegister(26); +constexpr VectorRegister v27 = as_VectorRegister(27); +constexpr VectorRegister v28 = as_VectorRegister(28); +constexpr VectorRegister v29 = as_VectorRegister(29); +constexpr VectorRegister v30 = as_VectorRegister(30); +constexpr VectorRegister v31 = as_VectorRegister(31); + + + +class ConcreteRegisterImpl : public AbstractRegisterImpl { + public: + enum { + max_gpr = Register::number_of_registers * Register::max_slots_per_register, + max_fpr = max_gpr + FloatRegister::number_of_registers * FloatRegister::max_slots_per_register, + max_vpr = max_fpr + VectorRegister::number_of_registers * VectorRegister::max_slots_per_register, + + + + + + number_of_registers = max_vpr + }; +}; + +typedef AbstractRegSet RegSet; +typedef AbstractRegSet FloatRegSet; +typedef AbstractRegSet VectorRegSet; + + +template <> +inline Register AbstractRegSet::first() { + uint32_t first = _bitset & -_bitset; + return first ? as_Register(exact_log2(first)) : noreg; +} + +template <> +inline FloatRegister AbstractRegSet::first() { + uint32_t first = _bitset & -_bitset; + return first ? as_FloatRegister(exact_log2(first)) : fnoreg; +} + +template<> +inline VectorRegister AbstractRegSet::first() { + uint32_t first = _bitset & -_bitset; + return first ? as_VectorRegister(exact_log2(first)) : vnoreg; +} +# 245 "/home/rehn/source/jdk/open/src/hotspot/share/asm/register.hpp" 2 + + + +template +inline void assert_different_registers(R first_register, Rx... more_registers) { +# 259 "/home/rehn/source/jdk/open/src/hotspot/share/asm/register.hpp" +} +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/code/vmreg.hpp" 2 + + + + + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/opto/adlcVMDeps.hpp" 1 +# 36 "/home/rehn/source/jdk/open/src/hotspot/share/opto/adlcVMDeps.hpp" +class AdlcVMDeps { + public: + + enum { Control, I_O, Memory, FramePtr, ReturnAdr, Parms }; + + enum Cisc_Status { Not_cisc_spillable = -1 }; + + + enum Name { + Physical = 0 + }; + + + static const char* oop_reloc_type() { return "relocInfo::oop_type"; } + static const char* none_reloc_type() { return "relocInfo::none"; } +}; +# 37 "/home/rehn/source/jdk/open/src/hotspot/share/code/vmreg.hpp" 2 +# 47 "/home/rehn/source/jdk/open/src/hotspot/share/code/vmreg.hpp" +class VMRegImpl; +typedef VMRegImpl* VMReg; + +class VMRegImpl { + +friend class VMStructs; +friend class OptoReg; + +private: + enum { + BAD_REG = -1 + }; + + + + + + static VMReg stack0; + + static constexpr VMReg first(); + + static const char *regName[]; + static const int register_count; + +public: + + static constexpr VMReg stack_0() { + return first() + ((ConcreteRegisterImpl::number_of_registers + 7) & ~7); + } + + static VMReg as_VMReg(int val, bool bad_ok = false) { + ; + return val + first(); + } + + const char* name() { + if (is_reg()) { + return regName[value()]; + } else if (!is_valid()) { + return "BAD"; + } else { + + return "STACKED REG"; + } + } + int value() const { return checked_cast(this - first()); } + static VMReg Bad() { return BAD_REG+first(); } + bool is_valid() const { return value() != BAD_REG; } + bool is_stack() const { return this >= stack_0(); } + bool is_reg() const { return is_valid() && !is_stack(); } +# 105 "/home/rehn/source/jdk/open/src/hotspot/share/code/vmreg.hpp" + static const int stack_slot_size; + static const int slots_per_word; + + + + + + VMReg next() { + ; + return this + 1; + } + VMReg next(int i) { + ; + return this + i; + } + VMReg prev() { + ; + return this - 1; + } + + + void print_on(outputStream* st) const; + void print() const; + + + + + + + VMReg bias(int offset) const { + ; + + VMReg res = stack2reg(reg2stack() + offset); + ; + return res; + } + + + static VMReg stack2reg(int idx) { + return stack_0() + idx; + } + + int reg2stack() const { + ; + return checked_cast(this - stack_0()); + } + + static void set_regName(); + +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/vmreg_riscv.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/vmreg_riscv.hpp" +inline bool is_Register() { + return (unsigned int) value() < (unsigned int) ConcreteRegisterImpl::max_gpr; +} + +inline bool is_FloatRegister() { + return value() >= ConcreteRegisterImpl::max_gpr && value() < ConcreteRegisterImpl::max_fpr; +} + +inline bool is_VectorRegister() { + return value() >= ConcreteRegisterImpl::max_fpr && value() < ConcreteRegisterImpl::max_vpr; +} + +inline Register as_Register() { + ; + return ::as_Register(value() / Register::max_slots_per_register); +} + +inline FloatRegister as_FloatRegister() { + ; + return ::as_FloatRegister((value() - ConcreteRegisterImpl::max_gpr) / + FloatRegister::max_slots_per_register); +} + +inline VectorRegister as_VectorRegister() { + ; + return ::as_VectorRegister((value() - ConcreteRegisterImpl::max_fpr) / + VectorRegister::max_slots_per_register); +} + +inline bool is_concrete() { + ; + if (is_VectorRegister()) { + int base = value() - ConcreteRegisterImpl::max_fpr; + return (base % VectorRegister::max_slots_per_register) == 0; + } else { + return is_even(value()); + } +} +# 155 "/home/rehn/source/jdk/open/src/hotspot/share/code/vmreg.hpp" 2 + +}; + +extern VMRegImpl all_VMRegs[ConcreteRegisterImpl::number_of_registers + 1] __attribute__ ((visibility ("internal"))); +inline constexpr VMReg VMRegImpl::first() { return all_VMRegs + 1; } +# 171 "/home/rehn/source/jdk/open/src/hotspot/share/code/vmreg.hpp" +class VMRegPair { +private: + VMReg _second; + VMReg _first; +public: + void set_bad ( ) { _second=VMRegImpl::Bad(); _first=VMRegImpl::Bad(); } + void set1 ( VMReg v ) { _second=VMRegImpl::Bad(); _first=v; } + void set2 ( VMReg v ) { _second=v->next(); _first=v; } + void set_pair( VMReg second, VMReg first ) { _second= second; _first= first; } + void set_ptr ( VMReg ptr ) { + + _second = ptr->next(); + + + + _first = ptr; + } + + bool is_single_reg() const { + return (_first->is_valid()) && (_first->value() + 1 == _second->value()); + } + + + bool is_adjacent_on_stack(int alignment) const { + return (_first->is_stack() && (_first->value() + 1 == _second->value()) && ((_first->value() & (alignment-1)) == 0)); + } + + + bool is_adjacent_aligned_on_stack(int alignment) const { + return (_first->is_stack() && (_first->value() + 1 == _second->value()) && ((_first->value() & (alignment-1)) == 0)); + } + + + bool is_single_phys_reg() const { + return (_first->is_reg() && (_first->value() + 1 == _second->value())); + } + + VMReg second() const { return _second; } + VMReg first() const { return _first; } + VMRegPair(VMReg s, VMReg f) { _second = s; _first = f; } + VMRegPair(VMReg f) { _second = VMRegImpl::Bad(); _first = f; } + VMRegPair() { _second = VMRegImpl::Bad(); _first = VMRegImpl::Bad(); } +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/oopMap.hpp" 2 +# 45 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/oopMap.hpp" +enum class DerivedPointerIterationMode; +class frame; +class RegisterMap; +class OopClosure; +class CodeBlob; +class ImmutableOopMap; + +enum class derived_base : intptr_t {}; +enum class derived_pointer : intptr_t {}; + +class OopMapValue: public StackObj { + friend class VMStructs; +private: + unsigned short _value; + unsigned short value() const { return _value; } + void set_value(unsigned short value) { _value = value; } + short _content_reg; + +public: + + enum { type_bits = 2, + register_bits = BitsPerShort - type_bits }; + + enum { type_shift = 0, + register_shift = type_bits }; + + enum { type_mask = ((((type_bits) >= BitsPerWord) ? 0 : (OneBit << (type_bits))) - 1), + type_mask_in_place = type_mask << type_shift, + register_mask = ((((register_bits) >= BitsPerWord) ? 0 : (OneBit << (register_bits))) - 1), + register_mask_in_place = register_mask << register_shift }; + + enum oop_types { + oop_value, + narrowoop_value, + callee_saved_value, + derived_oop_value, + unused_value = -1 + }; + + + OopMapValue () { set_value(0); set_content_reg(VMRegImpl::Bad()); } + OopMapValue (VMReg reg, oop_types t, VMReg reg2) { + set_reg_type(reg, t); + set_content_reg(reg2); + } + + private: + void set_reg_type(VMReg p, oop_types t) { + set_value(checked_cast((p->value() << register_shift) | t)); + ; + ; + } + + void set_content_reg(VMReg r) { + if (is_callee_saved()) { + + ; + } else if (is_derived_oop()) { + ; + } else { + ; + } + _content_reg = checked_cast(r->value()); + } + + public: + + void write_on(CompressedWriteStream* stream) { + stream->write_int(value()); + if(is_callee_saved() || is_derived_oop()) { + stream->write_int(checked_cast(content_reg()->value())); + } + } + + void read_from(CompressedReadStream* stream) { + set_value(checked_cast(stream->read_int())); + if (is_callee_saved() || is_derived_oop()) { + set_content_reg(VMRegImpl::as_VMReg(stream->read_int(), true)); + } + } + + + bool is_oop() { return mask_bits(value(), type_mask_in_place) == oop_value; } + bool is_narrowoop() { return mask_bits(value(), type_mask_in_place) == narrowoop_value; } + bool is_callee_saved() { return mask_bits(value(), type_mask_in_place) == callee_saved_value; } + bool is_derived_oop() { return mask_bits(value(), type_mask_in_place) == derived_oop_value; } + + VMReg reg() const { return VMRegImpl::as_VMReg(checked_cast(mask_bits(value(), register_mask_in_place) >> register_shift)); } + oop_types type() const { return (oop_types)mask_bits(value(), type_mask_in_place); } + + static bool legal_vm_reg_name(VMReg p) { + return (p->value() == (p->value() & register_mask)); + } + + VMReg content_reg() const { return VMRegImpl::as_VMReg(_content_reg, true); } + + + int stack_offset() { + ; + return reg()->reg2stack(); + } + + void print_on(outputStream* st) const; + void print() const; +}; + + +class OopMap: public ResourceObj { + friend class OopMapStream; + friend class VMStructs; + friend class OopMapSet; + friend class OopMapSort; + private: + int _pc_offset; + int _omv_count; + int _num_oops; + int _index; + bool _has_derived_oops; + CompressedWriteStream* _write_stream; + + + + + int omv_count() const { return _omv_count; } + void set_omv_count(int value) { _omv_count = value; } + void increment_count() { _omv_count++; } + void increment_num_oops() { _num_oops++; } + void set_has_derived_oops(bool value) { _has_derived_oops = value; } + CompressedWriteStream* write_stream() const { return _write_stream; } + void set_write_stream(CompressedWriteStream* value) { _write_stream = value; } + + enum DeepCopyToken { _deep_copy_token }; + OopMap(DeepCopyToken, OopMap* source); + + void set_xxx(VMReg reg, OopMapValue::oop_types x, VMReg optional); + + public: + OopMap(int frame_size, int arg_count); + + + int offset() const { return _pc_offset; } + void set_offset(int o) { _pc_offset = o; } + int count() const { return _omv_count; } + int data_size() const { return write_stream()->position(); } + address data() const { return write_stream()->buffer(); } + int num_oops() const { return _num_oops; } + bool has_derived_oops() const { return _has_derived_oops; } + int index() const { return _index; } + + + + + void set_oop ( VMReg local); + void set_narrowoop(VMReg local); + void set_callee_saved( VMReg local, VMReg caller_machine_register ); + void set_derived_oop ( VMReg local, VMReg derived_from_local_register ); + + int heap_size() const; + void copy_data_to(address addr) const; + void copy_and_sort_data_to(address addr) const; + OopMap* deep_copy(); + + bool legal_vm_reg_name(VMReg local) { + return OopMapValue::legal_vm_reg_name(local); + } + + + void print_on(outputStream* st) const; + void print() const; + bool equals(const OopMap* other) const; +}; + +class OopMapSet : public ResourceObj { + friend class VMStructs; + private: + GrowableArray _list; + + int add(OopMap* value) { return _list.append(value); } + + public: + OopMapSet(); + + + int size() const { return _list.length(); } + + OopMap* at(int index) const { return _list.at(index); } + + + int add_gc_map(int pc, OopMap* map); + + + + + + static const ImmutableOopMap* find_map(const CodeBlob* cb, address pc); + static const ImmutableOopMap* find_map(const frame *fr); + + + static void oops_do (const frame* fr, + const RegisterMap* reg_map, + OopClosure* f, + DerivedOopClosure* df); + static void oops_do (const frame* fr, + const RegisterMap* reg_map, + OopClosure* f, + DerivedPointerIterationMode mode); + static void update_register_map(const frame* fr, RegisterMap *reg_map); + + + + + + + void print_on(outputStream* st) const; + void print() const; +}; + +class ImmutableOopMapBuilder; + +class OopMapClosure : public Closure { + public: + virtual bool handle_type(OopMapValue::oop_types type) { return true; } + virtual void do_value(VMReg reg, OopMapValue::oop_types type) = 0; +}; + +template +class OopMapDo; + +class ImmutableOopMap { + friend class OopMapStream; + friend class VMStructs; + template + friend class OopMapDo; + + + +private: + int _count; + int _num_oops; + bool _has_derived_oops; + + address data_addr() const { return (address) this + sizeof(ImmutableOopMap); } +public: + ImmutableOopMap(const OopMap* oopmap); + + int count() const { return _count; } + int num_oops() const { return _num_oops; } + bool has_derived_oops() const { return _has_derived_oops; } + bool has_any(OopMapValue::oop_types type) const; + + + + + + void oops_do(const frame* fr, const RegisterMap* reg_map, OopClosure* f, DerivedOopClosure* df) const; + void oops_do(const frame* fr, const RegisterMap* reg_map, OopClosure* f, DerivedPointerIterationMode derived_mode) const; + void all_type_do(const frame *fr, OopMapValue::oop_types type, OopMapClosure* fn) const; + void all_type_do(const frame *fr, OopMapClosure* fn) const; + void update_register_map(const frame* fr, RegisterMap *reg_map) const; + + + void print_on(outputStream* st) const; + void print() const; +}; + +class ImmutableOopMapSet; +class ImmutableOopMap; +class OopMapSet; + +class ImmutableOopMapPair { + friend class VMStructs; +private: + int _pc_offset; + int _oopmap_offset; +public: + ImmutableOopMapPair(int pc_offset, int oopmap_offset) : _pc_offset(pc_offset), _oopmap_offset(oopmap_offset) { + ; + } + const ImmutableOopMap* get_from(const ImmutableOopMapSet* set) const; + + int pc_offset() const { return _pc_offset; } + int oopmap_offset() const { return _oopmap_offset; } +}; + +class ImmutableOopMapSet { + friend class VMStructs; +private: + int _count; + int _size; + + address data() const { return (address) this + sizeof(*this) + sizeof(ImmutableOopMapPair) * _count; } + +public: + ImmutableOopMapSet(const OopMapSet* oopmap_set, int size) : _count(oopmap_set->size()), _size(size) {} + + ImmutableOopMap* oopmap_at_offset(int offset) const { + ; + address addr = data() + offset; + return (ImmutableOopMap*) addr; + } + + ImmutableOopMapPair* get_pairs() const { return (ImmutableOopMapPair*) ((address) this + sizeof(*this)); } + + static ImmutableOopMapSet* build_from(const OopMapSet* oopmap_set); + + int find_slot_for_offset(int pc_offset) const; + const ImmutableOopMap* find_map_at_offset(int pc_offset) const; + const ImmutableOopMap* find_map_at_slot(int slot, int pc_offset) const; + + const ImmutableOopMapPair* pair_at(int index) const { ; return &get_pairs()[index]; } + + int count() const { return _count; } + int nr_of_bytes() const { return _size; } + + void print_on(outputStream* st) const; + void print() const; +}; + +class OopMapStream : public StackObj { + private: + CompressedReadStream _stream; + int _size; + int _position; + bool _valid_omv; + OopMapValue _omv; + void find_next(); + + public: + OopMapStream(const OopMap* oop_map); + OopMapStream(const ImmutableOopMap* oop_map); + bool is_done() { if(!_valid_omv) { find_next(); } return !_valid_omv; } + void next() { find_next(); } + OopMapValue current() { return _omv; } + + + +}; + +class ImmutableOopMapBuilder { +private: + class Mapping; + +private: + const OopMapSet* _set; + const OopMap* _empty; + const OopMap* _last; + int _empty_offset; + int _last_offset; + int _offset; + int _required; + Mapping* _mapping; + ImmutableOopMapSet* _new_set; + + + class Mapping : public ResourceObj { + public: + enum kind_t { OOPMAP_UNKNOWN = 0, OOPMAP_NEW = 1, OOPMAP_EMPTY = 2, OOPMAP_DUPLICATE = 3 }; + + kind_t _kind; + int _offset; + int _size; + const OopMap* _map; + const OopMap* _other; + + Mapping() : _kind(OOPMAP_UNKNOWN), _offset(-1), _size(-1), _map(nullptr) {} + + void set(kind_t kind, int offset, int size, const OopMap* map = 0, const OopMap* other = 0) { + _kind = kind; + _offset = offset; + _size = size; + _map = map; + _other = other; + } + }; + +public: + ImmutableOopMapBuilder(const OopMapSet* set); + + int heap_size(); + ImmutableOopMapSet* build(); + ImmutableOopMapSet* generate_into(address buffer); +private: + bool is_empty(const OopMap* map) const { + return map->count() == 0; + } + + bool is_last_duplicate(const OopMap* map) { + if (_last != nullptr && _last->count() > 0 && _last->equals(map)) { + return true; + } + return false; + } + + + + + + bool has_empty() const { + return _empty_offset != -1; + } + + int size_for(const OopMap* map) const; + void fill_pair(ImmutableOopMapPair* pair, const OopMap* map, int offset, const ImmutableOopMapSet* set); + int fill_map(ImmutableOopMapPair* pair, const OopMap* map, int offset, const ImmutableOopMapSet* set); + void fill(ImmutableOopMapSet* set, int size); +}; + +class SkipNullValue { +public: + static inline bool should_skip(void* val); +}; + +class IncludeAllValues { +public: + static bool should_skip(void* value) { return false; } +}; + +template +class OopMapDo { +private: + OopFnT* _oop_fn; + DerivedOopFnT* _derived_oop_fn; +public: + OopMapDo(OopFnT* oop_fn, DerivedOopFnT* derived_oop_fn) : _oop_fn(oop_fn), _derived_oop_fn(derived_oop_fn) {} + template + void oops_do(const frame* fr, const RegisterMapT* reg_map, const ImmutableOopMap* oopmap); +private: + template + void iterate_oops_do(const frame *fr, const RegisterMapT *reg_map, const ImmutableOopMap* oopmap); +}; + + + + + + + +class DerivedPointerTable : public AllStatic { + friend class VMStructs; + private: + class Entry; + static bool _active; + + public: + static void clear(); + static void add(derived_pointer* derived, derived_base* base); + static void update_pointers(); + static bool is_empty(); + static bool is_active() { return _active; } + static void set_active(bool value) { _active = value; } +}; + + + +class DerivedPointerTableDeactivate: public StackObj { + private: + bool _active; + public: + DerivedPointerTableDeactivate() { + _active = DerivedPointerTable::is_active(); + if (_active) { + DerivedPointerTable::set_active(false); + } + } + + ~DerivedPointerTableDeactivate() { + + ; + if (_active) { + DerivedPointerTable::set_active(true); + } + } +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/basicLock.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/basicLock.hpp" +class BasicLock { + friend class VMStructs; + friend class JVMCIVMStructs; + private: + volatile markWord _displaced_header; + public: + markWord displaced_header() const { + return Atomic::load(&_displaced_header); + } + + void set_displaced_header(markWord header) { + Atomic::store(&_displaced_header, header); + } + + void print_on(outputStream* st, oop owner) const; + + + void move_to(oop obj, BasicLock* dest); + + static int displaced_header_offset_in_bytes() { return (int)([]() { alignas(16) char space[sizeof (BasicLock)]; BasicLock* dummyObj = (BasicLock*)space; char* c = (char*)(void*)&dummyObj->_displaced_header; return (size_t)(c - space); }()); } +}; +# 64 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/basicLock.hpp" +class BasicObjectLock { + friend class VMStructs; + private: + BasicLock _lock; + oop _obj; + + public: + + oop obj() const { return _obj; } + void set_obj(oop obj) { _obj = obj; } + BasicLock* lock() { return &_lock; } + + + + static int size() { return sizeof(BasicObjectLock)/wordSize; } + + + void oops_do(OopClosure* f) { f->do_oop(&_obj); } + + static ByteSize obj_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (BasicObjectLock)]; BasicObjectLock* dummyObj = (BasicObjectLock*)space; char* c = (char*)(void*)&dummyObj->_obj; return (size_t)(c - space); }())); } + static ByteSize lock_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (BasicObjectLock)]; BasicObjectLock* dummyObj = (BasicObjectLock*)space; char* c = (char*)(void*)&dummyObj->_lock; return (size_t)(c - space); }())); } +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/monitorChunk.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/monitorChunk.hpp" +class BasicObjectLock; +class OopClosure; + + + + +class MonitorChunk: public CHeapObj { + private: + int _number_of_monitors; + BasicObjectLock* _monitors; + BasicObjectLock* monitors() const { return _monitors; } + MonitorChunk* _next; + public: + + MonitorChunk(int number_on_monitors); + ~MonitorChunk(); + + + MonitorChunk* next() const { return _next; } + void set_next(MonitorChunk* next) { _next = next; } + + + int number_of_monitors() const { return _number_of_monitors; } + + + BasicObjectLock* at(int index) { ; return &monitors()[index]; } + + + + void oops_do(OopClosure* f); + + + bool contains(void* addr) const { return (addr >= (void*) monitors()) && (addr < (void*) (monitors() + number_of_monitors())); } +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.hpp" 2 + + + + + + + +typedef class BytecodeInterpreter* interpreterState; + +class CodeBlob; +class CompiledMethod; +class FrameValues; +class InterpreterOopMap; +class JavaCallWrapper; +class Method; +class methodHandle; +class RegisterMap; +class vframeArray; + +enum class DerivedPointerIterationMode { + _with_table, + _directly, + _ignore +}; + + + + + + + +class frame { + private: + + union { + intptr_t* _sp; + int _offset_sp; + }; + address _pc; + mutable CodeBlob* _cb; + mutable const ImmutableOopMap* _oop_map; + enum deopt_state { + not_deoptimized, + is_deoptimized, + unknown + }; + + deopt_state _deopt_state; + + + + + bool _on_heap; + + + + void assert_on_heap() const { ; } + void assert_offset() const { ; assert_on_heap(); } + void assert_absolute() const { ; } + + public: + + frame(); + + explicit frame(bool dummy) {} + + explicit frame(intptr_t* sp); +# 114 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.hpp" + address pc() const { return _pc; } + + + + + + + address raw_pc() const; + + void set_pc(address newpc); + + intptr_t* sp() const { assert_absolute(); return _sp; } + void set_sp( intptr_t* newsp ) { _sp = newsp; } + + int offset_sp() const { assert_offset(); return _offset_sp; } + void set_offset_sp( int newsp ) { assert_on_heap(); _offset_sp = newsp; } + + int frame_index() const { + + + + return -1; + + } + void set_frame_index( int index ) { + + + + } + + static int sender_sp_ret_address_offset(); + + CodeBlob* cb() const { return _cb; } + inline CodeBlob* get_cb() const; + + + const ImmutableOopMap* oop_map() const { + if (_oop_map == nullptr) { + _oop_map = get_oop_map(); + } + return _oop_map; + } + + + void patch_pc(Thread* thread, address pc); +# 168 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.hpp" + intptr_t* id(void) const; + bool is_younger(intptr_t* id) const; + bool is_older(intptr_t* id) const; + + + + + + bool equal(frame other) const; + + + bool is_empty() const { return _pc == nullptr; } + bool is_interpreted_frame() const; + bool is_java_frame() const; + bool is_entry_frame() const; + bool is_stub_frame() const; + bool is_ignored_frame() const; + bool is_native_frame() const; + bool is_runtime_frame() const; + bool is_compiled_frame() const; + bool is_safepoint_blob_frame() const; + bool is_deoptimized_frame() const; + bool is_upcall_stub_frame() const; + bool is_heap_frame() const { return _on_heap; } + + + bool is_first_frame() const; + bool is_first_java_frame() const; + bool is_first_vthread_frame(JavaThread* thread) const; + + bool is_interpreted_frame_valid(JavaThread* thread) const; + + + bool is_compiled_caller() const { + return is_compiled_frame() || is_upcall_stub_frame(); + } + + + bool should_be_deoptimized() const; + + + bool can_be_deoptimized() const; + + + inline int frame_size() const; + + + inline int compiled_frame_stack_argsize() const; + + inline void interpreted_frame_oop_map(InterpreterOopMap* mask) const; + + + inline frame sender(RegisterMap* map) const; + + bool safe_for_sender(JavaThread *thread); + + + frame real_sender(RegisterMap* map) const; + + + + frame java_sender() const; + + private: + + inline frame sender_for_compiled_frame(RegisterMap* map) const; + frame sender_for_entry_frame(RegisterMap* map) const; + frame sender_for_interpreter_frame(RegisterMap* map) const; + frame sender_for_upcall_stub_frame(RegisterMap* map) const; + + bool is_entry_frame_valid(JavaThread* thread) const; + + Method* safe_interpreter_frame_method() const; + + + + + + public: + + intptr_t* addr_at(int index) const { return &fp()[index]; } + intptr_t at_absolute(int index) const { return *addr_at(index); } + + intptr_t at_relative(int index) const { return (intptr_t)(fp() + fp()[index]); } + + intptr_t at_relative_or_null(int index) const { + return (fp()[index] != 0) + ? (intptr_t)(fp() + fp()[index]) + : 0; + } + + intptr_t at(int index) const { + return _on_heap ? at_relative(index) : at_absolute(index); + } + + public: + + + intptr_t* link() const; + + + intptr_t* link_or_null() const; + + + address sender_pc() const; + + + void deoptimize(JavaThread* thread); + + + + intptr_t* unextended_sp() const; + void set_unextended_sp(intptr_t* value); + + int offset_unextended_sp() const; + void set_offset_unextended_sp(int value); + + + intptr_t* sender_sp() const; +# 295 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.hpp" + intptr_t* real_fp() const; + + + + + intptr_t *initial_deoptimization_info(); + + + + private: + intptr_t* interpreter_frame_locals() const; + intptr_t* interpreter_frame_bcp_addr() const; + intptr_t* interpreter_frame_mdp_addr() const; + + public: + + + + intptr_t* interpreter_frame_local_at(int index) const; + + void interpreter_frame_set_locals(intptr_t* locs); + + + jint interpreter_frame_bci() const; + + + address interpreter_frame_bcp() const; + void interpreter_frame_set_bcp(address bcp); + + + address interpreter_frame_mdp() const; + void interpreter_frame_set_mdp(address dp); + + + oop retrieve_receiver(RegisterMap *reg_map); + + + + + BasicLock* get_native_monitor(); + oop get_native_receiver(); + + + + oop interpreter_callee_receiver(Symbol* signature); + + + oop* interpreter_callee_receiver_addr(Symbol* signature); + + + + public: + intptr_t* interpreter_frame_expression_stack() const; + + + intptr_t* interpreter_frame_expression_stack_at(jint offset) const; + + + intptr_t* interpreter_frame_tos_at(jint offset) const; + intptr_t* interpreter_frame_tos_address() const; + + + jint interpreter_frame_expression_stack_size() const; + + intptr_t* interpreter_frame_sender_sp() const; + + + void set_interpreter_frame_sender_sp(intptr_t* sender_sp); + void interpreter_frame_set_monitor_end(BasicObjectLock* value); + + + oop* interpreter_frame_temp_oop_addr() const; +# 377 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.hpp" + BasicObjectLock* interpreter_frame_monitor_begin() const; + BasicObjectLock* interpreter_frame_monitor_end() const; + BasicObjectLock* next_monitor_in_interpreter_frame(BasicObjectLock* current) const; + BasicObjectLock* previous_monitor_in_interpreter_frame(BasicObjectLock* current) const; + static int interpreter_frame_monitor_size(); + static int interpreter_frame_monitor_size_in_bytes(); + + void interpreter_frame_verify_monitor(BasicObjectLock* value) const; + + + + + + + + BasicType interpreter_frame_result(oop* oop_result, jvalue* value_result); + + public: + + Method* interpreter_frame_method() const; + void interpreter_frame_set_method(Method* method); + Method** interpreter_frame_method_addr() const; + ConstantPoolCache** interpreter_frame_cache_addr() const; + oop* interpreter_frame_mirror_addr() const; + + void interpreter_frame_set_mirror(oop mirror); + + public: + + JavaCallWrapper* entry_frame_call_wrapper() const { return *entry_frame_call_wrapper_addr(); } + JavaCallWrapper* entry_frame_call_wrapper_if_safe(JavaThread* thread) const; + JavaCallWrapper** entry_frame_call_wrapper_addr() const; + intptr_t* entry_frame_argument_at(int offset) const; + + + bool entry_frame_is_first() const; + bool upcall_stub_frame_is_first() const; + + + + public: + oop saved_oop_result(RegisterMap* map) const; + void set_saved_oop_result(RegisterMap* map, oop obj); + + + private: + const char* print_name() const; + + void describe_pd(FrameValues& values, int frame_no); + + public: + void print_value() const { print_value_on(tty,nullptr); } + void print_value_on(outputStream* st, JavaThread *thread) const; + void print_on(outputStream* st) const; + void interpreter_frame_print_on(outputStream* st) const; + void print_on_error(outputStream* st, char* buf, int buflen, bool verbose = false) const; + static void print_C_frame(outputStream* st, char* buf, int buflen, address pc); + + + void describe(FrameValues& values, int frame_no, const RegisterMap* reg_map=nullptr); + + + template + address oopmapreg_to_location(VMReg reg, const RegisterMapT* reg_map) const; + template + oop* oopmapreg_to_oop_location(VMReg reg, const RegisterMapT* reg_map) const; + + + void oops_compiled_arguments_do(Symbol* signature, bool has_receiver, bool has_appendix, const RegisterMap* reg_map, OopClosure* f) const; + void oops_interpreted_do(OopClosure* f, const RegisterMap* map, bool query_oop_map_cache = true) const; + + private: + void oops_interpreted_arguments_do(Symbol* signature, bool has_receiver, OopClosure* f) const; + + + void oops_do_internal(OopClosure* f, CodeBlobClosure* cf, + DerivedOopClosure* df, DerivedPointerIterationMode derived_mode, + const RegisterMap* map, bool use_interpreter_oop_map_cache) const; + + void oops_entry_do(OopClosure* f, const RegisterMap* map) const; + void oops_code_blob_do(OopClosure* f, CodeBlobClosure* cf, + DerivedOopClosure* df, DerivedPointerIterationMode derived_mode, + const RegisterMap* map) const; + public: + + void oops_do(OopClosure* f, CodeBlobClosure* cf, const RegisterMap* map) { + + DerivedPointerIterationMode dpim = DerivedPointerTable::is_active() ? + DerivedPointerIterationMode::_with_table : + DerivedPointerIterationMode::_ignore; + + + + oops_do_internal(f, cf, nullptr, dpim, map, true); + } + + void oops_do(OopClosure* f, CodeBlobClosure* cf, DerivedOopClosure* df, const RegisterMap* map) { + oops_do_internal(f, cf, df, DerivedPointerIterationMode::_ignore, map, true); + } + + void oops_do(OopClosure* f, CodeBlobClosure* cf, const RegisterMap* map, + DerivedPointerIterationMode derived_mode) const { + oops_do_internal(f, cf, nullptr, derived_mode, map, true); + } + + void nmethods_do(CodeBlobClosure* cf) const; + + + void metadata_do(MetadataClosure* f) const; + + + void verify(const RegisterMap* map) const; + static bool verify_return_pc(address x); + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/frame_riscv.hpp" 1 +# 104 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/frame_riscv.hpp" + public: + enum { + pc_return_offset = 0, + + + link_offset = -2, + return_addr_offset = -1, + sender_sp_offset = 0, + + + interpreter_frame_oop_temp_offset = 1, + + interpreter_frame_sender_sp_offset = -3, + + interpreter_frame_last_sp_offset = interpreter_frame_sender_sp_offset - 1, + interpreter_frame_method_offset = interpreter_frame_last_sp_offset - 1, + interpreter_frame_mdp_offset = interpreter_frame_method_offset - 1, + interpreter_frame_extended_sp_offset = interpreter_frame_mdp_offset - 1, + interpreter_frame_mirror_offset = interpreter_frame_extended_sp_offset - 1, + interpreter_frame_cache_offset = interpreter_frame_mirror_offset - 1, + interpreter_frame_locals_offset = interpreter_frame_cache_offset - 1, + interpreter_frame_bcp_offset = interpreter_frame_locals_offset - 1, + interpreter_frame_initial_sp_offset = interpreter_frame_bcp_offset - 1, + + interpreter_frame_monitor_block_top_offset = interpreter_frame_initial_sp_offset, + interpreter_frame_monitor_block_bottom_offset = interpreter_frame_initial_sp_offset, + + + + + entry_frame_after_call_words = 34, + entry_frame_call_wrapper_offset = -10, + + + arg_reg_save_area_bytes = 0, + + + metadata_words = 2, + + + metadata_words_at_bottom = metadata_words, + + + + metadata_words_at_top = 0, + + frame_alignment = 16, + + align_wiggle = 1 + }; + + intptr_t ptr_at(int offset) const { + return *ptr_at_addr(offset); + } + + void ptr_at_put(int offset, intptr_t value) { + *ptr_at_addr(offset) = value; + } + + private: + + union { + intptr_t* _fp; + int _offset_fp; + }; + + + + + + + + union { + intptr_t* _unextended_sp; + int _offset_unextended_sp; + }; + + void adjust_unextended_sp() {}; + + intptr_t* ptr_at_addr(int offset) const { + return (intptr_t*) addr_at(offset); + } + + + + + + + const ImmutableOopMap* get_oop_map() const; + + public: + + + frame(intptr_t* ptr_sp, intptr_t* ptr_fp, address pc); + + frame(intptr_t* ptr_sp, intptr_t* unextended_sp, intptr_t* ptr_fp, address pc); + + frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb); + + frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map, bool on_heap); + + frame(intptr_t* ptr_sp, intptr_t* ptr_fp); + + void init(intptr_t* ptr_sp, intptr_t* ptr_fp, address pc); + void setup(address pc); + + + + + intptr_t* fp() const { assert_absolute(); return _fp; } + void set_fp(intptr_t* newfp) { _fp = newfp; } + int offset_fp() const { assert_offset(); return _offset_fp; } + void set_offset_fp(int value) { assert_on_heap(); _offset_fp = value; } + + inline address* sender_pc_addr() const; + + + intptr_t* interpreter_frame_last_sp() const; + + void interpreter_frame_set_extended_sp(intptr_t* sp); + + template + static void update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr); + + + void interpreter_frame_set_last_sp(intptr_t* last_sp); + + static jint interpreter_frame_expression_stack_direction() { return -1; } + + + inline frame sender_raw(RegisterMap* map) const; +# 494 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.hpp" 2 + +}; +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/handshake.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/handshake.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/flagSetting.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/flagSetting.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/autoRestore.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/autoRestore.hpp" +template class AutoSaveRestore : public StackObj { +public: + AutoSaveRestore(T &loc) : _loc(loc) { + _value = loc; + } + ~AutoSaveRestore() { + _loc = _value; + } +private: + T &_loc; + T _value; +}; + + + + +template class AutoModifyRestore : private AutoSaveRestore { +public: + AutoModifyRestore(T &loc, T value) : AutoSaveRestore(loc) { + loc = value; + } +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/flagSetting.hpp" 2 +# 41 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/flags/flagSetting.hpp" +typedef AutoModifyRestore FlagSetting; +typedef AutoModifyRestore UIntFlagSetting; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/handshake.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/mutex.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/mutex.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/os/posix/mutex_posix.hpp" 1 +# 50 "/home/rehn/source/jdk/open/src/hotspot/os/posix/mutex_posix.hpp" +class PlatformMutex : public CHeapObj { +# 78 "/home/rehn/source/jdk/open/src/hotspot/os/posix/mutex_posix.hpp" + pthread_mutex_t _mutex; + + protected: + pthread_mutex_t* mutex() { return &_mutex; } + + public: + static void init() {} + + PlatformMutex(); + ~PlatformMutex(); + + + + private: + PlatformMutex(PlatformMutex const&) = delete; PlatformMutex& operator=(PlatformMutex const&) = delete; + + public: + void lock(); + void unlock(); + bool try_lock(); +}; + +class PlatformMonitor : public PlatformMutex { +# 123 "/home/rehn/source/jdk/open/src/hotspot/os/posix/mutex_posix.hpp" + pthread_cond_t _cond; + pthread_cond_t* cond() { return &_cond; } + + public: + PlatformMonitor(); + ~PlatformMonitor(); + + + + private: + PlatformMonitor(PlatformMonitor const&) = delete; PlatformMonitor& operator=(PlatformMonitor const&) = delete; + + public: + int wait(uint64_t millis); + void notify(); + void notify_all(); +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/mutex.hpp" 2 +# 51 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/mutex.hpp" +class Mutex : public CHeapObj { + + public: + + enum class Rank { + event, + service = event + 6, + stackwatermark = service + 3, + tty = stackwatermark + 3, + oopstorage = tty + 3, + nosafepoint = oopstorage + 6, + safepoint = nosafepoint + 20 + }; + + + static const Rank event = Rank::event; + static const Rank service = Rank::service; + static const Rank stackwatermark = Rank::stackwatermark; + static const Rank tty = Rank::tty; + static const Rank oopstorage = Rank::oopstorage; + static const Rank nosafepoint = Rank::nosafepoint; + static const Rank safepoint = Rank::safepoint; + + static void assert_no_overlap(Rank orig, Rank adjusted, int adjust); + + friend Rank operator-(Rank base, int adjust) { + Rank result = static_cast(static_cast(base) - adjust); + ; + return result; + } + + friend constexpr bool operator<(Rank lhs, Rank rhs) { + return static_cast(lhs) < static_cast(rhs); + } + + friend constexpr bool operator>(Rank lhs, Rank rhs) { return rhs < lhs; } + friend constexpr bool operator<=(Rank lhs, Rank rhs) { return !(lhs > rhs); } + friend constexpr bool operator>=(Rank lhs, Rank rhs) { return !(lhs < rhs); } + + private: + + + + Thread* volatile _owner; + void raw_set_owner(Thread* new_owner) { Atomic::store(&_owner, new_owner); } + + protected: + PlatformMonitor _lock; + const char* _name; +# 124 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/mutex.hpp" + protected: + void set_owner_implementation(Thread* owner) { raw_set_owner(owner);}; + void check_block_state (Thread* thread) {}; + void check_safepoint_state (Thread* thread) {}; + void check_no_safepoint_state(Thread* thread) {}; + void check_rank (Thread* thread) {}; + void assert_owner (Thread* expected) {}; + + public: + static const bool _allow_vm_block_flag = true; +# 150 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/mutex.hpp" + enum class SafepointCheckFlag { + _safepoint_check_flag, + _no_safepoint_check_flag + }; + + static const SafepointCheckFlag _safepoint_check_flag = + SafepointCheckFlag::_safepoint_check_flag; + static const SafepointCheckFlag _no_safepoint_check_flag = + SafepointCheckFlag::_no_safepoint_check_flag; + + public: + Mutex(Rank rank, const char *name, bool allow_vm_block); + + Mutex(Rank rank, const char *name) : + Mutex(rank, name, rank > nosafepoint ? false : true) {} + + ~Mutex(); + + void lock(); + void lock(Thread *thread); + void unlock(); + bool is_locked() const { return owner() != nullptr; } + + bool try_lock(); + private: + void lock_contended(Thread *thread); + bool try_lock_inner(bool do_rank_checks); + public: + + void release_for_safepoint(); + + + + void lock_without_safepoint_check(); + void lock_without_safepoint_check(Thread* self); + + bool try_lock_without_rank_check(); + + + + Thread* owner() const { return Atomic::load(&_owner); } + void set_owner(Thread* owner) { set_owner_implementation(owner); } + bool owned_by_self() const; + + const char *name() const { return _name; } + + void print_on_error(outputStream* st) const; + + + + +}; + +class Monitor : public Mutex { + public: + Monitor(Rank rank, const char *name, bool allow_vm_block) : + Mutex(rank, name, allow_vm_block) {} + + Monitor(Rank rank, const char *name) : + Mutex(rank, name) {} + + + + + + bool wait(uint64_t timeout = 0); + bool wait_without_safepoint_check(uint64_t timeout = 0); + void notify(); + void notify_all(); +}; + + +class PaddedMutex : public Mutex { + enum { + CACHE_LINE_PADDING = (int)64 - (int)sizeof(Mutex), + PADDING_LEN = CACHE_LINE_PADDING > 0 ? CACHE_LINE_PADDING : 1 + }; + char _padding[PADDING_LEN]; +public: + PaddedMutex(Rank rank, const char *name, bool allow_vm_block) : Mutex(rank, name, allow_vm_block) {}; + PaddedMutex(Rank rank, const char *name) : Mutex(rank, name) {}; +}; + +class PaddedMonitor : public Monitor { + enum { + CACHE_LINE_PADDING = (int)64 - (int)sizeof(Monitor), + PADDING_LEN = CACHE_LINE_PADDING > 0 ? CACHE_LINE_PADDING : 1 + }; + char _padding[PADDING_LEN]; + public: + PaddedMonitor(Rank rank, const char *name, bool allow_vm_block) : Monitor(rank, name, allow_vm_block) {}; + PaddedMonitor(Rank rank, const char *name) : Monitor(rank, name) {}; +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/handshake.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/filterQueue.hpp" 1 +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/filterQueue.hpp" +template +class FilterQueue { + private: + class Node : public CHeapObj { + public: + Node(const E& e): _next(nullptr), _data(e) { } + Node* _next; + E _data; + }; + + Node* _first; + Node* load_first() { + return Atomic::load_acquire(&_first); + } + + static bool match_all(E d) { return true; } + + public: + FilterQueue() : _first(nullptr) { } + + bool is_empty() { + return load_first() == nullptr; + } + + + void push(E data); + + + + + + + template + bool contains(MATCH_FUNC& match_func); + + + + E peek() { + return peek(match_all); + } + + + + + + + + template + E pop(MATCH_FUNC& match_func); + + template + E peek(MATCH_FUNC& match_func); +}; +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/handshake.hpp" 2 + +class HandshakeOperation; +class AsyncHandshakeOperation; +class JavaThread; +class SuspendThreadHandshake; +class ThreadSelfSuspensionHandshake; +class UnsafeAccessErrorHandshake; +class ThreadsListHandle; + + + + + + +class HandshakeClosure : public ThreadClosure, public CHeapObj { + const char* const _name; + public: + HandshakeClosure(const char* name) : _name(name) {} + virtual ~HandshakeClosure() {} + const char* name() const { return _name; } + virtual bool is_async() { return false; } + virtual bool is_suspend() { return false; } + virtual bool is_async_exception() { return false; } + virtual void do_thread(Thread* thread) = 0; +}; + +class AsyncHandshakeClosure : public HandshakeClosure { + public: + AsyncHandshakeClosure(const char* name) : HandshakeClosure(name) {} + virtual ~AsyncHandshakeClosure() {} + virtual bool is_async() { return true; } +}; + +class Handshake : public AllStatic { + public: + + static void execute(HandshakeClosure* hs_cl); + + + static void execute(HandshakeClosure* hs_cl, JavaThread* target); + + + + + static void execute(HandshakeClosure* hs_cl, ThreadsListHandle* tlh, JavaThread* target); + + + static void execute(AsyncHandshakeClosure* hs_cl, JavaThread* target); +}; + +class JvmtiRawMonitor; + + + + + +class HandshakeState { + friend ThreadSelfSuspensionHandshake; + friend SuspendThreadHandshake; + friend UnsafeAccessErrorHandshake; + friend JavaThread; + + + JavaThread* _handshakee; + + FilterQueue _queue; + + + Monitor _lock; + + Thread* volatile _active_handshaker; + + bool claim_handshake(); + bool possibly_can_process_handshake(); + bool can_process_handshake(); + + bool have_non_self_executable_operation(); + HandshakeOperation* get_op_for_self(bool allow_suspend, bool check_async_exception); + HandshakeOperation* get_op(); + void remove_op(HandshakeOperation* op); + + void set_active_handshaker(Thread* thread) { Atomic::store(&_active_handshaker, thread); } + + class MatchOp { + HandshakeOperation* _op; + public: + MatchOp(HandshakeOperation* op) : _op(op) {} + bool operator()(HandshakeOperation* op) { + return op == _op; + } + }; + + public: + HandshakeState(JavaThread* thread); + ~HandshakeState(); + + void add_operation(HandshakeOperation* op); + + bool has_operation() { return !_queue.is_empty(); } + bool has_operation(bool allow_suspend, bool check_async_exception); + bool has_async_exception_operation(); + void clean_async_exception_operation(); + + bool operation_pending(HandshakeOperation* op); + + + + + bool process_by_self(bool allow_suspend, bool check_async_exception); + + enum ProcessResult { + _no_operation = 0, + _not_safe, + _claim_failed, + _processed, + _succeeded, + _number_states + }; + ProcessResult try_process(HandshakeOperation* match_op); + + Thread* active_handshaker() const { return Atomic::load(&_active_handshaker); } + + + private: + bool _async_exceptions_blocked; + + bool async_exceptions_blocked() { return _async_exceptions_blocked; } + void set_async_exceptions_blocked(bool b) { _async_exceptions_blocked = b; } + void handle_unsafe_access_error(); + + + private: + + + volatile bool _suspended; + + + + + bool _async_suspend_handshake; + + + bool suspend_with_handshake(); + + + void do_self_suspend(); + + bool is_suspended() { return Atomic::load(&_suspended); } + void set_suspended(bool to) { return Atomic::store(&_suspended, to); } + bool has_async_suspend_handshake() { return _async_suspend_handshake; } + void set_async_suspend_handshake(bool to) { _async_suspend_handshake = to; } + + bool suspend(); + bool resume(); +}; +# 36 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaFrameAnchor.hpp" 1 +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaFrameAnchor.hpp" +class JavaThread; +class MacroAssembler; +class UpcallLinker; +class ZeroFrame; + +class JavaFrameAnchor { + +friend class OptoRuntime; +friend class Runtime1; +friend class StubAssembler; +friend class CallRuntimeDirectNode; +friend class MacroAssembler; +friend class LIR_Assembler; +friend class GraphKit; +friend class StubGenerator; +friend class JavaThread; +friend class frame; +friend class VMStructs; +friend class JVMCIVMStructs; +friend class BytecodeInterpreter; +friend class JavaCallWrapper; +friend class UpcallLinker; + + private: + + + + + + intptr_t* volatile _last_Java_sp; + + + + + + + + volatile address _last_Java_pc; + + + + + + bool has_last_Java_frame() const { return _last_Java_sp != nullptr; } + + + + void zap(void) { _last_Java_sp = nullptr; } + +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/javaFrameAnchor_riscv.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/javaFrameAnchor_riscv.hpp" +private: + + + intptr_t* volatile _last_Java_fp; + +public: + + + + + + + void clear(void) { + + _last_Java_sp = nullptr; + OrderAccess::release(); + _last_Java_fp = nullptr; + _last_Java_pc = nullptr; + } + + void copy(JavaFrameAnchor* src) { + + + + + + + + ; + if (_last_Java_sp != src->_last_Java_sp) { + _last_Java_sp = nullptr; + OrderAccess::release(); + } + _last_Java_fp = src->_last_Java_fp; + _last_Java_pc = src->_last_Java_pc; + + _last_Java_sp = src->_last_Java_sp; + } + + bool walkable(void) { return _last_Java_sp != nullptr && _last_Java_pc != nullptr; } + + void make_walkable(); + + intptr_t* last_Java_sp(void) const { return _last_Java_sp; } + + address last_Java_pc(void) { return _last_Java_pc; } + +private: + + static ByteSize last_Java_fp_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaFrameAnchor)]; JavaFrameAnchor* dummyObj = (JavaFrameAnchor*)space; char* c = (char*)(void*)&dummyObj->_last_Java_fp; return (size_t)(c - space); }())); } + +public: + + void set_last_Java_sp(intptr_t* java_sp) { _last_Java_sp = java_sp; OrderAccess::release(); } + + intptr_t* last_Java_fp(void) { return _last_Java_fp; } + + void set_last_Java_fp(intptr_t* fp) { _last_Java_fp = fp; } +# 85 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaFrameAnchor.hpp" 2 + +public: + JavaFrameAnchor() { clear(); } + JavaFrameAnchor(JavaFrameAnchor *src) { copy(src); } + + void set_last_Java_pc(address pc) { _last_Java_pc = pc; } + + + + static ByteSize last_Java_sp_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaFrameAnchor)]; JavaFrameAnchor* dummyObj = (JavaFrameAnchor*)space; char* c = (char*)(void*)&dummyObj->_last_Java_sp; return (size_t)(c - space); }())); } + static ByteSize last_Java_pc_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaFrameAnchor)]; JavaFrameAnchor* dummyObj = (JavaFrameAnchor*)space; char* c = (char*)(void*)&dummyObj->_last_Java_pc; return (size_t)(c - space); }())); } + +}; +# 37 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/lockStack.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/lockStack.hpp" +class Thread; +class OopClosure; + +class LockStack { + friend class VMStructs; +private: + static const int CAPACITY = 8; + + + + + static const int lock_stack_offset; + static const int lock_stack_top_offset; + static const int lock_stack_base_offset; + + + + + uint32_t _top; + oop _base[CAPACITY]; + + + inline JavaThread* get_thread() const; + + + bool is_owning_thread() const; + + + void verify(const char* msg) const {}; + + + static inline int to_index(uint32_t offset); + +public: + static ByteSize top_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (LockStack)]; LockStack* dummyObj = (LockStack*)space; char* c = (char*)(void*)&dummyObj->_top; return (size_t)(c - space); }())); } + static ByteSize base_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (LockStack)]; LockStack* dummyObj = (LockStack*)space; char* c = (char*)(void*)&dummyObj->_base; return (size_t)(c - space); }())); } + + LockStack(JavaThread* jt); + + + static uint32_t start_offset(); + static uint32_t end_offset(); + + + inline bool can_push() const; + + + inline void push(oop o); + + + inline oop pop(); + + + inline void remove(oop o); + + + inline bool contains(oop o) const; + + + inline void oops_do(OopClosure* cl); + +}; +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/park.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/park.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/os/posix/park_posix.hpp" 1 +# 41 "/home/rehn/source/jdk/open/src/hotspot/os/posix/park_posix.hpp" +class PlatformEvent : public CHeapObj { + private: + double cachePad[4]; + volatile int _event; + volatile int _nParked; + pthread_mutex_t _mutex[1]; + pthread_cond_t _cond[1]; + double postPad[2]; + + protected: + ~PlatformEvent() { do { if (!(false)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/os/posix/park_posix.hpp", 51, "guarantee(" "false" ") failed", "invariant"); } } while (0); } + + public: + PlatformEvent(); + void park(); + int park(jlong millis); + int park_nanos(jlong nanos); + void unpark(); + + + void reset() { _event = 0; } + int fired() { return _event; } +}; +# 77 "/home/rehn/source/jdk/open/src/hotspot/os/posix/park_posix.hpp" +class PlatformParker { + PlatformParker(PlatformParker const&) = delete; PlatformParker& operator=(PlatformParker const&) = delete; + protected: + enum { + REL_INDEX = 0, + ABS_INDEX = 1 + }; + volatile int _counter; + int _cur_index; + pthread_mutex_t _mutex[1]; + pthread_cond_t _cond[2]; + + public: + PlatformParker(); + ~PlatformParker(); +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/park.hpp" 2 + + + + +class Thread; +# 60 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/park.hpp" +class Parker : public PlatformParker { + private: + Parker(Parker const&) = delete; Parker& operator=(Parker const&) = delete; + public: + Parker() : PlatformParker() {} + + + + void park(bool isAbsolute, jlong time); + void unpark(); +}; +# 113 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/park.hpp" +class ParkEvent : public PlatformEvent { + private: + ParkEvent * FreeNext ; + + + Thread * AssociatedWith ; + + public: + + ParkEvent * volatile ListNext ; + volatile int TState ; + volatile int Notified ; + + private: + static ParkEvent * volatile FreeList ; + static volatile int ListLock ; + + + + + + + + protected: + ~ParkEvent() { do { if (!(0)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/share/runtime/park.hpp", 137, "guarantee(" "0" ") failed", "invariant"); } } while (0) ; } + + ParkEvent() : PlatformEvent() { + AssociatedWith = nullptr ; + FreeNext = nullptr ; + ListNext = nullptr ; + TState = 0 ; + Notified = 0 ; + } + + + + + + void * operator new (size_t sz) throw(); + void operator delete (void * a) ; + + public: + static ParkEvent * Allocate (Thread * t) ; + static void Release (ParkEvent * e) ; +} ; +# 39 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/safepointMechanism.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/safepointMechanism.hpp" +class JavaThread; +class Thread; + + +class SafepointMechanism : public AllStatic { + friend class StackWatermark; + static uintptr_t _poll_page_armed_value; + static uintptr_t _poll_page_disarmed_value; + + static uintptr_t _poll_word_armed_value; + static uintptr_t _poll_word_disarmed_value; + + static address _polling_page; + + static inline void disarm_local_poll(JavaThread* thread); + + static inline bool global_poll(); + + static void process(JavaThread *thread, bool allow_suspend, bool check_async_exception); + + static void default_initialize(); + + static void pd_initialize() { default_initialize(); }; + + static uintptr_t compute_poll_word(bool armed, uintptr_t stack_watermark); + + const static intptr_t _poll_bit = 1; + public: + static inline bool local_poll_armed(JavaThread* thread); + static intptr_t poll_bit() { return _poll_bit; } + + static address get_polling_page() { return _polling_page; } + static bool is_poll_address(address addr) { return addr >= _polling_page && addr < (_polling_page + OSInfo::vm_page_size()); } + + struct ThreadData { + volatile uintptr_t _polling_word; + volatile uintptr_t _polling_page; + + inline void set_polling_word(uintptr_t poll_value); + inline uintptr_t get_polling_word(); + + inline void set_polling_page(uintptr_t poll_value); + }; + + + static inline bool should_process(JavaThread* thread, bool allow_suspend = true); + + + static inline void process_if_requested(JavaThread* thread, bool allow_suspend, bool check_async_exception); + static inline void process_if_requested_with_exit_check(JavaThread* thread, bool check_async_exception); + + static void update_poll_values(JavaThread* thread); + + + static inline void arm_local_poll(JavaThread* thread); + + static inline void arm_local_poll_release(JavaThread* thread); + + + static void initialize(); + static void initialize_header(JavaThread* thread); +}; +# 40 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stackWatermarkSet.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stackWatermarkSet.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stackWatermarkKind.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stackWatermarkKind.hpp" +enum class StackWatermarkKind { + gc +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stackWatermarkSet.hpp" 2 + +class frame; +class JavaThread; +class StackWatermark; +# 42 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stackWatermarkSet.hpp" +class StackWatermarks { + friend class StackWatermarkSet; +private: + StackWatermark* _head; + +public: + StackWatermarks(); + ~StackWatermarks(); +}; + +class StackWatermarkSet : public AllStatic { +private: + static StackWatermark* head(JavaThread* jt); + static void set_head(JavaThread* jt, StackWatermark* watermark); + +public: + static void add_watermark(JavaThread* jt, StackWatermark* watermark); + + static StackWatermark* get(JavaThread* jt, StackWatermarkKind kind); + + template + static T* get(JavaThread* jt, StackWatermarkKind kind); + + static bool has_watermark(JavaThread* jt, StackWatermarkKind kind); + + + static void before_unwind(JavaThread* jt); + + + static void after_unwind(JavaThread* jt); + + + static void on_iteration(JavaThread* jt, const frame& fr); + + + static void on_safepoint(JavaThread* jt); + + + static void start_processing(JavaThread* jt, StackWatermarkKind kind); + + + static bool processing_started(JavaThread* jt); + + + static void finish_processing(JavaThread* jt, void* context, StackWatermarkKind kind); + + + + static uintptr_t lowest_watermark(JavaThread* jt); +}; +# 41 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stackOverflow.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stackOverflow.hpp" +class JavaThread; + + + + + + +class StackOverflow { + friend class JVMCIVMStructs; + friend class JavaThread; + public: + + enum StackGuardState { + stack_guard_unused, + stack_guard_reserved_disabled, + stack_guard_yellow_reserved_disabled, + stack_guard_enabled + }; + + StackOverflow() : + _stack_guard_state(stack_guard_unused), + _stack_overflow_limit(nullptr), + _reserved_stack_activation(nullptr), + _shadow_zone_safe_limit(nullptr), + _shadow_zone_growth_watermark(nullptr), + _stack_base(nullptr), _stack_end(nullptr) {} + + + void initialize(address base, address end) { + _stack_base = base; + _stack_end = end; + set_stack_overflow_limit(); + set_shadow_zone_limits(); + set_reserved_stack_activation(base); + } + private: + + StackGuardState _stack_guard_state; + + + + address _stack_overflow_limit; + address _reserved_stack_activation; + address _shadow_zone_safe_limit; + address _shadow_zone_growth_watermark; + + + address _stack_base; + address _stack_end; + + address stack_end() const { return _stack_end; } + address stack_base() const { ; return _stack_base; } +# 223 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stackOverflow.hpp" + private: + + + static size_t _stack_red_zone_size; + static size_t _stack_yellow_zone_size; + static size_t _stack_reserved_zone_size; + static size_t _stack_shadow_zone_size; + + public: + static void initialize_stack_zone_sizes(); + + static size_t stack_red_zone_size() { + ; + return _stack_red_zone_size; + } + + + + address stack_red_zone_base() const { + return (address)(stack_end() + stack_red_zone_size()); + } + + + bool in_stack_red_zone(address a) const { + return a < stack_red_zone_base() && a >= stack_end(); + } + + static size_t stack_yellow_zone_size() { + ; + return _stack_yellow_zone_size; + } + + static size_t stack_reserved_zone_size() { + + return _stack_reserved_zone_size; + } + + + address stack_reserved_zone_base() const { + return (address)(stack_end() + + (stack_red_zone_size() + stack_yellow_zone_size() + stack_reserved_zone_size())); + } + + + bool in_stack_reserved_zone(address a) const { + return (a < stack_reserved_zone_base()) && + (a >= (address)((intptr_t)stack_reserved_zone_base() - stack_reserved_zone_size())); + } + + static size_t stack_yellow_reserved_zone_size() { + return _stack_yellow_zone_size + _stack_reserved_zone_size; + } + + + bool in_stack_yellow_reserved_zone(address a) const { + return (a < stack_reserved_zone_base()) && (a >= stack_red_zone_base()); + } + + + static size_t stack_guard_zone_size() { + return stack_red_zone_size() + stack_yellow_reserved_zone_size(); + } + + static size_t stack_shadow_zone_size() { + ; + return _stack_shadow_zone_size; + } + + address shadow_zone_safe_limit() const { + ; + return _shadow_zone_safe_limit; + } + + void create_stack_guard_pages(); + void remove_stack_guard_pages(); + + void enable_stack_reserved_zone(bool check_if_disabled = false); + void disable_stack_reserved_zone(); + void enable_stack_yellow_reserved_zone(); + void disable_stack_yellow_reserved_zone(); + void disable_stack_red_zone(); + + bool stack_guard_zone_unused() const { return _stack_guard_state == stack_guard_unused; } + + bool stack_yellow_reserved_zone_disabled() const { + return _stack_guard_state == stack_guard_yellow_reserved_disabled; + } + + size_t stack_available(address cur_sp) const { + + address low_addr; + if (_stack_guard_state == stack_guard_unused) { + low_addr = stack_end(); + } else { + low_addr = stack_reserved_zone_base(); + } + return cur_sp > low_addr ? cur_sp - low_addr : 0; + } + + bool stack_guards_enabled() const; + + address reserved_stack_activation() const { return _reserved_stack_activation; } + void set_reserved_stack_activation(address addr) { + + + ; + _reserved_stack_activation = addr; + } + + + + + + + + bool reguard_stack(address cur_sp); + + + bool reguard_stack(void); + bool reguard_stack_if_needed(void); + + void set_stack_overflow_limit() { + _stack_overflow_limit = + stack_end() + MAX2(stack_guard_zone_size(), stack_shadow_zone_size()); + } + + void set_shadow_zone_limits() { + _shadow_zone_safe_limit = + stack_end() + stack_guard_zone_size() + stack_shadow_zone_size(); + _shadow_zone_growth_watermark = + stack_base(); + } + + address stack_overflow_limit() const { return _stack_overflow_limit; } +}; +# 42 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcThreadLocalData.hpp" 1 +# 43 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcThreadLocalData.hpp" +typedef uint64_t GCThreadLocalData[43]; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcUtil.hpp" 1 +# 46 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcUtil.hpp" +class AdaptiveWeightedAverage : public CHeapObj { + private: + float _average; + unsigned _sample_count; + unsigned _weight; + + + bool _is_old; + + const static unsigned OLD_THRESHOLD = 100; + + protected: + float _last_sample; + + void increment_count() { + _sample_count++; + if (!_is_old && _sample_count > OLD_THRESHOLD) { + _is_old = true; + } + } + + void set_average(float avg) { _average = avg; } + + + + float compute_adaptive_average(float new_sample, float average); + + public: + + AdaptiveWeightedAverage(unsigned weight, float avg = 0.0) : + _average(avg), _sample_count(0), _weight(weight), + _is_old(false), _last_sample(0.0) { + } + + void clear() { + _average = 0; + _sample_count = 0; + _last_sample = 0; + _is_old = false; + } + + + void modify(size_t avg, unsigned wt, bool force = false) { + ; + _average = (float)avg; + _weight = wt; + } + + + float average() const { return _average; } + unsigned weight() const { return _weight; } + unsigned count() const { return _sample_count; } + float last_sample() const { return _last_sample; } + bool is_old() const { return _is_old; } + + + void sample(float new_sample); + + static inline float exp_avg(float avg, float sample, + unsigned int weight) { + ; + return (100.0F - (float)weight) * avg / 100.0F + (float)weight * sample / 100.0F; + } + static inline size_t exp_avg(size_t avg, size_t sample, + unsigned int weight) { + + return (size_t)exp_avg((float)avg, (float)sample, weight); + } + + + void print_on(outputStream* st) const; + void print() const; +}; + + + + + + + +class AdaptivePaddedAverage : public AdaptiveWeightedAverage { + private: + float _padded_avg; + float _deviation; + unsigned _padding; + + + protected: + void set_padded_average(float avg) { _padded_avg = avg; } + void set_deviation(float dev) { _deviation = dev; } + + public: + AdaptivePaddedAverage() : + AdaptiveWeightedAverage(0), + _padded_avg(0.0), _deviation(0.0), _padding(0) {} + + AdaptivePaddedAverage(unsigned weight, unsigned padding) : + AdaptiveWeightedAverage(weight), + _padded_avg(0.0), _deviation(0.0), _padding(padding) {} + + + float padded_average() const { return _padded_avg; } + float deviation() const { return _deviation; } + unsigned padding() const { return _padding; } + + void clear() { + AdaptiveWeightedAverage::clear(); + _padded_avg = 0; + _deviation = 0; + } + + + void sample(float new_sample); + + + void print_on(outputStream* st) const; + void print() const; +}; +# 174 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcUtil.hpp" +class AdaptivePaddedNoZeroDevAverage : public AdaptivePaddedAverage { +public: + AdaptivePaddedNoZeroDevAverage(unsigned weight, unsigned padding) : + AdaptivePaddedAverage(weight, padding) {} + + void sample(float new_sample); + + + void print_on(outputStream* st) const; + void print() const; +}; + + + + + +class LinearLeastSquareFit : public CHeapObj { + double _sum_x; + double _sum_x_squared; + double _sum_y; + double _sum_xy; + double _intercept; + double _slope; + + + AdaptiveWeightedAverage _mean_x; + AdaptiveWeightedAverage _mean_y; + + public: + LinearLeastSquareFit(unsigned weight); + void update(double x, double y); + double y(double x); + double slope() { return _slope; } + + + + bool decrement_will_decrease(); + bool increment_will_decrease(); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp" 2 + + + + +class ThreadLocalAllocStats; +# 46 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp" +class ThreadLocalAllocBuffer: public CHeapObj { + friend class VMStructs; + friend class JVMCIVMStructs; +private: + HeapWord* _start; + HeapWord* _top; + HeapWord* _pf_top; + HeapWord* _end; + HeapWord* _allocation_end; + + size_t _desired_size; + size_t _refill_waste_limit; + size_t _allocated_before_last_gc; + size_t _bytes_since_last_sample_point; + + static size_t _max_size; + static int _reserve_for_allocation_prefetch; + static unsigned _target_refills; + + unsigned _number_of_refills; + unsigned _refill_waste; + unsigned _gc_waste; + unsigned _slow_allocations; + size_t _allocated_size; + + AdaptiveWeightedAverage _allocation_fraction; + + void reset_statistics(); + + void set_start(HeapWord* start) { _start = start; } + void set_end(HeapWord* end) { _end = end; } + void set_allocation_end(HeapWord* ptr) { _allocation_end = ptr; } + void set_top(HeapWord* top) { _top = top; } + void set_pf_top(HeapWord* pf_top) { _pf_top = pf_top; } + void set_desired_size(size_t desired_size) { _desired_size = desired_size; } + void set_refill_waste_limit(size_t waste) { _refill_waste_limit = waste; } + + size_t initial_refill_waste_limit(); + + static int target_refills() { return _target_refills; } + size_t initial_desired_size(); + + size_t remaining(); + + void invariants() const { ; } + + void initialize(HeapWord* start, HeapWord* top, HeapWord* end); + + void insert_filler(); + + void accumulate_and_reset_statistics(ThreadLocalAllocStats* stats); + + void print_stats(const char* tag); + + Thread* thread(); + + + + int number_of_refills() const { return _number_of_refills; } + int gc_waste() const { return _gc_waste; } + int slow_allocations() const { return _slow_allocations; } + +public: + ThreadLocalAllocBuffer(); + + static size_t min_size(); + static size_t max_size() { ; return _max_size; } + static size_t max_size_in_bytes() { return max_size() * BytesPerWord; } + static void set_max_size(size_t max_size) { _max_size = max_size; } + + HeapWord* start() const { return _start; } + HeapWord* end() const { return _end; } + HeapWord* top() const { return _top; } + HeapWord* hard_end(); + HeapWord* pf_top() const { return _pf_top; } + size_t desired_size() const { return _desired_size; } + size_t used() const { return pointer_delta(top(), start()); } + size_t used_bytes() const { return pointer_delta(top(), start(), 1); } + size_t free() const { return pointer_delta(end(), top()); } + + size_t refill_waste_limit() const { return _refill_waste_limit; } + size_t bytes_since_last_sample_point() const { return _bytes_since_last_sample_point; } + + + const HeapWord* start_relaxed() const; + const HeapWord* top_relaxed() const; + + + inline HeapWord* allocate(size_t size); + + + static size_t end_reserve(); + static size_t alignment_reserve() { return align_object_size(end_reserve()); } + static size_t alignment_reserve_in_bytes() { return alignment_reserve() * HeapWordSize; } + + + + + inline size_t compute_size(size_t obj_size); + + + static inline size_t compute_min_size(size_t obj_size); + + + inline void record_slow_allocation(size_t obj_size); + + + static void startup_initialization(); + + + void make_parsable(); + + + void retire(ThreadLocalAllocStats* stats = nullptr); + + + void retire_before_allocation(); + + + void resize(); + + void fill(HeapWord* start, HeapWord* top, size_t new_size); + void initialize(); + + void set_back_allocation_end(); + void set_sample_end(bool reset_byte_accumulation); + + static size_t refill_waste_limit_increment(); + + template void addresses_do(T f) { + f(&_start); + f(&_top); + f(&_pf_top); + f(&_end); + f(&_allocation_end); + } + + + static ByteSize start_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ThreadLocalAllocBuffer)]; ThreadLocalAllocBuffer* dummyObj = (ThreadLocalAllocBuffer*)space; char* c = (char*)(void*)&dummyObj->_start; return (size_t)(c - space); }())); } + static ByteSize end_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ThreadLocalAllocBuffer)]; ThreadLocalAllocBuffer* dummyObj = (ThreadLocalAllocBuffer*)space; char* c = (char*)(void*)&dummyObj->_end; return (size_t)(c - space); }())); } + static ByteSize top_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ThreadLocalAllocBuffer)]; ThreadLocalAllocBuffer* dummyObj = (ThreadLocalAllocBuffer*)space; char* c = (char*)(void*)&dummyObj->_top; return (size_t)(c - space); }())); } + static ByteSize pf_top_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ThreadLocalAllocBuffer)]; ThreadLocalAllocBuffer* dummyObj = (ThreadLocalAllocBuffer*)space; char* c = (char*)(void*)&dummyObj->_pf_top; return (size_t)(c - space); }())); } +}; + +class ThreadLocalAllocStats : public StackObj { +private: + static PerfVariable* _perf_allocating_threads; + static PerfVariable* _perf_total_refills; + static PerfVariable* _perf_max_refills; + static PerfVariable* _perf_total_allocations; + static PerfVariable* _perf_total_gc_waste; + static PerfVariable* _perf_max_gc_waste; + static PerfVariable* _perf_total_refill_waste; + static PerfVariable* _perf_max_refill_waste; + static PerfVariable* _perf_total_slow_allocations; + static PerfVariable* _perf_max_slow_allocations; + + static AdaptiveWeightedAverage _allocating_threads_avg; + + unsigned int _allocating_threads; + unsigned int _total_refills; + unsigned int _max_refills; + size_t _total_allocations; + size_t _total_gc_waste; + size_t _max_gc_waste; + size_t _total_refill_waste; + size_t _max_refill_waste; + unsigned int _total_slow_allocations; + unsigned int _max_slow_allocations; + +public: + static void initialize(); + static unsigned int allocating_threads_avg(); + + ThreadLocalAllocStats(); + + void update_fast_allocations(unsigned int refills, + size_t allocations, + size_t gc_waste, + size_t refill_waste); + void update_slow_allocations(unsigned int allocations); + void update(const ThreadLocalAllocStats& other); + + void reset(); + void publish(); +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" 2 + + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/threadHeapSampler.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/threadHeapSampler.hpp" +class ThreadHeapSampler { + private: + size_t _bytes_until_sample; + + static uint64_t _rnd; + + static volatile int _sampling_interval; + + void pick_next_geometric_sample(); + void pick_next_sample(size_t overflowed_bytes = 0); + + static double fast_log2(const double& d); + uint64_t next_random(uint64_t rnd); + + public: + ThreadHeapSampler() { + _rnd = static_cast(reinterpret_cast(this)); + if (_rnd == 0) { + _rnd = 1; + } + + + pick_next_sample(); + } + + size_t bytes_until_sample() { return _bytes_until_sample; } + + void check_for_sampling(oop obj, size_t size_in_bytes, size_t bytes_allocated_before); + + static void set_sampling_interval(int sampling_interval); + static int get_sampling_interval(); +}; +# 37 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/threadLocalStorage.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/threadLocalStorage.hpp" +class Thread; +# 40 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/threadLocalStorage.hpp" +class ThreadLocalStorage : AllStatic { + + + public: + static Thread* thread(); + static void set_thread(Thread* thread); + static void init(); + static bool is_initialized(); +}; +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/threadStatisticalInfo.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/threadStatisticalInfo.hpp" +class ThreadStatisticalInfo { + + const uint64_t _start_time_stamp; + uint64_t _define_class_count; + +public: + ThreadStatisticalInfo() : _start_time_stamp(os::javaTimeNanos()), _define_class_count(0) {} + uint64_t getDefineClassCount() const { return _define_class_count; } + void incr_define_class_count() { _define_class_count += 1; } + uint64_t getElapsedTime() const { return nanos_to_millis(os::javaTimeNanos() - _start_time_stamp); } +}; +# 39 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/unhandledOops.hpp" 1 +# 40 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" 2 + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrThreadExtension.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrThreadExtension.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/utilities/jfrAllocation.hpp" 1 +# 50 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/utilities/jfrAllocation.hpp" +class JfrCHeapObj : public CHeapObj { + private: + static void on_memory_allocation(const void* allocation, size_t size); + static char* allocate_array_noinline(size_t elements, size_t element_size); + + public: + __attribute__ ((noinline)) void* operator new(size_t size) throw(); + __attribute__ ((noinline)) void* operator new (size_t size, const std::nothrow_t& nothrow_constant) throw(); + __attribute__ ((noinline)) void* operator new [](size_t size) throw(); + __attribute__ ((noinline)) void* operator new [](size_t size, const std::nothrow_t& nothrow_constant) throw(); + void operator delete(void* p, size_t size); + void operator delete [] (void* p, size_t size); + static char* realloc_array(char* old, size_t size); + static void free(void* p, size_t size = 0); + + template + static T* new_array(size_t size) { + T* const memory = (T*)allocate_array_noinline(size, sizeof(T)); + on_memory_allocation(memory, sizeof(T) * size); + return memory; + } +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.hpp" 2 + +class JavaThread; +class JfrThreadSampler; + +class JfrThreadSampling : public JfrCHeapObj { + friend class JfrRecorder; + private: + JfrThreadSampler* _sampler; + void create_sampler(int64_t java_period_millis, int64_t native_period_millis); + void update_run_state(int64_t java_period_millis, int64_t native_period_millis); + void set_sampling_period(bool is_java_period, int64_t period_millis); + + JfrThreadSampling(); + ~JfrThreadSampling(); + + static JfrThreadSampling& instance(); + static JfrThreadSampling* create(); + static void destroy(); + + public: + static void set_java_sample_period(int64_t period_millis); + static void set_native_sample_period(int64_t period_millis); + static void on_javathread_suspend(JavaThread* thread); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrThreadExtension.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/recorder/storage/jfrBuffer.hpp" 1 +# 67 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/recorder/storage/jfrBuffer.hpp" +class JfrBuffer { + public: + JfrBuffer* _next; + private: + const void* _identity; + u1* _pos; + mutable const u1* _top; + size_t _size; + u2 _header_size; + u1 _flags; + u1 _context; + const u4 _pad; + + const u1* stable_top() const; + + public: + JfrBuffer(); + void initialize(size_t header_size, size_t size); + void reinitialize(); + + const u1* start() const { + return ((const u1*)this) + _header_size; + } + + u1* start() { + return ((u1*)this) + _header_size; + } + + const u1* end() const { + return start() + size(); + } + + + + const u1* pos() const { + return _pos; + } + + u1* pos() { + return _pos; + } + + u1** pos_address() { + return &_pos; + } + + void set_pos(u1* new_pos) { + ; + Atomic::release_store(&_pos, new_pos); + } + + void set_pos(size_t size) { + set_pos(pos() + size); + } + + const u1* top() const; + void set_top(const u1* new_top); + + + const u1* acquire_critical_section_top() const; + void release_critical_section_top(const u1* new_top); + + size_t size() const { + return _size; + } + + size_t total_size() const { + return _header_size + size(); + } + + size_t free_size() const { + return end() - Atomic::load_acquire(&_pos); + } + + size_t unflushed_size() const; + + bool empty() const { + return Atomic::load_acquire(&_pos) == start(); + } + + const void* identity() const { + return Atomic::load_acquire(&_identity); + } + + + void set_identity(const void* id); + + void acquire(const void* id); + bool try_acquire(const void* id); + bool acquired_by(const void* id) const; + bool acquired_by_self() const; + void release(); + + size_t discard(); + void move(JfrBuffer* const to, size_t size); + + bool transient() const; + void set_transient(); + void clear_transient(); + + bool lease() const; + void set_lease(); + void clear_lease(); + + bool retired() const; + void set_retired(); + void clear_retired(); + + u1 context() const; + void set_context(u1 context); + void clear_context(); + + + static ByteSize pos_offset(); + static ByteSize flags_offset(); + +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrThreadExtension.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrThreadId.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrThreadId.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrThreadLocal.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrThreadLocal.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/utilities/jfrBlob.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/utilities/jfrBlob.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/utilities/jfrRefCountPointer.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/utilities/jfrRefCountPointer.hpp" +template +class RefCountHandle { + private: + const T* _ptr; + + RefCountHandle(const T* ptr) : _ptr(ptr) { + ; + _ptr->add_ref(); + } + + public: + RefCountHandle() : _ptr(nullptr) {} + + RefCountHandle(const RefCountHandle& rhs) : _ptr(rhs._ptr) { + if (_ptr != nullptr) { + _ptr->add_ref(); + } + } + + ~RefCountHandle() { + if (_ptr != nullptr) { + _ptr->remove_ref(); + _ptr = nullptr; + } + } + + + void operator=(RefCountHandle rhs) { + const T* temp = rhs._ptr; + rhs._ptr = _ptr; + _ptr = temp; + } + + bool operator==(const RefCountHandle& rhs) const { + return _ptr == rhs._ptr; + } + + bool operator!=(const RefCountHandle& rhs) const { + return !operator==(rhs); + } + + bool valid() const { + return _ptr != nullptr; + } + + const T& operator->() const { + return *_ptr; + } + + T& operator->() { + return *const_cast(_ptr); + } + + static RefCountHandle make(const T* ptr) { + return ptr; + } +}; + +class SingleThreadedRefCounter { + private: + mutable intptr_t _refs; + public: + SingleThreadedRefCounter() : _refs(0) {} + + void inc() const { + ++_refs; + } + + bool dec() const { + return --_refs == 0; + } + + intptr_t current() const { + return _refs; + } +}; + +class MultiThreadedRefCounter { + private: + mutable volatile intptr_t _refs; + public: + MultiThreadedRefCounter() : _refs(0) {} + + void inc() const { + Atomic::inc(&_refs, memory_order_relaxed); + } + + bool dec() const { + if (0 == Atomic::sub(&_refs, 1, memory_order_release)) { + OrderAccess::acquire(); + return true; + } + return false; + } + + intptr_t current() const { + return Atomic::load(&_refs); + } +}; + +template +class RefCountPointer : public JfrCHeapObj { + template + friend class RefCountHandle; + typedef RefCountHandle > RefHandle; + private: + const T* _ptr; + mutable RefCountImpl _refs; + + + RefCountPointer(const RefCountPointer& rhs); + void operator=(const RefCountPointer& rhs); + + ~RefCountPointer() { + ; + delete const_cast(_ptr); + } + + void add_ref() const { + _refs.inc(); + } + + void remove_ref() const { + if (_refs.dec()) { + delete this; + } + } + + RefCountPointer(const T* ptr) : _ptr(ptr), _refs() { + ; + } + + public: + const T* operator->() const { + return _ptr; + } + + T* operator->() { + return const_cast(_ptr); + } + + static RefHandle make(const T* ptr) { + return RefHandle::make(new RefCountPointer(ptr)); + } +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/utilities/jfrBlob.hpp" 2 + +class JfrBlob; +typedef RefCountPointer JfrBlobReference; +typedef RefCountHandle JfrBlobHandle; + +class JfrBlob : public JfrCHeapObj { + template + friend class RefCountPointer; + private: + const u1* const _data; + JfrBlobHandle _next; + const size_t _size; + mutable bool _written; + + JfrBlob(const u1* data, size_t size); + ~JfrBlob(); + + public: + void set_next(const JfrBlobHandle& ref); + void reset_write_state() const; + static JfrBlobHandle make(const u1* data, size_t size); + template + void write(Writer& writer) const { + writer.write_bytes(_data, _size); + if (_next.valid()) { + _next->write(writer); + } + } + template + void exclusive_write(Writer& writer) const { + if (_written) { + return; + } + writer.write_bytes(_data, _size); + _written = true; + if (_next.valid()) { + _next->exclusive_write(writer); + } + } +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrThreadLocal.hpp" 2 + + +class Arena; +class JavaThread; +class JfrBuffer; +class JfrStackFrame; +class Thread; + +class JfrThreadLocal { + friend class Jfr; + friend class JfrIntrinsicSupport; + friend class JfrJavaSupport; + friend class JfrRecorder; + friend class JVMCIVMStructs; + private: + jobject _java_event_writer; + mutable JfrBuffer* _java_buffer; + mutable JfrBuffer* _native_buffer; + JfrBuffer* _shelved_buffer; + JfrBuffer* _load_barrier_buffer_epoch_0; + JfrBuffer* _load_barrier_buffer_epoch_1; + JfrBuffer* _checkpoint_buffer_epoch_0; + JfrBuffer* _checkpoint_buffer_epoch_1; + mutable JfrStackFrame* _stackframes; + Arena* _dcmd_arena; + JfrBlobHandle _thread; + mutable traceid _vthread_id; + mutable traceid _jvm_thread_id; + mutable traceid _thread_id_alias; + u8 _data_lost; + traceid _stack_trace_id; + traceid _stack_trace_hash; + traceid _parent_trace_id; + int64_t _last_allocated_bytes; + jlong _user_time; + jlong _cpu_time; + jlong _wallclock_time; + mutable u4 _stackdepth; + volatile jint _entering_suspend_flag; + mutable volatile int _critical_section; + u2 _vthread_epoch; + bool _vthread_excluded; + bool _jvm_thread_excluded; + bool _vthread; + bool _notified; + bool _dead; + + JfrBuffer* install_native_buffer() const; + JfrBuffer* install_java_buffer() const; + JfrStackFrame* install_stackframes() const; + void release(Thread* t); + static void release(JfrThreadLocal* tl, Thread* t); + + static void set(bool* excluded_field, bool state); + static traceid assign_thread_id(const Thread* t, JfrThreadLocal* tl); + static traceid vthread_id(const Thread* t); + static void set_vthread_epoch(const JavaThread* jt, traceid id, u2 epoch); + bool is_vthread_excluded() const; + static void exclude_vthread(const JavaThread* jt); + static void include_vthread(const JavaThread* jt); + static bool is_jvm_thread_excluded(const Thread* t); + static void exclude_jvm_thread(const Thread* t); + static void include_jvm_thread(const Thread* t); + + public: + JfrThreadLocal(); + + JfrBuffer* native_buffer() const { + return _native_buffer != nullptr ? _native_buffer : install_native_buffer(); + } + + bool has_native_buffer() const { + return _native_buffer != nullptr; + } + + void set_native_buffer(JfrBuffer* buffer) { + _native_buffer = buffer; + } + + JfrBuffer* java_buffer() const { + return _java_buffer != nullptr ? _java_buffer : install_java_buffer(); + } + + bool has_java_buffer() const { + return _java_buffer != nullptr; + } + + void set_java_buffer(JfrBuffer* buffer) { + _java_buffer = buffer; + } + + JfrBuffer* shelved_buffer() const { + return _shelved_buffer; + } + + void shelve_buffer(JfrBuffer* buffer) { + _shelved_buffer = buffer; + } + + bool has_java_event_writer() const { + return _java_event_writer != nullptr; + } + + jobject java_event_writer() { + return _java_event_writer; + } + + void set_java_event_writer(jobject java_event_writer) { + _java_event_writer = java_event_writer; + } + + JfrStackFrame* stackframes() const { + return _stackframes != nullptr ? _stackframes : install_stackframes(); + } + + void set_stackframes(JfrStackFrame* frames) { + _stackframes = frames; + } + + u4 stackdepth() const; + + void set_stackdepth(u4 depth) { + _stackdepth = depth; + } + + int64_t last_allocated_bytes() const { + return _last_allocated_bytes; + } + + void set_last_allocated_bytes(int64_t allocated_bytes) { + _last_allocated_bytes = allocated_bytes; + } + + void clear_last_allocated_bytes() { + set_last_allocated_bytes(0); + } + + + + static traceid thread_id(const Thread* t); + static bool is_vthread(const JavaThread* jt); + static u2 vthread_epoch(const JavaThread* jt); + + + + static traceid external_thread_id(const Thread* t); + + + static traceid jvm_thread_id(const Thread* t); + static traceid jvm_thread_id(const Thread* t, JfrThreadLocal* tl); + + + + static void impersonate(const Thread* t, traceid other_thread_id); + static void stop_impersonating(const Thread* t); + static bool is_impersonating(const Thread* t); + + traceid parent_thread_id() const { + return _parent_trace_id; + } + + void set_cached_stack_trace_id(traceid id, traceid hash = 0) { + _stack_trace_id = id; + _stack_trace_hash = hash; + } + + bool has_cached_stack_trace() const { + return _stack_trace_id != max_julong; + } + + void clear_cached_stack_trace() { + _stack_trace_id = max_julong; + _stack_trace_hash = 0; + } + + traceid cached_stack_trace_id() const { + return _stack_trace_id; + } + + traceid cached_stack_trace_hash() const { + return _stack_trace_hash; + } + + void set_trace_block() { + _entering_suspend_flag = 1; + } + + void clear_trace_block() { + _entering_suspend_flag = 0; + } + + bool is_trace_block() const { + return _entering_suspend_flag != 0; + } + + u8 data_lost() const { + return _data_lost; + } + + u8 add_data_lost(u8 value); + + jlong get_user_time() const { + return _user_time; + } + + void set_user_time(jlong user_time) { + _user_time = user_time; + } + + jlong get_cpu_time() const { + return _cpu_time; + } + + void set_cpu_time(jlong cpu_time) { + _cpu_time = cpu_time; + } + + jlong get_wallclock_time() const { + return _wallclock_time; + } + + void set_wallclock_time(jlong wallclock_time) { + _wallclock_time = wallclock_time; + } + + bool is_notified() { + return _notified; + } + + void notify() { + _notified = true; + } + + void clear_notification() { + _notified = false; + } + + bool is_dead() const { + return _dead; + } + + bool is_excluded() const; + bool is_included() const; + static bool is_excluded(const Thread* thread); + static bool is_included(const Thread* thread); + + static Arena* dcmd_arena(JavaThread* jt); + + bool has_thread_blob() const; + void set_thread_blob(const JfrBlobHandle& handle); + const JfrBlobHandle& thread_blob() const; + + + static void on_start(Thread* t); + static void on_exit(Thread* t); + static void on_set_current_thread(JavaThread* jt, oop thread); + static void on_java_thread_start(JavaThread* starter, JavaThread* startee); + + + static ByteSize java_event_writer_offset(); + static ByteSize java_buffer_offset(); + static ByteSize vthread_id_offset(); + static ByteSize vthread_offset(); + static ByteSize vthread_epoch_offset(); + static ByteSize vthread_excluded_offset(); + static ByteSize notified_offset(); + + friend class JfrJavaThread; + friend class JfrCheckpointManager; + template + friend class JfrEpochQueueKlassPolicy; +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrThreadId.hpp" 2 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrThreadExtension.hpp" 2 +# 44 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" 2 + + +class HandleArea; +class HandleMark; +class ICRefillVerifier; +class JvmtiRawMonitor; +class Metadata; +class OSThread; +class ParkEvent; +class ResourceArea; +class SafeThreadsListPtr; +class ThreadClosure; +class ThreadsList; +class ThreadsSMRSupport; +class VMErrorCallback; + +class OopClosure; +class CodeBlobClosure; + + + +class WorkerThread; + +class JavaThread; +# 107 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" +class Thread: public ThreadShadow { + friend class VMError; + friend class VMErrorCallbackMark; + friend class VMStructs; + friend class JVMCIVMStructs; + private: + + + + static __thread Thread* _thr_current; + + + + + + uint64_t _nmethod_disarmed_guard_value; + + public: + void set_nmethod_disarmed_guard_value(int value) { + _nmethod_disarmed_guard_value = (uint64_t)(uint32_t)value; + } + + static ByteSize nmethod_disarmed_guard_value_offset() { + ByteSize offset = in_ByteSize((int)([]() { alignas(16) char space[sizeof (Thread)]; Thread* dummyObj = (Thread*)space; char* c = (char*)(void*)&dummyObj->_nmethod_disarmed_guard_value; return (size_t)(c - space); }())); + + + ; + return offset; + } + + private: + + + + GCThreadLocalData _gc_data; + + public: + static ByteSize gc_data_offset() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Thread)]; Thread* dummyObj = (Thread*)space; char* c = (char*)(void*)&dummyObj->_gc_data; return (size_t)(c - space); }())); + } + + template T* gc_data() { + static_assert((sizeof(T) <= sizeof(_gc_data)), "sizeof(T) <= sizeof(_gc_data)"); + return reinterpret_cast(&_gc_data); + } + + + + + + + protected: + + + + + friend class SafeThreadsListPtr; + friend class ScanHazardPtrGatherProtectedThreadsClosure; + friend class ScanHazardPtrGatherThreadsListClosure; + friend class ScanHazardPtrPrintMatchingThreadsClosure; + friend class ThreadsSMRSupport; + friend class ThreadsListHandleTest; + friend class ValidateHazardPtrsClosure; + + ThreadsList* volatile _threads_hazard_ptr; + SafeThreadsListPtr* _threads_list_ptr; + ThreadsList* cmpxchg_threads_hazard_ptr(ThreadsList* exchange_value, ThreadsList* compare_value); + ThreadsList* get_threads_hazard_ptr() const; + void set_threads_hazard_ptr(ThreadsList* new_list); + static bool is_hazard_ptr_tagged(ThreadsList* list) { + return (intptr_t(list) & intptr_t(1)) == intptr_t(1); + } + static ThreadsList* tag_hazard_ptr(ThreadsList* list) { + return (ThreadsList*)(intptr_t(list) | intptr_t(1)); + } + static ThreadsList* untag_hazard_ptr(ThreadsList* list) { + return (ThreadsList*)(intptr_t(list) & ~intptr_t(1)); + } + + uint _nested_threads_hazard_ptr_cnt; + void dec_nested_threads_hazard_ptr_cnt() { + ; + _nested_threads_hazard_ptr_cnt--; + } + void inc_nested_threads_hazard_ptr_cnt() { + _nested_threads_hazard_ptr_cnt++; + } + uint nested_threads_hazard_ptr_cnt() { + return _nested_threads_hazard_ptr_cnt; + } + + public: + + + static bool is_JavaThread_protected(const JavaThread* target); + + + static bool is_JavaThread_protected_by_TLH(const JavaThread* target); + + private: + + + + public: + + + + + + + virtual bool in_retryable_allocation() const { return false; } +# 229 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" + private: + + HandleMark* _last_handle_mark; + + + uintx _threads_do_token; + + + private: + volatile uintx _rcu_counter; + public: + volatile uintx* get_rcu_counter() { + return &_rcu_counter; + } + + public: + void set_last_handle_mark(HandleMark* mark) { _last_handle_mark = mark; } + HandleMark* last_handle_mark() const { return _last_handle_mark; } + private: +# 262 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" + private: + + + + friend class GCLocker; + + private: + ThreadLocalAllocBuffer _tlab; + jlong _allocated_bytes; + + ThreadHeapSampler _heap_sampler; + + ThreadStatisticalInfo _statistical_info; + + mutable JfrThreadLocal _jfr_thread_local; + + JvmtiRawMonitor* _current_pending_raw_monitor; + + public: + + Thread(); + virtual ~Thread() = 0; + + + void initialize_thread_current(); + static void clear_thread_current(); + + protected: + + virtual void run() = 0; + virtual void pre_run() = 0; + virtual void post_run() = 0; +# 308 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" + public: + + void call_run(); + + + virtual bool is_VM_thread() const { return false; } + virtual bool is_Java_thread() const { return false; } + virtual bool is_Compiler_thread() const { return false; } + virtual bool is_service_thread() const { return false; } + virtual bool is_hidden_from_external_view() const { return false; } + virtual bool is_jvmti_agent_thread() const { return false; } + virtual bool is_Watcher_thread() const { return false; } + virtual bool is_ConcurrentGC_thread() const { return false; } + virtual bool is_Named_thread() const { return false; } + virtual bool is_Worker_thread() const { return false; } + virtual bool is_JfrSampler_thread() const { return false; } + virtual bool is_AttachListener_thread() const { return false; } + virtual bool is_monitor_deflation_thread() const { return false; } + + + virtual bool can_call_java() const { return false; } + + + + virtual bool is_active_Java_thread() const { return false; } + + + + + + virtual const char* name() const { return "Unknown thread"; } + + + + virtual const char* type_name() const { return "Thread"; } + + + static inline Thread* current(); + + static inline Thread* current_or_null(); + + + static inline Thread* current_or_null_safe(); + + + + + + static void set_priority(Thread* thread, ThreadPriority priority); + static void start(Thread* thread); + + void set_native_thread_name(const char *name) { + ; + os::set_native_thread_name(name); + } +# 388 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" + public: + + + + + + + ResourceArea* resource_area() const { return _resource_area; } + void set_resource_area(ResourceArea* area) { _resource_area = area; } + + OSThread* osthread() const { return _osthread; } + void set_osthread(OSThread* thread) { _osthread = thread; } + + + HandleArea* handle_area() const { return _handle_area; } + void set_handle_area(HandleArea* area) { _handle_area = area; } + + GrowableArray* metadata_handles() const { return _metadata_handles; } + void set_metadata_handles(GrowableArray* handles){ _metadata_handles = handles; } + + + ThreadLocalAllocBuffer& tlab() { return _tlab; } + void initialize_tlab(); + + jlong allocated_bytes() { return _allocated_bytes; } + void set_allocated_bytes(jlong value) { _allocated_bytes = value; } + void incr_allocated_bytes(jlong size) { _allocated_bytes += size; } + inline jlong cooked_allocated_bytes(); + + ThreadHeapSampler& heap_sampler() { return _heap_sampler; } + + ThreadStatisticalInfo& statistical_info() { return _statistical_info; } + + JfrThreadLocal* jfr_thread_local() const { return &_jfr_thread_local; }; + + + JvmtiRawMonitor* current_pending_raw_monitor() { + return _current_pending_raw_monitor; + } + void set_current_pending_raw_monitor(JvmtiRawMonitor* monitor) { + _current_pending_raw_monitor = monitor; + } + + + + + + virtual void oops_do_no_frames(OopClosure* f, CodeBlobClosure* cf); + virtual void oops_do_frames(OopClosure* f, CodeBlobClosure* cf) {} + void oops_do(OopClosure* f, CodeBlobClosure* cf); + + + private: + bool claim_par_threads_do(uintx claim_token); + public: + + + + + + + + bool claim_threads_do(bool is_par, uintx claim_token) { + if (!is_par) { + _threads_do_token = claim_token; + return true; + } else { + return claim_par_threads_do(claim_token); + } + } + + uintx threads_do_token() const { return _threads_do_token; } + + + void metadata_handles_do(void f(Metadata*)); + + private: + + + + bool is_in_stack_range(address adr, address limit, bool inclusive) const { + ; + return stack_base() > adr && (inclusive ? adr >= limit : adr > limit); + } + + public: + + virtual bool is_lock_owned(address adr) const; + + + + bool is_in_stack_range_incl(address adr, address limit) const { + return is_in_stack_range(adr, limit, true); + } + + + + bool is_in_stack_range_excl(address adr, address limit) const { + return is_in_stack_range(adr, limit, false); + } + + + + + bool is_in_full_stack_checked(address adr) const { + return is_in_stack_range_incl(adr, stack_end()); + } + + + + bool is_in_full_stack(address adr) const { + address stack_end = _stack_base - _stack_size; + return _stack_base > adr && adr >= stack_end; + } + + + + bool is_in_live_stack(address adr) const { + ; + return is_in_stack_range_incl(adr, os::current_stack_pointer()); + } + + + + bool set_as_starting_thread(); + +protected: + + OSThread* _osthread; + + + ResourceArea* _resource_area; + + + + + HandleArea* _handle_area; + GrowableArray* _metadata_handles; + + + address _stack_base; + size_t _stack_size; + int _lgrp_id; + + public: + + address stack_base() const { ; return _stack_base; } + void set_stack_base(address base) { _stack_base = base; } + size_t stack_size() const { return _stack_size; } + void set_stack_size(size_t size) { _stack_size = size; } + address stack_end() const { return stack_base() - stack_size(); } + void record_stack_base_and_size(); + void register_thread_stack_with_NMT(); + void unregister_thread_stack_with_NMT(); + + int lgrp_id() const { return _lgrp_id; } + void set_lgrp_id(int value) { _lgrp_id = value; } + + + void print_on(outputStream* st, bool print_extended_info) const; + virtual void print_on(outputStream* st) const { print_on(st, false); } + void print() const; + virtual void print_on_error(outputStream* st, char* buf, int buflen) const; + + void print_value_on(outputStream* st) const; +# 575 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" + private: + volatile int _jvmti_env_iteration_count; + + public: + void entering_jvmti_env_iteration() { ++_jvmti_env_iteration_count; } + void leaving_jvmti_env_iteration() { --_jvmti_env_iteration_count; } + bool is_inside_jvmti_env_iteration() { return _jvmti_env_iteration_count > 0; } + + + static ByteSize exception_file_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Thread)]; Thread* dummyObj = (Thread*)space; char* c = (char*)(void*)&dummyObj->_exception_file; return (size_t)(c - space); }())); } + static ByteSize exception_line_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Thread)]; Thread* dummyObj = (Thread*)space; char* c = (char*)(void*)&dummyObj->_exception_line; return (size_t)(c - space); }())); } + + static ByteSize stack_base_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Thread)]; Thread* dummyObj = (Thread*)space; char* c = (char*)(void*)&dummyObj->_stack_base; return (size_t)(c - space); }())); } + static ByteSize stack_size_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Thread)]; Thread* dummyObj = (Thread*)space; char* c = (char*)(void*)&dummyObj->_stack_size; return (size_t)(c - space); }())); } + + static ByteSize tlab_start_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Thread)]; Thread* dummyObj = (Thread*)space; char* c = (char*)(void*)&dummyObj->_tlab; return (size_t)(c - space); }())) + ThreadLocalAllocBuffer::start_offset(); } + static ByteSize tlab_end_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Thread)]; Thread* dummyObj = (Thread*)space; char* c = (char*)(void*)&dummyObj->_tlab; return (size_t)(c - space); }())) + ThreadLocalAllocBuffer::end_offset(); } + static ByteSize tlab_top_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Thread)]; Thread* dummyObj = (Thread*)space; char* c = (char*)(void*)&dummyObj->_tlab; return (size_t)(c - space); }())) + ThreadLocalAllocBuffer::top_offset(); } + static ByteSize tlab_pf_top_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Thread)]; Thread* dummyObj = (Thread*)space; char* c = (char*)(void*)&dummyObj->_tlab; return (size_t)(c - space); }())) + ThreadLocalAllocBuffer::pf_top_offset(); } + + static ByteSize allocated_bytes_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Thread)]; Thread* dummyObj = (Thread*)space; char* c = (char*)(void*)&dummyObj->_allocated_bytes; return (size_t)(c - space); }())); } + + static ByteSize jfr_thread_local_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Thread)]; Thread* dummyObj = (Thread*)space; char* c = (char*)(void*)&dummyObj->_jfr_thread_local; return (size_t)(c - space); }())); }; + + public: + ParkEvent * volatile _ParkEvent; + + + + + + bool has_terminated() { return Atomic::load(&_ParkEvent) == nullptr; }; + + jint _hashStateW; + jint _hashStateX; + jint _hashStateY; + jint _hashStateZ; + + + + static void SpinAcquire(volatile int * Lock, const char * Name); + static void SpinRelease(volatile int * Lock); +# 631 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/thread.hpp" + private: + bool _in_asgct = false; + public: + bool in_asgct() const { return _in_asgct; } + void set_in_asgct(bool value) { _in_asgct = value; } + static bool current_in_asgct() { + Thread *cur = Thread::current_or_null_safe(); + return cur != nullptr && cur->in_asgct(); + } + + private: + VMErrorCallback* _vm_error_callbacks; +}; + +class ThreadInAsgct { + private: + Thread* _thread; + public: + ThreadInAsgct(Thread* thread) : _thread(thread) { + ; + ; + thread->set_in_asgct(true); + } + ~ThreadInAsgct() { + ; + _thread->set_in_asgct(false); + } +}; + + +inline Thread* Thread::current() { + Thread* current = current_or_null(); + ; + return current; +} + +inline Thread* Thread::current_or_null() { + + return _thr_current; + + + + + + +} + +inline Thread* Thread::current_or_null_safe() { + if (ThreadLocalStorage::is_initialized()) { + return ThreadLocalStorage::thread(); + } + return nullptr; +} +# 43 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" 2 +# 52 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" +class AsyncExceptionHandshake; +class ContinuationEntry; +class DeoptResourceMark; +class JNIHandleBlock; +class JVMCIRuntime; + +class JvmtiDeferredUpdates; +class JvmtiSampledObjectAllocEventCollector; +class JvmtiThreadState; + +class Metadata; +class OopHandleList; +class OopStorage; +class OSThread; + +class ThreadsList; +class ThreadSafepointState; +class ThreadStatistics; + +class vframeArray; +class vframe; +class javaVFrame; + +class JavaThread; +typedef void (*ThreadFunction)(JavaThread*, JavaThread* __the_thread__); + +class JavaThread: public Thread { + friend class VMStructs; + friend class JVMCIVMStructs; + friend class WhiteBox; + friend class ThreadsSMRSupport; + friend class HandshakeState; + friend class Continuation; + friend class Threads; + friend class ServiceThread; + private: + bool _on_thread_list; + + + + + OopHandle _threadObj; + OopHandle _vthread; + OopHandle _jvmti_vthread; + OopHandle _scopedValueCache; + + static OopStorage* _thread_oop_storage; +# 114 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" + JavaFrameAnchor _anchor; + + ThreadFunction _entry_point; + + JNIEnv _jni_environment; + + + DeoptResourceMark* _deopt_mark; + + CompiledMethod* _deopt_nmethod; + vframeArray* _vframe_array_head; + vframeArray* _vframe_array_last; + + + + JvmtiDeferredUpdates* _jvmti_deferred_updates; +# 139 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" + Method* _callee_target; + + + oop _vm_result; + Metadata* _vm_result_2; + + + + + MemRegion _deferred_card_mark; + + ObjectMonitor* volatile _current_pending_monitor; + bool _current_pending_monitor_is_from_java; + ObjectMonitor* volatile _current_waiting_monitor; + + + JNIHandleBlock* _active_handles; + + + JNIHandleBlock* _free_handle_block; + + public: + volatile intptr_t _Stalled; + + + ObjectMonitor* current_pending_monitor() { + + + + return Atomic::load(&_current_pending_monitor); + } + void set_current_pending_monitor(ObjectMonitor* monitor) { + Atomic::store(&_current_pending_monitor, monitor); + } + void set_current_pending_monitor_is_from_java(bool from_java) { + _current_pending_monitor_is_from_java = from_java; + } + bool current_pending_monitor_is_from_java() { + return _current_pending_monitor_is_from_java; + } + ObjectMonitor* current_waiting_monitor() { + + return Atomic::load(&_current_waiting_monitor); + } + void set_current_waiting_monitor(ObjectMonitor* monitor) { + Atomic::store(&_current_waiting_monitor, monitor); + } + + + JNIHandleBlock* active_handles() const { return _active_handles; } + void set_active_handles(JNIHandleBlock* block) { _active_handles = block; } + JNIHandleBlock* free_handle_block() const { return _free_handle_block; } + void set_free_handle_block(JNIHandleBlock* block) { _free_handle_block = block; } + + void push_jni_handle_block(); + void pop_jni_handle_block(); + + private: + MonitorChunk* _monitor_chunks; + + + + enum SuspendFlags { + + + _trace_flag = 0x00000004U, + _obj_deopt = 0x00000008U + }; + + + volatile uint32_t _suspend_flags; + + inline void set_suspend_flag(SuspendFlags f); + inline void clear_suspend_flag(SuspendFlags f); + + public: + inline void set_trace_flag(); + inline void clear_trace_flag(); + inline void set_obj_deopt_flag(); + inline void clear_obj_deopt_flag(); + bool is_trace_suspend() { return (_suspend_flags & _trace_flag) != 0; } + bool is_obj_deopt_suspend() { return (_suspend_flags & _obj_deopt) != 0; } + + + private: + friend class InstallAsyncExceptionHandshake; + friend class AsyncExceptionHandshake; + friend class HandshakeState; + + void install_async_exception(AsyncExceptionHandshake* aec = nullptr); + void handle_async_exception(oop java_throwable); + public: + bool has_async_exception_condition(); + inline void set_pending_unsafe_access_error(); + static void send_async_exception(JavaThread* jt, oop java_throwable); + + class NoAsyncExceptionDeliveryMark : public StackObj { + friend JavaThread; + JavaThread *_target; + inline NoAsyncExceptionDeliveryMark(JavaThread *t); + inline ~NoAsyncExceptionDeliveryMark(); + }; + + + public: + volatile JavaThreadState _thread_state; + private: + SafepointMechanism::ThreadData _poll_data; + ThreadSafepointState* _safepoint_state; + address _saved_exception_pc; + +# 262 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" + public: + + + void check_for_valid_safepoint_state() {}; + void check_possible_safepoint() {}; +# 288 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" + public: + enum TerminatedTypes { + _not_terminated = 0xDEAD - 3, + _thread_exiting, + _thread_gc_barrier_detached, + _thread_terminated, + _vm_exited + + }; + + private: +# 309 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" + volatile TerminatedTypes _terminated; + + jint _in_deopt_handler; + + volatile bool _doing_unsafe_access; + bool _do_not_unlock_if_synchronized; + + + volatile bool _carrier_thread_suspended; + bool _is_in_VTMS_transition; + bool _is_in_tmp_VTMS_transition; + + + + + + + enum JNIAttachStates { + _not_attaching_via_jni = 1, + _attaching_via_jni, + _attached_via_jni + }; + + + + + volatile JNIAttachStates _jni_attach_state; + + + + + + + + int _pending_deoptimization; + + + + bool _pending_monitorenter; + + + bool _pending_transfer_to_interpreter; + + + + bool _in_retryable_allocation; + + + + + jlong _pending_failed_speculation; + + + union { + + + address _implicit_exception_pc; + + + address _alternate_call_target; + } _jvmci; + + + JVMCIRuntime* _libjvmci_runtime; + + + jlong* _jvmci_counters; + + + jlong _jvmci_reserved0; + jlong _jvmci_reserved1; + oop _jvmci_reserved_oop0; + + public: + static jlong* _jvmci_old_thread_counters; + static void collect_counters(jlong* array, int length); + + bool resize_counters(int current_size, int new_size); + + static bool resize_all_jvmci_counters(int new_size); + + void set_jvmci_reserved_oop0(oop value) { + _jvmci_reserved_oop0 = value; + } + + oop get_jvmci_reserved_oop0() { + return _jvmci_reserved_oop0; + } + + void set_jvmci_reserved0(jlong value) { + _jvmci_reserved0 = value; + } + + jlong get_jvmci_reserved0() { + return _jvmci_reserved0; + } + + void set_jvmci_reserved1(jlong value) { + _jvmci_reserved1 = value; + } + + jlong get_jvmci_reserved1() { + return _jvmci_reserved1; + } + + private: + + + StackOverflow _stack_overflow_state; + + void pretouch_stack(); + + + + + volatile oop _exception_oop; + volatile address _exception_pc; + volatile address _exception_handler_pc; + volatile int _is_method_handle_return; + + private: + + jint _jni_active_critical; + + + char* _pending_jni_exception_check_fn; + + + int _depth_first_number; + + + + int _popframe_condition; + + + + + + int _frames_to_pop_failed_realloc; + + ContinuationEntry* _cont_entry; + intptr_t* _cont_fastpath; + + int _cont_fastpath_thread_state; + + + intx _held_monitor_count; + intx _jni_monitor_count; + +private: + + friend class VMThread; + friend class ThreadWaitTransition; + friend class VM_Exit; + + + StackWatermarks _stack_watermarks; + + public: + inline StackWatermarks* stack_watermarks() { return &_stack_watermarks; } + + public: + + JavaThread(); + JavaThread(bool is_attaching_via_jni); + JavaThread(ThreadFunction entry_point, size_t stack_size = 0); + ~JavaThread(); + + + + + + + StackOverflow* stack_overflow_state() { return &_stack_overflow_state; } + + + void set_jni_functions(struct JNINativeInterface_* functionTable) { + _jni_environment.functions = functionTable; + } + struct JNINativeInterface_* get_jni_functions() { + return (struct JNINativeInterface_ *)_jni_environment.functions; + } + + + + void cache_global_variables(); + + + void invoke_shutdown_hooks(); + + + enum ExitType { + normal_exit, + jni_detach + }; + void exit(bool destroy_vm, ExitType exit_type = normal_exit); + + void cleanup_failed_attach_current_thread(bool is_daemon); + + + virtual bool is_Java_thread() const { return true; } + virtual bool can_call_java() const { return true; } + + virtual bool is_active_Java_thread() const; + + + + oop threadObj() const; + void set_threadOopHandles(oop p); + oop vthread() const; + void set_vthread(oop p); + oop scopedValueCache() const; + void set_scopedValueCache(oop p); + void clear_scopedValueBindings(); + oop jvmti_vthread() const; + void set_jvmti_vthread(oop p); + + + + + void prepare(jobject jni_thread, ThreadPriority prio=NoPriority); + + void set_saved_exception_pc(address pc) { _saved_exception_pc = pc; } + address saved_exception_pc() { return _saved_exception_pc; } + + ThreadFunction entry_point() const { return _entry_point; } + + + void allocate_threadObj(Handle thread_group, const char* thread_name, bool daemon, JavaThread* __the_thread__); + + + + JavaFrameAnchor* frame_anchor(void) { return &_anchor; } + + + bool has_last_Java_frame() const { return _anchor.has_last_Java_frame(); } + intptr_t* last_Java_sp() const { return _anchor.last_Java_sp(); } + + + + address last_Java_pc(void) { return _anchor.last_Java_pc(); } + + + inline JavaThreadState thread_state() const; + inline void set_thread_state(JavaThreadState s); + inline void set_thread_state_fence(JavaThreadState s); + inline ThreadSafepointState* safepoint_state() const; + inline void set_safepoint_state(ThreadSafepointState* state); + inline bool is_at_poll_safepoint(); + + + void smr_delete(); + bool on_thread_list() const { return _on_thread_list; } + void set_on_thread_list() { _on_thread_list = true; } + + + + bool is_exiting() const; + + bool is_oop_safe() const; + + + bool check_is_terminated(TerminatedTypes l_terminated) const { + return l_terminated == _thread_terminated || l_terminated == _vm_exited; + } + bool is_terminated() const; + void set_terminated(TerminatedTypes t); + + void block_if_vm_exited(); + + bool doing_unsafe_access() { return _doing_unsafe_access; } + void set_doing_unsafe_access(bool val) { _doing_unsafe_access = val; } + + bool do_not_unlock_if_synchronized() { return _do_not_unlock_if_synchronized; } + void set_do_not_unlock_if_synchronized(bool val) { _do_not_unlock_if_synchronized = val; } + + SafepointMechanism::ThreadData* poll_data() { return &_poll_data; } + + void set_requires_cross_modify_fence(bool val) {} + + + ContinuationEntry* last_continuation() const { return _cont_entry; } + void set_cont_fastpath(intptr_t* x) { _cont_fastpath = x; } + void push_cont_fastpath(intptr_t* sp) { if (sp > _cont_fastpath) _cont_fastpath = sp; } + void set_cont_fastpath_thread_state(bool x) { _cont_fastpath_thread_state = (int)x; } + intptr_t* raw_cont_fastpath() const { return _cont_fastpath; } + bool cont_fastpath() const { return _cont_fastpath == nullptr && _cont_fastpath_thread_state != 0; } + bool cont_fastpath_thread_state() const { return _cont_fastpath_thread_state != 0; } + + void inc_held_monitor_count(intx i = 1, bool jni = false); + void dec_held_monitor_count(intx i = 1, bool jni = false); + + intx held_monitor_count() { return _held_monitor_count; } + intx jni_monitor_count() { return _jni_monitor_count; } + void clear_jni_monitor_count() { _jni_monitor_count = 0; } + + inline bool is_vthread_mounted() const; + inline const ContinuationEntry* vthread_continuation() const; + + private: + + + + HandshakeState _handshake; + public: + HandshakeState* handshake_state() { return &_handshake; } + + + + bool is_handshake_safe_for(Thread* th) const { + return _handshake.active_handshaker() == th || this == th; + } + + + + bool java_suspend(); + bool java_resume(); + bool is_suspended() { return _handshake.is_suspended(); } + + + static void check_special_condition_for_native_trans(JavaThread *thread); + + + + void wait_for_object_deoptimization(); + + + inline void set_carrier_thread_suspended(); + inline void clear_carrier_thread_suspended(); + + bool is_carrier_thread_suspended() const { + return _carrier_thread_suspended; + } + + bool is_in_VTMS_transition() const { return _is_in_VTMS_transition; } + bool is_in_tmp_VTMS_transition() const { return _is_in_tmp_VTMS_transition; } + bool is_in_any_VTMS_transition() const { return _is_in_VTMS_transition || _is_in_tmp_VTMS_transition; } + + void set_is_in_VTMS_transition(bool val); + void toggle_is_in_tmp_VTMS_transition() { _is_in_tmp_VTMS_transition = !_is_in_tmp_VTMS_transition; }; +# 657 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" + void handle_special_runtime_exit_condition(); + bool has_special_runtime_exit_condition() { + return (_suspend_flags & (_obj_deopt | _trace_flag)) != 0; + } + + + bool is_lock_owned(address adr) const; + + + + + void set_vframe_array_head(vframeArray* value) { _vframe_array_head = value; } + vframeArray* vframe_array_head() const { return _vframe_array_head; } + + + JvmtiDeferredUpdates* deferred_updates() const { return _jvmti_deferred_updates; } + void set_deferred_updates(JvmtiDeferredUpdates* du) { _jvmti_deferred_updates = du; } + + + + void set_vframe_array_last(vframeArray* value) { _vframe_array_last = value; } + vframeArray* vframe_array_last() const { return _vframe_array_last; } + + + + void set_deopt_mark(DeoptResourceMark* value) { _deopt_mark = value; } + DeoptResourceMark* deopt_mark(void) { return _deopt_mark; } + + void set_deopt_compiled_method(CompiledMethod* nm) { _deopt_nmethod = nm; } + CompiledMethod* deopt_compiled_method() { return _deopt_nmethod; } + + Method* callee_target() const { return _callee_target; } + void set_callee_target (Method* x) { _callee_target = x; } + + + oop vm_result() const { return _vm_result; } + void set_vm_result (oop x) { _vm_result = x; } + + void set_vm_result_2 (Metadata* x) { _vm_result_2 = x; } + + MemRegion deferred_card_mark() const { return _deferred_card_mark; } + void set_deferred_card_mark(MemRegion mr) { _deferred_card_mark = mr; } + + + jlong pending_failed_speculation() const { return _pending_failed_speculation; } + void set_pending_monitorenter(bool b) { _pending_monitorenter = b; } + void set_pending_deoptimization(int reason) { _pending_deoptimization = reason; } + void set_pending_failed_speculation(jlong failed_speculation) { _pending_failed_speculation = failed_speculation; } + void set_pending_transfer_to_interpreter(bool b) { _pending_transfer_to_interpreter = b; } + void set_jvmci_alternate_call_target(address a) { ; _jvmci._alternate_call_target = a; } + void set_jvmci_implicit_exception_pc(address a) { ; _jvmci._implicit_exception_pc = a; } + + virtual bool in_retryable_allocation() const { return _in_retryable_allocation; } + void set_in_retryable_allocation(bool b) { _in_retryable_allocation = b; } + + JVMCIRuntime* libjvmci_runtime() const { return _libjvmci_runtime; } + void set_libjvmci_runtime(JVMCIRuntime* rt) { + ; + _libjvmci_runtime = rt; + } + + + + oop exception_oop() const; + address exception_pc() const { return _exception_pc; } + + void set_exception_oop(oop o); + void set_exception_pc(address a) { _exception_pc = a; } + void set_exception_handler_pc(address a) { _exception_handler_pc = a; } + void set_is_method_handle_return(bool value) { _is_method_handle_return = value ? 1 : 0; } + + void clear_exception_oop_and_pc() { + set_exception_oop(nullptr); + set_exception_pc(nullptr); + } + + + + + bool is_in_usable_stack(address adr) const { + return is_in_stack_range_incl(adr, _stack_overflow_state.stack_reserved_zone_base()); + } + + + static ByteSize scopedValueCache_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_scopedValueCache; return (size_t)(c - space); }())); } + + + static ByteSize threadObj_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_threadObj; return (size_t)(c - space); }())); } + static ByteSize vthread_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_vthread; return (size_t)(c - space); }())); } + static ByteSize jni_environment_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_jni_environment; return (size_t)(c - space); }())); } + static ByteSize pending_jni_exception_check_fn_offset() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_pending_jni_exception_check_fn; return (size_t)(c - space); }())); + } + static ByteSize last_Java_sp_offset() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_anchor; return (size_t)(c - space); }())) + JavaFrameAnchor::last_Java_sp_offset(); + } + static ByteSize last_Java_pc_offset() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_anchor; return (size_t)(c - space); }())) + JavaFrameAnchor::last_Java_pc_offset(); + } + static ByteSize frame_anchor_offset() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_anchor; return (size_t)(c - space); }())); + } + static ByteSize callee_target_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_callee_target; return (size_t)(c - space); }())); } + static ByteSize vm_result_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_vm_result; return (size_t)(c - space); }())); } + static ByteSize vm_result_2_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_vm_result_2; return (size_t)(c - space); }())); } + static ByteSize thread_state_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_thread_state; return (size_t)(c - space); }())); } + static ByteSize polling_word_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_poll_data; return (size_t)(c - space); }())) + in_ByteSize((int)([]() { alignas(16) char space[sizeof (SafepointMechanism::ThreadData)]; SafepointMechanism::ThreadData* dummyObj = (SafepointMechanism::ThreadData*)space; char* c = (char*)(void*)&dummyObj->_polling_word; return (size_t)(c - space); }()));} + static ByteSize polling_page_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_poll_data; return (size_t)(c - space); }())) + in_ByteSize((int)([]() { alignas(16) char space[sizeof (SafepointMechanism::ThreadData)]; SafepointMechanism::ThreadData* dummyObj = (SafepointMechanism::ThreadData*)space; char* c = (char*)(void*)&dummyObj->_polling_page; return (size_t)(c - space); }()));} + static ByteSize saved_exception_pc_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_saved_exception_pc; return (size_t)(c - space); }())); } + static ByteSize osthread_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_osthread; return (size_t)(c - space); }())); } + + static ByteSize pending_deoptimization_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_pending_deoptimization; return (size_t)(c - space); }())); } + static ByteSize pending_monitorenter_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_pending_monitorenter; return (size_t)(c - space); }())); } + static ByteSize jvmci_alternate_call_target_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_jvmci._alternate_call_target; return (size_t)(c - space); }())); } + static ByteSize jvmci_implicit_exception_pc_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_jvmci._implicit_exception_pc; return (size_t)(c - space); }())); } + static ByteSize jvmci_counters_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_jvmci_counters; return (size_t)(c - space); }())); } + + static ByteSize exception_oop_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_exception_oop; return (size_t)(c - space); }())); } + static ByteSize exception_pc_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_exception_pc; return (size_t)(c - space); }())); } + static ByteSize exception_handler_pc_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_exception_handler_pc; return (size_t)(c - space); }())); } + static ByteSize is_method_handle_return_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_is_method_handle_return; return (size_t)(c - space); }())); } + + static ByteSize active_handles_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_active_handles; return (size_t)(c - space); }())); } + + + static ByteSize stack_overflow_limit_offset() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_stack_overflow_state._stack_overflow_limit; return (size_t)(c - space); }())); + } + static ByteSize stack_guard_state_offset() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_stack_overflow_state._stack_guard_state; return (size_t)(c - space); }())); + } + static ByteSize reserved_stack_activation_offset() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_stack_overflow_state._reserved_stack_activation; return (size_t)(c - space); }())); + } + static ByteSize shadow_zone_safe_limit() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_stack_overflow_state._shadow_zone_safe_limit; return (size_t)(c - space); }())); + } + static ByteSize shadow_zone_growth_watermark() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_stack_overflow_state._shadow_zone_growth_watermark; return (size_t)(c - space); }())); + } + + static ByteSize suspend_flags_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_suspend_flags; return (size_t)(c - space); }())); } + + static ByteSize do_not_unlock_if_synchronized_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_do_not_unlock_if_synchronized; return (size_t)(c - space); }())); } + static ByteSize should_post_on_exceptions_flag_offset() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_should_post_on_exceptions_flag; return (size_t)(c - space); }())); + } + static ByteSize doing_unsafe_access_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_doing_unsafe_access; return (size_t)(c - space); }())); } + + + static ByteSize cont_entry_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_cont_entry; return (size_t)(c - space); }())); } + static ByteSize cont_fastpath_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_cont_fastpath; return (size_t)(c - space); }())); } + static ByteSize held_monitor_count_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_held_monitor_count; return (size_t)(c - space); }())); } + + + static ByteSize is_in_VTMS_transition_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_is_in_VTMS_transition; return (size_t)(c - space); }())); } + static ByteSize is_in_tmp_VTMS_transition_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_is_in_tmp_VTMS_transition; return (size_t)(c - space); }())); } + + + + JNIEnv* jni_environment() { return &_jni_environment; } + + + + + static JavaThread* thread_from_jni_environment(JNIEnv* env) { + JavaThread* current = reinterpret_cast(((intptr_t)env - in_bytes(jni_environment_offset()))); + + + + + + + + if (current->is_terminated()) { + current->block_if_vm_exited(); + } + return current; + } + + + bool in_critical() { return _jni_active_critical > 0; } + bool in_last_critical() { return _jni_active_critical == 1; } + inline void enter_critical(); + void exit_critical() { + ; + _jni_active_critical--; + ; + } + + + + + + + bool is_pending_jni_exception_check() const { return _pending_jni_exception_check_fn != nullptr; } + void clear_pending_jni_exception_check() { _pending_jni_exception_check_fn = nullptr; } + const char* get_pending_jni_exception_check() const { return _pending_jni_exception_check_fn; } + void set_pending_jni_exception_check(const char* fn_name) { _pending_jni_exception_check_fn = (char*) fn_name; } + + + int depth_first_number() { return _depth_first_number; } + void set_depth_first_number(int dfn) { _depth_first_number = dfn; } + + private: + void set_monitor_chunks(MonitorChunk* monitor_chunks) { _monitor_chunks = monitor_chunks; } + + public: + MonitorChunk* monitor_chunks() const { return _monitor_chunks; } + void add_monitor_chunk(MonitorChunk* chunk); + void remove_monitor_chunk(MonitorChunk* chunk); + bool in_deopt_handler() const { return _in_deopt_handler > 0; } + void inc_in_deopt_handler() { _in_deopt_handler++; } + void dec_in_deopt_handler() { + ; + if (_in_deopt_handler > 0) { + _in_deopt_handler--; + } + } + + private: + void set_entry_point(ThreadFunction entry_point) { _entry_point = entry_point; } + + + const char* get_thread_name_string(char* buf = nullptr, int buflen = 0) const; + + public: + + + void frames_do(void f(frame*, const RegisterMap*)); + + + void oops_do_frames(OopClosure* f, CodeBlobClosure* cf); + void oops_do_no_frames(OopClosure* f, CodeBlobClosure* cf); + + + virtual void nmethods_do(CodeBlobClosure* cf); + + + void metadata_do(MetadataClosure* f); + + + + + + const char* name() const; + const char* type_name() const { return "JavaThread"; } + static const char* name_for(oop thread_obj); + + void print_on(outputStream* st, bool print_extended_info) const; + void print_on(outputStream* st) const { print_on(st, false); } + void print() const; + void print_thread_state_on(outputStream*) const; + void print_on_error(outputStream* st, char* buf, int buflen) const; + void print_name_on_error(outputStream* st, char* buf, int buflen) const; + void verify(); + + + frame last_frame() { + _anchor.make_walkable(); + return pd_last_frame(); + } + javaVFrame* last_java_vframe(RegisterMap* reg_map) { return last_java_vframe(last_frame(), reg_map); } + + frame carrier_last_frame(RegisterMap* reg_map); + javaVFrame* carrier_last_java_vframe(RegisterMap* reg_map) { return last_java_vframe(carrier_last_frame(reg_map), reg_map); } + + frame vthread_last_frame(); + javaVFrame* vthread_last_java_vframe(RegisterMap* reg_map) { return last_java_vframe(vthread_last_frame(), reg_map); } + + frame platform_thread_last_frame(RegisterMap* reg_map); + javaVFrame* platform_thread_last_java_vframe(RegisterMap* reg_map) { + return last_java_vframe(platform_thread_last_frame(reg_map), reg_map); + } + + javaVFrame* last_java_vframe(const frame f, RegisterMap* reg_map); + + + + Klass* security_get_caller_class(int depth); + + + + void print_stack_on(outputStream* st); + void print_stack() { print_stack_on(tty); } + + void print_vthread_stack_on(outputStream* st); + + void print_active_stack_on(outputStream* st); + + + + void print_jni_stack(); + + + void trace_stack() {}; + void trace_stack_from(vframe* start_vf) {}; + void trace_frames() {}; + + + void print_frame_layout(int depth = 0, bool validate_only = false) {}; + void validate_frame_layout() { + print_frame_layout(0, true); + } + + + void deoptimize(); + void make_zombies(); + + void deoptimize_marked_methods(); + + public: + + static JavaThread* current() { + return JavaThread::cast(Thread::current()); + } + + + static inline JavaThread* current_or_null(); + + + static JavaThread* cast(Thread* t) { + ; + return static_cast(t); + } + + static const JavaThread* cast(const Thread* t) { + ; + return static_cast(t); + } + + + + + + static JavaThread* active(); + + protected: + virtual void pre_run(); + virtual void run(); + void thread_main_inner(); + virtual void post_run(); + + public: + + void set_jvmti_thread_state(JvmtiThreadState *value) { _jvmti_thread_state = value; } + + + + + + + + JvmtiThreadState *jvmti_thread_state() const { return _jvmti_thread_state; } + static ByteSize jvmti_thread_state_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_jvmti_thread_state; return (size_t)(c - space); }())); } + + + + JvmtiThreadState *rebind_to_jvmti_thread_state_of(oop thread_oop); +# 1026 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" + enum PopCondition { + popframe_inactive = 0x00, + popframe_pending_bit = 0x01, + popframe_processing_bit = 0x02, + popframe_force_deopt_reexecution_bit = 0x04 + }; + PopCondition popframe_condition() { return (PopCondition) _popframe_condition; } + void set_popframe_condition(PopCondition c) { _popframe_condition = c; } + void set_popframe_condition_bit(PopCondition c) { _popframe_condition |= c; } + void clear_popframe_condition() { _popframe_condition = popframe_inactive; } + static ByteSize popframe_condition_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_popframe_condition; return (size_t)(c - space); }())); } + bool has_pending_popframe() { return (popframe_condition() & popframe_pending_bit) != 0; } + bool popframe_forcing_deopt_reexecution() { return (popframe_condition() & popframe_force_deopt_reexecution_bit) != 0; } + + bool pop_frame_in_process(void) { return ((_popframe_condition & popframe_processing_bit) != 0); } + void set_pop_frame_in_process(void) { _popframe_condition |= popframe_processing_bit; } + void clr_pop_frame_in_process(void) { _popframe_condition &= ~popframe_processing_bit; } + + int frames_to_pop_failed_realloc() const { return _frames_to_pop_failed_realloc; } + void set_frames_to_pop_failed_realloc(int nb) { _frames_to_pop_failed_realloc = nb; } + void dec_frames_to_pop_failed_realloc() { _frames_to_pop_failed_realloc--; } + + private: + + + void* _popframe_preserved_args; + int _popframe_preserved_args_size; + + public: + void popframe_preserve_args(ByteSize size_in_bytes, void* start); + void* popframe_preserved_args(); + ByteSize popframe_preserved_args_size(); + WordSize popframe_preserved_args_size_in_words(); + void popframe_free_preserved_args(); + + + private: + JvmtiThreadState *_jvmti_thread_state; +# 1072 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" + int _interp_only_mode; + + public: + + static ByteSize interp_only_mode_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_interp_only_mode; return (size_t)(c - space); }())); } + bool is_interp_only_mode() { return (_interp_only_mode != 0); } + int get_interp_only_mode() { return _interp_only_mode; } + int set_interp_only_mode(int val) { return _interp_only_mode = val; } + void increment_interp_only_mode() { ++_interp_only_mode; } + void decrement_interp_only_mode() { --_interp_only_mode; } + + + + + private: + int _should_post_on_exceptions_flag; + + public: + void set_should_post_on_exceptions_flag(int val) { _should_post_on_exceptions_flag = val; } + + private: + ThreadStatistics *_thread_stat; + + public: + ThreadStatistics* get_thread_stat() const { return _thread_stat; } + + + oop current_park_blocker(); + + private: + static size_t _stack_size_at_create; + + public: + static inline size_t stack_size_at_create(void) { + return _stack_size_at_create; + } + static inline void set_stack_size_at_create(size_t value) { + _stack_size_at_create = value; + } + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/os_cpu/linux_riscv/javaThread_linux_riscv.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/os_cpu/linux_riscv/javaThread_linux_riscv.hpp" + private: + void pd_initialize() { + _anchor.clear(); + } + + frame pd_last_frame(); + + public: + static ByteSize last_Java_fp_offset() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_anchor; return (size_t)(c - space); }())) + JavaFrameAnchor::last_Java_fp_offset(); + } + + bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, + bool isInJava); + + bool pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava); +private: + bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava); +# 1114 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/javaThread.hpp" 2 + + + private: + Parker _parker; + public: + Parker* parker() { return &_parker; } + + public: + + bool is_attaching_via_jni() const { return _jni_attach_state == _attaching_via_jni; } + bool has_attached_via_jni() const { return is_attaching_via_jni() || _jni_attach_state == _attached_via_jni; } + inline void set_done_attaching_via_jni(); + + + + + void set_class_to_be_initialized(InstanceKlass* k); + InstanceKlass* class_to_be_initialized() const; + +private: + InstanceKlass* _class_to_be_initialized; + + + ParkEvent * _SleepEvent; +public: + bool sleep(jlong millis); + bool sleep_nanos(jlong nanos); + + + void interrupt(); + bool is_interrupted(bool clear_interrupted); + +private: + LockStack _lock_stack; + +public: + LockStack& lock_stack() { return _lock_stack; } + + static ByteSize lock_stack_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (JavaThread)]; JavaThread* dummyObj = (JavaThread*)space; char* c = (char*)(void*)&dummyObj->_lock_stack; return (size_t)(c - space); }())); } + + + + static ByteSize lock_stack_top_offset() { return lock_stack_offset() + LockStack::top_offset(); } + static ByteSize lock_stack_base_offset() { return lock_stack_offset() + LockStack::base_offset(); } + + static OopStorage* thread_oop_storage(); + + static void verify_cross_modify_fence_failure(JavaThread *thread) {}; + + + + + static Handle create_system_thread_object(const char* name, JavaThread* __the_thread__); + + + + static void start_internal_daemon(JavaThread* current, JavaThread* target, + Handle thread_oop, ThreadPriority prio); + + + + static void vm_exit_on_osthread_failure(JavaThread* thread); + + + private: + + static OopHandleList* _oop_handle_list; + + void add_oop_handles_for_release(); + + static void release_oop_handles(); + + + static bool has_oop_handles_to_release() { + return _oop_handle_list != nullptr; + } +}; + +inline JavaThread* JavaThread::current_or_null() { + Thread* current = Thread::current_or_null(); + return current != nullptr ? JavaThread::cast(current) : nullptr; +} + +class UnlockFlagSaver { + private: + JavaThread* _thread; + bool _do_not_unlock; + public: + UnlockFlagSaver(JavaThread* t) { + _thread = t; + _do_not_unlock = t->do_not_unlock_if_synchronized(); + t->set_do_not_unlock_if_synchronized(false); + } + ~UnlockFlagSaver() { + _thread->set_do_not_unlock_if_synchronized(_do_not_unlock); + } +}; + +class JNIHandleMark : public StackObj { + JavaThread* _thread; + public: + JNIHandleMark(JavaThread* thread) : _thread(thread) { + thread->push_jni_handle_block(); + } + ~JNIHandleMark() { _thread->pop_jni_handle_block(); } +}; +# 36 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" 2 + + + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrKlassExtension.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrKlassExtension.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.hpp" +class CallInfo; +class ClassFileParser; +class InstanceKlass; + + + + + +class JfrEventClassTransformer : AllStatic { + public: + static void on_klass_creation(InstanceKlass*& ik, ClassFileParser& parser, JavaThread* __the_thread__); + static bool is_instrumented(const InstanceKlass* ik); + static void set_force_instrumentation(bool force_instrumentation); + static bool is_force_instrumentation(); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrKlassExtension.hpp" 2 +# 42 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" 2 + + +class ConstantPool; +class DeoptimizationScope; +class klassItable; +class Monitor; +class RecordComponent; +# 63 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" +class BreakpointInfo; + +class ClassFileParser; +class ClassFileStream; +class KlassDepChange; +class DependencyContext; +class fieldDescriptor; +class jniIdMapBase; +class JNIid; +class JvmtiCachedClassFieldMap; +class nmethodBucket; +class OopMapCache; +class InterpreterOopMap; +class PackageEntry; +class ModuleEntry; + + +class FieldClosure: public StackObj { +public: + virtual void do_field(fieldDescriptor* fd) = 0; +}; + + + +class FieldPrinter: public FieldClosure { + oop _obj; + outputStream* _st; + public: + FieldPrinter(outputStream* st, oop obj = nullptr) : _obj(obj), _st(st) {} + void do_field(fieldDescriptor* fd); +}; + + +class OopMapBlock { + public: + + int offset() const { return _offset; } + void set_offset(int offset) { _offset = offset; } + + + uint count() const { return _count; } + void set_count(uint count) { _count = count; } + + void increment_count(int diff) { _count += diff; } + + int offset_span() const { return _count * heapOopSize; } + + int end_offset() const { + return offset() + offset_span(); + } + + bool is_contiguous(int another_offset) const { + return another_offset == end_offset(); + } + + + static int size_in_words() { + return align_up((int)sizeof(OopMapBlock), wordSize) >> + LogBytesPerWord; + } + + static int compare_offset(const OopMapBlock* a, const OopMapBlock* b) { + return a->offset() - b->offset(); + } + + private: + int _offset; + uint _count; +}; + +struct JvmtiCachedClassFileData; + +class InstanceKlass: public Klass { + friend class VMStructs; + friend class JVMCIVMStructs; + friend class ClassFileParser; + friend class CompileReplay; + + public: + static const KlassKind Kind = InstanceKlassKind; + + protected: + InstanceKlass(const ClassFileParser& parser, KlassKind kind = Kind, ReferenceType reference_type = REF_NONE); + + public: + InstanceKlass() { ; } + + + + enum ClassState : u1 { + allocated, + loaded, + being_linked, + linked, + being_initialized, + fully_initialized, + initialization_error + }; + + private: + static InstanceKlass* allocate_instance_klass(const ClassFileParser& parser, JavaThread* __the_thread__); + + protected: + + + + + Annotations* _annotations; + + PackageEntry* _package_entry; + + ObjArrayKlass* volatile _array_klasses; + + ConstantPool* _constants; +# 188 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" + Array* _inner_classes; + + + + + Array* _nest_members; + + + + + + + InstanceKlass* _nest_host; + + + + Array* _permitted_subclasses; + + + Array* _record_components; + + + + + const char* _source_debug_extension; + + + + int _nonstatic_field_size; + int _static_field_size; + int _nonstatic_oop_map_size; + int _itable_len; + + + + u2 _nest_host_index; + u2 _this_class_index; + u2 _static_oop_field_count; + + volatile u2 _idnum_allocated_count; + + volatile ClassState _init_state; + + u1 _reference_type; + + + InstanceKlassFlags _misc_flags; + + Monitor* _init_monitor; + JavaThread* volatile _init_thread; + + OopMapCache* volatile _oop_map_cache; + JNIid* _jni_ids; + jmethodID* volatile _methods_jmethod_ids; + nmethodBucket* volatile _dep_context; + uint64_t volatile _dep_context_last_cleaned; + nmethod* _osr_nmethods_head; + + BreakpointInfo* _breakpoints; + + InstanceKlass* _previous_versions; + + + JvmtiCachedClassFileData* _cached_class_file; + + + + JvmtiCachedClassFieldMap* _jvmti_cached_class_field_map; + + + + + + + Array* _methods; + + Array* _default_methods; + + Array* _local_interfaces; + + Array* _transitive_interfaces; + + Array* _method_ordering; + + + Array* _default_vtable_indices; + + + Array* _fieldinfo_stream; + Array* _fields_status; +# 292 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" + friend class SystemDictionary; + + static bool _disable_method_binary_search; + + + static bool _finalization_enabled; + + public: + + + static bool is_finalization_enabled() { return _finalization_enabled; } + + + static void set_finalization_enabled(bool val) { _finalization_enabled = val; } + + + bool is_shared_boot_class() const { return _misc_flags.is_shared_boot_class(); } + bool is_shared_platform_class() const { return _misc_flags.is_shared_platform_class(); } + bool is_shared_app_class() const { return _misc_flags.is_shared_app_class(); } + + bool is_shared_unregistered_class() const { return _misc_flags.is_shared_unregistered_class(); } + + + bool is_shareable() const; + + bool shared_loading_failed() const { return _misc_flags.shared_loading_failed(); } + + void set_shared_loading_failed() { _misc_flags.set_shared_loading_failed(true); } + + + void set_shared_class_loader_type(s2 loader_type) { _misc_flags.set_shared_class_loader_type(loader_type); } + void assign_class_loader_type() { _misc_flags.assign_class_loader_type(_class_loader_data); } + + + bool has_nonstatic_fields() const { return _misc_flags.has_nonstatic_fields(); } + void set_has_nonstatic_fields(bool b) { _misc_flags.set_has_nonstatic_fields(b); } + + bool has_localvariable_table() const { return _misc_flags.has_localvariable_table(); } + void set_has_localvariable_table(bool b) { _misc_flags.set_has_localvariable_table(b); } + + + int nonstatic_field_size() const { return _nonstatic_field_size; } + void set_nonstatic_field_size(int size) { _nonstatic_field_size = size; } + + int static_field_size() const { return _static_field_size; } + void set_static_field_size(int size) { _static_field_size = size; } + + int static_oop_field_count() const { return (int)_static_oop_field_count; } + void set_static_oop_field_count(u2 size) { _static_oop_field_count = size; } + + + int itable_length() const { return _itable_len; } + void set_itable_length(int len) { _itable_len = len; } + + + ObjArrayKlass* array_klasses() const { return _array_klasses; } + inline ObjArrayKlass* array_klasses_acquire() const; + inline void release_set_array_klasses(ObjArrayKlass* k); + void set_array_klasses(ObjArrayKlass* k) { _array_klasses = k; } + + + Array* methods() const { return _methods; } + void set_methods(Array* a) { _methods = a; } + Method* method_with_idnum(int idnum); + Method* method_with_orig_idnum(int idnum); + Method* method_with_orig_idnum(int idnum, int version); + + + Array* method_ordering() const { return _method_ordering; } + void set_method_ordering(Array* m) { _method_ordering = m; } + void copy_method_ordering(const intArray* m, JavaThread* __the_thread__); + + + Array* default_methods() const { return _default_methods; } + void set_default_methods(Array* a) { _default_methods = a; } + + + Array* default_vtable_indices() const { return _default_vtable_indices; } + void set_default_vtable_indices(Array* v) { _default_vtable_indices = v; } + Array* create_new_default_vtable_indices(int len, JavaThread* __the_thread__); + + + Array* local_interfaces() const { return _local_interfaces; } + void set_local_interfaces(Array* a) { + do { if (!(_local_interfaces == nullptr || a == nullptr)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/share/oops/instanceKlass.hpp", 376, "guarantee(" "_local_interfaces == nullptr || a == nullptr" ") failed", "Just checking"); } } while (0); + _local_interfaces = a; } + + Array* transitive_interfaces() const { return _transitive_interfaces; } + void set_transitive_interfaces(Array* a) { + do { if (!(_transitive_interfaces == nullptr || a == nullptr)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/share/oops/instanceKlass.hpp", 381, "guarantee(" "_transitive_interfaces == nullptr || a == nullptr" ") failed", "Just checking"); } } while (0); + _transitive_interfaces = a; + } + + private: + friend class fieldDescriptor; + FieldInfo field(int index) const; + + public: + int field_offset (int index) const { return field(index).offset(); } + int field_access_flags(int index) const { return field(index).access_flags().as_int(); } + FieldInfo::FieldFlags field_flags(int index) const { return field(index).field_flags(); } + FieldStatus field_status(int index) const { return fields_status()->at(index); } + inline Symbol* field_name (int index) const; + inline Symbol* field_signature (int index) const; + + + int java_fields_count() const; + int total_fields_count() const; + + Array* fieldinfo_stream() const { return _fieldinfo_stream; } + void set_fieldinfo_stream(Array* fis) { _fieldinfo_stream = fis; } + + Array* fields_status() const {return _fields_status; } + void set_fields_status(Array* array) { _fields_status = array; } + + + Array* inner_classes() const { return _inner_classes; } + void set_inner_classes(Array* f) { _inner_classes = f; } + + + Array* nest_members() const { return _nest_members; } + void set_nest_members(Array* m) { _nest_members = m; } + + + jushort nest_host_index() const { return _nest_host_index; } + void set_nest_host_index(u2 i) { _nest_host_index = i; } + + void set_nest_host(InstanceKlass* host); + + + Array* record_components() const { return _record_components; } + void set_record_components(Array* record_components) { + _record_components = record_components; + } + bool is_record() const; + + + Array* permitted_subclasses() const { return _permitted_subclasses; } + void set_permitted_subclasses(Array* s) { _permitted_subclasses = s; } + +private: + + + bool has_nest_member(JavaThread* current, InstanceKlass* k) const; + +public: + + InstanceKlass* nest_host_not_null() { + ; + return _nest_host; + } + + + + const char* nest_host_error(); + + + InstanceKlass* nest_host(JavaThread* __the_thread__); + + bool has_nestmate_access_to(InstanceKlass* k, JavaThread* __the_thread__); + + + bool has_as_permitted_subclass(const InstanceKlass* k) const; + + enum InnerClassAttributeOffset { + + inner_class_inner_class_info_offset = 0, + inner_class_outer_class_info_offset = 1, + inner_class_inner_name_offset = 2, + inner_class_access_flags_offset = 3, + inner_class_next_offset = 4 + }; + + enum EnclosingMethodAttributeOffset { + enclosing_method_class_index_offset = 0, + enclosing_method_method_index_offset = 1, + enclosing_method_attribute_size = 2 + }; + + + PackageEntry* package() const { return _package_entry; } + ModuleEntry* module() const; + bool in_unnamed_package() const { return (_package_entry == nullptr); } + void set_package(ClassLoaderData* loader_data, PackageEntry* pkg_entry, JavaThread* __the_thread__); + + + + + + + + void set_classpath_index(s2 path_index); + bool is_same_class_package(const Klass* class2) const; + bool is_same_class_package(oop other_class_loader, const Symbol* other_class_name) const; + + + InstanceKlass* compute_enclosing_class(bool* inner_is_member, JavaThread* __the_thread__) const; + + + bool find_inner_classes_attr(int* ooff, int* noff, JavaThread* __the_thread__) const; + + private: + + static void check_prohibited_package(Symbol* class_name, + ClassLoaderData* loader_data, + JavaThread* __the_thread__); + public: + + bool is_loaded() const { return init_state() >= loaded; } + bool is_linked() const { return init_state() >= linked; } + bool is_being_linked() const { return init_state() == being_linked; } + bool is_initialized() const { return init_state() == fully_initialized; } + bool is_not_initialized() const { return init_state() < being_initialized; } + bool is_being_initialized() const { return init_state() == being_initialized; } + bool is_in_error_state() const { return init_state() == initialization_error; } + bool is_init_thread(JavaThread *thread) { return thread == Atomic::load(&_init_thread); } + ClassState init_state() const { return Atomic::load(&_init_state); } + const char* init_state_name() const; + bool is_rewritten() const { return _misc_flags.rewritten(); } + + class LockLinkState : public StackObj { + InstanceKlass* _ik; + JavaThread* _current; + public: + LockLinkState(InstanceKlass* ik, JavaThread* current) : _ik(ik), _current(current) { + ik->check_link_state_and_wait(current); + } + ~LockLinkState() { + if (!_ik->is_linked()) { + + _ik->set_initialization_state_and_notify(loaded, _current); + } + } + }; + + + bool is_sealed() const; + + + bool should_verify_class() const { return _misc_flags.should_verify_class(); } + void set_should_verify_class(bool value) { _misc_flags.set_should_verify_class(value); } + + + bool is_marked_dependent() const { return _misc_flags.is_marked_dependent(); } + void set_is_marked_dependent(bool value) { _misc_flags.set_is_marked_dependent(value); } + + + bool should_be_initialized() const; + void initialize(JavaThread* __the_thread__); + void link_class(JavaThread* __the_thread__); + bool link_class_or_fail(JavaThread* __the_thread__); + void rewrite_class(JavaThread* __the_thread__); + void link_methods(JavaThread* __the_thread__); + Method* class_initializer() const; + + + ReferenceType reference_type() const { return (ReferenceType)_reference_type; } + + + u2 this_class_index() const { return _this_class_index; } + void set_this_class_index(u2 index) { _this_class_index = index; } + + static ByteSize reference_type_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (InstanceKlass)]; InstanceKlass* dummyObj = (InstanceKlass*)space; char* c = (char*)(void*)&dummyObj->_reference_type; return (size_t)(c - space); }())); } + + + bool find_local_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const; + + Klass* find_interface_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const; + + Klass* find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const; + + Klass* find_field(Symbol* name, Symbol* sig, bool is_static, fieldDescriptor* fd) const; + + + bool contains_field_offset(int offset); + + bool find_local_field_from_offset(int offset, bool is_static, fieldDescriptor* fd) const; + bool find_field_from_offset(int offset, bool is_static, fieldDescriptor* fd) const; + + private: + inline static int quick_search(const Array* methods, const Symbol* name); + + public: + static void disable_method_binary_search() { + _disable_method_binary_search = true; + } + + + Method* find_method(const Symbol* name, const Symbol* signature) const; + static Method* find_method(const Array* methods, + const Symbol* name, + const Symbol* signature); + + + Method* find_instance_method(const Symbol* name, const Symbol* signature, + PrivateLookupMode private_mode) const; + static Method* find_instance_method(const Array* methods, + const Symbol* name, + const Symbol* signature, + PrivateLookupMode private_mode); + + + Method* find_local_method(const Symbol* name, + const Symbol* signature, + OverpassLookupMode overpass_mode, + StaticLookupMode static_mode, + PrivateLookupMode private_mode) const; + + + static Method* find_local_method(const Array* methods, + const Symbol* name, + const Symbol* signature, + OverpassLookupMode overpass_mode, + StaticLookupMode static_mode, + PrivateLookupMode private_mode); + + + static int find_method_index(const Array* methods, + const Symbol* name, + const Symbol* signature, + OverpassLookupMode overpass_mode, + StaticLookupMode static_mode, + PrivateLookupMode private_mode); + + + Method* uncached_lookup_method(const Symbol* name, + const Symbol* signature, + OverpassLookupMode overpass_mode, + PrivateLookupMode private_mode = PrivateLookupMode::find) const; + + + + Method* lookup_method_in_all_interfaces(Symbol* name, Symbol* signature, DefaultsLookupMode defaults_mode) const; + + + + Method* lookup_method_in_ordered_interfaces(Symbol* name, Symbol* signature) const; + + + + + + int find_method_by_name(const Symbol* name, int* end) const; + static int find_method_by_name(const Array* methods, + const Symbol* name, int* end); + + + ConstantPool* constants() const { return _constants; } + void set_constants(ConstantPool* c) { _constants = c; } + + + oop protection_domain() const; + + + objArrayOop signers() const; + + bool is_contended() const { return _misc_flags.is_contended(); } + void set_is_contended(bool value) { _misc_flags.set_is_contended(value); } + + + Symbol* source_file_name() const; + u2 source_file_name_index() const; + void set_source_file_name_index(u2 sourcefile_index); + + + u2 minor_version() const; + void set_minor_version(u2 minor_version); + u2 major_version() const; + void set_major_version(u2 major_version); + + + const char* source_debug_extension() const { return _source_debug_extension; } + void set_source_debug_extension(const char* array, int length); + + + static int nonstatic_oop_map_size(unsigned int oop_map_count) { + return oop_map_count * OopMapBlock::size_in_words(); + } + unsigned int nonstatic_oop_map_count() const { + return _nonstatic_oop_map_size / OopMapBlock::size_in_words(); + } + int nonstatic_oop_map_size() const { return _nonstatic_oop_map_size; } + void set_nonstatic_oop_map_size(int words) { + _nonstatic_oop_map_size = words; + } + + bool has_contended_annotations() const { return _misc_flags.has_contended_annotations(); } + void set_has_contended_annotations(bool value) { _misc_flags.set_has_contended_annotations(value); } + + + + + + bool is_being_redefined() const { return _misc_flags.is_being_redefined(); } + void set_is_being_redefined(bool value) { _misc_flags.set_is_being_redefined(value); } + + + void add_previous_version(InstanceKlass* ik, int emcp_method_count); + void purge_previous_version_list(); + + InstanceKlass* previous_versions() const { return _previous_versions; } + + + + + InstanceKlass* get_klass_version(int version); + + bool has_been_redefined() const { return _misc_flags.has_been_redefined(); } + void set_has_been_redefined() { _misc_flags.set_has_been_redefined(true); } + + bool is_scratch_class() const { return _misc_flags.is_scratch_class(); } + void set_is_scratch_class() { _misc_flags.set_is_scratch_class(true); } + + bool has_resolved_methods() const { return _misc_flags.has_resolved_methods(); } + void set_has_resolved_methods() { _misc_flags.set_has_resolved_methods(true); } + void set_has_resolved_methods(bool value) { _misc_flags.set_has_resolved_methods(value); } + +public: + + + void init_previous_versions() { + _previous_versions = nullptr; + } + + private: + static bool _should_clean_previous_versions; + public: + static void purge_previous_versions(InstanceKlass* ik) { + if (ik->has_been_redefined()) { + ik->purge_previous_version_list(); + } + } + + static bool should_clean_previous_versions_and_reset(); + static bool should_clean_previous_versions() { return _should_clean_previous_versions; } + + + void set_cached_class_file(JvmtiCachedClassFileData *data) { + _cached_class_file = data; + } + JvmtiCachedClassFileData * get_cached_class_file(); + jint get_cached_class_file_len(); + unsigned char * get_cached_class_file_bytes(); + + + void set_jvmti_cached_class_field_map(JvmtiCachedClassFieldMap* descriptor) { + _jvmti_cached_class_field_map = descriptor; + } + JvmtiCachedClassFieldMap* jvmti_cached_class_field_map() const { + return _jvmti_cached_class_field_map; + } +# 755 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.hpp" + bool has_nonstatic_concrete_methods() const { return _misc_flags.has_nonstatic_concrete_methods(); } + void set_has_nonstatic_concrete_methods(bool b) { _misc_flags.set_has_nonstatic_concrete_methods(b); } + + bool declares_nonstatic_concrete_methods() const { return _misc_flags.declares_nonstatic_concrete_methods(); } + void set_declares_nonstatic_concrete_methods(bool b) { _misc_flags.set_declares_nonstatic_concrete_methods(b); } + + bool has_vanilla_constructor() const { return _misc_flags.has_vanilla_constructor(); } + void set_has_vanilla_constructor() { _misc_flags.set_has_vanilla_constructor(true); } + bool has_miranda_methods () const { return _misc_flags.has_miranda_methods(); } + void set_has_miranda_methods() { _misc_flags.set_has_miranda_methods(true); } + bool has_final_method() const { return _misc_flags.has_final_method(); } + void set_has_final_method() { _misc_flags.set_has_final_method(true); } + + + inline u2 next_method_idnum(); + void set_initial_method_idnum(u2 value) { _idnum_allocated_count = value; } + + + Symbol* generic_signature() const; + u2 generic_signature_index() const; + void set_generic_signature_index(u2 sig_index); + + u2 enclosing_method_data(int offset) const; + u2 enclosing_method_class_index() const { + return enclosing_method_data(enclosing_method_class_index_offset); + } + u2 enclosing_method_method_index() { + return enclosing_method_data(enclosing_method_method_index_offset); + } + void set_enclosing_method_indices(u2 class_index, + u2 method_index); + + + jmethodID get_jmethod_id(const methodHandle& method_h); + jmethodID get_jmethod_id_fetch_or_update(size_t idnum, + jmethodID new_id, jmethodID* new_jmeths, + jmethodID* to_dealloc_id_p, + jmethodID** to_dealloc_jmeths_p); + static void get_jmethod_id_length_value(jmethodID* cache, size_t idnum, + size_t *length_p, jmethodID* id_p); + void ensure_space_for_methodids(int start_offset = 0); + jmethodID jmethod_id_or_null(Method* method); + + + Annotations* annotations() const { return _annotations; } + void set_annotations(Annotations* anno) { _annotations = anno; } + + AnnotationArray* class_annotations() const { + return (_annotations != nullptr) ? _annotations->class_annotations() : nullptr; + } + Array* fields_annotations() const { + return (_annotations != nullptr) ? _annotations->fields_annotations() : nullptr; + } + AnnotationArray* class_type_annotations() const { + return (_annotations != nullptr) ? _annotations->class_type_annotations() : nullptr; + } + Array* fields_type_annotations() const { + return (_annotations != nullptr) ? _annotations->fields_type_annotations() : nullptr; + } + + instanceOop allocate_instance(JavaThread* __the_thread__); + static instanceOop allocate_instance(oop cls, JavaThread* __the_thread__); + + + instanceHandle allocate_instance_handle(JavaThread* __the_thread__); + + objArrayOop allocate_objArray(int n, int length, JavaThread* __the_thread__); + + static instanceOop register_finalizer(instanceOop i, JavaThread* __the_thread__); + + + + virtual void check_valid_for_instantiation(bool throwError, JavaThread* __the_thread__); + + + void call_class_initializer(JavaThread* __the_thread__); + void set_initialization_state_and_notify(ClassState state, JavaThread* current); + + + OopMapCache* oop_map_cache() { return _oop_map_cache; } + void set_oop_map_cache(OopMapCache *cache) { _oop_map_cache = cache; } + void mask_for(const methodHandle& method, int bci, InterpreterOopMap* entry); + + + JNIid* jni_ids() { return _jni_ids; } + void set_jni_ids(JNIid* ids) { _jni_ids = ids; } + JNIid* jni_id_for(int offset); + + + inline DependencyContext dependencies(); + void mark_dependent_nmethods(DeoptimizationScope* deopt_scope, KlassDepChange& changes); + void add_dependent_nmethod(nmethod* nm); + void clean_dependency_context(); + + void add_to_hierarchy(JavaThread* current); + + + nmethod* osr_nmethods_head() const { return _osr_nmethods_head; }; + void set_osr_nmethods_head(nmethod* h) { _osr_nmethods_head = h; }; + void add_osr_nmethod(nmethod* n); + bool remove_osr_nmethod(nmethod* n); + int mark_osr_nmethods(DeoptimizationScope* deopt_scope, const Method* m); + nmethod* lookup_osr_nmethod(const Method* m, int bci, int level, bool match_level) const; + + + + BreakpointInfo* breakpoints() const { return _breakpoints; }; + void set_breakpoints(BreakpointInfo* bps) { _breakpoints = bps; }; + + + + static ByteSize init_state_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (InstanceKlass)]; InstanceKlass* dummyObj = (InstanceKlass*)space; char* c = (char*)(void*)&dummyObj->_init_state; return (size_t)(c - space); }())); } + static ByteSize trace_id_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (InstanceKlass)]; InstanceKlass* dummyObj = (InstanceKlass*)space; char* c = (char*)(void*)&dummyObj->_trace_id; return (size_t)(c - space); }())); }; + static ByteSize init_thread_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (InstanceKlass)]; InstanceKlass* dummyObj = (InstanceKlass*)space; char* c = (char*)(void*)&dummyObj->_init_thread; return (size_t)(c - space); }())); } + + + bool implements_interface(Klass* k) const; + bool is_same_or_direct_interface(Klass* k) const; + + + + + + + + InstanceKlass* implementor() const; + void set_implementor(InstanceKlass* ik); + int nof_implementors() const; + void add_implementor(InstanceKlass* ik); + void init_implementor(); + + private: + + void process_interfaces(); + + public: + + GrowableArray* compute_secondary_supers(int num_extra_slots, + Array* transitive_interfaces); + bool can_be_primary_super_slow() const; + size_t oop_size(oop obj) const { return size_helper(); } + + + + + + void do_local_static_fields(FieldClosure* cl); + void do_nonstatic_fields(FieldClosure* cl); + void do_local_static_fields(void f(fieldDescriptor*, Handle, JavaThread* __the_thread__), Handle, JavaThread* __the_thread__); + void print_nonstatic_fields(FieldClosure* cl); + + void methods_do(void f(Method* method)); + + static InstanceKlass* cast(Klass* k) { + return const_cast(cast(const_cast(k))); + } + + static const InstanceKlass* cast(const Klass* k) { + ; + ; + return static_cast(k); + } + + virtual InstanceKlass* java_super() const { + return (super() == nullptr) ? nullptr : cast(super()); + } + + + static int header_size() { return sizeof(InstanceKlass)/wordSize; } + + static int size(int vtable_length, int itable_length, + int nonstatic_oop_map_size, + bool is_interface) { + return align_metadata_size(header_size() + + vtable_length + + itable_length + + nonstatic_oop_map_size + + (is_interface ? (int)sizeof(Klass*)/wordSize : 0)); + } + + int size() const { return size(vtable_length(), + itable_length(), + nonstatic_oop_map_size(), + is_interface()); + } + + + inline intptr_t* start_of_itable() const; + inline intptr_t* end_of_itable() const; + inline oop static_field_base_raw(); + + inline OopMapBlock* start_of_nonstatic_oop_maps() const; + inline Klass** end_of_nonstatic_oop_maps() const; + + inline InstanceKlass* volatile* adr_implementor() const; + + + int size_helper() const { + return layout_helper_to_size_helper(layout_helper()); + } + + + + + + + + bool can_be_fastpath_allocated() const { + return !layout_helper_needs_slow_path(layout_helper()); + } + + + klassItable itable() const; + Method* method_at_itable(InstanceKlass* holder, int index, JavaThread* __the_thread__); + Method* method_at_itable_or_null(InstanceKlass* holder, int index, bool& itable_entry_found); + int vtable_index_of_interface_method(Method* method); + + + void adjust_default_methods(bool* trace_name_printed); + + + void clean_weak_instanceklass_links(); + private: + void clean_implementors_list(); + void clean_method_data(); + + public: + + + + void deallocate_contents(ClassLoaderData* loader_data); + static void deallocate_methods(ClassLoaderData* loader_data, + Array* methods); + void static deallocate_interfaces(ClassLoaderData* loader_data, + const Klass* super_klass, + Array* local_interfaces, + Array* transitive_interfaces); + void static deallocate_record_components(ClassLoaderData* loader_data, + Array* record_component); + + virtual bool on_stack() const; + + + static void unload_class(InstanceKlass* ik); + + virtual void release_C_heap_structures(bool release_sub_metadata = true); + + + const char* signature_name() const; + + + + + + + public: + + template + inline void oop_oop_iterate_oop_maps(oop obj, OopClosureType* closure); + + + template + inline void oop_oop_iterate(oop obj, OopClosureType* closure); + + + template + inline void oop_oop_iterate_oop_map(OopMapBlock* map, oop obj, OopClosureType* closure); + + + + + template + inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure); + + private: + + template + inline void oop_oop_iterate_oop_maps_reverse(oop obj, OopClosureType* closure); + + + template + inline void oop_oop_iterate_oop_map_reverse(OopMapBlock* map, oop obj, OopClosureType* closure); + + + + public: + + template + inline void oop_oop_iterate_oop_maps_bounded(oop obj, OopClosureType* closure, MemRegion mr); + + + template + inline void oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr); + + private: + + template + inline void oop_oop_iterate_oop_map_bounded(OopMapBlock* map, oop obj, OopClosureType* closure, MemRegion mr); + + + public: + u2 idnum_allocated_count() const { return _idnum_allocated_count; } + + private: + + void set_init_state(ClassState state); + void set_rewritten() { _misc_flags.set_rewritten(true); } + void set_init_thread(JavaThread *thread) { + + ; + Atomic::store(&_init_thread, thread); + } + + + + + + bool idnum_can_increment() const { return has_been_redefined(); } + inline jmethodID* methods_jmethod_ids_acquire() const; + inline void release_set_methods_jmethod_ids(jmethodID* jmeths); + + +public: + + virtual ArrayKlass* array_klass(int n, JavaThread* __the_thread__); + virtual ArrayKlass* array_klass_or_null(int n); + + + virtual ArrayKlass* array_klass(JavaThread* __the_thread__); + virtual ArrayKlass* array_klass_or_null(); + + static void clean_initialization_error_table(); + + Monitor* init_monitor() const { return _init_monitor; } +private: + void check_link_state_and_wait(JavaThread* current); + bool link_class_impl (JavaThread* __the_thread__); + bool verify_code (JavaThread* __the_thread__); + void initialize_impl (JavaThread* __the_thread__); + void initialize_super_interfaces (JavaThread* __the_thread__); + + void add_initialization_error(JavaThread* current, Handle exception); + oop get_initialization_error(JavaThread* current); + + + Method* find_method_impl(const Symbol* name, + const Symbol* signature, + OverpassLookupMode overpass_mode, + StaticLookupMode static_mode, + PrivateLookupMode private_mode) const; + + static Method* find_method_impl(const Array* methods, + const Symbol* name, + const Symbol* signature, + OverpassLookupMode overpass_mode, + StaticLookupMode static_mode, + PrivateLookupMode private_mode); + + + + void link_previous_versions(InstanceKlass* pv) { _previous_versions = pv; } + void mark_newly_obsolete_methods(Array* old_methods, int emcp_method_count); + + + void log_to_classlist() const; +public: + + + + virtual void remove_unshareable_info(); + void remove_unshareable_flags(); + virtual void remove_java_mirror(); + void restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, PackageEntry* pkg_entry, JavaThread* __the_thread__); + void init_shared_package_entry(); + bool can_be_verified_at_dumptime() const; + bool methods_contain_jsr_bytecode() const; + void compute_has_loops_flag_for_methods(); + + + jint compute_modifier_flags() const; + +public: + + jint jvmti_class_status() const; + + virtual void metaspace_pointers_do(MetaspaceClosure* iter); + + public: + + void print_on(outputStream* st) const; + void print_value_on(outputStream* st) const; + + void oop_print_value_on(oop obj, outputStream* st); + + void oop_print_on (oop obj, outputStream* st); + + + + + + + + const char* internal_name() const; + + + void verify_on(outputStream* st); + + void oop_verify_on(oop obj, outputStream* st); + + + void print_class_load_logging(ClassLoaderData* loader_data, + const ModuleEntry* module_entry, + const ClassFileStream* cfs) const; + private: + void print_class_load_cause_logging() const; + void print_class_load_helper(ClassLoaderData* loader_data, + const ModuleEntry* module_entry, + const ClassFileStream* cfs) const; +}; + + + +inline u2 InstanceKlass::next_method_idnum() { + if (_idnum_allocated_count == ConstMethod::MAX_IDNUM) { + return ConstMethod::UNSET_IDNUM; + } else { + return _idnum_allocated_count++; + } +} + +class PrintClassClosure : public KlassClosure { +private: + outputStream* _st; + bool _verbose; +public: + PrintClassClosure(outputStream* st, bool verbose); + + void do_klass(Klass* k); +}; + + +class JNIid: public CHeapObj { + friend class VMStructs; + private: + Klass* _holder; + JNIid* _next; + int _offset; + + + + + public: + + Klass* holder() const { return _holder; } + int offset() const { return _offset; } + JNIid* next() { return _next; } + + JNIid(Klass* holder, int offset, JNIid* next); + + JNIid* find(int offset); + + bool find_local_field(fieldDescriptor* fd) { + return InstanceKlass::cast(holder())->find_local_field_from_offset(offset(), true, fd); + } + + static void deallocate(JNIid* id); + + + + + + void verify(Klass* holder); +}; + + + +class InnerClassesIterator : public StackObj { + private: + Array* _inner_classes; + int _length; + int _idx; + public: + + InnerClassesIterator(const InstanceKlass* k) { + _inner_classes = k->inner_classes(); + if (k->inner_classes() != nullptr) { + _length = _inner_classes->length(); + + + + + + + + ; + + if (_length % InstanceKlass::inner_class_next_offset == InstanceKlass::enclosing_method_attribute_size) { + _length -= InstanceKlass::enclosing_method_attribute_size; + } + } else { + _length = 0; + } + _idx = 0; + } + + int length() const { + return _length; + } + + void next() { + _idx += InstanceKlass::inner_class_next_offset; + } + + bool done() const { + return (_idx >= _length); + } + + u2 inner_class_info_index() const { + return _inner_classes->at( + _idx + InstanceKlass::inner_class_inner_class_info_offset); + } + + void set_inner_class_info_index(u2 index) { + _inner_classes->at_put( + _idx + InstanceKlass::inner_class_inner_class_info_offset, index); + } + + u2 outer_class_info_index() const { + return _inner_classes->at( + _idx + InstanceKlass::inner_class_outer_class_info_offset); + } + + void set_outer_class_info_index(u2 index) { + _inner_classes->at_put( + _idx + InstanceKlass::inner_class_outer_class_info_offset, index); + } + + u2 inner_name_index() const { + return _inner_classes->at( + _idx + InstanceKlass::inner_class_inner_name_offset); + } + + void set_inner_name_index(u2 index) { + _inner_classes->at_put( + _idx + InstanceKlass::inner_class_inner_name_offset, index); + } + + u2 inner_access_flags() const { + return _inner_classes->at( + _idx + InstanceKlass::inner_class_access_flags_offset); + } +}; + + + + + + + +class ClassHierarchyIterator : public StackObj { + private: + InstanceKlass* _root; + Klass* _current; + bool _visit_subclasses; + + public: + ClassHierarchyIterator(InstanceKlass* root) : _root(root), _current(root), _visit_subclasses(true) { + ; + } + + bool done() { + return (_current == nullptr); + } + + + + void next(); + + Klass* klass() { + ; + return _current; + } + + + void skip_subclasses() { + _visit_subclasses = false; + } +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/symbol.hpp" 1 +# 97 "/home/rehn/source/jdk/open/src/hotspot/share/oops/symbol.hpp" +class ClassLoaderData; + + + + + + +class Symbol : public MetaspaceObj { + friend class VMStructs; + friend class SymbolTable; + friend class vmSymbols; + friend class JVMCIVMStructs; + + private: + + + + volatile uint32_t _hash_and_refcount; + u2 _length; + u1 _body[2]; + + static Symbol* _vm_symbols[]; + + enum { + max_symbol_length = 0xffff + }; + + static int byte_size(int length) { + + return (int)(sizeof(Symbol) + (length > 2 ? length - 2 : 0)); + } + static int size(int length) { + + return (int)heap_word_size(byte_size(length)); + } + + Symbol(const u1* name, int length, int refcount); + + static short extract_hash(uint32_t value) { return (short)(value >> 16); } + static int extract_refcount(uint32_t value) { return value & 0xffff; } + static uint32_t pack_hash_and_refcount(short hash, int refcount); + + int length() const { return _length; } + + public: + Symbol(const Symbol& s1); + + + const u1* base() const { return &_body[0]; } + + int size() const { return size(utf8_length()); } + int byte_size() const { return byte_size(utf8_length()); }; + + size_t effective_length() const { return (size_t)byte_size() - sizeof(Symbol); } + + + static bool is_read_only_by_default() { return true; } + + + static int max_length() { return max_symbol_length; } + unsigned identity_hash() const { + unsigned addr_bits = (unsigned)((uintptr_t)this >> LogBytesPerWord); + return ((unsigned)extract_hash(_hash_and_refcount) & 0xffff) | + ((addr_bits ^ (length() << 8) ^ (( _body[0] << 8) | _body[1])) << 16); + } + + + int refcount() const { return extract_refcount(_hash_and_refcount); } + bool try_increment_refcount(); + void increment_refcount(); + void decrement_refcount(); + bool is_permanent() const { + return (refcount() == 0xffff); + } + void update_identity_hash() ; + void set_permanent() ; + void make_permanent(); + + static void maybe_increment_refcount(Symbol* s) { + if (s != nullptr) { + s->increment_refcount(); + } + } + static void maybe_decrement_refcount(Symbol* s) { + if (s != nullptr) { + s->decrement_refcount(); + } + } + + + + + char char_at(int index) const { + ; + return (char)base()[index]; + } + + const u1* bytes() const { return base(); } + + int utf8_length() const { return length(); } + + + bool equals(const char* str, int len) const { + int l = utf8_length(); + if (l != len) return false; + return contains_utf8_at(0, str, len); + } + bool equals(const char* str) const { return equals(str, (int) strlen(str)); } + bool is_star_match(const char* pattern) const; + + + bool starts_with(const char* prefix, int len) const { + return contains_utf8_at(0, prefix, len); + } + bool starts_with(const char* prefix) const { + return starts_with(prefix, (int) strlen(prefix)); + } + bool starts_with(char prefix_char) const { + return contains_byte_at(0, prefix_char); + } + + bool ends_with(const char* suffix, int len) const { + return contains_utf8_at(utf8_length() - len, suffix, len); + } + bool ends_with(const char* suffix) const { + return ends_with(suffix, (int) strlen(suffix)); + } + bool ends_with(char suffix_char) const { + return contains_byte_at(utf8_length() - 1, suffix_char); + } + + + + bool contains_utf8_at(int position, const char* substring, int len) const { + ; + if (position < 0) return false; + if (position + len > utf8_length()) return false; + return (memcmp((char*)base() + position, substring, len) == 0); + } + + + bool contains_byte_at(int position, char code_byte) const { + if (position < 0) return false; + if (position >= utf8_length()) return false; + return code_byte == char_at(position); + } + + + int index_of_at(int i, const char* substr, int substr_len) const; + + + + inline int fast_compare(const Symbol* other) const; + + + + char* as_C_string() const; + char* as_C_string(char* buf, int size) const; + + + char* as_quoted_ascii() const; + + + char* as_utf8() const { return as_C_string(); } + + jchar* as_unicode(int& length) const; + + + + + const char* as_klass_external_name() const; + const char* as_klass_external_name(char* buf, int size) const; + + + + + void print_as_signature_external_return_type(outputStream *os); + + + + void print_as_signature_external_parameters(outputStream *os); + void print_as_field_external_type(outputStream *os); + + void metaspace_pointers_do(MetaspaceClosure* it); + MetaspaceObj::Type type() const { return SymbolType; } + + + void print_symbol_on(outputStream* st = nullptr) const; + void print_utf8_on(outputStream* st) const; + void print_on(outputStream* st) const; + void print_value_on(outputStream* st) const; + + + void print() const; + void print_value() const; + + static bool is_valid(Symbol* s); + + static bool is_valid_id(vmSymbolID vm_symbol_id) { return true; }; + + static Symbol* vm_symbol_at(vmSymbolID vm_symbol_id) { + ; + return _vm_symbols[static_cast(vm_symbol_id)]; + } + + static unsigned int compute_hash(const Symbol* const& name) { + return (unsigned int) name->identity_hash(); + } +# 313 "/home/rehn/source/jdk/open/src/hotspot/share/oops/symbol.hpp" +}; + + + + + +int Symbol::fast_compare(const Symbol* other) const { + return (((uintptr_t)this < (uintptr_t)other) ? -1 + : ((uintptr_t)this == (uintptr_t) other) ? 0 : 1); +} +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.hpp" 2 + + + + + +class JvmtiThreadState; +class RecordComponent; +class SerializeClosure; + + + + + +class java_lang_Object : AllStatic { + public: + static void register_natives(JavaThread* __the_thread__); +}; +# 57 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.hpp" +class java_lang_String : AllStatic { + private: + static int _value_offset; + static int _hash_offset; + static int _hashIsZero_offset; + static int _coder_offset; + static int _flags_offset; + + static bool _initialized; + + static Handle basic_create(int length, bool byte_arr, JavaThread* __the_thread__); + + static inline void set_coder(oop string, jbyte coder); + + + static const uint8_t _deduplication_forbidden_mask = 1 << 0; + static const uint8_t _deduplication_requested_mask = 1 << 1; + + static int flags_offset() { ; return _flags_offset;; } + + static inline uint8_t* flags_addr(oop java_string); + + static inline bool is_flag_set(oop java_string, uint8_t flag_mask); + + + static bool test_and_set_flag(oop java_string, uint8_t flag_mask); + + static inline unsigned int hash_code_impl(oop java_string, bool update); + + public: + + + enum Coder { + CODER_LATIN1 = 0, + CODER_UTF16 = 1 + }; + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; + + + static Handle create_from_unicode(const jchar* unicode, int len, JavaThread* __the_thread__); + static oop create_oop_from_unicode(const jchar* unicode, int len, JavaThread* __the_thread__); + static Handle create_from_str(const char* utf8_str, JavaThread* __the_thread__); + static oop create_oop_from_str(const char* utf8_str, JavaThread* __the_thread__); + static Handle create_from_symbol(Symbol* symbol, JavaThread* __the_thread__); + static Handle create_from_platform_dependent_str(const char* str, JavaThread* __the_thread__); + + static void set_compact_strings(bool value); + + static int value_offset() { ; return _value_offset;; } + static int coder_offset() { ; return _coder_offset;; } + + static inline void set_value(oop string, typeArrayOop buffer); + + + + + + static inline void set_deduplication_forbidden(oop java_string); + + + + + + + static inline bool test_and_set_deduplication_requested(oop java_string); + + + static inline typeArrayOop value(oop java_string); + static inline typeArrayOop value_no_keepalive(oop java_string); + static inline bool hash_is_set(oop string); + static inline bool is_latin1(oop java_string); + static inline bool deduplication_forbidden(oop java_string); + static inline bool deduplication_requested(oop java_string); + static inline int length(oop java_string); + static inline int length(oop java_string, typeArrayOop string_value); + static int utf8_length(oop java_string); + static int utf8_length(oop java_string, typeArrayOop string_value); + + + static char* as_utf8_string(oop java_string); + static char* as_utf8_string(oop java_string, int& length); + static char* as_utf8_string_full(oop java_string, char* buf, int buflen, int& length); + static char* as_utf8_string(oop java_string, char* buf, int buflen); + static char* as_utf8_string(oop java_string, int start, int len); + static char* as_utf8_string(oop java_string, typeArrayOop value, char* buf, int buflen); + static char* as_utf8_string(oop java_string, typeArrayOop value, int start, int len, char* buf, int buflen); + static char* as_platform_dependent_str(Handle java_string, JavaThread* __the_thread__); + static jchar* as_unicode_string(oop java_string, int& length, JavaThread* __the_thread__); + static jchar* as_unicode_string_or_null(oop java_string, int& length); + + static char* as_quoted_ascii(oop java_string); +# 161 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.hpp" + static unsigned int hash_code(const jchar* s, int len) { + unsigned int h = 0; + while (len-- > 0) { + h = 31*h + (unsigned int) *s; + s++; + } + return h; + } + + static unsigned int hash_code(const jbyte* s, int len) { + unsigned int h = 0; + while (len-- > 0) { + h = 31*h + (((unsigned int) *s) & 0xFF); + s++; + } + return h; + } + + static unsigned int hash_code(oop java_string); + static unsigned int hash_code_noupdate(oop java_string); + + static bool equals(oop java_string, const jchar* chars, int len); + static bool equals(oop str1, oop str2); + static inline bool value_equals(typeArrayOop str_value1, typeArrayOop str_value2); + + + static Handle externalize_classname(Symbol* java_name, JavaThread* __the_thread__); + + + static Symbol* as_symbol(oop java_string); + static Symbol* as_symbol_or_null(oop java_string); + + + static inline bool is_instance(oop obj); + + + static void print(oop java_string, outputStream* st); + friend class JavaClasses; + friend class StringTable; +}; +# 214 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.hpp" +class java_lang_Class : AllStatic { + friend class VMStructs; + friend class JVMCIVMStructs; + + private: + + + + static int _klass_offset; + static int _array_klass_offset; + + static int _oop_size_offset; + static int _static_oop_field_count_offset; + + static int _protection_domain_offset; + static int _signers_offset; + static int _class_loader_offset; + static int _module_offset; + static int _component_mirror_offset; + static int _name_offset; + static int _source_file_offset; + static int _classData_offset; + static int _classRedefinedCount_offset; + + static bool _offsets_computed; + + static GrowableArray* _fixup_mirror_list; + static GrowableArray* _fixup_module_field_list; + + static void set_protection_domain(oop java_class, oop protection_domain); + static void set_class_loader(oop java_class, oop class_loader); + static void set_component_mirror(oop java_class, oop comp_mirror); + static void initialize_mirror_fields(Klass* k, Handle mirror, Handle protection_domain, + Handle classData, JavaThread* __the_thread__); + static void set_mirror_module_field(JavaThread* current, Klass* K, Handle mirror, Handle module); + public: + static void allocate_fixup_lists(); + static void compute_offsets(); + + + static void allocate_mirror(Klass* k, bool is_scratch, Handle protection_domain, Handle classData, + Handle& mirror, Handle& comp_mirror, JavaThread* __the_thread__); + static void create_mirror(Klass* k, Handle class_loader, Handle module, + Handle protection_domain, Handle classData, JavaThread* __the_thread__); + static void fixup_mirror(Klass* k, JavaThread* __the_thread__); + static oop create_basic_type_mirror(const char* basic_type_name, BasicType type, JavaThread* __the_thread__); + + + static void serialize_offsets(SerializeClosure* f) ; + static void create_scratch_mirror(Klass* k, JavaThread* __the_thread__) ; + static bool restore_archived_mirror(Klass *k, Handle class_loader, Handle module, + Handle protection_domain, + JavaThread* __the_thread__) ; + + static void fixup_module_field(Klass* k, Handle module); + + + static Klass* as_Klass(oop java_class); + static void set_klass(oop java_class, Klass* klass); + static BasicType as_BasicType(oop java_class, Klass** reference_klass = nullptr); + static Symbol* as_signature(oop java_class, bool intern_if_not_found); + static void print_signature(oop java_class, outputStream *st); + static const char* as_external_name(oop java_class); + + static bool is_instance(oop obj); + + static bool is_primitive(oop java_class); + static BasicType primitive_type(oop java_class); + static oop primitive_mirror(BasicType t); + + static Klass* array_klass_acquire(oop java_class); + static void release_set_array_klass(oop java_class, Klass* klass); + + static int klass_offset() { ; return _klass_offset;; } + static int array_klass_offset() { ; return _array_klass_offset;; } + + static int classRedefinedCount(oop the_class_mirror); + static void set_classRedefinedCount(oop the_class_mirror, int value); + + + static oop protection_domain(oop java_class); + static oop component_mirror(oop java_class); + static objArrayOop signers(oop java_class); + static void set_signers(oop java_class, objArrayOop signers); + static oop class_data(oop java_class); + static void set_class_data(oop java_class, oop classData); + + static int component_mirror_offset() { return _component_mirror_offset; } + + static oop class_loader(oop java_class); + static void set_module(oop java_class, oop module); + static oop module(oop java_class); + + static oop name(Handle java_class, JavaThread* __the_thread__); + + static oop source_file(oop java_class); + static void set_source_file(oop java_class, oop source_file); + + static size_t oop_size(oop java_class); + static void set_oop_size(HeapWord* java_class, size_t size); + static int static_oop_field_count(oop java_class); + static void set_static_oop_field_count(oop java_class, int size); + + static GrowableArray* fixup_mirror_list() { + return _fixup_mirror_list; + } + static void set_fixup_mirror_list(GrowableArray* v) { + _fixup_mirror_list = v; + } + + static GrowableArray* fixup_module_field_list() { + return _fixup_module_field_list; + } + static void set_fixup_module_field_list(GrowableArray* v) { + _fixup_module_field_list = v; + } + + + friend class JavaClasses; +}; +# 343 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.hpp" +class java_lang_Thread : AllStatic { + friend class java_lang_VirtualThread; + friend class JVMCIVMStructs; + private: + + + static int _holder_offset; + static int _name_offset; + static int _contextClassLoader_offset; + static int _inheritedAccessControlContext_offset; + static int _eetop_offset; + static int _jvmti_thread_state_offset; + static int _jvmti_VTMS_transition_disable_count_offset; + static int _jvmti_is_in_VTMS_transition_offset; + static int _interrupted_offset; + static int _tid_offset; + static int _continuation_offset; + static int _park_blocker_offset; + static int _scopedValueBindings_offset; + static int _jfr_epoch_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static JavaThread* thread(oop java_thread); + static JavaThread* thread_acquire(oop java_thread); + + static void set_thread(oop java_thread, JavaThread* thread); + static void release_set_thread(oop java_thread, JavaThread* thread); + + static oop holder(oop java_thread); + + static bool interrupted(oop java_thread); + static void set_interrupted(oop java_thread, bool val); + + static oop name(oop java_thread); + static void set_name(oop java_thread, oop name); + + static ThreadPriority priority(oop java_thread); + static void set_priority(oop java_thread, ThreadPriority priority); + + static oop threadGroup(oop java_thread); + + + static bool is_alive(oop java_thread); + + static bool is_daemon(oop java_thread); + static void set_daemon(oop java_thread); + + static oop context_class_loader(oop java_thread); + + static oop inherited_access_control_context(oop java_thread); + + static jlong stackSize(oop java_thread); + + static int64_t thread_id(oop java_thread); + static ByteSize thread_id_offset(); + + static inline oop continuation(oop java_thread); + + static JvmtiThreadState* jvmti_thread_state(oop java_thread); + static void set_jvmti_thread_state(oop java_thread, JvmtiThreadState* state); + static int VTMS_transition_disable_count(oop java_thread); + static void inc_VTMS_transition_disable_count(oop java_thread); + static void dec_VTMS_transition_disable_count(oop java_thread); + static bool is_in_VTMS_transition(oop java_thread); + static void set_is_in_VTMS_transition(oop java_thread, bool val); + static int is_in_VTMS_transition_offset(); + + + static void clear_scopedValueBindings(oop java_thread); + + + static oop park_blocker(oop java_thread); + + + static void set_thread_status(oop java_thread_oop, JavaThreadStatus status); + + static JavaThreadStatus get_thread_status(oop java_thread_oop); + + static const char* thread_status_name(oop java_thread_oop); + + + static oop async_get_stack_trace(oop java_thread, JavaThread* __the_thread__); + + static u2 jfr_epoch(oop java_thread); + static void set_jfr_epoch(oop java_thread, u2 epoch); + static int jfr_epoch_offset() { ; return _jfr_epoch_offset;; } + + + friend class JavaClasses; +}; + + + +class java_lang_Thread_FieldHolder : AllStatic { + private: + static int _group_offset; + static int _priority_offset; + static int _stackSize_offset; + static int _daemon_offset; + static int _thread_status_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + static oop threadGroup(oop holder); + + static ThreadPriority priority(oop holder); + static void set_priority(oop holder, ThreadPriority priority); + + static jlong stackSize(oop holder); + + static bool is_daemon(oop holder); + static void set_daemon(oop holder, bool val); + + static void set_thread_status(oop holder, JavaThreadStatus status); + static JavaThreadStatus get_thread_status(oop holder); + + friend class JavaClasses; +}; + + + +class java_lang_Thread_Constants : AllStatic { + private: + static int _static_VTHREAD_GROUP_offset; + static int _static_NOT_SUPPORTED_CLASSLOADER_offset; + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; + + public: + static oop get_VTHREAD_GROUP(); + + friend class JavaClasses; +}; + + + +class java_lang_ThreadGroup : AllStatic { + private: + static int _parent_offset; + static int _name_offset; + static int _maxPriority_offset; + static int _daemon_offset; + + static void compute_offsets(); + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static oop parent(oop java_thread_group); + + static const char* name(oop java_thread_group); + + static ThreadPriority maxPriority(oop java_thread_group); + + static bool is_daemon(oop java_thread_group); + + + friend class JavaClasses; +}; + + + + +class java_lang_VirtualThread : AllStatic { + private: + static int static_vthread_scope_offset; + static int _carrierThread_offset; + static int _continuation_offset; + static int _state_offset; + static int _jfr_epoch_offset; + public: + enum { + NEW = 0, + STARTED = 1, + RUNNABLE = 2, + RUNNING = 3, + PARKING = 4, + PARKED = 5, + PINNED = 6, + YIELDING = 7, + TERMINATED = 99, + + + SUSPENDED = 1 << 8, + RUNNABLE_SUSPENDED = (RUNNABLE | SUSPENDED), + PARKED_SUSPENDED = (PARKED | SUSPENDED) + }; + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; + + + static bool is_subclass(Klass* klass) { + return klass->is_subclass_of(vmClasses::VirtualThread_klass()); + } + static bool is_instance(oop obj); + + static oop vthread_scope(); + static oop carrier_thread(oop vthread); + static oop continuation(oop vthread); + static int state(oop vthread); + static JavaThreadStatus map_state_to_thread_status(int state); +}; + + + + +class java_lang_Throwable: AllStatic { + friend class BacktraceBuilder; + friend class BacktraceIterator; + + private: + + enum { + trace_methods_offset = 0, + trace_bcis_offset = 1, + trace_mirrors_offset = 2, + trace_names_offset = 3, + trace_conts_offset = 4, + trace_next_offset = 5, + trace_hidden_offset = 6, + trace_size = 7, + trace_chunk_size = 32 + }; + + static int _backtrace_offset; + static int _detailMessage_offset; + static int _stackTrace_offset; + static int _depth_offset; + static int _cause_offset; + static int _static_unassigned_stacktrace_offset; + + + static void clear_stacktrace(oop throwable); + + static void set_stacktrace(oop throwable, oop st_element_array); + static oop unassigned_stacktrace(); + + public: + + static oop backtrace(oop throwable); + static void set_backtrace(oop throwable, oop value); + static int depth(oop throwable); + static void set_depth(oop throwable, int value); + static int get_detailMessage_offset() { ; return _detailMessage_offset;; } + + static oop message(oop throwable); + static oop cause(oop throwable); + static void set_message(oop throwable, oop value); + static Symbol* detail_message(oop throwable); + static void print_stack_element(outputStream *st, Method* method, int bci); + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; + + + static void allocate_backtrace(Handle throwable, JavaThread* __the_thread__); + + static void fill_in_stack_trace_of_preallocated_backtrace(Handle throwable); + + static void fill_in_stack_trace(Handle throwable, const methodHandle& method, JavaThread* __the_thread__); + static void fill_in_stack_trace(Handle throwable, const methodHandle& method = methodHandle()); + + + static void get_stack_trace_elements(int depth, Handle backtrace, objArrayHandle stack_trace, JavaThread* __the_thread__); + + + static Handle create_initialization_error(JavaThread* current, Handle throwable); + + + static void print(oop throwable, outputStream* st); + static void print_stack_trace(Handle throwable, outputStream* st); + static void java_printStackTrace(Handle throwable, JavaThread* __the_thread__); + + friend class JavaClasses; + + static bool get_top_method_and_bci(oop throwable, Method** method, int* bci); +}; + + + + +class java_lang_reflect_AccessibleObject: AllStatic { + private: + + + static int _override_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static jboolean override(oop reflect); + static void set_override(oop reflect, jboolean value); + + + friend class JavaClasses; +}; + + + + +class java_lang_reflect_Method : public java_lang_reflect_AccessibleObject { + private: + + + static int _clazz_offset; + static int _name_offset; + static int _returnType_offset; + static int _parameterTypes_offset; + static int _exceptionTypes_offset; + static int _slot_offset; + static int _modifiers_offset; + static int _signature_offset; + static int _annotations_offset; + static int _parameter_annotations_offset; + static int _annotation_default_offset; + + static void compute_offsets(); + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static Handle create(JavaThread* __the_thread__); + + + static oop clazz(oop reflect); + static void set_clazz(oop reflect, oop value); + + static void set_name(oop method, oop value); + + static oop return_type(oop method); + static void set_return_type(oop method, oop value); + + static oop parameter_types(oop method); + static void set_parameter_types(oop method, oop value); + + static int slot(oop reflect); + static void set_slot(oop reflect, int value); + + static void set_exception_types(oop method, oop value); + static void set_modifiers(oop method, int value); + static void set_signature(oop method, oop value); + static void set_annotations(oop method, oop value); + static void set_parameter_annotations(oop method, oop value); + static void set_annotation_default(oop method, oop value); + + + friend class JavaClasses; +}; + + + + +class java_lang_reflect_Constructor : public java_lang_reflect_AccessibleObject { + private: + + + static int _clazz_offset; + static int _parameterTypes_offset; + static int _exceptionTypes_offset; + static int _slot_offset; + static int _modifiers_offset; + static int _signature_offset; + static int _annotations_offset; + static int _parameter_annotations_offset; + + static void compute_offsets(); + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static Handle create(JavaThread* __the_thread__); + + + static oop clazz(oop reflect); + static void set_clazz(oop reflect, oop value); + + static oop parameter_types(oop constructor); + static void set_parameter_types(oop constructor, oop value); + + static int slot(oop reflect); + static void set_slot(oop reflect, int value); + + static void set_exception_types(oop constructor, oop value); + static void set_modifiers(oop constructor, int value); + static void set_signature(oop constructor, oop value); + static void set_annotations(oop constructor, oop value); + static void set_parameter_annotations(oop method, oop value); + + + friend class JavaClasses; +}; + + + + +class java_lang_reflect_Field : public java_lang_reflect_AccessibleObject { + private: + + + static int _clazz_offset; + static int _name_offset; + static int _type_offset; + static int _slot_offset; + static int _modifiers_offset; + static int _trusted_final_offset; + static int _signature_offset; + static int _annotations_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static Handle create(JavaThread* __the_thread__); + + + static oop clazz(oop reflect); + static void set_clazz(oop reflect, oop value); + + static oop name(oop field); + static void set_name(oop field, oop value); + + static oop type(oop field); + static void set_type(oop field, oop value); + + static int slot(oop reflect); + static void set_slot(oop reflect, int value); + + static int modifiers(oop field); + static void set_modifiers(oop field, int value); + + static void set_trusted_final(oop field); + + static void set_signature(oop constructor, oop value); + static void set_annotations(oop constructor, oop value); + + + friend class JavaClasses; +}; + +class java_lang_reflect_Parameter { + private: + + + static int _name_offset; + static int _modifiers_offset; + static int _index_offset; + static int _executable_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static Handle create(JavaThread* __the_thread__); + + + static oop name(oop field); + static void set_name(oop field, oop value); + + static int index(oop reflect); + static void set_index(oop reflect, int value); + + static int modifiers(oop reflect); + static void set_modifiers(oop reflect, int value); + + static oop executable(oop constructor); + static void set_executable(oop constructor, oop value); + + friend class JavaClasses; +}; + + + + +class java_lang_Module { + private: + static int _loader_offset; + static int _name_offset; + static int _module_entry_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static Handle create(Handle loader, Handle module_name, JavaThread* __the_thread__); + + + static bool is_instance(oop obj); + + + static oop loader(oop module); + static void set_loader(oop module, oop value); + + static oop name(oop module); + static void set_name(oop module, oop value); + + static ModuleEntry* module_entry(oop module); + static ModuleEntry* module_entry_raw(oop module); + static void set_module_entry(oop module, ModuleEntry* module_entry); + + friend class JavaClasses; +}; + + +class reflect_ConstantPool { + private: + + + static int _oop_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static Handle create(JavaThread* __the_thread__); + + + static void set_cp(oop reflect, ConstantPool* value); + static int oop_offset() { ; return _oop_offset;; } + + static ConstantPool* get_cp(oop reflect); + + + friend class JavaClasses; +}; +# 902 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.hpp" +class java_lang_boxing_object: AllStatic { + private: + static int _value_offset; + static int _long_value_offset; + + static void compute_offsets(); + static oop initialize_and_allocate(BasicType type, JavaThread* __the_thread__); + public: + + static oop create(BasicType type, jvalue* value, JavaThread* __the_thread__); + + static BasicType get_value(oop box, jvalue* value); + static BasicType set_value(oop box, jvalue* value); + static BasicType basic_type(oop box); + static bool is_instance(oop box) { return basic_type(box) != T_ILLEGAL; } + static bool is_instance(oop box, BasicType type) { return basic_type(box) == type; } + static void print(oop box, outputStream* st) { jvalue value; print(get_value(box, &value), &value, st); } + static void print(BasicType type, jvalue* value, outputStream* st); + + static int value_offset(BasicType type) { + return is_double_word_type(type) ? _long_value_offset : _value_offset; + } + + static void serialize_offsets(SerializeClosure* f); + + + friend class JavaClasses; +}; + + + + + +class java_lang_ref_Reference: AllStatic { + static int _referent_offset; + static int _queue_offset; + static int _next_offset; + static int _discovered_offset; + + static bool _offsets_initialized; + + public: + + static inline oop weak_referent_no_keepalive(oop ref); + static inline oop weak_referent(oop ref); + static inline oop phantom_referent_no_keepalive(oop ref); + static inline oop unknown_referent_no_keepalive(oop ref); + static inline void clear_referent(oop ref); + static inline void clear_referent_raw(oop ref); + static inline HeapWord* referent_addr_raw(oop ref); + static inline oop next(oop ref); + static inline void set_next(oop ref, oop value); + static inline void set_next_raw(oop ref, oop value); + static inline HeapWord* next_addr_raw(oop ref); + static inline oop discovered(oop ref); + static inline void set_discovered(oop ref, oop value); + static inline void set_discovered_raw(oop ref, oop value); + static inline HeapWord* discovered_addr_raw(oop ref); + static bool is_referent_field(oop obj, ptrdiff_t offset); + static inline bool is_final(oop ref); + static inline bool is_phantom(oop ref); + static inline bool is_weak(oop ref); + static inline bool is_soft(oop ref); + + static int referent_offset() { ; return _referent_offset;; } + static int queue_offset() { ; return _queue_offset;; } + static int next_offset() { ; return _next_offset;; } + static int discovered_offset() { ; return _discovered_offset;; } + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; +}; + + + + +class java_lang_ref_SoftReference: public java_lang_ref_Reference { + static int _timestamp_offset; + static int _static_clock_offset; + + public: + + static jlong timestamp(oop ref); + + + static jlong clock(); + static void set_clock(jlong value); + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; +}; + + + +class java_lang_invoke_MethodHandle: AllStatic { + friend class JavaClasses; + + private: + static int _type_offset; + static int _form_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static oop type(oop mh); + static void set_type(oop mh, oop mtype); + + static oop form(oop mh); + static void set_form(oop mh, oop lform); + + + static bool is_subclass(Klass* klass) { + return klass->is_subclass_of(vmClasses::MethodHandle_klass()); + } + static bool is_instance(oop obj); + + + static int type_offset() { ; return _type_offset;; } + static int form_offset() { ; return _form_offset;; } +}; + + + +class java_lang_invoke_DirectMethodHandle: AllStatic { + friend class JavaClasses; + + private: + static int _member_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static oop member(oop mh); + + + static bool is_subclass(Klass* klass) { + return klass->is_subclass_of(vmClasses::DirectMethodHandle_klass()); + } + static bool is_instance(oop obj); + + + static int member_offset() { ; return _member_offset;; } +}; + + + + +class java_lang_invoke_LambdaForm: AllStatic { + friend class JavaClasses; + + private: + static int _vmentry_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static oop vmentry(oop lform); + + + static bool is_subclass(Klass* klass) { + return vmClasses::LambdaForm_klass() != nullptr && + klass->is_subclass_of(vmClasses::LambdaForm_klass()); + } + static bool is_instance(oop obj); + + + static int vmentry_offset() { ; return _vmentry_offset;; } +}; + + + + +class jdk_internal_foreign_abi_NativeEntryPoint: AllStatic { + friend class JavaClasses; + + private: + static int _method_type_offset; + static int _downcall_stub_address_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static oop method_type(oop entry); + static jlong downcall_stub_address(oop entry); + + + static bool is_subclass(Klass* klass) { + return vmClasses::NativeEntryPoint_klass() != nullptr && + klass->is_subclass_of(vmClasses::NativeEntryPoint_klass()); + } + static bool is_instance(oop obj); + + + static int method_type_offset_in_bytes() { return _method_type_offset; } + static int downcall_stub_address_offset_in_bytes() { return _downcall_stub_address_offset; } +}; + +class jdk_internal_foreign_abi_ABIDescriptor: AllStatic { + friend class JavaClasses; + + private: + static int _inputStorage_offset; + static int _outputStorage_offset; + static int _volatileStorage_offset; + static int _stackAlignment_offset; + static int _shadowSpace_offset; + static int _scratch1_offset; + static int _scratch2_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static objArrayOop inputStorage(oop entry); + static objArrayOop outputStorage(oop entry); + static objArrayOop volatileStorage(oop entry); + static jint stackAlignment(oop entry); + static jint shadowSpace(oop entry); + static oop scratch1(oop entry); + static oop scratch2(oop entry); + + + static bool is_subclass(Klass* klass) { + return vmClasses::ABIDescriptor_klass() != nullptr && + klass->is_subclass_of(vmClasses::ABIDescriptor_klass()); + } + static bool is_instance(oop obj); +}; + +class jdk_internal_foreign_abi_VMStorage: AllStatic { + friend class JavaClasses; + + private: + static int _type_offset; + static int _indexOrOffset_offset; + static int _segmentMaskOrSize_offset; + static int _debugName_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static jbyte type(oop entry); + static jint index_or_offset(oop entry); + static jshort segment_mask_or_size(oop entry); + static oop debugName(oop entry); + + + static bool is_subclass(Klass* klass) { + return vmClasses::VMStorage_klass() != nullptr && + klass->is_subclass_of(vmClasses::VMStorage_klass()); + } + static bool is_instance(oop obj); +}; + +class jdk_internal_foreign_abi_CallConv: AllStatic { + friend class JavaClasses; + + private: + static int _argRegs_offset; + static int _retRegs_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + + static objArrayOop argRegs(oop entry); + static objArrayOop retRegs(oop entry); + + + static bool is_subclass(Klass* klass) { + return vmClasses::CallConv_klass() != nullptr && + klass->is_subclass_of(vmClasses::CallConv_klass()); + } + static bool is_instance(oop obj); +}; + + + + + + + +class java_lang_invoke_ResolvedMethodName : AllStatic { + friend class JavaClasses; + + static int _vmtarget_offset; + static int _vmholder_offset; + + static void compute_offsets(); + public: + static void serialize_offsets(SerializeClosure* f) ; + + static int vmtarget_offset() { ; return _vmtarget_offset;; } + + static Method* vmtarget(oop resolved_method); + static void set_vmtarget(oop resolved_method, Method* method); + + static void set_vmholder(oop resolved_method, oop holder); + + + static oop find_resolved_method(const methodHandle& m, JavaThread* __the_thread__); + + static bool is_instance(oop resolved_method); +}; + + + + + + +class java_lang_invoke_MemberName: AllStatic { + friend class JavaClasses; + + private: + + + + + + + + static int _clazz_offset; + static int _name_offset; + static int _type_offset; + static int _flags_offset; + static int _method_offset; + static int _vmindex_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + static oop clazz(oop mname); + static void set_clazz(oop mname, oop clazz); + + static oop type(oop mname); + static void set_type(oop mname, oop type); + + static oop name(oop mname); + static void set_name(oop mname, oop name); + + static int flags(oop mname); + static void set_flags(oop mname, int flags); + + + static Method* vmtarget(oop mname); + static void set_method(oop mname, oop method); + + static intptr_t vmindex(oop mname); + static void set_vmindex(oop mname, intptr_t index); + + + static bool is_subclass(Klass* klass) { + return klass->is_subclass_of(vmClasses::MemberName_klass()); + } + static bool is_instance(oop obj); + + static bool is_method(oop obj); + + + enum { + MN_IS_METHOD = 0x00010000, + MN_IS_CONSTRUCTOR = 0x00020000, + MN_IS_FIELD = 0x00040000, + MN_IS_TYPE = 0x00080000, + MN_CALLER_SENSITIVE = 0x00100000, + MN_TRUSTED_FINAL = 0x00200000, + MN_HIDDEN_MEMBER = 0x00400000, + MN_REFERENCE_KIND_SHIFT = 24, + MN_REFERENCE_KIND_MASK = 0x0F000000 >> MN_REFERENCE_KIND_SHIFT, + MN_NESTMATE_CLASS = 0x00000001, + MN_HIDDEN_CLASS = 0x00000002, + MN_STRONG_LOADER_LINK = 0x00000004, + MN_ACCESS_VM_ANNOTATIONS = 0x00000008, + + MN_MODULE_MODE = 0x00000010, + MN_UNCONDITIONAL_MODE = 0x00000020, + MN_TRUSTED_MODE = -1 + }; + + + static int clazz_offset() { ; return _clazz_offset;; } + static int type_offset() { ; return _type_offset;; } + static int flags_offset() { ; return _flags_offset;; } + static int method_offset() { ; return _method_offset;; } + static int vmindex_offset() { ; return _vmindex_offset;; } +}; + + + + +class java_lang_invoke_MethodType: AllStatic { + friend class JavaClasses; + + private: + static int _rtype_offset; + static int _ptypes_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + static oop rtype(oop mt); + static objArrayOop ptypes(oop mt); + + static oop ptype(oop mt, int index); + static int ptype_count(oop mt); + + static int ptype_slot_count(oop mt); + static int rtype_slot_count(oop mt); + + static Symbol* as_signature(oop mt, bool intern_if_not_found); + static void print_signature(oop mt, outputStream* st); + + static bool is_instance(oop obj); + + static bool equals(oop mt1, oop mt2); + + + static int rtype_offset() { ; return _rtype_offset;; } + static int ptypes_offset() { ; return _ptypes_offset;; } +}; + + + + +class java_lang_invoke_CallSite: AllStatic { + friend class JavaClasses; + +private: + static int _target_offset; + static int _context_offset; + + static void compute_offsets(); + +public: + static void serialize_offsets(SerializeClosure* f) ; + + static oop target( oop site); + static void set_target( oop site, oop target); + static void set_target_volatile( oop site, oop target); + + static oop context_no_keepalive(oop site); + + + static bool is_subclass(Klass* klass) { + return klass->is_subclass_of(vmClasses::CallSite_klass()); + } + static bool is_instance(oop obj); + + + static int target_offset() { ; return _target_offset;; } + static int context_offset() { ; return _context_offset;; } +}; + + + +class java_lang_invoke_ConstantCallSite: AllStatic { + friend class JavaClasses; + +private: + static int _is_frozen_offset; + + static void compute_offsets(); + +public: + static void serialize_offsets(SerializeClosure* f) ; + + static jboolean is_frozen(oop site); + + + static bool is_subclass(Klass* klass) { + return klass->is_subclass_of(vmClasses::ConstantCallSite_klass()); + } + static bool is_instance(oop obj); +}; + + + + + + + +class DependencyContext; + +class java_lang_invoke_MethodHandleNatives_CallSiteContext : AllStatic { + friend class JavaClasses; + +private: + static int _vmdependencies_offset; + static int _last_cleanup_offset; + + static void compute_offsets(); + +public: + static void serialize_offsets(SerializeClosure* f) ; + + static DependencyContext vmdependencies(oop context); + + + static bool is_subclass(Klass* klass) { + return klass->is_subclass_of(vmClasses::Context_klass()); + } + static bool is_instance(oop obj); +}; + + + +class java_security_AccessControlContext: AllStatic { + private: + + + static int _context_offset; + static int _privilegedContext_offset; + static int _isPrivileged_offset; + static int _isAuthorized_offset; + + static void compute_offsets(); + public: + static void serialize_offsets(SerializeClosure* f) ; + static oop create(objArrayHandle context, bool isPrivileged, Handle privileged_context, JavaThread* __the_thread__); + + + friend class JavaClasses; +}; + + + + + + + +class java_lang_ClassLoader : AllStatic { + private: + static int _loader_data_offset; + static int _parent_offset; + static int _parallelCapable_offset; + static int _name_offset; + static int _nameAndId_offset; + static int _unnamedModule_offset; + + static void compute_offsets(); + + public: + static void serialize_offsets(SerializeClosure* f) ; + + static ClassLoaderData* loader_data_acquire(oop loader); + static ClassLoaderData* loader_data(oop loader); + static void release_set_loader_data(oop loader, ClassLoaderData* new_data); + + static oop parent(oop loader); + static oop parent_no_keepalive(oop loader); + static oop name(oop loader); + static oop nameAndId(oop loader); + static bool isAncestor(oop loader, oop cl); + + + static bool parallelCapable(oop the_class_mirror); + + static bool is_trusted_loader(oop loader); + + + + + static bool is_reflection_class_loader(oop loader); + + + static oop non_reflection_class_loader(oop loader); + + + static bool is_subclass(Klass* klass) { + return klass->is_subclass_of(vmClasses::ClassLoader_klass()); + } + static bool is_instance(oop obj); + + static oop unnamedModule(oop loader); + + + friend class JavaClasses; +}; + + + + +class java_lang_System : AllStatic { + private: + static int _static_in_offset; + static int _static_out_offset; + static int _static_err_offset; + static int _static_security_offset; + static int _static_allow_security_offset; + static int _static_never_offset; + + public: + static int in_offset() { ; return _static_in_offset;; } + static int out_offset() { ; return _static_out_offset;; } + static int err_offset() { ; return _static_err_offset;; } + static bool allow_security_manager(); + static bool has_security_manager(); + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; + + + friend class JavaClasses; +}; + + + + +class java_lang_StackTraceElement: AllStatic { + private: + static int _declaringClassObject_offset; + static int _classLoaderName_offset; + static int _moduleName_offset; + static int _moduleVersion_offset; + static int _declaringClass_offset; + static int _methodName_offset; + static int _fileName_offset; + static int _lineNumber_offset; + + + static void set_classLoaderName(oop element, oop value); + static void set_moduleName(oop element, oop value); + static void set_moduleVersion(oop element, oop value); + static void set_declaringClass(oop element, oop value); + static void set_methodName(oop element, oop value); + static void set_fileName(oop element, oop value); + static void set_lineNumber(oop element, int value); + static void set_declaringClassObject(oop element, oop value); + + static void decode_file_and_line(Handle java_mirror, InstanceKlass* holder, int version, + const methodHandle& method, int bci, + Symbol*& source, oop& source_file, int& line_number, JavaThread* __the_thread__); + + public: + + static oop create(const methodHandle& method, int bci, JavaThread* __the_thread__); + + static void fill_in(Handle element, InstanceKlass* holder, const methodHandle& method, + int version, int bci, Symbol* name, JavaThread* __the_thread__); + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; + + + static void decode(const methodHandle& method, int bci, Symbol*& fileName, int& lineNumber, JavaThread* __the_thread__); + + + + friend class JavaClasses; +}; + + +class Backtrace: AllStatic { + public: + + static int merge_bci_and_version(int bci, int version); + static int merge_mid_and_cpref(int mid, int cpref); + static int bci_at(unsigned int merged); + static int version_at(unsigned int merged); + static int mid_at(unsigned int merged); + static int cpref_at(unsigned int merged); + static int get_line_number(Method* method, int bci); + static Symbol* get_source_file_name(InstanceKlass* holder, int version); + + + friend class JavaClasses; +}; + +class java_lang_ClassFrameInfo: AllStatic { +private: + static int _classOrMemberName_offset; + static int _flags_offset; + +public: + static oop classOrMemberName(oop info); + static int flags(oop info); + + + static void init_class(Handle stackFrame, const methodHandle& m); + static void init_method(Handle stackFrame, const methodHandle& m, JavaThread* __the_thread__); + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; + + + friend class JavaClasses; +}; + + + + + + +class java_lang_StackFrameInfo: AllStatic { +private: + static int _type_offset; + static int _name_offset; + static int _bci_offset; + static int _version_offset; + static int _contScope_offset; + +public: + + static oop name(oop info); + static oop type(oop info); + static Method* get_method(oop info); + + + static void set_method_and_bci(Handle stackFrame, const methodHandle& method, int bci, oop cont, JavaThread* __the_thread__); + static void set_name(oop info, oop value); + static void set_type(oop info, oop value); + static void set_bci(oop info, int value); + + static void set_version(oop info, short value); + static void set_contScope(oop info, oop value); + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; + + static void to_stack_trace_element(Handle stackFrame, Handle stack_trace_element, JavaThread* __the_thread__); + + + friend class JavaClasses; +}; + +class java_lang_LiveStackFrameInfo: AllStatic { + private: + static int _monitors_offset; + static int _locals_offset; + static int _operands_offset; + static int _mode_offset; + + public: + static void set_monitors(oop info, oop value); + static void set_locals(oop info, oop value); + static void set_operands(oop info, oop value); + static void set_mode(oop info, int value); + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; + + + friend class JavaClasses; +}; + + + +class java_lang_reflect_RecordComponent: AllStatic { + private: + static int _clazz_offset; + static int _name_offset; + static int _type_offset; + static int _accessor_offset; + static int _signature_offset; + static int _annotations_offset; + static int _typeAnnotations_offset; + + + static void set_clazz(oop element, oop value); + static void set_name(oop element, oop value); + static void set_type(oop element, oop value); + static void set_accessor(oop element, oop value); + static void set_signature(oop element, oop value); + static void set_annotations(oop element, oop value); + static void set_typeAnnotations(oop element, oop value); + + public: + + static oop create(InstanceKlass* holder, RecordComponent* component, JavaThread* __the_thread__); + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; + + + friend class JavaClasses; +}; + + + + +class java_lang_AssertionStatusDirectives: AllStatic { + private: + static int _classes_offset; + static int _classEnabled_offset; + static int _packages_offset; + static int _packageEnabled_offset; + static int _deflt_offset; + + public: + + static void set_classes(oop obj, oop val); + static void set_classEnabled(oop obj, oop val); + static void set_packages(oop obj, oop val); + static void set_packageEnabled(oop obj, oop val); + static void set_deflt(oop obj, bool val); + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; + + + friend class JavaClasses; +}; + + +class java_util_concurrent_locks_AbstractOwnableSynchronizer : AllStatic { + private: + static int _owner_offset; + public: + static void compute_offsets(); + static oop get_owner_threadObj(oop obj); + static void serialize_offsets(SerializeClosure* f) ; +}; + + + +class jdk_internal_misc_UnsafeConstants : AllStatic { + public: + static void set_unsafe_constants(); + static void compute_offsets() { } + static void serialize_offsets(SerializeClosure* f) { } +}; + + + +class vector_VectorPayload : AllStatic { + private: + static int _payload_offset; + public: + static void set_payload(oop o, oop val); + + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; + + + static bool is_subclass(Klass* klass) { + return klass->is_subclass_of(vmClasses::vector_VectorPayload_klass()); + } + static bool is_instance(oop obj); +}; + +class java_lang_Integer : AllStatic { +public: + static jint value(oop obj); +}; + +class java_lang_Long : AllStatic { +public: + static jlong value(oop obj); +}; + +class java_lang_Character : AllStatic { +public: + static jchar value(oop obj); +}; + +class java_lang_Short : AllStatic { +public: + static jshort value(oop obj); +}; + +class java_lang_Byte : AllStatic { +public: + static jbyte value(oop obj); +}; + +class java_lang_Boolean : AllStatic { + private: + static int _static_TRUE_offset; + static int _static_FALSE_offset; + public: + static Symbol* symbol(); + static void compute_offsets(InstanceKlass* k); + static oop get_TRUE(InstanceKlass *k); + static oop get_FALSE(InstanceKlass *k); + static void serialize_offsets(SerializeClosure* f) ; + static jboolean value(oop obj); +}; + +class java_lang_Integer_IntegerCache : AllStatic { + private: + static int _static_cache_offset; + public: + static Symbol* symbol(); + static void compute_offsets(InstanceKlass* k); + static objArrayOop cache(InstanceKlass *k); + static void serialize_offsets(SerializeClosure* f) ; +}; + +class java_lang_Long_LongCache : AllStatic { + private: + static int _static_cache_offset; + public: + static Symbol* symbol(); + static void compute_offsets(InstanceKlass* k); + static objArrayOop cache(InstanceKlass *k); + static void serialize_offsets(SerializeClosure* f) ; +}; + +class java_lang_Character_CharacterCache : AllStatic { + private: + static int _static_cache_offset; + public: + static Symbol* symbol(); + static void compute_offsets(InstanceKlass* k); + static objArrayOop cache(InstanceKlass *k); + static void serialize_offsets(SerializeClosure* f) ; +}; + +class java_lang_Short_ShortCache : AllStatic { + private: + static int _static_cache_offset; + public: + static Symbol* symbol(); + static void compute_offsets(InstanceKlass* k); + static objArrayOop cache(InstanceKlass *k); + static void serialize_offsets(SerializeClosure* f) ; +}; + +class java_lang_Byte_ByteCache : AllStatic { + private: + static int _static_cache_offset; + public: + static Symbol* symbol(); + static void compute_offsets(InstanceKlass* k); + static objArrayOop cache(InstanceKlass *k); + static void serialize_offsets(SerializeClosure* f) ; +}; + + + + + + + +class java_lang_InternalError : AllStatic { + private: + static int _during_unsafe_access_offset; + public: + static jboolean during_unsafe_access(oop internal_error); + static void set_during_unsafe_access(oop internal_error); + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) ; +}; +# 1878 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.hpp" +class InjectedField { + public: + const vmClassID klass_id; + const vmSymbolID name_index; + const vmSymbolID signature_index; + const bool may_be_java; + + + Klass* klass() const { return vmClasses::klass_at(klass_id); } + Symbol* name() const { return lookup_symbol(name_index); } + Symbol* signature() const { return lookup_symbol(signature_index); } + + int compute_offset(); + + + static Symbol* lookup_symbol(vmSymbolID symbol_index) { + return Symbol::vm_symbol_at(symbol_index); + } +}; + + + + +enum class InjectedFieldID : int; + +class JavaClasses : AllStatic { + private: + + static InjectedField _injected_fields[]; + + static bool check_offset(const char *klass_name, int offset, const char *field_name, const char* field_sig) { return 0; }; + public: + + static int compute_injected_offset(InjectedFieldID id); + + static void compute_offsets(); + static void check_offsets() {}; + static void serialize_offsets(SerializeClosure* soc) ; + static InjectedField* get_injected(Symbol* class_name, int* field_count); + static bool is_supported_for_archiving(oop obj) ; + + static void compute_offset(int &dest_offset, + InstanceKlass* ik, Symbol* name_symbol, Symbol* signature_symbol, + bool is_static = false); + static void compute_offset(int& dest_offset, InstanceKlass* ik, + const char* name_string, Symbol* signature_symbol, + bool is_static = false); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.inline.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/access.inline.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/access.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/access.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/access.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessBackend.hpp" 1 +# 41 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessBackend.hpp" +template +struct HeapOopType: AllStatic { + static const bool needs_oop_compress = HasDecorator::value && + HasDecorator::value; + using type = std::conditional_t; +}; + +namespace AccessInternal { + enum BarrierType { + BARRIER_STORE, + BARRIER_STORE_AT, + BARRIER_LOAD, + BARRIER_LOAD_AT, + BARRIER_ATOMIC_CMPXCHG, + BARRIER_ATOMIC_CMPXCHG_AT, + BARRIER_ATOMIC_XCHG, + BARRIER_ATOMIC_XCHG_AT, + BARRIER_ARRAYCOPY, + BARRIER_CLONE + }; + + template + struct MustConvertCompressedOop: public std::integral_constant::value && + std::is_same::type, narrowOop>::value && + std::is_same::value> {}; + + + + template + struct EncodedType: AllStatic { + using type = std::conditional_t::value, + typename HeapOopType::type, + T>; + }; + + template + inline typename HeapOopType::type* + oop_field_addr(oop base, ptrdiff_t byte_offset) { + return reinterpret_cast::type*>( + reinterpret_cast((void*)base) + byte_offset); + } + + + + template + + struct PossiblyLockedAccess: public std::false_type {}; + + + + + template + struct AccessFunctionTypes { + typedef T (*load_at_func_t)(oop base, ptrdiff_t offset); + typedef void (*store_at_func_t)(oop base, ptrdiff_t offset, T value); + typedef T (*atomic_cmpxchg_at_func_t)(oop base, ptrdiff_t offset, T compare_value, T new_value); + typedef T (*atomic_xchg_at_func_t)(oop base, ptrdiff_t offset, T new_value); + + typedef T (*load_func_t)(void* addr); + typedef void (*store_func_t)(void* addr, T value); + typedef T (*atomic_cmpxchg_func_t)(void* addr, T compare_value, T new_value); + typedef T (*atomic_xchg_func_t)(void* addr, T new_value); + + typedef bool (*arraycopy_func_t)(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length); + typedef void (*clone_func_t)(oop src, oop dst, size_t size); + }; + + template + struct AccessFunctionTypes { + typedef bool (*arraycopy_func_t)(arrayOop src_obj, size_t src_offset_in_bytes, void* src, + arrayOop dst_obj, size_t dst_offset_in_bytes, void* dst, + size_t length); + }; + + template struct AccessFunction {}; + + + + + + + template struct AccessFunction: AllStatic{ typedef typename AccessFunctionTypes::store_func_t type; }; + template struct AccessFunction: AllStatic{ typedef typename AccessFunctionTypes::store_at_func_t type; }; + template struct AccessFunction: AllStatic{ typedef typename AccessFunctionTypes::load_func_t type; }; + template struct AccessFunction: AllStatic{ typedef typename AccessFunctionTypes::load_at_func_t type; }; + template struct AccessFunction: AllStatic{ typedef typename AccessFunctionTypes::atomic_cmpxchg_func_t type; }; + template struct AccessFunction: AllStatic{ typedef typename AccessFunctionTypes::atomic_cmpxchg_at_func_t type; }; + template struct AccessFunction: AllStatic{ typedef typename AccessFunctionTypes::atomic_xchg_func_t type; }; + template struct AccessFunction: AllStatic{ typedef typename AccessFunctionTypes::atomic_xchg_at_func_t type; }; + template struct AccessFunction: AllStatic{ typedef typename AccessFunctionTypes::arraycopy_func_t type; }; + template struct AccessFunction: AllStatic{ typedef typename AccessFunctionTypes::clone_func_t type; }; + + + template + typename AccessFunction::type resolve_barrier(); + + template + typename AccessFunction::type resolve_oop_barrier(); + + class AccessLocker { + public: + AccessLocker(); + ~AccessLocker(); + }; + bool wide_atomic_needs_locking(); + + void* field_addr(oop base, ptrdiff_t offset); + + + + void arraycopy_arrayof_conjoint_oops(void* src, void* dst, size_t length); + void arraycopy_conjoint_oops(oop* src, oop* dst, size_t length); + void arraycopy_conjoint_oops(narrowOop* src, narrowOop* dst, size_t length); + + void arraycopy_disjoint_words(void* src, void* dst, size_t length); + void arraycopy_disjoint_words_atomic(void* src, void* dst, size_t length); + + template + void arraycopy_conjoint(T* src, T* dst, size_t length); + template + void arraycopy_arrayof_conjoint(T* src, T* dst, size_t length); + template + void arraycopy_conjoint_atomic(T* src, T* dst, size_t length); +} + + + +const DecoratorSet RAW_DECORATOR_MASK = INTERNAL_DECORATOR_MASK | MO_DECORATOR_MASK | + ARRAYCOPY_DECORATOR_MASK | IS_NOT_NULL; + + + + + +template +class RawAccessBarrier: public AllStatic { +protected: + static inline void* field_addr(oop base, ptrdiff_t byte_offset) { + return AccessInternal::field_addr(base, byte_offset); + } + +protected: + + template + static inline typename EnableIf< + AccessInternal::MustConvertCompressedOop::value, + typename HeapOopType::type>::type + encode_internal(T value); + + template + static inline typename EnableIf< + !AccessInternal::MustConvertCompressedOop::value, T>::type + encode_internal(T value) { + return value; + } + + template + static inline typename AccessInternal::EncodedType::type + encode(T value) { + return encode_internal(value); + } + + + template + static inline typename EnableIf< + AccessInternal::MustConvertCompressedOop::value, T>::type + decode_internal(typename HeapOopType::type value); + + template + static inline typename EnableIf< + !AccessInternal::MustConvertCompressedOop::value, T>::type + decode_internal(T value) { + return value; + } + + template + static inline T decode(typename AccessInternal::EncodedType::type value) { + return decode_internal(value); + } + +protected: + template + static typename EnableIf< + HasDecorator::value, T>::type + load_internal(void* addr); + + template + static typename EnableIf< + HasDecorator::value, T>::type + load_internal(void* addr); + + template + static typename EnableIf< + HasDecorator::value, T>::type + load_internal(void* addr); + + template + static inline typename EnableIf< + HasDecorator::value, T>::type + load_internal(void* addr) { + return *reinterpret_cast(addr); + } + + template + static typename EnableIf< + HasDecorator::value>::type + store_internal(void* addr, T value); + + template + static typename EnableIf< + HasDecorator::value>::type + store_internal(void* addr, T value); + + template + static typename EnableIf< + HasDecorator::value>::type + store_internal(void* addr, T value); + + template + static inline typename EnableIf< + HasDecorator::value>::type + store_internal(void* addr, T value) { + *reinterpret_cast(addr) = value; + } + + template + static typename EnableIf< + HasDecorator::value, T>::type + atomic_cmpxchg_internal(void* addr, T compare_value, T new_value); + + template + static typename EnableIf< + HasDecorator::value, T>::type + atomic_cmpxchg_internal(void* addr, T compare_value, T new_value); + + template + static typename EnableIf< + HasDecorator::value, T>::type + atomic_xchg_internal(void* addr, T new_value); + + + + + + template + static inline typename EnableIf< + !AccessInternal::PossiblyLockedAccess::value, T>::type + atomic_cmpxchg_maybe_locked(void* addr, T compare_value, T new_value) { + return atomic_cmpxchg_internal(addr, compare_value, new_value); + } + + template + static typename EnableIf< + AccessInternal::PossiblyLockedAccess::value, T>::type + atomic_cmpxchg_maybe_locked(void* addr, T compare_value, T new_value); + + template + static inline typename EnableIf< + !AccessInternal::PossiblyLockedAccess::value, T>::type + atomic_xchg_maybe_locked(void* addr, T new_value) { + return atomic_xchg_internal(addr, new_value); + } + + template + static typename EnableIf< + AccessInternal::PossiblyLockedAccess::value, T>::type + atomic_xchg_maybe_locked(void* addr, T new_value); + +public: + template + static inline void store(void* addr, T value) { + store_internal(addr, value); + } + + template + static inline T load(void* addr) { + return load_internal(addr); + } + + template + static inline T atomic_cmpxchg(void* addr, T compare_value, T new_value) { + return atomic_cmpxchg_maybe_locked(addr, compare_value, new_value); + } + + template + static inline T atomic_xchg(void* addr, T new_value) { + return atomic_xchg_maybe_locked(addr, new_value); + } + + template + static bool arraycopy(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length); + + template + static void oop_store(void* addr, T value); + template + static void oop_store_at(oop base, ptrdiff_t offset, T value); + + template + static T oop_load(void* addr); + template + static T oop_load_at(oop base, ptrdiff_t offset); + + template + static T oop_atomic_cmpxchg(void* addr, T compare_value, T new_value); + template + static T oop_atomic_cmpxchg_at(oop base, ptrdiff_t offset, T compare_value, T new_value); + + template + static T oop_atomic_xchg(void* addr, T new_value); + template + static T oop_atomic_xchg_at(oop base, ptrdiff_t offset, T new_value); + + template + static void store_at(oop base, ptrdiff_t offset, T value) { + store(field_addr(base, offset), value); + } + + template + static T load_at(oop base, ptrdiff_t offset) { + return load(field_addr(base, offset)); + } + + template + static T atomic_cmpxchg_at(oop base, ptrdiff_t offset, T compare_value, T new_value) { + return atomic_cmpxchg(field_addr(base, offset), compare_value, new_value); + } + + template + static T atomic_xchg_at(oop base, ptrdiff_t offset, T new_value) { + return atomic_xchg(field_addr(base, offset), new_value); + } + + template + static bool oop_arraycopy(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length); + + static void clone(oop src, oop dst, size_t size); +}; + +namespace AccessInternal { + ; + +} +# 404 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessBackend.hpp" +namespace AccessInternal { + template + struct OopOrNarrowOopInternal: AllStatic { + typedef oop type; + }; + + template <> + struct OopOrNarrowOopInternal: AllStatic { + typedef narrowOop type; + }; +# 424 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessBackend.hpp" + template + struct OopOrNarrowOop: AllStatic { + typedef typename OopOrNarrowOopInternal>::type type; + }; + + inline void* field_addr(oop base, ptrdiff_t byte_offset) { + return reinterpret_cast(reinterpret_cast((void*)base) + byte_offset); + } +# 441 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessBackend.hpp" + template + struct RuntimeDispatch: AllStatic {}; + + template + struct RuntimeDispatch: AllStatic { + typedef typename AccessFunction::type func_t; + static func_t _store_func; + + static void store_init(void* addr, T value); + + static inline void store(void* addr, T value) { + ; + _store_func(addr, value); + } + }; + + template + struct RuntimeDispatch: AllStatic { + typedef typename AccessFunction::type func_t; + static func_t _store_at_func; + + static void store_at_init(oop base, ptrdiff_t offset, T value); + + static inline void store_at(oop base, ptrdiff_t offset, T value) { + ; + _store_at_func(base, offset, value); + } + }; + + template + struct RuntimeDispatch: AllStatic { + typedef typename AccessFunction::type func_t; + static func_t _load_func; + + static T load_init(void* addr); + + static inline T load(void* addr) { + ; + return _load_func(addr); + } + }; + + template + struct RuntimeDispatch: AllStatic { + typedef typename AccessFunction::type func_t; + static func_t _load_at_func; + + static T load_at_init(oop base, ptrdiff_t offset); + + static inline T load_at(oop base, ptrdiff_t offset) { + ; + return _load_at_func(base, offset); + } + }; + + template + struct RuntimeDispatch: AllStatic { + typedef typename AccessFunction::type func_t; + static func_t _atomic_cmpxchg_func; + + static T atomic_cmpxchg_init(void* addr, T compare_value, T new_value); + + static inline T atomic_cmpxchg(void* addr, T compare_value, T new_value) { + ; + return _atomic_cmpxchg_func(addr, compare_value, new_value); + } + }; + + template + struct RuntimeDispatch: AllStatic { + typedef typename AccessFunction::type func_t; + static func_t _atomic_cmpxchg_at_func; + + static T atomic_cmpxchg_at_init(oop base, ptrdiff_t offset, T compare_value, T new_value); + + static inline T atomic_cmpxchg_at(oop base, ptrdiff_t offset, T compare_value, T new_value) { + ; + return _atomic_cmpxchg_at_func(base, offset, compare_value, new_value); + } + }; + + template + struct RuntimeDispatch: AllStatic { + typedef typename AccessFunction::type func_t; + static func_t _atomic_xchg_func; + + static T atomic_xchg_init(void* addr, T new_value); + + static inline T atomic_xchg(void* addr, T new_value) { + ; + return _atomic_xchg_func(addr, new_value); + } + }; + + template + struct RuntimeDispatch: AllStatic { + typedef typename AccessFunction::type func_t; + static func_t _atomic_xchg_at_func; + + static T atomic_xchg_at_init(oop base, ptrdiff_t offset, T new_value); + + static inline T atomic_xchg_at(oop base, ptrdiff_t offset, T new_value) { + ; + return _atomic_xchg_at_func(base, offset, new_value); + } + }; + + template + struct RuntimeDispatch: AllStatic { + typedef typename AccessFunction::type func_t; + static func_t _arraycopy_func; + + static bool arraycopy_init(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length); + + static inline bool arraycopy(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length) { + ; + return _arraycopy_func(src_obj, src_offset_in_bytes, src_raw, + dst_obj, dst_offset_in_bytes, dst_raw, + length); + } + }; + + template + struct RuntimeDispatch: AllStatic { + typedef typename AccessFunction::type func_t; + static func_t _clone_func; + + static void clone_init(oop src, oop dst, size_t size); + + static inline void clone(oop src, oop dst, size_t size) { + ; + _clone_func(src, dst, size); + } + }; + + + template + typename AccessFunction::type + RuntimeDispatch::_store_func = &store_init; + + template + typename AccessFunction::type + RuntimeDispatch::_store_at_func = &store_at_init; + + template + typename AccessFunction::type + RuntimeDispatch::_load_func = &load_init; + + template + typename AccessFunction::type + RuntimeDispatch::_load_at_func = &load_at_init; + + template + typename AccessFunction::type + RuntimeDispatch::_atomic_cmpxchg_func = &atomic_cmpxchg_init; + + template + typename AccessFunction::type + RuntimeDispatch::_atomic_cmpxchg_at_func = &atomic_cmpxchg_at_init; + + template + typename AccessFunction::type + RuntimeDispatch::_atomic_xchg_func = &atomic_xchg_init; + + template + typename AccessFunction::type + RuntimeDispatch::_atomic_xchg_at_func = &atomic_xchg_at_init; + + template + typename AccessFunction::type + RuntimeDispatch::_arraycopy_func = &arraycopy_init; + + template + typename AccessFunction::type + RuntimeDispatch::_clone_func = &clone_init; + + + + + + + struct PreRuntimeDispatch: AllStatic { + template + struct CanHardwireRaw: public std::integral_constant< + bool, + !HasDecorator::value || + !HasDecorator::value || + HasDecorator::value> + {}; + + static const DecoratorSet convert_compressed_oops = INTERNAL_RT_USE_COMPRESSED_OOPS | INTERNAL_CONVERT_COMPRESSED_OOP; + + template + static bool is_hardwired_primitive() { + return !HasDecorator::value; + } + + template + inline static typename EnableIf< + HasDecorator::value && CanHardwireRaw::value>::type + store(void* addr, T value) { + typedef RawAccessBarrier Raw; + if (HasDecorator::value) { + Raw::oop_store(addr, value); + } else { + Raw::store(addr, value); + } + } + + template + inline static typename EnableIf< + HasDecorator::value && !CanHardwireRaw::value>::type + store(void* addr, T value) { + if (UseCompressedOops) { + const DecoratorSet expanded_decorators = decorators | convert_compressed_oops; + PreRuntimeDispatch::store(addr, value); + } else { + const DecoratorSet expanded_decorators = decorators & ~convert_compressed_oops; + PreRuntimeDispatch::store(addr, value); + } + } + + template + inline static typename EnableIf< + !HasDecorator::value>::type + store(void* addr, T value) { + if (is_hardwired_primitive()) { + const DecoratorSet expanded_decorators = decorators | AS_RAW; + PreRuntimeDispatch::store(addr, value); + } else { + RuntimeDispatch::store(addr, value); + } + } + + template + inline static typename EnableIf< + HasDecorator::value>::type + store_at(oop base, ptrdiff_t offset, T value) { + store(field_addr(base, offset), value); + } + + template + inline static typename EnableIf< + !HasDecorator::value>::type + store_at(oop base, ptrdiff_t offset, T value) { + if (is_hardwired_primitive()) { + const DecoratorSet expanded_decorators = decorators | AS_RAW; + PreRuntimeDispatch::store_at(base, offset, value); + } else { + RuntimeDispatch::store_at(base, offset, value); + } + } + + template + inline static typename EnableIf< + HasDecorator::value && CanHardwireRaw::value, T>::type + load(void* addr) { + typedef RawAccessBarrier Raw; + if (HasDecorator::value) { + return Raw::template oop_load(addr); + } else { + return Raw::template load(addr); + } + } + + template + inline static typename EnableIf< + HasDecorator::value && !CanHardwireRaw::value, T>::type + load(void* addr) { + if (UseCompressedOops) { + const DecoratorSet expanded_decorators = decorators | convert_compressed_oops; + return PreRuntimeDispatch::load(addr); + } else { + const DecoratorSet expanded_decorators = decorators & ~convert_compressed_oops; + return PreRuntimeDispatch::load(addr); + } + } + + template + inline static typename EnableIf< + !HasDecorator::value, T>::type + load(void* addr) { + if (is_hardwired_primitive()) { + const DecoratorSet expanded_decorators = decorators | AS_RAW; + return PreRuntimeDispatch::load(addr); + } else { + return RuntimeDispatch::load(addr); + } + } + + template + inline static typename EnableIf< + HasDecorator::value, T>::type + load_at(oop base, ptrdiff_t offset) { + return load(field_addr(base, offset)); + } + + template + inline static typename EnableIf< + !HasDecorator::value, T>::type + load_at(oop base, ptrdiff_t offset) { + if (is_hardwired_primitive()) { + const DecoratorSet expanded_decorators = decorators | AS_RAW; + return PreRuntimeDispatch::load_at(base, offset); + } else { + return RuntimeDispatch::load_at(base, offset); + } + } + + template + inline static typename EnableIf< + HasDecorator::value && CanHardwireRaw::value, T>::type + atomic_cmpxchg(void* addr, T compare_value, T new_value) { + typedef RawAccessBarrier Raw; + if (HasDecorator::value) { + return Raw::oop_atomic_cmpxchg(addr, compare_value, new_value); + } else { + return Raw::atomic_cmpxchg(addr, compare_value, new_value); + } + } + + template + inline static typename EnableIf< + HasDecorator::value && !CanHardwireRaw::value, T>::type + atomic_cmpxchg(void* addr, T compare_value, T new_value) { + if (UseCompressedOops) { + const DecoratorSet expanded_decorators = decorators | convert_compressed_oops; + return PreRuntimeDispatch::atomic_cmpxchg(addr, compare_value, new_value); + } else { + const DecoratorSet expanded_decorators = decorators & ~convert_compressed_oops; + return PreRuntimeDispatch::atomic_cmpxchg(addr, compare_value, new_value); + } + } + + template + inline static typename EnableIf< + !HasDecorator::value, T>::type + atomic_cmpxchg(void* addr, T compare_value, T new_value) { + if (is_hardwired_primitive()) { + const DecoratorSet expanded_decorators = decorators | AS_RAW; + return PreRuntimeDispatch::atomic_cmpxchg(addr, compare_value, new_value); + } else { + return RuntimeDispatch::atomic_cmpxchg(addr, compare_value, new_value); + } + } + + template + inline static typename EnableIf< + HasDecorator::value, T>::type + atomic_cmpxchg_at(oop base, ptrdiff_t offset, T compare_value, T new_value) { + return atomic_cmpxchg(field_addr(base, offset), compare_value, new_value); + } + + template + inline static typename EnableIf< + !HasDecorator::value, T>::type + atomic_cmpxchg_at(oop base, ptrdiff_t offset, T compare_value, T new_value) { + if (is_hardwired_primitive()) { + const DecoratorSet expanded_decorators = decorators | AS_RAW; + return PreRuntimeDispatch::atomic_cmpxchg_at(base, offset, compare_value, new_value); + } else { + return RuntimeDispatch::atomic_cmpxchg_at(base, offset, compare_value, new_value); + } + } + + template + inline static typename EnableIf< + HasDecorator::value && CanHardwireRaw::value, T>::type + atomic_xchg(void* addr, T new_value) { + typedef RawAccessBarrier Raw; + if (HasDecorator::value) { + return Raw::oop_atomic_xchg(addr, new_value); + } else { + return Raw::atomic_xchg(addr, new_value); + } + } + + template + inline static typename EnableIf< + HasDecorator::value && !CanHardwireRaw::value, T>::type + atomic_xchg(void* addr, T new_value) { + if (UseCompressedOops) { + const DecoratorSet expanded_decorators = decorators | convert_compressed_oops; + return PreRuntimeDispatch::atomic_xchg(addr, new_value); + } else { + const DecoratorSet expanded_decorators = decorators & ~convert_compressed_oops; + return PreRuntimeDispatch::atomic_xchg(addr, new_value); + } + } + + template + inline static typename EnableIf< + !HasDecorator::value, T>::type + atomic_xchg(void* addr, T new_value) { + if (is_hardwired_primitive()) { + const DecoratorSet expanded_decorators = decorators | AS_RAW; + return PreRuntimeDispatch::atomic_xchg(addr, new_value); + } else { + return RuntimeDispatch::atomic_xchg(addr, new_value); + } + } + + template + inline static typename EnableIf< + HasDecorator::value, T>::type + atomic_xchg_at(oop base, ptrdiff_t offset, T new_value) { + return atomic_xchg(field_addr(base, offset), new_value); + } + + template + inline static typename EnableIf< + !HasDecorator::value, T>::type + atomic_xchg_at(oop base, ptrdiff_t offset, T new_value) { + if (is_hardwired_primitive()) { + const DecoratorSet expanded_decorators = decorators | AS_RAW; + return PreRuntimeDispatch::atomic_xchg(base, offset, new_value); + } else { + return RuntimeDispatch::atomic_xchg_at(base, offset, new_value); + } + } + + template + inline static typename EnableIf< + HasDecorator::value && CanHardwireRaw::value, bool>::type + arraycopy(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length) { + typedef RawAccessBarrier Raw; + if (HasDecorator::value) { + return Raw::oop_arraycopy(src_obj, src_offset_in_bytes, src_raw, + dst_obj, dst_offset_in_bytes, dst_raw, + length); + } else { + return Raw::arraycopy(src_obj, src_offset_in_bytes, src_raw, + dst_obj, dst_offset_in_bytes, dst_raw, + length); + } + } + + template + inline static typename EnableIf< + HasDecorator::value && !CanHardwireRaw::value, bool>::type + arraycopy(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length) { + if (UseCompressedOops) { + const DecoratorSet expanded_decorators = decorators | convert_compressed_oops; + return PreRuntimeDispatch::arraycopy(src_obj, src_offset_in_bytes, src_raw, + dst_obj, dst_offset_in_bytes, dst_raw, + length); + } else { + const DecoratorSet expanded_decorators = decorators & ~convert_compressed_oops; + return PreRuntimeDispatch::arraycopy(src_obj, src_offset_in_bytes, src_raw, + dst_obj, dst_offset_in_bytes, dst_raw, + length); + } + } + + template + inline static typename EnableIf< + !HasDecorator::value, bool>::type + arraycopy(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length) { + if (is_hardwired_primitive()) { + const DecoratorSet expanded_decorators = decorators | AS_RAW; + return PreRuntimeDispatch::arraycopy(src_obj, src_offset_in_bytes, src_raw, + dst_obj, dst_offset_in_bytes, dst_raw, + length); + } else { + return RuntimeDispatch::arraycopy(src_obj, src_offset_in_bytes, src_raw, + dst_obj, dst_offset_in_bytes, dst_raw, + length); + } + } + + template + inline static typename EnableIf< + HasDecorator::value>::type + clone(oop src, oop dst, size_t size) { + typedef RawAccessBarrier Raw; + Raw::clone(src, dst, size); + } + + template + inline static typename EnableIf< + !HasDecorator::value>::type + clone(oop src, oop dst, size_t size) { + RuntimeDispatch::clone(src, dst, size); + } + }; +# 952 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessBackend.hpp" + template + inline void store_reduce_types(T* addr, T value) { + PreRuntimeDispatch::store(addr, value); + } + + template + inline void store_reduce_types(narrowOop* addr, oop value) { + const DecoratorSet expanded_decorators = decorators | INTERNAL_CONVERT_COMPRESSED_OOP | + INTERNAL_RT_USE_COMPRESSED_OOPS; + PreRuntimeDispatch::store(addr, value); + } + + template + inline void store_reduce_types(narrowOop* addr, narrowOop value) { + const DecoratorSet expanded_decorators = decorators | INTERNAL_CONVERT_COMPRESSED_OOP | + INTERNAL_RT_USE_COMPRESSED_OOPS; + PreRuntimeDispatch::store(addr, value); + } + + template + inline void store_reduce_types(HeapWord* addr, oop value) { + const DecoratorSet expanded_decorators = decorators | INTERNAL_CONVERT_COMPRESSED_OOP; + PreRuntimeDispatch::store(addr, value); + } + + template + inline T atomic_cmpxchg_reduce_types(T* addr, T compare_value, T new_value) { + return PreRuntimeDispatch::atomic_cmpxchg(addr, compare_value, new_value); + } + + template + inline oop atomic_cmpxchg_reduce_types(narrowOop* addr, oop compare_value, oop new_value) { + const DecoratorSet expanded_decorators = decorators | INTERNAL_CONVERT_COMPRESSED_OOP | + INTERNAL_RT_USE_COMPRESSED_OOPS; + return PreRuntimeDispatch::atomic_cmpxchg(addr, compare_value, new_value); + } + + template + inline narrowOop atomic_cmpxchg_reduce_types(narrowOop* addr, narrowOop compare_value, narrowOop new_value) { + const DecoratorSet expanded_decorators = decorators | INTERNAL_CONVERT_COMPRESSED_OOP | + INTERNAL_RT_USE_COMPRESSED_OOPS; + return PreRuntimeDispatch::atomic_cmpxchg(addr, compare_value, new_value); + } + + template + inline oop atomic_cmpxchg_reduce_types(HeapWord* addr, + oop compare_value, + oop new_value) { + const DecoratorSet expanded_decorators = decorators | INTERNAL_CONVERT_COMPRESSED_OOP; + return PreRuntimeDispatch::atomic_cmpxchg(addr, compare_value, new_value); + } + + template + inline T atomic_xchg_reduce_types(T* addr, T new_value) { + const DecoratorSet expanded_decorators = decorators; + return PreRuntimeDispatch::atomic_xchg(addr, new_value); + } + + template + inline oop atomic_xchg_reduce_types(narrowOop* addr, oop new_value) { + const DecoratorSet expanded_decorators = decorators | INTERNAL_CONVERT_COMPRESSED_OOP | + INTERNAL_RT_USE_COMPRESSED_OOPS; + return PreRuntimeDispatch::atomic_xchg(addr, new_value); + } + + template + inline narrowOop atomic_xchg_reduce_types(narrowOop* addr, narrowOop new_value) { + const DecoratorSet expanded_decorators = decorators | INTERNAL_CONVERT_COMPRESSED_OOP | + INTERNAL_RT_USE_COMPRESSED_OOPS; + return PreRuntimeDispatch::atomic_xchg(addr, new_value); + } + + template + inline oop atomic_xchg_reduce_types(HeapWord* addr, oop new_value) { + const DecoratorSet expanded_decorators = decorators | INTERNAL_CONVERT_COMPRESSED_OOP; + return PreRuntimeDispatch::atomic_xchg(addr, new_value); + } + + template + inline T load_reduce_types(T* addr) { + return PreRuntimeDispatch::load(addr); + } + + template + inline typename OopOrNarrowOop::type load_reduce_types(narrowOop* addr) { + const DecoratorSet expanded_decorators = decorators | INTERNAL_CONVERT_COMPRESSED_OOP | + INTERNAL_RT_USE_COMPRESSED_OOPS; + return PreRuntimeDispatch::load::type>(addr); + } + + template + inline oop load_reduce_types(HeapWord* addr) { + const DecoratorSet expanded_decorators = decorators | INTERNAL_CONVERT_COMPRESSED_OOP; + return PreRuntimeDispatch::load(addr); + } + + template + inline bool arraycopy_reduce_types(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length) { + return PreRuntimeDispatch::arraycopy(src_obj, src_offset_in_bytes, src_raw, + dst_obj, dst_offset_in_bytes, dst_raw, + length); + } + + template + inline bool arraycopy_reduce_types(arrayOop src_obj, size_t src_offset_in_bytes, HeapWord* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, HeapWord* dst_raw, + size_t length) { + const DecoratorSet expanded_decorators = decorators | INTERNAL_CONVERT_COMPRESSED_OOP; + return PreRuntimeDispatch::arraycopy(src_obj, src_offset_in_bytes, src_raw, + dst_obj, dst_offset_in_bytes, dst_raw, + length); + } + + template + inline bool arraycopy_reduce_types(arrayOop src_obj, size_t src_offset_in_bytes, narrowOop* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, narrowOop* dst_raw, + size_t length) { + const DecoratorSet expanded_decorators = decorators | INTERNAL_CONVERT_COMPRESSED_OOP | + INTERNAL_RT_USE_COMPRESSED_OOPS; + return PreRuntimeDispatch::arraycopy(src_obj, src_offset_in_bytes, src_raw, + dst_obj, dst_offset_in_bytes, dst_raw, + length); + } +# 1087 "/home/rehn/source/jdk/open/src/hotspot/share/oops/accessBackend.hpp" + template + static void verify_types(){ + + + static_assert(((HasDecorator::value || (std::is_pointer::value || std::is_integral::value) || std::is_floating_point::value)), "(HasDecorator::value || (std::is_pointer::value || std::is_integral::value) || std::is_floating_point::value)") + + ; + } + + template + inline void store(P* addr, T value) { + verify_types(); + using DecayedP = std::decay_t

; + using DecayedT = std::decay_t; + DecayedT decayed_value = value; + + + const DecoratorSet expanded_decorators = DecoratorFixup< + (std::is_volatile

::value && !HasDecorator::value) ? + (MO_RELAXED | decorators) : decorators>::value; + store_reduce_types(const_cast(addr), decayed_value); + } + + template + inline void store_at(oop base, ptrdiff_t offset, T value) { + verify_types(); + using DecayedT = std::decay_t; + DecayedT decayed_value = value; + const DecoratorSet expanded_decorators = DecoratorFixup::value ? + INTERNAL_CONVERT_COMPRESSED_OOP : DECORATORS_NONE)>::value; + PreRuntimeDispatch::store_at(base, offset, decayed_value); + } + + template + inline T load(P* addr) { + verify_types(); + using DecayedP = std::decay_t

; + using DecayedT = std::conditional_t::value, + typename OopOrNarrowOop::type, + std::decay_t>; + + + const DecoratorSet expanded_decorators = DecoratorFixup< + (std::is_volatile

::value && !HasDecorator::value) ? + (MO_RELAXED | decorators) : decorators>::value; + return load_reduce_types(const_cast(addr)); + } + + template + inline T load_at(oop base, ptrdiff_t offset) { + verify_types(); + using DecayedT = std::conditional_t::value, + typename OopOrNarrowOop::type, + std::decay_t>; + + + const DecoratorSet expanded_decorators = DecoratorFixup::value ? + INTERNAL_CONVERT_COMPRESSED_OOP : DECORATORS_NONE)>::value; + return PreRuntimeDispatch::load_at(base, offset); + } + + template + inline T atomic_cmpxchg(P* addr, T compare_value, T new_value) { + verify_types(); + using DecayedP = std::decay_t

; + using DecayedT = std::decay_t; + DecayedT new_decayed_value = new_value; + DecayedT compare_decayed_value = compare_value; + const DecoratorSet expanded_decorators = DecoratorFixup< + (!HasDecorator::value) ? + (MO_SEQ_CST | decorators) : decorators>::value; + return atomic_cmpxchg_reduce_types(const_cast(addr), + compare_decayed_value, + new_decayed_value); + } + + template + inline T atomic_cmpxchg_at(oop base, ptrdiff_t offset, T compare_value, T new_value) { + verify_types(); + using DecayedT = std::decay_t; + DecayedT new_decayed_value = new_value; + DecayedT compare_decayed_value = compare_value; + + const DecoratorSet expanded_decorators = DecoratorFixup< + (!HasDecorator::value) ? + (MO_SEQ_CST | decorators) : decorators>::value; + + const DecoratorSet final_decorators = expanded_decorators | + (HasDecorator::value ? + INTERNAL_CONVERT_COMPRESSED_OOP : DECORATORS_NONE); + return PreRuntimeDispatch::atomic_cmpxchg_at(base, offset, compare_decayed_value, + new_decayed_value); + } + + template + inline T atomic_xchg(P* addr, T new_value) { + verify_types(); + using DecayedP = std::decay_t

; + using DecayedT = std::decay_t; + DecayedT new_decayed_value = new_value; + + const DecoratorSet expanded_decorators = DecoratorFixup::value; + return atomic_xchg_reduce_types(const_cast(addr), + new_decayed_value); + } + + template + inline T atomic_xchg_at(oop base, ptrdiff_t offset, T new_value) { + verify_types(); + using DecayedT = std::decay_t; + DecayedT new_decayed_value = new_value; + + const DecoratorSet expanded_decorators = DecoratorFixup::value ? + INTERNAL_CONVERT_COMPRESSED_OOP : DECORATORS_NONE)>::value; + return PreRuntimeDispatch::atomic_xchg_at(base, offset, new_decayed_value); + } + + template + inline bool arraycopy(arrayOop src_obj, size_t src_offset_in_bytes, const T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length) { + static_assert(((HasDecorator::value || (std::is_same::value || std::is_integral::value) || std::is_floating_point::value)), "(HasDecorator::value || (std::is_same::value || std::is_integral::value) || std::is_floating_point::value)") + + ; + using DecayedT = std::decay_t; + const DecoratorSet expanded_decorators = DecoratorFixup::value; + return arraycopy_reduce_types(src_obj, src_offset_in_bytes, const_cast(src_raw), + dst_obj, dst_offset_in_bytes, const_cast(dst_raw), + length); + } + + template + inline void clone(oop src, oop dst, size_t size) { + const DecoratorSet expanded_decorators = DecoratorFixup::value; + PreRuntimeDispatch::clone(src, dst, size); + } + + + template + class OopLoadProxy: public StackObj { + private: + P *const _addr; + public: + explicit OopLoadProxy(P* addr) : _addr(addr) {} + + inline operator oop() { + return load(_addr); + } + + inline operator narrowOop() { + return load(_addr); + } + + template + inline bool operator ==(const T& other) const { + return load(_addr) == other; + } + + template + inline bool operator !=(const T& other) const { + return load(_addr) != other; + } + + inline bool operator ==(std::nullptr_t) const { + return load(_addr) == nullptr; + } + + inline bool operator !=(std::nullptr_t) const { + return load(_addr) != nullptr; + } + }; + + + template + class LoadAtProxy: public StackObj { + private: + const oop _base; + const ptrdiff_t _offset; + public: + LoadAtProxy(oop base, ptrdiff_t offset) : _base(base), _offset(offset) {} + + template + inline operator T() const { + return load_at(_base, _offset); + } + + template + inline bool operator ==(const T& other) const { return load_at(_base, _offset) == other; } + + template + inline bool operator !=(const T& other) const { return load_at(_base, _offset) != other; } + }; + + + template + class OopLoadAtProxy: public StackObj { + private: + const oop _base; + const ptrdiff_t _offset; + public: + OopLoadAtProxy(oop base, ptrdiff_t offset) : _base(base), _offset(offset) {} + + inline operator oop() const { + return load_at(_base, _offset); + } + + inline operator narrowOop() const { + return load_at(_base, _offset); + } + + template + inline bool operator ==(const T& other) const { + return load_at(_base, _offset) == other; + } + + template + inline bool operator !=(const T& other) const { + return load_at(_base, _offset) != other; + } + }; +} +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/oops/access.hpp" 2 +# 93 "/home/rehn/source/jdk/open/src/hotspot/share/oops/access.hpp" +template +class Access: public AllStatic { + + + + + + template + static void verify_decorators(); + + template + static void verify_primitive_decorators() { + const DecoratorSet primitive_decorators = (AS_DECORATOR_MASK ^ AS_NO_KEEPALIVE) | + IN_HEAP | IS_ARRAY; + verify_decorators(); + } + + template + static void verify_oop_decorators() { + const DecoratorSet oop_decorators = AS_DECORATOR_MASK | IN_DECORATOR_MASK | + (ON_DECORATOR_MASK ^ ON_UNKNOWN_OOP_REF) | + IS_ARRAY | IS_NOT_NULL | IS_DEST_UNINITIALIZED; + verify_decorators(); + } + + template + static void verify_heap_oop_decorators() { + const DecoratorSet heap_oop_decorators = AS_DECORATOR_MASK | ON_DECORATOR_MASK | + IN_HEAP | IS_ARRAY | IS_NOT_NULL | IS_DEST_UNINITIALIZED; + verify_decorators(); + } + + static const DecoratorSet load_mo_decorators = MO_UNORDERED | MO_RELAXED | MO_ACQUIRE | MO_SEQ_CST; + static const DecoratorSet store_mo_decorators = MO_UNORDERED | MO_RELAXED | MO_RELEASE | MO_SEQ_CST; + static const DecoratorSet atomic_xchg_mo_decorators = MO_SEQ_CST; + static const DecoratorSet atomic_cmpxchg_mo_decorators = MO_RELAXED | MO_SEQ_CST; + +protected: + template + static inline bool oop_arraycopy(arrayOop src_obj, size_t src_offset_in_bytes, const T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length) { + verify_decorators(); + return AccessInternal::arraycopy(src_obj, src_offset_in_bytes, src_raw, + dst_obj, dst_offset_in_bytes, dst_raw, + length); + } + + template + static inline void arraycopy(arrayOop src_obj, size_t src_offset_in_bytes, const T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length) { + verify_decorators(); + AccessInternal::arraycopy(src_obj, src_offset_in_bytes, src_raw, + dst_obj, dst_offset_in_bytes, dst_raw, + length); + } + +public: + + static inline AccessInternal::LoadAtProxy load_at(oop base, ptrdiff_t offset) { + verify_primitive_decorators(); + return AccessInternal::LoadAtProxy(base, offset); + } + + template + static inline void store_at(oop base, ptrdiff_t offset, T value) { + verify_primitive_decorators(); + AccessInternal::store_at(base, offset, value); + } + + template + static inline T atomic_cmpxchg_at(oop base, ptrdiff_t offset, T compare_value, T new_value) { + verify_primitive_decorators(); + return AccessInternal::atomic_cmpxchg_at(base, offset, compare_value, new_value); + } + + template + static inline T atomic_xchg_at(oop base, ptrdiff_t offset, T new_value) { + verify_primitive_decorators(); + return AccessInternal::atomic_xchg_at(base, offset, new_value); + } + + + static inline AccessInternal::OopLoadAtProxy oop_load_at(oop base, ptrdiff_t offset) { + verify_heap_oop_decorators(); + return AccessInternal::OopLoadAtProxy(base, offset); + } + + template + static inline void oop_store_at(oop base, ptrdiff_t offset, T value) { + verify_heap_oop_decorators(); + typedef typename AccessInternal::OopOrNarrowOop::type OopType; + OopType oop_value = value; + AccessInternal::store_at(base, offset, oop_value); + } + + template + static inline T oop_atomic_cmpxchg_at(oop base, ptrdiff_t offset, T compare_value, T new_value) { + verify_heap_oop_decorators(); + typedef typename AccessInternal::OopOrNarrowOop::type OopType; + OopType new_oop_value = new_value; + OopType compare_oop_value = compare_value; + return AccessInternal::atomic_cmpxchg_at(base, offset, compare_oop_value, new_oop_value); + } + + template + static inline T oop_atomic_xchg_at(oop base, ptrdiff_t offset, T new_value) { + verify_heap_oop_decorators(); + typedef typename AccessInternal::OopOrNarrowOop::type OopType; + OopType new_oop_value = new_value; + return AccessInternal::atomic_xchg_at(base, offset, new_oop_value); + } + + + static inline void clone(oop src, oop dst, size_t size) { + verify_decorators(); + AccessInternal::clone(src, dst, size); + } + + + template + static inline P load(P* addr) { + verify_primitive_decorators(); + return AccessInternal::load(addr); + } + + template + static inline void store(P* addr, T value) { + verify_primitive_decorators(); + AccessInternal::store(addr, value); + } + + template + static inline T atomic_cmpxchg(P* addr, T compare_value, T new_value) { + verify_primitive_decorators(); + return AccessInternal::atomic_cmpxchg(addr, compare_value, new_value); + } + + template + static inline T atomic_xchg(P* addr, T new_value) { + verify_primitive_decorators(); + return AccessInternal::atomic_xchg(addr, new_value); + } + + + template + static inline AccessInternal::OopLoadProxy oop_load(P* addr) { + verify_oop_decorators(); + return AccessInternal::OopLoadProxy(addr); + } + + template + static inline void oop_store(P* addr, T value) { + verify_oop_decorators(); + typedef typename AccessInternal::OopOrNarrowOop::type OopType; + OopType oop_value = value; + AccessInternal::store(addr, oop_value); + } + + template + static inline T oop_atomic_cmpxchg(P* addr, T compare_value, T new_value) { + verify_oop_decorators(); + typedef typename AccessInternal::OopOrNarrowOop::type OopType; + OopType new_oop_value = new_value; + OopType compare_oop_value = compare_value; + return AccessInternal::atomic_cmpxchg(addr, compare_oop_value, new_oop_value); + } + + template + static inline T oop_atomic_xchg(P* addr, T new_value) { + verify_oop_decorators(); + typedef typename AccessInternal::OopOrNarrowOop::type OopType; + OopType new_oop_value = new_value; + return AccessInternal::atomic_xchg(addr, new_oop_value); + } +}; + + + +template +class RawAccess: public Access {}; + + + +template +class HeapAccess: public Access {}; + + + +template +class NativeAccess: public Access {}; + + + +template +class NMethodAccess: public Access {}; + + +template +class ArrayAccess: public HeapAccess { + typedef HeapAccess AccessT; +public: + template + static inline void arraycopy(arrayOop src_obj, size_t src_offset_in_bytes, + arrayOop dst_obj, size_t dst_offset_in_bytes, + size_t length) { + AccessT::arraycopy(src_obj, src_offset_in_bytes, static_cast(nullptr), + dst_obj, dst_offset_in_bytes, static_cast(nullptr), + length); + } + + template + static inline void arraycopy_to_native(arrayOop src_obj, size_t src_offset_in_bytes, + T* dst, + size_t length) { + AccessT::arraycopy(src_obj, src_offset_in_bytes, static_cast(nullptr), + nullptr, 0, dst, + length); + } + + template + static inline void arraycopy_from_native(const T* src, + arrayOop dst_obj, size_t dst_offset_in_bytes, + size_t length) { + AccessT::arraycopy(nullptr, 0, src, + dst_obj, dst_offset_in_bytes, static_cast(nullptr), + length); + } + + static inline bool oop_arraycopy(arrayOop src_obj, size_t src_offset_in_bytes, + arrayOop dst_obj, size_t dst_offset_in_bytes, + size_t length) { + return AccessT::oop_arraycopy(src_obj, src_offset_in_bytes, static_cast(nullptr), + dst_obj, dst_offset_in_bytes, static_cast(nullptr), + length); + } + + template + static inline bool oop_arraycopy_raw(T* src, T* dst, size_t length) { + return AccessT::oop_arraycopy(nullptr, 0, src, + nullptr, 0, dst, + length); + } + +}; + +template +template +void Access::verify_decorators() { + static_assert(((~expected_decorators & decorators) == 0), "(~expected_decorators & decorators) == 0"); + const DecoratorSet barrier_strength_decorators = decorators & AS_DECORATOR_MASK; + static_assert((barrier_strength_decorators == 0 || ( (barrier_strength_decorators ^ AS_NO_KEEPALIVE) == 0 || (barrier_strength_decorators ^ AS_RAW) == 0 || (barrier_strength_decorators ^ AS_NORMAL) == 0 )), "barrier_strength_decorators == 0 || ( (barrier_strength_decorators ^ AS_NO_KEEPALIVE) == 0 || (barrier_strength_decorators ^ AS_RAW) == 0 || (barrier_strength_decorators ^ AS_NORMAL) == 0 )") + + + + ; + const DecoratorSet ref_strength_decorators = decorators & ON_DECORATOR_MASK; + static_assert((ref_strength_decorators == 0 || ( (ref_strength_decorators ^ ON_STRONG_OOP_REF) == 0 || (ref_strength_decorators ^ ON_WEAK_OOP_REF) == 0 || (ref_strength_decorators ^ ON_PHANTOM_OOP_REF) == 0 || (ref_strength_decorators ^ ON_UNKNOWN_OOP_REF) == 0 )), "ref_strength_decorators == 0 || ( (ref_strength_decorators ^ ON_STRONG_OOP_REF) == 0 || (ref_strength_decorators ^ ON_WEAK_OOP_REF) == 0 || (ref_strength_decorators ^ ON_PHANTOM_OOP_REF) == 0 || (ref_strength_decorators ^ ON_UNKNOWN_OOP_REF) == 0 )") + + + + + ; + const DecoratorSet memory_ordering_decorators = decorators & MO_DECORATOR_MASK; + static_assert((memory_ordering_decorators == 0 || ( (memory_ordering_decorators ^ MO_UNORDERED) == 0 || (memory_ordering_decorators ^ MO_RELAXED) == 0 || (memory_ordering_decorators ^ MO_ACQUIRE) == 0 || (memory_ordering_decorators ^ MO_RELEASE) == 0 || (memory_ordering_decorators ^ MO_SEQ_CST) == 0 )), "memory_ordering_decorators == 0 || ( (memory_ordering_decorators ^ MO_UNORDERED) == 0 || (memory_ordering_decorators ^ MO_RELAXED) == 0 || (memory_ordering_decorators ^ MO_ACQUIRE) == 0 || (memory_ordering_decorators ^ MO_RELEASE) == 0 || (memory_ordering_decorators ^ MO_SEQ_CST) == 0 )") + + + + + + ; + const DecoratorSet location_decorators = decorators & IN_DECORATOR_MASK; + static_assert((location_decorators == 0 || ( (location_decorators ^ IN_NATIVE) == 0 || (location_decorators ^ IN_NMETHOD) == 0 || (location_decorators ^ IN_HEAP) == 0 )), "location_decorators == 0 || ( (location_decorators ^ IN_NATIVE) == 0 || (location_decorators ^ IN_NMETHOD) == 0 || (location_decorators ^ IN_HEAP) == 0 )") + + + + ; +} +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/access.inline.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/barrierSet.inline.hpp" 1 +# 27 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/barrierSet.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/barrierSet.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/barrierSet.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/fakeRttiSupport.hpp" 1 +# 51 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/fakeRttiSupport.hpp" +template +class FakeRttiSupport { + friend class VMStructs; +public: + + + explicit FakeRttiSupport(TagType concrete_tag) : + _tag_set(tag_bit(concrete_tag)), _concrete_tag(concrete_tag) { } + + + + + FakeRttiSupport(TagType concrete_tag, uintx tag_set) : + _tag_set(tag_set), _concrete_tag(validate_tag(concrete_tag)) { } + + + TagType concrete_tag() const { return _concrete_tag; } + + + bool has_tag(TagType tag) const { + return (_tag_set & tag_bit(tag)) != 0; + } + + + + + FakeRttiSupport add_tag(TagType tag) const { + uintx tbit = tag_bit(tag); + + + ; + return FakeRttiSupport(_concrete_tag, _tag_set | tbit); + } + +private: + uintx _tag_set; + TagType _concrete_tag; + + static uintx tag_bit(TagType tag) { + return ((uintx)1) << validate_tag(tag); + } + + static TagType validate_tag(TagType tag) { + ; + + ; + return tag; + } +}; +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/barrierSet.hpp" 2 + + +class BarrierSetAssembler; +class BarrierSetC1; +class BarrierSetC2; +class BarrierSetNMethod; +class BarrierSetStackChunk; +class JavaThread; + + + + +class BarrierSet: public CHeapObj { + friend class VMStructs; + + static BarrierSet* _barrier_set; + +public: + enum Name { + + ModRef , CardTableBarrierSet , EpsilonBarrierSet , G1BarrierSet , ShenandoahBarrierSet , XBarrierSet , ZBarrierSet , + + UnknownBS + }; + +protected: +# 70 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/barrierSet.hpp" + typedef FakeRttiSupport FakeRtti; + +private: + FakeRtti _fake_rtti; + BarrierSetAssembler* _barrier_set_assembler; + BarrierSetC1* _barrier_set_c1; + BarrierSetC2* _barrier_set_c2; + BarrierSetNMethod* _barrier_set_nmethod; + BarrierSetStackChunk* _barrier_set_stack_chunk; + +public: + + + template struct GetName; + + + + template struct GetType; + + + + BarrierSet::Name kind() const { return _fake_rtti.concrete_tag(); } + + + bool is_a(BarrierSet::Name bsn) const { return _fake_rtti.has_tag(bsn); } + + + +protected: + BarrierSet(BarrierSetAssembler* barrier_set_assembler, + BarrierSetC1* barrier_set_c1, + BarrierSetC2* barrier_set_c2, + BarrierSetNMethod* barrier_set_nmethod, + BarrierSetStackChunk* barrier_set_stack_chunk, + const FakeRtti& fake_rtti); + ~BarrierSet() { } + + template + static BarrierSetAssembler* make_barrier_set_assembler() { + return new BarrierSetAssemblerT() ; + } + + template + static BarrierSetC1* make_barrier_set_c1() { + return new BarrierSetC1T() ; + } + + template + static BarrierSetC2* make_barrier_set_c2() { + return new BarrierSetC2T() ; + } + +public: + + + + + + virtual void on_slowpath_allocation_exit(JavaThread* thread, oop new_obj) {} + virtual void on_thread_create(Thread* thread) {} + virtual void on_thread_destroy(Thread* thread) {} +# 140 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/barrierSet.hpp" + virtual void on_thread_attach(Thread* thread); + virtual void on_thread_detach(Thread* thread) {} + + virtual void make_parsable(JavaThread* thread) {} + +public: + + virtual void print_on(outputStream* st) const = 0; + + static BarrierSet* barrier_set() { return _barrier_set; } + static void set_barrier_set(BarrierSet* barrier_set); + + BarrierSetAssembler* barrier_set_assembler() { + ; + return _barrier_set_assembler; + } + + BarrierSetC1* barrier_set_c1() { + ; + return _barrier_set_c1; + } + + BarrierSetC2* barrier_set_c2() { + ; + return _barrier_set_c2; + } + + BarrierSetNMethod* barrier_set_nmethod() { + return _barrier_set_nmethod; + } + + BarrierSetStackChunk* barrier_set_stack_chunk() { + ; + return _barrier_set_stack_chunk; + } +# 187 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/barrierSet.hpp" + template + class AccessBarrier: protected RawAccessBarrier { + private: + typedef RawAccessBarrier Raw; + + public: + + + + template + static T load_in_heap(T* addr) { + return Raw::template load(addr); + } + + template + static T load_in_heap_at(oop base, ptrdiff_t offset) { + return Raw::template load_at(base, offset); + } + + template + static void store_in_heap(T* addr, T value) { + Raw::store(addr, value); + } + + template + static void store_in_heap_at(oop base, ptrdiff_t offset, T value) { + Raw::store_at(base, offset, value); + } + + template + static T atomic_cmpxchg_in_heap(T* addr, T compare_value, T new_value) { + return Raw::atomic_cmpxchg(addr, compare_value, new_value); + } + + template + static T atomic_cmpxchg_in_heap_at(oop base, ptrdiff_t offset, T compare_value, T new_value) { + return Raw::atomic_cmpxchg_at(base, offset, compare_value, new_value); + } + + template + static T atomic_xchg_in_heap(T* addr, T new_value) { + return Raw::atomic_xchg(addr, new_value); + } + + template + static T atomic_xchg_in_heap_at(oop base, ptrdiff_t offset, T new_value) { + return Raw::atomic_xchg_at(base, offset, new_value); + } + + template + static void arraycopy_in_heap(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length) { + Raw::arraycopy(src_obj, src_offset_in_bytes, src_raw, + dst_obj, dst_offset_in_bytes, dst_raw, + length); + } + + + + + template + static oop oop_load_in_heap(T* addr) { + return Raw::template oop_load(addr); + } + + static oop oop_load_in_heap_at(oop base, ptrdiff_t offset) { + return Raw::template oop_load_at(base, offset); + } + + template + static void oop_store_in_heap(T* addr, oop value) { + Raw::oop_store(addr, value); + } + + static void oop_store_in_heap_at(oop base, ptrdiff_t offset, oop value) { + Raw::oop_store_at(base, offset, value); + } + + template + static oop oop_atomic_cmpxchg_in_heap(T* addr, oop compare_value, oop new_value) { + return Raw::oop_atomic_cmpxchg(addr, compare_value, new_value); + } + + static oop oop_atomic_cmpxchg_in_heap_at(oop base, ptrdiff_t offset, oop compare_value, oop new_value) { + return Raw::oop_atomic_cmpxchg_at(base, offset, compare_value, new_value); + } + + template + static oop oop_atomic_xchg_in_heap(T* addr, oop new_value) { + return Raw::oop_atomic_xchg(addr, new_value); + } + + static oop oop_atomic_xchg_in_heap_at(oop base, ptrdiff_t offset, oop new_value) { + return Raw::oop_atomic_xchg_at(base, offset, new_value); + } + + template + static bool oop_arraycopy_in_heap(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw, + arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw, + size_t length); + + + + + template + static oop oop_load_not_in_heap(T* addr) { + return Raw::template oop_load(addr); + } + + template + static void oop_store_not_in_heap(T* addr, oop value) { + Raw::oop_store(addr, value); + } + + template + static oop oop_atomic_cmpxchg_not_in_heap(T* addr, oop compare_value, oop new_value) { + return Raw::oop_atomic_cmpxchg(addr, compare_value, new_value); + } + + template + static oop oop_atomic_xchg_not_in_heap(T* addr, oop new_value) { + return Raw::oop_atomic_xchg(addr, new_value); + } + + + static void clone_in_heap(oop src, oop dst, size_t size) { + Raw::clone(src, dst, size); + } + }; +}; + +template +inline T* barrier_set_cast(BarrierSet* bs) { + ; + return static_cast(bs); +} +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/barrierSet.inline.hpp" 2 + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/compressedOops.inline.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/compressedOops.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/compressedOops.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/oops/compressedOops.hpp" +class outputStream; +class ReservedHeapSpace; + +struct NarrowPtrStruct { + + + address _base; + + + + int _shift; + + bool _use_implicit_null_checks; +}; + +class CompressedOops : public AllStatic { + friend class VMStructs; + + + static NarrowPtrStruct _narrow_oop; + + + static MemRegion _heap_address_range; + +public: +# 72 "/home/rehn/source/jdk/open/src/hotspot/share/oops/compressedOops.hpp" + enum Mode { + UnscaledNarrowOop = 0, + ZeroBasedNarrowOop = 1, + DisjointBaseNarrowOop = 2, + HeapBasedNarrowOop = 3, + AnyNarrowOopMode = 4 + }; + + + static_assert(std::is_same>::value, + "narrowOop has unexpected representation type"); + + static void initialize(const ReservedHeapSpace& heap_space); + + static void set_base(address base); + static void set_shift(int shift); + static void set_use_implicit_null_checks(bool use); + + static address base() { return _narrow_oop._base; } + static address begin() { return (address)_heap_address_range.start(); } + static address end() { return (address)_heap_address_range.end(); } + static bool is_base(void* addr) { return (base() == (address)addr); } + static int shift() { return _narrow_oop._shift; } + static bool use_implicit_null_checks() { return _narrow_oop._use_implicit_null_checks; } + + static address ptrs_base_addr() { return (address)&_narrow_oop._base; } + static address ptrs_base() { return _narrow_oop._base; } + + static bool is_in(void* addr); + static bool is_in(MemRegion mr); + + static Mode mode(); + static const char* mode_to_string(Mode mode); + + + static bool is_disjoint_heap_base_address(address addr); + + + static bool base_disjoint(); + + + + + static bool base_overlaps(); + + static void print_mode(outputStream* st); + + static bool is_null(oop v) { return v == nullptr; } + static bool is_null(narrowOop v) { return v == narrowOop::null; } + + static inline oop decode_raw_not_null(narrowOop v); + static inline oop decode_raw(narrowOop v); + static inline oop decode_not_null(narrowOop v); + static inline oop decode(narrowOop v); + static inline narrowOop encode_not_null(oop v); + static inline narrowOop encode(oop v); + + + static inline oop decode_raw_not_null(oop v); + static inline oop decode_not_null(oop v); + static inline oop decode(oop v); + static inline narrowOop encode_not_null(narrowOop v); + static inline narrowOop encode(narrowOop v); + + static inline uint32_t narrow_oop_value(oop o); + static inline uint32_t narrow_oop_value(narrowOop o); + + template + static inline narrowOop narrow_oop_cast(T i); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/compressedOops.inline.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/memory/universe.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/memory/universe.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/verifyOption.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/verifyOption.hpp" +enum class VerifyOption : uint { + Default = 0, + + + + G1UseConcMarking = Default, + + + G1UseFullMarking = G1UseConcMarking + 1, +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/memory/universe.hpp" 2 +# 42 "/home/rehn/source/jdk/open/src/hotspot/share/memory/universe.hpp" +class CollectedHeap; +class DeferredObjAllocEvent; +class OopStorage; +class ReservedHeapSpace; +class SerializeClosure; + + + + + +class LatestMethodCache : public CHeapObj { + + + private: + Klass* _klass; + int _method_idnum; + + public: + LatestMethodCache() { _klass = nullptr; _method_idnum = -1; } + ~LatestMethodCache() { _klass = nullptr; _method_idnum = -1; } + + void init(Klass* k, Method* m); + Klass* klass() const { return _klass; } + int method_idnum() const { return _method_idnum; } + + Method* get_method(); + + + + void serialize(SerializeClosure* f); + void metaspace_pointers_do(MetaspaceClosure* it); +}; + +class Universe: AllStatic { + + friend class MarkSweep; + friend class oopDesc; + friend class ClassLoader; + friend class SystemDictionary; + friend class ReservedHeapSpace; + friend class VMStructs; + friend class VM_PopulateDumpSharedSpace; + friend class Metaspace; + friend class MetaspaceShared; + friend class vmClasses; + + friend jint universe_init(); + friend void universe2_init(); + friend bool universe_post_init(); + friend void universe_post_module_init(); + + private: + + static Klass* _typeArrayKlassObjs[T_LONG+1]; + static Klass* _objectArrayKlassObj; + + + static Klass* _fillerArrayKlassObj; + + + static OopHandle _main_thread_group; + static OopHandle _system_thread_group; + + static OopHandle _the_empty_class_array; + static OopHandle _the_null_string; + static OopHandle _the_min_jint_string; + + static OopHandle _the_null_sentinel; + + + static OopHandle _out_of_memory_errors; + static OopHandle _class_init_stack_overflow_error; + + + static OopHandle _delayed_stack_overflow_error_message; + + static LatestMethodCache* _finalizer_register_cache; + static LatestMethodCache* _loader_addClass_cache; + static LatestMethodCache* _throw_illegal_access_error_cache; + static LatestMethodCache* _throw_no_such_method_error_cache; + static LatestMethodCache* _do_stack_walk_cache; + + static Array* _the_empty_int_array; + static Array* _the_empty_short_array; + static Array* _the_empty_klass_array; + static Array* _the_empty_instance_klass_array; + static Array* _the_empty_method_array; + + static Array* _the_array_interfaces_array; + + + static OopHandle _preallocated_out_of_memory_error_array; + + + static volatile jint _preallocated_out_of_memory_error_avail_count; + + + static OopHandle _msg_metaspace; + static OopHandle _msg_class_metaspace; + + static OopHandle _null_ptr_exception_instance; + static OopHandle _arithmetic_exception_instance; + static OopHandle _virtual_machine_error_instance; + + + static OopHandle _reference_pending_list; + + + static CollectedHeap* _collectedHeap; + + static intptr_t _non_oop_bits; + + + + + + + static int _base_vtable_size; + + + static bool _bootstrapping; + static bool _module_initialized; + static bool _fully_initialized; + + + static objArrayOop preallocated_out_of_memory_errors(); + + static objArrayOop out_of_memory_errors(); + + + static oop gen_out_of_memory_error(oop default_err); + + static OopStorage* _vm_weak; + static OopStorage* _vm_global; + + static jint initialize_heap(); + static void initialize_tlab(); + static void initialize_basic_type_mirrors(JavaThread* __the_thread__); + static void fixup_mirrors(JavaThread* __the_thread__); + + static void compute_base_vtable_size(); + + static void genesis(JavaThread* __the_thread__); + + + static oop check_mirror(oop m) { + ; + return m; + } + + + static int _verify_count; + static long verify_flags; + + static uintptr_t _verify_oop_mask; + static uintptr_t _verify_oop_bits; + + + + static OopHandle _basic_type_mirrors[T_VOID+1]; + + + + + static int _archived_basic_type_mirror_indices[T_VOID+1]; + + + public: + static void calculate_verify_data(HeapWord* low_boundary, HeapWord* high_boundary) {}; + static void set_verify_data(uintptr_t mask, uintptr_t bits) {}; + + + static Klass* boolArrayKlassObj() { return typeArrayKlassObj(T_BOOLEAN); } + static Klass* byteArrayKlassObj() { return typeArrayKlassObj(T_BYTE); } + static Klass* charArrayKlassObj() { return typeArrayKlassObj(T_CHAR); } + static Klass* intArrayKlassObj() { return typeArrayKlassObj(T_INT); } + static Klass* shortArrayKlassObj() { return typeArrayKlassObj(T_SHORT); } + static Klass* longArrayKlassObj() { return typeArrayKlassObj(T_LONG); } + static Klass* floatArrayKlassObj() { return typeArrayKlassObj(T_FLOAT); } + static Klass* doubleArrayKlassObj() { return typeArrayKlassObj(T_DOUBLE); } + + static Klass* objectArrayKlassObj() { return _objectArrayKlassObj; } + + static Klass* fillerArrayKlassObj() { return _fillerArrayKlassObj; } + + static Klass* typeArrayKlassObj(BasicType t) { + ; + ; + ; + return _typeArrayKlassObjs[t]; + } + + + static oop int_mirror(); + static oop float_mirror(); + static oop double_mirror(); + static oop byte_mirror(); + static oop bool_mirror(); + static oop char_mirror(); + static oop long_mirror(); + static oop short_mirror(); + static oop void_mirror(); + + static oop java_mirror(BasicType t); + + + static void set_archived_basic_type_mirror_index(BasicType t, int index); + static void update_archived_basic_type_mirrors(); + + + static oop main_thread_group(); + static void set_main_thread_group(oop group); + + static oop system_thread_group(); + static void set_system_thread_group(oop group); + + static objArrayOop the_empty_class_array (); + + static oop the_null_string(); + static oop the_min_jint_string(); + + static oop null_ptr_exception_instance(); + static oop arithmetic_exception_instance(); + static oop virtual_machine_error_instance(); + static oop vm_exception() { return virtual_machine_error_instance(); } + + static Array* the_array_interfaces_array() { return _the_array_interfaces_array; } + static Method* finalizer_register_method() { return _finalizer_register_cache->get_method(); } + static Method* loader_addClass_method() { return _loader_addClass_cache->get_method(); } + + static Method* throw_illegal_access_error() { return _throw_illegal_access_error_cache->get_method(); } + static Method* throw_no_such_method_error() { return _throw_no_such_method_error_cache->get_method(); } + + static Method* do_stack_walk_method() { return _do_stack_walk_cache->get_method(); } + + static oop the_null_sentinel(); + static address the_null_sentinel_addr() { return (address) &_the_null_sentinel; } + + + static void initialize_known_methods(JavaThread* __the_thread__); + + static void create_preallocated_out_of_memory_errors(JavaThread* __the_thread__); + + + + + + + + static oop reference_pending_list(); + static void clear_reference_pending_list(); + static bool has_reference_pending_list(); + static oop swap_reference_pending_list(oop list); + + static Array* the_empty_int_array() { return _the_empty_int_array; } + static Array* the_empty_short_array() { return _the_empty_short_array; } + static Array* the_empty_method_array() { return _the_empty_method_array; } + static Array* the_empty_klass_array() { return _the_empty_klass_array; } + static Array* the_empty_instance_klass_array() { return _the_empty_instance_klass_array; } + + + + + static oop out_of_memory_error_java_heap(); + static oop out_of_memory_error_c_heap(); + static oop out_of_memory_error_metaspace(); + static oop out_of_memory_error_class_metaspace(); + static oop out_of_memory_error_array_size(); + static oop out_of_memory_error_gc_overhead_limit(); + static oop out_of_memory_error_realloc_objects(); + + + static oop out_of_memory_error_retry(); + static oop delayed_stack_overflow_error_message(); + + + + static oop class_init_stack_overflow_error(); + static oop class_init_out_of_memory_error(); + + + static bool is_out_of_memory_error_metaspace(oop ex_obj); + static bool is_out_of_memory_error_class_metaspace(oop ex_obj); + + + static CollectedHeap* heap() { return _collectedHeap; } + + + + + + + static ReservedHeapSpace reserve_heap(size_t heap_size, size_t alignment); + + + static OopStorage* vm_weak(); + static OopStorage* vm_global(); + static void oopstorage_init(); + + + static bool is_bootstrapping() { return _bootstrapping; } + static bool is_module_initialized() { return _module_initialized; } + static bool is_fully_initialized() { return _fully_initialized; } + + static bool on_page_boundary(void* addr); + static bool should_fill_in_stack_trace(Handle throwable); + static void check_alignment(uintx size, uintx alignment, const char* name); + + + static void serialize(SerializeClosure* f); + + + + static void basic_type_classes_do(KlassClosure* closure); + static void metaspace_pointers_do(MetaspaceClosure* it); + + + enum VERIFY_FLAGS { + Verify_Threads = 1, + Verify_Heap = 2, + Verify_SymbolTable = 4, + Verify_StringTable = 8, + Verify_CodeCache = 16, + Verify_SystemDictionary = 32, + Verify_ClassLoaderDataGraph = 64, + Verify_MetaspaceUtils = 128, + Verify_JNIHandles = 256, + Verify_CodeCacheOops = 512, + Verify_ResolvedMethodTable = 1024, + Verify_StringDedup = 2048, + Verify_All = -1 + }; + static void initialize_verify_flags(); + static bool should_verify_subset(uint subset); + static void verify(VerifyOption option, const char* prefix); + static void verify(const char* prefix) { + verify(VerifyOption::Default, prefix); + } + static void verify() { + verify(""); + } + + static int verify_count() { return _verify_count; } + static void print_on(outputStream* st); + static void print_heap_at_SIGBREAK(); + + + + + + static void* non_oop_word(); + static bool contains_non_oop_word(void* p); + + + static uintptr_t verify_oop_mask() { return 0; }; + static uintptr_t verify_oop_bits() { return 0; }; + static uintptr_t verify_mark_bits() { return 0; }; + static uintptr_t verify_mark_mask() { return 0; }; + + + static int base_vtable_size() { return _base_vtable_size; } +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/compressedOops.inline.hpp" 2 +# 45 "/home/rehn/source/jdk/open/src/hotspot/share/oops/compressedOops.inline.hpp" +inline oop CompressedOops::decode_raw_not_null(narrowOop v) { + ; + return decode_raw(v); +} + +inline oop CompressedOops::decode_raw(narrowOop v) { + return cast_to_oop((uintptr_t)base() + ((uintptr_t)v << shift())); +} + +inline oop CompressedOops::decode_not_null(narrowOop v) { + ; + oop result = decode_raw(v); + ; + ; + return result; +} + +inline oop CompressedOops::decode(narrowOop v) { + return is_null(v) ? nullptr : decode_not_null(v); +} + +inline narrowOop CompressedOops::encode_not_null(oop v) { + ; + ; + ; + uint64_t pd = (uint64_t)(pointer_delta((void*)v, (void*)base(), 1)); + ; + narrowOop result = narrow_oop_cast(pd >> shift()); + ; + return result; +} + +inline narrowOop CompressedOops::encode(oop v) { + return is_null(v) ? narrowOop::null : encode_not_null(v); +} + +inline oop CompressedOops::decode_raw_not_null(oop v) { + ; + return v; +} + +inline oop CompressedOops::decode_not_null(oop v) { + ; + return v; +} + +inline oop CompressedOops::decode(oop v) { + ; + return v; +} + +inline narrowOop CompressedOops::encode_not_null(narrowOop v) { + return v; +} + +inline narrowOop CompressedOops::encode(narrowOop v) { + return v; +} + +inline uint32_t CompressedOops::narrow_oop_value(oop o) { + return narrow_oop_value(encode(o)); +} + +inline uint32_t CompressedOops::narrow_oop_value(narrowOop o) { + return static_cast(o); +} + +template +inline narrowOop CompressedOops::narrow_oop_cast(T i) { + static_assert(std::is_integral::value, "precondition"); + uint32_t narrow_value = static_cast(i); + + ; + return static_cast(narrow_value); +} +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/barrierSet.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/objArrayOop.inline.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/objArrayOop.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/objArrayOop.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/oops/objArrayOop.hpp" +class Klass; + + + + +class objArrayOopDesc : public arrayOopDesc { + friend class ArchiveHeapWriter; + friend class ObjArrayKlass; + friend class Runtime1; + friend class psPromotionManager; + friend class CSetMarkWordClosure; + friend class Continuation; + template + friend class RawOopWriter; + + template T* obj_at_addr(int index) const; + + template + static ptrdiff_t obj_at_offset(int index) { + return base_offset_in_bytes() + sizeof(T) * index; + } + +private: + + static int array_size(int length) { + const uint OopsPerHeapWord = HeapWordSize/heapOopSize; + + ; + uint res = ((uint)length + OopsPerHeapWord - 1)/OopsPerHeapWord; +# 77 "/home/rehn/source/jdk/open/src/hotspot/share/oops/objArrayOop.hpp" + return res; + } + + public: + + static int base_offset_in_bytes() { + return arrayOopDesc::base_offset_in_bytes(T_OBJECT); + } + + + HeapWord* base() const; + + + oop obj_at(int index) const; + + void obj_at_put(int index, oop value); + + oop replace_if_null(int index, oop exchange_value); + + + static int header_size() { return arrayOopDesc::header_size(T_OBJECT); } + size_t object_size() { return object_size(length()); } + + static size_t object_size(int length) { + + uint asz = array_size(length); + uint osz = align_object_size(header_size() + asz); + ; + ; + return (size_t)osz; + } + + Klass* element_klass(); + +public: + + template + void oop_iterate_range(OopClosureType* blk, int start, int end); +}; + + +static_assert(std::is_trivially_default_constructible::value, "required"); +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/objArrayOop.inline.hpp" 2 + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oop.inline.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oop.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.inline.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoaderData.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoaderData.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/weakHandle.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/weakHandle.hpp" +class outputStream; +class OopStorage; +# 42 "/home/rehn/source/jdk/open/src/hotspot/share/oops/weakHandle.hpp" +class WeakHandle { + public: + private: + oop* _obj; + + WeakHandle(oop* w) : _obj(w) {} + public: + WeakHandle() : _obj(nullptr) {} + WeakHandle(OopStorage* storage, Handle obj); + WeakHandle(OopStorage* storage, oop obj); + + inline oop resolve() const; + inline oop peek() const; + void release(OopStorage* storage) const; + bool is_null() const { return _obj == nullptr; } + void set_null() { _obj = nullptr; } + + void replace(oop with_obj); + + void print() const; + void print_on(outputStream* st) const; + + bool is_empty() const { return _obj == nullptr; } + oop* ptr_raw() const { return _obj; } +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoaderData.hpp" 2 +# 55 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoaderData.hpp" +class ClassLoaderDataGraph; +class JNIMethodBlock; +class ModuleEntry; +class PackageEntry; +class ModuleEntryTable; +class PackageEntryTable; +class DictionaryEntry; +class Dictionary; +class ClassLoaderMetaspace; + + + +class ClassLoaderData : public CHeapObj { + friend class VMStructs; + + private: + class ChunkedHandleList { + struct Chunk : public CHeapObj { + static const size_t CAPACITY = 32; + + oop _data[CAPACITY]; + volatile juint _size; + Chunk* _next; + + Chunk(Chunk* c) : _size(0), _next(c) { } + }; + + Chunk* volatile _head; + + void oops_do_chunk(OopClosure* f, Chunk* c, const juint size); + + public: + ChunkedHandleList() : _head(nullptr) {} + ~ChunkedHandleList(); + + + + OopHandle add(oop o); + bool contains(oop p); + + void oops_do(OopClosure* f); + + int count() const; + }; + + friend class ClassLoaderDataGraph; + template + friend class ClassLoaderDataGraphIteratorBase; + friend class ClassLoaderDataGraphKlassIteratorAtomic; + friend class ClassLoaderDataGraphKlassIteratorStatic; + friend class ClassLoaderDataGraphMetaspaceIterator; + friend class Klass; + friend class MetaDataFactory; + friend class Method; + + static ClassLoaderData * _the_null_class_loader_data; + + WeakHandle _holder; + OopHandle _class_loader; + + + ClassLoaderMetaspace * volatile _metaspace; + + Mutex* _metaspace_lock; + bool _unloading; + bool _has_class_mirror_holder; + + + + + + bool _modified_oops; + + int _keep_alive; + + + + + volatile int _claim; + + ChunkedHandleList _handles; + + + + + Klass* volatile _klasses; + PackageEntryTable* volatile _packages; + ModuleEntryTable* volatile _modules; + ModuleEntry* _unnamed_module; + Dictionary* _dictionary; + + + + + JNIMethodBlock* _jmethod_ids; + + + + GrowableArray* _deallocate_list; +# 177 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoaderData.hpp" + ClassLoaderData* _next; + ClassLoaderData* _unloading_next; + + Klass* _class_loader_klass; + Symbol* _name; + Symbol* _name_and_id; + mutable traceid _trace_id; + + void set_next(ClassLoaderData* next); + ClassLoaderData* next() const; + void unlink_next(); + + void set_unloading_next(ClassLoaderData* unloading_next); + ClassLoaderData* unloading_next() const; + + ClassLoaderData(Handle h_class_loader, bool has_class_mirror_holder); + ~ClassLoaderData(); + + + + + void clear_modified_oops() { _modified_oops = false; } + public: + void record_modified_oops() { _modified_oops = true; } + bool has_modified_oops() { return _modified_oops; } + + oop holder_no_keepalive() const; + oop holder() const; + + private: + void unload(); + bool keep_alive() const { return _keep_alive > 0; } + + void classes_do(void f(Klass* const)); + void loaded_classes_do(KlassClosure* klass_closure); + void classes_do(void f(InstanceKlass*)); + void methods_do(void f(Method*)); + void modules_do(void f(ModuleEntry*)); + void packages_do(void f(PackageEntry*)); + + + void free_deallocate_list(); + void free_deallocate_list_C_heap_structures(); + + Dictionary* create_dictionary(); + + void demote_strong_roots(); + + void initialize_name(Handle class_loader); + + public: + + + + + enum Claim { + _claim_none = 0, + _claim_finalizable = 2, + _claim_strong = 3, + _claim_stw_fullgc_mark = 4, + _claim_stw_fullgc_adjust = 8, + _claim_other = 16 + }; + void clear_claim() { _claim = 0; } + void clear_claim(int claim); + void verify_not_claimed(int claim) {}; + bool claimed() const { return _claim != 0; } + bool claimed(int claim) const { return (_claim & claim) == claim; } + bool try_claim(int claim); + + + + bool is_alive() const; + + + ClassLoaderMetaspace* metaspace_or_null() const { return _metaspace; } + + static ClassLoaderData* the_null_class_loader_data() { + return _the_null_class_loader_data; + } + + Mutex* metaspace_lock() const { return _metaspace_lock; } + + bool has_class_mirror_holder() const { return _has_class_mirror_holder; } + + static void init_null_class_loader_data(); + + bool is_the_null_class_loader_data() const { + return this == _the_null_class_loader_data; + } + + + + bool is_system_class_loader_data() const; + + + + bool is_platform_class_loader_data() const; + + + + inline bool is_boot_class_loader_data() const; + + bool is_builtin_class_loader_data() const; + bool is_permanent_class_loader_data() const; + + OopHandle class_loader_handle() const { return _class_loader; } + + + + ClassLoaderMetaspace* metaspace_non_null(); + + inline oop class_loader() const; + inline oop class_loader_no_keepalive() const; + + + + + + bool is_unloading() const { + ; + return _unloading; + } + + + void inc_keep_alive(); + void dec_keep_alive(); + + void initialize_holder(Handle holder); + + void oops_do(OopClosure* f, int claim_value, bool clear_modified_oops = false); + + void classes_do(KlassClosure* klass_closure); + Klass* klasses() { return _klasses; } + + JNIMethodBlock* jmethod_ids() const { return _jmethod_ids; } + void set_jmethod_ids(JNIMethodBlock* new_block) { _jmethod_ids = new_block; } + + void print() const; + void print_on(outputStream* out) const {}; + void print_value() const; + void print_value_on(outputStream* out) const; + void verify(); + + OopHandle add_handle(Handle h); + void remove_handle(OopHandle h); + void init_handle_locked(OopHandle& pd, Handle h); + void add_class(Klass* k, bool publicize = true); + void remove_class(Klass* k); + bool contains_klass(Klass* k); + void record_dependency(const Klass* to); + PackageEntryTable* packages() { return _packages; } + ModuleEntry* unnamed_module() { return _unnamed_module; } + ModuleEntryTable* modules(); + bool modules_defined() { return (_modules != nullptr); } + + + static ByteSize holder_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ClassLoaderData)]; ClassLoaderData* dummyObj = (ClassLoaderData*)space; char* c = (char*)(void*)&dummyObj->_holder; return (size_t)(c - space); }())); } + static ByteSize keep_alive_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ClassLoaderData)]; ClassLoaderData* dummyObj = (ClassLoaderData*)space; char* c = (char*)(void*)&dummyObj->_keep_alive; return (size_t)(c - space); }())); } + + + Dictionary* dictionary() const { return _dictionary; } + + void add_to_deallocate_list(Metadata* m); + + static ClassLoaderData* class_loader_data(oop loader); + static ClassLoaderData* class_loader_data_or_null(oop loader); + + + + Klass* class_loader_klass() const { return _class_loader_klass; } + + + + + const char* loader_name() const; + + Symbol* name() const { return _name; } + + + const char* loader_name_and_id() const; + Symbol* name_and_id() const { return _name_and_id; } + + unsigned identity_hash() const { + return (unsigned)((uintptr_t)this >> LogBytesPerWord); + } + + traceid trace_id() const { return _trace_id; } traceid* trace_id_addr() const { return &_trace_id; } void set_trace_id(traceid id) const { _trace_id = id; }; +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/nmethod.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/code/nmethod.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/compiledMethod.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/code/compiledMethod.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeBlob.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeBlob.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/asm/codeBuffer.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/asm/codeBuffer.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/oopRecorder.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/code/oopRecorder.hpp" +class CodeBlob; + +template class ValueRecorder : public StackObj { + public: + + + + + + + ValueRecorder(Arena* arena = nullptr); + + + + + + int allocate_index(T h) { + return add_handle(h, false); + } + + + + + + int find_index(T h) { + int index = maybe_find_index(h); + if (index < 0) { + index = add_handle(h, true); + } + return index; + } + + + + int size(); + + + T at(int index); + + int count() { + if (_handles == nullptr) return 0; + + return _handles->length() + first_index; + } + + + inline bool is_real(T h); + + + void copy_values_to(nmethod* nm); + + bool is_unused() { return _handles == nullptr && !_complete; } + + + + + private: + + int maybe_find_index(T h); + + + template class IndexCache : public ArenaObj { + + friend class ValueRecorder; + enum { + _log_cache_size = 9, + _cache_size = (1<<_log_cache_size), + + _collision_bit_shift = 0, + _collision_bit = 1, + _index_shift = _collision_bit_shift+1 + }; + int _cache[_cache_size]; + static juint cache_index(X handle) { + juint ci = (int) (intptr_t) handle; + ci ^= ci >> (BitsPerByte*2); + ci += ci >> (BitsPerByte*1); + return ci & (_cache_size-1); + } + int* cache_location(X handle) { + return &_cache[ cache_index(handle) ]; + } + static bool cache_location_collision(int* cloc) { + return ((*cloc) & _collision_bit) != 0; + } + static int cache_location_index(int* cloc) { + return (*cloc) >> _index_shift; + } + static void set_cache_location_index(int* cloc, int index) { + int cval0 = (*cloc); + int cval1 = (index << _index_shift); + if (cval0 != 0 && cval1 != cval0) cval1 += _collision_bit; + (*cloc) = cval1; + } + IndexCache(); + }; + + void maybe_initialize(); + int add_handle(T h, bool make_findable); + + enum { null_index = 0, first_index = 1, index_cache_threshold = 20 }; + + GrowableArray* _handles; + GrowableArray* _no_finds; + IndexCache* _indexes; + Arena* _arena; + bool _complete; + + + + +}; + +class OopRecorder; + +class ObjectLookup : public ResourceObj { + private: + class ObjectEntry { + private: + jobject _value; + int _index; + + public: + ObjectEntry(jobject value, int index) : _value(value), _index(index) {} + ObjectEntry() : _value(nullptr), _index(0) {} + oop oop_value() const; + int index() { return _index; } + }; + + GrowableArray _values; + unsigned int _gc_count; + + + static int sort_by_address(oop a, oop b); + static int sort_by_address(ObjectEntry* a, ObjectEntry* b); + static int sort_oop_by_address(oop const& a, ObjectEntry const& b); + + public: + ObjectLookup(); + + + void maybe_resort(); + int find_index(jobject object, OopRecorder* oop_recorder); +}; + +class OopRecorder : public ResourceObj { + private: + ValueRecorder _oops; + ValueRecorder _metadata; + ObjectLookup* _object_lookup; + public: + OopRecorder(Arena* arena = nullptr, bool deduplicate = false); + + int allocate_oop_index(jobject h) { + return _oops.allocate_index(h); + } + virtual int find_index(jobject h) { + return _object_lookup != nullptr ? _object_lookup->find_index(h, this) : _oops.find_index(h); + } + jobject oop_at(int index) { + return _oops.at(index); + } + int oop_size() { + return _oops.size(); + } + int oop_count() { + return _oops.count(); + } + inline bool is_real(jobject h); + + int allocate_metadata_index(Metadata* oop) { + return _metadata.allocate_index(oop); + } + virtual int find_index(Metadata* h) { + return _metadata.find_index(h); + } + Metadata* metadata_at(int index) { + return _metadata.at(index); + } + int metadata_size() { + return _metadata.size(); + } + int metadata_count() { + return _metadata.count(); + } + inline bool is_real(Metadata* h); + + bool is_unused() { + return _oops.is_unused() && _metadata.is_unused(); + } + + void freeze() { + _oops.size(); + _metadata.size(); + } + + void copy_values_to(nmethod* nm) { + if (!_oops.is_unused()) { + _oops.copy_values_to(nm); + } + if (!_metadata.is_unused()) { + _metadata.copy_values_to(nm); + } + } + + + + + + + +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/asm/codeBuffer.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/relocInfo.hpp" 1 +# 37 "/home/rehn/source/jdk/open/src/hotspot/share/code/relocInfo.hpp" +class nmethod; +class CodeBlob; +class CompiledMethod; +class Metadata; +class NativeMovConstReg; +# 252 "/home/rehn/source/jdk/open/src/hotspot/share/code/relocInfo.hpp" +class Relocation; +class CodeBuffer; +class CodeSection; +class RelocIterator; + +class relocInfo { + friend class RelocIterator; + public: + enum relocType { + none = 0, + oop_type = 1, + virtual_call_type = 2, + opt_virtual_call_type = 3, + static_call_type = 4, + static_stub_type = 5, + runtime_call_type = 6, + external_word_type = 7, + internal_word_type = 8, + section_word_type = 9, + poll_type = 10, + poll_return_type = 11, + metadata_type = 12, + trampoline_stub_type = 13, + runtime_call_w_cp_type = 14, + data_prefix_tag = 15, + post_call_nop_type = 16, + entry_guard_type = 17, + barrier_type = 18, + type_mask = 31 + }; + + private: + unsigned short _value; + + static const enum class RawBitsToken {} RAW_BITS{}; + + relocInfo(relocType type, RawBitsToken, int bits) + : _value(checked_cast((type << nontype_width) + bits)) { } + + static relocType check_relocType(relocType type) { return type; }; + + static void check_offset_and_format(int offset, int format) {}; + + static int compute_bits(int offset, int format) { + check_offset_and_format(offset, format); + return (offset / offset_unit) + (format << offset_width); + } + + public: + relocInfo(relocType type, int offset, int format = 0) + : relocInfo(check_relocType(type), RAW_BITS, compute_bits(offset, format)) {} +# 324 "/home/rehn/source/jdk/open/src/hotspot/share/code/relocInfo.hpp" + public: + enum : unsigned short{ + value_width = sizeof(unsigned short) * BitsPerByte, + type_width = 5, + nontype_width = value_width - type_width, + datalen_width = nontype_width-1, + datalen_tag = 1 << datalen_width, + datalen_limit = 1 << datalen_width, + datalen_mask = (1 << datalen_width)-1 + }; + + + public: + relocType type() const { return (relocType)((unsigned)_value >> nontype_width); } + int format() const { return format_mask==0? 0: format_mask & + ((unsigned)_value >> offset_width); } + int addr_offset() const { ; + return (_value & offset_mask)*offset_unit; } + + protected: + const short* data() const { ; + return (const short*)(this + 1); } + unsigned short datalen() const { ; + return (_value & datalen_mask); } + unsigned short immediate() const { ; + return (_value & datalen_mask); } + public: + static int addr_unit() { return offset_unit; } + static int offset_limit() { return (1 << offset_width) * offset_unit; } + + void set_type(relocType type); + + void remove() { set_type(none); } + + protected: + bool is_none() const { return type() == none; } + bool is_prefix() const { return type() == data_prefix_tag; } + bool is_datalen() const { ; + return (_value & datalen_tag) != 0; } + bool is_immediate() const { ; + return (_value & datalen_tag) == 0; } + + public: + + + + + + + + static relocInfo filler_info() { + return relocInfo(relocInfo::none, relocInfo::offset_limit() - relocInfo::offset_unit); + } +# 386 "/home/rehn/source/jdk/open/src/hotspot/share/code/relocInfo.hpp" + static relocInfo prefix_info(int datalen = 0) { + ; + return relocInfo(relocInfo::data_prefix_tag, relocInfo::RAW_BITS, relocInfo::datalen_tag | datalen); + } + + private: + + static relocInfo immediate_relocInfo(int data0) { + ; + return relocInfo(relocInfo::data_prefix_tag, RAW_BITS, data0); + } + static bool fits_into_immediate(int data0) { + return (data0 >= 0 && data0 < datalen_limit); + } + + public: + + + + + void initialize(CodeSection* dest, Relocation* reloc); + + + + + relocInfo* finish_prefix(short* prefix_limit); + + + + + + + static short data0_from_int(jint x) { return (short)(x >> value_width); } + static short data1_from_int(jint x) { return (short)x; } + static jint jint_from_data(short* data) { + return (data[0] << value_width) + (unsigned short)data[1]; + } + + static jint short_data_at(int n, short* data, int datalen) { + return datalen > n ? data[n] : 0; + } + + static jint jint_data_at(int n, short* data, int datalen) { + return datalen > n+1 ? jint_from_data(&data[n]) : short_data_at(n, data, datalen); + } + + + + + static void change_reloc_info_for_address(RelocIterator *itr, address pc, relocType old_type, relocType new_type); + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/relocInfo_riscv.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/relocInfo_riscv.hpp" + private: + enum { + + offset_unit = 1, + + + format_width = 2 + }; + + public: + + + + static bool mustIterateImmediateOopsInCode() { return false; } +# 439 "/home/rehn/source/jdk/open/src/hotspot/share/code/relocInfo.hpp" 2 + + protected: + + enum { + offset_width = nontype_width - format_width, + offset_mask = (1< 0 + }; +}; + + + +class oop_Relocation; class metadata_Relocation; class virtual_call_Relocation; class opt_virtual_call_Relocation; class static_call_Relocation; class static_stub_Relocation; class runtime_call_Relocation; class runtime_call_w_cp_Relocation; class external_word_Relocation; class internal_word_Relocation; class poll_Relocation; class poll_return_Relocation; class section_word_Relocation; class trampoline_stub_Relocation; class post_call_nop_Relocation; class entry_guard_Relocation; class barrier_Relocation; + + + + + +class RelocationHolder { + friend class Relocation; + + private: +# 484 "/home/rehn/source/jdk/open/src/hotspot/share/code/relocInfo.hpp" + static const size_t _relocbuf_size = 5 * sizeof(void*); + alignas(void*) char _relocbuf[_relocbuf_size]; + + template + void emplace_relocation(const Args&... args) { + static_assert(std::is_base_of::value, "not Relocation"); + static_assert(sizeof(Reloc) <= sizeof(_relocbuf), "_relocbuf too small"); + Relocation* reloc = ::new (_relocbuf) Reloc(args...); + + + ; + } + + + + template + void copy_into_impl(const Reloc& reloc) { + emplace_relocation(reloc); + } + + + + template struct Construct {}; + + + + template + RelocationHolder(Construct, const Args&... args) { + emplace_relocation(args...); + } + + public: + Relocation* reloc() const { return (Relocation*)_relocbuf; } + inline relocInfo::relocType type() const; + + + RelocationHolder plus(int offset) const; + + + template + static RelocationHolder construct(const Args&... args) { + return RelocationHolder(Construct(), args...); + } + + RelocationHolder(); + + + + ~RelocationHolder() = default; + + RelocationHolder(const RelocationHolder& from); + RelocationHolder& operator=(const RelocationHolder& from); + + static const RelocationHolder none; +}; +# 563 "/home/rehn/source/jdk/open/src/hotspot/share/code/relocInfo.hpp" +class RelocIterator : public StackObj { + friend class section_word_Relocation; + enum { SECT_LIMIT = 3 }; + friend class Relocation; + friend class relocInfo; + typedef relocInfo::relocType relocType; + + private: + address _limit; + relocInfo* _current; + relocInfo* _end; + CompiledMethod* _code; + address _addr; + short _databuf; + short* _data; + short _datalen; + + + address _section_start[SECT_LIMIT]; + address _section_end [SECT_LIMIT]; + + void set_has_current(bool b) { + _datalen = !b ? -1 : 0; + ; + } + void set_current(relocInfo& ri) { + _current = &ri; + set_has_current(true); + } + + RelocationHolder _rh; + + relocInfo* current() const { ; + return _current; } + + void set_limits(address begin, address limit); + + void advance_over_prefix(); + + void initialize_misc(); + + void initialize(CompiledMethod* nm, address begin, address limit); + + RelocIterator() { initialize_misc(); } + + public: + + RelocIterator(CompiledMethod* nm, address begin = nullptr, address limit = nullptr); + RelocIterator(CodeSection* cb, address begin = nullptr, address limit = nullptr); + + + bool next() { + _current++; + ; + if (_current == _end) { + set_has_current(false); + return false; + } + set_has_current(true); + + if (_current->is_prefix()) { + advance_over_prefix(); + ; + } + + _addr += _current->addr_offset(); + + if (_limit != nullptr && _addr >= _limit) { + set_has_current(false); + return false; + } + + return true; + } + + + address limit() const { return _limit; } + relocType type() const { return current()->type(); } + int format() const { return (relocInfo::have_format) ? current()->format() : 0; } + address addr() const { return _addr; } + CompiledMethod* code() const { return _code; } + short* data() const { return _data; } + int datalen() const { return _datalen; } + bool has_current() const { return _datalen >= 0; } + bool addr_in_const() const; + + address section_start(int n) const { + ; + return _section_start[n]; + } + address section_end(int n) const { + ; + return _section_end[n]; + } +# 665 "/home/rehn/source/jdk/open/src/hotspot/share/code/relocInfo.hpp" + inline oop_Relocation* oop_reloc(); inline metadata_Relocation* metadata_reloc(); inline virtual_call_Relocation* virtual_call_reloc(); inline opt_virtual_call_Relocation* opt_virtual_call_reloc(); inline static_call_Relocation* static_call_reloc(); inline static_stub_Relocation* static_stub_reloc(); inline runtime_call_Relocation* runtime_call_reloc(); inline runtime_call_w_cp_Relocation* runtime_call_w_cp_reloc(); inline external_word_Relocation* external_word_reloc(); inline internal_word_Relocation* internal_word_reloc(); inline poll_Relocation* poll_reloc(); inline poll_return_Relocation* poll_return_reloc(); inline section_word_Relocation* section_word_reloc(); inline trampoline_stub_Relocation* trampoline_stub_reloc(); inline post_call_nop_Relocation* post_call_nop_reloc(); inline entry_guard_Relocation* entry_guard_reloc(); inline barrier_Relocation* barrier_reloc(); + + + Relocation* reloc(); + + + + + + +}; + + + + + + +class Relocation { + friend class RelocIterator; + + private: + + + + RelocIterator* _binding; + + relocInfo::relocType _rtype; + + protected: + RelocIterator* binding() const { + ; + return _binding; + } + void set_binding(RelocIterator* b) { + ; + _binding = b; + ; + } + + explicit Relocation(relocInfo::relocType rtype) : _binding(nullptr), _rtype(rtype) { } + + + + + + template + static void copy_into_helper(const Reloc& reloc, RelocationHolder& holder) { + holder.copy_into_impl(reloc); + } + + public: + + static RelocationHolder spec_simple(relocInfo::relocType rtype); + + + virtual void pack_data_to(CodeSection* dest) { } + + + virtual void unpack_data() { + ; + } + + protected: +# 738 "/home/rehn/source/jdk/open/src/hotspot/share/code/relocInfo.hpp" + static bool is_short(jint x) { return x == (short)x; } + static short* add_short(short* p, short x) { *p++ = x; return p; } + static short* add_jint (short* p, jint x) { + *p++ = relocInfo::data0_from_int(x); *p++ = relocInfo::data1_from_int(x); + return p; + } + static short* add_var_int(short* p, jint x) { + if (is_short(x)) p = add_short(p, (short)x); + else p = add_jint (p, x); + return p; + } + + static short* pack_1_int_to(short* p, jint x0) { + + if (x0 != 0) p = add_var_int(p, x0); + return p; + } + int unpack_1_int() { + ; + return relocInfo::jint_data_at(0, data(), datalen()); + } + + + short* pack_2_ints_to(short* p, jint x0, jint x1) { + + if (x0 == 0 && x1 == 0) { + + } else if (is_short(x0) && is_short(x1)) { + + p = add_short(p, (short)x0); if (x1!=0) p = add_short(p, (short)x1); + } else { + + p = add_jint(p, x0); p = add_var_int(p, x1); + } + return p; + } + void unpack_2_ints(jint& x0, jint& x1) { + int dlen = datalen(); + short* dp = data(); + if (dlen <= 2) { + x0 = relocInfo::short_data_at(0, dp, dlen); + x1 = relocInfo::short_data_at(1, dp, dlen); + } else { + ; + x0 = relocInfo::jint_data_at(0, dp, dlen); + x1 = relocInfo::jint_data_at(2, dp, dlen); + } + } + + protected: + + void const_set_data_value (address x); + void const_verify_data_value (address x); + + void pd_set_data_value (address x, intptr_t off, bool verify_only = false); + void pd_verify_data_value (address x, intptr_t off) { pd_set_data_value(x, off, true); } + address pd_call_destination (address orig_addr = nullptr); + void pd_set_call_destination (address x); + + + address* pd_address_in_code (); + + + address pd_get_address_from_code (); + + + static jint scaled_offset(address x, address base) { + int byte_offset = checked_cast(x - base); + int offset = -byte_offset / relocInfo::addr_unit(); + ; + return offset; + } + static jint scaled_offset_null_special(address x, address base) { + + + if (x == nullptr) return 0; + ; + return scaled_offset(x, base); + } + static address address_from_scaled_offset(jint offset, address base) { + int byte_offset = -( offset * relocInfo::addr_unit() ); + return base + byte_offset; + } + + + address old_addr_for(address newa, const CodeBuffer* src, CodeBuffer* dest); + address new_addr_for(address olda, const CodeBuffer* src, CodeBuffer* dest); + void normalize_address(address& addr, const CodeSection* dest, bool allow_other_sections = false); + + public: + + address addr() const { return binding()->addr(); } + CompiledMethod* code() const { return binding()->code(); } + bool addr_in_const() const { return binding()->addr_in_const(); } + protected: + short* data() const { return binding()->data(); } + int datalen() const { return binding()->datalen(); } + + public: + + Relocation() : Relocation(relocInfo::none) {} + + + + + + ~Relocation() = default; + + int format() const { return binding()->format(); } + + relocInfo::relocType type() const { return _rtype; } + + + virtual void copy_into(RelocationHolder& holder) const; + + + virtual bool is_call() { return false; } + + + virtual bool is_data() { return false; } + + + virtual address value(); + + + virtual void set_value(address x); + + virtual bool clear_inline_cache() { return true; } + + + + + virtual void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) { } +}; + + + + +inline RelocationHolder::RelocationHolder() : + RelocationHolder(Construct()) +{} + +inline RelocationHolder::RelocationHolder(const RelocationHolder& from) { + from.reloc()->copy_into(*this); +} + +inline RelocationHolder& RelocationHolder::operator=(const RelocationHolder& from) { + + + + from.reloc()->copy_into(*this); + return *this; +} + +relocInfo::relocType RelocationHolder::type() const { + return reloc()->type(); +} + + + + + +class DataRelocation : public Relocation { + public: + DataRelocation(relocInfo::relocType type) : Relocation(type) {} + + bool is_data() override { return true; } + + + virtual int offset() { return 0; } + address value() override = 0; + void set_value(address x) override { set_value(x, offset()); } + void set_value(address x, intptr_t o) { + if (addr_in_const()) + const_set_data_value(x); + else + pd_set_data_value(x, o); + } + void verify_value(address x) { + if (addr_in_const()) + const_verify_data_value(x); + else + pd_verify_data_value(x, offset()); + } +# 934 "/home/rehn/source/jdk/open/src/hotspot/share/code/relocInfo.hpp" +}; + +class post_call_nop_Relocation : public Relocation { + friend class RelocationHolder; + +public: + post_call_nop_Relocation() : Relocation(relocInfo::post_call_nop_type) { } + + static RelocationHolder spec() { + return RelocationHolder::construct(); + } + + void copy_into(RelocationHolder& holder) const override; +}; + +class entry_guard_Relocation : public Relocation { + friend class RelocationHolder; + +public: + entry_guard_Relocation() : Relocation(relocInfo::entry_guard_type) { } + + static RelocationHolder spec() { + return RelocationHolder::construct(); + } + + void copy_into(RelocationHolder& holder) const override; +}; + + + +class CallRelocation : public Relocation { + public: + CallRelocation(relocInfo::relocType type) : Relocation(type) { } + + bool is_call() override { return true; } + + address destination() { return pd_call_destination(); } + void set_destination(address x); + + void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) override; + address value() override { return destination(); } + void set_value(address x) override { set_destination(x); } +}; + +class oop_Relocation : public DataRelocation { + public: + + + static RelocationHolder spec(int oop_index, int offset = 0) { + ; + return RelocationHolder::construct(oop_index, offset); + } + + static RelocationHolder spec_for_immediate() { + + + + ; + const int oop_index = 0; + const int offset = 0; + return RelocationHolder::construct(oop_index, offset); + } + + void copy_into(RelocationHolder& holder) const override; + + private: + jint _oop_index; + jint _offset; + + oop_Relocation(int oop_index, int offset) + : DataRelocation(relocInfo::oop_type), _oop_index(oop_index), _offset(offset) { } + + friend class RelocationHolder; + oop_Relocation() : DataRelocation(relocInfo::oop_type) {} + + public: + int oop_index() { return _oop_index; } + int offset() override { return _offset; } + + + void pack_data_to(CodeSection* dest) override; + void unpack_data() override; + + void fix_oop_relocation(); + + void verify_oop_relocation(); + + address value() override { return *reinterpret_cast(oop_addr()); } + + bool oop_is_immediate() { return oop_index() == 0; } + + oop* oop_addr(); + oop oop_value(); + +}; + + + +class metadata_Relocation : public DataRelocation { + + public: + + + static RelocationHolder spec(int metadata_index, int offset = 0) { + ; + return RelocationHolder::construct(metadata_index, offset); + } + + static RelocationHolder spec_for_immediate() { + const int metadata_index = 0; + const int offset = 0; + return RelocationHolder::construct(metadata_index, offset); + } + + void copy_into(RelocationHolder& holder) const override; + + private: + jint _metadata_index; + jint _offset; + + metadata_Relocation(int metadata_index, int offset) + : DataRelocation(relocInfo::metadata_type), _metadata_index(metadata_index), _offset(offset) { } + + friend class RelocationHolder; + metadata_Relocation() : DataRelocation(relocInfo::metadata_type) { } + + + + + void pd_fix_value(address x); + + public: + int metadata_index() { return _metadata_index; } + int offset() override { return _offset; } + + + void pack_data_to(CodeSection* dest) override; + void unpack_data() override; + + void fix_metadata_relocation(); + + address value() override { return (address) *metadata_addr(); } + + bool metadata_is_immediate() { return metadata_index() == 0; } + + Metadata** metadata_addr(); + Metadata* metadata_value(); + +}; + + +class barrier_Relocation : public Relocation { + + public: + + + static const int16_t unpatched = 0; + + static RelocationHolder spec() { + return RelocationHolder::construct(); + } + + void copy_into(RelocationHolder& holder) const override; + + private: + friend class RelocIterator; + friend class RelocationHolder; + barrier_Relocation() : Relocation(relocInfo::barrier_type) { } +}; + + +class virtual_call_Relocation : public CallRelocation { + + public: + + + + static RelocationHolder spec(address cached_value, jint method_index = 0) { + return RelocationHolder::construct(cached_value, method_index); + } + + void copy_into(RelocationHolder& holder) const override; + + private: + address _cached_value; + jint _method_index; + + virtual_call_Relocation(address cached_value, int method_index) + : CallRelocation(relocInfo::virtual_call_type), + _cached_value(cached_value), + _method_index(method_index) { + ; + } + + friend class RelocationHolder; + virtual_call_Relocation() : CallRelocation(relocInfo::virtual_call_type) { } + + public: + address cached_value(); + + int method_index() { return _method_index; } + Method* method_value(); + + + + + + void pack_data_to(CodeSection* dest) override; + void unpack_data() override; + + bool clear_inline_cache() override; +}; + + +class opt_virtual_call_Relocation : public CallRelocation { + public: + static RelocationHolder spec(int method_index = 0) { + return RelocationHolder::construct(method_index); + } + + void copy_into(RelocationHolder& holder) const override; + + private: + jint _method_index; + + opt_virtual_call_Relocation(int method_index) + : CallRelocation(relocInfo::opt_virtual_call_type), + _method_index(method_index) { } + + friend class RelocationHolder; + opt_virtual_call_Relocation() : CallRelocation(relocInfo::opt_virtual_call_type) {} + + public: + int method_index() { return _method_index; } + Method* method_value(); + + void pack_data_to(CodeSection* dest) override; + void unpack_data() override; + + bool clear_inline_cache() override; + + + address static_stub(); +}; + + +class static_call_Relocation : public CallRelocation { + public: + static RelocationHolder spec(int method_index = 0) { + return RelocationHolder::construct(method_index); + } + + void copy_into(RelocationHolder& holder) const override; + + private: + jint _method_index; + + static_call_Relocation(int method_index) + : CallRelocation(relocInfo::static_call_type), + _method_index(method_index) { } + + friend class RelocationHolder; + static_call_Relocation() : CallRelocation(relocInfo::static_call_type) {} + + public: + int method_index() { return _method_index; } + Method* method_value(); + + void pack_data_to(CodeSection* dest) override; + void unpack_data() override; + + bool clear_inline_cache() override; + + + address static_stub(); +}; + +class static_stub_Relocation : public Relocation { + public: + static RelocationHolder spec(address static_call) { + return RelocationHolder::construct(static_call); + } + + void copy_into(RelocationHolder& holder) const override; + + private: + address _static_call; + + static_stub_Relocation(address static_call) + : Relocation(relocInfo::static_stub_type), + _static_call(static_call) { } + + friend class RelocationHolder; + static_stub_Relocation() : Relocation(relocInfo::static_stub_type) { } + + public: + bool clear_inline_cache() override; + + address static_call() { return _static_call; } + + + void pack_data_to(CodeSection* dest) override; + void unpack_data() override; +}; + +class runtime_call_Relocation : public CallRelocation { + + public: + static RelocationHolder spec() { + return RelocationHolder::construct(); + } + + void copy_into(RelocationHolder& holder) const override; + + private: + friend class RelocationHolder; + runtime_call_Relocation() : CallRelocation(relocInfo::runtime_call_type) { } +}; + + +class runtime_call_w_cp_Relocation : public CallRelocation { + public: + static RelocationHolder spec() { + return RelocationHolder::construct(); + } + + void copy_into(RelocationHolder& holder) const override; + + private: + friend class RelocationHolder; + runtime_call_w_cp_Relocation() + : CallRelocation(relocInfo::runtime_call_w_cp_type), + _offset(-4) { } +# 1275 "/home/rehn/source/jdk/open/src/hotspot/share/code/relocInfo.hpp" + int _offset; + + public: + void set_constant_pool_offset(int offset) { _offset = offset; } + int get_constant_pool_offset() { return _offset; } + void pack_data_to(CodeSection * dest) override; + void unpack_data() override; +}; + + + + + + + +class trampoline_stub_Relocation : public Relocation { + public: + static RelocationHolder spec(address static_call) { + return RelocationHolder::construct(static_call); + } + + void copy_into(RelocationHolder& holder) const override; + + private: + address _owner; + + trampoline_stub_Relocation(address owner) + : Relocation(relocInfo::trampoline_stub_type), + _owner(owner) { } + + friend class RelocationHolder; + trampoline_stub_Relocation() : Relocation(relocInfo::trampoline_stub_type) { } + + public: + + + address owner() { return _owner; } + + void pack_data_to(CodeSection * dest) override; + void unpack_data() override; + + + static address get_trampoline_for(address call, nmethod* code); +}; + +class external_word_Relocation : public DataRelocation { + public: + static RelocationHolder spec(address target) { + ; + return RelocationHolder::construct(target); + } + + + + static RelocationHolder spec_for_immediate() { + return RelocationHolder::construct(nullptr); + } + + void copy_into(RelocationHolder& holder) const override; + + + + static bool can_be_relocated(address target) { + ; + return target != nullptr; + } + + private: + address _target; + + external_word_Relocation(address target) + : DataRelocation(relocInfo::external_word_type), _target(target) { } + + friend class RelocationHolder; + external_word_Relocation() : DataRelocation(relocInfo::external_word_type) { } + + public: + + + + + + void pack_data_to(CodeSection* dest) override; + void unpack_data() override; + + void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) override; + address target(); + address value() override { return target(); } +}; + +class internal_word_Relocation : public DataRelocation { + + public: + static RelocationHolder spec(address target) { + ; + return RelocationHolder::construct(target); + } + + + static RelocationHolder spec_for_immediate() { + return RelocationHolder::construct(nullptr); + } + + void copy_into(RelocationHolder& holder) const override; + + + internal_word_Relocation(address target, int section = -1, + relocInfo::relocType type = relocInfo::internal_word_type) + : DataRelocation(type), _target(target), _section(section) { } + + protected: + address _target; + int _section; + + friend class RelocationHolder; + internal_word_Relocation(relocInfo::relocType type = relocInfo::internal_word_type) + : DataRelocation(type) { } + + + enum { section_width = 2 }; + + public: + + + + + void pack_data_to(CodeSection* dest) override; + void unpack_data() override; + + void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) override; + address target(); + int section() { return _section; } + address value() override { return target(); } +}; + +class section_word_Relocation : public internal_word_Relocation { + public: + static RelocationHolder spec(address target, int section) { + return RelocationHolder::construct(target, section); + } + + void copy_into(RelocationHolder& holder) const override; + + section_word_Relocation(address target, int section) + : internal_word_Relocation(target, section, relocInfo::section_word_type) { + ; + ; + } + + + void unpack_data() override; + + private: + friend class RelocationHolder; + section_word_Relocation() : internal_word_Relocation(relocInfo::section_word_type) { } +}; + + +class poll_Relocation : public Relocation { + bool is_data() override { return true; } + void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) override; + public: + poll_Relocation(relocInfo::relocType type = relocInfo::poll_type) : Relocation(type) { } + + void copy_into(RelocationHolder& holder) const override; +}; + +class poll_return_Relocation : public poll_Relocation { + public: + poll_return_Relocation() : poll_Relocation(relocInfo::relocInfo::poll_return_type) { } + + void copy_into(RelocationHolder& holder) const override; +}; +# 1462 "/home/rehn/source/jdk/open/src/hotspot/share/code/relocInfo.hpp" +inline oop_Relocation* RelocIterator::oop_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; oop_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->oop_Relocation::unpack_data(); return r; } inline metadata_Relocation* RelocIterator::metadata_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; metadata_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->metadata_Relocation::unpack_data(); return r; } inline virtual_call_Relocation* RelocIterator::virtual_call_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; virtual_call_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->virtual_call_Relocation::unpack_data(); return r; } inline opt_virtual_call_Relocation* RelocIterator::opt_virtual_call_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; opt_virtual_call_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->opt_virtual_call_Relocation::unpack_data(); return r; } inline static_call_Relocation* RelocIterator::static_call_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; static_call_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->static_call_Relocation::unpack_data(); return r; } inline static_stub_Relocation* RelocIterator::static_stub_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; static_stub_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->static_stub_Relocation::unpack_data(); return r; } inline runtime_call_Relocation* RelocIterator::runtime_call_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; runtime_call_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->runtime_call_Relocation::unpack_data(); return r; } inline runtime_call_w_cp_Relocation* RelocIterator::runtime_call_w_cp_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; runtime_call_w_cp_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->runtime_call_w_cp_Relocation::unpack_data(); return r; } inline external_word_Relocation* RelocIterator::external_word_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; external_word_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->external_word_Relocation::unpack_data(); return r; } inline internal_word_Relocation* RelocIterator::internal_word_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; internal_word_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->internal_word_Relocation::unpack_data(); return r; } inline poll_Relocation* RelocIterator::poll_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; poll_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->poll_Relocation::unpack_data(); return r; } inline poll_return_Relocation* RelocIterator::poll_return_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; poll_return_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->poll_return_Relocation::unpack_data(); return r; } inline section_word_Relocation* RelocIterator::section_word_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; section_word_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->section_word_Relocation::unpack_data(); return r; } inline trampoline_stub_Relocation* RelocIterator::trampoline_stub_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; trampoline_stub_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->trampoline_stub_Relocation::unpack_data(); return r; } inline post_call_nop_Relocation* RelocIterator::post_call_nop_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; post_call_nop_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->post_call_nop_Relocation::unpack_data(); return r; } inline entry_guard_Relocation* RelocIterator::entry_guard_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; entry_guard_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->entry_guard_Relocation::unpack_data(); return r; } inline barrier_Relocation* RelocIterator::barrier_reloc() { static const RelocationHolder proto = RelocationHolder::construct(); ; _rh = proto; barrier_Relocation* r = static_cast(_rh.reloc()); r->set_binding(this); r->barrier_Relocation::unpack_data(); return r; }; + + + +inline RelocIterator::RelocIterator(CompiledMethod* nm, address begin, address limit) { + initialize(nm, begin, limit); +} +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/asm/codeBuffer.hpp" 2 + + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/linkedlist.hpp" 1 +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/linkedlist.hpp" +template class LinkedListNode : public AnyObj { + private: + E _data; + LinkedListNode* _next; +# 52 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/linkedlist.hpp" + template + static bool equal(const U& a, const U& b, bool (U::*t)(const U&) const) { + return a.equals(b); + } + + template + static bool equal(const U& a, const U& b, ...) { + return a == b; + } + + protected: + LinkedListNode() : _next(nullptr) { } + + public: + LinkedListNode(const E& e): _data(e), _next(nullptr) { } + + inline void set_next(LinkedListNode* node) { _next = node; } + inline LinkedListNode * next() const { return _next; } + + E* data() { return &_data; } + const E* peek() const { return &_data; } + + bool equals(const E& t) const { + return equal(_data, t, nullptr); + } +}; + + + + +template class LinkedList : public AnyObj { + protected: + LinkedListNode* _head; + LinkedList(LinkedList const&) = delete; LinkedList& operator=(LinkedList const&) = delete; + + public: + LinkedList() : _head(nullptr) { } + virtual ~LinkedList() {} + + inline void set_head(LinkedListNode* h) { _head = h; } + inline LinkedListNode* head() const { return _head; } + inline bool is_empty() const { return head() == nullptr; } + + inline size_t size() const { + LinkedListNode* p; + size_t count = 0; + for (p = head(); p != nullptr; count++, p = p->next()); + return count; + } + + + virtual void move(LinkedList* list) = 0; + + + virtual LinkedListNode* add(const E& e) = 0; + + virtual void add(LinkedListNode* node) = 0; + + + virtual bool add(const LinkedList* list) = 0; + + + virtual LinkedListNode* find_node(const E& e) = 0; + virtual E* find(const E& e) = 0; + + + virtual LinkedListNode* insert_before(const E& e, LinkedListNode* ref) = 0; + virtual LinkedListNode* insert_after (const E& e, LinkedListNode* ref) = 0; + + + virtual bool remove(const E& e) = 0; + virtual bool remove(LinkedListNode* node) = 0; + virtual bool remove_before(LinkedListNode* ref) = 0; + virtual bool remove_after(LinkedListNode* ref) = 0; + + LinkedListNode* unlink_head() { + LinkedListNode* h = this->head(); + if (h != nullptr) { + this->set_head(h->next()); + } + return h; + } + + +}; + + + +template + class LinkedListImpl : public LinkedList { + protected: + Arena* _arena; + public: + LinkedListImpl() : _arena(nullptr) { } + LinkedListImpl(Arena* a) : _arena(a) { } + + virtual ~LinkedListImpl() { + clear(); + } + + virtual void clear() { + LinkedListNode* p = this->head(); + this->set_head(nullptr); + while (p != nullptr) { + LinkedListNode* to_delete = p; + p = p->next(); + delete_node(to_delete); + } + } + + + virtual LinkedListNode* add(const E& e) { + LinkedListNode* node = this->new_node(e); + if (node != nullptr) { + this->add(node); + } + + return node; + } + + virtual void add(LinkedListNode* node) { + ; + node->set_next(this->head()); + this->set_head(node); + } + + + + virtual void move(LinkedList* list) { + ; + LinkedListNode* node = this->head(); + while (node != nullptr && node->next() != nullptr) { + node = node->next(); + } + if (node == nullptr) { + this->set_head(list->head()); + } else { + node->set_next(list->head()); + } + + list->set_head(nullptr); + } + + virtual bool add(const LinkedList* list) { + LinkedListNode* node = list->head(); + while (node != nullptr) { + if (this->add(*node->peek()) == nullptr) { + return false; + } + node = node->next(); + } + return true; + } + + + virtual LinkedListNode* find_node(const E& e) { + LinkedListNode* p = this->head(); + while (p != nullptr && !p->equals(e)) { + p = p->next(); + } + return p; + } + + E* find(const E& e) { + LinkedListNode* node = find_node(e); + return (node == nullptr) ? nullptr : node->data(); + } + + + + LinkedListNode* insert_before(const E& e, LinkedListNode* ref_node) { + LinkedListNode* node = this->new_node(e); + if (node == nullptr) return nullptr; + if (ref_node == this->head()) { + node->set_next(ref_node); + this->set_head(node); + } else { + LinkedListNode* p = this->head(); + while (p != nullptr && p->next() != ref_node) { + p = p->next(); + } + ; + node->set_next(ref_node); + p->set_next(node); + } + return node; + } + + + LinkedListNode* insert_after(const E& e, LinkedListNode* ref_node) { + LinkedListNode* node = this->new_node(e); + if (node == nullptr) return nullptr; + node->set_next(ref_node->next()); + ref_node->set_next(node); + return node; + } + + + + virtual bool remove(const E& e) { + LinkedListNode* tmp = this->head(); + LinkedListNode* prev = nullptr; + + while (tmp != nullptr) { + if (tmp->equals(e)) { + return remove_after(prev); + } + prev = tmp; + tmp = tmp->next(); + } + return false; + } + + + virtual bool remove_after(LinkedListNode* prev) { + LinkedListNode* to_delete; + if (prev == nullptr) { + to_delete = this->unlink_head(); + } else { + to_delete = prev->next(); + if (to_delete != nullptr) { + prev->set_next(to_delete->next()); + } + } + + if (to_delete != nullptr) { + delete_node(to_delete); + return true; + } + return false; + } + + virtual bool remove(LinkedListNode* node) { + LinkedListNode* p = this->head(); + if (p == node) { + this->set_head(p->next()); + delete_node(node); + return true; + } + while (p != nullptr && p->next() != node) { + p = p->next(); + } + if (p != nullptr) { + p->set_next(node->next()); + delete_node(node); + return true; + } else { + return false; + } + } + + virtual bool remove_before(LinkedListNode* ref) { + ; + LinkedListNode* p = this->head(); + LinkedListNode* to_delete = nullptr; + LinkedListNode* prev = nullptr; + while (p != nullptr && p != ref) { + prev = to_delete; + to_delete = p; + p = p->next(); + } + if (p == nullptr || to_delete == nullptr) return false; + ; + + ; + if (prev == nullptr) { + ; + this->set_head(to_delete->next()); + } else { + prev->set_next(to_delete->next()); + } + delete_node(to_delete); + return true; + } + + + protected: + + LinkedListNode* new_node(const E& e) const { + switch(T) { + case AnyObj::ARENA: { + ; + return new(_arena) LinkedListNode(e); + } + case AnyObj::RESOURCE_AREA: + if (alloc_failmode == AllocFailStrategy::RETURN_NULL) { + return new(std::nothrow) LinkedListNode(e); + } else { + return new LinkedListNode(e); + } + case AnyObj::C_HEAP: { + if (alloc_failmode == AllocFailStrategy::RETURN_NULL) { + return new(std::nothrow, F) LinkedListNode(e); + } else { + return new(F) LinkedListNode(e); + } + } + default: + do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/utilities/linkedlist.hpp", 351); } while (0); + } + return nullptr; + } + + + void delete_node(LinkedListNode* node) { + if (T == AnyObj::C_HEAP) { + delete node; + } + } +}; + + + +template + class SortedLinkedList : public LinkedListImpl { + public: + SortedLinkedList() { } + SortedLinkedList(Arena* a) : LinkedListImpl(a) { } + + virtual LinkedListNode* add(const E& e) { + return LinkedListImpl::add(e); + } + + virtual void move(LinkedList* list) { + ; + LinkedListNode* node; + while ((node = list->unlink_head()) != nullptr) { + this->add(node); + } + ; + } + + virtual void add(LinkedListNode* node) { + ; + LinkedListNode* tmp = this->head(); + LinkedListNode* prev = nullptr; + + int cmp_val; + while (tmp != nullptr) { + cmp_val = FUNC(*tmp->peek(), *node->peek()); + if (cmp_val >= 0) { + break; + } + prev = tmp; + tmp = tmp->next(); + } + + if (prev != nullptr) { + node->set_next(prev->next()); + prev->set_next(node); + } else { + node->set_next(this->head()); + this->set_head(node); + } + } + + virtual bool add(const LinkedList* list) { + return LinkedListImpl::add(list); + } + + virtual LinkedListNode* find_node(const E& e) { + LinkedListNode* p = this->head(); + + while (p != nullptr) { + int comp_val = FUNC(*p->peek(), e); + if (comp_val == 0) { + return p; + } else if (comp_val > 0) { + return nullptr; + } + p = p->next(); + } + return nullptr; + } +}; + + +template class LinkedListIterator : public StackObj { + private: + mutable LinkedListNode* _p; + + public: + LinkedListIterator(LinkedListNode* head) : _p(head) {} + + bool is_empty() const { return _p == nullptr; } + + E* next() { + if (_p == nullptr) return nullptr; + E* e = _p->data(); + _p = _p->next(); + return e; + } + + const E* next() const { + if (_p == nullptr) return nullptr; + const E* e = _p->peek(); + _p = _p->next(); + return e; + } +}; +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/asm/codeBuffer.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/resizeableResourceHash.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/resizeableResourceHash.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/resourceHash.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/resourceHash.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/numberSeq.hpp" 1 +# 45 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/numberSeq.hpp" +class AbsSeq: public CHeapObj { +private: + void init(double alpha); + +protected: + int _num; + double _sum; + double _sum_of_squares; + + double _davg; + double _dvariance; + double _alpha; + + + + virtual double total() const { return (double) _num; }; + +public: + AbsSeq(double alpha = 0.3); + + virtual void add(double val); + void add(unsigned val) { add((double) val); } + virtual double maximum() const = 0; + virtual double last() const = 0; + + + int num() const { return _num; } + + double sum() const { return _sum; } + + double avg() const; + double variance() const; + double sd() const; + + double davg() const; + double dvariance() const; + double dsd() const; + + + virtual void dump(); + virtual void dump_on(outputStream* s); +}; + +class NumberSeq: public AbsSeq { +private: + bool check_nums(NumberSeq* total, int n, NumberSeq** parts); + +protected: + double _last; + double _maximum; + +public: + NumberSeq(double alpha = 0.3); + + virtual void add(double val); + virtual double maximum() const { return _maximum; } + virtual double last() const { return _last; } + + + virtual void dump_on(outputStream* s); +}; + +class TruncatedSeq: public AbsSeq { +private: + enum PrivateConstants { + DefaultSeqLength = 10 + }; + void init(); +protected: + double *_sequence; + int _length; + int _next; + +public: + + TruncatedSeq(int length = DefaultSeqLength, + double alpha = 0.3); + ~TruncatedSeq(); + virtual void add(double val); + virtual double maximum() const; + virtual double last() const; + + double oldest() const; + double predict_next() const; + + + virtual void dump_on(outputStream* s); +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/resourceHash.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/tableStatistics.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/tableStatistics.hpp" +class TableRateStatistics : public CHeapObj { + + friend class TableStatistics; + +private: + volatile size_t _added_items; + volatile size_t _removed_items; + + jlong _time_stamp; + double _seconds_stamp; + size_t _added_items_stamp; + size_t _added_items_stamp_prev; + size_t _removed_items_stamp; + size_t _removed_items_stamp_prev; + +public: + TableRateStatistics(); + ~TableRateStatistics(); + + void add(); + void remove(); + +protected: + void stamp(); + float get_add_rate(); + float get_remove_rate(); +}; + +class TableStatistics : CHeapObj { + +public: + size_t _literal_bytes; + + size_t _number_of_buckets; + size_t _number_of_entries; + + size_t _maximum_bucket_size; + float _average_bucket_size; + float _variance_of_bucket_size; + float _stddev_of_bucket_size; + + size_t _bucket_bytes; + size_t _entry_bytes; + size_t _total_footprint; + + size_t _bucket_size; + size_t _entry_size; + + float _add_rate; + float _remove_rate; + + TableStatistics(); + TableStatistics(NumberSeq summary, size_t literal_bytes, size_t bucket_bytes, size_t node_bytes); + TableStatistics(TableRateStatistics& rate_stats, NumberSeq summary, size_t literal_bytes, size_t bucket_bytes, size_t node_bytes); + ~TableStatistics(); + + void print(outputStream* st, const char *table_name); +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/resourceHash.hpp" 2 + + + +template +class ResourceHashtableNode : public AnyObj { +public: + unsigned _hash; + K _key; + V _value; + ResourceHashtableNode* _next; + + ResourceHashtableNode(unsigned hash, K const& key, V const& value, + ResourceHashtableNode* next = nullptr) : + _hash(hash), _key(key), _value(value), _next(next) {} + + + ResourceHashtableNode(unsigned hash, K const& key, + ResourceHashtableNode* next = nullptr) : + _hash(hash), _key(key), _value(), _next(next) {} +}; + +template< + class STORAGE, + typename K, typename V, + AnyObj::allocation_type ALLOC_TYPE, + MEMFLAGS MEM_TYPE, + unsigned (*HASH) (K const&), + bool (*EQUALS)(K const&, K const&) + > +class ResourceHashtableBase : public STORAGE { + static_assert(ALLOC_TYPE == AnyObj::C_HEAP || std::is_trivially_destructible::value, + "Destructor for K is only called with C_HEAP"); + static_assert(ALLOC_TYPE == AnyObj::C_HEAP || std::is_trivially_destructible::value, + "Destructor for V is only called with C_HEAP"); + using Node = ResourceHashtableNode; + private: + int _number_of_entries; + + Node** bucket_at(unsigned index) { + Node** t = table(); + return &t[index]; + } + + const Node* const* bucket_at(unsigned index) const { + Node** t = table(); + return &t[index]; + } + + + + Node** lookup_node(unsigned hash, K const& key) { + unsigned index = hash % table_size(); + Node** ptr = bucket_at(index); + while (*ptr != nullptr) { + Node* node = *ptr; + if (node->_hash == hash && EQUALS(key, node->_key)) { + break; + } + ptr = &(node->_next); + } + return ptr; + } + + Node const** lookup_node(unsigned hash, K const& key) const { + return const_cast( + const_cast(this)->lookup_node(hash, key)); + } + + protected: + Node** table() const { return STORAGE::table(); } + + ResourceHashtableBase() : STORAGE(), _number_of_entries(0) {} + ResourceHashtableBase(unsigned size) : STORAGE(size), _number_of_entries(0) {} + ResourceHashtableBase(ResourceHashtableBase const&) = delete; ResourceHashtableBase& operator=(ResourceHashtableBase const&) = delete; + + ~ResourceHashtableBase() { + if (ALLOC_TYPE == AnyObj::C_HEAP) { + Node* const* bucket = table(); + const unsigned sz = table_size(); + while (bucket < bucket_at(sz)) { + Node* node = *bucket; + while (node != nullptr) { + Node* cur = node; + node = node->_next; + delete cur; + } + ++bucket; + } + } + } + + public: + unsigned table_size() const { return STORAGE::table_size(); } + int number_of_entries() const { return _number_of_entries; } + + bool contains(K const& key) const { + return get(key) != nullptr; + } + + V* get(K const& key) const { + unsigned hv = HASH(key); + Node const** ptr = lookup_node(hv, key); + if (*ptr != nullptr) { + return const_cast(&(*ptr)->_value); + } else { + return nullptr; + } + } +# 150 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/resourceHash.hpp" + bool put_when_absent(K const& key, V const& value) { + unsigned hv = HASH(key); + unsigned index = hv % table_size(); + ; + Node** ptr = bucket_at(index); + if (ALLOC_TYPE == AnyObj::C_HEAP) { + *ptr = new (MEM_TYPE) Node(hv, key, value, *ptr); + } else { + *ptr = new Node(hv, key, value, *ptr); + } + _number_of_entries ++; + return true; + } + + + + + + + bool put(K const& key, V const& value) { + unsigned hv = HASH(key); + Node** ptr = lookup_node(hv, key); + if (*ptr != nullptr) { + (*ptr)->_value = value; + return false; + } else { + if (ALLOC_TYPE == AnyObj::C_HEAP) { + *ptr = new (MEM_TYPE) Node(hv, key, value); + } else { + *ptr = new Node(hv, key, value); + } + _number_of_entries ++; + return true; + } + } + + + + + + + V* put_if_absent(K const& key, bool* p_created) { + unsigned hv = HASH(key); + Node** ptr = lookup_node(hv, key); + if (*ptr == nullptr) { + if (ALLOC_TYPE == AnyObj::C_HEAP) { + *ptr = new (MEM_TYPE) Node(hv, key); + } else { + *ptr = new Node(hv, key); + } + *p_created = true; + _number_of_entries ++; + } else { + *p_created = false; + } + return &(*ptr)->_value; + } + + + + + + + V* put_if_absent(K const& key, V const& value, bool* p_created) { + unsigned hv = HASH(key); + Node** ptr = lookup_node(hv, key); + if (*ptr == nullptr) { + if (ALLOC_TYPE == AnyObj::C_HEAP) { + *ptr = new (MEM_TYPE) Node(hv, key, value); + } else { + *ptr = new Node(hv, key, value); + } + *p_created = true; + _number_of_entries ++; + } else { + *p_created = false; + } + return &(*ptr)->_value; + } + + template + bool remove(K const& key, Function function) { + unsigned hv = HASH(key); + Node** ptr = lookup_node(hv, key); + + Node* node = *ptr; + if (node != nullptr) { + *ptr = node->_next; + function(node->_key, node->_value); + if (ALLOC_TYPE == AnyObj::C_HEAP) { + delete node; + } + _number_of_entries --; + return true; + } + return false; + } + + bool remove(K const& key) { + auto dummy = [&] (K& k, V& v) { }; + return remove(key, dummy); + } + + + + + template + void iterate(ITER* iter) const { + auto function = [&] (K& k, V& v) { + return iter->do_entry(k, v); + }; + iterate(function); + } + + template + void iterate(Function function) const { + Node* const* bucket = table(); + const unsigned sz = table_size(); + int cnt = _number_of_entries; + + while (cnt > 0 && bucket < bucket_at(sz)) { + Node* node = *bucket; + while (node != nullptr) { + bool cont = function(node->_key, node->_value); + if (!cont) { return; } + node = node->_next; + --cnt; + } + ++bucket; + } + } + + + template + void iterate_all(Function function) const { + auto wrapper = [&] (K& k, V& v) { + function(k, v); + return true; + }; + iterate(wrapper); + } + + + + + template + void unlink(ITER* iter) { + const unsigned sz = table_size(); + for (unsigned index = 0; index < sz; index++) { + Node** ptr = bucket_at(index); + while (*ptr != nullptr) { + Node* node = *ptr; + + bool clean = iter->do_entry(node->_key, node->_value); + if (clean) { + *ptr = node->_next; + if (ALLOC_TYPE == AnyObj::C_HEAP) { + delete node; + } + _number_of_entries --; + } else { + ptr = &(node->_next); + } + } + } + } + + template + TableStatistics statistics_calculate(Function size_function) const { + NumberSeq summary; + size_t literal_bytes = 0; + Node* const* bucket = table(); + const unsigned sz = table_size(); + while (bucket < bucket_at(sz)) { + Node* node = *bucket; + int count = 0; + while (node != nullptr) { + literal_bytes += size_function(node->_key, node->_value); + count++; + node = node->_next; + } + summary.add((double)count); + ++bucket; + } + return TableStatistics(summary, literal_bytes, sizeof(Node*), sizeof(Node)); + } + + + size_t mem_size() const { + return sizeof(*this) + + table_size() * sizeof(Node*) + + number_of_entries() * sizeof(Node); + } +}; + +template +class FixedResourceHashtableStorage : public AnyObj { + using Node = ResourceHashtableNode; + + Node* _table[TABLE_SIZE]; +protected: + FixedResourceHashtableStorage() { memset(_table, 0, sizeof(_table)); } + ~FixedResourceHashtableStorage() = default; + + constexpr unsigned table_size() const { + return TABLE_SIZE; + } + + Node** table() const { + return const_cast(_table); + } +}; + +template< + typename K, typename V, + unsigned SIZE = 256, + AnyObj::allocation_type ALLOC_TYPE = AnyObj::RESOURCE_AREA, + MEMFLAGS MEM_TYPE = mtInternal, + unsigned (*HASH) (K const&) = primitive_hash, + bool (*EQUALS)(K const&, K const&) = primitive_equals + > +class ResourceHashtable : public ResourceHashtableBase< + FixedResourceHashtableStorage, + K, V, ALLOC_TYPE, MEM_TYPE, HASH, EQUALS> { + ResourceHashtable(ResourceHashtable const&) = delete; ResourceHashtable& operator=(ResourceHashtable const&) = delete; +public: + ResourceHashtable() : ResourceHashtableBase, + K, V, ALLOC_TYPE, MEM_TYPE, HASH, EQUALS>() {} +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/resizeableResourceHash.hpp" 2 + +template< + typename K, typename V, + AnyObj::allocation_type ALLOC_TYPE, + MEMFLAGS MEM_TYPE> +class ResizeableResourceHashtableStorage : public AnyObj { + using Node = ResourceHashtableNode; + +protected: + unsigned _table_size; + Node** _table; + + ResizeableResourceHashtableStorage(unsigned table_size) { + _table_size = table_size; + _table = alloc_table(table_size); + } + + ~ResizeableResourceHashtableStorage() { + if (ALLOC_TYPE == C_HEAP) { + FreeHeap((char*)(_table)); + } + } + + Node** alloc_table(unsigned table_size) { + Node** table; + if (ALLOC_TYPE == C_HEAP) { + table = (Node**) (AllocateHeap((table_size) * sizeof(Node*), MEM_TYPE)); + } else { + table = (Node**) resource_allocate_bytes((table_size) * sizeof(Node*)); + } + memset(table, 0, table_size * sizeof(Node*)); + return table; + } + + unsigned table_size() const { + return _table_size; + } + + Node** table() const { + return _table; + } +}; + +template< + typename K, typename V, + AnyObj::allocation_type ALLOC_TYPE = AnyObj::RESOURCE_AREA, + MEMFLAGS MEM_TYPE = mtInternal, + unsigned (*HASH) (K const&) = primitive_hash, + bool (*EQUALS)(K const&, K const&) = primitive_equals + > +class ResizeableResourceHashtable : public ResourceHashtableBase< + ResizeableResourceHashtableStorage, + K, V, ALLOC_TYPE, MEM_TYPE, HASH, EQUALS> { + unsigned _max_size; + + using BASE = ResourceHashtableBase, + K, V, ALLOC_TYPE, MEM_TYPE, HASH, EQUALS>; + using Node = ResourceHashtableNode; + ResizeableResourceHashtable(ResizeableResourceHashtable const&) = delete; ResizeableResourceHashtable& operator=(ResizeableResourceHashtable const&) = delete; + + + int calculate_resize(bool use_large_table_sizes) const { + const int resize_factor = 2; + + + + + const int large_table_sizes[] = { 107, 1009, 2017, 4049, 5051, 10103, 20201, + 40423, 76831, 307261, 614563, 1228891, 2457733, + 4915219, 9830479, 19660831, 39321619, 78643219 }; + const int large_array_size = sizeof(large_table_sizes)/sizeof(int); + + int requested = resize_factor * BASE::number_of_entries(); + int start_at = use_large_table_sizes ? 8 : 0; + int newsize; + for (int i = start_at; i < large_array_size; i++) { + newsize = large_table_sizes[i]; + if (newsize >= requested) { + return newsize; + } + } + return requested; + } + +public: + ResizeableResourceHashtable(unsigned size, unsigned max_size) + : BASE(size), _max_size(max_size) { + ; + } + + bool maybe_grow(int load_factor = 8, bool use_large_table_sizes = false) { + unsigned old_size = BASE::_table_size; + if (old_size >= _max_size) { + return false; + } + if (BASE::number_of_entries() / int(old_size) > load_factor) { + unsigned new_size = MIN2(calculate_resize(use_large_table_sizes), _max_size); + resize(new_size); + return true; + } else { + return false; + } + } + + void resize(unsigned new_size) { + Node** old_table = BASE::_table; + Node** new_table = BASE::alloc_table(new_size); + + Node* const* bucket = old_table; + while (bucket < &old_table[BASE::_table_size]) { + Node* node = *bucket; + while (node != nullptr) { + Node* next = node->_next; + unsigned hash = node->_hash; + unsigned index = hash % new_size; + + node->_next = new_table[index]; + new_table[index] = node; + + node = next; + } + ++bucket; + } + + if (ALLOC_TYPE == AnyObj::C_HEAP) { + FreeHeap((char*)(old_table)); + } + BASE::_table = new_table; + BASE::_table_size = new_size; + } +# 181 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/resizeableResourceHash.hpp" +}; +# 36 "/home/rehn/source/jdk/open/src/hotspot/share/asm/codeBuffer.hpp" 2 + + +template +static inline void put_native(address p, T x) { + memcpy((void*)p, &x, sizeof x); +} + +class PhaseCFG; +class Compile; +class BufferBlob; +class CodeBuffer; +class Label; +class ciMethod; +class SharedStubToInterpRequest; + +class CodeOffsets: public StackObj { +public: + enum Entries { Entry, + Verified_Entry, + Frame_Complete, + OSR_Entry, + Exceptions, + Deopt, + DeoptMH, + UnwindHandler, + max_Entries }; + + + + + enum { frame_never_safe = -1 }; + +private: + int _values[max_Entries]; + +public: + CodeOffsets() { + _values[Entry ] = 0; + _values[Verified_Entry] = 0; + _values[Frame_Complete] = frame_never_safe; + _values[OSR_Entry ] = 0; + _values[Exceptions ] = -1; + _values[Deopt ] = -1; + _values[DeoptMH ] = -1; + _values[UnwindHandler ] = -1; + } + + int value(Entries e) { return _values[e]; } + void set_value(Entries e, int val) { _values[e] = val; } +}; + + + + +class CodeSection { + friend class CodeBuffer; + public: + typedef int csize_t; + + private: + address _start; + address _mark; + address _end; + address _limit; + relocInfo* _locs_start; + relocInfo* _locs_end; + relocInfo* _locs_limit; + address _locs_point; + bool _locs_own; + bool _scratch_emit; + int _skipped_instructions_size; + int8_t _index; + CodeBuffer* _outer; + + + + CodeSection() { + _start = nullptr; + _mark = nullptr; + _end = nullptr; + _limit = nullptr; + _locs_start = nullptr; + _locs_end = nullptr; + _locs_limit = nullptr; + _locs_point = nullptr; + _locs_own = false; + _scratch_emit = false; + _skipped_instructions_size = 0; + ; + ; + } + + void initialize_outer(CodeBuffer* outer, int8_t index) { + _outer = outer; + _index = index; + } + + void initialize(address start, csize_t size = 0) { + ; + _start = start; + _mark = nullptr; + _end = start; + + _limit = start + size; + _locs_point = start; + } + + void initialize_locs(int locs_capacity); + void expand_locs(int new_capacity); + void initialize_locs_from(const CodeSection* source_cs); + + + void take_over_code_from(CodeSection* cs) { + _start = cs->_start; + _mark = cs->_mark; + _end = cs->_end; + _limit = cs->_limit; + _locs_point = cs->_locs_point; + _skipped_instructions_size = cs->_skipped_instructions_size; + } + + public: + address start() const { return _start; } + address mark() const { return _mark; } + address end() const { return _end; } + address limit() const { return _limit; } + csize_t size() const { return (csize_t)(_end - _start); } + csize_t mark_off() const { ; + return (csize_t)(_mark - _start); } + csize_t capacity() const { return (csize_t)(_limit - _start); } + csize_t remaining() const { return (csize_t)(_limit - _end); } + + relocInfo* locs_start() const { return _locs_start; } + relocInfo* locs_end() const { return _locs_end; } + int locs_count() const { return (int)(_locs_end - _locs_start); } + relocInfo* locs_limit() const { return _locs_limit; } + address locs_point() const { return _locs_point; } + csize_t locs_point_off() const{ return (csize_t)(_locs_point - _start); } + csize_t locs_capacity() const { return (csize_t)(_locs_limit - _locs_start); } + + int8_t index() const { return _index; } + bool is_allocated() const { return _start != nullptr; } + bool is_empty() const { return _start == _end; } + bool has_locs() const { return _locs_end != nullptr; } + + + void set_scratch_emit() { _scratch_emit = true; } + void clear_scratch_emit() { _scratch_emit = false; } + bool scratch_emit() { return _scratch_emit; } + + CodeBuffer* outer() const { return _outer; } + + + bool contains(address pc) const { return pc >= _start && pc < _end; } + bool contains2(address pc) const { return pc >= _start && pc <= _end; } + bool allocates(address pc) const { return pc >= _start && pc < _limit; } + bool allocates2(address pc) const { return pc >= _start && pc <= _limit; } + + + + + + bool disjoint(CodeSection* cs) const { return cs->_limit <= _start || cs->_start >= _limit; } + + void set_end(address pc) { ; _end = pc; } + void set_mark(address pc) { ; + _mark = pc; } + void set_mark() { _mark = _end; } + void clear_mark() { _mark = nullptr; } + + void set_locs_end(relocInfo* p) { + ; + _locs_end = p; + } + void set_locs_point(address pc) { + ; + ; + _locs_point = pc; + } + + void register_skipped(int size) { + _skipped_instructions_size += size; + } + + + void emit_int8(uint8_t x1) { + address curr = end(); + *((uint8_t*) curr++) = x1; + set_end(curr); + } + + template + void emit_native(T x) { put_native(end(), x); set_end(end() + sizeof x); } + + void emit_int16(uint16_t x) { emit_native(x); } + void emit_int16(uint8_t x1, uint8_t x2) { + address curr = end(); + *((uint8_t*) curr++) = x1; + *((uint8_t*) curr++) = x2; + set_end(curr); + } + + void emit_int24(uint8_t x1, uint8_t x2, uint8_t x3) { + address curr = end(); + *((uint8_t*) curr++) = x1; + *((uint8_t*) curr++) = x2; + *((uint8_t*) curr++) = x3; + set_end(curr); + } + + void emit_int32(uint32_t x) { emit_native(x); } + void emit_int32(uint8_t x1, uint8_t x2, uint8_t x3, uint8_t x4) { + address curr = end(); + *((uint8_t*) curr++) = x1; + *((uint8_t*) curr++) = x2; + *((uint8_t*) curr++) = x3; + *((uint8_t*) curr++) = x4; + set_end(curr); + } + + void emit_int64(uint64_t x) { emit_native(x); } + void emit_float(jfloat x) { emit_native(x); } + void emit_double(jdouble x) { emit_native(x); } + void emit_address(address x) { emit_native(x); } + + + void initialize_shared_locs(relocInfo* buf, int length); + + + address target(Label& L, address branch_pc); + + + void relocate(address at, RelocationHolder const& rspec, int format = 0); + void relocate(address at, relocInfo::relocType rtype, int format = 0, jint method_index = 0); + + int alignment() const; + + + static csize_t end_slop() { return MAX2((int)sizeof(jdouble), (int)CodeEntryAlignment); } + + csize_t align_at_start(csize_t off) const { + return (csize_t) align_up(off, alignment()); + } + + + + bool maybe_expand_to_ensure_remaining(csize_t amount); + + + + + +}; +# 360 "/home/rehn/source/jdk/open/src/hotspot/share/asm/codeBuffer.hpp" +typedef GrowableArray SharedStubToInterpRequests; +# 386 "/home/rehn/source/jdk/open/src/hotspot/share/asm/codeBuffer.hpp" +class CodeBuffer: public StackObj { + friend class CodeSection; + friend class StubCodeGenerator; + + private: + + + + void* operator new(size_t size) throw() { return resource_allocate_bytes(size); } + void operator delete(void* p) { do { (*g_assert_poison) = 'X';; report_should_not_call("src/hotspot/share/asm/codeBuffer.hpp", 395); } while (0); } + + public: + typedef int csize_t; + enum : int8_t { + + + SECT_FIRST = 0, + SECT_CONSTS = SECT_FIRST, + SECT_INSTS, + SECT_STUBS, + SECT_LIMIT, SECT_NONE = -1 + }; + + typedef LinkedListImpl Offsets; + typedef ResizeableResourceHashtable SharedTrampolineRequests; + + private: + enum { + sect_bits = 2, + sect_mask = (1<code_section(n); + } + static const char* code_section_name(int n); + int section_index_of(address addr) const; + bool contains(address addr) const { + + return section_index_of(addr) > SECT_NONE; + } + + + static int locator_pos(int locator) { return locator >> sect_bits; } + static int locator_sect(int locator) { return locator & sect_mask; } + static int locator(int pos, int sect) { return (pos << sect_bits) | sect; } + int locator(address addr) const; + address locator_address(int locator) const { + if (locator < 0) return nullptr; + address start = code_section(locator_sect(locator))->start(); + return start + locator_pos(locator); + } + + + bool is_backward_branch(Label& L); + + + const char* name() const { return _name; } + void set_name(const char* name) { _name = name; } + CodeBuffer* before_expand() const { return _before_expand; } + BufferBlob* blob() const { return _blob; } + void set_blob(BufferBlob* blob); + void free_blob(); + + + address insts_begin() const { return _insts.start(); } + address insts_end() const { return _insts.end(); } + void set_insts_end(address end) { _insts.set_end(end); } + address insts_mark() const { return _insts.mark(); } + void set_insts_mark() { _insts.set_mark(); } + + + bool is_pure() const { return insts_size() == total_content_size(); } + + + csize_t insts_size() const { return _insts.size(); } + + + csize_t pure_insts_size() const { ; + return insts_size(); } + + csize_t insts_capacity() const { return _insts.capacity(); } + + + csize_t insts_remaining() const { return _insts.remaining(); } + + + bool insts_contains(address pc) const { return _insts.contains(pc); } + bool insts_contains2(address pc) const { return _insts.contains2(pc); } + + + void finalize_oop_references(const methodHandle& method); + + + + + csize_t total_content_size() const; + + + + csize_t total_offset_of(const CodeSection* cs) const; + + + csize_t total_relocation_size() const; + + int total_skipped_instructions_size() const; + + csize_t copy_relocations_to(address buf, csize_t buf_limit, bool only_inst) const; + + + csize_t total_oop_size() const { + OopRecorder* recorder = oop_recorder(); + return (recorder == nullptr)? 0: recorder->oop_size(); + } + + + csize_t total_metadata_size() const { + OopRecorder* recorder = oop_recorder(); + return (recorder == nullptr)? 0: recorder->metadata_size(); + } + + + + + void initialize_consts_size(csize_t size) { initialize_section_size(&_consts, size); } + void initialize_stubs_size(csize_t size) { initialize_section_size(&_stubs, size); } + + void initialize_oop_recorder(OopRecorder* r); + + OopRecorder* oop_recorder() const { return _oop_recorder; } + + address last_insn() const { return _last_insn; } + void set_last_insn(address a) { _last_insn = a; } + void clear_last_insn() { set_last_insn(nullptr); } +# 693 "/home/rehn/source/jdk/open/src/hotspot/share/asm/codeBuffer.hpp" + void relocate(address at, RelocationHolder const& rspec, int format = 0) { + _insts.relocate(at, rspec, format); + } + void relocate(address at, relocInfo::relocType rtype, int format = 0) { + _insts.relocate(at, rtype, format); + } + + + GrowableArray* create_patch_overflow(); + + + void copy_code_and_locs_to(CodeBlob* blob) { + ; + copy_relocations_to(blob); + copy_code_to(blob); + } + void copy_values_to(nmethod* nm) { + if (!oop_recorder()->is_unused()) { + oop_recorder()->copy_values_to(nm); + } + } + + void block_comment(ptrdiff_t offset, const char* comment) {}; + const char* code_string(const char* str) { return nullptr; }; + + + void log_section_sizes(const char* name); + + + bool finalize_stubs(); + + + void shared_stub_to_interp_for(ciMethod* callee, csize_t call_offset); + + void set_const_section_alignment(int align) { + _const_section_alignment = align_up(align, HeapWordSize); + } +# 739 "/home/rehn/source/jdk/open/src/hotspot/share/asm/codeBuffer.hpp" + void decode(address start, address end); + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/codeBuffer_riscv.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/codeBuffer_riscv.hpp" +private: + void pd_initialize() {} + bool pd_finalize_stubs(); + +public: + void flush_bundle(bool start_new_bundle) {} + static constexpr bool supports_shared_stubs() { return true; } + + void share_trampoline_for(address dest, int caller_offset); +# 743 "/home/rehn/source/jdk/open/src/hotspot/share/asm/codeBuffer.hpp" 2 + +}; + + + + + +class SharedStubToInterpRequest : public ResourceObj { + private: + ciMethod* _shared_method; + CodeBuffer::csize_t _call_offset; + + public: + SharedStubToInterpRequest(ciMethod* method = nullptr, CodeBuffer::csize_t call_offset = -1) : _shared_method(method), + _call_offset(call_offset) {} + + ciMethod* shared_method() const { return _shared_method; } + CodeBuffer::csize_t call_offset() const { return _call_offset; } +}; + +inline bool CodeSection::maybe_expand_to_ensure_remaining(csize_t amount) { + if (remaining() < amount) { _outer->expand(this, amount); return true; } + return false; +} +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeBlob.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compilerDefinitions.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compilerDefinitions.hpp" +enum CompilerType : u1 { + compiler_none, + compiler_c1, + compiler_c2, + compiler_jvmci, + compiler_number_of_types +}; + +extern const char* compilertype2name_tab[compiler_number_of_types]; +inline const char* compilertype2name(CompilerType t) { return (uint)t < compiler_number_of_types ? compilertype2name_tab[t] : nullptr; } + + +enum MethodCompilation { + InvocationEntryBci = -1, + BeforeBci = InvocationEntryBci, + AfterBci = -2, + UnwindBci = -3, + AfterExceptionBci = -4, + UnknownBci = -5, + InvalidFrameStateBci = -6 +}; + + +enum CompLevel : s1 { + CompLevel_any = -1, + CompLevel_all = -1, + CompLevel_none = 0, + CompLevel_simple = 1, + CompLevel_limited_profile = 2, + CompLevel_full_profile = 3, + CompLevel_full_optimization = 4 +}; + +class CompilationModeFlag : AllStatic { + enum class Mode { + NORMAL, + QUICK_ONLY, + HIGH_ONLY, + HIGH_ONLY_QUICK_INTERNAL + }; + static Mode _mode; + static void print_error(); +public: + static bool initialize(); + static bool normal() { return _mode == Mode::NORMAL; } + static bool quick_only() { return _mode == Mode::QUICK_ONLY; } + static bool high_only() { return _mode == Mode::HIGH_ONLY; } + static bool high_only_quick_internal() { return _mode == Mode::HIGH_ONLY_QUICK_INTERNAL; } + + static bool disable_intermediate() { return high_only() || high_only_quick_internal(); } + static bool quick_internal() { return !high_only(); } + + static void set_high_only_quick_internal() { _mode = Mode::HIGH_ONLY_QUICK_INTERNAL; } + static void set_quick_only() { _mode = Mode::QUICK_ONLY; } + static void set_high_only() { _mode = Mode::HIGH_ONLY; } +}; + +inline bool is_c1_compile(int comp_level) { + return comp_level > CompLevel_none && comp_level < CompLevel_full_optimization; +} + +inline bool is_c2_compile(int comp_level) { + return comp_level == CompLevel_full_optimization; +} + +inline bool is_compile(int comp_level) { + return is_c1_compile(comp_level) || is_c2_compile(comp_level); +} + + + +enum RTMState { + NoRTM = 0x2, + UseRTM = 0x1, + ProfileRTM = 0x0 +}; +# 118 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/compilerDefinitions.hpp" +class CompilerConfig : public AllStatic { +public: + + + static intx scaled_compile_threshold(intx threshold, double scale); + static intx scaled_compile_threshold(intx threshold); + static intx jvmflag_scaled_compile_threshold(intx threshold); + + + static intx scaled_freq_log(intx freq_log, double scale); + static intx scaled_freq_log(intx freq_log); + static intx jvmflag_scaled_freq_log(intx freq_log); + + static bool check_args_consistency(bool status); + + static void ergo_initialize(); + + + constexpr static bool has_c1() { return true ; } + constexpr static bool has_c2() { return true ; } + constexpr static bool has_jvmci() { return true ; } + constexpr static bool has_tiered() { return has_c1() && (has_c2() || has_jvmci()); } + + inline static bool is_jvmci_compiler(); + inline static bool is_jvmci(); + inline static bool is_interpreter_only(); + + + + + + + + inline static bool is_tiered(); + + inline static bool is_c1_enabled(); + inline static bool is_c1_only(); + inline static bool is_c1_simple_only(); + inline static bool is_c1_or_interpreter_only_no_jvmci(); + inline static bool is_c1_only_no_jvmci(); + inline static bool is_c1_profiling(); + + inline static bool is_jvmci_compiler_enabled(); + inline static bool is_jvmci_compiler_only(); + + inline static bool is_c2_only(); + inline static bool is_c2_enabled(); + inline static bool is_c2_or_jvmci_compiler_only(); + inline static bool is_c2_or_jvmci_compiler_enabled(); + +private: + static bool is_compilation_mode_selected(); + static void set_compilation_policy_flags(); + static void set_jvmci_specific_flags(); + static void set_legacy_emulation_flags(); + static void set_client_emulation_mode_flags(); +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeBlob.hpp" 2 + + + + + + + +class ImmutableOopMap; +class ImmutableOopMapSet; +class JNIHandleBlock; +class OopMapSet; + + + +enum class CodeBlobType { + MethodNonProfiled = 0, + MethodProfiled = 1, + NonNMethod = 2, + All = 3, + NumTypes = 4 +}; +# 79 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeBlob.hpp" +class CodeBlobLayout; +class UpcallStub; +class RuntimeStub; +class JavaFrameAnchor; + +class CodeBlob { + friend class VMStructs; + friend class JVMCIVMStructs; + friend class CodeCacheDumper; + +protected: + + + address _code_begin; + address _code_end; + address _content_begin; + + address _data_end; + address _relocation_begin; + address _relocation_end; + + ImmutableOopMapSet* _oop_maps; + + const char* _name; + + + int _size; + int _header_size; + int _frame_complete_offset; + + + + int _data_offset; + int _frame_size; + + bool _caller_must_gc_arguments; + + bool _is_compiled; + const CompilerType _type; +# 129 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeBlob.hpp" + CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, + int frame_size, ImmutableOopMapSet* oop_maps, + bool caller_must_gc_arguments, bool compiled = false); + CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, CodeBuffer* cb, int frame_complete_offset, + int frame_size, OopMapSet* oop_maps, + bool caller_must_gc_arguments, bool compiled = false); +public: + + CodeBlob() : _type(compiler_none) {} + + + static unsigned int allocation_size(CodeBuffer* cb, int header_size); + static unsigned int align_code_offset(int offset); + + + virtual void flush(); + + + virtual bool is_buffer_blob() const { return false; } + virtual bool is_nmethod() const { return false; } + virtual bool is_runtime_stub() const { return false; } + virtual bool is_deoptimization_stub() const { return false; } + virtual bool is_uncommon_trap_stub() const { return false; } + virtual bool is_exception_stub() const { return false; } + virtual bool is_safepoint_stub() const { return false; } + virtual bool is_adapter_blob() const { return false; } + virtual bool is_vtable_blob() const { return false; } + virtual bool is_method_handles_adapter_blob() const { return false; } + virtual bool is_upcall_stub() const { return false; } + bool is_compiled() const { return _is_compiled; } + const bool* is_compiled_addr() const { return &_is_compiled; } + + inline bool is_compiled_by_c1() const { return _type == compiler_c1; }; + inline bool is_compiled_by_c2() const { return _type == compiler_c2; }; + inline bool is_compiled_by_jvmci() const { return _type == compiler_jvmci; }; + const char* compiler_name() const; + CompilerType compiler_type() const { return _type; } + + + nmethod* as_nmethod_or_null() { return is_nmethod() ? (nmethod*) this : nullptr; } + nmethod* as_nmethod() { ; return (nmethod*) this; } + CompiledMethod* as_compiled_method_or_null() { return is_compiled() ? (CompiledMethod*) this : nullptr; } + CompiledMethod* as_compiled_method() { ; return (CompiledMethod*) this; } + CodeBlob* as_codeblob_or_null() const { return (CodeBlob*) this; } + UpcallStub* as_upcall_stub() const { ; return (UpcallStub*) this; } + RuntimeStub* as_runtime_stub() const { ; return (RuntimeStub*) this; } + + + address header_begin() const { return (address) this; } + relocInfo* relocation_begin() const { return (relocInfo*) _relocation_begin; }; + relocInfo* relocation_end() const { return (relocInfo*) _relocation_end; } + address content_begin() const { return _content_begin; } + address content_end() const { return _code_end; } + address code_begin() const { return _code_begin; } + address code_end() const { return _code_end; } + address data_end() const { return _data_end; } + + + + + + void set_ctable_begin(address ctable) { } + + + int size() const { return _size; } + int header_size() const { return _header_size; } + int relocation_size() const { return pointer_delta_as_int((address) relocation_end(), (address) relocation_begin()); } + int content_size() const { return pointer_delta_as_int(content_end(), content_begin()); } + int code_size() const { return pointer_delta_as_int(code_end(), code_begin()); } + + void adjust_size(size_t used) { + _size = (int)used; + _data_offset = (int)used; + _code_end = (address)this + used; + _data_end = (address)this + used; + } + + + bool blob_contains(address addr) const { return header_begin() <= addr && addr < data_end(); } + bool code_contains(address addr) const { return code_begin() <= addr && addr < code_end(); } + bool contains(address addr) const { return content_begin() <= addr && addr < content_end(); } + bool is_frame_complete_at(address addr) const { return _frame_complete_offset != CodeOffsets::frame_never_safe && + code_contains(addr) && addr >= code_begin() + _frame_complete_offset; } + int frame_complete_offset() const { return _frame_complete_offset; } + + virtual bool is_not_entrant() const { return false; } + + + ImmutableOopMapSet* oop_maps() const { return _oop_maps; } + void set_oop_maps(OopMapSet* p); + + const ImmutableOopMap* oop_map_for_slot(int slot, address return_address) const; + const ImmutableOopMap* oop_map_for_return_address(address return_address) const; + virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) = 0; + + + int frame_size() const { return _frame_size; } + void set_frame_size(int size) { _frame_size = size; } + + + bool caller_must_gc_arguments(JavaThread* thread) const { return _caller_must_gc_arguments; } + + + const char* name() const { return _name; } + void set_name(const char* name) { _name = name; } + + + virtual void verify() = 0; + virtual void print() const; + virtual void print_on(outputStream* st) const; + virtual void print_value_on(outputStream* st) const; + void dump_for_addr(address addr, outputStream* st, bool verbose) const; + void print_code(); + + + virtual void print_block_comment(outputStream* stream, address block_begin) const { + + + + + + } +# 259 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeBlob.hpp" +}; + +class CodeBlobLayout : public StackObj { +private: + int _size; + int _header_size; + int _relocation_size; + int _content_offset; + int _code_offset; + int _data_offset; + address _code_begin; + address _code_end; + address _content_begin; + address _content_end; + address _data_end; + address _relocation_begin; + address _relocation_end; + +public: + CodeBlobLayout(address code_begin, address code_end, address content_begin, address content_end, address data_end, address relocation_begin, address relocation_end) : + _size(0), + _header_size(0), + _relocation_size(0), + _content_offset(0), + _code_offset(0), + _data_offset(0), + _code_begin(code_begin), + _code_end(code_end), + _content_begin(content_begin), + _content_end(content_end), + _data_end(data_end), + _relocation_begin(relocation_begin), + _relocation_end(relocation_end) + { + } + + CodeBlobLayout(const address start, int size, int header_size, int relocation_size, int data_offset) : + _size(size), + _header_size(header_size), + _relocation_size(relocation_size), + _content_offset(CodeBlob::align_code_offset(_header_size + _relocation_size)), + _code_offset(_content_offset), + _data_offset(data_offset) + { + ; + + _code_begin = (address) start + _code_offset; + _code_end = (address) start + _data_offset; + + _content_begin = (address) start + _content_offset; + _content_end = (address) start + _data_offset; + + _data_end = (address) start + _size; + _relocation_begin = (address) start + _header_size; + _relocation_end = _relocation_begin + _relocation_size; + } + + CodeBlobLayout(const address start, int size, int header_size, const CodeBuffer* cb) : + _size(size), + _header_size(header_size), + _relocation_size(align_up(cb->total_relocation_size(), oopSize)), + _content_offset(CodeBlob::align_code_offset(_header_size + _relocation_size)), + _code_offset(_content_offset + cb->total_offset_of(cb->insts())), + _data_offset(_content_offset + align_up(cb->total_content_size(), oopSize)) + { + ; + + _code_begin = (address) start + _code_offset; + _code_end = (address) start + _data_offset; + + _content_begin = (address) start + _content_offset; + _content_end = (address) start + _data_offset; + + _data_end = (address) start + _size; + _relocation_begin = (address) start + _header_size; + _relocation_end = _relocation_begin + _relocation_size; + } + + int size() const { return _size; } + int header_size() const { return _header_size; } + int relocation_size() const { return _relocation_size; } + int content_offset() const { return _content_offset; } + int code_offset() const { return _code_offset; } + int data_offset() const { return _data_offset; } + address code_begin() const { return _code_begin; } + address code_end() const { return _code_end; } + address data_end() const { return _data_end; } + address relocation_begin() const { return _relocation_begin; } + address relocation_end() const { return _relocation_end; } + address content_begin() const { return _content_begin; } + address content_end() const { return _content_end; } +}; + + +class RuntimeBlob : public CodeBlob { + friend class VMStructs; + public: + + + + + + RuntimeBlob(const char* name, int header_size, int size, int frame_complete, int locs_size); + + + RuntimeBlob( + const char* name, + CodeBuffer* cb, + int header_size, + int size, + int frame_complete, + int frame_size, + OopMapSet* oop_maps, + bool caller_must_gc_arguments = false + ); + + static void free(RuntimeBlob* blob); + + void verify(); + + + virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) { do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/code/codeBlob.hpp", 380); } while (0); } + + + virtual void print_on(outputStream* st) const { CodeBlob::print_on(st); } + virtual void print_value_on(outputStream* st) const { CodeBlob::print_value_on(st); } + + + static void trace_new_stub(RuntimeBlob* blob, const char* name1, const char* name2 = ""); +}; + +class WhiteBox; + + + +class BufferBlob: public RuntimeBlob { + friend class VMStructs; + friend class AdapterBlob; + friend class VtableBlob; + friend class MethodHandlesAdapterBlob; + friend class UpcallStub; + friend class WhiteBox; + + private: + + BufferBlob(const char* name, int size); + BufferBlob(const char* name, int size, CodeBuffer* cb); + + + + + void operator delete(void* p); + void* operator new(size_t s, unsigned size) throw(); + + public: + + static BufferBlob* create(const char* name, int buffer_size); + static BufferBlob* create(const char* name, CodeBuffer* cb); + + static void free(BufferBlob* buf); + + + virtual bool is_buffer_blob() const { return true; } + + + void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) { } + + void verify(); + void print_on(outputStream* st) const; + void print_value_on(outputStream* st) const; +}; + + + + + +class AdapterBlob: public BufferBlob { +private: + AdapterBlob(int size, CodeBuffer* cb); + +public: + + static AdapterBlob* create(CodeBuffer* cb); + + + virtual bool is_adapter_blob() const { return true; } +}; + + +class VtableBlob: public BufferBlob { +private: + VtableBlob(const char*, int); + + void* operator new(size_t s, unsigned size) throw(); + +public: + + static VtableBlob* create(const char* name, int buffer_size); + + + virtual bool is_vtable_blob() const { return true; } +}; + + + + +class MethodHandlesAdapterBlob: public BufferBlob { +private: + MethodHandlesAdapterBlob(int size): BufferBlob("MethodHandles adapters", size) {} + +public: + + static MethodHandlesAdapterBlob* create(int buffer_size); + + + virtual bool is_method_handles_adapter_blob() const { return true; } +}; + + + + + +class RuntimeStub: public RuntimeBlob { + friend class VMStructs; + private: + + RuntimeStub( + const char* name, + CodeBuffer* cb, + int size, + int frame_complete, + int frame_size, + OopMapSet* oop_maps, + bool caller_must_gc_arguments + ); + + + + + void operator delete(void* p); + void* operator new(size_t s, unsigned size) throw(); + + public: + + static RuntimeStub* new_runtime_stub( + const char* stub_name, + CodeBuffer* cb, + int frame_complete, + int frame_size, + OopMapSet* oop_maps, + bool caller_must_gc_arguments + ); + + static void free(RuntimeStub* stub) { RuntimeBlob::free(stub); } + + + bool is_runtime_stub() const { return true; } + + address entry_point() const { return code_begin(); } + + + void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { } + + void verify(); + void print_on(outputStream* st) const; + void print_value_on(outputStream* st) const; +}; + + + + + +class SingletonBlob: public RuntimeBlob { + friend class VMStructs; + + protected: + + + + void operator delete(void* p); + void* operator new(size_t s, unsigned size) throw(); + + public: + SingletonBlob( + const char* name, + CodeBuffer* cb, + int header_size, + int size, + int frame_size, + OopMapSet* oop_maps + ) + : RuntimeBlob(name, cb, header_size, size, CodeOffsets::frame_never_safe, frame_size, oop_maps) + {}; + + address entry_point() { return code_begin(); } + + + void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { } + void verify(); + void print_on(outputStream* st) const; + void print_value_on(outputStream* st) const; +}; + + + + + +class DeoptimizationBlob: public SingletonBlob { + friend class VMStructs; + friend class JVMCIVMStructs; + private: + int _unpack_offset; + int _unpack_with_exception; + int _unpack_with_reexecution; + + int _unpack_with_exception_in_tls; + + + + int _uncommon_trap_offset; + int _implicit_exception_uncommon_trap_offset; + + + + DeoptimizationBlob( + CodeBuffer* cb, + int size, + OopMapSet* oop_maps, + int unpack_offset, + int unpack_with_exception_offset, + int unpack_with_reexecution_offset, + int frame_size + ); + + public: + + static DeoptimizationBlob* create( + CodeBuffer* cb, + OopMapSet* oop_maps, + int unpack_offset, + int unpack_with_exception_offset, + int unpack_with_reexecution_offset, + int frame_size + ); + + + bool is_deoptimization_stub() const { return true; } + + + void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { } + + + void print_value_on(outputStream* st) const; + + address unpack() const { return code_begin() + _unpack_offset; } + address unpack_with_exception() const { return code_begin() + _unpack_with_exception; } + address unpack_with_reexecution() const { return code_begin() + _unpack_with_reexecution; } + + + + + + + void set_unpack_with_exception_in_tls_offset(int offset) { + _unpack_with_exception_in_tls = offset; + ; + } + address unpack_with_exception_in_tls() const { return code_begin() + _unpack_with_exception_in_tls; } + + + + void set_uncommon_trap_offset(int offset) { + _uncommon_trap_offset = offset; + ; + } + address uncommon_trap() const { return code_begin() + _uncommon_trap_offset; } + + void set_implicit_exception_uncommon_trap_offset(int offset) { + _implicit_exception_uncommon_trap_offset = offset; + ; + } + address implicit_exception_uncommon_trap() const { return code_begin() + _implicit_exception_uncommon_trap_offset; } + +}; + + + + + + + +class UncommonTrapBlob: public SingletonBlob { + friend class VMStructs; + private: + + UncommonTrapBlob( + CodeBuffer* cb, + int size, + OopMapSet* oop_maps, + int frame_size + ); + + public: + + static UncommonTrapBlob* create( + CodeBuffer* cb, + OopMapSet* oop_maps, + int frame_size + ); + + + void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { } + + + bool is_uncommon_trap_stub() const { return true; } +}; + + + + + +class ExceptionBlob: public SingletonBlob { + friend class VMStructs; + private: + + ExceptionBlob( + CodeBuffer* cb, + int size, + OopMapSet* oop_maps, + int frame_size + ); + + public: + + static ExceptionBlob* create( + CodeBuffer* cb, + OopMapSet* oop_maps, + int frame_size + ); + + + void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) { } + + + bool is_exception_stub() const { return true; } +}; + + + + + + +class SafepointBlob: public SingletonBlob { + friend class VMStructs; + private: + + SafepointBlob( + CodeBuffer* cb, + int size, + OopMapSet* oop_maps, + int frame_size + ); + + public: + + static SafepointBlob* create( + CodeBuffer* cb, + OopMapSet* oop_maps, + int frame_size + ); + + + void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) { } + + + bool is_safepoint_stub() const { return true; } +}; + + + +class UpcallLinker; + + +class UpcallStub: public RuntimeBlob { + friend class UpcallLinker; + private: + intptr_t _exception_handler_offset; + jobject _receiver; + ByteSize _frame_data_offset; + + UpcallStub(const char* name, CodeBuffer* cb, int size, + intptr_t exception_handler_offset, + jobject receiver, ByteSize frame_data_offset); + + + + + void operator delete(void* p); + void* operator new(size_t s, unsigned size) throw(); + + struct FrameData { + JavaFrameAnchor jfa; + JavaThread* thread; + JNIHandleBlock* old_handles; + JNIHandleBlock* new_handles; + }; + + + FrameData* frame_data_for_frame(const frame& frame) const; + public: + + static UpcallStub* create(const char* name, CodeBuffer* cb, + intptr_t exception_handler_offset, + jobject receiver, ByteSize frame_data_offset); + + static void free(UpcallStub* blob); + + address exception_handler() { return code_begin() + _exception_handler_offset; } + jobject receiver() { return _receiver; } + + JavaFrameAnchor* jfa_for_frame(const frame& frame) const; + + + virtual bool is_upcall_stub() const override { return true; } + + + void oops_do(OopClosure* f, const frame& frame); + virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) override; + virtual void verify() override; + + + virtual void print_on(outputStream* st) const override; + virtual void print_value_on(outputStream* st) const override; +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/code/compiledMethod.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/pcDesc.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/code/pcDesc.hpp" +class CompiledMethod; + +class PcDesc { + friend class VMStructs; + private: + int _pc_offset; + int _scope_decode_offset; + int _obj_decode_offset; + + enum { + PCDESC_reexecute = 1 << 0, + PCDESC_is_method_handle_invoke = 1 << 1, + PCDESC_return_oop = 1 << 2, + PCDESC_rethrow_exception = 1 << 3, + PCDESC_has_ea_local_in_scope = 1 << 4, + PCDESC_arg_escape = 1 << 5 + }; + + int _flags; + + void set_flag(int mask, bool z) { + _flags = z ? (_flags | mask) : (_flags & ~mask); + } + + public: + int pc_offset() const { return _pc_offset; } + int scope_decode_offset() const { return _scope_decode_offset; } + int obj_decode_offset() const { return _obj_decode_offset; } + + void set_pc_offset(int x) { _pc_offset = x; } + void set_scope_decode_offset(int x) { _scope_decode_offset = x; } + void set_obj_decode_offset(int x) { _obj_decode_offset = x; } + + + + PcDesc(int pc_offset, int scope_decode_offset, int obj_decode_offset); + + enum { + + lower_offset_limit = -1, + upper_offset_limit = (unsigned int)-1 >> 1 + }; + + + bool rethrow_exception() const { return (_flags & PCDESC_rethrow_exception) != 0; } + void set_rethrow_exception(bool z) { set_flag(PCDESC_rethrow_exception, z); } + bool should_reexecute() const { return (_flags & PCDESC_reexecute) != 0; } + void set_should_reexecute(bool z) { set_flag(PCDESC_reexecute, z); } + + + bool is_same_info(const PcDesc* pd) { + return _scope_decode_offset == pd->_scope_decode_offset && + _obj_decode_offset == pd->_obj_decode_offset && + _flags == pd->_flags; + } + + bool is_method_handle_invoke() const { return (_flags & PCDESC_is_method_handle_invoke) != 0; } + void set_is_method_handle_invoke(bool z) { set_flag(PCDESC_is_method_handle_invoke, z); } + + bool return_oop() const { return (_flags & PCDESC_return_oop) != 0; } + void set_return_oop(bool z) { set_flag(PCDESC_return_oop, z); } + + + + bool has_ea_local_in_scope() const { return (_flags & PCDESC_has_ea_local_in_scope) != 0; } + void set_has_ea_local_in_scope(bool z) { set_flag(PCDESC_has_ea_local_in_scope, z); } + + + + bool arg_escape() const { return (_flags & PCDESC_arg_escape) != 0; } + void set_arg_escape(bool z) { set_flag(PCDESC_arg_escape, z); } + + + address real_pc(const CompiledMethod* code) const; + + void print(CompiledMethod* code) { print_on(tty, code); } + void print_on(outputStream* st, CompiledMethod* code); + bool verify(CompiledMethod* code); +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/code/compiledMethod.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/method.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/method.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constantPool.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constantPool.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/cpCache.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/cpCache.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/bytecodes.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/bytecodes.hpp" +class Method; + + +class Bytecodes: AllStatic { + public: + enum Code { + _illegal = -1, + + + _nop = 0, + _aconst_null = 1, + _iconst_m1 = 2, + _iconst_0 = 3, + _iconst_1 = 4, + _iconst_2 = 5, + _iconst_3 = 6, + _iconst_4 = 7, + _iconst_5 = 8, + _lconst_0 = 9, + _lconst_1 = 10, + _fconst_0 = 11, + _fconst_1 = 12, + _fconst_2 = 13, + _dconst_0 = 14, + _dconst_1 = 15, + _bipush = 16, + _sipush = 17, + _ldc = 18, + _ldc_w = 19, + _ldc2_w = 20, + _iload = 21, + _lload = 22, + _fload = 23, + _dload = 24, + _aload = 25, + _iload_0 = 26, + _iload_1 = 27, + _iload_2 = 28, + _iload_3 = 29, + _lload_0 = 30, + _lload_1 = 31, + _lload_2 = 32, + _lload_3 = 33, + _fload_0 = 34, + _fload_1 = 35, + _fload_2 = 36, + _fload_3 = 37, + _dload_0 = 38, + _dload_1 = 39, + _dload_2 = 40, + _dload_3 = 41, + _aload_0 = 42, + _aload_1 = 43, + _aload_2 = 44, + _aload_3 = 45, + _iaload = 46, + _laload = 47, + _faload = 48, + _daload = 49, + _aaload = 50, + _baload = 51, + _caload = 52, + _saload = 53, + _istore = 54, + _lstore = 55, + _fstore = 56, + _dstore = 57, + _astore = 58, + _istore_0 = 59, + _istore_1 = 60, + _istore_2 = 61, + _istore_3 = 62, + _lstore_0 = 63, + _lstore_1 = 64, + _lstore_2 = 65, + _lstore_3 = 66, + _fstore_0 = 67, + _fstore_1 = 68, + _fstore_2 = 69, + _fstore_3 = 70, + _dstore_0 = 71, + _dstore_1 = 72, + _dstore_2 = 73, + _dstore_3 = 74, + _astore_0 = 75, + _astore_1 = 76, + _astore_2 = 77, + _astore_3 = 78, + _iastore = 79, + _lastore = 80, + _fastore = 81, + _dastore = 82, + _aastore = 83, + _bastore = 84, + _castore = 85, + _sastore = 86, + _pop = 87, + _pop2 = 88, + _dup = 89, + _dup_x1 = 90, + _dup_x2 = 91, + _dup2 = 92, + _dup2_x1 = 93, + _dup2_x2 = 94, + _swap = 95, + _iadd = 96, + _ladd = 97, + _fadd = 98, + _dadd = 99, + _isub = 100, + _lsub = 101, + _fsub = 102, + _dsub = 103, + _imul = 104, + _lmul = 105, + _fmul = 106, + _dmul = 107, + _idiv = 108, + _ldiv = 109, + _fdiv = 110, + _ddiv = 111, + _irem = 112, + _lrem = 113, + _frem = 114, + _drem = 115, + _ineg = 116, + _lneg = 117, + _fneg = 118, + _dneg = 119, + _ishl = 120, + _lshl = 121, + _ishr = 122, + _lshr = 123, + _iushr = 124, + _lushr = 125, + _iand = 126, + _land = 127, + _ior = 128, + _lor = 129, + _ixor = 130, + _lxor = 131, + _iinc = 132, + _i2l = 133, + _i2f = 134, + _i2d = 135, + _l2i = 136, + _l2f = 137, + _l2d = 138, + _f2i = 139, + _f2l = 140, + _f2d = 141, + _d2i = 142, + _d2l = 143, + _d2f = 144, + _i2b = 145, + _i2c = 146, + _i2s = 147, + _lcmp = 148, + _fcmpl = 149, + _fcmpg = 150, + _dcmpl = 151, + _dcmpg = 152, + _ifeq = 153, + _ifne = 154, + _iflt = 155, + _ifge = 156, + _ifgt = 157, + _ifle = 158, + _if_icmpeq = 159, + _if_icmpne = 160, + _if_icmplt = 161, + _if_icmpge = 162, + _if_icmpgt = 163, + _if_icmple = 164, + _if_acmpeq = 165, + _if_acmpne = 166, + _goto = 167, + _jsr = 168, + _ret = 169, + _tableswitch = 170, + _lookupswitch = 171, + _ireturn = 172, + _lreturn = 173, + _freturn = 174, + _dreturn = 175, + _areturn = 176, + _return = 177, + _getstatic = 178, + _putstatic = 179, + _getfield = 180, + _putfield = 181, + _invokevirtual = 182, + _invokespecial = 183, + _invokestatic = 184, + _invokeinterface = 185, + _invokedynamic = 186, + _new = 187, + _newarray = 188, + _anewarray = 189, + _arraylength = 190, + _athrow = 191, + _checkcast = 192, + _instanceof = 193, + _monitorenter = 194, + _monitorexit = 195, + _wide = 196, + _multianewarray = 197, + _ifnull = 198, + _ifnonnull = 199, + _goto_w = 200, + _jsr_w = 201, + _breakpoint = 202, + + number_of_java_codes, + + + _fast_agetfield = number_of_java_codes, + _fast_bgetfield , + _fast_cgetfield , + _fast_dgetfield , + _fast_fgetfield , + _fast_igetfield , + _fast_lgetfield , + _fast_sgetfield , + + _fast_aputfield , + _fast_bputfield , + _fast_zputfield , + _fast_cputfield , + _fast_dputfield , + _fast_fputfield , + _fast_iputfield , + _fast_lputfield , + _fast_sputfield , + + _fast_aload_0 , + _fast_iaccess_0 , + _fast_aaccess_0 , + _fast_faccess_0 , + + _fast_iload , + _fast_iload2 , + _fast_icaload , + + _fast_invokevfinal , + _fast_linearswitch , + _fast_binaryswitch , + + + _fast_aldc , + _fast_aldc_w , + + _return_register_finalizer , + + + _invokehandle , +# 299 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/bytecodes.hpp" + _nofast_getfield , + _nofast_putfield , + _nofast_aload_0 , + _nofast_iload , + + _shouldnotreachhere , + + + number_of_codes + }; + + static_assert(number_of_codes <= 256, "too many bytecodes"); + + + enum Flags : jchar { + + _bc_can_trap = 1<<0, + _bc_can_rewrite = 1<<1, + + + _fmt_has_c = 1<<2, + _fmt_has_j = 1<<3, + _fmt_has_k = 1<<4, + _fmt_has_i = 1<<5, + _fmt_has_o = 1<<6, + _fmt_has_nbo = 1<<7, + _fmt_has_u2 = 1<<8, + _fmt_has_u4 = 1<<9, + _fmt_not_variable = 1<<10, + _fmt_not_simple = 1<<11, + _all_fmt_bits = (_fmt_not_simple*2 - _fmt_has_c), + + + _fmt_b = _fmt_not_variable, + _fmt_bc = _fmt_b | _fmt_has_c, + _fmt_bi = _fmt_b | _fmt_has_i, + _fmt_bkk = _fmt_b | _fmt_has_k | _fmt_has_u2, + _fmt_bJJ = _fmt_b | _fmt_has_j | _fmt_has_u2 | _fmt_has_nbo, + _fmt_bo2 = _fmt_b | _fmt_has_o | _fmt_has_u2, + _fmt_bo4 = _fmt_b | _fmt_has_o | _fmt_has_u4 + }; + + private: + static bool _is_initialized; + static const char* const _name [number_of_codes]; + static const BasicType _result_type[number_of_codes]; + static const s_char _depth [number_of_codes]; + static const u_char _lengths [number_of_codes]; + static const Code _java_code [number_of_codes]; + static jchar _flags [(1<> 4 : -1; } + static bool can_trap (Code code) { check(code); return has_all_flags(code, _bc_can_trap, false); } + static Code java_code (Code code) { check(code); return _java_code [code]; } + static bool can_rewrite (Code code) { check(code); return has_all_flags(code, _bc_can_rewrite, false); } + static bool must_rewrite(Bytecodes::Code code) { return can_rewrite(code) && check_must_rewrite(code); } + static bool native_byte_order(Code code) { check(code); return has_all_flags(code, _fmt_has_nbo, false); } + static bool uses_cp_cache (Code code) { check(code); return has_all_flags(code, _fmt_has_j, false); } + + + static int special_length_at(Bytecodes::Code code, address bcp, address end = nullptr); + static int raw_special_length_at(address bcp, address end = nullptr); + static int length_for_code_at(Bytecodes::Code code, address bcp) { int l = length_for(code); return l > 0 ? l : special_length_at(code, bcp); } + static int length_at (Method* method, address bcp) { return length_for_code_at(code_at(method, bcp), bcp); } + static int java_length_at (Method* method, address bcp) { return length_for_code_at(java_code_at(method, bcp), bcp); } + static bool is_java_code (Code code) { return 0 <= code && code < number_of_java_codes; } + + static bool is_store_into_local(Code code){ return (_istore <= code && code <= _astore_3); } + static bool is_const (Code code) { return (_aconst_null <= code && code <= _ldc2_w); } + static bool is_zero_const (Code code) { return (code == _aconst_null || code == _iconst_0 + || code == _fconst_0 || code == _dconst_0); } + static bool is_return (Code code) { return (_ireturn <= code && code <= _return); } + static bool is_invoke (Code code) { return (_invokevirtual <= code && code <= _invokedynamic); } + static bool is_field_code (Code code) { return (_getstatic <= java_code(code) && java_code(code) <= _putfield); } + static bool has_receiver (Code code) { ; return code == _invokevirtual || + code == _invokespecial || + code == _invokeinterface; } + static bool has_optional_appendix(Code code) { return code == _invokedynamic || code == _invokehandle; } + + static int flags (int code, bool is_wide) { + ; + return _flags[code + (is_wide ? (1<= JVM_CONSTANT_Integer && _tag <= JVM_CONSTANT_String) || + is_method_type() || is_method_handle() || is_dynamic_constant() || + is_unresolved_klass()); + } + + constantTag() { + _tag = JVM_CONSTANT_Invalid; + } + constantTag(jbyte tag) { + + + ; + _tag = tag; + } + + static jbyte type2tag(BasicType bt) { + if (is_subword_type(bt)) { + bt = T_INT; + } + if (bt == T_ARRAY) { + bt = T_OBJECT; + } + switch (bt) { + case T_INT: return JVM_CONSTANT_Integer; + case T_LONG: return JVM_CONSTANT_Long; + case T_FLOAT: return JVM_CONSTANT_Float; + case T_DOUBLE: return JVM_CONSTANT_Double; + case T_OBJECT: return JVM_CONSTANT_String; + + default: + ; + return JVM_CONSTANT_Invalid; + } + } + + jbyte value() const { return _tag; } + jbyte error_value() const; + jbyte non_error_value() const; + + BasicType basic_type() const; + + const char* internal_name() const; + + void print_on(outputStream* st) const {}; +}; +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/oops/cpCache.hpp" 2 +# 130 "/home/rehn/source/jdk/open/src/hotspot/share/oops/cpCache.hpp" +class CallInfo; +class ResolvedFieldEntry; +class ResolvedIndyEntry; + +class ConstantPoolCacheEntry { + friend class VMStructs; + friend class ConstantPool; + friend class InterpreterRuntime; + + private: + volatile intx _indices; + Metadata* volatile _f1; + volatile intx _f2; + volatile intx _flags; + + + void set_bytecode_1(Bytecodes::Code code); + void set_bytecode_2(Bytecodes::Code code); + void set_f1(Metadata* f1) { + Metadata* existing_f1 = _f1; + ; + _f1 = f1; + } + void release_set_f1(Metadata* f1); + void set_f2(intx f2) { + intx existing_f2 = _f2; + ; + _f2 = f2; + } + void set_f2_as_vfinal_method(Method* f2) { + ; + set_f2((intx)f2); + } + intx make_flags(TosState state, int option_bits, int field_index_or_method_params); + void set_flags(intx flags) { _flags = flags; } + void set_field_flags(TosState field_type, int option_bits, int field_index) { + ; + set_flags(make_flags(field_type, option_bits | (1 << is_field_entry_shift), field_index)); + } + void set_method_flags(TosState return_type, int option_bits, int method_params) { + ; + set_flags(make_flags(return_type, option_bits, method_params)); + } + + public: + + + enum { + + tos_state_bits = 4, + tos_state_mask = ((((tos_state_bits) >= BitsPerWord) ? 0 : (OneBit << (tos_state_bits))) - 1), + tos_state_shift = BitsPerInt - tos_state_bits, + + is_field_entry_shift = 26, + has_local_signature_shift = 25, + has_appendix_shift = 24, + is_forced_virtual_shift = 23, + is_final_shift = 22, + is_volatile_shift = 21, + is_vfinal_shift = 20, + indy_resolution_failed_shift= 19, + + field_index_bits = 16, + field_index_mask = ((((field_index_bits) >= BitsPerWord) ? 0 : (OneBit << (field_index_bits))) - 1), + parameter_size_bits = 8, + parameter_size_mask = ((((parameter_size_bits) >= BitsPerWord) ? 0 : (OneBit << (parameter_size_bits))) - 1), + option_bits_mask = ~(((~0u) << tos_state_shift) | (field_index_mask | parameter_size_mask)) + }; + + + enum { + cp_index_bits = 2*BitsPerByte, + cp_index_mask = ((((cp_index_bits) >= BitsPerWord) ? 0 : (OneBit << (cp_index_bits))) - 1), + bytecode_1_shift = cp_index_bits, + bytecode_1_mask = ((((BitsPerByte) >= BitsPerWord) ? 0 : (OneBit << (BitsPerByte))) - 1), + bytecode_2_shift = cp_index_bits + BitsPerByte, + bytecode_2_mask = ((((BitsPerByte) >= BitsPerWord) ? 0 : (OneBit << (BitsPerByte))) - 1) + }; + + + + void initialize_entry(int original_index); + void initialize_resolved_reference_index(int ref_index) { + ; + _f2 = ref_index; + } + + void set_field( + Bytecodes::Code get_code, + Bytecodes::Code put_code, + Klass* field_holder, + int orig_field_index, + int field_offset, + TosState field_type, + bool is_final, + bool is_volatile + ); + + private: + void set_direct_or_vtable_call( + Bytecodes::Code invoke_code, + const methodHandle& method, + int vtable_index, + bool sender_is_interface + ); + + public: + void set_direct_call( + Bytecodes::Code invoke_code, + const methodHandle& method, + bool sender_is_interface + ); + + void set_vtable_call( + Bytecodes::Code invoke_code, + const methodHandle& method, + int vtable_index + ); + + void set_itable_call( + Bytecodes::Code invoke_code, + Klass* referenced_klass, + const methodHandle& method, + int itable_index + ); + + void set_method_handle( + const constantPoolHandle& cpool, + const CallInfo &call_info + ); +# 276 "/home/rehn/source/jdk/open/src/hotspot/share/oops/cpCache.hpp" + void set_method_handle_common( + const constantPoolHandle& cpool, + Bytecodes::Code invoke_code, + const CallInfo &call_info + ); + + + + Method* method_if_resolved(const constantPoolHandle& cpool) const; + oop appendix_if_resolved(const constantPoolHandle& cpool) const; + + void set_parameter_size(int value); + + + + static int bytecode_number(Bytecodes::Code code) { + switch (code) { + case Bytecodes::_getstatic : + case Bytecodes::_getfield : + case Bytecodes::_invokespecial : + case Bytecodes::_invokestatic : + case Bytecodes::_invokehandle : + case Bytecodes::_invokedynamic : + case Bytecodes::_invokeinterface : return 1; + case Bytecodes::_putstatic : + case Bytecodes::_putfield : + case Bytecodes::_invokevirtual : return 2; + default : break; + } + return -1; + } + + + bool is_resolved(Bytecodes::Code code) const; + + + intx indices() const { return _indices; } + intx indices_ord() const; + int constant_pool_index() const { return (indices() & cp_index_mask); } + Bytecodes::Code bytecode_1() const; + Bytecodes::Code bytecode_2() const; + Metadata* f1_ord() const; + Method* f1_as_method() const; + Klass* f1_as_klass() const; + + + + + + bool is_f1_null() const; + int f2_as_index() const { ; return (int) _f2; } + Method* f2_as_vfinal_method() const { ; return (Method*)_f2; } + Method* f2_as_interface_method() const; + intx flags_ord() const; + int field_index() const { ; return (_flags & field_index_mask); } + int parameter_size() const { ; return (_flags & parameter_size_mask); } + bool is_volatile() const { return (_flags & (1 << is_volatile_shift)) != 0; } + bool is_final() const { return (_flags & (1 << is_final_shift)) != 0; } + bool is_forced_virtual() const { return (_flags & (1 << is_forced_virtual_shift)) != 0; } + bool is_vfinal() const { return (_flags & (1 << is_vfinal_shift)) != 0; } + bool indy_resolution_failed() const; + bool has_appendix() const; + bool has_local_signature() const; + bool is_method_entry() const { return (_flags & (1 << is_field_entry_shift)) == 0; } + bool is_field_entry() const { return (_flags & (1 << is_field_entry_shift)) != 0; } + bool is_long() const { return flag_state() == ltos; } + bool is_double() const { return flag_state() == dtos; } + TosState flag_state() const { ; + return (TosState)((_flags >> tos_state_shift) & tos_state_mask); } + void set_indy_resolution_failed(); + + + static WordSize size() { + return in_WordSize(align_up((int)sizeof(ConstantPoolCacheEntry), wordSize) / wordSize); + } + static ByteSize size_in_bytes() { return in_ByteSize(sizeof(ConstantPoolCacheEntry)); } + static ByteSize indices_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstantPoolCacheEntry)]; ConstantPoolCacheEntry* dummyObj = (ConstantPoolCacheEntry*)space; char* c = (char*)(void*)&dummyObj->_indices; return (size_t)(c - space); }())); } + static ByteSize f1_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstantPoolCacheEntry)]; ConstantPoolCacheEntry* dummyObj = (ConstantPoolCacheEntry*)space; char* c = (char*)(void*)&dummyObj->_f1; return (size_t)(c - space); }())); } + static ByteSize f2_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstantPoolCacheEntry)]; ConstantPoolCacheEntry* dummyObj = (ConstantPoolCacheEntry*)space; char* c = (char*)(void*)&dummyObj->_f2; return (size_t)(c - space); }())); } + static ByteSize flags_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstantPoolCacheEntry)]; ConstantPoolCacheEntry* dummyObj = (ConstantPoolCacheEntry*)space; char* c = (char*)(void*)&dummyObj->_flags; return (size_t)(c - space); }())); } +# 364 "/home/rehn/source/jdk/open/src/hotspot/share/oops/cpCache.hpp" + void adjust_method_entry(Method* old_method, Method* new_method, + bool* trace_name_printed); + bool check_no_old_or_obsolete_entries(); + Method* get_interesting_method_entry(); + + + + void print (outputStream* st, int index, const ConstantPoolCache* cache) const; + void verify(outputStream* st) const; + + static void verify_tos_state_shift() { + + ; + } +}; + + + + + + + +class ConstantPoolCache: public MetaspaceObj { + friend class VMStructs; + friend class MetadataFactory; + private: + + + int _length; + + + + int _archived_references_index; + + ConstantPool* _constant_pool; + + + + + + OopHandle _resolved_references; + Array* _reference_map; + + + uint64_t _gc_epoch; + + Array* _resolved_indy_entries; + Array* _resolved_field_entries; + + Array* _initial_entries; + + + + + + ConstantPoolCache(int length, + const intStack& inverse_index_map, + const intStack& invokedynamic_references_map, + Array* indy_info, + Array* field_entries); + + + void initialize(const intArray& inverse_index_map, + const intArray& invokedynamic_references_map); + public: + static ConstantPoolCache* allocate(ClassLoaderData* loader_data, + const intStack& cp_cache_map, + const intStack& invokedynamic_references_map, + const GrowableArray indy_entries, + const GrowableArray field_entries, + JavaThread* __the_thread__); + + int length() const { return _length; } + void metaspace_pointers_do(MetaspaceClosure* it); + MetaspaceObj::Type type() const { return ConstantPoolCacheType; } + + oop archived_references() ; + void set_archived_references(int root_index) ; + void clear_archived_references() ; + + inline objArrayOop resolved_references(); + void set_resolved_references(OopHandle s) { _resolved_references = s; } + Array* reference_map() const { return _reference_map; } + void set_reference_map(Array* o) { _reference_map = o; } + + Array* resolved_field_entries() { return _resolved_field_entries; } + inline ResolvedFieldEntry* resolved_field_entry_at(int field_index) const; + inline int resolved_field_entries_length() const; + void print_resolved_field_entries(outputStream* st) const; + + Array* resolved_indy_entries() { return _resolved_indy_entries; } + inline ResolvedIndyEntry* resolved_indy_entry_at(int index) const; + inline int resolved_indy_entries_length() const; + void print_resolved_indy_entries(outputStream* st) const; + + + static ByteSize resolved_references_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstantPoolCache)]; ConstantPoolCache* dummyObj = (ConstantPoolCache*)space; char* c = (char*)(void*)&dummyObj->_resolved_references; return (size_t)(c - space); }())); } + static ByteSize invokedynamic_entries_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstantPoolCache)]; ConstantPoolCache* dummyObj = (ConstantPoolCache*)space; char* c = (char*)(void*)&dummyObj->_resolved_indy_entries; return (size_t)(c - space); }())); } + static ByteSize field_entries_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstantPoolCache)]; ConstantPoolCache* dummyObj = (ConstantPoolCache*)space; char* c = (char*)(void*)&dummyObj->_resolved_field_entries; return (size_t)(c - space); }())); } + + + void remove_unshareable_info(); + void save_for_archive(JavaThread* __the_thread__); + + + private: + void walk_entries_for_initialization(bool check_only); + void set_length(int length) { _length = length; } + + static int header_size() { return sizeof(ConstantPoolCache) / wordSize; } + static int size(int length) { return align_metadata_size(header_size() + length * in_words(ConstantPoolCacheEntry::size())); } + public: + int size() const { return size(length()); } + private: + + + ConstantPool** constant_pool_addr() { return &_constant_pool; } + ConstantPoolCacheEntry* base() const { return (ConstantPoolCacheEntry*)((address)this + in_bytes(base_offset())); } + + friend class ConstantPoolCacheEntry; + + public: + + void set_constant_pool(ConstantPool* pool) { _constant_pool = pool; } + ConstantPool* constant_pool() const { return _constant_pool; } + + + ConstantPoolCacheEntry* entry_at(int i) const { + ; + return base() + i; + } + + + static ByteSize base_offset() { return in_ByteSize(sizeof(ConstantPoolCache)); } + static ByteSize entry_offset(int raw_index) { + int index = raw_index; + return (base_offset() + ConstantPoolCacheEntry::size_in_bytes() * index); + } +# 510 "/home/rehn/source/jdk/open/src/hotspot/share/oops/cpCache.hpp" + void adjust_method_entries(bool* trace_name_printed); + bool check_no_old_or_obsolete_entries(); + void dump_cache(); + + + + + void deallocate_contents(ClassLoaderData* data); + bool is_klass() const { return false; } + void record_gc_epoch(); + uint64_t gc_epoch() { return _gc_epoch; } + + + + + + bool save_and_throw_indy_exc(const constantPoolHandle& cpool, int cpool_index, int index, constantTag tag, JavaThread* __the_thread__); + oop set_dynamic_call(const CallInfo &call_info, int index); + + + void print_on(outputStream* st) const; + void print_value_on(outputStream* st) const; + + const char* internal_name() const { return "{constant pool cache}"; } + + + void verify_on(outputStream* st); +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constantPool.hpp" 2 +# 53 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constantPool.hpp" +class CPKlassSlot { + + int _name_index; + + + int _resolved_klass_index; +public: + enum { + + + + _temp_resolved_klass_index = 0xffff + }; + CPKlassSlot(int n, int rk) { + _name_index = n; + _resolved_klass_index = rk; + } + int name_index() const { + return _name_index; + } + int resolved_klass_index() const { + ; + return _resolved_klass_index; + } +}; + +class ConstantPool : public Metadata { + friend class VMStructs; + friend class JVMCIVMStructs; + friend class BytecodeInterpreter; + friend class Universe; + friend class ClassPrelinker; + private: + + + Array* _tags; + ConstantPoolCache* _cache; + InstanceKlass* _pool_holder; + Array* _operands; + + + + Array* _resolved_klasses; + + u2 _major_version; + u2 _minor_version; + + + + u2 _generic_signature_index; + + + u2 _source_file_name_index; + + enum { + _has_preresolution = 1, + _on_stack = 2, + _is_shared = 4, + _has_dynamic_constant = 8 + }; + + u2 _flags; + + int _length; + + union { + + int _resolved_reference_length; + + int _version; + } _saved; + + void set_tags(Array* tags) { _tags = tags; } + void tag_at_put(int cp_index, jbyte t) { tags()->at_put(cp_index, t); } + void release_tag_at_put(int cp_index, jbyte t) { tags()->release_at_put(cp_index, t); } + + u1* tag_addr_at(int cp_index) const { return tags()->adr_at(cp_index); } + + void set_operands(Array* operands) { _operands = operands; } + + u2 flags() const { return _flags; } + void set_flags(u2 f) { _flags = f; } + + private: + intptr_t* base() const { return (intptr_t*) (((char*) this) + sizeof(ConstantPool)); } + + intptr_t* obj_at_addr(int cp_index) const { + ; + return (intptr_t*) &base()[cp_index]; + } + + jint* int_at_addr(int cp_index) const { + ; + return (jint*) &base()[cp_index]; + } + + jlong* long_at_addr(int cp_index) const { + ; + return (jlong*) &base()[cp_index]; + } + + jfloat* float_at_addr(int cp_index) const { + ; + return (jfloat*) &base()[cp_index]; + } + + jdouble* double_at_addr(int cp_index) const { + ; + return (jdouble*) &base()[cp_index]; + } + + ConstantPool(Array* tags); + ConstantPool() { ; } + public: + static ConstantPool* allocate(ClassLoaderData* loader_data, int length, JavaThread* __the_thread__); + + virtual bool is_constantPool() const { return true; } + + Array* tags() const { return _tags; } + Array* operands() const { return _operands; } + + bool has_preresolution() const { return (_flags & _has_preresolution) != 0; } + void set_has_preresolution() { + ; + _flags |= _has_preresolution; + } + + + u2 major_version() const { return _major_version; } + void set_major_version(u2 major_version) { _major_version = major_version; } + u2 minor_version() const { return _minor_version; } + void set_minor_version(u2 minor_version) { _minor_version = minor_version; } + + + Symbol* generic_signature() const { + return (_generic_signature_index == 0) ? + nullptr : symbol_at(_generic_signature_index); + } + u2 generic_signature_index() const { return _generic_signature_index; } + void set_generic_signature_index(u2 sig_index) { _generic_signature_index = sig_index; } + + + Symbol* source_file_name() const { + return (_source_file_name_index == 0) ? + nullptr : symbol_at(_source_file_name_index); + } + u2 source_file_name_index() const { return _source_file_name_index; } + void set_source_file_name_index(u2 sourcefile_index) { _source_file_name_index = sourcefile_index; } + + void copy_fields(const ConstantPool* orig); + + + + + + bool on_stack() const; + bool is_maybe_on_stack() const; + void set_on_stack(const bool value); + + + bool is_shared() const { return (_flags & _is_shared) != 0; } + + bool has_dynamic_constant() const { return (_flags & _has_dynamic_constant) != 0; } + void set_has_dynamic_constant() { _flags |= _has_dynamic_constant; } + + + InstanceKlass* pool_holder() const { return _pool_holder; } + void set_pool_holder(InstanceKlass* k) { _pool_holder = k; } + InstanceKlass** pool_holder_addr() { return &_pool_holder; } + + + ConstantPoolCache* cache() const { return _cache; } + void set_cache(ConstantPoolCache* cache){ _cache = cache; } + + virtual void metaspace_pointers_do(MetaspaceClosure* iter); + virtual MetaspaceObj::Type type() const { return ConstantPoolType; } + + + void initialize_resolved_references(ClassLoaderData* loader_data, + const intStack& reference_map, + int constant_pool_map_length, + JavaThread* __the_thread__); + + + objArrayOop resolved_references() const; + objArrayOop resolved_references_or_null() const; + oop resolved_reference_at(int obj_index) const; + oop set_resolved_reference_at(int index, oop new_value); + + + int object_to_cp_index(int index) { return reference_map()->at(index); } + int cp_to_object_index(int index); + + void set_resolved_klasses(Array* rk) { _resolved_klasses = rk; } + Array* resolved_klasses() const { return _resolved_klasses; } + void allocate_resolved_klasses(ClassLoaderData* loader_data, int num_klasses, JavaThread* __the_thread__); + void initialize_unresolved_klasses(ClassLoaderData* loader_data, JavaThread* __the_thread__); + + + + + + static bool is_invokedynamic_index(int i) { return (i < 0); } + static int decode_invokedynamic_index(int i) { ; return ~i; } + static int encode_invokedynamic_index(int i) { ; return ~i; } + + + + + inline u2 invokedynamic_bootstrap_ref_index_at(int indy_index) const; + + + static ByteSize tags_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstantPool)]; ConstantPool* dummyObj = (ConstantPool*)space; char* c = (char*)(void*)&dummyObj->_tags; return (size_t)(c - space); }())); } + static ByteSize cache_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstantPool)]; ConstantPool* dummyObj = (ConstantPool*)space; char* c = (char*)(void*)&dummyObj->_cache; return (size_t)(c - space); }())); } + static ByteSize pool_holder_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstantPool)]; ConstantPool* dummyObj = (ConstantPool*)space; char* c = (char*)(void*)&dummyObj->_pool_holder; return (size_t)(c - space); }())); } + static ByteSize resolved_klasses_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (ConstantPool)]; ConstantPool* dummyObj = (ConstantPool*)space; char* c = (char*)(void*)&dummyObj->_resolved_klasses; return (size_t)(c - space); }())); } + + + + + void klass_index_at_put(int cp_index, int name_index) { + tag_at_put(cp_index, JVM_CONSTANT_ClassIndex); + *int_at_addr(cp_index) = name_index; + } + + + void klass_at_put(int class_index, Klass* k); + + void unresolved_klass_at_put(int cp_index, int name_index, int resolved_klass_index) { + release_tag_at_put(cp_index, JVM_CONSTANT_UnresolvedClass); + + ; + ; + *int_at_addr(cp_index) = + build_int_from_shorts((jushort)resolved_klass_index, (jushort)name_index); + } + + void method_handle_index_at_put(int cp_index, int ref_kind, int ref_index) { + tag_at_put(cp_index, JVM_CONSTANT_MethodHandle); + *int_at_addr(cp_index) = ((jint) ref_index<<16) | ref_kind; + } + + void method_type_index_at_put(int cp_index, int ref_index) { + tag_at_put(cp_index, JVM_CONSTANT_MethodType); + *int_at_addr(cp_index) = ref_index; + } + + void dynamic_constant_at_put(int cp_index, int bsms_attribute_index, int name_and_type_index) { + tag_at_put(cp_index, JVM_CONSTANT_Dynamic); + *int_at_addr(cp_index) = ((jint) name_and_type_index<<16) | bsms_attribute_index; + } + + void invoke_dynamic_at_put(int cp_index, int bsms_attribute_index, int name_and_type_index) { + tag_at_put(cp_index, JVM_CONSTANT_InvokeDynamic); + *int_at_addr(cp_index) = ((jint) name_and_type_index<<16) | bsms_attribute_index; + } + + void unresolved_string_at_put(int cp_index, Symbol* s) { + ; + + + + tag_at_put(cp_index, JVM_CONSTANT_String); + *symbol_at_addr(cp_index) = s; + } + + void int_at_put(int cp_index, jint i) { + tag_at_put(cp_index, JVM_CONSTANT_Integer); + *int_at_addr(cp_index) = i; + } + + void long_at_put(int cp_index, jlong l) { + tag_at_put(cp_index, JVM_CONSTANT_Long); + + Bytes::put_native_u8((address)long_at_addr(cp_index), *((u8*) &l)); + } + + void float_at_put(int cp_index, jfloat f) { + tag_at_put(cp_index, JVM_CONSTANT_Float); + *float_at_addr(cp_index) = f; + } + + void double_at_put(int cp_index, jdouble d) { + tag_at_put(cp_index, JVM_CONSTANT_Double); + + + Bytes::put_native_u8((address) double_at_addr(cp_index), *((u8*) &d)); + } + + Symbol** symbol_at_addr(int cp_index) const { + ; + return (Symbol**) &base()[cp_index]; + } + + void symbol_at_put(int cp_index, Symbol* s) { + ; + tag_at_put(cp_index, JVM_CONSTANT_Utf8); + *symbol_at_addr(cp_index) = s; + } + + void string_at_put(int obj_index, oop str); + + + void string_index_at_put(int cp_index, int string_index) { + tag_at_put(cp_index, JVM_CONSTANT_StringIndex); + *int_at_addr(cp_index) = string_index; + } + + void field_at_put(int cp_index, int class_index, int name_and_type_index) { + tag_at_put(cp_index, JVM_CONSTANT_Fieldref); + *int_at_addr(cp_index) = ((jint) name_and_type_index<<16) | class_index; + } + + void method_at_put(int cp_index, int class_index, int name_and_type_index) { + tag_at_put(cp_index, JVM_CONSTANT_Methodref); + *int_at_addr(cp_index) = ((jint) name_and_type_index<<16) | class_index; + } + + void interface_method_at_put(int cp_index, int class_index, int name_and_type_index) { + tag_at_put(cp_index, JVM_CONSTANT_InterfaceMethodref); + *int_at_addr(cp_index) = ((jint) name_and_type_index<<16) | class_index; + } + + void name_and_type_at_put(int cp_index, int name_index, int signature_index) { + tag_at_put(cp_index, JVM_CONSTANT_NameAndType); + *int_at_addr(cp_index) = ((jint) signature_index<<16) | name_index; + } + + + + constantTag tag_at(int cp_index) const { return (constantTag)tags()->at_acquire(cp_index); } + + + + Klass* klass_at(int cp_index, JavaThread* __the_thread__) { + constantPoolHandle h_this(__the_thread__, this); + return klass_at_impl(h_this, cp_index, __the_thread__); + } + + CPKlassSlot klass_slot_at(int cp_index) const { + + ; + int value = *int_at_addr(cp_index); + int name_index = extract_high_short_from_int(value); + int resolved_klass_index = extract_low_short_from_int(value); + return CPKlassSlot(name_index, resolved_klass_index); + } + + Symbol* klass_name_at(int cp_index) const; + int klass_name_index_at(int cp_index) const { + return klass_slot_at(cp_index).name_index(); + } + + Klass* resolved_klass_at(int cp_index) const; + + + Symbol* klass_at_noresolve(int cp_index) { return klass_name_at(cp_index); } + void temp_unresolved_klass_at_put(int cp_index, int name_index) { + + + unresolved_klass_at_put(cp_index, name_index, CPKlassSlot::_temp_resolved_klass_index); + } + + jint int_at(int cp_index) { + ; + return *int_at_addr(cp_index); + } + + jlong long_at(int cp_index) { + ; + + u8 tmp = Bytes::get_native_u8((address)&base()[cp_index]); + return *((jlong*)&tmp); + } + + jfloat float_at(int cp_index) { + ; + return *float_at_addr(cp_index); + } + + jdouble double_at(int cp_index) { + ; + u8 tmp = Bytes::get_native_u8((address)&base()[cp_index]); + return *((jdouble*)&tmp); + } + + Symbol* symbol_at(int cp_index) const { + ; + return *symbol_at_addr(cp_index); + } + + oop string_at(int cp_index, int obj_index, JavaThread* __the_thread__) { + constantPoolHandle h_this(__the_thread__, this); + return string_at_impl(h_this, cp_index, obj_index, __the_thread__); + } + oop string_at(int cp_index, JavaThread* __the_thread__) { + int obj_index = cp_to_object_index(cp_index); + return string_at(cp_index, obj_index, __the_thread__); + } + + + oop uncached_string_at(int cp_index, JavaThread* __the_thread__); + + + + oop resolved_string_at(int cp_index) { + ; + + + + int obj_index = cp_to_object_index(cp_index); + return resolved_reference_at(obj_index); + } + + Symbol* unresolved_string_at(int cp_index) { + ; + return *symbol_at_addr(cp_index); + } + + + + + + char* string_at_noresolve(int cp_index); + + jint name_and_type_at(int cp_index) { + ; + return *int_at_addr(cp_index); + } + + int method_handle_ref_kind_at(int cp_index) { + + ; + return extract_low_short_from_int(*int_at_addr(cp_index)); + } + int method_handle_index_at(int cp_index) { + + ; + return extract_high_short_from_int(*int_at_addr(cp_index)); + } + int method_type_index_at(int cp_index) { + + ; + return *int_at_addr(cp_index); + } + + + Symbol* method_handle_name_ref_at(int cp_index) { + int member = method_handle_index_at(cp_index); + return uncached_name_ref_at(member); + } + Symbol* method_handle_signature_ref_at(int cp_index) { + int member = method_handle_index_at(cp_index); + return uncached_signature_ref_at(member); + } + u2 method_handle_klass_index_at(int cp_index) { + int member = method_handle_index_at(cp_index); + return uncached_klass_ref_index_at(member); + } + Symbol* method_type_signature_at(int cp_index) { + int sym = method_type_index_at(cp_index); + return symbol_at(sym); + } + + u2 bootstrap_name_and_type_ref_index_at(int cp_index) { + ; + return extract_high_short_from_int(*int_at_addr(cp_index)); + } + u2 bootstrap_methods_attribute_index(int cp_index) { + ; + return extract_low_short_from_int(*int_at_addr(cp_index)); + } + int bootstrap_operand_base(int cp_index) { + int bsms_attribute_index = bootstrap_methods_attribute_index(cp_index); + return operand_offset_at(operands(), bsms_attribute_index); + } + + + static int operand_offset_at(Array* operands, int bsms_attribute_index) { + int n = (bsms_attribute_index * 2); + ; + + + + ; + ; + int offset = build_int_from_shorts(operands->at(n+0), + operands->at(n+1)); + + ; + return offset; + } + static void operand_offset_at_put(Array* operands, int bsms_attribute_index, int offset) { + int n = bsms_attribute_index * 2; + ; + operands->at_put(n+0, extract_low_short_from_int(offset)); + operands->at_put(n+1, extract_high_short_from_int(offset)); + } + static int operand_array_length(Array* operands) { + if (operands == nullptr || operands->length() == 0) return 0; + int second_part = operand_offset_at(operands, 0); + return (second_part / 2); + } +# 576 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constantPool.hpp" + enum { + _indy_bsm_offset = 0, + _indy_argc_offset = 1, + _indy_argv_offset = 2 + }; + + + + int operand_offset_at(int bsms_attribute_index) { + + + ; + return operand_offset_at(operands(), bsms_attribute_index); + } + u2 operand_bootstrap_method_ref_index_at(int bsms_attribute_index) { + int offset = operand_offset_at(bsms_attribute_index); + return operands()->at(offset + _indy_bsm_offset); + } + u2 operand_argument_count_at(int bsms_attribute_index) { + int offset = operand_offset_at(bsms_attribute_index); + u2 argc = operands()->at(offset + _indy_argc_offset); + return argc; + } + u2 operand_argument_index_at(int bsms_attribute_index, int j) { + int offset = operand_offset_at(bsms_attribute_index); + return operands()->at(offset + _indy_argv_offset + j); + } + int operand_next_offset_at(int bsms_attribute_index) { + int offset = operand_offset_at(bsms_attribute_index) + _indy_argv_offset + + operand_argument_count_at(bsms_attribute_index); + return offset; + } + + bool compare_operand_to(int bsms_attribute_index1, const constantPoolHandle& cp2, + int bsms_attribute_index2); + + int find_matching_operand(int bsms_attribute_index, const constantPoolHandle& search_cp, + int operands_cur_len); + + void resize_operands(int delta_len, int delta_size, JavaThread* __the_thread__); + + void extend_operands(const constantPoolHandle& ext_cp, JavaThread* __the_thread__); + + void shrink_operands(int new_len, JavaThread* __the_thread__); + + u2 bootstrap_method_ref_index_at(int cp_index) { + ; + int op_base = bootstrap_operand_base(cp_index); + return operands()->at(op_base + _indy_bsm_offset); + } + u2 bootstrap_argument_count_at(int cp_index) { + ; + int op_base = bootstrap_operand_base(cp_index); + u2 argc = operands()->at(op_base + _indy_argc_offset); + + ; + ; + return argc; + } + u2 bootstrap_argument_index_at(int cp_index, int j) { + int op_base = bootstrap_operand_base(cp_index); + ; + ; + return operands()->at(op_base + _indy_argv_offset + j); + } +# 658 "/home/rehn/source/jdk/open/src/hotspot/share/oops/constantPool.hpp" + Klass* klass_ref_at(int which, Bytecodes::Code code, JavaThread* __the_thread__); + Symbol* klass_ref_at_noresolve(int which, Bytecodes::Code code); + Symbol* name_ref_at(int which, Bytecodes::Code code) { + int name_index = name_ref_index_at(name_and_type_ref_index_at(which, code)); + return symbol_at(name_index); + } + Symbol* signature_ref_at(int which, Bytecodes::Code code) { + int signature_index = signature_ref_index_at(name_and_type_ref_index_at(which, code)); + return symbol_at(signature_index); + } + + u2 klass_ref_index_at(int which, Bytecodes::Code code); + u2 name_and_type_ref_index_at(int which, Bytecodes::Code code); + + int remap_instruction_operand_from_cache(int operand); + + constantTag tag_ref_at(int cp_cache_index, Bytecodes::Code code); + + int to_cp_index(int which, Bytecodes::Code code); + + + u2 name_ref_index_at(int cp_index); + u2 signature_ref_index_at(int cp_index); + + BasicType basic_type_for_signature_at(int cp_index) const; + + + void resolve_string_constants(JavaThread* __the_thread__) { + constantPoolHandle h_this(__the_thread__, this); + resolve_string_constants_impl(h_this, __the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception())) return ; (void)(0); + } + + + + objArrayOop prepare_resolved_references_for_archiving() ; + void add_dumped_interned_strings() ; + bool maybe_archive_resolved_klass_at(int cp_index); + void remove_unshareable_info(); + void restore_unshareable_info(JavaThread* __the_thread__); + + + private: + enum { _no_index_sentinel = -1, _possible_index_sentinel = -2 }; + public: + + + constantTag constant_tag_at(int cp_index); + + BasicType basic_type_for_constant_at(int cp_index); + + + oop resolve_constant_at(int cp_index, JavaThread* __the_thread__) { + constantPoolHandle h_this(__the_thread__, this); + return resolve_constant_at_impl(h_this, cp_index, _no_index_sentinel, nullptr, __the_thread__); + } + + oop resolve_cached_constant_at(int cache_index, JavaThread* __the_thread__) { + constantPoolHandle h_this(__the_thread__, this); + return resolve_constant_at_impl(h_this, _no_index_sentinel, cache_index, nullptr, __the_thread__); + } + + oop resolve_possibly_cached_constant_at(int cp_index, JavaThread* __the_thread__) { + constantPoolHandle h_this(__the_thread__, this); + return resolve_constant_at_impl(h_this, cp_index, _possible_index_sentinel, nullptr, __the_thread__); + } + + oop find_cached_constant_at(int cp_index, bool& found_it, JavaThread* __the_thread__) { + constantPoolHandle h_this(__the_thread__, this); + return resolve_constant_at_impl(h_this, cp_index, _possible_index_sentinel, &found_it, __the_thread__); + } + + void copy_bootstrap_arguments_at(int cp_index, + int start_arg, int end_arg, + objArrayHandle info, int pos, + bool must_resolve, Handle if_not_available, JavaThread* __the_thread__) { + constantPoolHandle h_this(__the_thread__, this); + copy_bootstrap_arguments_at_impl(h_this, cp_index, start_arg, end_arg, + info, pos, must_resolve, if_not_available, __the_thread__); + } + + + bool klass_name_at_matches(const InstanceKlass* k, int cp_index); + + + int length() const { return _length; } + void set_length(int length) { _length = length; } + + + bool is_within_bounds(int index) const { + return 0 <= index && index < length(); + } + + + static int header_size() { + return align_up((int)sizeof(ConstantPool), wordSize) / wordSize; + } + static int size(int length) { return align_metadata_size(header_size() + length); } + int size() const { return size(length()); } + + + static bool is_read_only_by_default() { return true; } + + friend class ClassFileParser; + friend class SystemDictionary; + + + template friend class CppVtableTesterA; + template friend class CppVtableTesterB; + template friend class CppVtableCloner; + + + static Method* method_at_if_loaded (const constantPoolHandle& this_cp, int which); + static bool has_appendix_at_if_loaded (const constantPoolHandle& this_cp, int which); + static oop appendix_at_if_loaded (const constantPoolHandle& this_cp, int which); + static bool has_local_signature_at_if_loaded (const constantPoolHandle& this_cp, int which); + static Klass* klass_at_if_loaded (const constantPoolHandle& this_cp, int which); + + + + + Symbol* uncached_klass_ref_at_noresolve(int cp_index); + Symbol* uncached_name_ref_at(int cp_index) { + int name_index = name_ref_index_at(uncached_name_and_type_ref_index_at(cp_index)); + return symbol_at(name_index); + } + Symbol* uncached_signature_ref_at(int cp_index) { + int signature_index = signature_ref_index_at(uncached_name_and_type_ref_index_at(cp_index)); + return symbol_at(signature_index); + } + u2 uncached_klass_ref_index_at(int cp_index); + u2 uncached_name_and_type_ref_index_at(int cp_index); + + + int pre_resolve_shared_klasses(JavaThread* __the_thread__); + + + const char* printable_name_at(int cp_index) { return 0; }; + + + + + enum { CPCACHE_INDEX_TAG = 0 }; + + + static int decode_cpcache_index(int raw_index, bool invokedynamic_ok = false) { + if (invokedynamic_ok && is_invokedynamic_index(raw_index)) + return decode_invokedynamic_index(raw_index); + else + return raw_index - CPCACHE_INDEX_TAG; + } + + private: + + void set_resolved_references(OopHandle s) { _cache->set_resolved_references(s); } + Array* reference_map() const { return (_cache == nullptr) ? nullptr : _cache->reference_map(); } + void set_reference_map(Array* o) { _cache->set_reference_map(o); } + + + jint klass_index_at(int cp_index) { + ; + return *int_at_addr(cp_index); + } + + jint string_index_at(int cp_index) { + ; + return *int_at_addr(cp_index); + } + + + static void verify_constant_pool_resolve(const constantPoolHandle& this_cp, Klass* klass, JavaThread* __the_thread__); + + + + static Klass* klass_at_impl(const constantPoolHandle& this_cp, int cp_index, JavaThread* __the_thread__); + static oop string_at_impl(const constantPoolHandle& this_cp, int cp_index, int obj_index, JavaThread* __the_thread__); + + static void trace_class_resolution(const constantPoolHandle& this_cp, Klass* k); + + + static void resolve_string_constants_impl(const constantPoolHandle& this_cp, JavaThread* __the_thread__); + + static oop resolve_constant_at_impl(const constantPoolHandle& this_cp, int cp_index, int cache_index, + bool* status_return, JavaThread* __the_thread__); + static void copy_bootstrap_arguments_at_impl(const constantPoolHandle& this_cp, int cp_index, + int start_arg, int end_arg, + objArrayHandle info, int pos, + bool must_resolve, Handle if_not_available, JavaThread* __the_thread__); + + + static void save_and_throw_exception(const constantPoolHandle& this_cp, int cp_index, constantTag tag, JavaThread* __the_thread__); + + public: + + static void throw_resolution_error(const constantPoolHandle& this_cp, int which, JavaThread* __the_thread__); + + + bool compare_entry_to(int index1, const constantPoolHandle& cp2, int index2); + void copy_cp_to(int start_cpi, int end_cpi, const constantPoolHandle& to_cp, int to_cpi, JavaThread* __the_thread__) { + constantPoolHandle h_this(__the_thread__, this); + copy_cp_to_impl(h_this, start_cpi, end_cpi, to_cp, to_cpi, __the_thread__); + } + static void copy_cp_to_impl(const constantPoolHandle& from_cp, int start_cpi, int end_cpi, const constantPoolHandle& to_cp, int to_cpi, JavaThread* __the_thread__); + static void copy_entry_to(const constantPoolHandle& from_cp, int from_cpi, const constantPoolHandle& to_cp, int to_cpi); + static void copy_operands(const constantPoolHandle& from_cp, const constantPoolHandle& to_cp, JavaThread* __the_thread__); + int find_matching_entry(int pattern_i, const constantPoolHandle& search_cp); + int version() const { return _saved._version; } + void set_version(int version) { _saved._version = version; } + void increment_and_save_version(int version) { + _saved._version = version >= 0 ? (version + 1) : version; + } + + void set_resolved_reference_length(int length) { _saved._resolved_reference_length = length; } + int resolved_reference_length() const { return _saved._resolved_reference_length; } + + + + void unreference_symbols(); + + + void deallocate_contents(ClassLoaderData* loader_data); + void release_C_heap_structures(); + + + friend class JvmtiConstantPoolReconstituter; + + private: + class SymbolHash: public CHeapObj { + ResourceHashtable _table; + + public: + void add_if_absent(const Symbol* sym, u2 value) { + bool created; + _table.put_if_absent(sym, value, &created); + } + + u2 symbol_to_value(const Symbol* sym) { + u2* value = _table.get(sym); + return (value == nullptr) ? 0 : *value; + } + }; + + jint cpool_entry_size(jint idx); + jint hash_entries_to(SymbolHash *symmap, SymbolHash *classmap); + + + + + + + int copy_cpool_bytes(int cpool_size, + SymbolHash* tbl, + unsigned char *bytes); + + public: + + void verify_on(outputStream* st); + + + void print_on(outputStream* st) const; + void print_value_on(outputStream* st) const; + void print_entry_on(int index, outputStream* st); + + const char* internal_name() const { return "{constant pool}"; } + + + inline ResolvedFieldEntry* resolved_field_entry_at(int field_index); + inline int resolved_field_entries_length() const; + + + inline ResolvedIndyEntry* resolved_indy_entry_at(int index); + inline int resolved_indy_entries_length() const; + inline oop resolved_reference_from_indy(int index) const; +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/oops/method.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/methodFlags.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/oops/methodFlags.hpp" +class outputStream; + + + + + + +class MethodFlags { + friend class VMStructs; + friend class JVMCIVMStructs; +# 64 "/home/rehn/source/jdk/open/src/hotspot/share/oops/methodFlags.hpp" + enum { + _misc_has_monitor_bytecodes = 1 << 0, _misc_has_jsrs = 1 << 1, _misc_is_old = 1 << 2, _misc_is_obsolete = 1 << 3, _misc_is_deleted = 1 << 4, _misc_is_prefixed_native = 1 << 5, _misc_monitor_matching = 1 << 6, _misc_queued_for_compilation = 1 << 7, _misc_is_not_c2_compilable = 1 << 8, _misc_is_not_c1_compilable = 1 << 9, _misc_is_not_c2_osr_compilable = 1 << 10, _misc_force_inline = 1 << 11, _misc_dont_inline = 1 << 12, _misc_has_loops_flag = 1 << 13, _misc_has_loops_flag_init = 1 << 14, _misc_on_stack_flag = 1 << 15, + }; + + + + u4 _status; + + public: + + MethodFlags() : _status(0) {} +# 86 "/home/rehn/source/jdk/open/src/hotspot/share/oops/methodFlags.hpp" + bool has_monitor_bytecodes() const { return (_status & _misc_has_monitor_bytecodes) != 0; } void set_has_monitor_bytecodes(bool b) { if (b) { atomic_set_bits(_misc_has_monitor_bytecodes); } else { atomic_clear_bits(_misc_has_monitor_bytecodes); } } bool has_jsrs() const { return (_status & _misc_has_jsrs) != 0; } void set_has_jsrs(bool b) { if (b) { atomic_set_bits(_misc_has_jsrs); } else { atomic_clear_bits(_misc_has_jsrs); } } bool is_old() const { return (_status & _misc_is_old) != 0; } void set_is_old(bool b) { if (b) { atomic_set_bits(_misc_is_old); } else { atomic_clear_bits(_misc_is_old); } } bool is_obsolete() const { return (_status & _misc_is_obsolete) != 0; } void set_is_obsolete(bool b) { if (b) { atomic_set_bits(_misc_is_obsolete); } else { atomic_clear_bits(_misc_is_obsolete); } } bool is_deleted() const { return (_status & _misc_is_deleted) != 0; } void set_is_deleted(bool b) { if (b) { atomic_set_bits(_misc_is_deleted); } else { atomic_clear_bits(_misc_is_deleted); } } bool is_prefixed_native() const { return (_status & _misc_is_prefixed_native) != 0; } void set_is_prefixed_native(bool b) { if (b) { atomic_set_bits(_misc_is_prefixed_native); } else { atomic_clear_bits(_misc_is_prefixed_native); } } bool monitor_matching() const { return (_status & _misc_monitor_matching) != 0; } void set_monitor_matching(bool b) { if (b) { atomic_set_bits(_misc_monitor_matching); } else { atomic_clear_bits(_misc_monitor_matching); } } bool queued_for_compilation() const { return (_status & _misc_queued_for_compilation) != 0; } void set_queued_for_compilation(bool b) { if (b) { atomic_set_bits(_misc_queued_for_compilation); } else { atomic_clear_bits(_misc_queued_for_compilation); } } bool is_not_c2_compilable() const { return (_status & _misc_is_not_c2_compilable) != 0; } void set_is_not_c2_compilable(bool b) { if (b) { atomic_set_bits(_misc_is_not_c2_compilable); } else { atomic_clear_bits(_misc_is_not_c2_compilable); } } bool is_not_c1_compilable() const { return (_status & _misc_is_not_c1_compilable) != 0; } void set_is_not_c1_compilable(bool b) { if (b) { atomic_set_bits(_misc_is_not_c1_compilable); } else { atomic_clear_bits(_misc_is_not_c1_compilable); } } bool is_not_c2_osr_compilable() const { return (_status & _misc_is_not_c2_osr_compilable) != 0; } void set_is_not_c2_osr_compilable(bool b) { if (b) { atomic_set_bits(_misc_is_not_c2_osr_compilable); } else { atomic_clear_bits(_misc_is_not_c2_osr_compilable); } } bool force_inline() const { return (_status & _misc_force_inline) != 0; } void set_force_inline(bool b) { if (b) { atomic_set_bits(_misc_force_inline); } else { atomic_clear_bits(_misc_force_inline); } } bool dont_inline() const { return (_status & _misc_dont_inline) != 0; } void set_dont_inline(bool b) { if (b) { atomic_set_bits(_misc_dont_inline); } else { atomic_clear_bits(_misc_dont_inline); } } bool has_loops_flag() const { return (_status & _misc_has_loops_flag) != 0; } void set_has_loops_flag(bool b) { if (b) { atomic_set_bits(_misc_has_loops_flag); } else { atomic_clear_bits(_misc_has_loops_flag); } } bool has_loops_flag_init() const { return (_status & _misc_has_loops_flag_init) != 0; } void set_has_loops_flag_init(bool b) { if (b) { atomic_set_bits(_misc_has_loops_flag_init); } else { atomic_clear_bits(_misc_has_loops_flag_init); } } bool on_stack_flag() const { return (_status & _misc_on_stack_flag) != 0; } void set_on_stack_flag(bool b) { if (b) { atomic_set_bits(_misc_on_stack_flag); } else { atomic_clear_bits(_misc_on_stack_flag); } } + + + int as_int() const { return _status; } + void atomic_set_bits(u4 bits) { Atomic::fetch_then_or(&_status, bits); } + void atomic_clear_bits(u4 bits) { Atomic::fetch_then_and(&_status, ~bits); } + void print_on(outputStream* st) const; +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/oops/method.hpp" 2 +# 58 "/home/rehn/source/jdk/open/src/hotspot/share/oops/method.hpp" +class CheckedExceptionElement; +class LocalVariableTableElement; +class AdapterHandlerEntry; +class MethodData; +class MethodCounters; +class ConstMethod; +class InlineTableSizes; +class CompiledMethod; +class InterpreterOopMap; + +class Method : public Metadata { + friend class VMStructs; + friend class JVMCIVMStructs; + friend class MethodTest; + private: + + + ConstMethod* _constMethod; + MethodData* _method_data; + MethodCounters* _method_counters; + AdapterHandlerEntry* _adapter; + AccessFlags _access_flags; + int _vtable_index; + MethodFlags _flags; + + u2 _intrinsic_id; + + mutable JfrTraceFlag _trace_flags; + + + + + + + + address _i2i_entry; + + + volatile address _from_compiled_entry; + + + + + + CompiledMethod* volatile _code; + volatile address _from_interpreted_entry; + + + Method(ConstMethod* xconst, AccessFlags access_flags, Symbol* name); + public: + + static Method* allocate(ClassLoaderData* loader_data, + int byte_code_size, + AccessFlags access_flags, + InlineTableSizes* sizes, + ConstMethod::MethodType method_type, + Symbol* name, + JavaThread* __the_thread__); + + + Method(){} + + virtual bool is_method() const { return true; } + + + void remove_unshareable_info(); + void restore_unshareable_info(JavaThread* __the_thread__); + + + + + ConstMethod* constMethod() const { return _constMethod; } + void set_constMethod(ConstMethod* xconst) { _constMethod = xconst; } + + + static address make_adapters(const methodHandle& mh, JavaThread* __the_thread__); + address from_compiled_entry() const; + address from_interpreted_entry() const; + + + AccessFlags access_flags() const { return _access_flags; } + void set_access_flags(AccessFlags flags) { _access_flags = flags; } + + + Symbol* name() const { return constants()->symbol_at(name_index()); } + u2 name_index() const { return constMethod()->name_index(); } + void set_name_index(int index) { constMethod()->set_name_index(index); } + + + Symbol* signature() const { return constants()->symbol_at(signature_index()); } + u2 signature_index() const { return constMethod()->signature_index(); } + void set_signature_index(int index) { constMethod()->set_signature_index(index); } + + + Symbol* generic_signature() const { int idx = generic_signature_index(); return ((idx != 0) ? constants()->symbol_at(idx) : nullptr); } + u2 generic_signature_index() const { return constMethod()->generic_signature_index(); } + + + AnnotationArray* annotations() const { + return constMethod()->method_annotations(); + } + AnnotationArray* parameter_annotations() const { + return constMethod()->parameter_annotations(); + } + AnnotationArray* annotation_default() const { + return constMethod()->default_annotations(); + } + AnnotationArray* type_annotations() const { + return constMethod()->type_annotations(); + } + + + + + + char* name_and_sig_as_C_string() const; + char* name_and_sig_as_C_string(char* buf, int size) const; + + + static char* name_and_sig_as_C_string(Klass* klass, Symbol* method_name, Symbol* signature); + static char* name_and_sig_as_C_string(Klass* klass, Symbol* method_name, Symbol* signature, char* buf, int size); + + + + + + + + const char* external_name() const; + void print_external_name(outputStream *os) const; + + static const char* external_name( Klass* klass, Symbol* method_name, Symbol* signature); + static void print_external_name(outputStream *os, Klass* klass, Symbol* method_name, Symbol* signature); + + Bytecodes::Code java_code_at(int bci) const { + return Bytecodes::java_code_at(this, bcp_from(bci)); + } + Bytecodes::Code code_at(int bci) const { + return Bytecodes::code_at(this, bcp_from(bci)); + } +# 210 "/home/rehn/source/jdk/open/src/hotspot/share/oops/method.hpp" + Bytecodes::Code orig_bytecode_at(int bci) const; + void set_orig_bytecode_at(int bci, Bytecodes::Code code); + void set_breakpoint(int bci); + void clear_breakpoint(int bci); + void clear_all_breakpoints(); + + + inline u2 number_of_breakpoints() const; + inline void incr_number_of_breakpoints(Thread* current); + inline void decr_number_of_breakpoints(Thread* current); + + inline void clear_number_of_breakpoints(); + + + + + u2 method_idnum() const { return constMethod()->method_idnum(); } + void set_method_idnum(u2 idnum) { constMethod()->set_method_idnum(idnum); } + + u2 orig_method_idnum() const { return constMethod()->orig_method_idnum(); } + void set_orig_method_idnum(u2 idnum) { constMethod()->set_orig_method_idnum(idnum); } + + + u2 code_size() const { return constMethod()->code_size(); } + + + int method_size() const { return sizeof(Method)/wordSize + ( is_native() ? 2 : 0 ); } + + + ConstantPool* constants() const { return constMethod()->constants(); } + void set_constants(ConstantPool* c) { constMethod()->set_constants(c); } + + + + u2 verifier_max_stack() const { return constMethod()->max_stack(); } + int max_stack() const { return constMethod()->max_stack() + extra_stack_entries(); } + void set_max_stack(int size) { constMethod()->set_max_stack(size); } + + + u2 max_locals() const { return constMethod()->max_locals(); } + void set_max_locals(int size) { constMethod()->set_max_locals(size); } + + int highest_comp_level() const; + void set_highest_comp_level(int level); + int highest_osr_comp_level() const; + void set_highest_osr_comp_level(int level); + + + + inline void interpreter_throwout_increment(Thread* current); + + + inline int interpreter_throwout_count() const; + + u2 size_of_parameters() const { return constMethod()->size_of_parameters(); } + + bool has_stackmap_table() const { + return constMethod()->has_stackmap_table(); + } + + Array* stackmap_data() const { + return constMethod()->stackmap_data(); + } + + void set_stackmap_data(Array* sd) { + constMethod()->set_stackmap_data(sd); + } + + + bool has_exception_handler() const + { return constMethod()->has_exception_table(); } + u2 exception_table_length() const + { return constMethod()->exception_table_length(); } + ExceptionTableElement* exception_table_start() const + { return constMethod()->exception_table_start(); } +# 298 "/home/rehn/source/jdk/open/src/hotspot/share/oops/method.hpp" + static int fast_exception_handler_bci_for(const methodHandle& mh, Klass* ex_klass, int throw_bci, JavaThread* __the_thread__); + + static bool register_native(Klass* k, + Symbol* name, + Symbol* signature, + address entry, + JavaThread* __the_thread__); + + + MethodData* method_data() const { + return _method_data; + } + + void set_method_data(MethodData* data); + + MethodCounters* method_counters() const { + return _method_counters; + } + + void clear_method_counters() { + _method_counters = nullptr; + } + + bool init_method_counters(MethodCounters* counters); + + inline int prev_event_count() const; + inline void set_prev_event_count(int count); + inline jlong prev_time() const; + inline void set_prev_time(jlong time); + inline float rate() const; + inline void set_rate(float rate); + + int invocation_count() const; + int backedge_count() const; + + bool was_executed_more_than(int n); + bool was_never_executed() { return !was_executed_more_than(0); } + + static void build_profiling_method_data(const methodHandle& method, JavaThread* __the_thread__); + + static MethodCounters* build_method_counters(Thread* current, Method* m); + + int interpreter_invocation_count() { return invocation_count(); } + + + + + + + int64_t compiled_invocation_count() const { return 0; } + + + + address verified_code_entry(); + bool check_code() const; + CompiledMethod* code() const; + + + void unlink_code(CompiledMethod *compare); + + void unlink_code(); + +private: + + void clear_code(); + +public: + static void set_code(const methodHandle& mh, CompiledMethod* code); + void set_adapter_entry(AdapterHandlerEntry* adapter) { + _adapter = adapter; + } + void set_from_compiled_entry(address entry) { + _from_compiled_entry = entry; + } + + address get_i2c_entry(); + address get_c2i_entry(); + address get_c2i_unverified_entry(); + address get_c2i_no_clinit_check_entry(); + AdapterHandlerEntry* adapter() const { + return _adapter; + } + + void link_method(const methodHandle& method, JavaThread* __the_thread__); + + void unlink_method() ; + void remove_unshareable_flags() ; + + + int num_stack_arg_slots() const { return constMethod()->num_stack_arg_slots(); } + + virtual void metaspace_pointers_do(MetaspaceClosure* iter); + virtual MetaspaceObj::Type type() const { return MethodType; } + + + enum VtableIndexFlag { + + + itable_index_max = -10, + pending_itable_index = -9, + invalid_vtable_index = -4, + garbage_vtable_index = -3, + nonvirtual_vtable_index = -2 + + }; + + bool has_vtable_index() const { return _vtable_index >= 0; } + int vtable_index() const { return _vtable_index; } + void set_vtable_index(int index); + + bool has_itable_index() const { return _vtable_index <= itable_index_max; } + int itable_index() const { ; + return itable_index_max - _vtable_index; } + void set_itable_index(int index); + + + address interpreter_entry() const { return _i2i_entry; } + + void set_interpreter_entry(address entry) { + if (_i2i_entry != entry) { + _i2i_entry = entry; + } + if (_from_interpreted_entry != entry) { + _from_interpreted_entry = entry; + } + } + + + enum { + native_bind_event_is_interesting = true + }; + address native_function() const { return *(native_function_addr()); } + + + + void set_native_function(address function, bool post_event_flag); + bool has_native_function() const; + void clear_native_function(); + + + address signature_handler() const { return *(signature_handler_addr()); } + void set_signature_handler(address handler); + + + void mask_for(int bci, InterpreterOopMap* mask); + + + void print_invocation_count(); + + + void set_code(address code) { return constMethod()->set_code(code); } + address code_base() const { return constMethod()->code_base(); } + bool contains(address bcp) const { return constMethod()->contains(bcp); } + + + void print_codes(int flags = 0) const { print_codes_on(tty, flags); } + void print_codes_on(outputStream* st, int flags = 0) const; + void print_codes_on(int from, int to, outputStream* st, int flags = 0) const; + + + bool has_method_parameters() const + { return constMethod()->has_method_parameters(); } + int method_parameters_length() const + { return constMethod()->method_parameters_length(); } + MethodParametersElement* method_parameters_start() const + { return constMethod()->method_parameters_start(); } + + + u2 checked_exceptions_length() const + { return constMethod()->checked_exceptions_length(); } + CheckedExceptionElement* checked_exceptions_start() const + { return constMethod()->checked_exceptions_start(); } + + + bool has_localvariable_table() const + { return constMethod()->has_localvariable_table(); } + u2 localvariable_table_length() const + { return constMethod()->localvariable_table_length(); } + LocalVariableTableElement* localvariable_table_start() const + { return constMethod()->localvariable_table_start(); } + + bool has_linenumber_table() const + { return constMethod()->has_linenumber_table(); } + u_char* compressed_linenumber_table() const + { return constMethod()->compressed_linenumber_table(); } + + + InstanceKlass* method_holder() const { return constants()->pool_holder(); } + + Symbol* klass_name() const; + BasicType result_type() const { return constMethod()->result_type(); } + bool is_returning_oop() const { BasicType r = result_type(); return is_reference_type(r); } + bool is_returning_fp() const { BasicType r = result_type(); return (r == T_FLOAT || r == T_DOUBLE); } + + + objArrayHandle resolved_checked_exceptions(JavaThread* __the_thread__) { return resolved_checked_exceptions_impl(this, __the_thread__); } + + + bool is_public() const { return access_flags().is_public(); } + bool is_private() const { return access_flags().is_private(); } + bool is_protected() const { return access_flags().is_protected(); } + bool is_package_private() const { return !is_public() && !is_private() && !is_protected(); } + bool is_static() const { return access_flags().is_static(); } + bool is_final() const { return access_flags().is_final(); } + bool is_synchronized() const { return access_flags().is_synchronized();} + bool is_native() const { return access_flags().is_native(); } + bool is_abstract() const { return access_flags().is_abstract(); } + bool is_synthetic() const { return access_flags().is_synthetic(); } + + + bool is_empty_method() const; + + + bool is_vanilla_constructor() const; + + + bool is_final_method() const; + bool is_final_method(AccessFlags class_access_flags) const; + + bool is_default_method() const; + + + bool can_be_statically_bound() const; + bool can_be_statically_bound(InstanceKlass* context) const; + bool can_be_statically_bound(AccessFlags class_access_flags) const; + + + bool can_omit_stack_trace(); + + + + + + + bool has_monitor_bytecodes() const { return _flags.has_monitor_bytecodes(); } void set_has_monitor_bytecodes(bool x) { _flags.set_has_monitor_bytecodes(x); } void set_has_monitor_bytecodes() { _flags.set_has_monitor_bytecodes(true); } bool has_jsrs() const { return _flags.has_jsrs(); } void set_has_jsrs(bool x) { _flags.set_has_jsrs(x); } void set_has_jsrs() { _flags.set_has_jsrs(true); } bool is_old() const { return _flags.is_old(); } void set_is_old(bool x) { _flags.set_is_old(x); } void set_is_old() { _flags.set_is_old(true); } bool is_obsolete() const { return _flags.is_obsolete(); } void set_is_obsolete(bool x) { _flags.set_is_obsolete(x); } void set_is_obsolete() { _flags.set_is_obsolete(true); } bool is_deleted() const { return _flags.is_deleted(); } void set_is_deleted(bool x) { _flags.set_is_deleted(x); } void set_is_deleted() { _flags.set_is_deleted(true); } bool is_prefixed_native() const { return _flags.is_prefixed_native(); } void set_is_prefixed_native(bool x) { _flags.set_is_prefixed_native(x); } void set_is_prefixed_native() { _flags.set_is_prefixed_native(true); } bool monitor_matching() const { return _flags.monitor_matching(); } void set_monitor_matching(bool x) { _flags.set_monitor_matching(x); } void set_monitor_matching() { _flags.set_monitor_matching(true); } bool queued_for_compilation() const { return _flags.queued_for_compilation(); } void set_queued_for_compilation(bool x) { _flags.set_queued_for_compilation(x); } void set_queued_for_compilation() { _flags.set_queued_for_compilation(true); } bool is_not_c2_compilable() const { return _flags.is_not_c2_compilable(); } void set_is_not_c2_compilable(bool x) { _flags.set_is_not_c2_compilable(x); } void set_is_not_c2_compilable() { _flags.set_is_not_c2_compilable(true); } bool is_not_c1_compilable() const { return _flags.is_not_c1_compilable(); } void set_is_not_c1_compilable(bool x) { _flags.set_is_not_c1_compilable(x); } void set_is_not_c1_compilable() { _flags.set_is_not_c1_compilable(true); } bool is_not_c2_osr_compilable() const { return _flags.is_not_c2_osr_compilable(); } void set_is_not_c2_osr_compilable(bool x) { _flags.set_is_not_c2_osr_compilable(x); } void set_is_not_c2_osr_compilable() { _flags.set_is_not_c2_osr_compilable(true); } bool force_inline() const { return _flags.force_inline(); } void set_force_inline(bool x) { _flags.set_force_inline(x); } void set_force_inline() { _flags.set_force_inline(true); } bool dont_inline() const { return _flags.dont_inline(); } void set_dont_inline(bool x) { _flags.set_dont_inline(x); } void set_dont_inline() { _flags.set_dont_inline(true); } bool has_loops_flag() const { return _flags.has_loops_flag(); } void set_has_loops_flag(bool x) { _flags.set_has_loops_flag(x); } void set_has_loops_flag() { _flags.set_has_loops_flag(true); } bool has_loops_flag_init() const { return _flags.has_loops_flag_init(); } void set_has_loops_flag_init(bool x) { _flags.set_has_loops_flag_init(x); } void set_has_loops_flag_init() { _flags.set_has_loops_flag_init(true); } bool on_stack_flag() const { return _flags.on_stack_flag(); } void set_on_stack_flag(bool x) { _flags.set_on_stack_flag(x); } void set_on_stack_flag() { _flags.set_on_stack_flag(true); } + + + + bool has_loops() { + return has_loops_flag_init() ? has_loops_flag() : compute_has_loops_flag(); + }; + + bool compute_has_loops_flag(); + bool set_has_loops() { + + set_has_loops_flag(); + set_has_loops_flag_init(); + return true; + } + + + bool has_monitors() const { return is_synchronized() || has_monitor_bytecodes(); } + + + + + bool guaranteed_monitor_matching() const { return monitor_matching(); } + void set_guaranteed_monitor_matching() { set_monitor_matching(); } + + + bool is_accessor() const; + + + bool is_getter() const; + + + bool is_setter() const; + + + bool is_constant_getter() const; + + + bool is_initializer() const; + + + bool has_valid_initializer_flags() const; + + + + bool is_static_initializer() const; + + + bool is_object_initializer() const; + + + + + bool has_compiled_code() const; + + bool needs_clinit_barrier() const; + + + static int header_size() { + return align_up((int)sizeof(Method), wordSize) / wordSize; + } + static int size(bool is_native); + int size() const { return method_size(); } + void log_touched(Thread* current); + static void print_touched_methods(outputStream* out); + + + static ByteSize const_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Method)]; Method* dummyObj = (Method*)space; char* c = (char*)(void*)&dummyObj->_constMethod; return (size_t)(c - space); }())); } + static ByteSize access_flags_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Method)]; Method* dummyObj = (Method*)space; char* c = (char*)(void*)&dummyObj->_access_flags; return (size_t)(c - space); }())); } + static ByteSize from_compiled_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Method)]; Method* dummyObj = (Method*)space; char* c = (char*)(void*)&dummyObj->_from_compiled_entry; return (size_t)(c - space); }())); } + static ByteSize code_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Method)]; Method* dummyObj = (Method*)space; char* c = (char*)(void*)&dummyObj->_code; return (size_t)(c - space); }())); } + + static ByteSize method_counters_offset() { + return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Method)]; Method* dummyObj = (Method*)space; char* c = (char*)(void*)&dummyObj->_method_counters; return (size_t)(c - space); }())); + } + + + + static ByteSize native_function_offset() { return in_ByteSize(sizeof(Method)); } + static ByteSize from_interpreted_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Method)]; Method* dummyObj = (Method*)space; char* c = (char*)(void*)&dummyObj->_from_interpreted_entry; return (size_t)(c - space); }())); } + static ByteSize interpreter_entry_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Method)]; Method* dummyObj = (Method*)space; char* c = (char*)(void*)&dummyObj->_i2i_entry; return (size_t)(c - space); }())); } + static ByteSize signature_handler_offset() { return in_ByteSize(sizeof(Method) + wordSize); } + static ByteSize itable_index_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Method)]; Method* dummyObj = (Method*)space; char* c = (char*)(void*)&dummyObj->_vtable_index; return (size_t)(c - space); }())); } + + + static ByteSize method_data_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Method)]; Method* dummyObj = (Method*)space; char* c = (char*)(void*)&dummyObj->_method_data; return (size_t)(c - space); }())); } + static ByteSize intrinsic_id_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (Method)]; Method* dummyObj = (Method*)space; char* c = (char*)(void*)&dummyObj->_intrinsic_id; return (size_t)(c - space); }())); } + static int intrinsic_id_size_in_bytes() { return sizeof(u2); } + + + + static objArrayHandle resolved_checked_exceptions_impl(Method* method, JavaThread* __the_thread__); + + + int bci_from(address bcp) const; + address bcp_from(int bci) const; + address bcp_from(address bcp) const; + int validate_bci_from_bcp(address bcp) const; + int validate_bci(int bci) const; + + + + int line_number_from_bci(int bci) const; + + + bool is_overridden_in(Klass* k) const; + + + bool is_ignored_by_security_stack_walk() const; + + + bool is_method_handle_intrinsic() const; + bool is_compiled_lambda_form() const; + bool has_member_arg() const; + static methodHandle make_method_handle_intrinsic(vmIntrinsicID iid, + Symbol* signature, + JavaThread* __the_thread__); + + bool can_be_allocated_in_NonNMethod_space() const { return is_method_handle_intrinsic(); } + + + inline bool is_continuation_enter_intrinsic() const; + inline bool is_continuation_yield_intrinsic() const; + inline bool is_continuation_native_intrinsic() const; + inline bool is_special_native_intrinsic() const; + + static Klass* check_non_bcp_klass(Klass* klass); + + enum { + + extra_stack_entries_for_jsr292 = 1 + }; + + + + + static int extra_stack_entries() { return extra_stack_entries_for_jsr292; } + static int extra_stack_words(); + + + bool on_stack() const { return on_stack_flag(); } + void set_on_stack(const bool value); + + void record_gc_epoch(); + + + bool should_not_be_cached() const; + + + static methodHandle clone_with_new_data(const methodHandle& m, u_char* new_code, int new_code_length, + u_char* new_compressed_linenumber_table, int new_compressed_linenumber_size, JavaThread* __the_thread__); + + + + + + + + static jmethodID make_jmethod_id(ClassLoaderData* cld, Method* mh); + static void destroy_jmethod_id(ClassLoaderData* cld, jmethodID mid); + + + + + static void ensure_jmethod_ids(ClassLoaderData* cld, int capacity); + + + + + inline static Method* resolve_jmethod_id(jmethodID mid) { + ; + return *((Method**)mid); + } + + + + + static Method* checked_resolve_jmethod_id(jmethodID mid); + + static void change_method_associated_with_jmethod_id(jmethodID old_jmid_ptr, Method* new_method); + static bool is_method_id(jmethodID mid); + + + static void clear_jmethod_ids(ClassLoaderData* loader_data); + static void print_jmethod_ids_count(const ClassLoaderData* loader_data, outputStream* out) {}; + + + jmethodID jmethod_id(); + + + + + + + jmethodID find_jmethod_id_or_null() { return method_holder()->jmethod_id_or_null(this); } + + + vmIntrinsicID intrinsic_id() const { return (vmIntrinsicID) _intrinsic_id; } + void set_intrinsic_id(vmIntrinsicID id) { _intrinsic_id = (u2) id; } + + + void init_intrinsic_id(vmSymbolID klass_id); + static vmSymbolID klass_id_for_intrinsics(const Klass* holder); + + bool caller_sensitive() const { return constMethod()->caller_sensitive(); } + void set_caller_sensitive() { constMethod()->set_caller_sensitive(); } + + bool changes_current_thread() const { return constMethod()->changes_current_thread(); } + void set_changes_current_thread() { constMethod()->set_changes_current_thread(); } + + bool jvmti_mount_transition() const { return constMethod()->jvmti_mount_transition(); } + void set_jvmti_mount_transition() { constMethod()->set_jvmti_mount_transition(); } + + bool is_hidden() const { return constMethod()->is_hidden(); } + void set_is_hidden() { constMethod()->set_is_hidden(); } + + bool is_scoped() const { return constMethod()->is_scoped(); } + void set_scoped() { constMethod()->set_is_scoped(); } + + bool intrinsic_candidate() const { return constMethod()->intrinsic_candidate(); } + void set_intrinsic_candidate() { constMethod()->set_intrinsic_candidate(); } + + bool has_injected_profile() const { return constMethod()->has_injected_profile(); } + void set_has_injected_profile() { constMethod()->set_has_injected_profile(); } + + bool has_reserved_stack_access() const { return constMethod()->reserved_stack_access(); } + void set_has_reserved_stack_access() { constMethod()->set_reserved_stack_access(); } + + bool is_trace_flag_set(uint16_t flag) const { return _trace_flags.is_set(flag); } uint16_t trace_flags() const { return _trace_flags.flags(); } void set_trace_flags(uint16_t flags) const { _trace_flags.set_flags(flags); } uint8_t* trace_flags_addr() const { return _trace_flags.flags_addr(); } uint8_t* trace_meta_addr() const { return _trace_flags.meta_addr(); }; + + ConstMethod::MethodType method_type() const { + return _constMethod->method_type(); + } + bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; } + + + bool has_osr_nmethod(int level, bool match_level) { + return method_holder()->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != nullptr; + } + + nmethod* lookup_osr_nmethod_for(int bci, int level, bool match_level) { + return method_holder()->lookup_osr_nmethod(this, bci, level, match_level); + } + + + bool is_klass_loaded_by_klass_index(int klass_index) const; + bool is_klass_loaded(int refinfo_index, Bytecodes::Code bc, bool must_be_resolved = false) const; + + + + + bool is_not_compilable(int comp_level = CompLevel_any) const; + void set_not_compilable(const char* reason, int comp_level = CompLevel_all, bool report = true); + void set_not_compilable_quietly(const char* reason, int comp_level = CompLevel_all) { + set_not_compilable(reason, comp_level, false); + } + bool is_not_osr_compilable(int comp_level = CompLevel_any) const; + void set_not_osr_compilable(const char* reason, int comp_level = CompLevel_all, bool report = true); + void set_not_osr_compilable_quietly(const char* reason, int comp_level = CompLevel_all) { + set_not_osr_compilable(reason, comp_level, false); + } + bool is_always_compilable() const; + + private: + void print_made_not_compilable(int comp_level, bool is_osr, bool report, const char* reason); + + public: + MethodCounters* get_method_counters(Thread* current) { + if (_method_counters == nullptr) { + build_method_counters(current, this); + } + return _method_counters; + } + + void clear_is_not_c1_compilable() { set_is_not_c1_compilable(false); } + void clear_is_not_c2_compilable() { set_is_not_c2_compilable(false); } + void clear_is_not_c2_osr_compilable() { set_is_not_c2_osr_compilable(false); } + + + bool is_not_c1_osr_compilable() const { return is_not_c1_compilable(); } + void set_is_not_c1_osr_compilable() { set_is_not_c1_compilable(); } + void clear_is_not_c1_osr_compilable() { clear_is_not_c1_compilable(); } + + + void clear_queued_for_compilation() { set_queued_for_compilation(false); } + + + static bool load_signature_classes(const methodHandle& m, JavaThread* __the_thread__); + + + void print_short_name(outputStream* st = tty) const; + + void print_name(outputStream* st = tty) const; + + + + + typedef int (*method_comparator_func)(Method* a, Method* b); + + + static void sort_methods(Array* methods, bool set_idnums = true, method_comparator_func func = nullptr); + + + void deallocate_contents(ClassLoaderData* loader_data); + + void release_C_heap_structures(); + + Method* get_new_method() const { + InstanceKlass* holder = method_holder(); + Method* new_method = holder->method_with_idnum(orig_method_idnum()); + + ; + ; + return new_method; + } + + + + + + void print_value_on(outputStream* st) const; + void print_linkage_flags(outputStream* st) {}; + + const char* internal_name() const { return "{method}"; } + + + static bool has_method_vptr(const void* ptr); + static bool is_valid_method(const Method* m); + + + void verify() { verify_on(tty); } + void verify_on(outputStream* st); + + private: + + + address* native_function_addr() const { ; return (address*) (this+1); } + address* signature_handler_addr() const { return native_function_addr() + 1; } +}; + + + + +class CompressedLineNumberWriteStream: public CompressedWriteStream { + private: + int _bci; + int _line; + public: + + CompressedLineNumberWriteStream(int initial_size) : CompressedWriteStream(initial_size), _bci(0), _line(0) {} + CompressedLineNumberWriteStream(u_char* buffer, int initial_size) : CompressedWriteStream(buffer, initial_size), _bci(0), _line(0) {} + + + void write_pair_regular(int bci_delta, int line_delta); + + + + + void write_pair_inline(int bci, int line); + + void write_pair(int bci, int line); + + + void write_terminator() { write_byte(0); } +}; + + + + +class CompressedLineNumberReadStream: public CompressedReadStream { + private: + int _bci; + int _line; + public: + + CompressedLineNumberReadStream(u_char* buffer); + + bool read_pair(); + + int bci() const { return _bci; } + int line() const { return _line; } +}; +# 928 "/home/rehn/source/jdk/open/src/hotspot/share/oops/method.hpp" +class BreakpointInfo : public CHeapObj { + friend class VMStructs; + private: + Bytecodes::Code _orig_bytecode; + int _bci; + u2 _name_index; + u2 _signature_index; + BreakpointInfo* _next; + + public: + BreakpointInfo(Method* m, int bci); + + + Bytecodes::Code orig_bytecode() { return _orig_bytecode; } + void set_orig_bytecode(Bytecodes::Code code) { _orig_bytecode = code; } + int bci() { return _bci; } + + BreakpointInfo* next() const { return _next; } + void set_next(BreakpointInfo* n) { _next = n; } + + + bool match(const Method* m, int bci) { + return bci == _bci && match(m); + } + + bool match(const Method* m) { + return _name_index == m->name_index() && + _signature_index == m->signature_index(); + } + + void set(Method* method); + void clear(Method* method); +}; + + + + +class ExceptionTable : public StackObj { + private: + ExceptionTableElement* _table; + u2 _length; + + public: + ExceptionTable(const Method* m) { + if (m->has_exception_handler()) { + _table = m->exception_table_start(); + _length = m->exception_table_length(); + } else { + _table = nullptr; + _length = 0; + } + } + + u2 length() const { + return _length; + } + + u2 start_pc(int idx) const { + ; + return _table[idx].start_pc; + } + + void set_start_pc(int idx, u2 value) { + ; + _table[idx].start_pc = value; + } + + u2 end_pc(int idx) const { + ; + return _table[idx].end_pc; + } + + void set_end_pc(int idx, u2 value) { + ; + _table[idx].end_pc = value; + } + + u2 handler_pc(int idx) const { + ; + return _table[idx].handler_pc; + } + + void set_handler_pc(int idx, u2 value) { + ; + _table[idx].handler_pc = value; + } + + u2 catch_type_index(int idx) const { + ; + return _table[idx].catch_type_index; + } + + void set_catch_type_index(int idx, u2 value) { + ; + _table[idx].catch_type_index = value; + } +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/code/compiledMethod.hpp" 2 + +class Dependencies; +class ExceptionHandlerTable; +class ImplicitExceptionTable; +class AbstractCompiler; +class xmlStream; +class CompiledStaticCall; +class NativeCallWrapper; +class ScopeDesc; +class CompiledIC; +class MetadataClosure; + + + + +class ExceptionCache : public CHeapObj { + friend class VMStructs; + private: + enum { cache_size = 16 }; + Klass* _exception_type; + address _pc[cache_size]; + address _handler[cache_size]; + volatile int _count; + ExceptionCache* volatile _next; + ExceptionCache* _purge_list_next; + + inline address pc_at(int index); + void set_pc_at(int index, address a) { ; _pc[index] = a; } + + inline address handler_at(int index); + void set_handler_at(int index, address a) { ; _handler[index] = a; } + + inline int count(); + + void increment_count(); + + public: + + ExceptionCache(Handle exception, address pc, address handler); + + Klass* exception_type() { return _exception_type; } + ExceptionCache* next(); + void set_next(ExceptionCache *ec); + ExceptionCache* purge_list_next() { return _purge_list_next; } + void set_purge_list_next(ExceptionCache *ec) { _purge_list_next = ec; } + + address match(Handle exception, address pc); + bool match_exception_with_space(Handle exception) ; + address test_address(address addr); + bool add_address_and_handler(address addr, address handler) ; +}; + +class nmethod; + + +class PcDescCache { + friend class VMStructs; + private: + enum { cache_size = 4 }; + + + + + typedef PcDesc* PcDescPtr; + volatile PcDescPtr _pc_descs[cache_size]; + public: + PcDescCache() { ; } + void reset_to(PcDesc* initial_pc_desc); + PcDesc* find_pc_desc(int pc_offset, bool approximate); + void add_pc_desc(PcDesc* pc_desc); + PcDesc* last_pc_desc() { return _pc_descs[0]; } +}; + +class PcDescSearch { +private: + address _code_begin; + PcDesc* _lower; + PcDesc* _upper; +public: + PcDescSearch(address code, PcDesc* lower, PcDesc* upper) : + _code_begin(code), _lower(lower), _upper(upper) + { + } + + address code_begin() const { return _code_begin; } + PcDesc* scopes_pcs_begin() const { return _lower; } + PcDesc* scopes_pcs_end() const { return _upper; } +}; + +class PcDescContainer { +private: + PcDescCache _pc_desc_cache; +public: + PcDescContainer() {} + + PcDesc* find_pc_desc_internal(address pc, bool approximate, const PcDescSearch& search); + void reset_to(PcDesc* initial_pc_desc) { _pc_desc_cache.reset_to(initial_pc_desc); } + + PcDesc* find_pc_desc(address pc, bool approximate, const PcDescSearch& search) { + address base_address = search.code_begin(); + PcDesc* desc = _pc_desc_cache.last_pc_desc(); + if (desc != nullptr && desc->pc_offset() == pc - base_address) { + return desc; + } + return find_pc_desc_internal(pc, approximate, search); + } +}; + + +class CompiledMethod : public CodeBlob { + friend class VMStructs; + friend class DeoptimizationScope; + void init_defaults(); +protected: + enum DeoptimizationStatus : u1 { + not_marked, + deoptimize, + deoptimize_noupdate, + deoptimize_done + }; + + volatile DeoptimizationStatus _deoptimization_status; + + uint64_t _deoptimization_generation; + + + unsigned int _has_unsafe_access:1; + unsigned int _has_method_handle_invokes:1; + unsigned int _has_wide_vectors:1; + unsigned int _has_monitors:1; + + Method* _method; + address _scopes_data_begin; + + + address _deopt_handler_begin; + + + address _deopt_mh_handler_begin; + + PcDescContainer _pc_desc_container; + ExceptionCache * volatile _exception_cache; + + void* _gc_data; + + virtual void flush() = 0; + +private: + DeoptimizationStatus deoptimization_status() const { + return Atomic::load(&_deoptimization_status); + } + +protected: + CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments, bool compiled); + CompiledMethod(Method* method, const char* name, CompilerType type, int size, int header_size, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments, bool compiled); + +public: + + CompiledMethod() {} + + template + T* gc_data() const { return reinterpret_cast(_gc_data); } + template + void set_gc_data(T* gc_data) { _gc_data = reinterpret_cast(gc_data); } + + bool has_unsafe_access() const { return _has_unsafe_access; } + void set_has_unsafe_access(bool z) { _has_unsafe_access = z; } + + bool has_monitors() const { return _has_monitors; } + void set_has_monitors(bool z) { _has_monitors = z; } + + bool has_method_handle_invokes() const { return _has_method_handle_invokes; } + void set_has_method_handle_invokes(bool z) { _has_method_handle_invokes = z; } + + bool has_wide_vectors() const { return _has_wide_vectors; } + void set_has_wide_vectors(bool z) { _has_wide_vectors = z; } + + enum : signed char { not_installed = -1, + + in_use = 0, + not_used = 1, + not_entrant = 2, + }; + + virtual bool is_in_use() const = 0; + virtual int comp_level() const = 0; + virtual int compile_id() const = 0; + + virtual address verified_entry_point() const = 0; + virtual void log_identity(xmlStream* log) const = 0; + virtual void log_state_change() const = 0; + virtual bool make_not_used() = 0; + virtual bool make_not_entrant() = 0; + virtual bool make_entrant() = 0; + virtual address entry_point() const = 0; + virtual bool is_osr_method() const = 0; + virtual int osr_entry_bci() const = 0; + Method* method() const { return _method; } + virtual void print_pcs() = 0; + bool is_native_method() const { return _method != nullptr && _method->is_native(); } + bool is_java_method() const { return _method != nullptr && !_method->is_native(); } + + + PcDesc* pc_desc_at(address pc) { return find_pc_desc(pc, false); } + + PcDesc* pc_desc_near(address pc) { return find_pc_desc(pc, true); } + + + ScopeDesc* scope_desc_at(address pc); + ScopeDesc* scope_desc_near(address pc); + + bool is_at_poll_return(address pc); + bool is_at_poll_or_poll_return(address pc); + + bool is_marked_for_deoptimization() const { return deoptimization_status() != not_marked; } + bool has_been_deoptimized() const { return deoptimization_status() == deoptimize_done; } + void set_deoptimized_done(); + + virtual void make_deoptimized() { ; }; + + bool update_recompile_counts() const { + + + + DeoptimizationStatus status = deoptimization_status(); + return status != deoptimize_noupdate && status != deoptimize_done; + } + + + + bool can_be_deoptimized() const { return is_java_method(); } + + virtual oop oop_at(int index) const = 0; + virtual Metadata* metadata_at(int index) const = 0; + + address scopes_data_begin() const { return _scopes_data_begin; } + virtual address scopes_data_end() const = 0; + int scopes_data_size() const { return int(scopes_data_end() - scopes_data_begin()); } + + virtual PcDesc* scopes_pcs_begin() const = 0; + virtual PcDesc* scopes_pcs_end() const = 0; + int scopes_pcs_size() const { return int((intptr_t) scopes_pcs_end() - (intptr_t) scopes_pcs_begin()); } + + address insts_begin() const { return code_begin(); } + address insts_end() const { return stub_begin(); } + + + bool insts_contains(address addr) const { return insts_begin() <= addr && addr < insts_end(); } + bool insts_contains_inclusive(address addr) const { return insts_begin() <= addr && addr <= insts_end(); } + + int insts_size() const { return int(insts_end() - insts_begin()); } + + virtual address consts_begin() const = 0; + virtual address consts_end() const = 0; + bool consts_contains(address addr) const { return consts_begin() <= addr && addr < consts_end(); } + int consts_size() const { return int(consts_end() - consts_begin()); } + + virtual int skipped_instructions_size() const = 0; + + virtual address stub_begin() const = 0; + virtual address stub_end() const = 0; + bool stub_contains(address addr) const { return stub_begin() <= addr && addr < stub_end(); } + int stub_size() const { return int(stub_end() - stub_begin()); } + + virtual address handler_table_begin() const = 0; + virtual address handler_table_end() const = 0; + bool handler_table_contains(address addr) const { return handler_table_begin() <= addr && addr < handler_table_end(); } + int handler_table_size() const { return int(handler_table_end() - handler_table_begin()); } + + virtual address exception_begin() const = 0; + + virtual address nul_chk_table_begin() const = 0; + virtual address nul_chk_table_end() const = 0; + bool nul_chk_table_contains(address addr) const { return nul_chk_table_begin() <= addr && addr < nul_chk_table_end(); } + int nul_chk_table_size() const { return int(nul_chk_table_end() - nul_chk_table_begin()); } + + virtual oop* oop_addr_at(int index) const = 0; + virtual Metadata** metadata_addr_at(int index) const = 0; + +protected: + + + ExceptionCache* exception_cache() const { return _exception_cache; } + ExceptionCache* exception_cache_acquire() const; + void set_exception_cache(ExceptionCache *ec) { _exception_cache = ec; } + +public: + address handler_for_exception_and_pc(Handle exception, address pc); + void add_handler_for_exception_and_pc(Handle exception, address pc, address handler); + void clean_exception_cache(); + + void add_exception_cache_entry(ExceptionCache* new_entry); + ExceptionCache* exception_cache_entry_for_exception(Handle exception); + + + bool is_method_handle_return(address return_pc); + address deopt_mh_handler_begin() const { return _deopt_mh_handler_begin; } + + address deopt_handler_begin() const { return _deopt_handler_begin; } + address* deopt_handler_begin_addr() { return &_deopt_handler_begin; } + + + inline bool is_deopt_pc(address pc); + inline bool is_deopt_mh_entry(address pc); + inline bool is_deopt_entry(address pc); + + + address get_original_pc(const frame* fr) { return *orig_pc_addr(fr); } + void set_original_pc(const frame* fr, address pc) { *orig_pc_addr(fr) = pc; } + + virtual int orig_pc_offset() = 0; + +private: + address* orig_pc_addr(const frame* fr); + +public: + virtual const char* compile_kind() const = 0; + virtual int get_state() const = 0; + + const char* state() const; + + bool inlinecache_check_contains(address addr) const { + return (addr >= code_begin() && addr < verified_entry_point()); + } + + void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f); + + + address continuation_for_implicit_div0_exception(address pc) { return continuation_for_implicit_exception(pc, true); } + address continuation_for_implicit_null_exception(address pc) { return continuation_for_implicit_exception(pc, false); } + + static address get_deopt_original_pc(const frame* fr); + + + private: + bool cleanup_inline_caches_impl(bool unloading_occurred, bool clean_all); + + address continuation_for_implicit_exception(address pc, bool for_div0_check); + + public: + + void cleanup_inline_caches_whitebox(); + + virtual void clear_inline_caches(); + void clear_ic_callsites(); + + + void run_nmethod_entry_barrier(); + + + int verify_icholder_relocations(); + void verify_oop_relocations(); + + bool has_evol_metadata(); + + + + + virtual bool is_dependent_on_method(Method* dependee) = 0; + + virtual NativeCallWrapper* call_wrapper_at(address call) const = 0; + virtual NativeCallWrapper* call_wrapper_before(address return_pc) const = 0; + virtual address call_instruction_address(address pc) const = 0; + + virtual CompiledStaticCall* compiledStaticCall_at(Relocation* call_site) const = 0; + virtual CompiledStaticCall* compiledStaticCall_at(address addr) const = 0; + virtual CompiledStaticCall* compiledStaticCall_before(address addr) const = 0; + + Method* attached_method(address call_pc); + Method* attached_method_before_pc(address pc); + + virtual void metadata_do(MetadataClosure* f) = 0; + + + protected: + address oops_reloc_begin() const; + + private: + bool static clean_ic_if_metadata_is_dead(CompiledIC *ic); + + public: + + + + virtual bool is_unloading() = 0; + + bool unload_nmethod_caches(bool class_unloading_occurred); + virtual void do_unloading(bool unloading_occurred) = 0; + +private: + PcDesc* find_pc_desc(address pc, bool approximate) { + return _pc_desc_container.find_pc_desc(pc, approximate, PcDescSearch(code_begin(), scopes_pcs_begin(), scopes_pcs_end())); + } +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/code/nmethod.hpp" 2 + +class CompileTask; +class DepChange; +class DirectiveSet; +class DebugInformationRecorder; +class JvmtiThreadState; +class OopIterateClosure; +# 63 "/home/rehn/source/jdk/open/src/hotspot/share/code/nmethod.hpp" +class FailedSpeculation; +class JVMCINMethodData; + + +class nmethod : public CompiledMethod { + friend class VMStructs; + friend class JVMCIVMStructs; + friend class CodeCache; + friend class JVMCINMethodData; + + private: + + uint64_t _gc_epoch; + + + nmethod* _osr_link; +# 139 "/home/rehn/source/jdk/open/src/hotspot/share/code/nmethod.hpp" + struct oops_do_mark_link; + + + static const uint claim_weak_request_tag = 0; + static const uint claim_weak_done_tag = 1; + static const uint claim_strong_request_tag = 2; + static const uint claim_strong_done_tag = 3; + + static oops_do_mark_link* mark_link(nmethod* nm, uint tag) { + ; + ; + return (oops_do_mark_link*)(((uintptr_t)nm & ~0x3) | tag); + } + + static uint extract_state(oops_do_mark_link* link) { + return (uint)((uintptr_t)link & 0x3); + } + + static nmethod* extract_nmethod(oops_do_mark_link* link) { + return (nmethod*)((uintptr_t)link & ~0x3); + } + + void oops_do_log_change(const char* state); + + static bool oops_do_has_weak_request(oops_do_mark_link* next) { + return extract_state(next) == claim_weak_request_tag; + } + + static bool oops_do_has_any_strong_state(oops_do_mark_link* next) { + return extract_state(next) >= claim_strong_request_tag; + } + + + bool oops_do_try_claim_weak_request(); + + + oops_do_mark_link* oops_do_try_claim_strong_done(); + + nmethod* oops_do_try_add_to_list_as_weak_done(); + + + oops_do_mark_link* oops_do_try_add_strong_request(oops_do_mark_link* next); + + bool oops_do_try_claim_weak_done_as_strong_done(oops_do_mark_link* next); + + + void oops_do_add_to_list_as_strong_done(); + + + + void oops_do_set_strong_done(nmethod* old_head); + + static nmethod* volatile _oops_do_mark_nmethods; + oops_do_mark_link* volatile _oops_do_mark_link; + + + address _entry_point; + address _verified_entry_point; + address _osr_entry_point; + + nmethod* _unlinked_next; + + + int _entry_bci; + + + int _exception_offset; + + int _unwind_handler_offset; + + int _consts_offset; + int _stub_offset; + int _oops_offset; + int _metadata_offset; + int _scopes_data_offset; + int _scopes_pcs_offset; + int _dependencies_offset; + int _handler_table_offset; + int _nul_chk_table_offset; + + int _speculations_offset; + int _jvmci_data_offset; + + int _nmethod_end_offset; + + int code_offset() const { return int(code_begin() - header_begin()); } + + + + int _orig_pc_offset; + + int _compile_id; +# 246 "/home/rehn/source/jdk/open/src/hotspot/share/code/nmethod.hpp" + ByteSize _native_receiver_sp_offset; + ByteSize _native_basic_lock_sp_offset; + + CompLevel _comp_level; + + + volatile uint8_t _is_unloading_state; + + + bool _has_flushed_dependencies; + + + bool _load_reported; + + + volatile signed char _state; + + int _skipped_instructions_size; + + + nmethod(Method* method, + CompilerType type, + int nmethod_size, + int compile_id, + CodeOffsets* offsets, + CodeBuffer *code_buffer, + int frame_size, + ByteSize basic_lock_owner_sp_offset, + ByteSize basic_lock_sp_offset, + OopMapSet* oop_maps); + + + nmethod(Method* method, + CompilerType type, + int nmethod_size, + int compile_id, + int entry_bci, + CodeOffsets* offsets, + int orig_pc_offset, + DebugInformationRecorder *recorder, + Dependencies* dependencies, + CodeBuffer *code_buffer, + int frame_size, + OopMapSet* oop_maps, + ExceptionHandlerTable* handler_table, + ImplicitExceptionTable* nul_chk_table, + AbstractCompiler* compiler, + CompLevel comp_level + + , char* speculations = nullptr, + int speculations_len = 0, + JVMCINMethodData* jvmci_data = nullptr + + ); + + + void* operator new(size_t size, int nmethod_size, int comp_level) throw(); + + + + void* operator new(size_t size, int nmethod_size, bool allow_NonNMethod_space) throw(); + + const char* reloc_string_for(u_char* begin, u_char* end); + + bool try_transition(signed char new_state); + + + + bool make_entrant() { do { (*g_assert_poison) = 'X';; report_unimplemented("src/hotspot/share/code/nmethod.hpp", 314); } while (0); return false; } + void inc_decompile_count(); + + + void post_compiled_method_unload(); + + + void init_defaults(); + + + int content_offset() const { return int(content_begin() - header_begin()); } + int data_offset() const { return _data_offset; } + + address header_end() const { return (address) header_begin() + header_size(); } + + public: + + static nmethod* new_nmethod(const methodHandle& method, + int compile_id, + int entry_bci, + CodeOffsets* offsets, + int orig_pc_offset, + DebugInformationRecorder* recorder, + Dependencies* dependencies, + CodeBuffer *code_buffer, + int frame_size, + OopMapSet* oop_maps, + ExceptionHandlerTable* handler_table, + ImplicitExceptionTable* nul_chk_table, + AbstractCompiler* compiler, + CompLevel comp_level + + , char* speculations = nullptr, + int speculations_len = 0, + JVMCINMethodData* jvmci_data = nullptr + + ); + + + nmethod() + : CompiledMethod(), + _native_receiver_sp_offset(in_ByteSize(-1)), + _native_basic_lock_sp_offset(in_ByteSize(-1)), + _is_unloading_state(0) {} + + + static nmethod* new_native_nmethod(const methodHandle& method, + int compile_id, + CodeBuffer *code_buffer, + int vep_offset, + int frame_complete, + int frame_size, + ByteSize receiver_sp_offset, + ByteSize basic_lock_sp_offset, + OopMapSet* oop_maps, + int exception_handler = -1); + + + bool is_nmethod() const { return true; } + bool is_osr_method() const { return _entry_bci != InvocationEntryBci; } + + + address consts_begin () const { return header_begin() + _consts_offset ; } + address consts_end () const { return code_begin() ; } + address stub_begin () const { return header_begin() + _stub_offset ; } + address stub_end () const { return header_begin() + _oops_offset ; } + address exception_begin () const { return header_begin() + _exception_offset ; } + address unwind_handler_begin () const { return _unwind_handler_offset != -1 ? (header_begin() + _unwind_handler_offset) : nullptr; } + oop* oops_begin () const { return (oop*) (header_begin() + _oops_offset) ; } + oop* oops_end () const { return (oop*) (header_begin() + _metadata_offset) ; } + + Metadata** metadata_begin () const { return (Metadata**) (header_begin() + _metadata_offset) ; } + Metadata** metadata_end () const { return (Metadata**) _scopes_data_begin; } + + address scopes_data_end () const { return header_begin() + _scopes_pcs_offset ; } + PcDesc* scopes_pcs_begin () const { return (PcDesc*)(header_begin() + _scopes_pcs_offset ); } + PcDesc* scopes_pcs_end () const { return (PcDesc*)(header_begin() + _dependencies_offset) ; } + address dependencies_begin () const { return header_begin() + _dependencies_offset ; } + address dependencies_end () const { return header_begin() + _handler_table_offset ; } + address handler_table_begin () const { return header_begin() + _handler_table_offset ; } + address handler_table_end () const { return header_begin() + _nul_chk_table_offset ; } + address nul_chk_table_begin () const { return header_begin() + _nul_chk_table_offset ; } + + int skipped_instructions_size () const { return _skipped_instructions_size ; } + + + address nul_chk_table_end () const { return header_begin() + _speculations_offset ; } + address speculations_begin () const { return header_begin() + _speculations_offset ; } + address speculations_end () const { return header_begin() + _jvmci_data_offset ; } + address jvmci_data_begin () const { return header_begin() + _jvmci_data_offset ; } + address jvmci_data_end () const { return header_begin() + _nmethod_end_offset ; } + + + + + + int oops_size () const { return int((address) oops_end () - (address) oops_begin ()); } + int metadata_size () const { return int((address) metadata_end () - (address) metadata_begin ()); } + int dependencies_size () const { return int( dependencies_end () - dependencies_begin ()); } + + int speculations_size () const { return int( speculations_end () - speculations_begin ()); } + int jvmci_data_size () const { return int( jvmci_data_end () - jvmci_data_begin ()); } + + + int oops_count() const { ; return (oops_size() / oopSize) + 1; } + int metadata_count() const { ; return (metadata_size() / wordSize) + 1; } + + int total_size () const; + + + bool oops_contains (oop* addr) const { return oops_begin () <= addr && addr < oops_end (); } + bool metadata_contains (Metadata** addr) const { return metadata_begin () <= addr && addr < metadata_end (); } + bool scopes_data_contains (address addr) const { return scopes_data_begin () <= addr && addr < scopes_data_end (); } + bool scopes_pcs_contains (PcDesc* addr) const { return scopes_pcs_begin () <= addr && addr < scopes_pcs_end (); } + + + address entry_point() const { return _entry_point; } + address verified_entry_point() const { return _verified_entry_point; } + + + bool is_not_installed() const { return _state == not_installed; } + bool is_in_use() const { return _state <= in_use; } + bool is_not_entrant() const { return _state == not_entrant; } + + void clear_unloading_state(); + + bool is_cold(); + virtual bool is_unloading(); + virtual void do_unloading(bool unloading_occurred); + + nmethod* unlinked_next() const { return _unlinked_next; } + void set_unlinked_next(nmethod* next) { _unlinked_next = next; } + + + + + + + + bool make_in_use() { + return try_transition(in_use); + } + + + + + bool make_not_entrant(); + bool make_not_used() { return make_not_entrant(); } + + int get_state() const { + return _state; + } + + bool has_dependencies() { return dependencies_size() != 0; } + void print_dependencies_on(outputStream* out) {}; + void flush_dependencies(); + bool has_flushed_dependencies() { return _has_flushed_dependencies; } + void set_has_flushed_dependencies() { + ; + _has_flushed_dependencies = 1; + } + + int comp_level() const { return _comp_level; } + + void unlink_from_method(); + + + + oop oop_at(int index) const; + oop oop_at_phantom(int index) const; + oop* oop_addr_at(int index) const { + + ; + return &oops_begin()[index - 1]; + } + + + + Metadata* metadata_at(int index) const { return index == 0 ? nullptr: *metadata_addr_at(index); } + Metadata** metadata_addr_at(int index) const { + + ; + return &metadata_begin()[index - 1]; + } + + void copy_values(GrowableArray* oops); + void copy_values(GrowableArray* metadata); + + +private: + void fix_oop_relocations(address begin, address end, bool initialize_immediates); + inline void initialize_immediate_oop(oop* dest, jobject handle); + +public: + void fix_oop_relocations(address begin, address end) { fix_oop_relocations(begin, end, false); } + void fix_oop_relocations() { fix_oop_relocations(nullptr, nullptr, false); } + + + int osr_entry_bci() const { ; return _entry_bci; } + address osr_entry() const { ; return _osr_entry_point; } + void invalidate_osr_method(); + nmethod* osr_link() const { return _osr_link; } + void set_osr_link(nmethod *n) { _osr_link = n; } + + + void verify_clean_inline_caches(); + + + void unlink(); + + + void flush(); + + + void mark_as_maybe_on_stack(); + bool is_maybe_on_stack(); + + + void set_method(Method* method) { _method = method; } + + + + const char* jvmci_name(); + + + + void update_speculation(JavaThread* thread); + + + + + JVMCINMethodData* jvmci_nmethod_data() const { + return jvmci_data_size() == 0 ? nullptr : (JVMCINMethodData*) jvmci_data_begin(); + } + + + public: + void oops_do(OopClosure* f) { oops_do(f, false); } + void oops_do(OopClosure* f, bool allow_dead); + + + + bool oops_do_try_claim(); + + + void follow_nmethod(OopIterateClosure* cl); + + + + class OopsDoProcessor { + public: + + + + virtual void do_regular_processing(nmethod* nm) = 0; + + + virtual void do_remaining_strong_processing(nmethod* nm) = 0; + }; + + + + void oops_do_process_weak(OopsDoProcessor* p); + void oops_do_process_strong(OopsDoProcessor* p); + + static void oops_do_marking_prologue(); + static void oops_do_marking_epilogue(); + + private: + ScopeDesc* scope_desc_in(address begin, address end); + + address* orig_pc_addr(const frame* fr); + + + bool load_reported() const { return _load_reported; } + void set_load_reported() { _load_reported = true; } + + public: + + void copy_scopes_pcs(PcDesc* pcs, int count); + void copy_scopes_data(address buffer, int size); + + int orig_pc_offset() { return _orig_pc_offset; } + + + void post_compiled_method(CompileTask* task); + + + void post_compiled_method_load_event(JvmtiThreadState* state = nullptr); + + + void verify(); + void verify_scopes(); + void verify_interrupt_point(address interrupt_point); + + + void decode2(outputStream* st) const; + void print_constant_pool(outputStream* st); + + + void decode(outputStream* st) const { decode2(st); } + + + void print() const; + void print(outputStream* st) const; + void print_code(); +# 639 "/home/rehn/source/jdk/open/src/hotspot/share/code/nmethod.hpp" + void print_pcs() { return; } + + + void print_calls(outputStream* st) {}; + static void print_statistics() {}; + + void maybe_print_nmethod(const DirectiveSet* directive); + void print_nmethod(bool print_code); + + + virtual void print_on(outputStream* st) const { CodeBlob::print_on(st); } + void print_on(outputStream* st, const char* msg) const; + + + void log_identity(xmlStream* log) const; + void log_new_nmethod() const; + void log_state_change() const; + + + virtual void print_block_comment(outputStream* stream, address block_begin) const { + + print_nmethod_labels(stream, block_begin); + CodeBlob::print_block_comment(stream, block_begin); + + } + + void print_nmethod_labels(outputStream* stream, address block_begin, bool print_section_labels=true) const; + const char* nmethod_section_label(address pos) const; + + + bool has_code_comment(address begin, address end); + + void print_code_comment_on(outputStream* st, int column, address begin, address end); + + + + + + virtual int compile_id() const { return _compile_id; } + const char* compile_kind() const; + + + + static void check_all_dependencies(DepChange& changes); + + + + bool check_dependency_on(DepChange& changes); + + + + + virtual bool is_dependent_on_method(Method* dependee); + + + ByteSize native_receiver_sp_offset() { + return _native_receiver_sp_offset; + } + ByteSize native_basic_lock_sp_offset() { + return _native_basic_lock_sp_offset; + } + + + static ByteSize verified_entry_point_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (nmethod)]; nmethod* dummyObj = (nmethod*)space; char* c = (char*)(void*)&dummyObj->_verified_entry_point; return (size_t)(c - space); }())); } + static ByteSize osr_entry_point_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (nmethod)]; nmethod* dummyObj = (nmethod*)space; char* c = (char*)(void*)&dummyObj->_osr_entry_point; return (size_t)(c - space); }())); } + static ByteSize state_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (nmethod)]; nmethod* dummyObj = (nmethod*)space; char* c = (char*)(void*)&dummyObj->_state; return (size_t)(c - space); }())); } + + virtual void metadata_do(MetadataClosure* f); + + NativeCallWrapper* call_wrapper_at(address call) const; + NativeCallWrapper* call_wrapper_before(address return_pc) const; + address call_instruction_address(address pc) const; + + virtual CompiledStaticCall* compiledStaticCall_at(Relocation* call_site) const; + virtual CompiledStaticCall* compiledStaticCall_at(address addr) const; + virtual CompiledStaticCall* compiledStaticCall_before(address addr) const; + + virtual void make_deoptimized(); + void finalize_relocations(); +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/access.inline.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.inline.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.inline.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/fieldInfo.inline.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/oops/fieldInfo.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/memory/metadataFactory.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/memory/metadataFactory.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/memory/classLoaderMetaspace.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/memory/classLoaderMetaspace.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/memory/metaspace.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/memory/metaspace.hpp" +class ClassLoaderData; +class MetaspaceShared; +class MetaspaceTracer; +class Mutex; +class outputStream; +class ReservedSpace; + + + + + +class Metaspace : public AllStatic { + + friend class MetaspaceShared; + +public: + enum MetadataType { + ClassType, + NonClassType, + MetadataTypeCount + }; + enum MetaspaceType { + ZeroMetaspaceType = 0, + StandardMetaspaceType = ZeroMetaspaceType, + BootMetaspaceType = StandardMetaspaceType + 1, + ClassMirrorHolderMetaspaceType = BootMetaspaceType + 1, + ReflectionMetaspaceType = ClassMirrorHolderMetaspaceType + 1, + MetaspaceTypeCount + }; + +private: + + static const MetaspaceTracer* _tracer; + + static bool _initialized; + +public: + + static const MetaspaceTracer* tracer() { return _tracer; } + + private: + + + + + + static ReservedSpace reserve_address_space_for_compressed_classes(size_t size, bool try_in_low_address_ranges); + + + static void initialize_class_space(ReservedSpace rs); + + + static bool class_space_is_initialized(); + + + + public: + + static void ergo_initialize(); + static void global_initialize(); + static void post_initialize(); + + + static size_t reserve_alignment() { return reserve_alignment_words() * BytesPerWord; } + + static size_t reserve_alignment_words(); + + + + static size_t commit_alignment() { return commit_alignment_words() * BytesPerWord; } + static size_t commit_alignment_words(); + + + static size_t max_allocation_word_size(); + + static MetaWord* allocate(ClassLoaderData* loader_data, size_t word_size, + MetaspaceObj::Type type, JavaThread* __the_thread__); + + + + static MetaWord* allocate(ClassLoaderData* loader_data, size_t word_size, + MetaspaceObj::Type type); + + static bool contains(const void* ptr); + static bool contains_non_shared(const void* ptr); + + + static void purge(bool classes_unloaded); + + static void report_metadata_oome(ClassLoaderData* loader_data, size_t word_size, + MetaspaceObj::Type type, MetadataType mdtype, JavaThread* __the_thread__); + + static const char* metadata_type_name(Metaspace::MetadataType mdtype); + + static void print_compressed_class_space(outputStream* st) ; + + + static bool using_class_space() { + return UseCompressedClassPointers; + } + + static bool is_class_space_allocation(MetadataType mdType) { + return mdType == ClassType && using_class_space(); + } + + static bool initialized(); + +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/memory/classLoaderMetaspace.hpp" 2 + + + +class outputStream; + +namespace metaspace { + struct ClmsStats; + class MetaspaceArena; +} +# 59 "/home/rehn/source/jdk/open/src/hotspot/share/memory/classLoaderMetaspace.hpp" +class ClassLoaderMetaspace : public CHeapObj { + + + Mutex* const _lock; + + const Metaspace::MetaspaceType _space_type; + + + + metaspace::MetaspaceArena* _non_class_space_arena; + + + + metaspace::MetaspaceArena* _class_space_arena; + + Mutex* lock() const { return _lock; } + metaspace::MetaspaceArena* non_class_space_arena() const { return _non_class_space_arena; } + metaspace::MetaspaceArena* class_space_arena() const { return _class_space_arena; } + +public: + + ClassLoaderMetaspace(Mutex* lock, Metaspace::MetaspaceType space_type); + + ~ClassLoaderMetaspace(); + + Metaspace::MetaspaceType space_type() const { return _space_type; } + + + MetaWord* allocate(size_t word_size, Metaspace::MetadataType mdType); + + + + MetaWord* expand_and_allocate(size_t word_size, Metaspace::MetadataType mdType); + + + + void deallocate(MetaWord* ptr, size_t word_size, bool is_class); + + + void add_to_statistics(metaspace::ClmsStats* out) const; + + + + + + void usage_numbers(Metaspace::MetadataType mdType, size_t* p_used_words, + size_t* p_committed_words, size_t* p_capacity_words) const; + + + + void usage_numbers(size_t* p_used_words, size_t* p_committed_words, + size_t* p_capacity_words) const; + +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/memory/metadataFactory.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/array.inline.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/oops/array.inline.hpp" +template +inline void* Array::operator new(size_t size, ClassLoaderData* loader_data, int length, JavaThread* __the_thread__) throw() { + size_t word_size = Array::size(length); + return (void*) Metaspace::allocate(loader_data, word_size, + MetaspaceObj::array_type(sizeof(T)), __the_thread__); +} +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/memory/metadataFactory.hpp" 2 + + + + +class MetadataFactory : AllStatic { + public: + template + static Array* new_array(ClassLoaderData* loader_data, int length, JavaThread* __the_thread__) { + + + return new (loader_data, length, __the_thread__) Array(length); + } + + template + static Array* new_array(ClassLoaderData* loader_data, int length, T value, JavaThread* __the_thread__) { + Array* array = new_array(loader_data, length, __the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception())) return nullptr; (void)(0); + for (int i = 0; i < length; i++) { + array->at_put(i, value); + } + return array; + } + + template + static void free_array(ClassLoaderData* loader_data, Array* data) { + if (data != nullptr) { + ; + ; + int size = data->size(); + loader_data->metaspace_non_null()->deallocate((MetaWord*)data, size, false); + } + } + + + template + static void free_metadata(ClassLoaderData* loader_data, T* md) { + if (md != nullptr) { + ; + int size = md->size(); + + ; + ; + md->deallocate_contents(loader_data); + bool is_klass = md->is_klass(); + + + + + + using U = std::remove_cv_t; + md->~U(); + loader_data->metaspace_non_null()->deallocate((MetaWord*)md, size, is_klass); + } + } +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/fieldInfo.inline.hpp" 2 + + + + + +inline Symbol* FieldInfo::name(ConstantPool* cp) const { + int index = _name_index; + if (_field_flags.is_injected()) { + return lookup_symbol(index); + } + return cp->symbol_at(index); +} + +inline Symbol* FieldInfo::signature(ConstantPool* cp) const { + int index = _signature_index; + if (_field_flags.is_injected()) { + return lookup_symbol(index); + } + return cp->symbol_at(index); +} + +inline Symbol* FieldInfo::lookup_symbol(int symbol_index) const { + ; + return Symbol::vm_symbol_at(static_cast(symbol_index)); +} + +inline int FieldInfoStream::num_injected_java_fields(const Array* fis) { + FieldInfoReader fir(fis); + fir.skip(1); + return fir.next_uint(); +} + +inline int FieldInfoStream::num_total_fields(const Array* fis) { + FieldInfoReader fir(fis); + return fir.next_uint() + fir.next_uint(); +} + +inline int FieldInfoStream::num_java_fields(const Array* fis) { return FieldInfoReader(fis).next_uint(); } + +template +inline void Mapper::map_field_info(const FieldInfo& fi) { + _next_index++; + _consumer->accept_uint(fi.name_index()); + _consumer->accept_uint(fi.signature_index()); + _consumer->accept_uint(fi.offset()); + _consumer->accept_uint(fi.access_flags().as_int()); + _consumer->accept_uint(fi.field_flags().as_uint()); + if(fi.field_flags().has_any_optionals()) { + if (fi.field_flags().is_initialized()) { + _consumer->accept_uint(fi.initializer_index()); + } + if (fi.field_flags().is_generic()) { + _consumer->accept_uint(fi.generic_signature_index()); + } + if (fi.field_flags().is_contended()) { + _consumer->accept_uint(fi.contention_group()); + } + } else { + ; + ; + ; + } +} + + +inline FieldInfoReader::FieldInfoReader(const Array* fi) + : _r(fi->data(), 0), + _next_index(0) { } + +inline void FieldInfoReader::read_field_info(FieldInfo& fi) { + fi._index = _next_index++; + fi._name_index = checked_cast(next_uint()); + fi._signature_index = checked_cast(next_uint()); + fi._offset = next_uint(); + fi._access_flags = AccessFlags(next_uint()); + fi._field_flags = FieldInfo::FieldFlags(next_uint()); + if (fi._field_flags.is_initialized()) { + fi._initializer_index = checked_cast(next_uint()); + } else { + fi._initializer_index = 0; + } + if (fi._field_flags.is_generic()) { + fi._generic_signature_index = checked_cast(next_uint()); + } else { + fi._generic_signature_index = 0; + } + if (fi._field_flags.is_contended()) { + fi._contention_group = checked_cast(next_uint()); + } else { + fi._contention_group = 0; + } +} + +inline FieldInfoReader& FieldInfoReader::skip_field_info() { + _next_index++; + const int name_sig_af_off = 4; + skip(name_sig_af_off); + FieldInfo::FieldFlags ff(next_uint()); + if (ff.has_any_optionals()) { + const int init_gen_cont = (ff.is_initialized() + + ff.is_generic() + + ff.is_contended()); + skip(init_gen_cont); + } + return *this; +} + + + +inline FieldInfoReader& FieldInfoReader::skip_to_field_info(int n) { + ; + const int count = n - _next_index; + for (int i = 0; i < count; i++) skip_field_info(); + ; + return *this; +} + + +inline FieldInfoReader& FieldInfoReader::set_position_and_next_index(int position, int next_index) { + _r.set_position(position); + _next_index = next_index; + return *this; +} + +inline void FieldStatus::atomic_set_bits(u1& flags, u1 mask) { + Atomic::fetch_then_or(&flags, mask); +} + +inline void FieldStatus::atomic_clear_bits(u1& flags, u1 mask) { + Atomic::fetch_then_and(&flags, (u1)(~mask)); +} + +inline void FieldStatus::update_flag(FieldStatusBitPosition pos, bool z) { + if (z) atomic_set_bits(_flags, flag_mask(pos)); + else atomic_clear_bits(_flags, flag_mask(pos)); +} + +inline void FieldStatus::update_access_watched(bool z) { update_flag(_fs_access_watched, z); } +inline void FieldStatus::update_modification_watched(bool z) { update_flag(_fs_modification_watched, z); } +inline void FieldStatus::update_initialized_final_update(bool z) { update_flag(_initialized_final_update, z); } +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.inline.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoaderData.inline.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoaderData.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oop.inline.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoaderData.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oopHandle.inline.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oopHandle.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/oopStorage.inline.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/oopStorage.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/oopStorage.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/oopStorage.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/singleWriterSynchronizer.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/singleWriterSynchronizer.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/semaphore.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/semaphore.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/os/posix/semaphore_posix.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/os/posix/semaphore_posix.hpp" +# 1 "/usr/riscv64-linux-gnu/include/semaphore.h" 1 3 +# 28 "/usr/riscv64-linux-gnu/include/semaphore.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/semaphore.h" 1 3 +# 23 "/usr/riscv64-linux-gnu/include/bits/semaphore.h" 3 +# 1 "/usr/riscv64-linux-gnu/include/bits/wordsize.h" 1 3 +# 24 "/usr/riscv64-linux-gnu/include/bits/semaphore.h" 2 3 +# 35 "/usr/riscv64-linux-gnu/include/bits/semaphore.h" 3 + +# 35 "/usr/riscv64-linux-gnu/include/bits/semaphore.h" 3 +typedef union +{ + char __size[32]; + long int __align; +} sem_t; +# 29 "/usr/riscv64-linux-gnu/include/semaphore.h" 2 3 + + +extern "C" { + + + +extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int sem_destroy (sem_t *__sem) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern sem_t *sem_open (const char *__name, int __oflag, ...) + noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int sem_close (sem_t *__sem) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int sem_unlink (const char *__name) noexcept (true) __attribute__ ((__nonnull__ (1))); + + + + + +extern int sem_wait (sem_t *__sem) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int sem_timedwait (sem_t *__restrict __sem, + const struct timespec *__restrict __abstime) + __attribute__ ((__nonnull__ (1, 2))); +# 81 "/usr/riscv64-linux-gnu/include/semaphore.h" 3 +extern int sem_clockwait (sem_t *__restrict __sem, + clockid_t clock, + const struct timespec *__restrict __abstime) + __attribute__ ((__nonnull__ (1, 3))); +# 100 "/usr/riscv64-linux-gnu/include/semaphore.h" 3 +extern int sem_trywait (sem_t *__sem) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int sem_post (sem_t *__sem) noexcept (true) __attribute__ ((__nonnull__ (1))); + + +extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval) + noexcept (true) __attribute__ ((__nonnull__ (1, 2))); + + +} +# 32 "/home/rehn/source/jdk/open/src/hotspot/os/posix/semaphore_posix.hpp" 2 + + +# 33 "/home/rehn/source/jdk/open/src/hotspot/os/posix/semaphore_posix.hpp" +class PosixSemaphore : public CHeapObj { + sem_t _semaphore; + + PosixSemaphore(PosixSemaphore const&) = delete; PosixSemaphore& operator=(PosixSemaphore const&) = delete; + + public: + PosixSemaphore(uint value = 0); + ~PosixSemaphore(); + + void signal(uint count = 1); + + void wait(); + + bool trywait(); + + bool timedwait(struct timespec ts); + + bool timedwait(int64_t millis); +}; + +typedef PosixSemaphore SemaphoreImpl; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/semaphore.hpp" 2 + + + + +class JavaThread; + + +class Semaphore : public CHeapObj { + SemaphoreImpl _impl; + + Semaphore(Semaphore const&) = delete; Semaphore& operator=(Semaphore const&) = delete; + + public: + Semaphore(uint value = 0) : _impl(value) {} + ~Semaphore() {} + + void signal(uint count = 1) { _impl.signal(count); } + + void wait() { _impl.wait(); } + + bool trywait() { return _impl.trywait(); } + + void wait_with_safepoint_check(JavaThread* thread); +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/singleWriterSynchronizer.hpp" 2 +# 50 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/singleWriterSynchronizer.hpp" +class SingleWriterSynchronizer { + volatile uint _enter; + volatile uint _exit[2]; + volatile uint _waiting_for; + Semaphore _wakeup; + + + + SingleWriterSynchronizer(SingleWriterSynchronizer const&) = delete; SingleWriterSynchronizer& operator=(SingleWriterSynchronizer const&) = delete; + +public: + SingleWriterSynchronizer(); +# 70 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/singleWriterSynchronizer.hpp" + inline uint enter(); + + + + + inline void exit(uint enter_value); + + + + + + + + void synchronize(); + + + class CriticalSection; +}; + +inline uint SingleWriterSynchronizer::enter() { + return Atomic::add(&_enter, 2u); +} + +inline void SingleWriterSynchronizer::exit(uint enter_value) { + uint exit_value = Atomic::add(&_exit[enter_value & 1], 2u); + + + + if (exit_value == _waiting_for) { + _wakeup.signal(); + } +} + +class SingleWriterSynchronizer::CriticalSection : public StackObj { + SingleWriterSynchronizer* _synchronizer; + uint _enter_value; + +public: + + explicit CriticalSection(SingleWriterSynchronizer* synchronizer) : + _synchronizer(synchronizer), + _enter_value(synchronizer->enter()) + {} + + + ~CriticalSection() { + _synchronizer->exit(_enter_value); + } +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/oopStorage.hpp" 2 + +class Mutex; +class outputStream; +# 75 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/oopStorage.hpp" +class OopStorage : public CHeapObjBase { +public: + static OopStorage* create(const char* name, MEMFLAGS memflags); + ~OopStorage(); + + + + + size_t allocation_count() const; + + + size_t block_count() const; + + + + size_t total_memory_usage() const; + + + MEMFLAGS memflags() const; + + enum EntryStatus { + INVALID_ENTRY, + UNALLOCATED_ENTRY, + ALLOCATED_ENTRY + }; + + + + EntryStatus allocation_status(const oop* ptr) const; + + + + + oop* allocate(); + + + + static const size_t bulk_allocate_limit = BitsPerWord; +# 124 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/oopStorage.hpp" + size_t allocate(oop** ptrs, size_t size); + + + + + void release(const oop* ptr); + + + + + + void release(const oop* const* ptrs, size_t size); +# 145 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/oopStorage.hpp" + template inline bool iterate_safepoint(F f); + template inline bool iterate_safepoint(F f) const; +# 162 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/oopStorage.hpp" + template inline void oops_do(Closure* closure); + template inline void oops_do(Closure* closure) const; + template inline void weak_oops_do(Closure* closure); + + template + inline void weak_oops_do(IsAliveClosure* is_alive, Closure* closure); + + + + template class ParState; + + + + + typedef void (*NumDeadCallback)(size_t num_dead); + + + + void register_num_dead_callback(NumDeadCallback f); + + + + + + void report_num_dead(size_t num_dead) const; + + + bool should_report_num_dead() const; +# 200 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/oopStorage.hpp" + bool delete_empty_blocks(); + + + + + static void trigger_cleanup_if_needed(); + + + + + + static bool has_cleanup_work_and_reset(); + + + const char* name() const; + void print_on(outputStream* st) const {}; + + + + + + class TestAccess; + +private: + class Block; + class ActiveArray; + class AllocationListEntry; + + + + class AllocationList { + const Block* _head; + const Block* _tail; + + AllocationList(AllocationList const&) = delete; AllocationList& operator=(AllocationList const&) = delete; + + public: + AllocationList(); + ~AllocationList(); + + Block* head(); + Block* tail(); + const Block* chead() const; + const Block* ctail() const; + + Block* prev(Block& block); + Block* next(Block& block); + + const Block* prev(const Block& block) const; + const Block* next(const Block& block) const; + + void push_front(const Block& block); + void push_back(const Block& block); + void unlink(const Block& block); + + bool contains(const Block& block) const; + }; + +private: + const char* _name; + ActiveArray* _active_array; + AllocationList _allocation_list; + Block* volatile _deferred_updates; + Mutex* _allocation_mutex; + Mutex* _active_mutex; + NumDeadCallback _num_dead_callback; + + + volatile size_t _allocation_count; + + + mutable SingleWriterSynchronizer _protect_active; + + + mutable int _concurrent_iteration_count; + + + MEMFLAGS _memflags; + + + volatile bool _needs_cleanup; + + + OopStorage(const char* name, MEMFLAGS memflags); + OopStorage(OopStorage const&) = delete; OopStorage& operator=(OopStorage const&) = delete; + + bool try_add_block(); + Block* block_for_allocation(); + void log_block_transition(Block* block, const char* new_state) const; + + Block* find_block_or_null(const oop* ptr) const; + void delete_empty_block(const Block& block); + bool reduce_deferred_updates(); + void record_needs_cleanup(); + + + bool expand_active_array(); + void replace_active_array(ActiveArray* new_array); + ActiveArray* obtain_active_array() const; + void relinquish_block_array(ActiveArray* array) const; + class WithActiveArray; + + template + static bool iterate_impl(F f, Storage* storage); + + + class BasicParState; + + + + + template class OopFn; + template static OopFn oop_fn(Closure* cl); + + + + template class IfAliveFn; + template + static IfAliveFn if_alive_fn(IsAlive* is_alive, F f); + + + template class SkipNullFn; + template static SkipNullFn skip_null_fn(F f); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/oopStorage.inline.hpp" 2 + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/safepoint.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/safepoint.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/vmOperation.hpp" 1 +# 122 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/vmOperation.hpp" +class Thread; +class outputStream; + +class VM_Operation : public StackObj { + public: + enum VMOp_Type { + VMOp_Halt, VMOp_SafepointALot, VMOp_Cleanup, VMOp_ThreadDump, VMOp_PrintThreads, VMOp_FindDeadlocks, VMOp_ClearICs, VMOp_ForceSafepoint, VMOp_DeoptimizeFrame, VMOp_DeoptimizeAll, VMOp_ZombieAll, VMOp_Verify, VMOp_HeapDumper, VMOp_HeapDumpMerge, VMOp_CollectForMetadataAllocation, VMOp_CollectForCodeCacheAllocation, VMOp_GC_HeapInspection, VMOp_GenCollectFull, VMOp_GenCollectForAllocation, VMOp_ParallelGCFailedAllocation, VMOp_ParallelGCSystemGC, VMOp_G1CollectForAllocation, VMOp_G1CollectFull, VMOp_G1PauseRemark, VMOp_G1PauseCleanup, VMOp_G1TryInitiateConcMark, VMOp_ZMarkEndOld, VMOp_ZMarkEndYoung, VMOp_ZMarkFlushOperation, VMOp_ZMarkStartYoung, VMOp_ZMarkStartYoungAndOld, VMOp_ZRelocateStartOld, VMOp_ZRelocateStartYoung, VMOp_ZRendezvousGCThreads, VMOp_ZVerifyOld, VMOp_XMarkStart, VMOp_XMarkEnd, VMOp_XRelocateStart, VMOp_XVerify, VMOp_HandshakeAllThreads, VMOp_PopulateDumpSharedSpace, VMOp_JNIFunctionTableCopier, VMOp_RedefineClasses, VMOp_GetObjectMonitorUsage, VMOp_GetAllStackTraces, VMOp_GetThreadListStackTraces, VMOp_VirtualThreadGetStackTrace, VMOp_VirtualThreadGetFrameCount, VMOp_ChangeBreakpoints, VMOp_GetOrSetLocal, VMOp_VirtualThreadGetOrSetLocal, VMOp_VirtualThreadGetCurrentLocation, VMOp_ChangeSingleStep, VMOp_SetNotifyJvmtiEventsMode, VMOp_HeapWalkOperation, VMOp_HeapIterateOperation, VMOp_ReportJavaOutOfMemory, VMOp_JFRCheckpoint, VMOp_ShenandoahFullGC, VMOp_ShenandoahInitMark, VMOp_ShenandoahFinalMarkStartEvac, VMOp_ShenandoahInitUpdateRefs, VMOp_ShenandoahFinalUpdateRefs, VMOp_ShenandoahFinalRoots, VMOp_ShenandoahDegeneratedGC, VMOp_Exit, VMOp_LinuxDllLoad, VMOp_WhiteBoxOperation, VMOp_JVMCIResizeCounters, VMOp_ClassLoaderStatsOperation, VMOp_ClassLoaderHierarchyOperation, VMOp_DumpHashtable, VMOp_CleanClassLoaderDataMetaspaces, VMOp_PrintCompileQueue, VMOp_PrintClassHierarchy, VMOp_PrintClasses, VMOp_ICBufferFull, VMOp_PrintMetadata, VMOp_GTestExecuteAtSafepoint, VMOp_GTestStopSafepoint, VMOp_JFROldObject, VMOp_JvmtiPostObjectFree, VMOp_RendezvousGCThreads, + VMOp_Terminating + }; + + private: + Thread* _calling_thread; + + + static const char* _names[]; + + public: + VM_Operation() : _calling_thread(nullptr) {} + + + Thread* calling_thread() const { return _calling_thread; } + void set_calling_thread(Thread* thread); + + + void evaluate(); +# 155 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/vmOperation.hpp" + virtual void doit() = 0; + virtual bool doit_prologue() { return true; }; + virtual void doit_epilogue() {}; + + + virtual VMOp_Type type() const = 0; + virtual bool allow_nested_vm_operations() const { return false; } + + + + virtual bool skip_thread_oop_barriers() const { return false; } + + + + virtual bool evaluate_at_safepoint() const { return true; } + + + virtual void print_on_error(outputStream* st) const; + virtual const char* name() const { return _names[type()]; } + static const char* name(int type) { + ; + return _names[type]; + } + + virtual const char* cause() const { return nullptr; } + + + +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/safepoint.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/waitBarrier.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/waitBarrier.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/waitBarrier_generic.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/waitBarrier_generic.hpp" +class GenericWaitBarrier : public CHeapObj { + volatile int _barrier_tag; + + volatile int _waiters; + + + volatile int _barrier_threads; + Semaphore _sem_barrier; + + GenericWaitBarrier(GenericWaitBarrier const&) = delete; GenericWaitBarrier& operator=(GenericWaitBarrier const&) = delete; + + int wake_if_needed(); + + public: + GenericWaitBarrier() : _barrier_tag(0), _waiters(0), _barrier_threads(0), _sem_barrier(0) {} + ~GenericWaitBarrier() {} + + const char* description() { return "semaphore"; } + + void arm(int barrier_tag); + void disarm(); + void wait(int barrier_tag); +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/waitBarrier.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/os/linux/waitBarrier_linux.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/os/linux/waitBarrier_linux.hpp" +class LinuxWaitBarrier : public CHeapObj { + volatile int _futex_barrier; + + LinuxWaitBarrier(LinuxWaitBarrier const&) = delete; LinuxWaitBarrier& operator=(LinuxWaitBarrier const&) = delete; + + public: + LinuxWaitBarrier() : _futex_barrier(0) {}; + ~LinuxWaitBarrier() {}; + + const char* description() { return "futex"; } + + void arm(int barrier_tag); + void disarm(); + void wait(int barrier_tag); +}; +# 36 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/waitBarrier.hpp" 2 +typedef LinuxWaitBarrier WaitBarrierDefault; +# 81 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/waitBarrier.hpp" +template +class WaitBarrierType : public CHeapObj { + WaitBarrierImpl _impl; + + WaitBarrierType(WaitBarrierType const&) = delete; WaitBarrierType& operator=(WaitBarrierType const&) = delete; + + + + + + + public: + WaitBarrierType(Thread* owner) : _impl() { + + + + + } + ~WaitBarrierType() {} + + + const char* description() { return _impl.description(); } + + + + void arm(int barrier_tag) { + + + + + + _impl.arm(barrier_tag); + } + + + + void disarm() { + ; + _impl.disarm(); + } + + + + + + void wait(int barrier_tag) { + ; + _impl.wait(barrier_tag); + } +}; + +typedef WaitBarrierType WaitBarrier; +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/safepoint.hpp" 2 +# 49 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/safepoint.hpp" +class ThreadSafepointState; + +class SafepointStateTracker { + uint64_t _safepoint_id; + bool _at_safepoint; +public: + SafepointStateTracker(uint64_t safepoint_id, bool at_safepoint); + bool safepoint_state_changed(); +}; + + + + +class SafepointSynchronize : AllStatic { + public: + enum SynchronizeState { + _not_synchronized = 0, + _synchronizing = 1, + _synchronized = 2 + + }; + + + enum SafepointCleanupTasks { + SAFEPOINT_CLEANUP_LAZY_ROOT_PROCESSING, + SAFEPOINT_CLEANUP_UPDATE_INLINE_CACHES, + SAFEPOINT_CLEANUP_SYMBOL_TABLE_REHASH, + SAFEPOINT_CLEANUP_STRING_TABLE_REHASH, + SAFEPOINT_CLEANUP_REQUEST_OOPSTORAGE_CLEANUP, + + SAFEPOINT_CLEANUP_NUM_TASKS + }; + + private: + friend class SafepointMechanism; + friend class ThreadSafepointState; + friend class HandshakeState; + friend class SafepointStateTracker; + + + static volatile SynchronizeState _state; + + static int _waiting_to_block; + + static int _current_jni_active_count; + + + + + + static volatile uint64_t _safepoint_counter; + + + + + static uint64_t _safepoint_id; + + + + static WaitBarrier* _wait_barrier; + static julong _coalesced_vmop_count; + + + static void print_safepoint_timeout(); + + + static void arm_safepoint(); + static int synchronize_threads(jlong safepoint_limit_time, int nof_threads, int* initial_running); + static void disarm_safepoint(); + static void increment_jni_active_count(); + static void decrement_waiting_to_block(); + static bool thread_not_running(ThreadSafepointState *cur_state); + + + static bool try_stable_load_state(JavaThreadState *state, + JavaThread *thread, + uint64_t safepoint_count); + + + static void block(JavaThread *thread); + + + + static bool handshake_safe(JavaThread *thread); + + static uint64_t safepoint_counter() { return _safepoint_counter; } + +public: + + static void init(Thread* vmthread); + + + static void begin(); + static void end(); + + + static const uint64_t InactiveSafepointCounter; + + + static bool is_at_safepoint() { return _state == _synchronized; } + static bool is_synchronizing() { return _state == _synchronizing; } + + static uint64_t safepoint_id() { + return _safepoint_id; + } + + static SafepointStateTracker safepoint_state_tracker() { + return SafepointStateTracker(safepoint_id(), is_at_safepoint()); + } + + + static void handle_polling_page_exception(JavaThread *thread); + + static bool is_cleanup_needed(); + static void do_cleanup_tasks(); + + static void set_is_at_safepoint() { _state = _synchronized; } + static void set_is_not_at_safepoint() { _state = _not_synchronized; } + + + + + static address safepoint_counter_addr() { + + return (address)&_safepoint_counter; + + + + + } +}; +# 196 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/safepoint.hpp" +class ThreadSafepointState: public CHeapObj { + private: + + volatile bool _at_poll_safepoint; + JavaThread* _thread; + bool _safepoint_safe; + volatile uint64_t _safepoint_id; + + ThreadSafepointState* _next; + + void account_safe_thread(); + + public: + ThreadSafepointState(JavaThread *thread); + + + ThreadSafepointState* get_next() const { return _next; } + void set_next(ThreadSafepointState* value) { _next = value; } + ThreadSafepointState** next_ptr() { return &_next; } + + + void examine_state_of_thread(uint64_t safepoint_count); + void restart(); + + + JavaThread* thread() const { return _thread; } + bool is_running() const { return !_safepoint_safe; } + + uint64_t get_safepoint_id() const; + void reset_safepoint_id(); + void set_safepoint_id(uint64_t sid); + + + bool is_at_poll_safepoint() { return _at_poll_safepoint; } + void set_at_poll_safepoint(bool val) { _at_poll_safepoint = val; } + + void handle_polling_page_exception(); + + + void print_on(outputStream* st) const; + + + static void create(JavaThread *thread); + static void destroy(JavaThread *thread); +}; + +class SafepointTracing : public AllStatic { +private: + + static jlong _last_safepoint_begin_time_ns; + static jlong _last_safepoint_sync_time_ns; + static jlong _last_safepoint_cleanup_time_ns; + static jlong _last_safepoint_end_time_ns; + + + static jlong _last_app_time_ns; + + static int _nof_threads; + static int _nof_running; + static int _page_trap; + + static VM_Operation::VMOp_Type _current_type; + static jlong _max_sync_time; + static jlong _max_cleanup_time; + static jlong _max_vmop_time; + static uint64_t _op_count[VM_Operation::VMOp_Terminating]; + + static void statistics_log(); + +public: + static void init(); + + static void begin(VM_Operation::VMOp_Type type); + static void synchronized(int nof_threads, int nof_running, int traps); + static void cleanup(); + static void end(); + + static void statistics_exit_log(); + + static jlong time_since_last_safepoint_ms() { + return nanos_to_millis(os::javaTimeNanos() - _last_safepoint_end_time_ns); + } + + static jlong end_of_last_safepoint_ms() { + return nanos_to_millis(_last_safepoint_end_time_ns); + } + + static jlong start_of_safepoint() { + return _last_safepoint_begin_time_ns; + } +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/oopStorage.inline.hpp" 2 +# 42 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/oopStorage.inline.hpp" +class OopStorage::ActiveArray { + friend class OopStorage::TestAccess; + + size_t _size; + volatile size_t _block_count; + mutable volatile int _refcount; + + + ActiveArray(size_t size); + ~ActiveArray(); + + ActiveArray(ActiveArray const&) = delete; ActiveArray& operator=(ActiveArray const&) = delete; + + static size_t blocks_offset(); + Block* const* base_ptr() const; + + Block* const* block_ptr(size_t index) const; + Block** block_ptr(size_t index); + +public: + static ActiveArray* create(size_t size, + MEMFLAGS memflags = mtGC, + AllocFailType alloc_fail = AllocFailStrategy::EXIT_OOM); + static void destroy(ActiveArray* ba); + + inline Block* at(size_t i) const; + + size_t size() const; + size_t block_count() const; + size_t block_count_acquire() const; + void increment_refcount() const; + bool decrement_refcount() const; + + + + + + + bool push(Block* block); + + + + + void remove(Block* block); + + void copy_from(const ActiveArray* from); +}; + +inline size_t OopStorage::ActiveArray::blocks_offset() { + return align_up(sizeof(ActiveArray), sizeof(Block*)); +} + +inline OopStorage::Block* const* OopStorage::ActiveArray::base_ptr() const { + const void* ptr = reinterpret_cast(this) + blocks_offset(); + return reinterpret_cast(ptr); +} + +inline OopStorage::Block* const* OopStorage::ActiveArray::block_ptr(size_t index) const { + return base_ptr() + index; +} + +inline OopStorage::Block** OopStorage::ActiveArray::block_ptr(size_t index) { + return const_cast(base_ptr() + index); +} + +inline OopStorage::Block* OopStorage::ActiveArray::at(size_t index) const { + ; + return *block_ptr(index); +} + + + +class OopStorage::AllocationListEntry { + friend class OopStorage::AllocationList; + + + + + mutable const Block* _prev; + mutable const Block* _next; + + AllocationListEntry(AllocationListEntry const&) = delete; AllocationListEntry& operator=(AllocationListEntry const&) = delete; + +public: + AllocationListEntry(); + ~AllocationListEntry(); +}; + + + + + +class OopStorage::Block { + + oop _data[BitsPerWord]; + static const unsigned _data_pos = 0; + + volatile uintx _allocated_bitmask; + intptr_t _owner_address; + void* _memory; + size_t _active_index; + AllocationListEntry _allocation_list_entry; + Block* volatile _deferred_updates_next; + volatile uintx _release_refcount; + + Block(const OopStorage* owner, void* memory); + ~Block(); + + void check_index(unsigned index) const; + unsigned get_index(const oop* ptr) const; + void atomic_add_allocated(uintx add); + + template + static bool iterate_impl(F f, BlockPtr b); + + Block(Block const&) = delete; Block& operator=(Block const&) = delete; + +public: + const AllocationListEntry& allocation_list_entry() const; + + static size_t allocation_size(); + static size_t allocation_alignment_shift(); + + oop* get_pointer(unsigned index); + const oop* get_pointer(unsigned index) const; + + uintx bitmask_for_index(unsigned index) const; + uintx bitmask_for_entry(const oop* ptr) const; + + + bool is_full() const; + bool is_empty() const; + uintx allocated_bitmask() const; + + bool is_safe_to_delete() const; + + Block* deferred_updates_next() const; + void set_deferred_updates_next(Block* new_next); + + bool contains(const oop* ptr) const; + + size_t active_index() const; + void set_active_index(size_t index); + static size_t active_index_safe(const Block* block); + + + static Block* block_for_ptr(const OopStorage* owner, const oop* ptr); + + oop* allocate(); + uintx allocate_all(); + static Block* new_block(const OopStorage* owner); + static void delete_block(const Block& block); + + void release_entries(uintx releasing, OopStorage* owner); + + template bool iterate(F f); + template bool iterate(F f) const; +}; + +inline OopStorage::Block* OopStorage::AllocationList::head() { + return const_cast(_head); +} + +inline OopStorage::Block* OopStorage::AllocationList::tail() { + return const_cast(_tail); +} + +inline const OopStorage::Block* OopStorage::AllocationList::chead() const { + return _head; +} + +inline const OopStorage::Block* OopStorage::AllocationList::ctail() const { + return _tail; +} + +inline OopStorage::Block* OopStorage::AllocationList::prev(Block& block) { + return const_cast(block.allocation_list_entry()._prev); +} + +inline OopStorage::Block* OopStorage::AllocationList::next(Block& block) { + return const_cast(block.allocation_list_entry()._next); +} + +inline const OopStorage::Block* OopStorage::AllocationList::prev(const Block& block) const { + return block.allocation_list_entry()._prev; +} + +inline const OopStorage::Block* OopStorage::AllocationList::next(const Block& block) const { + return block.allocation_list_entry()._next; +} + +template +class OopStorage::OopFn { +public: + explicit OopFn(Closure* cl) : _cl(cl) {} + + template + bool operator()(OopPtr ptr) const { + _cl->do_oop(ptr); + return true; + } + +private: + Closure* _cl; +}; + +template +inline OopStorage::OopFn OopStorage::oop_fn(Closure* cl) { + return OopFn(cl); +} + +template +class OopStorage::IfAliveFn { +public: + IfAliveFn(IsAlive* is_alive, F f) : _is_alive(is_alive), _f(f) {} + + bool operator()(oop* ptr) const { + bool result = true; + oop v = *ptr; + if (v != nullptr) { + if (_is_alive->do_object_b(v)) { + result = _f(ptr); + } else { + *ptr = nullptr; + } + } + return result; + } + +private: + IsAlive* _is_alive; + F _f; +}; + +template +inline OopStorage::IfAliveFn OopStorage::if_alive_fn(IsAlive* is_alive, F f) { + return IfAliveFn(is_alive, f); +} + +template +class OopStorage::SkipNullFn { +public: + SkipNullFn(F f) : _f(f) {} + + template + bool operator()(OopPtr ptr) const { + return (*ptr != nullptr) ? _f(ptr) : true; + } + +private: + F _f; +}; + +template +inline OopStorage::SkipNullFn OopStorage::skip_null_fn(F f) { + return SkipNullFn(f); +} + + + +inline const OopStorage::AllocationListEntry& OopStorage::Block::allocation_list_entry() const { + return _allocation_list_entry; +} + +inline void OopStorage::Block::check_index(unsigned index) const { + ; +} + +inline oop* OopStorage::Block::get_pointer(unsigned index) { + check_index(index); + return &_data[index]; +} + +inline const oop* OopStorage::Block::get_pointer(unsigned index) const { + check_index(index); + return &_data[index]; +} + +inline uintx OopStorage::Block::allocated_bitmask() const { + return _allocated_bitmask; +} + +inline uintx OopStorage::Block::bitmask_for_index(unsigned index) const { + check_index(index); + return uintx(1) << index; +} + + + +template +inline bool OopStorage::Block::iterate_impl(F f, BlockPtr block) { + uintx bitmask = block->allocated_bitmask(); + while (bitmask != 0) { + unsigned index = count_trailing_zeros(bitmask); + bitmask ^= block->bitmask_for_index(index); + if (!f(block->get_pointer(index))) { + return false; + } + } + return true; +} + +template +inline bool OopStorage::Block::iterate(F f) { + return iterate_impl(f, this); +} + +template +inline bool OopStorage::Block::iterate(F f) const { + return iterate_impl(f, this); +} + + + + + + +template +inline bool OopStorage::iterate_impl(F f, Storage* storage) { + ; + + + using BlockPtr = std::conditional_t::value, const Block*, Block*>; + ActiveArray* blocks = storage->_active_array; + size_t limit = blocks->block_count(); + for (size_t i = 0; i < limit; ++i) { + BlockPtr block = blocks->at(i); + if (!block->iterate(f)) { + return false; + } + } + return true; +} + +template +inline bool OopStorage::iterate_safepoint(F f) { + return iterate_impl(f, this); +} + +template +inline bool OopStorage::iterate_safepoint(F f) const { + return iterate_impl(f, this); +} + +template +inline void OopStorage::oops_do(Closure* cl) { + iterate_safepoint(oop_fn(cl)); +} + +template +inline void OopStorage::oops_do(Closure* cl) const { + iterate_safepoint(oop_fn(cl)); +} + +template +inline void OopStorage::weak_oops_do(Closure* cl) { + iterate_safepoint(skip_null_fn(oop_fn(cl))); +} + +template +inline void OopStorage::weak_oops_do(IsAliveClosure* is_alive, Closure* cl) { + iterate_safepoint(if_alive_fn(is_alive, oop_fn(cl))); +} +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/oops/oopHandle.inline.hpp" 2 + +inline oop OopHandle::resolve() const { + return (_obj == nullptr) ? (oop)nullptr : NativeAccess<>::oop_load(_obj); +} + +inline oop OopHandle::peek() const { + return (_obj == nullptr) ? (oop)nullptr : NativeAccess::oop_load(_obj); +} + +inline OopHandle::OopHandle(OopStorage* storage, oop obj) : + _obj(storage->allocate()) { + if (_obj == nullptr) { + do { report_vm_out_of_memory("src/hotspot/share/oops/oopHandle.inline.hpp", 44, sizeof(oop), OOM_MALLOC_ERROR, "Cannot create oop handle"); } while (0) + ; + } + NativeAccess<>::oop_store(_obj, obj); +} + +inline void OopHandle::release(OopStorage* storage) { + if (_obj != nullptr) { + + NativeAccess<>::oop_store(_obj, nullptr); + storage->release(_obj); + } +} + +inline void OopHandle::replace(oop obj) { + oop* ptr = ptr_raw(); + ; + NativeAccess<>::oop_store(ptr, obj); +} + +inline oop OopHandle::xchg(oop new_value) { + return NativeAccess::oop_atomic_xchg(_obj, new_value); +} +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoaderData.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/weakHandle.inline.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/oops/weakHandle.inline.hpp" +inline oop WeakHandle::resolve() const { + ; + return NativeAccess::oop_load(_obj); +} + +inline oop WeakHandle::peek() const { + ; + return NativeAccess::oop_load(_obj); +} + +inline void WeakHandle::replace(oop with_obj) { + NativeAccess::oop_store(_obj, with_obj); +} +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/classLoaderData.inline.hpp" 2 + +inline void ClassLoaderData::set_next(ClassLoaderData* next) { + ; + Atomic::store(&_next, next); +} + +inline ClassLoaderData* ClassLoaderData::next() const { + return Atomic::load(&_next); +} + +inline void ClassLoaderData::unlink_next() { + ; + Atomic::store(&_next, _next->_next); +} + +inline void ClassLoaderData::set_unloading_next(ClassLoaderData* unloading_next) { + ; + _unloading_next = unloading_next; +} + +inline ClassLoaderData* ClassLoaderData::unloading_next() const { + return _unloading_next; +} + +inline oop ClassLoaderData::class_loader() const { + ; + ; + return _class_loader.resolve(); +} + +inline oop ClassLoaderData::class_loader_no_keepalive() const { + ; + ; + return _class_loader.peek(); +} + +inline bool ClassLoaderData::is_boot_class_loader_data() const { + return this == _the_null_class_loader_data || class_loader() == nullptr; +} + +inline ClassLoaderData* ClassLoaderData::class_loader_data_or_null(oop loader) { + if (loader == nullptr) { + return ClassLoaderData::the_null_class_loader_data(); + } + return java_lang_ClassLoader::loader_data_acquire(loader); +} + +inline ClassLoaderData* ClassLoaderData::class_loader_data(oop loader) { + ClassLoaderData* loader_data = class_loader_data_or_null(loader); + ; + return loader_data; +} +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klassVtable.hpp" 1 +# 41 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klassVtable.hpp" +class vtableEntry; + +class klassVtable { + Klass* _klass; + int _tableOffset; + int _length; + + + + + void check_constraints(GrowableArray* supers, JavaThread* __the_thread__); + + public: + klassVtable(Klass* klass, void* base, int length) : _klass(klass) { + _tableOffset = int((address)base - (address)klass); + _length = length; + } + + + vtableEntry* table() const { return (vtableEntry*)(address(_klass) + _tableOffset); } + Klass* klass() const { return _klass; } + int length() const { return _length; } + inline Method* method_at(int i) const; + inline Method* unchecked_method_at(int i) const; + + + int index_of_miranda(Symbol* name, Symbol* signature); + + + void initialize_vtable(GrowableArray* supers = nullptr); + void initialize_vtable_and_check_constraints(JavaThread* __the_thread__); + + + static void compute_vtable_size_and_num_mirandas(int* vtable_length, + int* num_new_mirandas, + GrowableArray* all_mirandas, + const Klass* super, + Array* methods, + AccessFlags class_flags, + u2 major_version, + Handle classloader, + Symbol* classname, + Array* local_interfaces); +# 92 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klassVtable.hpp" + bool adjust_default_method(int vtable_index, Method* old_method, Method* new_method); + void adjust_method_entries(bool* trace_name_printed); + bool check_no_old_or_obsolete_entries(); + void dump_vtable(); + + + + void print() {}; + void verify(outputStream* st, bool force = false); + + protected: + friend class vtableEntry; + + public: + + + + enum { VTABLE_TRANSITIVE_OVERRIDE_VERSION = 51 } ; + + private: + void copy_vtable_to(vtableEntry* start); + int initialize_from_super(Klass* super); + void put_method_at(Method* m, int index); + static bool needs_new_vtable_entry(Method* m, + const Klass* super, + Handle classloader, + Symbol* classname, + AccessFlags access_flags, + u2 major_version); + + bool update_inherited_vtable(Thread* current, + const methodHandle& target_method, + int super_vtable_len, + int default_index, + GrowableArray* supers); + InstanceKlass* find_transitive_override(InstanceKlass* initialsuper, + const methodHandle& target_method, int vtable_index, + Handle target_loader, Symbol* target_classname); + + + bool is_miranda_entry_at(int i); + int fill_in_mirandas(Thread* current, int initialized); + static bool is_miranda(Method* m, Array* class_methods, + Array* default_methods, const Klass* super, + bool is_interface); + static void add_new_mirandas_to_lists( + GrowableArray* new_mirandas, + GrowableArray* all_mirandas, + Array* current_interface_methods, + Array* class_methods, + Array* default_methods, + const Klass* super, + bool is_interface); + static void get_mirandas( + GrowableArray* new_mirandas, + GrowableArray* all_mirandas, + const Klass* super, + Array* class_methods, + Array* default_methods, + Array* local_interfaces, + bool is_interface); + void verify_against(outputStream* st, klassVtable* vt, int index); + inline InstanceKlass* ik() const; +# 167 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klassVtable.hpp" + bool is_preinitialized_vtable(); +}; +# 179 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klassVtable.hpp" +class vtableEntry { + friend class VMStructs; + friend class JVMCIVMStructs; + + public: + + static int size() { return sizeof(vtableEntry) / wordSize; } + static int size_in_bytes() { return sizeof(vtableEntry); } + + static ByteSize method_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (vtableEntry)]; vtableEntry* dummyObj = (vtableEntry*)space; char* c = (char*)(void*)&dummyObj->_method; return (size_t)(c - space); }())); } + Method* method() const { return _method; } + Method** method_addr() { return &_method; } + + private: + Method* _method; + void set(Method* method) { ; _method = method; } + void clear() { _method = nullptr; } + void print() {}; + void verify(klassVtable* vt, outputStream* st); + + friend class klassVtable; +}; + + +inline Method* klassVtable::method_at(int i) const { + ; + ; + ; + return table()[i].method(); +} + +inline Method* klassVtable::unchecked_method_at(int i) const { + ; + return table()[i].method(); +} + + +class klassItable; +class itableMethodEntry; + +class itableOffsetEntry { + private: + InstanceKlass* _interface; + int _offset; + public: + InstanceKlass* interface_klass() const { return _interface; } + InstanceKlass**interface_klass_addr() { return &_interface; } + int offset() const { return _offset; } + + static itableMethodEntry* method_entry(Klass* k, int offset) { return (itableMethodEntry*)(((address)k) + offset); } + itableMethodEntry* first_method_entry(Klass* k) { return method_entry(k, _offset); } + + void initialize(InstanceKlass* interf, int offset) { _interface = interf; _offset = offset; } + + + static int size() { return sizeof(itableOffsetEntry) / wordSize; } + static ByteSize interface_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (itableOffsetEntry)]; itableOffsetEntry* dummyObj = (itableOffsetEntry*)space; char* c = (char*)(void*)&dummyObj->_interface; return (size_t)(c - space); }())); } + static ByteSize offset_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (itableOffsetEntry)]; itableOffsetEntry* dummyObj = (itableOffsetEntry*)space; char* c = (char*)(void*)&dummyObj->_offset; return (size_t)(c - space); }())); } + + friend class klassItable; +}; + + +class itableMethodEntry { + private: + Method* _method; + + public: + Method* method() const { return _method; } + Method**method_addr() { return &_method; } + + void clear() { _method = nullptr; } + + void initialize(InstanceKlass* klass, Method* method); + + + static int size() { return sizeof(itableMethodEntry) / wordSize; } + static ByteSize method_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (itableMethodEntry)]; itableMethodEntry* dummyObj = (itableMethodEntry*)space; char* c = (char*)(void*)&dummyObj->_method; return (size_t)(c - space); }())); } + + friend class klassItable; +}; +# 279 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klassVtable.hpp" +class klassItable { + private: + InstanceKlass* _klass; + int _table_offset; + int _size_offset_table; + int _size_method_table; + + void initialize_itable_for_interface(int method_table_offset, InstanceKlass* interf_h, + GrowableArray* supers, int start_offset); + void check_constraints(GrowableArray* supers, JavaThread* __the_thread__); + public: + klassItable(InstanceKlass* klass); + + itableOffsetEntry* offset_entry(int i) { ; + return &((itableOffsetEntry*)vtable_start())[i]; } + + itableMethodEntry* method_entry(int i) { ; + return &((itableMethodEntry*)method_start())[i]; } + + int size_offset_table() { return _size_offset_table; } + + + void initialize_itable_and_check_constraints(JavaThread* __the_thread__); + void initialize_itable(GrowableArray* supers = nullptr); +# 311 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klassVtable.hpp" + void adjust_method_entries(bool* trace_name_printed); + bool check_no_old_or_obsolete_entries(); + void dump_itable(); + + + + static int assign_itable_indices_for_interface(InstanceKlass* klass); + static int method_count_for_interface(InstanceKlass* klass); + static int compute_itable_size(Array* transitive_interfaces); + static void setup_itable_offset_table(InstanceKlass* klass); + + private: + intptr_t* vtable_start() const { return ((intptr_t*)_klass) + _table_offset; } + intptr_t* method_start() const { return vtable_start() + _size_offset_table * itableOffsetEntry::size(); } + + + static int calc_itable_size(int num_interfaces, int num_methods) { return (num_interfaces * itableOffsetEntry::size()) + (num_methods * itableMethodEntry::size()); } + +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.inline.hpp" 2 + + + +inline oop Klass::klass_holder() const { + return class_loader_data()->holder(); +} + +inline bool Klass::is_non_strong_hidden() const { + return access_flags().is_hidden_class() && + class_loader_data()->has_class_mirror_holder(); +} +# 51 "/home/rehn/source/jdk/open/src/hotspot/share/oops/klass.inline.hpp" +inline bool Klass::is_loader_alive() const { + return class_loader_data()->is_alive(); +} + +inline oop Klass::java_mirror() const { + return _java_mirror.resolve(); +} + +inline klassVtable Klass::vtable() const { + return klassVtable(const_cast(this), start_of_vtable(), vtable_length() / vtableEntry::size()); +} + +inline oop Klass::class_loader() const { + return class_loader_data()->class_loader(); +} + +inline vtableEntry* Klass::start_of_vtable() const { + return (vtableEntry*) ((address)this + in_bytes(vtable_start_offset())); +} + +inline ByteSize Klass::vtable_start_offset() { + return in_ByteSize(InstanceKlass::header_size() * wordSize); +} +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.inline.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/devirtualizer.inline.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/devirtualizer.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/devirtualizer.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/devirtualizer.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/bitMap.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/bitMap.hpp" +class BitMapClosure; +# 48 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/bitMap.hpp" +class BitMap { + friend class BitMap2D; + + public: + typedef size_t idx_t; + typedef uintptr_t bm_word_t; + + + static_assert(((sizeof(bm_word_t) * BitsPerByte) == BitsPerWord), "(sizeof(bm_word_t) * BitsPerByte) == BitsPerWord"); + + + typedef enum { + unknown_range, small_range, large_range + } RangeSizeHint; + + private: + bm_word_t* _map; + idx_t _size; + + protected: + + + static idx_t max_size_in_words() { return raw_to_words_align_down(~idx_t(0)); } + static idx_t max_size_in_bits() { return max_size_in_words() * BitsPerWord; } + + + static idx_t raw_to_words_align_up(idx_t bit) { + return raw_to_words_align_down(bit + (BitsPerWord - 1)); + } + + + static idx_t raw_to_words_align_down(idx_t bit) { + return bit >> LogBitsPerWord; + } + + + + idx_t to_words_align_up(idx_t bit) const { + verify_limit(bit); + return raw_to_words_align_up(bit); + } + + + + inline idx_t to_words_align_down(idx_t bit) const { + verify_limit(bit); + return raw_to_words_align_down(bit); + } + + + + + + + template + inline idx_t find_first_bit_impl(idx_t beg, idx_t end) const; + + + + + + + template + inline idx_t find_last_bit_impl(idx_t beg, idx_t end) const; + + + static const bm_word_t find_ones_flip = 0; + static const bm_word_t find_zeros_flip = ~(bm_word_t)0; + + template struct IterateInvoker; + + struct IteratorImpl; + + + + static const size_t small_range_words = 32; + + static bool is_small_range_of_words(idx_t beg_full_word, idx_t end_full_word); + + + + static idx_t bit_in_word(idx_t bit) { return bit & (BitsPerWord - 1); } + + + + static bm_word_t bit_mask(idx_t bit) { return (bm_word_t)1 << bit_in_word(bit); } + + + static idx_t bit_index(idx_t word) { return word << LogBitsPerWord; } + + + bm_word_t* map() { return _map; } + const bm_word_t* map() const { return _map; } + + + bm_word_t* word_addr(idx_t bit) { + return map() + to_words_align_down(bit); + } + const bm_word_t* word_addr(idx_t bit) const { + return map() + to_words_align_down(bit); + } + + + bm_word_t flipped_word(idx_t word, bm_word_t flip) const { + return _map[word] ^ flip; + } + + + void set_word (idx_t word, bm_word_t val) { _map[word] = val; } + void set_word (idx_t word) { set_word(word, ~(bm_word_t)0); } + void clear_word(idx_t word) { _map[word] = 0; } + + static inline bm_word_t load_word_ordered(const volatile bm_word_t* const addr, atomic_memory_order memory_order); + + + + + bm_word_t inverted_bit_mask_for_range(idx_t beg, idx_t end) const; + void set_range_within_word (idx_t beg, idx_t end); + void clear_range_within_word (idx_t beg, idx_t end); + void par_put_range_within_word (idx_t beg, idx_t end, bool value); + + + void set_range_of_words (idx_t beg, idx_t end); + void clear_range_of_words (idx_t beg, idx_t end); + void set_large_range_of_words (idx_t beg, idx_t end); + void clear_large_range_of_words (idx_t beg, idx_t end); + + static void clear_range_of_words(bm_word_t* map, idx_t beg, idx_t end); + + idx_t count_one_bits_within_word(idx_t beg, idx_t end) const; + idx_t count_one_bits_in_range_of_words(idx_t beg_full_word, idx_t end_full_word) const; + + + void update(bm_word_t* map, idx_t size) { + _map = map; + _size = size; + } + + + BitMap(bm_word_t* map, idx_t size_in_bits) : _map(map), _size(size_in_bits) { + verify_size(size_in_bits); + } + ~BitMap() {} + + public: + + void pretouch(); + + + static idx_t calc_size_in_words(size_t size_in_bits) { + verify_size(size_in_bits); + return raw_to_words_align_up(size_in_bits); + } + + idx_t size() const { return _size; } + idx_t size_in_words() const { return calc_size_in_words(size()); } + idx_t size_in_bytes() const { return size_in_words() * BytesPerWord; } + + bool at(idx_t index) const { + verify_index(index); + return (*word_addr(index) & bit_mask(index)) != 0; + } + + + bool par_at(idx_t index, atomic_memory_order memory_order = memory_order_acquire) const; + + + inline void set_bit(idx_t bit); + inline void clear_bit(idx_t bit); + + + + + + + + inline bool par_set_bit(idx_t bit, atomic_memory_order memory_order = memory_order_conservative); + inline bool par_clear_bit(idx_t bit, atomic_memory_order memory_order = memory_order_conservative); + + + + + + void at_put(idx_t bit, bool value); + bool par_at_put(idx_t bit, bool value); + + + void set_range (idx_t beg, idx_t end); + void clear_range (idx_t beg, idx_t end); + void set_large_range (idx_t beg, idx_t end); + void clear_large_range (idx_t beg, idx_t end); + void at_put_range(idx_t beg, idx_t end, bool value); + void par_at_put_range(idx_t beg, idx_t end, bool value); + void at_put_large_range(idx_t beg, idx_t end, bool value); + void par_at_put_large_range(idx_t beg, idx_t end, bool value); + + + + + void set_range(idx_t beg, idx_t end, RangeSizeHint hint); + void clear_range(idx_t beg, idx_t end, RangeSizeHint hint); + void par_set_range(idx_t beg, idx_t end, RangeSizeHint hint); + void par_clear_range (idx_t beg, idx_t end, RangeSizeHint hint); + + + void clear_large(); + inline void clear(); + + + + + static void verify_size(idx_t size_in_bits) {}; + + void verify_index(idx_t bit) const {}; + + void verify_limit(idx_t bit) const {}; + + void verify_range(idx_t beg, idx_t end) const {}; +# 287 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/bitMap.hpp" + template + bool iterate(Function function, idx_t beg, idx_t end) const; + + template + bool iterate(BitMapClosureType* cl, idx_t beg, idx_t end) const; + + template + bool iterate(Function function) const { + return iterate(function, 0, size()); + } + + template + bool iterate(BitMapClosureType* cl) const { + return iterate(cl, 0, size()); + } + + template + bool reverse_iterate(Function function, idx_t beg, idx_t end) const; + + template + bool reverse_iterate(BitMapClosureType* cl, idx_t beg, idx_t end) const; + + template + bool reverse_iterate(Function function) const { + return reverse_iterate(function, 0, size()); + } + + template + bool reverse_iterate(BitMapClosureType* cl) const { + return reverse_iterate(cl, 0, size()); + } + + class Iterator; + class ReverseIterator; + class RBFIterator; + class ReverseRBFIterator; + + + + + idx_t find_first_set_bit(idx_t beg, idx_t end) const; + idx_t find_first_clear_bit(idx_t beg, idx_t end) const; + + idx_t find_first_set_bit(idx_t beg) const { + return find_first_set_bit(beg, size()); + } + idx_t find_first_clear_bit(idx_t beg) const { + return find_first_clear_bit(beg, size()); + } + + + + idx_t find_first_set_bit_aligned_right(idx_t beg, idx_t end) const; + + + + + idx_t find_last_set_bit(idx_t beg, idx_t end) const; + idx_t find_last_clear_bit(idx_t beg, idx_t end) const; + + idx_t find_last_set_bit(idx_t beg) const { + return find_last_set_bit(beg, size()); + } + idx_t find_last_clear_bit(idx_t beg) const { + return find_last_clear_bit(beg, size()); + } + + + + idx_t find_last_set_bit_aligned_left(idx_t beg, idx_t end) const; + + + idx_t count_one_bits() const; + + + idx_t count_one_bits(idx_t beg, idx_t end) const; + + + void set_union(const BitMap& bits); + void set_difference(const BitMap& bits); + void set_intersection(const BitMap& bits); + + bool contains(const BitMap& bits) const; + + bool intersects(const BitMap& bits) const; + + + + bool set_union_with_result(const BitMap& bits); + bool set_difference_with_result(const BitMap& bits); + bool set_intersection_with_result(const BitMap& bits); + + void set_from(const BitMap& bits); + + bool is_same(const BitMap& bits) const; + + + bool is_full() const; + bool is_empty() const; + + void write_to(bm_word_t* buffer, size_t buffer_size_in_bytes) const; + void print_on_error(outputStream* st, const char* prefix) const; + + + + + + +}; + + + + + +struct BitMap::IteratorImpl { + const BitMap* _map; + idx_t _cur_beg; + idx_t _cur_end; + + void assert_not_empty() const {}; + + + IteratorImpl(); + + + + + + + + IteratorImpl(const BitMap* map, idx_t beg, idx_t end); + + + bool is_empty() const; + + + + + idx_t first() const; + + + + + idx_t last() const; + + + + + + + void step_first(); + + + + + + + void step_last(); +}; + + + +class BitMap::Iterator { + IteratorImpl _impl; + +public: + + Iterator(); + + + explicit Iterator(const BitMap& map); + + + + + + + Iterator(const BitMap& map, idx_t beg, idx_t end); + + + bool is_empty() const; + + + + idx_t index() const; + + + + + + + void step(); + + + RBFIterator begin() const; + RBFIterator end() const; +}; + + + +class BitMap::ReverseIterator { + IteratorImpl _impl; + + static idx_t initial_end(const BitMap& map, idx_t beg, idx_t end); + +public: + + ReverseIterator(); + + + explicit ReverseIterator(const BitMap& map); + + + + + + + ReverseIterator(const BitMap& map, idx_t beg, idx_t end); + + + bool is_empty() const; + + + + idx_t index() const; + + + + + + + void step(); + + + ReverseRBFIterator begin() const; + ReverseRBFIterator end() const; +}; + + + + +class BitMap::RBFIterator { + friend class Iterator; + + IteratorImpl _impl; + + RBFIterator(const BitMap* map, idx_t beg, idx_t end); + +public: + bool operator!=(const RBFIterator& i) const; + idx_t operator*() const; + RBFIterator& operator++(); +}; + + + + + +class BitMap::ReverseRBFIterator { + friend class ReverseIterator; + + IteratorImpl _impl; + + ReverseRBFIterator(const BitMap* map, idx_t beg, idx_t end); + +public: + bool operator!=(const ReverseRBFIterator& i) const; + idx_t operator*() const; + ReverseRBFIterator& operator++(); +}; + + + + + + +template +class GrowableBitMap : public BitMap { + protected: + GrowableBitMap() : GrowableBitMap(nullptr, 0) {} + GrowableBitMap(bm_word_t* map, idx_t size_in_bits) : BitMap(map, size_in_bits) {} + + public: + + + + + void initialize(idx_t size_in_bits, bool clear = true); + + + + + void reinitialize(idx_t new_size_in_bits, bool clear = true); + + + + + + + + void resize(idx_t new_size_in_bits, bool clear = true); +}; + + + + +class BitMapView : public BitMap { + public: + BitMapView() : BitMapView(nullptr, 0) {} + BitMapView(bm_word_t* map, idx_t size_in_bits) : BitMap(map, size_in_bits) {} +}; + + +class ArenaBitMap : public GrowableBitMap { + Arena* const _arena; + + ArenaBitMap(ArenaBitMap const&) = delete; ArenaBitMap& operator=(ArenaBitMap const&) = delete; + + public: + ArenaBitMap(Arena* arena, idx_t size_in_bits, bool clear = true); + + bm_word_t* allocate(idx_t size_in_words) const; + bm_word_t* reallocate(bm_word_t* old_map, size_t old_size_in_words, size_t new_size_in_words) const; + void free(bm_word_t* map, idx_t size_in_words) const { + + } +}; + + +class ResourceBitMap : public GrowableBitMap { + public: + ResourceBitMap() : ResourceBitMap(0) {} + explicit ResourceBitMap(idx_t size_in_bits, bool clear = true); + + bm_word_t* allocate(idx_t size_in_words) const; + bm_word_t* reallocate(bm_word_t* old_map, size_t old_size_in_words, size_t new_size_in_words) const; + void free(bm_word_t* map, idx_t size_in_words) const { + + } +}; + + +class CHeapBitMap : public GrowableBitMap { + + const MEMFLAGS _flags; + + + + CHeapBitMap(CHeapBitMap const&) = delete; CHeapBitMap& operator=(CHeapBitMap const&) = delete; + + public: + explicit CHeapBitMap(MEMFLAGS flags) : GrowableBitMap(0, false), _flags(flags) {} + CHeapBitMap(idx_t size_in_bits, MEMFLAGS flags, bool clear = true); + ~CHeapBitMap(); + + bm_word_t* allocate(idx_t size_in_words) const; + bm_word_t* reallocate(bm_word_t* old_map, size_t old_size_in_words, size_t new_size_in_words) const; + void free(bm_word_t* map, idx_t size_in_words) const; +}; + + +class BitMap2D { + public: + typedef BitMap::idx_t idx_t; + typedef BitMap::bm_word_t bm_word_t; + + private: + ResourceBitMap _map; + idx_t _bits_per_slot; + + idx_t bit_index(idx_t slot_index, idx_t bit_within_slot_index) const { + return slot_index * _bits_per_slot + bit_within_slot_index; + } + + void verify_bit_within_slot_index(idx_t index) const { + ; + } + + public: + + BitMap2D(idx_t bits_per_slot) : + _map(), _bits_per_slot(bits_per_slot) {} + + + BitMap2D(idx_t size_in_slots, idx_t bits_per_slot) : + _map(size_in_slots * bits_per_slot), _bits_per_slot(bits_per_slot) {} + + idx_t size_in_bits() { + return _map.size(); + } + + bool is_valid_index(idx_t slot_index, idx_t bit_within_slot_index); + bool at(idx_t slot_index, idx_t bit_within_slot_index) const; + void set_bit(idx_t slot_index, idx_t bit_within_slot_index); + void clear_bit(idx_t slot_index, idx_t bit_within_slot_index); + void at_put(idx_t slot_index, idx_t bit_within_slot_index, bool value); + void at_put_grow(idx_t slot_index, idx_t bit_within_slot_index, bool value); +}; + + + +class BitMapClosure { + public: + + + virtual bool do_bit(BitMap::idx_t index) = 0; +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/devirtualizer.hpp" 2 + +class ClassLoaderData; + + + +class Devirtualizer { + public: + template static void do_oop(OopClosureType* closure, T* p); + template static void do_klass(OopClosureType* closure, Klass* k); + template static void do_cld(OopClosureType* closure, ClassLoaderData* cld); + template static bool do_metadata(OopClosureType* closure); + template static void do_derived_oop(DerivedOopClosureType* closure, derived_base* base, derived_pointer* derived); + template static bool do_bit(BitMapClosureType* closure, BitMap::idx_t index); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/devirtualizer.inline.hpp" 2 +# 77 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/devirtualizer.inline.hpp" +template +static typename EnableIf::value, void>::type +call_do_oop(void (Receiver::*)(T*), void (Base::*)(T*), OopClosureType* closure, T* p) { + closure->do_oop(p); +} + +template +static typename EnableIf::value, void>::type +call_do_oop(void (Receiver::*)(T*), void (Base::*)(T*), OopClosureType* closure, T* p) { + + static_assert(((!std::is_same::value)), "(!std::is_same::value)"); + closure->OopClosureType::do_oop(p); +} + +template +inline void Devirtualizer::do_oop(OopClosureType* closure, T* p) { + call_do_oop(&OopClosureType::do_oop, &OopClosure::do_oop, closure, p); +} + + + +template +static typename EnableIf::value, bool>::type +call_do_metadata(bool (Receiver::*)(), bool (Base::*)(), OopClosureType* closure) { + return closure->do_metadata(); +} + +template +static typename EnableIf::value, bool>::type +call_do_metadata(bool (Receiver::*)(), bool (Base::*)(), OopClosureType* closure) { + return closure->OopClosureType::do_metadata(); +} + +template +inline bool Devirtualizer::do_metadata(OopClosureType* closure) { + return call_do_metadata(&OopClosureType::do_metadata, &OopIterateClosure::do_metadata, closure); +} + + + +template +static typename EnableIf::value, void>::type +call_do_klass(void (Receiver::*)(Klass*), void (Base::*)(Klass*), OopClosureType* closure, Klass* k) { + closure->do_klass(k); +} + +template +static typename EnableIf::value, void>::type +call_do_klass(void (Receiver::*)(Klass*), void (Base::*)(Klass*), OopClosureType* closure, Klass* k) { + closure->OopClosureType::do_klass(k); +} + +template +inline void Devirtualizer::do_klass(OopClosureType* closure, Klass* k) { + call_do_klass(&OopClosureType::do_klass, &OopIterateClosure::do_klass, closure, k); +} + + + +template +static typename EnableIf::value, void>::type +call_do_cld(void (Receiver::*)(ClassLoaderData*), void (Base::*)(ClassLoaderData*), OopClosureType* closure, ClassLoaderData* cld) { + closure->do_cld(cld); +} + +template +static typename EnableIf::value, void>::type +call_do_cld(void (Receiver::*)(ClassLoaderData*), void (Base::*)(ClassLoaderData*), OopClosureType* closure, ClassLoaderData* cld) { + closure->OopClosureType::do_cld(cld); +} + +template +void Devirtualizer::do_cld(OopClosureType* closure, ClassLoaderData* cld) { + call_do_cld(&OopClosureType::do_cld, &OopIterateClosure::do_cld, closure, cld); +} + + + +template +static typename EnableIf::value, void>::type +call_do_derived_oop(void (Receiver::*)(derived_base*, derived_pointer*), void (Base::*)(derived_base*, derived_pointer*), DerivedOopClosureType* closure, derived_base* base, derived_pointer* derived) { + closure->do_derived_oop(base, derived); +} + +template +static typename EnableIf::value, void>::type +call_do_derived_oop(void (Receiver::*)(derived_base*, derived_pointer*), void (Base::*)(derived_base*, derived_pointer*), DerivedOopClosureType* closure, derived_base* base, derived_pointer* derived) { + closure->DerivedOopClosureType::do_derived_oop(base, derived); +} + +template +inline void Devirtualizer::do_derived_oop(DerivedOopClosureType* closure, derived_base* base, derived_pointer* derived) { + call_do_derived_oop(&DerivedOopClosureType::do_derived_oop, &DerivedOopClosure::do_derived_oop, closure, base, derived); +} +# 36 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceKlass.inline.hpp" 2 + + +inline intptr_t* InstanceKlass::start_of_itable() const { return (intptr_t*)start_of_vtable() + vtable_length(); } +inline intptr_t* InstanceKlass::end_of_itable() const { return start_of_itable() + itable_length(); } + +inline oop InstanceKlass::static_field_base_raw() { return java_mirror(); } + +inline Symbol* InstanceKlass::field_name(int index) const { return field(index).name(constants()); } +inline Symbol* InstanceKlass::field_signature(int index) const { return field(index).signature(constants()); } + +inline int InstanceKlass::java_fields_count() const { return FieldInfoStream::num_java_fields(fieldinfo_stream()); } +inline int InstanceKlass::total_fields_count() const { return FieldInfoStream::num_total_fields(fieldinfo_stream()); } + +inline OopMapBlock* InstanceKlass::start_of_nonstatic_oop_maps() const { + return (OopMapBlock*)(start_of_itable() + itable_length()); +} + +inline Klass** InstanceKlass::end_of_nonstatic_oop_maps() const { + return (Klass**)(start_of_nonstatic_oop_maps() + + nonstatic_oop_map_count()); +} + +inline InstanceKlass* volatile* InstanceKlass::adr_implementor() const { + if (is_interface()) { + return (InstanceKlass* volatile*)end_of_nonstatic_oop_maps(); + } else { + return nullptr; + } +} + +inline ObjArrayKlass* InstanceKlass::array_klasses_acquire() const { + return Atomic::load_acquire(&_array_klasses); +} + +inline void InstanceKlass::release_set_array_klasses(ObjArrayKlass* k) { + Atomic::release_store(&_array_klasses, k); +} + +inline jmethodID* InstanceKlass::methods_jmethod_ids_acquire() const { + return Atomic::load_acquire(&_methods_jmethod_ids); +} + +inline void InstanceKlass::release_set_methods_jmethod_ids(jmethodID* jmeths) { + Atomic::release_store(&_methods_jmethod_ids, jmeths); +} + + + + + +template +inline __attribute__ ((always_inline)) void InstanceKlass::oop_oop_iterate_oop_map(OopMapBlock* map, oop obj, OopClosureType* closure) { + T* p = obj->field_addr(map->offset()); + T* const end = p + map->count(); + + for (; p < end; ++p) { + Devirtualizer::do_oop(closure, p); + } +} + +template +inline __attribute__ ((always_inline)) void InstanceKlass::oop_oop_iterate_oop_map_reverse(OopMapBlock* map, oop obj, OopClosureType* closure) { + T* const start = obj->field_addr(map->offset()); + T* p = start + map->count(); + + while (start < p) { + --p; + Devirtualizer::do_oop(closure, p); + } +} + +template +inline __attribute__ ((always_inline)) void InstanceKlass::oop_oop_iterate_oop_map_bounded(OopMapBlock* map, oop obj, OopClosureType* closure, MemRegion mr) { + T* p = obj->field_addr(map->offset()); + T* end = p + map->count(); + + T* const l = (T*)mr.start(); + T* const h = (T*)mr.end(); + + + ; + + if (p < l) { + p = l; + } + if (end > h) { + end = h; + } + + for (;p < end; ++p) { + Devirtualizer::do_oop(closure, p); + } +} + +template +inline __attribute__ ((always_inline)) void InstanceKlass::oop_oop_iterate_oop_maps(oop obj, OopClosureType* closure) { + OopMapBlock* map = start_of_nonstatic_oop_maps(); + OopMapBlock* const end_map = map + nonstatic_oop_map_count(); + + for (; map < end_map; ++map) { + oop_oop_iterate_oop_map(map, obj, closure); + } +} + +template +inline __attribute__ ((always_inline)) void InstanceKlass::oop_oop_iterate_oop_maps_reverse(oop obj, OopClosureType* closure) { + OopMapBlock* const start_map = start_of_nonstatic_oop_maps(); + OopMapBlock* map = start_map + nonstatic_oop_map_count(); + + while (start_map < map) { + --map; + oop_oop_iterate_oop_map_reverse(map, obj, closure); + } +} + +template +inline __attribute__ ((always_inline)) void InstanceKlass::oop_oop_iterate_oop_maps_bounded(oop obj, OopClosureType* closure, MemRegion mr) { + OopMapBlock* map = start_of_nonstatic_oop_maps(); + OopMapBlock* const end_map = map + nonstatic_oop_map_count(); + + for (;map < end_map; ++map) { + oop_oop_iterate_oop_map_bounded(map, obj, closure, mr); + } +} + +template +inline __attribute__ ((always_inline)) void InstanceKlass::oop_oop_iterate(oop obj, OopClosureType* closure) { + if (Devirtualizer::do_metadata(closure)) { + Devirtualizer::do_klass(closure, this); + } + + oop_oop_iterate_oop_maps(obj, closure); +} + +template +inline __attribute__ ((always_inline)) void InstanceKlass::oop_oop_iterate_reverse(oop obj, OopClosureType* closure) { + + ; + + oop_oop_iterate_oop_maps_reverse(obj, closure); +} + +template +inline __attribute__ ((always_inline)) void InstanceKlass::oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr) { + if (Devirtualizer::do_metadata(closure)) { + if (mr.contains(obj)) { + Devirtualizer::do_klass(closure, this); + } + } + + oop_oop_iterate_oop_maps_bounded(obj, closure, mr); +} +# 36 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceMirrorKlass.inline.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceMirrorKlass.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceMirrorKlass.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceMirrorKlass.hpp" +class ClassFileParser; +# 43 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceMirrorKlass.hpp" +class InstanceMirrorKlass: public InstanceKlass { + friend class VMStructs; + friend class InstanceKlass; + + public: + static const KlassKind Kind = InstanceMirrorKlassKind; + + private: + static int _offset_of_static_fields; + + InstanceMirrorKlass(const ClassFileParser& parser) : InstanceKlass(parser, Kind) {} + + public: + InstanceMirrorKlass() { ; } + + static InstanceMirrorKlass* cast(Klass* k) { + return const_cast(cast(const_cast(k))); + } + + static const InstanceMirrorKlass* cast(const Klass* k) { + ; + return static_cast(k); + } + + + virtual size_t oop_size(oop obj) const; + + + + static HeapWord* start_of_static_fields(oop obj) { + return (HeapWord*)(cast_from_oop(obj) + offset_of_static_fields()); + } + + static void init_offset_of_static_fields() { + + ; + _offset_of_static_fields = InstanceMirrorKlass::cast(vmClasses::Class_klass())->size_helper() << LogHeapWordSize; + } + + static int offset_of_static_fields() { + return _offset_of_static_fields; + } + + int compute_static_oop_field_count(oop obj); + + + size_t instance_size(Klass* k); + + + instanceOop allocate_instance(Klass* k, JavaThread* __the_thread__); + + static void serialize_offsets(class SerializeClosure* f) ; + + + + + + + template + inline void oop_oop_iterate_statics(oop obj, OopClosureType* closure); + + + + template + inline void oop_oop_iterate(oop obj, OopClosureType* closure); + + + + template + inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure); + + + + template + inline void oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr); + + private: + + + template + inline void oop_oop_iterate_statics_bounded(oop obj, OopClosureType* closure, MemRegion mr); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceMirrorKlass.inline.hpp" 2 +# 39 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceMirrorKlass.inline.hpp" +template +void InstanceMirrorKlass::oop_oop_iterate_statics(oop obj, OopClosureType* closure) { + T* p = (T*)start_of_static_fields(obj); + T* const end = p + java_lang_Class::static_oop_field_count(obj); + + for (; p < end; ++p) { + Devirtualizer::do_oop(closure, p); + } +} + +template +void InstanceMirrorKlass::oop_oop_iterate(oop obj, OopClosureType* closure) { + InstanceKlass::oop_oop_iterate(obj, closure); + + if (Devirtualizer::do_metadata(closure)) { + Klass* klass = java_lang_Class::as_Klass(obj); + + if (klass != nullptr) { + if (klass->class_loader_data() == nullptr) { + + ; + } else if (klass->is_instance_klass() && klass->class_loader_data()->has_class_mirror_holder()) { + + + + + + Devirtualizer::do_cld(closure, klass->class_loader_data()); + } else { + Devirtualizer::do_klass(closure, klass); + } + } else { +# 80 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceMirrorKlass.inline.hpp" + } + } + + oop_oop_iterate_statics(obj, closure); +} + +template +void InstanceMirrorKlass::oop_oop_iterate_reverse(oop obj, OopClosureType* closure) { + InstanceKlass::oop_oop_iterate_reverse(obj, closure); + + InstanceMirrorKlass::oop_oop_iterate_statics(obj, closure); +} + +template +void InstanceMirrorKlass::oop_oop_iterate_statics_bounded(oop obj, + OopClosureType* closure, + MemRegion mr) { + T* p = (T*)start_of_static_fields(obj); + T* end = p + java_lang_Class::static_oop_field_count(obj); + + T* const l = (T*)mr.start(); + T* const h = (T*)mr.end(); + + + ; + + if (p < l) { + p = l; + } + if (end > h) { + end = h; + } + + for (;p < end; ++p) { + Devirtualizer::do_oop(closure, p); + } +} + +template +void InstanceMirrorKlass::oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr) { + InstanceKlass::oop_oop_iterate_bounded(obj, closure, mr); + + if (Devirtualizer::do_metadata(closure)) { + if (mr.contains(obj)) { + Klass* klass = java_lang_Class::as_Klass(obj); + + if (klass != nullptr) { + Devirtualizer::do_klass(closure, klass); + } + } + } + + oop_oop_iterate_statics_bounded(obj, closure, mr); +} +# 37 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceClassLoaderKlass.inline.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceClassLoaderKlass.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceClassLoaderKlass.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceClassLoaderKlass.hpp" +class ClassFileParser; + + + + + + + +class InstanceClassLoaderKlass: public InstanceKlass { + friend class VMStructs; + friend class InstanceKlass; +public: + static const KlassKind Kind = InstanceClassLoaderKlassKind; + +private: + InstanceClassLoaderKlass(const ClassFileParser& parser) : InstanceKlass(parser, Kind) {} + +public: + InstanceClassLoaderKlass() { ; } + + + + + + + + template + inline void oop_oop_iterate(oop obj, OopClosureType* closure); + + + + template + inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure); + + + + template + inline void oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceClassLoaderKlass.inline.hpp" 2 +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceClassLoaderKlass.inline.hpp" +template +inline void InstanceClassLoaderKlass::oop_oop_iterate(oop obj, OopClosureType* closure) { + InstanceKlass::oop_oop_iterate(obj, closure); + + if (Devirtualizer::do_metadata(closure)) { + ClassLoaderData* cld = java_lang_ClassLoader::loader_data(obj); + + if (cld != nullptr) { + Devirtualizer::do_cld(closure, cld); + } + } +} + +template +inline void InstanceClassLoaderKlass::oop_oop_iterate_reverse(oop obj, OopClosureType* closure) { + InstanceKlass::oop_oop_iterate_reverse(obj, closure); + + + ; +} + +template +inline void InstanceClassLoaderKlass::oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr) { + InstanceKlass::oop_oop_iterate_bounded(obj, closure, mr); + + if (Devirtualizer::do_metadata(closure)) { + if (mr.contains(obj)) { + ClassLoaderData* cld = java_lang_ClassLoader::loader_data(obj); + + if (cld != nullptr) { + Devirtualizer::do_cld(closure, cld); + } + } + } +} +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceRefKlass.inline.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceRefKlass.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceRefKlass.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceRefKlass.hpp" +class ClassFileParser; +# 50 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceRefKlass.hpp" +class InstanceRefKlass: public InstanceKlass { + friend class InstanceKlass; + public: + static const KlassKind Kind = InstanceRefKlassKind; + + private: + InstanceRefKlass(const ClassFileParser& parser); + + public: + InstanceRefKlass() { ; } +# 68 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceRefKlass.hpp" + template + inline void oop_oop_iterate(oop obj, OopClosureType* closure); + + + + template + inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure); + + + + template + inline void oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr); + + private: + + + + template + inline void oop_oop_iterate_ref_processing(oop obj, OopClosureType* closure, Contains& contains); + + + template + inline void oop_oop_iterate_ref_processing_bounded(oop obj, OopClosureType* closure, MemRegion mr); + + + template + inline void oop_oop_iterate_ref_processing(oop obj, OopClosureType* closure); + + + template + static void do_referent(oop obj, OopClosureType* closure, Contains& contains); + + template + static void do_discovered(oop obj, OopClosureType* closure, Contains& contains); + + template + static bool try_discover(oop obj, ReferenceType type, OopClosureType* closure); + + + + template + static void oop_oop_iterate_discovery(oop obj, ReferenceType type, OopClosureType* closure, Contains& contains); + + + + + template + static void oop_oop_iterate_discovered_and_discovery(oop obj, ReferenceType type, OopClosureType* closure, Contains& contains); + + + template + static void oop_oop_iterate_fields(oop obj, OopClosureType* closure, Contains& contains); + + + template + static void oop_oop_iterate_fields_except_referent(oop obj, OopClosureType* closure, Contains& contains); + + template + static void trace_reference_gc(const char *s, oop obj) {}; + + public: + + + static void update_nonstatic_oop_maps(Klass* k); + + public: + + void oop_verify_on(oop obj, outputStream* st); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceRefKlass.inline.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/javaClasses.inline.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceRefKlass.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referenceProcessor.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referenceProcessor.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referenceDiscoverer.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referenceDiscoverer.hpp" +class ReferenceDiscoverer : public CHeapObj { +public: + virtual bool discover_reference(oop obj, ReferenceType type) = 0; +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referenceProcessor.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referencePolicy.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referencePolicy.hpp" +class ReferencePolicy : public CHeapObj { + public: + virtual bool should_clear_reference(oop p, jlong timestamp_clock) { + do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/gc/shared/referencePolicy.hpp", 37); } while (0); + return true; + } + + + virtual void setup() { } +}; + +class NeverClearPolicy : public ReferencePolicy { + public: + virtual bool should_clear_reference(oop p, jlong timestamp_clock) { + return false; + } +}; + +class AlwaysClearPolicy : public ReferencePolicy { + public: + virtual bool should_clear_reference(oop p, jlong timestamp_clock) { + return true; + } +}; + +class LRUCurrentHeapPolicy : public ReferencePolicy { + private: + jlong _max_interval; + + public: + LRUCurrentHeapPolicy(); + + + void setup(); + virtual bool should_clear_reference(oop p, jlong timestamp_clock); +}; + +class LRUMaxHeapPolicy : public ReferencePolicy { + private: + jlong _max_interval; + + public: + LRUMaxHeapPolicy(); + + + void setup(); + virtual bool should_clear_reference(oop p, jlong timestamp_clock); +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referenceProcessor.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referenceProcessorStats.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referenceProcessorStats.hpp" +class ReferenceProcessor; + + + +class ReferenceProcessorStats { + size_t _soft_count; + size_t _weak_count; + size_t _final_count; + size_t _phantom_count; + + public: + ReferenceProcessorStats() : + _soft_count(0), + _weak_count(0), + _final_count(0), + _phantom_count(0) {} + + ReferenceProcessorStats(size_t soft_count, + size_t weak_count, + size_t final_count, + size_t phantom_count) : + _soft_count(soft_count), + _weak_count(weak_count), + _final_count(final_count), + _phantom_count(phantom_count) + {} + + size_t soft_count() const { + return _soft_count; + } + + size_t weak_count() const { + return _weak_count; + } + + size_t final_count() const { + return _final_count; + } + + size_t phantom_count() const { + return _phantom_count; + } +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referenceProcessor.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/workerThread.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/workerThread.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcId.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcId.hpp" +class GCIdPrinter : public CHeapObj { +public: + virtual ~GCIdPrinter() {} + virtual size_t print_gc_id(uint gc_id, char* buf, size_t len); +}; + +class GCId : public AllStatic { +private: + friend class GCIdMark; + + static uint _next_id; + static const uint UNDEFINED = +# 41 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcId.hpp" 3 4 + (0x7fffffff * 2U + 1U) +# 41 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcId.hpp" + ; + static uint create(); + + + static GCIdPrinter _default_printer; + static GCIdPrinter* _printer; + +public: + + static uint current(); + + static uint current_or_undefined(); + + static uint peek(); + static uint undefined() { return UNDEFINED; } + static size_t print_prefix(char* buf, size_t len); + + static void set_printer(GCIdPrinter* printer); +}; + +class GCIdMark : public StackObj { +private: + const uint _previous_gc_id; + +public: + GCIdMark(); + GCIdMark(uint gc_id); + ~GCIdMark(); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/workerThread.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/nonJavaThread.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/nonJavaThread.hpp" +class NonJavaThread: public Thread { + friend class VMStructs; + + NonJavaThread* volatile _next; + + class List; + static List _the_list; + + void add_to_the_list(); + void remove_from_the_list(); + + protected: + virtual void pre_run(); + virtual void post_run(); + + public: + NonJavaThread(); + ~NonJavaThread(); + + class Iterator; +}; + + + + + + + +class NonJavaThread::Iterator : public StackObj { + uint _protect_enter; + NonJavaThread* _current; + + Iterator(Iterator const&) = delete; Iterator& operator=(Iterator const&) = delete; + +public: + Iterator(); + ~Iterator(); + + bool end() const { return _current == nullptr; } + NonJavaThread* current() const { return _current; } + void step(); +}; + + + + + +class NamedThread: public NonJavaThread { + friend class VMStructs; + enum { + max_name_len = 64 + }; + private: + char* _name; + + Thread* _processed_thread; + uint _gc_id; + + public: + NamedThread(); + ~NamedThread(); + + void set_name(const char* format, ...) __attribute__((format(printf, 2, 3))); + virtual bool is_Named_thread() const { return true; } + virtual const char* name() const { return _name == nullptr ? "Unknown Thread" : _name; } + virtual const char* type_name() const { return "NamedThread"; } + Thread *processed_thread() { return _processed_thread; } + void set_processed_thread(Thread *thread) { _processed_thread = thread; } + virtual void print_on(outputStream* st) const; + + void set_gc_id(uint gc_id) { _gc_id = gc_id; } + uint gc_id() { return _gc_id; } +}; + + +class WatcherThread: public NonJavaThread { + friend class VMStructs; + protected: + virtual void run(); + + private: + static WatcherThread* _watcher_thread; + + static bool _run_all_tasks; + + volatile static bool _should_terminate; + public: + + WatcherThread(); + + + ~WatcherThread() { + do { if (!(false)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/share/runtime/nonJavaThread.hpp", 122, "guarantee(" "false" ") failed", "WatcherThread deletion must fix the race with VM termination"); } } while (0); + } + + + bool is_Watcher_thread() const { return true; } + + + const char* name() const { return "VM Periodic Task Thread"; } + const char* type_name() const { return "WatcherThread"; } + void print_on(outputStream* st) const; + void unpark(); + + + static WatcherThread* watcher_thread() { return _watcher_thread; } + + + static void start(); + static void stop(); + + + static void run_all_tasks(); + private: + int sleep() const; +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/workerThread.hpp" 2 + + + + +class ThreadClosure; +class WorkerTaskDispatcher; +class WorkerThread; + + +class WorkerTask : public CHeapObj { +private: + const char* _name; + const uint _gc_id; + + public: + explicit WorkerTask(const char* name) : + _name(name), + _gc_id(GCId::current_or_undefined()) {} + + const char* name() const { return _name; } + uint gc_id() const { return _gc_id; } + + virtual void work(uint worker_id) = 0; +}; + + +class WorkerTaskDispatcher { + + WorkerTask* _task; + + volatile uint _started; + volatile uint _not_finished; + + + Semaphore _start_semaphore; + + Semaphore _end_semaphore; + +public: + WorkerTaskDispatcher(); + + + + + + void coordinator_distribute_task(WorkerTask* task, uint num_workers); + + + + + void worker_run_task(); +}; + + +class WorkerThreads : public CHeapObj { +private: + const char* const _name; + WorkerThread** _workers; + const uint _max_workers; + uint _created_workers; + uint _active_workers; + WorkerTaskDispatcher _dispatcher; + + WorkerThread* create_worker(uint name_suffix); + + void set_indirectly_suspendible_threads(); + void clear_indirectly_suspendible_threads(); + +protected: + virtual void on_create_worker(WorkerThread* worker) {} + +public: + WorkerThreads(const char* name, uint max_workers); + + void initialize_workers(); + + uint max_workers() const { return _max_workers; } + uint created_workers() const { return _created_workers; } + uint active_workers() const { return _active_workers; } + + uint set_active_workers(uint num_workers); + + void threads_do(ThreadClosure* tc) const; + + const char* name() const { return _name; } + + + void run_task(WorkerTask* task); + + + void run_task(WorkerTask* task, uint num_workers); +}; + +class WorkerThread : public NamedThread { + friend class WorkerTaskDispatcher; + +private: + static __thread uint _worker_id; + + WorkerTaskDispatcher* const _dispatcher; + + static void set_worker_id(uint worker_id) { _worker_id = worker_id; } + +public: + static uint worker_id() { return _worker_id; } + + WorkerThread(const char* name_prefix, uint which, WorkerTaskDispatcher* dispatcher); + + bool is_Worker_thread() const override { return true; } + const char* type_name() const override { return "WorkerThread"; } + + void run() override; +}; + + + + +class WithActiveWorkers : public StackObj { +private: + WorkerThreads* const _workers; + const uint _prev_active_workers; + +public: + WithActiveWorkers(WorkerThreads* workers, uint num_workers) : + _workers(workers), + _prev_active_workers(workers->active_workers()) { + _workers->set_active_workers(num_workers); + } + + ~WithActiveWorkers() { + _workers->set_active_workers(_prev_active_workers); + } +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referenceProcessor.hpp" 2 + + + +class GCTimer; +class ReferencePolicy; +class ReferenceProcessorPhaseTimes; +class RefProcTask; +class RefProcProxyTask; +# 48 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referenceProcessor.hpp" +class EnqueueDiscoveredFieldClosure { +public: + + + virtual void enqueue(HeapWord* discovered_field_addr, oop value) = 0; +}; + + + +class BarrierEnqueueDiscoveredFieldClosure : public EnqueueDiscoveredFieldClosure { +public: + void enqueue(HeapWord* discovered_field_addr, oop value) override; +}; + + +class DiscoveredList { +public: + DiscoveredList() : _oop_head(nullptr), _compressed_head(narrowOop::null), _len(0) { } + inline oop head() const; + HeapWord* adr_head() { + return UseCompressedOops ? (HeapWord*)&_compressed_head : + (HeapWord*)&_oop_head; + } + inline void add_as_head(oop o); + inline void set_head(oop o); + inline bool is_empty() const; + size_t length() { return _len; } + void set_length(size_t len) { _len = len; } + void inc_length(size_t inc) { _len += inc; ; } + void dec_length(size_t dec) { _len -= dec; } + + inline void clear(); +private: + + + oop _oop_head; + narrowOop _compressed_head; + size_t _len; +}; + + +class DiscoveredListIterator { + DiscoveredList& _refs_list; + HeapWord* _prev_discovered_addr; + oop _prev_discovered; + oop _current_discovered; + HeapWord* _current_discovered_addr; + oop _next_discovered; + + oop _referent; + + OopClosure* _keep_alive; + BoolObjectClosure* _is_alive; + EnqueueDiscoveredFieldClosure* _enqueue; + + + + + + size_t _processed; + size_t _removed; + +public: + inline DiscoveredListIterator(DiscoveredList& refs_list, + OopClosure* keep_alive, + BoolObjectClosure* is_alive, + EnqueueDiscoveredFieldClosure* enqueue); + + + inline bool has_next() const { return _current_discovered != nullptr; } + + + inline oop obj() const { return _current_discovered; } + + + inline oop referent() const { return _referent; } + + + inline bool is_referent_alive() const { + return _is_alive->do_object_b(_referent); + } + + + + + + + void load_ptrs(); + + + inline void next() { + _prev_discovered_addr = _current_discovered_addr; + _prev_discovered = _current_discovered; + move_to_next(); + } + + + void remove(); + + + void make_referent_alive(); + + + void enqueue(); + + + void complete_enqueue(); + + + void clear_referent(); + + + inline size_t processed() const { return _processed; } + inline size_t removed() const { return _removed; } + + inline void move_to_next() { + if (_current_discovered == _next_discovered) { + + _current_discovered = nullptr; + } else { + _current_discovered = _next_discovered; + } + ; + _processed++; + } +}; +# 185 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referenceProcessor.hpp" +class ReferenceProcessor : public ReferenceDiscoverer { + friend class RefProcTask; + friend class RefProcKeepAliveFinalPhaseTask; +public: + + + enum RefProcSubPhases { + ProcessSoftRefSubPhase, + ProcessWeakRefSubPhase, + ProcessFinalRefSubPhase, + KeepAliveFinalRefsSubPhase, + ProcessPhantomRefsSubPhase, + RefSubPhaseMax + }; + + + enum RefProcPhases { + SoftWeakFinalRefsPhase, + KeepAliveFinalRefsPhase, + PhantomRefsPhase, + RefPhaseMax + }; + +private: + size_t total_count(DiscoveredList lists[]) const; + void verify_total_count_zero(DiscoveredList lists[], const char* type) {}; + + + static jlong _soft_ref_timestamp_clock; + + BoolObjectClosure* _is_subject_to_discovery; + + + + bool _discovering_refs; + bool _discovery_is_concurrent; + bool _discovery_is_mt; + + uint _next_id; + + + + + + + BoolObjectClosure* _is_alive_non_header; + + + + static ReferencePolicy* _default_soft_ref_policy; + + static ReferencePolicy* _always_clear_soft_ref_policy; + + ReferencePolicy* _current_soft_ref_policy; + + + + + uint _num_queues; + + uint _max_num_queues; + + + DiscoveredList* _discovered_refs; + + + DiscoveredList* _discoveredSoftRefs; + DiscoveredList* _discoveredWeakRefs; + DiscoveredList* _discoveredFinalRefs; + DiscoveredList* _discoveredPhantomRefs; + + void run_task(RefProcTask& task, RefProcProxyTask& proxy_task, bool marks_oops_alive); + + + + void process_soft_weak_final_refs(RefProcProxyTask& proxy_task, + ReferenceProcessorPhaseTimes& phase_times); + + + void process_final_keep_alive(RefProcProxyTask& proxy_task, + ReferenceProcessorPhaseTimes& phase_times); + + + void process_phantom_refs(RefProcProxyTask& proxy_task, + ReferenceProcessorPhaseTimes& phase_times); + + + + + + + + size_t process_discovered_list_work(DiscoveredList& refs_list, + BoolObjectClosure* is_alive, + OopClosure* keep_alive, + EnqueueDiscoveredFieldClosure* enqueue, + bool do_enqueue_and_clear); + + + + size_t process_final_keep_alive_work(DiscoveredList& refs_list, + OopClosure* keep_alive, + EnqueueDiscoveredFieldClosure* enqueue); + + + void setup_policy(bool always_clear) { + _current_soft_ref_policy = always_clear ? + _always_clear_soft_ref_policy : _default_soft_ref_policy; + _current_soft_ref_policy->setup(); + } +public: + static int number_of_subclasses_of_ref() { return (REF_PHANTOM - REF_NONE); } + + uint num_queues() const { return _num_queues; } + uint max_num_queues() const { return _max_num_queues; } + void set_active_mt_degree(uint v); + + void start_discovery(bool always_clear) { + enable_discovery(); + setup_policy(always_clear); + } +# 318 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/referenceProcessor.hpp" + void preclean_discovered_references(BoolObjectClosure* is_alive, + EnqueueDiscoveredFieldClosure* enqueue, + YieldClosure* yield, + GCTimer* gc_timer); + +private: + + + const char* list_name(uint i); + + + + + + bool preclean_discovered_reflist(DiscoveredList& refs_list, + BoolObjectClosure* is_alive, + EnqueueDiscoveredFieldClosure* enqueue, + YieldClosure* yield); + + + uint next_id() { + uint id = _next_id; + ; + if (++_next_id == _num_queues) { + _next_id = 0; + } + ; + return id; + } + DiscoveredList* get_discovered_list(ReferenceType rt); + inline bool set_discovered_link(HeapWord* discovered_addr, oop next_discovered); + inline void add_to_discovered_list(DiscoveredList& refs_list, oop obj, + HeapWord* discovered_addr); + inline bool set_discovered_link_st(HeapWord* discovered_addr, + oop next_discovered); + inline bool set_discovered_link_mt(HeapWord* discovered_addr, + oop next_discovered); + + void clear_discovered_references(DiscoveredList& refs_list); + + void log_reflist(const char* prefix, DiscoveredList list[], uint num_active_queues); + void log_reflist_counts(DiscoveredList ref_lists[], uint num_active_queues) {}; + + + void balance_queues(DiscoveredList refs_lists[]); + bool need_balance_queues(DiscoveredList refs_lists[]); + + + void maybe_balance_queues(DiscoveredList refs_lists[]); + + + void update_soft_ref_master_clock(); + + bool is_subject_to_discovery(oop const obj) const; + +public: + + ReferenceProcessor(BoolObjectClosure* is_subject_to_discovery, + uint mt_processing_degree = 1, + uint mt_discovery_degree = 1, + bool concurrent_discovery = false, + BoolObjectClosure* is_alive_non_header = nullptr); + + static void init_statics(); + + + BoolObjectClosure* is_alive_non_header() { + return _is_alive_non_header; + } + void set_is_alive_non_header(BoolObjectClosure* is_alive_non_header) { + _is_alive_non_header = is_alive_non_header; + } + + BoolObjectClosure* is_subject_to_discovery_closure() const { return _is_subject_to_discovery; } + void set_is_subject_to_discovery_closure(BoolObjectClosure* cl) { _is_subject_to_discovery = cl; } + + + void enable_discovery(); + void disable_discovery() { _discovering_refs = false; } + bool discovery_enabled() { return _discovering_refs; } + + + bool discovery_is_concurrent() const { return _discovery_is_concurrent; } + bool discovery_is_stw() const { return !discovery_is_concurrent(); } + + + bool discovery_is_mt() const { return _discovery_is_mt; } + void set_mt_discovery(bool mt) { _discovery_is_mt = mt; } + + + bool processing_is_mt() const; + + + void weak_oops_do(OopClosure* f); + + + virtual bool discover_reference(oop obj, ReferenceType rt); + + + ReferenceProcessorStats + process_discovered_references(RefProcProxyTask& proxy_task, + ReferenceProcessorPhaseTimes& phase_times); + + + + + void abandon_partial_discovery(); + + size_t total_reference_count(ReferenceType rt) const; + + + void verify_no_references_recorded() {}; + void verify_referent(oop obj) {}; +}; + + + +class SpanSubjectToDiscoveryClosure : public BoolObjectClosure { + MemRegion _span; + +public: + SpanSubjectToDiscoveryClosure() : BoolObjectClosure(), _span() { } + + void set_span(MemRegion mr) { + _span = mr; + } + + virtual bool do_object_b(oop obj) { + return _span.contains(obj); + } +}; + + + +class ReferenceProcessorSubjectToDiscoveryMutator : StackObj { + ReferenceProcessor* _rp; + BoolObjectClosure* _saved_cl; + +public: + ReferenceProcessorSubjectToDiscoveryMutator(ReferenceProcessor* rp, BoolObjectClosure* cl): + _rp(rp) { + _saved_cl = _rp->is_subject_to_discovery_closure(); + _rp->set_is_subject_to_discovery_closure(cl); + } + + ~ReferenceProcessorSubjectToDiscoveryMutator() { + _rp->set_is_subject_to_discovery_closure(_saved_cl); + } +}; + + + + +class ReferenceProcessorMTDiscoveryMutator: StackObj { + private: + ReferenceProcessor* _rp; + bool _saved_mt; + + public: + ReferenceProcessorMTDiscoveryMutator(ReferenceProcessor* rp, + bool mt): + _rp(rp) { + _saved_mt = _rp->discovery_is_mt(); + _rp->set_mt_discovery(mt); + } + + ~ReferenceProcessorMTDiscoveryMutator() { + _rp->set_mt_discovery(_saved_mt); + } +}; + + + + +class ReferenceProcessorIsAliveMutator: StackObj { + private: + ReferenceProcessor* _rp; + BoolObjectClosure* _saved_cl; + + public: + ReferenceProcessorIsAliveMutator(ReferenceProcessor* rp, + BoolObjectClosure* cl): + _rp(rp) { + _saved_cl = _rp->is_alive_non_header(); + _rp->set_is_alive_non_header(cl); + } + + ~ReferenceProcessorIsAliveMutator() { + _rp->set_is_alive_non_header(_saved_cl); + } +}; + +enum class RefProcThreadModel { Multi, Single }; + + + + + + + +class RefProcTask : StackObj { +protected: + ReferenceProcessor& _ref_processor; + ReferenceProcessorPhaseTimes* _phase_times; + + + uint tracker_id(uint worker_id) const { + return _ref_processor.processing_is_mt() ? worker_id : 0; + } + + void process_discovered_list(uint worker_id, + ReferenceType ref_type, + BoolObjectClosure* is_alive, + OopClosure* keep_alive, + EnqueueDiscoveredFieldClosure* enqueue); +public: + RefProcTask(ReferenceProcessor& ref_processor, + ReferenceProcessorPhaseTimes* phase_times) + : _ref_processor(ref_processor), + _phase_times(phase_times) {} + + virtual void rp_work(uint worker_id, + BoolObjectClosure* is_alive, + OopClosure* keep_alive, + EnqueueDiscoveredFieldClosure* enqueue, + VoidClosure* complete_gc) = 0; +}; + + + + + + + +class RefProcProxyTask : public WorkerTask { +protected: + const uint _max_workers; + RefProcTask* _rp_task; + RefProcThreadModel _tm; + uint _queue_count; + bool _marks_oops_alive; + +public: + RefProcProxyTask(const char* name, uint max_workers) : WorkerTask(name), _max_workers(max_workers), _rp_task(nullptr),_tm(RefProcThreadModel::Single), _queue_count(0), _marks_oops_alive(false) {} + + void prepare_run_task(RefProcTask& rp_task, uint queue_count, RefProcThreadModel tm, bool marks_oops_alive) { + _rp_task = &rp_task; + _tm = tm; + _queue_count = queue_count; + _marks_oops_alive = marks_oops_alive; + prepare_run_task_hook(); + } + + virtual void prepare_run_task_hook() {} +}; + + + +class RefProcMTDegreeAdjuster : public StackObj { + typedef ReferenceProcessor::RefProcPhases RefProcPhases; + + ReferenceProcessor* _rp; + uint _saved_num_queues; + + + uint ergo_proc_thread_count(size_t ref_count, + uint max_threads, + RefProcPhases phase) const; + + bool use_max_threads(RefProcPhases phase) const; + +public: + RefProcMTDegreeAdjuster(ReferenceProcessor* rp, + RefProcPhases phase, + size_t ref_count); + ~RefProcMTDegreeAdjuster(); +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceRefKlass.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logPrefix.hpp" 1 +# 43 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logPrefix.hpp" + +# 101 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logPrefix.hpp" +template +struct LogPrefix : public AllStatic { + static_assert((GuardTag == LogTag::__NO_TAG), "GuardTag == LogTag::__NO_TAG"); + static size_t prefix(char* buf, size_t len) { + return 0; + } +}; +# 123 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logPrefix.hpp" +template <> struct LogPrefix<(LogTag::_gc), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_age), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_alloc), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_alloc), (LogTag::_region), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_barrier), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_breakpoint), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_classhisto), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_compaction), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_cpu), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_ergo), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_ergo), (LogTag::_cset), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_ergo), (LogTag::_heap), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_ergo), (LogTag::_ihop), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_ergo), (LogTag::_refine), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_heap), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_heap), (LogTag::_numa), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_heap), (LogTag::_region), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_freelist), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_humongous), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_ihop), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_liveness), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_load), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_marking), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_metaspace), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_mmu), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_nmethod), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_phases), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_phases), (LogTag::_ref), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_phases), (LogTag::_start), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_phases), (LogTag::_task), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_phases), (LogTag::_verify), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_phases), (LogTag::_verify), (LogTag::_start), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_plab), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_promotion), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_page), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_region), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_remset), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_remset), (LogTag::_tracking), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_ref), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_ref), (LogTag::_start), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_refine), (LogTag::_stats), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_reloc), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_start), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_symboltable), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_sweep), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_task), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_task), (LogTag::_start), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_task), (LogTag::_stats), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_tlab), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_verify), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; template <> struct LogPrefix<(LogTag::_gc), (LogTag::_verify), (LogTag::_start), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG)> { static size_t prefix(char* buf, size_t len) { size_t ret = GCId::print_prefix(buf, len); ; ; return ret; } }; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" 1 +# 27 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logDecorators.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logDecorators.hpp" +class outputStream; +# 61 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logDecorators.hpp" +class LogDecorators { + public: + enum Decorator { + + time_decorator, utctime_decorator, uptime_decorator, timemillis_decorator, uptimemillis_decorator, timenanos_decorator, uptimenanos_decorator, hostname_decorator, pid_decorator, tid_decorator, level_decorator, tags_decorator, + + Count, + Invalid + }; + + private: + uint _decorators; + static const char* _name[][2]; + static const uint DefaultDecoratorsMask = (1 << uptime_decorator) | (1 << level_decorator) | (1 << tags_decorator); + + static uint mask(LogDecorators::Decorator decorator) { + return 1 << decorator; + } + + constexpr LogDecorators(uint mask) : _decorators(mask) { + } + + public: + static const LogDecorators None; + static const LogDecorators All; + + LogDecorators() : _decorators(DefaultDecoratorsMask) { + } + + void clear() { + _decorators = 0; + } + + static const char* name(LogDecorators::Decorator decorator) { + return _name[decorator][0]; + } + + static const char* abbreviation(LogDecorators::Decorator decorator) { + return _name[decorator][1]; + } + + static LogDecorators::Decorator from_string(const char* str); + + void combine_with(const LogDecorators &source) { + _decorators |= source._decorators; + } + + bool is_empty() const { + return _decorators == 0; + } + + bool is_decorator(LogDecorators::Decorator decorator) const { + return (_decorators & mask(decorator)) != 0; + } + + bool parse(const char* decorator_args, outputStream* errstream = nullptr); +}; +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logOutputList.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logOutputList.hpp" +class LogOutput; +# 48 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logOutputList.hpp" +class LogOutputList { + private: + struct LogOutputNode : public CHeapObj { + LogOutput* _value; + LogOutputNode* volatile _next; + LogLevelType _level; + }; + + LogOutputNode* volatile _level_start[LogLevel::Count]; + volatile jint _active_readers; + + LogOutputNode* find(const LogOutput* output) const; + void remove_output(LogOutputNode* node); + void add_output(LogOutput* output, LogLevelType level); + void update_output_level(LogOutputNode* node, LogLevelType level); + + + jint increase_readers(); + jint decrease_readers(); + + public: + LogOutputList() : _active_readers(0) { + for (size_t i = 0; i < LogLevel::Count; i++) { + _level_start[i] = nullptr; + } + } + + + bool is_level(LogLevelType level) const { + return _level_start[level] != nullptr; + } + + LogLevelType level_for(const LogOutput* output) const { + LogOutputNode* node = this->find(output); + if (node == nullptr) { + return LogLevel::Off; + } + return node->_level; + } + + + void set_output_level(LogOutput* output, LogLevelType level); + + + + void clear(); + void wait_until_no_readers() const; + + class Iterator { + friend class LogOutputList; + private: + LogOutputNode* _current; + LogOutputList* _list; + Iterator(LogOutputList* list, LogOutputNode* start) : _current(start), _list(list) { + } + + public: + Iterator(const Iterator &itr) : _current(itr._current), _list(itr._list){ + itr._list->increase_readers(); + } + + Iterator& operator=(const Iterator& rhs) { + _current = rhs._current; + if (_list != rhs._list) { + rhs._list->increase_readers(); + _list->decrease_readers(); + _list = rhs._list; + } + return *this; + } + + ~Iterator() { + _list->decrease_readers(); + } + + LogOutput* operator*() { + return _current->_value; + } + + void operator++(int) { + + + _current = Atomic::load_acquire(&_current->_next); + } + + bool operator!=(const LogOutputNode *ref) const { + return _current != ref; + } + + LogLevelType level() const { + return _current->_level; + } + }; + + Iterator iterator(LogLevelType level = LogLevel::Last) { + increase_readers(); + + + return Iterator(this, Atomic::load_acquire(&_level_start[level])); + } + + LogOutputNode* end() const { + return nullptr; + } +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" 2 + + + + +class LogMessageBuffer; + +class outputStream; + + + + +class LogTagSet { + private: + static LogTagSet* _list; + static size_t _ntagsets; + + LogTagSet* const _next; + size_t _ntags; + LogTagType _tag[LogTag::MaxTags]; + + LogOutputList _output_list; + LogDecorators _decorators; + + typedef size_t (*PrefixWriter)(char* buf, size_t size); + PrefixWriter _write_prefix; + + + + + + + LogTagSet(PrefixWriter prefix_writer, LogTagType t0, LogTagType t1, LogTagType t2, LogTagType t3, LogTagType t4); + + template + friend class LogTagSetMapping; + + public: + static void describe_tagsets(outputStream* out); + static void list_all_tagsets(outputStream* out); + + void wait_until_no_readers() const { + _output_list.wait_until_no_readers(); + } + + static LogTagSet* first() { + return _list; + } + + static size_t ntagsets() { + return _ntagsets; + } + + LogTagSet* next() { + return _next; + } + + size_t ntags() const { + return _ntags; + } + + LogTagType tag(size_t idx) const { + return _tag[idx]; + } + + bool contains(LogTagType tag) const { + for (size_t i = 0; i < LogTag::MaxTags && _tag[i] != LogTag::__NO_TAG; i++) { + if (tag == _tag[i]) { + return true; + } + } + return false; + } + + LogLevelType level_for(const LogOutput* output) const { + return _output_list.level_for(output); + } + + void disable_outputs() { + _output_list.clear(); + } + + PrefixWriter write_prefix() { + return _write_prefix; + } + + void set_output_level(LogOutput* output, LogLevelType level) { + _output_list.set_output_level(output, level); + } + + + + void update_decorators(const LogDecorators& decorator = LogDecorators::None); + + void label(outputStream* st, const char* separator = ",") const; + int label(char *buf, size_t len, const char* separator = ",") const; + bool has_output(const LogOutput* output); + + + + bool is_level(LogLevelType level) const { + return _output_list.is_level(level); + } + void log(LogLevelType level, const char* msg); + void log(const LogMessageBuffer& msg); + + __attribute__((format(printf, 3, 4))) + void write(LogLevelType level, const char* fmt, ...); + + template + __attribute__((format(printf, 2, 3))) + void write(const char* fmt, ...) { + va_list args; + +# 142 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" 3 4 + __builtin_va_start( +# 142 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" + args +# 142 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" 3 4 + , +# 142 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" + fmt +# 142 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" 3 4 + ) +# 142 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" + ; + vwrite(Level, fmt, args); + +# 144 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" 3 4 + __builtin_va_end( +# 144 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" + args +# 144 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" 3 4 + ) +# 144 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logTagSet.hpp" + ; + } + + __attribute__((format(printf, 3, 0))) + void vwrite(LogLevelType level, const char* fmt, va_list args); +}; + +template +class LogTagSetMapping : public AllStatic { +private: + + static_assert((GuardTag == LogTag::__NO_TAG), "GuardTag == LogTag::__NO_TAG"); + static LogTagSet _tagset; + +public: + static LogTagSet& tagset() { + return _tagset; + } +}; + + + + + + +template +LogTagSet LogTagSetMapping::_tagset{&LogPrefix::prefix, T0, T1, T2, T3, T4}; + +extern const size_t vwrite_buffer_size; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 2 + + + +class LogMessageBuffer; +# 104 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" +template +class LogTargetImpl; + +template +class LogImpl { + public: + + + + static_assert((GuardTag == LogTag::__NO_TAG), "GuardTag == LogTag::__NO_TAG"); + + + + LogImpl() { + } + + static bool is_level(LogLevelType level) { + return LogTagSetMapping::tagset().is_level(level); + } + + __attribute__((format(printf, 2, 3))) + static void write(LogLevelType level, const char* fmt, ...) { + va_list args; + +# 128 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_start( +# 128 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 128 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + , +# 128 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + fmt +# 128 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 128 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; + vwrite(level, fmt, args); + +# 130 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_end( +# 130 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 130 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 130 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; + } + + static void write(const LogMessageBuffer& msg) { + LogTagSetMapping::tagset().log(msg); + }; + + template + __attribute__((format(printf, 1, 2))) + static void write(const char* fmt, ...) { + va_list args; + +# 141 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_start( +# 141 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 141 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + , +# 141 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + fmt +# 141 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 141 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; + vwrite(Level, fmt, args); + +# 143 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_end( +# 143 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 143 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 143 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; + } + + __attribute__((format(printf, 2, 0))) + static void vwrite(LogLevelType level, const char* fmt, va_list args) { + LogTagSetMapping::tagset().vwrite(level, fmt, args); + } +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + __attribute__((format(printf, 2, 0))) LogImpl& vtrace(const char* fmt, va_list args) { vwrite(LogLevel::Trace, fmt, args); return *this; } LogImpl& trace(const char* fmt, ...) __attribute__((format(printf, 2, 3))) { va_list args; +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_start( +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + , +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + fmt +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; vwrite(LogLevel::Trace, fmt, args); +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_end( +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; return *this; } static bool is_trace() { return is_level(LogLevel::Trace); } static LogTargetImpl* trace() { return (LogTargetImpl*)nullptr; } __attribute__((format(printf, 2, 0))) LogImpl& vdebug(const char* fmt, va_list args) { vwrite(LogLevel::Debug, fmt, args); return *this; } LogImpl& debug(const char* fmt, ...) __attribute__((format(printf, 2, 3))) { va_list args; +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_start( +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + , +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + fmt +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; vwrite(LogLevel::Debug, fmt, args); +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_end( +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; return *this; } static bool is_debug() { return is_level(LogLevel::Debug); } static LogTargetImpl* debug() { return (LogTargetImpl*)nullptr; } __attribute__((format(printf, 2, 0))) LogImpl& vinfo(const char* fmt, va_list args) { vwrite(LogLevel::Info, fmt, args); return *this; } LogImpl& info(const char* fmt, ...) __attribute__((format(printf, 2, 3))) { va_list args; +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_start( +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + , +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + fmt +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; vwrite(LogLevel::Info, fmt, args); +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_end( +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; return *this; } static bool is_info() { return is_level(LogLevel::Info); } static LogTargetImpl* info() { return (LogTargetImpl*)nullptr; } __attribute__((format(printf, 2, 0))) LogImpl& vwarning(const char* fmt, va_list args) { vwrite(LogLevel::Warning, fmt, args); return *this; } LogImpl& warning(const char* fmt, ...) __attribute__((format(printf, 2, 3))) { va_list args; +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_start( +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + , +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + fmt +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; vwrite(LogLevel::Warning, fmt, args); +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_end( +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; return *this; } static bool is_warning() { return is_level(LogLevel::Warning); } static LogTargetImpl* warning() { return (LogTargetImpl*)nullptr; } __attribute__((format(printf, 2, 0))) LogImpl& verror(const char* fmt, va_list args) { vwrite(LogLevel::Error, fmt, args); return *this; } LogImpl& error(const char* fmt, ...) __attribute__((format(printf, 2, 3))) { va_list args; +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_start( +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + , +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + fmt +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; vwrite(LogLevel::Error, fmt, args); +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_end( +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 169 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; return *this; } static bool is_error() { return is_level(LogLevel::Error); } static LogTargetImpl* error() { return (LogTargetImpl*)nullptr; } + +}; + + +template +class LogTargetImpl { +public: + + + LogTargetImpl() { + } + + static bool is_enabled() { + return LogTagSetMapping::tagset().is_level(level); + } + + static bool develop_is_enabled() { + ; + return false; + } + + static void print(const char* fmt, ...) __attribute__((format(printf, 1, 2))) { + va_list args; + +# 194 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_start( +# 194 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 194 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + , +# 194 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + fmt +# 194 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 194 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; + LogTagSetMapping::tagset().vwrite(level, fmt, args); + +# 196 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + __builtin_va_end( +# 196 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + args +# 196 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" 3 4 + ) +# 196 "/home/rehn/source/jdk/open/src/hotspot/share/logging/log.hpp" + ; + } + +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceRefKlass.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" +class LogHandle { +private: + LogTagSet& _tagset; + +public: + template + LogHandle(const LogImpl& type_carrier) + : _tagset(LogTagSetMapping::tagset()) {} + + bool is_level(LogLevelType level) { + return _tagset.is_level(level); + } + + LogTagSet& tagset() const { + return _tagset; + } +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + __attribute__((format(printf, 2, 0))) LogHandle& vtrace(const char* fmt, va_list args) { _tagset.vwrite(LogLevel::Trace, fmt, args); return *this; } LogHandle& trace(const char* fmt, ...) __attribute__((format(printf, 2, 3))) { va_list args; +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + __builtin_va_start( +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + args +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + , +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + fmt +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + ) +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + ; _tagset.vwrite(LogLevel::Trace, fmt, args); +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + __builtin_va_end( +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + args +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + ) +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + ; return *this; } bool is_trace() { return _tagset.is_level(LogLevel::Trace); } __attribute__((format(printf, 2, 0))) LogHandle& vdebug(const char* fmt, va_list args) { _tagset.vwrite(LogLevel::Debug, fmt, args); return *this; } LogHandle& debug(const char* fmt, ...) __attribute__((format(printf, 2, 3))) { va_list args; +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + __builtin_va_start( +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + args +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + , +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + fmt +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + ) +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + ; _tagset.vwrite(LogLevel::Debug, fmt, args); +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + __builtin_va_end( +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + args +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + ) +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + ; return *this; } bool is_debug() { return _tagset.is_level(LogLevel::Debug); } __attribute__((format(printf, 2, 0))) LogHandle& vinfo(const char* fmt, va_list args) { _tagset.vwrite(LogLevel::Info, fmt, args); return *this; } LogHandle& info(const char* fmt, ...) __attribute__((format(printf, 2, 3))) { va_list args; +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + __builtin_va_start( +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + args +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + , +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + fmt +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + ) +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + ; _tagset.vwrite(LogLevel::Info, fmt, args); +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + __builtin_va_end( +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + args +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + ) +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + ; return *this; } bool is_info() { return _tagset.is_level(LogLevel::Info); } __attribute__((format(printf, 2, 0))) LogHandle& vwarning(const char* fmt, va_list args) { _tagset.vwrite(LogLevel::Warning, fmt, args); return *this; } LogHandle& warning(const char* fmt, ...) __attribute__((format(printf, 2, 3))) { va_list args; +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + __builtin_va_start( +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + args +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + , +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + fmt +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + ) +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + ; _tagset.vwrite(LogLevel::Warning, fmt, args); +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + __builtin_va_end( +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + args +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + ) +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + ; return *this; } bool is_warning() { return _tagset.is_level(LogLevel::Warning); } __attribute__((format(printf, 2, 0))) LogHandle& verror(const char* fmt, va_list args) { _tagset.vwrite(LogLevel::Error, fmt, args); return *this; } LogHandle& error(const char* fmt, ...) __attribute__((format(printf, 2, 3))) { va_list args; +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + __builtin_va_start( +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + args +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + , +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + fmt +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + ) +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + ; _tagset.vwrite(LogLevel::Error, fmt, args); +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + __builtin_va_end( +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + args +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + ) +# 65 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + ; return *this; } bool is_error() { return _tagset.is_level(LogLevel::Error); } + +}; + + + + + +class LogTargetHandle { +private: + const LogLevelType _level; + LogTagSet& _tagset; + +public: + LogTargetHandle(LogLevelType level, LogTagSet& tagset) + : _level(level), + _tagset(tagset) {} + + template + LogTargetHandle(const LogTargetImpl& type_carrier) + : _level(level), + _tagset(LogTagSetMapping::tagset()) {} + + template + static LogTargetHandle create() { + return LogTargetHandle(LogTargetImpl()); + } + + void print(const char* fmt, ...) __attribute__((format(printf, 2, 3))) { + va_list args; + +# 95 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + __builtin_va_start( +# 95 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + args +# 95 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + , +# 95 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + fmt +# 95 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + ) +# 95 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + ; + if (is_enabled()) { + _tagset.vwrite(_level, fmt, args); + } + +# 99 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + __builtin_va_end( +# 99 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + args +# 99 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" 3 4 + ) +# 99 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logHandle.hpp" + ; + } + + bool is_enabled() const { + return _tagset.is_level(_level); + } +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logMessage.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logMessage.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logMessageBuffer.hpp" 1 +# 27 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logMessageBuffer.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logDecorations.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logDecorations.hpp" +class outputStream; + + + + + + +class LogDecorations { + + const jlong _millis; + const jlong _nanos; + const double _elapsed_seconds; + const intx _tid; + LogLevelType _level; + const LogTagSet& _tagset; + + + + static const char* volatile _host_name; + static const char* host_name(); + static const int _pid; + + + void print_time_decoration(outputStream* st) const; void print_utctime_decoration(outputStream* st) const; void print_uptime_decoration(outputStream* st) const; void print_timemillis_decoration(outputStream* st) const; void print_uptimemillis_decoration(outputStream* st) const; void print_timenanos_decoration(outputStream* st) const; void print_uptimenanos_decoration(outputStream* st) const; void print_hostname_decoration(outputStream* st) const; void print_pid_decoration(outputStream* st) const; void print_tid_decoration(outputStream* st) const; void print_level_decoration(outputStream* st) const; void print_tags_decoration(outputStream* st) const; + + + public: + + + static const size_t max_decoration_size = 255; + + LogDecorations(LogLevelType level, const LogTagSet& tagset, const LogDecorators& decorators); + + void set_level(LogLevelType level) { + _level = level; + } + + void print_decoration(LogDecorators::Decorator decorator, outputStream* st) const; + const char* decoration(LogDecorators::Decorator decorator, char* buf, size_t buflen) const; + +}; +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logMessageBuffer.hpp" 2 + + + +class LogMessageBuffer : public StackObj { + friend class LogMessageTest; + protected: + struct LogLine { + LogLevelType level; + size_t message_offset; + }; + static const size_t InitialLineCapacity = 10; + static const size_t InitialMessageBufferCapacity = 1024; + + size_t _message_buffer_size; + size_t _message_buffer_capacity; + char* _message_buffer; + + size_t _line_count; + size_t _line_capacity; + LogLine* _lines; + + bool _allocated; + LogLevelType _least_detailed_level; + size_t (*_prefix_fn)(char*, size_t); + + void initialize_buffers(); + + private: + + LogMessageBuffer(LogMessageBuffer const&) = delete; LogMessageBuffer& operator=(LogMessageBuffer const&) = delete; + + public: + LogMessageBuffer(); + ~LogMessageBuffer(); + + class Iterator { + private: + const LogMessageBuffer& _message; + size_t _current_line_index; + LogLevelType _level; + LogDecorations &_decorations; + + void skip_messages_with_finer_level(); + + public: + Iterator(const LogMessageBuffer& message, LogLevelType level, LogDecorations& decorations) + : _message(message), _current_line_index(0), _level(level), _decorations(decorations) { + skip_messages_with_finer_level(); + } + + void operator++(int) { + _current_line_index++; + skip_messages_with_finer_level(); + } + + bool is_at_end() { + return _current_line_index == _message._line_count; + } + + const char* message() const { + return _message._message_buffer + _message._lines[_current_line_index].message_offset; + } + + const LogDecorations& decorations() { + _decorations.set_level(_message._lines[_current_line_index].level); + return _decorations; + } + }; + + void reset(); + + LogLevelType least_detailed_level() const { + return _least_detailed_level; + } + + Iterator iterator(LogLevelType level, LogDecorations& decorations) const { + return Iterator(*this, level, decorations); + } + + + + + + + + void set_prefix(size_t (*prefix_fn)(char*, size_t)) { + _prefix_fn = prefix_fn; + } + + __attribute__((format(printf, 3, 4))) + void write(LogLevelType level, const char* fmt, ...); + + __attribute__((format(printf, 3, 0))) + virtual void vwrite(LogLevelType level, const char* fmt, va_list args); + + + + + LogMessageBuffer& vtrace(const char* fmt, va_list args) __attribute__((format(printf, 2, 0))); LogMessageBuffer& trace(const char* fmt, ...) __attribute__((format(printf, 2, 3))); LogMessageBuffer& vdebug(const char* fmt, va_list args) __attribute__((format(printf, 2, 0))); LogMessageBuffer& debug(const char* fmt, ...) __attribute__((format(printf, 2, 3))); LogMessageBuffer& vinfo(const char* fmt, va_list args) __attribute__((format(printf, 2, 0))); LogMessageBuffer& info(const char* fmt, ...) __attribute__((format(printf, 2, 3))); LogMessageBuffer& vwarning(const char* fmt, va_list args) __attribute__((format(printf, 2, 0))); LogMessageBuffer& warning(const char* fmt, ...) __attribute__((format(printf, 2, 3))); LogMessageBuffer& verror(const char* fmt, va_list args) __attribute__((format(printf, 2, 0))); LogMessageBuffer& error(const char* fmt, ...) __attribute__((format(printf, 2, 3))); + +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logMessage.hpp" 2 +# 62 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logMessage.hpp" +class LogMessageImpl : public LogMessageBuffer { +private: + LogTagSet& _tagset; + bool _has_content; + +protected: + LogMessageImpl(LogTagSet& tagset) + : _tagset(tagset), + _has_content(false) {}; + +public: + ~LogMessageImpl() { + if (_has_content) { + flush(); + } + } + + void flush() { + _tagset.log(*this); + reset(); + } + + void reset() { + _has_content = false; + LogMessageBuffer::reset(); + } + + __attribute__((format(printf, 3, 0))) + void vwrite(LogLevelType level, const char* fmt, va_list args) { + if (!_has_content) { + _has_content = true; + set_prefix(_tagset.write_prefix()); + } + LogMessageBuffer::vwrite(level, fmt, args); + } + + bool is_level(LogLevelType level) const { + return _tagset.is_level(level); + } + + + + + + bool is_trace() const { return _tagset.is_level(LogLevel::Trace); } bool is_debug() const { return _tagset.is_level(LogLevel::Debug); } bool is_info() const { return _tagset.is_level(LogLevel::Info); } bool is_warning() const { return _tagset.is_level(LogLevel::Warning); } bool is_error() const { return _tagset.is_level(LogLevel::Error); } + +}; + +template +class LogMessageTemplate : public LogMessageImpl { +public: + LogMessageTemplate(LogMessageTemplate&&) = default; + LogMessageTemplate() + : LogMessageImpl(LogTagSetMapping::tagset()) {} +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" 2 + + +class LogStreamImplBase : public outputStream { + friend class LogStreamTest_TestLineBufferAllocation_vm_Test; + friend class LogStreamTest_TestLineBufferAllocationCap_vm_Test; + + + static void* operator new (size_t) = delete; + static void* operator new[] (size_t) = delete; + + + + + + class LineBuffer { + char _smallbuf[64]; + char* _buf; + size_t _cap; + size_t _pos; + bool try_ensure_cap(size_t cap); + + public: + LineBuffer(); + ~LineBuffer(); + bool is_empty() const { + return _pos == 0; + } + const char* buffer() const { + return _buf; + } + void append(const char* s, size_t len); + void reset(); + }; + +protected: + LineBuffer _current_line; +}; + +template +class LogStreamImpl : public LogStreamImplBase { +private: + BackingLog _backing_log; + +public: + explicit LogStreamImpl(BackingLog bl) + : _backing_log(bl) {}; + + ~LogStreamImpl() override; + + bool is_enabled() { + return _backing_log.is_enabled(); + } + + void write(const char* s, size_t len) override; +}; + +class LogStream : public LogStreamImpl { + + friend class LogStreamTest_TestLineBufferAllocation_vm_Test; + friend class LogStreamTest_TestLineBufferAllocationCap_vm_Test; + + LogStream(LogStream const&) = delete; LogStream& operator=(LogStream const&) = delete; + +public: + + + + + template + LogStream(const LogTargetImpl& type_carrier) + : LogStreamImpl(LogTargetHandle(level, LogTagSetMapping::tagset())) {} + + + + + + + template + LogStream(const LogTargetImpl* type_carrier) + : LogStreamImpl(LogTargetHandle(level, LogTagSetMapping::tagset())) {} + + + + + + + LogStream(LogTargetHandle handle) + : LogStreamImpl(handle) {} + + + + + LogStream(LogLevelType level, LogTagSet& tagset) + : LogStreamImpl(LogTargetHandle(level, tagset)) {} + + +}; + + + + +template +class LogStreamTemplate : public LogStream { +public: + LogStreamTemplate() + : LogStream((LogTargetImpl*)nullptr) {} +}; + +class LogMessageHandle { + const LogLevelType _level; + LogMessageImpl& _lm; + +public: + LogMessageHandle(const LogLevelType level, LogMessageImpl& lm) + : _level(level), _lm(lm) {} + + bool is_enabled() { + return _lm.is_level(_level); + } + + void print(const char* fmt, ...) __attribute__((format(printf, 2, 3))) { + va_list args; + +# 153 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" 3 4 + __builtin_va_start( +# 153 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" + args +# 153 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" 3 4 + , +# 153 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" + fmt +# 153 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" 3 4 + ) +# 153 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" + ; + if (is_enabled()) { + _lm.vwrite(_level, fmt, args); + } + +# 157 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" 3 4 + __builtin_va_end( +# 157 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" + args +# 157 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" 3 4 + ) +# 157 "/home/rehn/source/jdk/open/src/hotspot/share/logging/logStream.hpp" + ; + } +}; + +class NonInterleavingLogStream : public LogStreamImpl { +public: + NonInterleavingLogStream(LogLevelType level, LogMessageImpl& lm) + : LogStreamImpl(LogMessageHandle(level, lm)) {} +}; +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceRefKlass.inline.hpp" 2 +# 42 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceRefKlass.inline.hpp" +template +void InstanceRefKlass::do_referent(oop obj, OopClosureType* closure, Contains& contains) { + T* referent_addr = (T*)java_lang_ref_Reference::referent_addr_raw(obj); + if (contains(referent_addr)) { + Devirtualizer::do_oop(closure, referent_addr); + } +} + +template +void InstanceRefKlass::do_discovered(oop obj, OopClosureType* closure, Contains& contains) { + T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr_raw(obj); + if (contains(discovered_addr)) { + Devirtualizer::do_oop(closure, discovered_addr); + } +} + +static inline oop load_referent(oop obj, ReferenceType type) { + if (type == REF_PHANTOM) { + return HeapAccess::oop_load(java_lang_ref_Reference::referent_addr_raw(obj)); + } else { + return HeapAccess::oop_load(java_lang_ref_Reference::referent_addr_raw(obj)); + } +} + +template +bool InstanceRefKlass::try_discover(oop obj, ReferenceType type, OopClosureType* closure) { + ReferenceDiscoverer* rd = closure->ref_discoverer(); + if (rd != nullptr) { + oop referent = load_referent(obj, type); + if (referent != nullptr) { + if (!referent->is_gc_marked()) { + + return rd->discover_reference(obj, type); + } + } + } + return false; +} + +template +void InstanceRefKlass::oop_oop_iterate_discovery(oop obj, ReferenceType type, OopClosureType* closure, Contains& contains) { + + if (try_discover(obj, type, closure)) { + return; + } + + + do_referent(obj, closure, contains); + do_discovered(obj, closure, contains); +} + +template +void InstanceRefKlass::oop_oop_iterate_discovered_and_discovery(oop obj, ReferenceType type, OopClosureType* closure, Contains& contains) { + + do_discovered(obj, closure, contains); + + oop_oop_iterate_discovery(obj, type, closure, contains); +} + +template +void InstanceRefKlass::oop_oop_iterate_fields(oop obj, OopClosureType* closure, Contains& contains) { + ; + do_referent(obj, closure, contains); + do_discovered(obj, closure, contains); +} + +template +void InstanceRefKlass::oop_oop_iterate_fields_except_referent(oop obj, OopClosureType* closure, Contains& contains) { + ; + do_discovered(obj, closure, contains); +} + +template +void InstanceRefKlass::oop_oop_iterate_ref_processing(oop obj, OopClosureType* closure, Contains& contains) { + switch (closure->reference_iteration_mode()) { + case OopIterateClosure::DO_DISCOVERY: + trace_reference_gc("do_discovery", obj); + oop_oop_iterate_discovery(obj, reference_type(), closure, contains); + break; + case OopIterateClosure::DO_DISCOVERED_AND_DISCOVERY: + trace_reference_gc("do_discovered_and_discovery", obj); + oop_oop_iterate_discovered_and_discovery(obj, reference_type(), closure, contains); + break; + case OopIterateClosure::DO_FIELDS: + trace_reference_gc("do_fields", obj); + oop_oop_iterate_fields(obj, closure, contains); + break; + case OopIterateClosure::DO_FIELDS_EXCEPT_REFERENT: + trace_reference_gc("do_fields_except_referent", obj); + oop_oop_iterate_fields_except_referent(obj, closure, contains); + break; + default: + do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/oops/instanceRefKlass.inline.hpp", 134); } while (0); + } +} + +class AlwaysContains { + public: + template bool operator()(T* p) const { return true; } +}; + +template +void InstanceRefKlass::oop_oop_iterate_ref_processing(oop obj, OopClosureType* closure) { + AlwaysContains always_contains; + oop_oop_iterate_ref_processing(obj, closure, always_contains); +} + +class MrContains { + const MemRegion _mr; + public: + MrContains(MemRegion mr) : _mr(mr) {} + template bool operator()(T* p) const { return _mr.contains(p); } +}; + +template +void InstanceRefKlass::oop_oop_iterate_ref_processing_bounded(oop obj, OopClosureType* closure, MemRegion mr) { + const MrContains contains(mr); + oop_oop_iterate_ref_processing(obj, closure, contains); +} + +template +void InstanceRefKlass::oop_oop_iterate(oop obj, OopClosureType* closure) { + InstanceKlass::oop_oop_iterate(obj, closure); + + oop_oop_iterate_ref_processing(obj, closure); +} + +template +void InstanceRefKlass::oop_oop_iterate_reverse(oop obj, OopClosureType* closure) { + InstanceKlass::oop_oop_iterate_reverse(obj, closure); + + oop_oop_iterate_ref_processing(obj, closure); +} + +template +void InstanceRefKlass::oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr) { + InstanceKlass::oop_oop_iterate_bounded(obj, closure, mr); + + oop_oop_iterate_ref_processing_bounded(obj, closure, mr); +} +# 39 "/home/rehn/source/jdk/open/src/hotspot/share/memory/iterator.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceStackChunkKlass.inline.hpp" 1 +# 27 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceStackChunkKlass.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceStackChunkKlass.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceStackChunkKlass.hpp" +class ClassFileParser; +class MemRegion; +# 102 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceStackChunkKlass.hpp" +class InstanceStackChunkKlass: public InstanceKlass { + friend class VMStructs; + friend class InstanceKlass; + friend class Continuations; + +public: + static const KlassKind Kind = InstanceStackChunkKlassKind; + +private: + static int _offset_of_stack; + + InstanceStackChunkKlass(const ClassFileParser& parser); + +public: + InstanceStackChunkKlass() { ; } + + + static InstanceStackChunkKlass* cast(Klass* k) { + ; + return static_cast(k); + } + + inline size_t instance_size(size_t stack_size_in_words) const; + + static inline size_t bitmap_size_in_bits(size_t stack_size_in_words); + static inline size_t bitmap_size(size_t stack_size_in_words); + static inline size_t gc_data_size(size_t stack_size_in_words); + + + virtual size_t oop_size(oop obj) const override; + + static void serialize_offsets(class SerializeClosure* f) ; + + static void print_chunk(const stackChunkOop chunk, bool verbose, outputStream* st = tty); + + + + + + + static int offset_of_stack() { return _offset_of_stack; } + static void init_offset_of_stack(); + + + + + + + + template + inline void oop_oop_iterate(oop obj, OopClosureType* closure); + + + + template + inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure); + + + + template + inline void oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr); + +private: + template + inline void oop_oop_iterate_header(stackChunkOop chunk, OopClosureType* closure); + + template + inline void oop_oop_iterate_header_bounded(stackChunkOop chunk, OopClosureType* closure, MemRegion mr); + + template + inline void oop_oop_iterate_stack(stackChunkOop chunk, OopClosureType* closure); + + template + inline void oop_oop_iterate_stack_bounded(stackChunkOop chunk, OopClosureType* closure, MemRegion mr); + + template + inline void oop_oop_iterate_stack_with_bitmap(stackChunkOop chunk, OopClosureType* closure, intptr_t* start, intptr_t* end); + + void do_methods(stackChunkOop chunk, OopIterateClosure* cl); + + void oop_oop_iterate_stack_slow(stackChunkOop chunk, OopIterateClosure* closure, MemRegion mr); +}; +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceStackChunkKlass.inline.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/stackChunkOop.inline.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/oops/stackChunkOop.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/stackChunkOop.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/stackChunkOop.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stackChunkFrameStream.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stackChunkFrameStream.hpp" +class CodeBlob; +class frame; +class ImmutableOopMap; +class RegisterMap; +class VMRegImpl; +typedef VMRegImpl* VMReg; + +enum ChunkFrames { CompiledOnly, Mixed }; + +template +class StackChunkFrameStream : public StackObj { +private: + intptr_t* _end; + intptr_t* _sp; + intptr_t* _unextended_sp; + CodeBlob* _cb; + mutable const ImmutableOopMap* _oopmap; +# 60 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stackChunkFrameStream.hpp" +public: + StackChunkFrameStream() { } + inline StackChunkFrameStream(stackChunkOop chunk); + inline StackChunkFrameStream(stackChunkOop chunk, const frame& f); + + bool is_done() const { return _sp >= _end; } + + + intptr_t* sp() const { return _sp; } + inline address pc() const { return get_pc(); } + inline intptr_t* fp() const; + inline intptr_t* unextended_sp() const { return frame_kind == ChunkFrames::Mixed ? _unextended_sp : _sp; } + inline address orig_pc() const; + + inline bool is_interpreted() const; + inline bool is_stub() const; + inline bool is_compiled() const; + CodeBlob* cb() const { return _cb; } + const ImmutableOopMap* oopmap() const { if (_oopmap == nullptr) get_oopmap(); return _oopmap; } + inline int frame_size() const; + inline int stack_argsize() const; + inline int num_oops() const; + + inline void initialize_register_map(RegisterMap* map); + template inline void next(RegisterMapT* map, bool stop = false); + + template inline void update_reg_map(RegisterMapT* map); + + void handle_deopted() const; + + inline frame to_frame() const; + + + + + + + void print_on(outputStream* st) const {}; + + private: + inline address get_pc() const; + inline void get_cb(); + + inline int interpreter_frame_size() const; + inline int interpreter_frame_num_oops() const; + inline int interpreter_frame_stack_argsize() const; + inline void next_for_interpreter_frame(); + inline intptr_t* unextended_sp_for_interpreter_frame() const; + inline intptr_t* derelativize(int offset) const; + inline void get_oopmap() const; + inline void get_oopmap(address pc, int oopmap_slot) const; + + template inline void update_reg_map_pd(RegisterMapT* map); + + template + inline void* reg_to_loc(VMReg reg, const RegisterMapT* map) const; + + void assert_is_interpreted_and_frame_type_mixed() const {}; + +public: + template + inline void iterate_oops(OopClosureType* closure, const RegisterMapT* map) const; + template + inline void iterate_derived_pointers(DerivedOopClosureType* closure, const RegisterMapT* map) const; +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/oops/stackChunkOop.hpp" 2 + + + +class frame; +class MemRegion; +class RegisterMap; +class VMRegImpl; +typedef VMRegImpl* VMReg; + + + + + + +class stackChunkOopDesc : public instanceOopDesc { +public: + enum class BarrierType { Load, Store }; + +private: + template friend class DoBarriersStackClosure; + + + + + static const uint8_t FLAG_HAS_INTERPRETED_FRAMES = 1 << 0; + static const uint8_t FLAG_CLAIM_RELATIVIZE = 1 << 1; + static const uint8_t FLAG_NOTIFY_RELATIVIZE = 1 << 2; + static const uint8_t FLAG_GC_MODE = 1 << 3; + static const uint8_t FLAG_HAS_BITMAP = 1 << 4; + + bool try_acquire_relativization(); + void release_relativization(); + +public: + static inline stackChunkOop cast(oop obj); + + inline stackChunkOop parent() const; + inline void set_parent(stackChunkOop value); + template + inline void set_parent_raw(oop value); + template + inline void set_parent_access(oop value); + + inline int stack_size() const; + + inline int sp() const; + inline void set_sp(int value); + + inline address pc() const; + inline void set_pc(address value); + + inline int argsize() const; + inline void set_argsize(int value); + + inline uint8_t flags() const; + inline uint8_t flags_acquire() const; + inline void set_flags(uint8_t value); + inline void release_set_flags(uint8_t value); + + inline int max_thawing_size() const; + inline void set_max_thawing_size(int value); + + inline oop cont() const; + template + inline oop cont() const; + inline void set_cont(oop value); + template + inline void set_cont_raw(oop value); + template + inline void set_cont_access(oop value); + + inline int bottom() const; + + inline HeapWord* start_of_stack() const; + + inline intptr_t* start_address() const; + inline intptr_t* end_address() const; + inline intptr_t* bottom_address() const; + inline intptr_t* sp_address() const; + + + inline int to_offset(intptr_t* p) const; + inline intptr_t* from_offset(int offset) const; + + inline bool is_empty() const; + inline bool is_in_chunk(void* p) const; + inline bool is_usable_in_chunk(void* p) const; + + inline bool is_flag(uint8_t flag) const; + inline bool is_flag_acquire(uint8_t flag) const; + inline void set_flag(uint8_t flag, bool value); + inline bool try_set_flags(uint8_t prev_flags, uint8_t new_flags); + inline void clear_flags(); + + inline bool has_mixed_frames() const; + inline void set_has_mixed_frames(bool value); + + inline bool is_gc_mode() const; + inline bool is_gc_mode_acquire() const; + inline void set_gc_mode(bool value); + + inline bool has_bitmap() const; + inline void set_has_bitmap(bool value); + + inline bool has_thaw_slowpath_condition() const; + + inline bool requires_barriers(); + + template + void do_barriers(); + + template + inline void do_barriers(const StackChunkFrameStream& f, const RegisterMapT* map); + + template + void fix_thawed_frame(const frame& f, const RegisterMapT* map); + + template + inline void iterate_stack(StackChunkFrameClosureType* closure); + + + void relativize_derived_pointers_concurrently(); + void transform(); + + inline void* gc_data() const; + inline BitMapView bitmap() const; + inline BitMap::idx_t bit_index_for(intptr_t* p) const; + inline intptr_t* address_for_bit(BitMap::idx_t index) const; + template inline BitMap::idx_t bit_index_for(OopT* p) const; + template inline OopT* address_for_bit(BitMap::idx_t index) const; + + MemRegion range(); + + + + + inline frame relativize(frame fr) const; + inline frame derelativize(frame fr) const; + + frame top_frame(RegisterMap* map); + frame sender(const frame& fr, RegisterMap* map); + + inline int relativize_usp_offset(const frame& fr, const int usp_offset_in_bytes) const; + inline address usp_offset_to_location(const frame& fr, const int usp_offset_in_bytes) const; + inline address reg_to_location(const frame& fr, const RegisterMap* map, VMReg reg) const; + + + inline Method* interpreter_frame_method(const frame& fr); + inline address interpreter_frame_bcp(const frame& fr); + inline intptr_t* interpreter_frame_expression_stack_at(const frame& fr, int index) const; + inline intptr_t* interpreter_frame_local_at(const frame& fr, int index) const; + + int num_java_frames() const; + + inline void copy_from_stack_to_chunk(intptr_t* from, intptr_t* to, int size); + inline void copy_from_chunk_to_stack(intptr_t* from, intptr_t* to, int size); + + template + inline oop load_oop(OopT* addr); + + using oopDesc::print_on; + void print_on(bool verbose, outputStream* st) const; + + + bool verify(size_t* out_size = nullptr, int* out_oops = nullptr, + int* out_frames = nullptr, int* out_interpreted_frames = nullptr) { return true; }; + +private: + template + void do_barriers0(const StackChunkFrameStream& f, const RegisterMapT* map); + + template + inline void iterate_stack(StackChunkFrameClosureType* closure); + + inline intptr_t* relative_base() const; + + inline intptr_t* derelativize_address(int offset) const; + int relativize_address(intptr_t* p) const; + + inline void relativize_frame(frame& fr) const; + inline void derelativize_frame(frame& fr) const; + + inline void relativize_frame_pd(frame& fr) const; + inline void derelativize_frame_pd(frame& fr) const; +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/oops/stackChunkOop.inline.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/collectedHeap.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/collectedHeap.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcCause.hpp" 1 +# 41 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcCause.hpp" +class GCCause : public AllStatic { + public: + enum Cause { + + _java_lang_system_gc, + _full_gc_alot, + _scavenge_alot, + _allocation_profiler, + _jvmti_force_gc, + _gc_locker, + _heap_inspection, + _heap_dump, + _wb_young_gc, + _wb_full_gc, + _wb_breakpoint, + + + _no_gc, + _no_cause_specified, + _allocation_failure, + + + + _codecache_GC_threshold, + _codecache_GC_aggressive, + _metadata_GC_threshold, + _metadata_GC_clear_soft_refs, + + _adaptive_size_policy, + + _g1_inc_collection_pause, + _g1_compaction_pause, + _g1_humongous_allocation, + _g1_periodic_collection, + + _dcmd_gc_run, + + _shenandoah_stop_vm, + _shenandoah_allocation_failure_evac, + _shenandoah_concurrent_gc, + _shenandoah_upgrade_to_full_gc, + + _z_timer, + _z_warmup, + _z_allocation_rate, + _z_allocation_stall, + _z_proactive, + _z_high_usage, + + _last_gc_cause + }; + + inline static bool is_user_requested_gc(GCCause::Cause cause) { + return (cause == GCCause::_java_lang_system_gc || + cause == GCCause::_dcmd_gc_run); + } + + inline static bool is_explicit_full_gc(GCCause::Cause cause) { + return (is_user_requested_gc(cause) || + is_serviceability_requested_gc(cause) || + cause == GCCause::_wb_full_gc); + } + + inline static bool is_serviceability_requested_gc(GCCause::Cause + cause) { + return (cause == GCCause::_jvmti_force_gc || + cause == GCCause::_heap_inspection || + cause == GCCause::_heap_dump); + } + + + inline static bool is_tenured_allocation_failure_gc(GCCause::Cause cause) { + + + + + return (cause == GCCause::_adaptive_size_policy || + cause == GCCause::_allocation_failure); + } + + + inline static bool is_allocation_failure_gc(GCCause::Cause cause) { + + + return (cause == GCCause::_allocation_failure || + cause == GCCause::_adaptive_size_policy || + cause == GCCause::_shenandoah_allocation_failure_evac); + } + + + static const char* to_string(GCCause::Cause cause); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/collectedHeap.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcWhen.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcWhen.hpp" +class GCWhen : AllStatic { + public: + enum Type { + BeforeGC, + AfterGC, + GCWhenEndSentinel + }; + + static const char* to_string(GCWhen::Type when) { + switch (when) { + case BeforeGC: return "Before GC"; + case AfterGC: return "After GC"; + default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/gc/shared/gcWhen.hpp", 43); } while (0); return nullptr; + } + } +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/collectedHeap.hpp" 2 +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/collectedHeap.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/services/memoryUsage.hpp" 1 +# 47 "/home/rehn/source/jdk/open/src/hotspot/share/services/memoryUsage.hpp" +class MemoryUsage { +private: + size_t _initSize; + size_t _used; + size_t _committed; + size_t _maxSize; + +public: + + MemoryUsage(size_t i, size_t u, size_t c, size_t m) : + _initSize(i), _used(u), _committed(c), _maxSize(m) {}; + MemoryUsage() : + _initSize(0), _used(0), _committed(0), _maxSize(0) {}; + + size_t init_size() const { return _initSize; } + size_t used() const { return _used; } + size_t committed() const { return _committed; } + size_t max_size() const { return _maxSize; } + + static size_t undefined_size() { return +# 66 "/home/rehn/source/jdk/open/src/hotspot/share/services/memoryUsage.hpp" 3 4 + (18446744073709551615UL) +# 66 "/home/rehn/source/jdk/open/src/hotspot/share/services/memoryUsage.hpp" + ; } + + inline static jlong convert_to_jlong(size_t val) { + + jlong ret; + if (val == undefined_size()) { + ret = -1L; + } else { + + ret = MIN2(val, (size_t)max_jlong); + } + return ret; + } + + jlong init_size_as_jlong() const { return convert_to_jlong(_initSize); } + jlong used_as_jlong() const { return convert_to_jlong(_used); } + jlong committed_as_jlong() const { return convert_to_jlong(_committed); } + jlong max_size_as_jlong() const { return convert_to_jlong(_maxSize); } +}; +# 39 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/collectedHeap.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/include/jvm_io.h" 1 +# 35 "/home/rehn/source/jdk/open/src/hotspot/share/include/jvm_io.h" +extern "C" { +# 52 "/home/rehn/source/jdk/open/src/hotspot/share/include/jvm_io.h" +__attribute__((visibility("default"))) int +jio_vsnprintf(char *str, size_t count, const char *fmt, va_list args); + +__attribute__((visibility("default"))) int +jio_snprintf(char *str, size_t count, const char *fmt, ...); + +__attribute__((visibility("default"))) int +jio_fprintf(FILE *, const char *fmt, ...); + +__attribute__((visibility("default"))) int +jio_vfprintf(FILE *, const char *fmt, va_list args); + + +} +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 2 + + + + + +class FormatBufferBase { + protected: + char* _buf; + inline FormatBufferBase(char* buf) : _buf(buf) {} + public: + static const int BufferSize = 256; + operator const char *() const { return _buf; } +}; + + +class FormatBufferResource : public FormatBufferBase { + public: + FormatBufferResource(const char * format, ...) __attribute__((format(printf, 2, 3))); +}; + +class FormatBufferDummy {}; + + +template +class FormatBuffer : public FormatBufferBase { + public: + inline FormatBuffer(const char* format, ...) __attribute__((format(printf, 2, 3))); + + inline FormatBuffer(FormatBufferDummy dummy, const char* format, va_list ap) __attribute__((format(printf, 3, 0))); + inline void append(const char* format, ...) __attribute__((format(printf, 2, 3))); + inline void print(const char* format, ...) __attribute__((format(printf, 2, 3))); + inline void printv(const char* format, va_list ap) __attribute__((format(printf, 2, 0))); + + char* buffer() { return _buf; } + int size() { return bufsz; } + + private: + FormatBuffer(FormatBuffer const&) = delete; FormatBuffer& operator=(FormatBuffer const&) = delete; + char _buffer[bufsz]; + + protected: + inline FormatBuffer(); +}; + +template +FormatBuffer::FormatBuffer(const char * format, ...) : FormatBufferBase(_buffer) { + va_list argp; + +# 76 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + __builtin_va_start( +# 76 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + argp +# 76 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + , +# 76 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + format +# 76 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + ) +# 76 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + ; + jio_vsnprintf(_buf, bufsz, format, argp); + +# 78 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + __builtin_va_end( +# 78 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + argp +# 78 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + ) +# 78 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + ; +} + +template +FormatBuffer::FormatBuffer(FormatBufferDummy dummy, const char * format, va_list ap) : FormatBufferBase(_buffer) { + jio_vsnprintf(_buf, bufsz, format, ap); +} + +template +FormatBuffer::FormatBuffer() : FormatBufferBase(_buffer) { + _buf[0] = '\0'; +} + +template +void FormatBuffer::print(const char * format, ...) { + va_list argp; + +# 94 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + __builtin_va_start( +# 94 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + argp +# 94 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + , +# 94 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + format +# 94 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + ) +# 94 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + ; + jio_vsnprintf(_buf, bufsz, format, argp); + +# 96 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + __builtin_va_end( +# 96 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + argp +# 96 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + ) +# 96 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + ; +} + +template +void FormatBuffer::printv(const char * format, va_list argp) { + jio_vsnprintf(_buf, bufsz, format, argp); +} + +template +void FormatBuffer::append(const char* format, ...) { + + + size_t len = strlen(_buf); + char* buf_end = _buf + len; + + va_list argp; + +# 112 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + __builtin_va_start( +# 112 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + argp +# 112 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + , +# 112 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + format +# 112 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + ) +# 112 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + ; + jio_vsnprintf(buf_end, bufsz - len, format, argp); + +# 114 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + __builtin_va_end( +# 114 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + argp +# 114 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" 3 4 + ) +# 114 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/formatBuffer.hpp" + ; +} + + +typedef FormatBuffer<> err_msg; +# 41 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/collectedHeap.hpp" 2 + + + + + + + +class WorkerTask; +class AdaptiveSizePolicy; +class BarrierSet; +class GCHeapLog; +class GCHeapSummary; +class GCTimer; +class GCTracer; +class GCMemoryManager; +class MemoryPool; +class MetaspaceSummary; +class ReservedHeapSpace; +class SoftRefPolicy; +class Thread; +class ThreadClosure; +class VirtualSpaceSummary; +class WorkerThreads; +class nmethod; + +class ParallelObjectIteratorImpl : public CHeapObj { +public: + virtual ~ParallelObjectIteratorImpl() {} + virtual void object_iterate(ObjectClosure* cl, uint worker_id) = 0; +}; + + + + + +class ParallelObjectIterator : public StackObj { + ParallelObjectIteratorImpl* _impl; + +public: + ParallelObjectIterator(uint thread_num); + ~ParallelObjectIterator(); + void object_iterate(ObjectClosure* cl, uint worker_id); +}; +# 94 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/collectedHeap.hpp" +class CollectedHeap : public CHeapObj { + friend class VMStructs; + friend class JVMCIVMStructs; + friend class IsGCActiveMark; + friend class DisableIsGCActiveMark; + friend class MemAllocator; + friend class ParallelObjectIterator; + + private: + GCHeapLog* _gc_heap_log; + + + size_t _capacity_at_last_gc; + size_t _used_at_last_gc; + + + + static Klass* _filler_object_klass; + + protected: + + MemRegion _reserved; + + bool _is_gc_active; + + + static size_t _lab_alignment_reserve; + + static size_t _filler_array_max_size; + + static size_t _stack_chunk_max_size; + + + + + + jlong _last_whole_heap_examined_time_ns; + + unsigned int _total_collections; + unsigned int _total_full_collections; + + + + + + GCCause::Cause _gc_cause; + GCCause::Cause _gc_lastcause; + PerfStringVariable* _perf_gc_cause; + PerfStringVariable* _perf_gc_lastcause; + + + CollectedHeap(); + + + + + + + virtual HeapWord* allocate_new_tlab(size_t min_size, + size_t requested_size, + size_t* actual_size); + + + virtual void resize_all_tlabs(); + + + + + + virtual HeapWord* mem_allocate(size_t size, + bool* gc_overhead_limit_was_exceeded) = 0; + + + static inline size_t filler_array_hdr_size(); + static inline size_t filler_array_min_size(); + + static inline void zap_filler_array_with(HeapWord* start, size_t words, juint value); + + + + + + static inline void fill_with_array(HeapWord* start, size_t words, bool zap = true); + + + static inline void fill_with_object_impl(HeapWord* start, size_t words, bool zap = true); + + virtual void trace_heap(GCWhen::Type when, const GCTracer* tracer); + + + + + public: + enum Name { + None, + Serial, + Parallel, + G1, + Epsilon, + Z, + Shenandoah + }; + + protected: + + + template + static T* named_heap(Name kind) { + CollectedHeap* heap = Universe::heap(); + ; + + ; + return static_cast(heap); + } + + public: + + static inline size_t filler_array_max_size() { + return _filler_array_max_size; + } + + static inline size_t stack_chunk_max_size() { + return _stack_chunk_max_size; + } + + static inline Klass* filler_object_klass() { + return _filler_object_klass; + } + + static inline void set_filler_object_klass(Klass* k) { + _filler_object_klass = k; + } + + virtual Name kind() const = 0; + + virtual const char* name() const = 0; + + + + + + virtual jint initialize() = 0; + + + + + virtual void post_initialize(); + + + virtual void stop() {} + + + virtual void safepoint_synchronize_begin() {} + virtual void safepoint_synchronize_end() {} + + void initialize_reserved_region(const ReservedHeapSpace& rs); + + virtual size_t capacity() const = 0; + virtual size_t used() const = 0; + + + virtual size_t unused() const; + + + size_t free_at_last_gc() const { return _capacity_at_last_gc - _used_at_last_gc; } + size_t used_at_last_gc() const { return _used_at_last_gc; } + void update_capacity_and_used_at_gc(); + + + + + virtual bool is_maximal_no_gc() const = 0; + + + + + + + + virtual size_t max_capacity() const = 0; + + + + + virtual bool is_in(const void* p) const = 0; + + + + void set_gc_cause(GCCause::Cause v); + GCCause::Cause gc_cause() { return _gc_cause; } + + oop obj_allocate(Klass* klass, size_t size, JavaThread* __the_thread__); + virtual oop array_allocate(Klass* klass, size_t size, int length, bool do_zero, JavaThread* __the_thread__); + oop class_allocate(Klass* klass, size_t size, JavaThread* __the_thread__); +# 296 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/collectedHeap.hpp" + static size_t min_fill_size() { + return size_t(align_object_size(oopDesc::header_size())); + } + + static void fill_with_objects(HeapWord* start, size_t words, bool zap = true); + + static void fill_with_object(HeapWord* start, size_t words, bool zap = true); + static void fill_with_object(MemRegion region, bool zap = true) { + fill_with_object(region.start(), region.word_size(), zap); + } + static void fill_with_object(HeapWord* start, HeapWord* end, bool zap = true) { + fill_with_object(start, pointer_delta(end, start), zap); + } + + virtual void fill_with_dummy_object(HeapWord* start, HeapWord* end, bool zap); + static constexpr size_t min_dummy_object_size() { + return oopDesc::header_size(); + } + + static size_t lab_alignment_reserve() { + ; + return _lab_alignment_reserve; + } +# 335 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/collectedHeap.hpp" + virtual void ensure_parsability(bool retire_tlabs); + + + virtual size_t tlab_capacity(Thread *thr) const = 0; + + + virtual size_t tlab_used(Thread *thr) const = 0; + + virtual size_t max_tlab_size() const; + + + + + virtual size_t unsafe_max_tlab_alloc(Thread *thr) const { + do { if (!(false)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/share/gc/shared/collectedHeap.hpp", 349, "guarantee(" "false" ") failed", "thread-local allocation buffers not supported"); } } while (0); + return 0; + } + + + + + virtual bool uses_stack_watermark_barrier() const { return false; } + + + + + virtual void collect(GCCause::Cause cause) = 0; + + + virtual void do_full_collection(bool clear_all_soft_refs) = 0; + + + + + + virtual void collect_as_vm_thread(GCCause::Cause cause); + + virtual MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data, + size_t size, + Metaspace::MetadataType mdtype); +# 383 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/collectedHeap.hpp" + virtual bool requires_barriers(stackChunkOop obj) const = 0; + + + + + bool is_gc_active() const { return _is_gc_active; } + + + unsigned int total_collections() const { return _total_collections; } + unsigned int total_full_collections() const { return _total_full_collections;} + + + void increment_total_collections(bool full = false) { + _total_collections++; + if (full) { + increment_total_full_collections(); + } + } + + void increment_total_full_collections() { _total_full_collections++; } + + + virtual SoftRefPolicy* soft_ref_policy() = 0; + + virtual MemoryUsage memory_usage(); + virtual GrowableArray memory_managers() = 0; + virtual GrowableArray memory_pools() = 0; + + + virtual void object_iterate(ObjectClosure* cl) = 0; + + protected: + virtual ParallelObjectIteratorImpl* parallel_object_iterator(uint thread_num) { + return nullptr; + } + + public: + + virtual void keep_alive(oop obj) {} + + + virtual void prepare_for_verify() = 0; + + + + jlong millis_since_last_whole_heap_examined(); + + + void record_whole_heap_examined_timestamp(); + + private: + + void full_gc_dump(GCTimer* timer, bool before); + + virtual void initialize_serviceability() = 0; + + public: + void pre_full_gc_dump(GCTimer* timer); + void post_full_gc_dump(GCTimer* timer); + + virtual VirtualSpaceSummary create_heap_space_summary(); + GCHeapSummary create_heap_summary(); + + MetaspaceSummary create_metaspace_summary(); + + + + + + virtual bool contains_null(const oop* p) const; + + + virtual void print_on(outputStream* st) const = 0; + + virtual void print() const; + + + + + + virtual void print_extended_on(outputStream* st) const { + print_on(st); + } + + virtual void print_on_error(outputStream* st) const; + + + virtual bool print_location(outputStream* st, void* addr) const = 0; + + + virtual void gc_threads_do(ThreadClosure* tc) const = 0; + + + + virtual void print_tracing_info() const = 0; + + void print_heap_before_gc(); + void print_heap_after_gc(); + + + virtual void register_nmethod(nmethod* nm) = 0; + virtual void unregister_nmethod(nmethod* nm) = 0; + virtual void verify_nmethod(nmethod* nm) = 0; + + void trace_heap_before_gc(const GCTracer* gc_tracer); + void trace_heap_after_gc(const GCTracer* gc_tracer); + + + virtual void verify(VerifyOption option) = 0; + + + + virtual bool supports_concurrent_gc_breakpoints() const; +# 506 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/collectedHeap.hpp" + virtual WorkerThreads* safepoint_workers() { return nullptr; } + + + + + + virtual void pin_object(JavaThread* thread, oop obj) = 0; + virtual void unpin_object(JavaThread* thread, oop obj) = 0; + + + + virtual bool can_load_archived_objects() const { return false; } + virtual HeapWord* allocate_loaded_archive_space(size_t size) { return nullptr; } + virtual void complete_loaded_archive_space(MemRegion archive_space) { } + + virtual bool is_oop(oop object) const; +# 535 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/collectedHeap.hpp" +}; + + + +class GCCauseSetter : StackObj { + CollectedHeap* _heap; + GCCause::Cause _previous_cause; + public: + GCCauseSetter(CollectedHeap* heap, GCCause::Cause cause) { + _heap = heap; + _previous_cause = _heap->gc_cause(); + _heap->set_gc_cause(cause); + } + + ~GCCauseSetter() { + _heap->set_gc_cause(_previous_cause); + } +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/oops/stackChunkOop.inline.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/barrierSetStackChunk.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/barrierSetStackChunk.hpp" +class OopClosure; + +class BarrierSetStackChunk: public CHeapObj { +public: + virtual void encode_gc_mode(stackChunkOop chunk, OopIterator* oop_iterator); + virtual void decode_gc_mode(stackChunkOop chunk, OopIterator* oop_iterator); + + virtual oop load_oop(stackChunkOop chunk, oop* addr); + virtual oop load_oop(stackChunkOop chunk, narrowOop* addr); +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/oops/stackChunkOop.inline.hpp" 2 + + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/instanceStackChunkKlass.inline.hpp" 1 +# 38 "/home/rehn/source/jdk/open/src/hotspot/share/oops/stackChunkOop.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/continuationJavaClasses.inline.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/continuationJavaClasses.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/continuationJavaClasses.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/continuationJavaClasses.hpp" +class SerializeClosure; + + +class jdk_internal_vm_ContinuationScope: AllStatic { + friend class JavaClasses; + private: + static int _name_offset; + + static void compute_offsets(); + public: + static void serialize_offsets(SerializeClosure* f) ; +}; + + +class jdk_internal_vm_Continuation: AllStatic { + friend class JavaClasses; + private: + static int _scope_offset; + static int _target_offset; + static int _parent_offset; + static int _yieldInfo_offset; + static int _tail_offset; + static int _mounted_offset; + static int _done_offset; + static int _preempted_offset; + + static void compute_offsets(); + public: + static void serialize_offsets(SerializeClosure* f) ; + + static inline oop scope(oop continuation); + static inline oop parent(oop continuation); + static inline stackChunkOop tail(oop continuation); + static inline void set_tail(oop continuation, stackChunkOop value); + static inline bool done(oop continuation); + static inline bool is_preempted(oop continuation); + static inline void set_preempted(oop continuation, bool value); +}; +# 79 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/continuationJavaClasses.hpp" +class jdk_internal_vm_StackChunk: AllStatic { + friend class JavaClasses; + private: + static int _parent_offset; + static int _size_offset; + static int _sp_offset; + static int _pc_offset; + static int _argsize_offset; + static int _flags_offset; + static int _maxThawingSize_offset; + static int _cont_offset; + + + static void compute_offsets(); + public: + static void serialize_offsets(SerializeClosure* f) ; + + static inline int parent_offset() { return _parent_offset; } + static inline int cont_offset() { return _cont_offset; } + + + static inline oop parent(oop chunk); + static inline void set_parent(oop chunk, oop value); + template + static inline void set_parent_raw(oop chunk, oop value); + template + static inline void set_parent_access(oop chunk, oop value); + + static inline int size(oop chunk); + static inline void set_size(HeapWord* chunk, int value); + + static inline int sp(oop chunk); + static inline void set_sp(oop chunk, int value); + static inline void set_sp(HeapWord* chunk, int value); + static inline address pc(oop chunk); + static inline void set_pc(oop chunk, address value); + static inline int argsize(oop chunk); + static inline void set_argsize(oop chunk, int value); + static inline uint8_t flags(oop chunk); + static inline void set_flags(oop chunk, uint8_t value); + static inline uint8_t flags_acquire(oop chunk); + static inline void release_set_flags(oop chunk, uint8_t value); + static inline bool try_set_flags(oop chunk, uint8_t expected_value, uint8_t new_value); + + static inline int maxThawingSize(oop chunk); + static inline void set_maxThawingSize(oop chunk, int value); + + + static inline oop cont(oop chunk); + template + static inline oop cont_raw(oop chunk); + static inline void set_cont(oop chunk, oop value); + template + static inline void set_cont_raw(oop chunk, oop value); + template + static inline void set_cont_access(oop chunk, oop value); +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/continuationJavaClasses.inline.hpp" 2 + + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/oops/stackChunkOop.inline.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/continuationJavaClasses.inline.hpp" 2 + + +inline oop jdk_internal_vm_Continuation::scope(oop continuation) { + return continuation->obj_field(_scope_offset); +} + +inline oop jdk_internal_vm_Continuation::parent(oop continuation) { + return continuation->obj_field(_parent_offset); +} + +inline stackChunkOop jdk_internal_vm_Continuation::tail(oop continuation) { + return stackChunkOopDesc::cast(continuation->obj_field(_tail_offset)); +} + +inline void jdk_internal_vm_Continuation::set_tail(oop continuation, stackChunkOop value) { + continuation->obj_field_put(_tail_offset, value); +} + +inline bool jdk_internal_vm_Continuation::done(oop continuation) { + return continuation->bool_field(_done_offset); +} + +inline bool jdk_internal_vm_Continuation::is_preempted(oop continuation) { + return continuation->bool_field(_preempted_offset); +} + +inline void jdk_internal_vm_Continuation::set_preempted(oop continuation, bool value) { + continuation->bool_field_put(_preempted_offset, (jboolean)value); +} + + + +inline oop jdk_internal_vm_StackChunk::parent(oop chunk) { + return chunk->obj_field(_parent_offset); +} + +inline void jdk_internal_vm_StackChunk::set_parent(oop chunk, oop value) { + chunk->obj_field_put(_parent_offset, value); +} + +template +inline void jdk_internal_vm_StackChunk::set_parent_raw(oop chunk, oop value) { + RawAccess<>::oop_store(chunk->field_addr

(_parent_offset), value); +} + +template +inline void jdk_internal_vm_StackChunk::set_parent_access(oop chunk, oop value) { + chunk->obj_field_put_access(_parent_offset, value); +} + +inline oop jdk_internal_vm_StackChunk::cont(oop chunk) { + return chunk->obj_field(_cont_offset); +} + +template +inline oop jdk_internal_vm_StackChunk::cont_raw(oop chunk) { + return (oop)RawAccess<>::oop_load(chunk->field_addr

(_cont_offset)); +} + +inline void jdk_internal_vm_StackChunk::set_cont(oop chunk, oop value) { + chunk->obj_field_put(_cont_offset, value); +} + +template +inline void jdk_internal_vm_StackChunk::set_cont_raw(oop chunk, oop value) { + RawAccess<>::oop_store(chunk->field_addr

(_cont_offset), value); +} + +template +inline void jdk_internal_vm_StackChunk::set_cont_access(oop chunk, oop value) { + chunk->obj_field_put_access(_cont_offset, value); +} + +inline int jdk_internal_vm_StackChunk::size(oop chunk) { + return chunk->int_field(_size_offset); +} + +inline void jdk_internal_vm_StackChunk::set_size(HeapWord* chunk, int value) { + + + ; + *(int*)(((char*)chunk) + _size_offset) = (int)value; +} + +inline int jdk_internal_vm_StackChunk::sp(oop chunk) { + return chunk->int_field(_sp_offset); +} + +inline void jdk_internal_vm_StackChunk::set_sp(oop chunk, int value) { + chunk->int_field_put(_sp_offset, value); +} + +inline void jdk_internal_vm_StackChunk::set_sp(HeapWord* chunk, int value) { + + + ; + *(int*)(((char*)chunk) + _sp_offset) = (int)value; +} + +inline address jdk_internal_vm_StackChunk::pc(oop chunk) { + return chunk->address_field(_pc_offset); +} + +inline void jdk_internal_vm_StackChunk::set_pc(oop chunk, address value) { + chunk->address_field_put(_pc_offset, value); +} + +inline int jdk_internal_vm_StackChunk::argsize(oop chunk) { + return chunk->int_field(_argsize_offset); +} + +inline void jdk_internal_vm_StackChunk::set_argsize(oop chunk, int value) { + chunk->int_field_put(_argsize_offset, value); +} + +inline uint8_t jdk_internal_vm_StackChunk::flags(oop chunk) { + return Atomic::load(chunk->field_addr(_flags_offset)); +} + +inline void jdk_internal_vm_StackChunk::set_flags(oop chunk, uint8_t value) { + Atomic::store(chunk->field_addr(_flags_offset), value); +} + +inline uint8_t jdk_internal_vm_StackChunk::flags_acquire(oop chunk) { + return Atomic::load_acquire(chunk->field_addr(_flags_offset)); +} + +inline void jdk_internal_vm_StackChunk::release_set_flags(oop chunk, uint8_t value) { + Atomic::release_store(chunk->field_addr(_flags_offset), value); +} + +inline bool jdk_internal_vm_StackChunk::try_set_flags(oop chunk, uint8_t expected_value, uint8_t new_value) { + return Atomic::cmpxchg(chunk->field_addr(_flags_offset), expected_value, new_value) == expected_value; +} + +inline int jdk_internal_vm_StackChunk::maxThawingSize(oop chunk) { + return chunk->int_field(_maxThawingSize_offset); +} + +inline void jdk_internal_vm_StackChunk::set_maxThawingSize(oop chunk, int value) { + + + + + chunk->int_field_put(_maxThawingSize_offset, value); +} +# 39 "/home/rehn/source/jdk/open/src/hotspot/share/oops/stackChunkOop.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.inline.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeBlob.inline.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeBlob.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/oopMap.inline.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/oopMap.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.inline.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/oopMap.inline.hpp" 2 + + + + + + +inline const ImmutableOopMap* ImmutableOopMapSet::find_map_at_slot(int slot, int pc_offset) const { + ; + ImmutableOopMapPair* pairs = get_pairs(); + ImmutableOopMapPair* last = &pairs[slot]; + ; + return last->get_from(this); +} + +inline const ImmutableOopMap* ImmutableOopMapPair::get_from(const ImmutableOopMapSet* set) const { + return set->oopmap_at_offset(_oopmap_offset); +} + +inline bool SkipNullValue::should_skip(void* val) { + return val == nullptr || (UseCompressedOops && CompressedOops::is_base(val)); +} + +template +template +void OopMapDo::iterate_oops_do(const frame *fr, const RegisterMapT *reg_map, const ImmutableOopMap* oopmap) { + + ; + + + + if (_derived_oop_fn != nullptr) { + for (OopMapStream oms(oopmap); !oms.is_done(); oms.next()) { + OopMapValue omv = oms.current(); + if (omv.type() != OopMapValue::derived_oop_value) + continue; +# 77 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/oopMap.inline.hpp" + address loc = fr->oopmapreg_to_location(omv.reg(), reg_map); + + + + if (loc == nullptr) { + tty->print("oops reg: "); omv.reg()->print_on(tty); tty->cr(); + fr->print_on(tty); + } + do { if (!(loc != nullptr)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/share/compiler/oopMap.inline.hpp", 85, "guarantee(" "loc != nullptr" ") failed", "missing saved register"); } } while (0); + derived_pointer* derived_loc = (derived_pointer*)loc; + derived_base* base_loc = (derived_base*) fr->oopmapreg_to_location(omv.content_reg(), reg_map); + + + + + + + if (base_loc != nullptr && !SkipNullValue::should_skip((void*)*base_loc)) { + _derived_oop_fn->do_derived_oop(base_loc, derived_loc); + } + } + } + + + if (_oop_fn != nullptr) { + for (OopMapStream oms(oopmap); !oms.is_done(); oms.next()) { + OopMapValue omv = oms.current(); + if (omv.type() != OopMapValue::oop_value && omv.type() != OopMapValue::narrowoop_value) + continue; + void** loc = (void**) fr->oopmapreg_to_location(omv.reg(),reg_map); +# 120 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/oopMap.inline.hpp" + if (loc == nullptr) { + tty->print("oops reg: "); omv.reg()->print_on(tty); tty->cr(); + fr->print_on(tty); + } + do { if (!(loc != nullptr)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/share/compiler/oopMap.inline.hpp", 124, "guarantee(" "loc != nullptr" ") failed", "missing saved register"); } } while (0); + if ( omv.type() == OopMapValue::oop_value ) { + void* val = *loc; + if (ValueFilterT::should_skip(val)) { + + + + + + continue; + } + _oop_fn->do_oop((oop*)loc); + } else if ( omv.type() == OopMapValue::narrowoop_value ) { + narrowOop *nl = (narrowOop*)loc; +# 147 "/home/rehn/source/jdk/open/src/hotspot/share/compiler/oopMap.inline.hpp" + _oop_fn->do_oop(nl); + } + } + } +} + + +template +template +void OopMapDo::oops_do(const frame *fr, const RegisterMapT *reg_map, const ImmutableOopMap* oopmap) { + iterate_oops_do(fr, reg_map, oopmap); +} +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeBlob.inline.hpp" 2 + + + +inline const ImmutableOopMap* CodeBlob::oop_map_for_slot(int slot, address return_address) const { + ; + return _oop_maps->find_map_at_slot(slot, pointer_delta_as_int(return_address, code_begin())); +} +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/compiledMethod.inline.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/code/compiledMethod.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/nativeInst.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/code/nativeInst.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/nativeInst_riscv.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/nativeInst_riscv.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/asm/assembler.hpp" 1 +# 40 "/home/rehn/source/jdk/open/src/hotspot/share/asm/assembler.hpp" +class MacroAssembler; +class AbstractAssembler; +class Label; +# 74 "/home/rehn/source/jdk/open/src/hotspot/share/asm/assembler.hpp" +class Label { + private: + enum { PatchCacheSize = 4 }; + + + + + + + int _loc; + + + + + + + + int _patches[PatchCacheSize]; + int _patch_index; + GrowableArray* _patch_overflow; + + Label(Label const&) = delete; Label& operator=(Label const&) = delete; + protected: + + + bool _is_near; + + + + + + + public: + + + + + void bind_loc(int loc) { + ; + ; + _loc = loc; + } + void bind_loc(int pos, int sect) { bind_loc(CodeBuffer::locator(pos, sect)); } +# 127 "/home/rehn/source/jdk/open/src/hotspot/share/asm/assembler.hpp" + int loc() const { + ; + return _loc; + } + int loc_pos() const { return CodeBuffer::locator_pos(loc()); } + int loc_sect() const { return CodeBuffer::locator_sect(loc()); } + + bool is_bound() const { return _loc >= 0; } + bool is_unbound() const { return _loc == -1 && _patch_index > 0; } + bool is_unused() const { return _loc == -1 && _patch_index == 0; } + + + + bool is_near() { return _is_near; } +# 149 "/home/rehn/source/jdk/open/src/hotspot/share/asm/assembler.hpp" + void add_patch_at(CodeBuffer* cb, int branch_loc, const char* file = nullptr, int line = 0); + + + + + + void patch_instructions(MacroAssembler* masm); + + void init() { + _loc = -1; + _patch_index = 0; + _patch_overflow = nullptr; + _is_near = false; + } + + Label() { + init(); + } + + ~Label() { + ; + } + + void reset() { + init(); + } +}; + + + +class NearLabel : public Label { + public: + NearLabel() : Label() { _is_near = true; } +}; + + + + +class RegisterOrConstant { + private: + Register _r; + intptr_t _c; + + public: + RegisterOrConstant(): _r(noreg), _c(0) {} + RegisterOrConstant(Register r): _r(r), _c(0) {} + RegisterOrConstant(intptr_t c): _r(noreg), _c(c) {} + + Register as_register() const { ; return _r; } + intptr_t as_constant() const { ; return _c; } + + Register register_or_noreg() const { return _r; } + intptr_t constant_or_zero() const { return _c; } + + bool is_register() const { return _r != noreg; } + bool is_constant() const { return _r == noreg; } +}; + + + + +class AbstractAssembler : public ResourceObj { + friend class Label; + + protected: + CodeSection* _code_section; + OopRecorder* _oop_recorder; + + public: + + address addr_at(int pos) const { return code_section()->start() + pos; } + + protected: + + + address target(Label& L) { return code_section()->target(L, pc()); } + + bool is8bit(int x) const { return -0x80 <= x && x < 0x80; } + bool isByte(int x) const { return 0 <= x && x < 0x100; } + bool isShiftCount(int x) const { return 0 <= x && x < 32; } + + + class InstructionMark: public StackObj { + private: + AbstractAssembler* _assm; + + public: + InstructionMark(AbstractAssembler* assm) : _assm(assm) { + ; + _assm->set_inst_mark(); + } + ~InstructionMark() { + _assm->clear_inst_mark(); + } + }; + friend class InstructionMark; + + public: + + class InlineSkippedInstructionsCounter: public StackObj { + private: + AbstractAssembler* _assm; + address _start; + public: + InlineSkippedInstructionsCounter(AbstractAssembler* assm) : _assm(assm), _start(assm->pc()) { + } + ~InlineSkippedInstructionsCounter() { + _assm->register_skipped(checked_cast(_assm->pc() - _start)); + } + }; + + protected: +# 288 "/home/rehn/source/jdk/open/src/hotspot/share/asm/assembler.hpp" + class ShortBranchVerifier: public StackObj { + public: + ShortBranchVerifier(AbstractAssembler* assm) {} + }; + + + + + + template + constexpr T narrow_cast(int x) const { + if (x < 0) { + using stype = std::make_signed_t; + ; + return static_cast(x); + } else { + return checked_cast(x); + } + } + + public: + + + AbstractAssembler(CodeBuffer* code); + + + void flush(); + + void emit_int8( int x1) { code_section()->emit_int8(narrow_cast(x1)); } + + void emit_int16( int x) { code_section()->emit_int16(narrow_cast(x)); } + + void emit_int16( int x1, int x2) { code_section()->emit_int16(narrow_cast(x1), + narrow_cast(x2)); } + + void emit_int24( int x1, int x2, int x3) { code_section()->emit_int24(narrow_cast(x1), + narrow_cast(x2), + narrow_cast(x3)); } + + void emit_int32( uint32_t x) { code_section()->emit_int32(x); } + void emit_int32( int x1, int x2, int x3, int x4) { code_section()->emit_int32(narrow_cast(x1), + narrow_cast(x2), + narrow_cast(x3), + narrow_cast(x4)); } + + void emit_int64( uint64_t x) { code_section()->emit_int64(x); } + + void emit_float( jfloat x) { code_section()->emit_float(x); } + void emit_double( jdouble x) { code_section()->emit_double(x); } + void emit_address(address x) { code_section()->emit_address(x); } + + enum { min_simm10 = -512 }; + + + static bool is_simm(int64_t x, uint w) { + ; + int64_t limes = 1L << (w - 1); + return -limes <= x && x < limes; + } + + static bool is_simm8(int64_t x) { return is_simm(x, 8); } + static bool is_simm9(int64_t x) { return is_simm(x, 9); } + static bool is_simm10(int64_t x) { return is_simm(x, 10); } + static bool is_simm16(int64_t x) { return is_simm(x, 16); } + static bool is_simm32(int64_t x) { return is_simm(x, 32); } + + + static bool is_uimm(uint64_t x, uint w) { + ; + uint64_t limes = 1UL << w; + return x < limes; + } + + static bool is_uimm12(uint64_t x) { return is_uimm(x, 12); } + + + CodeSection* code_section() const { return _code_section; } + CodeBuffer* code() const { return code_section()->outer(); } + int sect() const { return code_section()->index(); } + address pc() const { return code_section()->end(); } + int offset() const { return code_section()->size(); } + int locator() const { return CodeBuffer::locator(offset(), sect()); } + + OopRecorder* oop_recorder() const { return _oop_recorder; } + void set_oop_recorder(OopRecorder* r) { _oop_recorder = r; } + + void register_skipped(int size) { code_section()->register_skipped(size); } + + address inst_mark() const { return code_section()->mark(); } + void set_inst_mark() { code_section()->set_mark(); } + void clear_inst_mark() { code_section()->clear_mark(); } + + + + void relocate(RelocationHolder const& rspec, int format = 0) { + + + ; + code_section()->relocate(code_section()->end(), rspec, format); + } + void relocate( relocInfo::relocType rtype, int format = 0) { + code_section()->relocate(code_section()->end(), rtype, format); + } + + static int code_fill_byte(); + + + + + void block_comment(const char* comment); + + const char* code_string(const char* str); + + + void bind(Label& L); + + + void set_code_section(CodeSection* cs); + + + address start_a_stub(int required_space); + void end_a_stub(); + + address start_a_const(int required_space, int required_align = sizeof(double)); + void end_a_const(CodeSection* cs); + + + + + + address int_constant(jint c) { + CodeSection* c1 = _code_section; + address ptr = start_a_const(sizeof(c), sizeof(c)); + if (ptr != nullptr) { + emit_int32(c); + end_a_const(c1); + } + return ptr; + } + address long_constant(jlong c) { + CodeSection* c1 = _code_section; + address ptr = start_a_const(sizeof(c), sizeof(c)); + if (ptr != nullptr) { + emit_int64(c); + end_a_const(c1); + } + return ptr; + } + address double_constant(jdouble c) { + CodeSection* c1 = _code_section; + address ptr = start_a_const(sizeof(c), sizeof(c)); + if (ptr != nullptr) { + emit_double(c); + end_a_const(c1); + } + return ptr; + } + address float_constant(jfloat c) { + CodeSection* c1 = _code_section; + address ptr = start_a_const(sizeof(c), sizeof(c)); + if (ptr != nullptr) { + emit_float(c); + end_a_const(c1); + } + return ptr; + } + address address_constant(address c) { + CodeSection* c1 = _code_section; + address ptr = start_a_const(sizeof(c), sizeof(c)); + if (ptr != nullptr) { + emit_address(c); + end_a_const(c1); + } + return ptr; + } + address address_constant(address c, RelocationHolder const& rspec) { + CodeSection* c1 = _code_section; + address ptr = start_a_const(sizeof(c), sizeof(c)); + if (ptr != nullptr) { + relocate(rspec); + emit_address(c); + end_a_const(c1); + } + return ptr; + } + address array_constant(BasicType bt, GrowableArray* c, int alignment) { + CodeSection* c1 = _code_section; + int len = c->length(); + int size = type2aelembytes(bt) * len; + address ptr = start_a_const(size, alignment); + if (ptr != nullptr) { + for (int i = 0; i < len; i++) { + jvalue e = c->at(i); + switch(bt) { + case T_BOOLEAN: emit_int8(e.z); break; + case T_BYTE: emit_int8(e.b); break; + case T_CHAR: emit_int16(e.c); break; + case T_SHORT: emit_int16(e.s); break; + case T_INT: emit_int32(e.i); break; + case T_LONG: emit_int64(e.j); break; + case T_FLOAT: emit_float(e.f); break; + case T_DOUBLE: emit_double(e.d); break; + default: + do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/asm/assembler.hpp", 491); } while (0); + } + } + end_a_const(c1); + } + return ptr; + } + + + + void generate_stack_overflow_check( int frame_size_in_bytes ); + virtual void bang_stack_with_offset(int offset) = 0; +# 512 "/home/rehn/source/jdk/open/src/hotspot/share/asm/assembler.hpp" + void pd_patch_instruction(address branch, address target, const char* file, int line); + +}; + +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/asm/assembler.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeCache.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeCache.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcBehaviours.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/gc/shared/gcBehaviours.hpp" +class IsUnloadingBehaviour { + static IsUnloadingBehaviour* _current; + +public: + static bool is_unloading(CompiledMethod* cm); + virtual bool has_dead_oop(CompiledMethod* cm) const = 0; + static IsUnloadingBehaviour* current() { return _current; } + static void set_current(IsUnloadingBehaviour* current) { _current = current; } +}; + +class ClosureIsUnloadingBehaviour: public IsUnloadingBehaviour { + BoolObjectClosure *const _cl; + +public: + ClosureIsUnloadingBehaviour(BoolObjectClosure* is_alive) + : _cl(is_alive) + { } + + virtual bool has_dead_oop(CompiledMethod* cm) const; +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeCache.hpp" 2 + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/memory/heap.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/memory/heap.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/memory/virtualspace.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/memory/virtualspace.hpp" +class outputStream; + + + +class ReservedSpace { + friend class VMStructs; + protected: + char* _base; + size_t _size; + size_t _noaccess_prefix; + size_t _alignment; + size_t _page_size; + bool _special; + int _fd_for_heap; + private: + bool _executable; + + + ReservedSpace(char* base, size_t size, size_t alignment, + size_t page_size, bool special, bool executable); + protected: + + + + + + + + void clear_members(); + void initialize_members(char* base, size_t size, size_t alignment, + size_t page_size, bool special, bool executable); + + void initialize(size_t size, size_t alignment, size_t page_size, + char* requested_address, bool executable); + + void reserve(size_t size, size_t alignment, size_t page_size, + char* requested_address, bool executable); + public: + + ReservedSpace(); + + + explicit ReservedSpace(size_t size); + + + + + ReservedSpace(size_t size, size_t preferred_page_size); + ReservedSpace(size_t size, size_t alignment, size_t page_size, + char* requested_address = nullptr); + + + char* base() const { return _base; } + size_t size() const { return _size; } + char* end() const { return _base + _size; } + size_t alignment() const { return _alignment; } + size_t page_size() const { return _page_size; } + bool special() const { return _special; } + bool executable() const { return _executable; } + size_t noaccess_prefix() const { return _noaccess_prefix; } + bool is_reserved() const { return _base != nullptr; } + void release(); + + + + ReservedSpace first_part(size_t partition_size, size_t alignment); + ReservedSpace last_part (size_t partition_size, size_t alignment); + + + inline ReservedSpace first_part(size_t partition_size); + inline ReservedSpace last_part (size_t partition_size); + + + static size_t page_align_size_up(size_t size); + static size_t page_align_size_down(size_t size); + static size_t allocation_align_size_up(size_t size); + bool contains(const void* p) const { + return (base() <= ((char*)p)) && (((char*)p) < (base() + size())); + } + + + static ReservedSpace space_for_range(char* base, size_t size, size_t alignment, + size_t page_size, bool special, bool executable); +}; + +ReservedSpace +ReservedSpace::first_part(size_t partition_size) +{ + return first_part(partition_size, alignment()); +} + +ReservedSpace ReservedSpace::last_part(size_t partition_size) +{ + return last_part(partition_size, alignment()); +} + + +class ReservedHeapSpace : public ReservedSpace { + private: + void try_reserve_heap(size_t size, size_t alignment, size_t page_size, + char *requested_address); + void try_reserve_range(char *highest_start, char *lowest_start, + size_t attach_point_alignment, char *aligned_HBMA, + char *upper_bound, size_t size, size_t alignment, size_t page_size); + void initialize_compressed_heap(const size_t size, size_t alignment, size_t page_size); + + void establish_noaccess_prefix(); + public: + + + + ReservedHeapSpace(size_t size, size_t forced_base_alignment, size_t page_size, const char* heap_allocation_directory = nullptr); + + + char *compressed_oop_base() const { return _base - _noaccess_prefix; } + MemRegion region() const; +}; + + +class ReservedCodeSpace : public ReservedSpace { + public: + + ReservedCodeSpace(size_t r_size, size_t rs_align, size_t page_size); +}; + + + +class VirtualSpace { + friend class VMStructs; + private: + + char* _low_boundary; + char* _high_boundary; + + + char* _low; + char* _high; + + + + bool _special; + + + bool _executable; + + + + + + + + char* _lower_high; + char* _middle_high; + char* _upper_high; + + char* _lower_high_boundary; + char* _middle_high_boundary; + char* _upper_high_boundary; + + size_t _lower_alignment; + size_t _middle_alignment; + size_t _upper_alignment; + + + char* lower_high() const { return _lower_high; } + char* middle_high() const { return _middle_high; } + char* upper_high() const { return _upper_high; } + + char* lower_high_boundary() const { return _lower_high_boundary; } + char* middle_high_boundary() const { return _middle_high_boundary; } + char* upper_high_boundary() const { return _upper_high_boundary; } + + size_t lower_alignment() const { return _lower_alignment; } + size_t middle_alignment() const { return _middle_alignment; } + size_t upper_alignment() const { return _upper_alignment; } + + public: + + char* low() const { return _low; } + char* high() const { return _high; } + + + char* low_boundary() const { return _low_boundary; } + char* high_boundary() const { return _high_boundary; } + + bool special() const { return _special; } + + public: + + VirtualSpace(); + bool initialize_with_granularity(ReservedSpace rs, size_t committed_byte_size, size_t max_commit_ganularity); + bool initialize(ReservedSpace rs, size_t committed_byte_size); + + + ~VirtualSpace(); + + + size_t reserved_size() const; + + size_t actual_committed_size() const; + + size_t committed_size() const; + + size_t uncommitted_size() const; + + bool contains(const void* p) const; + + + + bool expand_by(size_t bytes, bool pre_touch = false); + void shrink_by(size_t bytes); + void release(); + + void check_for_contiguity() {}; + + + void print_on(outputStream* out) const {}; + void print() const; +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/memory/heap.hpp" 2 + + + + + +class HeapBlock { + friend class VMStructs; + + public: + struct Header { + size_t _length; + bool _used; + }; + + protected: + union { + Header _header; + int64_t _padding[ (sizeof(Header) + sizeof(int64_t)-1) / sizeof(int64_t) ]; + + }; + + public: + + void initialize(size_t length) { _header._length = length; set_used(); } + + void set_length(size_t length) { _header._length = length; } + + + void* allocated_space() const { return (void*)(this + 1); } + size_t length() const { return _header._length; } + + + void set_used() { _header._used = true; } + void set_free() { _header._used = false; } + bool free() { return !_header._used; } +}; + +class FreeBlock: public HeapBlock { + friend class VMStructs; + protected: + FreeBlock* _link; + + public: + + void initialize(size_t length) { HeapBlock::initialize(length); _link= nullptr; } + + + FreeBlock* link() const { return _link; } + void set_link(FreeBlock* link) { _link = link; } +}; + +class CodeHeap : public CHeapObj { + friend class VMStructs; + protected: + VirtualSpace _memory; + VirtualSpace _segmap; + + size_t _number_of_committed_segments; + size_t _number_of_reserved_segments; + size_t _segment_size; + int _log2_segment_size; + + size_t _next_segment; + + FreeBlock* _freelist; + FreeBlock* _last_insert_point; + size_t _freelist_segments; + int _freelist_length; + size_t _max_allocated_capacity; + + const char* _name; + const CodeBlobType _code_blob_type; + int _blob_count; + int _nmethod_count; + int _adapter_count; + int _full_count; + int _fragmentation_count; + + enum { free_sentinel = 0xFF }; + static const int fragmentation_limit = 10000; + static const int freelist_limit = 100; + static char segmap_template[free_sentinel+1]; + + + size_t size_to_segments(size_t size) const { return (size + _segment_size - 1) >> _log2_segment_size; } + size_t segments_to_size(size_t number_of_segments) const { return number_of_segments << _log2_segment_size; } + + size_t segment_for(void* p) const { return ((char*)p - _memory.low()) >> _log2_segment_size; } + bool is_segment_unused(int val) const { return val == free_sentinel; } + void* address_for(size_t i) const { return (void*)(_memory.low() + segments_to_size(i)); } + void* find_block_for(void* p) const; + HeapBlock* block_at(size_t i) const { return (HeapBlock*)address_for(i); } + + + void mark_segmap_as_free(size_t beg, size_t end); + void mark_segmap_as_used(size_t beg, size_t end, bool is_FreeBlock_join); + void invalidate(size_t beg, size_t end, size_t header_bytes); + void clear(size_t beg, size_t end); + void clear(); + static void init_segmap_template(); + + + FreeBlock* following_block(FreeBlock* b); + void insert_after(FreeBlock* a, FreeBlock* b); + bool merge_right (FreeBlock* a); + + + void add_to_freelist(HeapBlock* b); + HeapBlock* search_freelist(size_t length); + + + void* next_used(HeapBlock* b) const; + HeapBlock* block_start(void* p) const; + + + void on_code_mapping(char* base, size_t size); + + public: + CodeHeap(const char* name, const CodeBlobType code_blob_type); + + + bool reserve(ReservedSpace rs, size_t committed_size, size_t segment_size); + bool expand_by(size_t size); + + + void* allocate (size_t size); + void deallocate(void* p); + + + + + + void deallocate_tail(void* p, size_t used_size); + + + char* low() const { return _memory.low(); } + char* high() const { return _memory.high(); } + + char* low_boundary() const { return _memory.low_boundary(); } + char* high_boundary() const { return _memory.high_boundary(); } + + + bool contains(const void* p) const { return low() <= p && p < high(); } + bool contains_blob(const CodeBlob* blob) const { + return contains((void*)blob); + } + + void* find_start(void* p) const; + CodeBlob* find_blob(void* start) const; + size_t alignment_unit() const; + size_t alignment_offset() const; + static size_t header_size() { return sizeof(HeapBlock); } + + size_t segment_size() const { return _segment_size; } + HeapBlock* first_block() const; + HeapBlock* next_block(HeapBlock* b) const; + HeapBlock* split_block(HeapBlock* b, size_t split_seg); + + FreeBlock* freelist() const { return _freelist; } + + size_t allocated_in_freelist() const { return _freelist_segments * CodeCacheSegmentSize; } + int freelist_length() const { return _freelist_length; } + + + void* first() const { return next_used(first_block()); } + + void* next(void* p) const { return next_used(next_block(block_start(p))); } + + + size_t capacity() const; + size_t max_capacity() const; + int allocated_segments() const; + size_t allocated_capacity() const; + size_t max_allocated_capacity() const { return _max_allocated_capacity; } + size_t unallocated_capacity() const { return max_capacity() - allocated_capacity(); } + + + bool accepts(CodeBlobType code_blob_type) const{ return (_code_blob_type == CodeBlobType::All) || + (_code_blob_type == code_blob_type); } + CodeBlobType code_blob_type() const { return _code_blob_type; } + + + const char* name() const { return _name; } + int blob_count() { return _blob_count; } + int nmethod_count() { return _nmethod_count; } + void set_nmethod_count(int count) { _nmethod_count = count; } + int adapter_count() { return _adapter_count; } + void set_adapter_count(int count) { _adapter_count = count; } + int full_count() { return _full_count; } + int report_full() { return Atomic::add(&_full_count, 1); } + +private: + size_t heap_unallocated_capacity() const; + int defrag_segmap(bool do_defrag); + int segmap_hops(size_t beg, size_t end); + +public: + + void verify() {}; + void print() {}; +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeCache.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/mutexLocker.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/mutexLocker.hpp" +extern Mutex* Patching_lock; +extern Mutex* CompiledMethod_lock; +extern Monitor* SystemDictionary_lock; +extern Mutex* InvokeMethodTypeTable_lock; +extern Monitor* InvokeMethodIntrinsicTable_lock; +extern Mutex* SharedDictionary_lock; +extern Monitor* ClassInitError_lock; +extern Mutex* Module_lock; +extern Mutex* CompiledIC_lock; +extern Mutex* InlineCacheBuffer_lock; +extern Mutex* VMStatistic_lock; +extern Mutex* JmethodIdCreation_lock; +extern Mutex* JfieldIdCreation_lock; +extern Monitor* JNICritical_lock; +extern Mutex* JvmtiThreadState_lock; +extern Monitor* EscapeBarrier_lock; +extern Monitor* JvmtiVTMSTransition_lock; +extern Monitor* Heap_lock; + +extern Mutex* PSOldGenExpand_lock; + +extern Mutex* AdapterHandlerLibrary_lock; +extern Mutex* SignatureHandlerLibrary_lock; +extern Mutex* VtableStubs_lock; +extern Mutex* SymbolArena_lock; +extern Monitor* StringDedup_lock; +extern Mutex* StringDedupIntern_lock; +extern Monitor* CodeCache_lock; +extern Mutex* TouchedMethodLog_lock; +extern Mutex* RetData_lock; +extern Monitor* VMOperation_lock; +extern Monitor* Threads_lock; + +extern Mutex* NonJavaThreadsList_lock; +extern Mutex* NonJavaThreadsListSync_lock; +extern Monitor* CGC_lock; + +extern Monitor* STS_lock; +extern Monitor* G1OldGCCount_lock; +extern Mutex* G1RareEvent_lock; +extern Mutex* G1DetachedRefinementStats_lock; +extern Mutex* MarkStackFreeList_lock; +extern Mutex* MarkStackChunkList_lock; +extern Mutex* MonitoringSupport_lock; +extern Monitor* ConcurrentGCBreakpoints_lock; +extern Mutex* Compile_lock; +extern Monitor* MethodCompileQueue_lock; +extern Monitor* CompileThread_lock; +extern Monitor* Compilation_lock; +extern Mutex* CompileTaskAlloc_lock; +extern Mutex* CompileStatistics_lock; +extern Mutex* DirectivesStack_lock; +extern Mutex* MultiArray_lock; +extern Monitor* Terminator_lock; +extern Monitor* InitCompleted_lock; +extern Monitor* BeforeExit_lock; +extern Monitor* Notify_lock; +extern Mutex* ExceptionCache_lock; + + + + + +extern Mutex* RawMonitor_lock; +extern Mutex* PerfDataMemAlloc_lock; +extern Mutex* PerfDataManager_lock; +extern Mutex* OopMapCacheAlloc_lock; + +extern Mutex* FreeList_lock; +extern Mutex* OldSets_lock; +extern Mutex* Uncommit_lock; +extern Monitor* RootRegionScan_lock; + +extern Mutex* Management_lock; +extern Monitor* MonitorDeflation_lock; +extern Monitor* Service_lock; +extern Monitor* Notification_lock; +extern Monitor* PeriodicTask_lock; +extern Monitor* RedefineClasses_lock; +extern Mutex* Verify_lock; +extern Monitor* Zip_lock; +extern Monitor* ThreadsSMRDelete_lock; +extern Mutex* ThreadIdTableCreate_lock; +extern Mutex* SharedDecoder_lock; +extern Mutex* DCmdFactory_lock; +extern Mutex* NMTQuery_lock; + + +extern Mutex* CDSClassFileStream_lock; + +extern Mutex* DumpTimeTable_lock; +extern Mutex* CDSLambda_lock; +extern Mutex* DumpRegion_lock; +extern Mutex* ClassListFile_lock; +extern Mutex* UnregisteredClassesTable_lock; +extern Mutex* LambdaFormInvokers_lock; +extern Mutex* ScratchObjects_lock; + + +extern Mutex* JfrStacktrace_lock; +extern Monitor* JfrMsg_lock; +extern Mutex* JfrBuffer_lock; +extern Monitor* JfrThreadSampler_lock; + + + + + + +extern Mutex* Metaspace_lock; +extern Monitor* MetaspaceCritical_lock; +extern Mutex* ClassLoaderDataGraph_lock; + + +extern Mutex* CodeHeapStateAnalytics_lock; + + +extern Monitor* ContinuationRelativize_lock; + + +extern Monitor* JVMCI_lock; +extern Monitor* JVMCIRuntime_lock; + + +extern Mutex* Bootclasspath_lock; + +extern Mutex* tty_lock; +# 178 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/mutexLocker.hpp" +void print_owned_locks_on_error(outputStream* st); +void print_lock_ranks(outputStream* st); +# 190 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/mutexLocker.hpp" +class MutexLocker: public StackObj { + protected: + Mutex* _mutex; + public: + MutexLocker(Mutex* mutex, Mutex::SafepointCheckFlag flag = Mutex::_safepoint_check_flag) : + _mutex(mutex) { + bool no_safepoint_check = flag == Mutex::_no_safepoint_check_flag; + if (_mutex != nullptr) { + if (no_safepoint_check) { + _mutex->lock_without_safepoint_check(); + } else { + _mutex->lock(); + } + } + } + + MutexLocker(Thread* thread, Mutex* mutex, Mutex::SafepointCheckFlag flag = Mutex::_safepoint_check_flag) : + _mutex(mutex) { + bool no_safepoint_check = flag == Mutex::_no_safepoint_check_flag; + if (_mutex != nullptr) { + if (no_safepoint_check) { + _mutex->lock_without_safepoint_check(thread); + } else { + _mutex->lock(thread); + } + } + } + + ~MutexLocker() { + if (_mutex != nullptr) { + ; + _mutex->unlock(); + } + } + + static void post_initialize(); +}; + + + + + +class MonitorLocker: public MutexLocker { + Mutex::SafepointCheckFlag _flag; + + protected: + Monitor* as_monitor() const { + return static_cast(_mutex); + } + + public: + MonitorLocker(Monitor* monitor, Mutex::SafepointCheckFlag flag = Mutex::_safepoint_check_flag) : + MutexLocker(monitor, flag), _flag(flag) { + + ; + } + + MonitorLocker(Thread* thread, Monitor* monitor, Mutex::SafepointCheckFlag flag = Mutex::_safepoint_check_flag) : + MutexLocker(thread, monitor, flag), _flag(flag) { + + ; + } + + bool wait(int64_t timeout = 0) { + return _flag == Mutex::_safepoint_check_flag ? + as_monitor()->wait(timeout) : as_monitor()->wait_without_safepoint_check(timeout); + } + + void notify_all() { + as_monitor()->notify_all(); + } + + void notify() { + as_monitor()->notify(); + } +}; +# 274 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/mutexLocker.hpp" +class GCMutexLocker: public StackObj { +private: + Mutex* _mutex; + bool _locked; +public: + GCMutexLocker(Mutex* mutex); + ~GCMutexLocker() { if (_locked) _mutex->unlock(); } +}; + + + + +class MutexUnlocker: StackObj { + private: + Mutex* _mutex; + bool _no_safepoint_check; + + public: + MutexUnlocker(Mutex* mutex, Mutex::SafepointCheckFlag flag = Mutex::_safepoint_check_flag) : + _mutex(mutex), + _no_safepoint_check(flag == Mutex::_no_safepoint_check_flag) { + _mutex->unlock(); + } + + ~MutexUnlocker() { + if (_no_safepoint_check) { + _mutex->lock_without_safepoint_check(); + } else { + _mutex->lock(); + } + } +}; +# 36 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeCache.hpp" 2 +# 76 "/home/rehn/source/jdk/open/src/hotspot/share/code/codeCache.hpp" +class ExceptionCache; +class KlassDepChange; +class OopClosure; +class ShenandoahParallelCodeHeapIterator; +class NativePostCallNop; +class DeoptimizationScope; + +class CodeCache : AllStatic { + friend class VMStructs; + friend class JVMCIVMStructs; + template friend class CodeBlobIterator; + friend class WhiteBox; + friend class CodeCacheLoader; + friend class ShenandoahParallelCodeHeapIterator; + private: + + static GrowableArray* _heaps; + static GrowableArray* _compiled_heaps; + static GrowableArray* _nmethod_heaps; + static GrowableArray* _allocable_heaps; + + static address _low_bound; + static address _high_bound; + static volatile int _number_of_nmethods_with_dependencies; + + static uint8_t _unloading_cycle; + static uint64_t _gc_epoch; + static uint64_t _cold_gc_count; + static size_t _last_unloading_used; + static double _last_unloading_time; + static TruncatedSeq _unloading_gc_intervals; + static TruncatedSeq _unloading_allocation_rates; + static volatile bool _unloading_threshold_gc_requested; + static nmethod* volatile _unlinked_head; + + static ExceptionCache* volatile _exception_cache_purge_list; + + + static void initialize_heaps(); + + static void check_heap_sizes(size_t non_nmethod_size, size_t profiled_size, size_t non_profiled_size, size_t cache_size, bool all_set); + + static void add_heap(ReservedSpace rs, const char* name, CodeBlobType code_blob_type); + static CodeHeap* get_code_heap_containing(void* p); + static CodeHeap* get_code_heap(const CodeBlob* cb); + static CodeHeap* get_code_heap(CodeBlobType code_blob_type); + + static const char* get_code_heap_flag_name(CodeBlobType code_blob_type); + static ReservedCodeSpace reserve_heap_memory(size_t size, size_t rs_ps); + + + static CodeBlob* first_blob(CodeHeap* heap); + static CodeBlob* first_blob(CodeBlobType code_blob_type); + static CodeBlob* next_blob(CodeHeap* heap, CodeBlob* cb); + + private: + static size_t bytes_allocated_in_freelists(); + static int allocated_segments(); + static size_t freelists_length(); + + + static bool contains(CodeBlob *p) { do { (*g_assert_poison) = 'X';; report_fatal(INTERNAL_ERROR, "src/hotspot/share/code/codeCache.hpp", 137, "don't call me!"); } while (0); return false; } + + public: + + static void initialize(); + static size_t page_size(bool aligned = true, size_t min_pages = 1); + + static int code_heap_compare(CodeHeap* const &lhs, CodeHeap* const &rhs); + + static void add_heap(CodeHeap* heap); + static const GrowableArray* heaps() { return _heaps; } + static const GrowableArray* compiled_heaps() { return _compiled_heaps; } + static const GrowableArray* nmethod_heaps() { return _nmethod_heaps; } + + + static CodeBlob* allocate(int size, CodeBlobType code_blob_type, bool handle_alloc_failure = true, CodeBlobType orig_code_blob_type = CodeBlobType::All); + static void commit(CodeBlob* cb); + static int alignment_unit(); + static int alignment_offset(); + static void free(CodeBlob* cb); + static void free_unused_tail(CodeBlob* cb, size_t used); + static bool contains(void *p); + static bool contains(nmethod* nm); + static void blobs_do(void f(CodeBlob* cb)); + static void blobs_do(CodeBlobClosure* f); + static void nmethods_do(void f(nmethod* nm)); + static void metadata_do(MetadataClosure* f); + + + static CodeBlob* find_blob(void* start); + static CodeBlob* find_blob_fast(void* start); + static CodeBlob* find_blob_and_oopmap(void* start, int& slot); + static int find_oopmap_slot_fast(void* start); + static nmethod* find_nmethod(void* start); + static CompiledMethod* find_compiled(void* start); + + static int blob_count(); + static int blob_count(CodeBlobType code_blob_type); + static int adapter_count(); + static int adapter_count(CodeBlobType code_blob_type); + static int nmethod_count(); + static int nmethod_count(CodeBlobType code_blob_type); + + + static void verify_oops(); + + + + + class UnloadingScope: StackObj { + ClosureIsUnloadingBehaviour _is_unloading_behaviour; + IsUnloadingBehaviour* _saved_behaviour; + + public: + UnloadingScope(BoolObjectClosure* is_alive); + ~UnloadingScope(); + }; + + + static uint64_t cold_gc_count(); + static void update_cold_gc_count(); + static void gc_on_allocation(); + + + + static uint64_t gc_epoch(); + static bool is_gc_marking_cycle_active(); + static uint64_t previous_completed_gc_marking_cycle(); + static void on_gc_marking_cycle_start(); + static void on_gc_marking_cycle_finish(); + + + + + + + + static void arm_all_nmethods(); + + static void flush_unlinked_nmethods(); + static void register_unlinked(nmethod* nm); + static void do_unloading(bool unloading_occurred); + static uint8_t unloading_cycle() { return _unloading_cycle; } + + static void increment_unloading_cycle(); + + static void release_exception_cache(ExceptionCache* entry); + static void purge_exception_caches(); + + + static void print(); + static void print_internals(); + static void print_memory_overhead(); + static void verify(); + static void print_trace(const char* event, CodeBlob* cb, int size = 0) {}; + static void print_summary(outputStream* st, bool detailed = true); + static void log_state(outputStream* st); + static void write_perf_map(); + static const char* get_code_heap_name(CodeBlobType code_blob_type) { return (heap_available(code_blob_type) ? get_code_heap(code_blob_type)->name() : "Unused"); } + static void report_codemem_full(CodeBlobType code_blob_type, bool print); + + + static void print_codelist(outputStream* st); + static void print_layout(outputStream* st); + + + static address low_bound() { return _low_bound; } + static address low_bound(CodeBlobType code_blob_type); + static address high_bound() { return _high_bound; } + static address high_bound(CodeBlobType code_blob_type); + + + static size_t capacity(); + static size_t unallocated_capacity(CodeBlobType code_blob_type); + static size_t unallocated_capacity(); + static size_t max_capacity(); + + static double reverse_free_ratio(); + + static size_t max_distance_to_non_nmethod(); + static bool is_non_nmethod(address addr); + + static void clear_inline_caches(); + static void cleanup_inline_caches_whitebox(); + + + static bool heap_available(CodeBlobType code_blob_type); + + + static CodeBlobType get_code_blob_type(CompiledMethod* cm) { + return get_code_heap(cm)->code_blob_type(); + } + + static bool code_blob_type_accepts_compiled(CodeBlobType code_blob_type) { + bool result = code_blob_type == CodeBlobType::All || code_blob_type <= CodeBlobType::MethodProfiled; + return result; + } + + static bool code_blob_type_accepts_nmethod(CodeBlobType type) { + return type == CodeBlobType::All || type <= CodeBlobType::MethodProfiled; + } + + static bool code_blob_type_accepts_allocable(CodeBlobType type) { + return type <= CodeBlobType::All; + } + + + + static CodeBlobType get_code_blob_type(int comp_level) { + if (comp_level == CompLevel_none || + comp_level == CompLevel_simple || + comp_level == CompLevel_full_optimization) { + + return CodeBlobType::MethodNonProfiled; + } else if (comp_level == CompLevel_limited_profile || + comp_level == CompLevel_full_profile) { + + return CodeBlobType::MethodProfiled; + } + do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/share/code/codeCache.hpp", 296); } while (0); + return static_cast(0); + } + + static void verify_clean_inline_caches(); + static void verify_icholder_relocations(); + + + private: + static void mark_for_deoptimization(DeoptimizationScope* deopt_scope, KlassDepChange& changes); + + public: + static void mark_all_nmethods_for_deoptimization(DeoptimizationScope* deopt_scope); + static void mark_for_deoptimization(DeoptimizationScope* deopt_scope, Method* dependee); + static void make_marked_nmethods_deoptimized(); + + + static void mark_dependents_on(DeoptimizationScope* deopt_scope, InstanceKlass* dependee); + + + + static void mark_dependents_for_evol_deoptimization(DeoptimizationScope* deopt_scope); + static void mark_all_nmethods_for_evol_deoptimization(DeoptimizationScope* deopt_scope); + static void old_nmethods_do(MetadataClosure* f) ; + static void unregister_old_nmethod(CompiledMethod* c) ; + + + static void mark_dependents_on_method_for_breakpoint(const methodHandle& dependee); + + + static bool has_nmethods_with_dependencies(); + + static int get_codemem_full_count(CodeBlobType code_blob_type) { + CodeHeap* heap = get_code_heap(code_blob_type); + return (heap != nullptr) ? heap->full_count() : 0; + } + + + + static void aggregate(outputStream *out, size_t granularity); + static void discard(outputStream *out); + static void print_usedSpace(outputStream *out); + static void print_freeSpace(outputStream *out); + static void print_count(outputStream *out); + static void print_space(outputStream *out); + static void print_age(outputStream *out); + static void print_names(outputStream *out); +}; + + + + +template class CodeBlobIterator : public StackObj { + public: + enum LivenessFilter { all_blobs, only_not_unloading }; + + private: + CodeBlob* _code_blob; + GrowableArrayIterator _heap; + GrowableArrayIterator _end; + bool _only_not_unloading; + + void initialize_iteration(T* nm) { + } + + bool next_impl() { + for (;;) { + + if (!next_blob()) { + if (_heap == _end) { + return false; + } + ++_heap; + continue; + } + + + if (_only_not_unloading) { + CompiledMethod* cm = _code_blob->as_compiled_method_or_null(); + if (cm != nullptr && cm->is_unloading()) { + continue; + } + } + + return true; + } + } + + public: + CodeBlobIterator(LivenessFilter filter, T* nm = nullptr) + : _only_not_unloading(filter == only_not_unloading) + { + if (Filter::heaps() == nullptr) { + + + + _code_blob = nullptr; + return; + } + _heap = Filter::heaps()->begin(); + _end = Filter::heaps()->end(); + + _code_blob = nm; + if (nm != nullptr) { + while(!(*_heap)->contains_blob(_code_blob)) { + ++_heap; + } + ; + } + } + + + bool next() { + if (is_relaxed) { + MutexLocker ml(CodeCache_lock, Mutex::_no_safepoint_check_flag); + return next_impl(); + } else { + ; + return next_impl(); + } + } + + bool end() const { return _code_blob == nullptr; } + T* method() const { return (T*)_code_blob; } + +private: + + + bool next_blob() { + if (_heap == _end) { + return false; + } + CodeHeap *heap = *_heap; + + if (_code_blob == nullptr) { + _code_blob = CodeCache::first_blob(heap); + if (_code_blob == nullptr) { + return false; + } else if (Filter::apply(_code_blob)) { + return true; + } + } + + _code_blob = CodeCache::next_blob(heap, _code_blob); + while (_code_blob != nullptr && !Filter::apply(_code_blob)) { + _code_blob = CodeCache::next_blob(heap, _code_blob); + } + return _code_blob != nullptr; + } +}; + +struct CompiledMethodFilter { + static bool apply(CodeBlob* cb) { return cb->is_compiled(); } + static const GrowableArray* heaps() { return CodeCache::compiled_heaps(); } +}; + + +struct NMethodFilter { + static bool apply(CodeBlob* cb) { return cb->is_nmethod(); } + static const GrowableArray* heaps() { return CodeCache::nmethod_heaps(); } +}; + +struct AllCodeBlobsFilter { + static bool apply(CodeBlob* cb) { return true; } + static const GrowableArray* heaps() { return CodeCache::heaps(); } +}; + +typedef CodeBlobIterator CompiledMethodIterator; +typedef CodeBlobIterator RelaxedCompiledMethodIterator; +typedef CodeBlobIterator NMethodIterator; +typedef CodeBlobIterator AllCodeBlobsIterator; +# 33 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" 2 +# 46 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" +class Argument { + public: + enum { + n_int_register_parameters_c = 8, + n_float_register_parameters_c = 8, + + n_int_register_parameters_j = 8, + n_float_register_parameters_j = 8 + }; +}; + + +constexpr Register c_rarg0 = x10; +constexpr Register c_rarg1 = x11; +constexpr Register c_rarg2 = x12; +constexpr Register c_rarg3 = x13; +constexpr Register c_rarg4 = x14; +constexpr Register c_rarg5 = x15; +constexpr Register c_rarg6 = x16; +constexpr Register c_rarg7 = x17; + +constexpr FloatRegister c_farg0 = f10; +constexpr FloatRegister c_farg1 = f11; +constexpr FloatRegister c_farg2 = f12; +constexpr FloatRegister c_farg3 = f13; +constexpr FloatRegister c_farg4 = f14; +constexpr FloatRegister c_farg5 = f15; +constexpr FloatRegister c_farg6 = f16; +constexpr FloatRegister c_farg7 = f17; +# 91 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" +constexpr Register j_rarg0 = c_rarg1; +constexpr Register j_rarg1 = c_rarg2; +constexpr Register j_rarg2 = c_rarg3; +constexpr Register j_rarg3 = c_rarg4; +constexpr Register j_rarg4 = c_rarg5; +constexpr Register j_rarg5 = c_rarg6; +constexpr Register j_rarg6 = c_rarg7; +constexpr Register j_rarg7 = c_rarg0; + + + +constexpr FloatRegister j_farg0 = f10; +constexpr FloatRegister j_farg1 = f11; +constexpr FloatRegister j_farg2 = f12; +constexpr FloatRegister j_farg3 = f13; +constexpr FloatRegister j_farg4 = f14; +constexpr FloatRegister j_farg5 = f15; +constexpr FloatRegister j_farg6 = f16; +constexpr FloatRegister j_farg7 = f17; + + +constexpr Register zr = x0; + +constexpr Register gp = x3; + +constexpr Register tp = x4; + + + + + + + +constexpr Register xmethod = x31; + +constexpr Register ra = x1; + + + +constexpr Register sp = x2; +constexpr Register fp = x8; +constexpr Register xheapbase = x27; +constexpr Register xcpool = x26; +constexpr Register xmonitors = x25; +constexpr Register xlocals = x24; +constexpr Register xthread = x23; +constexpr Register xbcp = x22; +constexpr Register xdispatch = x21; +constexpr Register esp = x20; +constexpr Register x19_sender_sp = x19; + + +constexpr Register t0 = x5; +constexpr Register t1 = x6; +constexpr Register t2 = x7; + +const Register g_INTArgReg[Argument::n_int_register_parameters_c] = { + c_rarg0, c_rarg1, c_rarg2, c_rarg3, c_rarg4, c_rarg5, c_rarg6, c_rarg7 +}; + +const FloatRegister g_FPArgReg[Argument::n_float_register_parameters_c] = { + c_farg0, c_farg1, c_farg2, c_farg3, c_farg4, c_farg5, c_farg6, c_farg7 +}; + + + + +class Address { + public: + + enum mode { no_mode, base_plus_offset, literal }; + + private: + struct Nonliteral { + Nonliteral(Register base, Register index, int64_t offset) + : _base(base), _index(index), _offset(offset) {} + Register _base; + Register _index; + int64_t _offset; + }; + + struct Literal { + Literal(address target, const RelocationHolder& rspec) + : _target(target), _rspec(rspec) {} + + + + address _target; + + RelocationHolder _rspec; + }; + + void assert_is_nonliteral() const {}; + void assert_is_literal() const {}; + + + + + + enum mode _mode; + union { + Nonliteral _nonliteral; + Literal _literal; + }; + + + + void copy_data(const Address& a) { + ; + if (_mode == literal) { + new (&_literal) Literal(a._literal); + } else { + + new (&_nonliteral) Nonliteral(a._nonliteral); + } + } + + public: + + Address() : + _mode(no_mode), + _nonliteral(noreg, noreg, 0) + {} + + Address(Register r) : + _mode(base_plus_offset), + _nonliteral(r, noreg, 0) + {} + + template::value), int> = 0> + Address(Register r, T o) : + _mode(base_plus_offset), + _nonliteral(r, noreg, o) + {} + + Address(Register r, ByteSize disp) : Address(r, in_bytes(disp)) {} + + Address(address target, const RelocationHolder& rspec) : + _mode(literal), + _literal(target, rspec) + {} + + Address(address target, relocInfo::relocType rtype = relocInfo::external_word_type); + + Address(const Address& a) : _mode(a._mode) { copy_data(a); } + + + + + static_assert(std::is_trivially_destructible::value, "must be"); + static_assert(std::is_trivially_destructible::value, "must be"); + + Address& operator=(const Address& a) { + _mode = a._mode; + copy_data(a); + return *this; + } + + ~Address() = default; + + const Register base() const { + assert_is_nonliteral(); + return _nonliteral._base; + } + + long offset() const { + assert_is_nonliteral(); + return _nonliteral._offset; + } + + Register index() const { + assert_is_nonliteral(); + return _nonliteral._index; + } + + mode getMode() const { + return _mode; + } + + bool uses(Register reg) const { + return _mode != literal && base() == reg; + } + + address target() const { + assert_is_literal(); + return _literal._target; + } + + const RelocationHolder& rspec() const { + assert_is_literal(); + return _literal._rspec; + } +}; + + +class RuntimeAddress: public Address { + + public: + + RuntimeAddress(address target) : Address(target, relocInfo::runtime_call_type) {} + ~RuntimeAddress() {} +}; + +class OopAddress: public Address { + + public: + + OopAddress(address target) : Address(target, relocInfo::oop_type) {} + ~OopAddress() {} +}; + +class ExternalAddress: public Address { + private: + static relocInfo::relocType reloc_for_target(address target) { + + + + + return external_word_Relocation::can_be_relocated(target) ? relocInfo::external_word_type : relocInfo::none; + } + + public: + + ExternalAddress(address target) : Address(target, reloc_for_target(target)) {} + ~ExternalAddress() {} +}; + +class InternalAddress: public Address { + + public: + + InternalAddress(address target) : Address(target, relocInfo::internal_word_type) {} + ~InternalAddress() {} +}; + +class Assembler : public AbstractAssembler { +public: + + enum { + instruction_size = 4, + compressed_instruction_size = 2, + }; + + + static bool is_compressed_instr(address instr) { + + + + + + if (UseRVC && (((uint16_t *)instr)[0] & 0b11) != 0b11) { + + return true; + } + + return false; + } + + + + + static unsigned int instr_len(address instr) { + return is_compressed_instr(instr) ? compressed_instruction_size : instruction_size; + } + + + static unsigned int instr_maxlen() { return instruction_size; } + + enum RoundingMode { + rne = 0b000, + rtz = 0b001, + rdn = 0b010, + rup = 0b011, + rmm = 0b100, + rdy = 0b111, + }; + + + static inline uint16_t ld_c_instr(address addr) { + return Bytes::get_native_u2(addr); + } + static inline void sd_c_instr(address addr, uint16_t c_instr) { + Bytes::put_native_u2(addr, c_instr); + } + + + static inline uint32_t ld_instr(address addr) { + return Bytes::get_native_u4(addr); + } + static inline void sd_instr(address addr, uint32_t instr) { + Bytes::put_native_u4(addr, instr); + } + + static inline uint32_t extract(uint32_t val, unsigned msb, unsigned lsb) { + ; + unsigned nbits = msb - lsb + 1; + uint32_t mask = (1U << nbits) - 1; + uint32_t result = val >> lsb; + result &= mask; + return result; + } + + static inline int32_t sextract(uint32_t val, unsigned msb, unsigned lsb) { + ; + int32_t result = val << (31 - msb); + result >>= (31 - msb + lsb); + return result; + } + + static void patch(address a, unsigned msb, unsigned lsb, unsigned val) { + ; + ; + unsigned nbits = msb - lsb + 1; + do { if (!(val < (1U << nbits))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 404, "guarantee(" "val < (1U << nbits)" ") failed", "Field too big for insn"); } } while (0); + unsigned mask = (1U << nbits) - 1; + val <<= lsb; + mask <<= lsb; + unsigned target = ld_instr(a); + target &= ~mask; + target |= val; + sd_instr(a, target); + } + + static void patch(address a, unsigned bit, unsigned val) { + patch(a, bit, bit, val); + } + + static void patch_reg(address a, unsigned lsb, Register reg) { + patch(a, lsb + 4, lsb, reg->raw_encoding()); + } + + static void patch_reg(address a, unsigned lsb, FloatRegister reg) { + patch(a, lsb + 4, lsb, reg->raw_encoding()); + } + + static void patch_reg(address a, unsigned lsb, VectorRegister reg) { + patch(a, lsb + 4, lsb, reg->raw_encoding()); + } + + void emit(unsigned insn) { + emit_int32((jint)insn); + } + + enum csr { + cycle = 0xc00, + time, + instret, + hpmcounter3, + hpmcounter4, + hpmcounter5, + hpmcounter6, + hpmcounter7, + hpmcounter8, + hpmcounter9, + hpmcounter10, + hpmcounter11, + hpmcounter12, + hpmcounter13, + hpmcounter14, + hpmcounter15, + hpmcounter16, + hpmcounter17, + hpmcounter18, + hpmcounter19, + hpmcounter20, + hpmcounter21, + hpmcounter22, + hpmcounter23, + hpmcounter24, + hpmcounter25, + hpmcounter26, + hpmcounter27, + hpmcounter28, + hpmcounter29, + hpmcounter30, + hpmcounter31 = 0xc1f + }; +# 477 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void illegal_instruction(csr csr_reg) { + csrrw(x0, (unsigned)csr_reg, x0); + } +# 494 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void _add(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void _sub(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 25, 0b0100000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void _andr(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b111); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void _orr(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void _xorr(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void sll(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void sra(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 31, 25, 0b0100000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void srl(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void slt(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void sltu(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void _addw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void _subw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 25, 0b0100000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void sllw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void sraw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 31, 25, 0b0100000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void srlw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void mul(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void mulh(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void mulhsu(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void mulhu(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void mulw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void div(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void divu(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void divw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void divuw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void rem(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void remu(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b111); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void remw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void remuw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b111); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; +# 539 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void lb(Register Rd, Register Rs, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 539, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; int32_t val = offset & 0xfff; patch((address)&insn, 6, 0, 0b0000011); patch((address)&insn, 14, 12, 0b000); patch_reg((address)&insn, 15, Rs); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 31, 20, val); emit(insn); }; + void lbu(Register Rd, Register Rs, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 540, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; int32_t val = offset & 0xfff; patch((address)&insn, 6, 0, 0b0000011); patch((address)&insn, 14, 12, 0b100); patch_reg((address)&insn, 15, Rs); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 31, 20, val); emit(insn); }; + void lh(Register Rd, Register Rs, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 541, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; int32_t val = offset & 0xfff; patch((address)&insn, 6, 0, 0b0000011); patch((address)&insn, 14, 12, 0b001); patch_reg((address)&insn, 15, Rs); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 31, 20, val); emit(insn); }; + void lhu(Register Rd, Register Rs, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 542, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; int32_t val = offset & 0xfff; patch((address)&insn, 6, 0, 0b0000011); patch((address)&insn, 14, 12, 0b101); patch_reg((address)&insn, 15, Rs); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 31, 20, val); emit(insn); }; + void _lw(Register Rd, Register Rs, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 543, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; int32_t val = offset & 0xfff; patch((address)&insn, 6, 0, 0b0000011); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 15, Rs); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 31, 20, val); emit(insn); }; + void lwu(Register Rd, Register Rs, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 544, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; int32_t val = offset & 0xfff; patch((address)&insn, 6, 0, 0b0000011); patch((address)&insn, 14, 12, 0b110); patch_reg((address)&insn, 15, Rs); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 31, 20, val); emit(insn); }; + void _ld(Register Rd, Register Rs, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 545, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; int32_t val = offset & 0xfff; patch((address)&insn, 6, 0, 0b0000011); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 15, Rs); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 31, 20, val); emit(insn); }; +# 562 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void flw(FloatRegister Rd, Register Rs, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 562, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0xfff; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 15, Rs); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 31, 20, val); emit(insn); }; + void _fld(FloatRegister Rd, Register Rs, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 563, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0xfff; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 15, Rs); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 31, 20, val); emit(insn); }; +# 587 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void beq(Register Rs1, Register Rs2, const int64_t offset) { do { if (!(is_simm13(offset) && ((offset % 2) == 0))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 587, "guarantee(" "is_simm13(offset) && ((offset % 2) == 0)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0x1fff; uint32_t val11 = (val >> 11) & 0x1; uint32_t val12 = (val >> 12) & 0x1; uint32_t low = (val >> 1) & 0xf; uint32_t high = (val >> 5) & 0x3f; patch((address)&insn, 6, 0, 0b1100011); patch((address)&insn, 14, 12, 0b000); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 7, val11); patch((address)&insn, 11, 8, low); patch((address)&insn, 30, 25, high); patch((address)&insn, 31, val12); emit(insn); }; + void bne(Register Rs1, Register Rs2, const int64_t offset) { do { if (!(is_simm13(offset) && ((offset % 2) == 0))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 588, "guarantee(" "is_simm13(offset) && ((offset % 2) == 0)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0x1fff; uint32_t val11 = (val >> 11) & 0x1; uint32_t val12 = (val >> 12) & 0x1; uint32_t low = (val >> 1) & 0xf; uint32_t high = (val >> 5) & 0x3f; patch((address)&insn, 6, 0, 0b1100011); patch((address)&insn, 14, 12, 0b001); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 7, val11); patch((address)&insn, 11, 8, low); patch((address)&insn, 30, 25, high); patch((address)&insn, 31, val12); emit(insn); }; + void bge(Register Rs1, Register Rs2, const int64_t offset) { do { if (!(is_simm13(offset) && ((offset % 2) == 0))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 589, "guarantee(" "is_simm13(offset) && ((offset % 2) == 0)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0x1fff; uint32_t val11 = (val >> 11) & 0x1; uint32_t val12 = (val >> 12) & 0x1; uint32_t low = (val >> 1) & 0xf; uint32_t high = (val >> 5) & 0x3f; patch((address)&insn, 6, 0, 0b1100011); patch((address)&insn, 14, 12, 0b101); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 7, val11); patch((address)&insn, 11, 8, low); patch((address)&insn, 30, 25, high); patch((address)&insn, 31, val12); emit(insn); }; + void bgeu(Register Rs1, Register Rs2, const int64_t offset) { do { if (!(is_simm13(offset) && ((offset % 2) == 0))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 590, "guarantee(" "is_simm13(offset) && ((offset % 2) == 0)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0x1fff; uint32_t val11 = (val >> 11) & 0x1; uint32_t val12 = (val >> 12) & 0x1; uint32_t low = (val >> 1) & 0xf; uint32_t high = (val >> 5) & 0x3f; patch((address)&insn, 6, 0, 0b1100011); patch((address)&insn, 14, 12, 0b111); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 7, val11); patch((address)&insn, 11, 8, low); patch((address)&insn, 30, 25, high); patch((address)&insn, 31, val12); emit(insn); }; + void blt(Register Rs1, Register Rs2, const int64_t offset) { do { if (!(is_simm13(offset) && ((offset % 2) == 0))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 591, "guarantee(" "is_simm13(offset) && ((offset % 2) == 0)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0x1fff; uint32_t val11 = (val >> 11) & 0x1; uint32_t val12 = (val >> 12) & 0x1; uint32_t low = (val >> 1) & 0xf; uint32_t high = (val >> 5) & 0x3f; patch((address)&insn, 6, 0, 0b1100011); patch((address)&insn, 14, 12, 0b100); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 7, val11); patch((address)&insn, 11, 8, low); patch((address)&insn, 30, 25, high); patch((address)&insn, 31, val12); emit(insn); }; + void bltu(Register Rs1, Register Rs2, const int64_t offset) { do { if (!(is_simm13(offset) && ((offset % 2) == 0))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 592, "guarantee(" "is_simm13(offset) && ((offset % 2) == 0)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0x1fff; uint32_t val11 = (val >> 11) & 0x1; uint32_t val12 = (val >> 12) & 0x1; uint32_t low = (val >> 1) & 0xf; uint32_t high = (val >> 5) & 0x3f; patch((address)&insn, 6, 0, 0b1100011); patch((address)&insn, 14, 12, 0b110); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 7, val11); patch((address)&insn, 11, 8, low); patch((address)&insn, 30, 25, high); patch((address)&insn, 31, val12); emit(insn); }; +# 612 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void sb(Register Rs1, Register Rs2, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 612, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0xfff; uint32_t low = val & 0x1f; uint32_t high = (val >> 5) & 0x7f; patch((address)&insn, 6, 0, 0b0100011); patch((address)&insn, 14, 12, 0b000); patch_reg((address)&insn, 15, Rs2); patch_reg((address)&insn, 20, Rs1); patch((address)&insn, 11, 7, low); patch((address)&insn, 31, 25, high); emit(insn); }; + void sh(Register Rs1, Register Rs2, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 613, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0xfff; uint32_t low = val & 0x1f; uint32_t high = (val >> 5) & 0x7f; patch((address)&insn, 6, 0, 0b0100011); patch((address)&insn, 14, 12, 0b001); patch_reg((address)&insn, 15, Rs2); patch_reg((address)&insn, 20, Rs1); patch((address)&insn, 11, 7, low); patch((address)&insn, 31, 25, high); emit(insn); }; + void _sw(Register Rs1, Register Rs2, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 614, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0xfff; uint32_t low = val & 0x1f; uint32_t high = (val >> 5) & 0x7f; patch((address)&insn, 6, 0, 0b0100011); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 15, Rs2); patch_reg((address)&insn, 20, Rs1); patch((address)&insn, 11, 7, low); patch((address)&insn, 31, 25, high); emit(insn); }; + void _sd(Register Rs1, Register Rs2, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 615, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0xfff; uint32_t low = val & 0x1f; uint32_t high = (val >> 5) & 0x7f; patch((address)&insn, 6, 0, 0b0100011); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 15, Rs2); patch_reg((address)&insn, 20, Rs1); patch((address)&insn, 11, 7, low); patch((address)&insn, 31, 25, high); emit(insn); }; + void fsw(FloatRegister Rs1, Register Rs2, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 616, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0xfff; uint32_t low = val & 0x1f; uint32_t high = (val >> 5) & 0x7f; patch((address)&insn, 6, 0, 0b0100111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 15, Rs2); patch_reg((address)&insn, 20, Rs1); patch((address)&insn, 11, 7, low); patch((address)&insn, 31, 25, high); emit(insn); }; + void _fsd(FloatRegister Rs1, Register Rs2, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 617, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; uint32_t val = offset & 0xfff; uint32_t low = val & 0x1f; uint32_t high = (val >> 5) & 0x7f; patch((address)&insn, 6, 0, 0b0100111); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 15, Rs2); patch_reg((address)&insn, 20, Rs1); patch((address)&insn, 11, 7, low); patch((address)&insn, 31, 25, high); emit(insn); }; +# 633 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void csrrw(Register Rd, const uint32_t csr, Register Rs1) { do { if (!(is_uimm12(csr))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 633, "guarantee(" "is_uimm12(csr)" ") failed", "csr is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1110011); patch((address)&insn, 14, 12, 0b001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch((address)&insn, 31, 20, csr); emit(insn); }; + void csrrs(Register Rd, const uint32_t csr, Register Rs1) { do { if (!(is_uimm12(csr))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 634, "guarantee(" "is_uimm12(csr)" ") failed", "csr is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1110011); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch((address)&insn, 31, 20, csr); emit(insn); }; + void csrrc(Register Rd, const uint32_t csr, Register Rs1) { do { if (!(is_uimm12(csr))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 635, "guarantee(" "is_uimm12(csr)" ") failed", "csr is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1110011); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch((address)&insn, 31, 20, csr); emit(insn); }; +# 653 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void csrrwi(Register Rd, const uint32_t csr, const uint32_t uimm) { do { if (!(is_uimm12(csr))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 653, "guarantee(" "is_uimm12(csr)" ") failed", "csr is invalid"); } } while (0); do { if (!(is_uimm5(uimm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 653, "guarantee(" "is_uimm5(uimm)" ") failed", "uimm is invalid"); } } while (0); unsigned insn = 0; uint32_t val = uimm & 0x1f; patch((address)&insn, 6, 0, 0b1110011); patch((address)&insn, 14, 12, 0b101); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 19, 15, val); patch((address)&insn, 31, 20, csr); emit(insn); }; + void csrrsi(Register Rd, const uint32_t csr, const uint32_t uimm) { do { if (!(is_uimm12(csr))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 654, "guarantee(" "is_uimm12(csr)" ") failed", "csr is invalid"); } } while (0); do { if (!(is_uimm5(uimm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 654, "guarantee(" "is_uimm5(uimm)" ") failed", "uimm is invalid"); } } while (0); unsigned insn = 0; uint32_t val = uimm & 0x1f; patch((address)&insn, 6, 0, 0b1110011); patch((address)&insn, 14, 12, 0b110); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 19, 15, val); patch((address)&insn, 31, 20, csr); emit(insn); }; + void csrrci(Register Rd, const uint32_t csr, const uint32_t uimm) { do { if (!(is_uimm12(csr))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 655, "guarantee(" "is_uimm12(csr)" ") failed", "csr is invalid"); } } while (0); do { if (!(is_uimm5(uimm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 655, "guarantee(" "is_uimm5(uimm)" ") failed", "uimm is invalid"); } } while (0); unsigned insn = 0; uint32_t val = uimm & 0x1f; patch((address)&insn, 6, 0, 0b1110011); patch((address)&insn, 14, 12, 0b111); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 19, 15, val); patch((address)&insn, 31, 20, csr); emit(insn); }; +# 672 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void jal(Register Rd, const int32_t offset) { do { if (!(is_simm21(offset) && ((offset % 2) == 0))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 672, "guarantee(" "is_simm21(offset) && ((offset % 2) == 0)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1101111); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 19, 12, (uint32_t)((offset >> 12) & 0xff)); patch((address)&insn, 20, (uint32_t)((offset >> 11) & 0x1)); patch((address)&insn, 30, 21, (uint32_t)((offset >> 1) & 0x3ff)); patch((address)&insn, 31, (uint32_t)((offset >> 20) & 0x1)); emit(insn); }; +# 689 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void _jalr(Register Rd, Register Rs, const int32_t offset) { do { if (!(is_simm12(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 689, "guarantee(" "is_simm12(offset)" ") failed", "offset is invalid."); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1100111); patch_reg((address)&insn, 7, Rd); patch((address)&insn, 14, 12, 0b000); patch_reg((address)&insn, 15, Rs); int32_t val = offset & 0xfff; patch((address)&insn, 31, 20, val); emit(insn); }; + + + + enum barrier { + i = 0b1000, o = 0b0100, r = 0b0010, w = 0b0001, + ir = i | r, ow = o | w, iorw = i | o | r | w + }; + + void fence(const uint32_t predecessor, const uint32_t successor) { + unsigned insn = 0; + do { if (!(predecessor < 16)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 700, "guarantee(" "predecessor < 16" ") failed", "predecessor is invalid"); } } while (0); + do { if (!(successor < 16)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 701, "guarantee(" "successor < 16" ") failed", "successor is invalid"); } } while (0); + patch((address)&insn, 6, 0, 0b001111); + patch((address)&insn, 11, 7, 0b00000); + patch((address)&insn, 14, 12, 0b000); + patch((address)&insn, 19, 15, 0b00000); + patch((address)&insn, 23, 20, successor); + patch((address)&insn, 27, 24, predecessor); + patch((address)&insn, 31, 28, 0b0000); + emit(insn); + } +# 723 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void ecall() { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1110011); patch((address)&insn, 11, 7, 0b00000); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, 0b00000); patch((address)&insn, 31, 20, 0b000000000000); emit(insn); }; + void _ebreak() { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1110011); patch((address)&insn, 11, 7, 0b00000); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, 0b00000); patch((address)&insn, 31, 20, 0b000000000001); emit(insn); }; + + + +enum Aqrl {relaxed = 0b00, rl = 0b01, aq = 0b10, aqrl = 0b11}; +# 743 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void amoswap_w(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b00001); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amoadd_w(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b00000); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amoxor_w(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b00100); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amoand_w(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b01100); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amoor_w(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b01000); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amomin_w(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b10000); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amomax_w(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b10100); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amominu_w(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b11000); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amomaxu_w(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b11100); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amoswap_d(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b00001); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amoadd_d(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b00000); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amoxor_d(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b00100); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amoand_d(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b01100); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amoor_d(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b01000); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amomin_d(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b10000); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amomax_d(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b10100); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amominu_d(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b11000); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + void amomaxu_d(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = aqrl) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch((address)&insn, 31, 27, 0b11100); patch((address)&insn, 26, 25, memory_order); emit(insn); }; + + +enum operand_size { int8, int16, int32, uint32, int64 }; +# 779 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void lr_w(Register Rd, Register Rs1, Aqrl memory_order = relaxed) { unsigned insn = 0; uint32_t val = memory_order & 0x3; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch((address)&insn, 25, 20, 0b00000); patch((address)&insn, 31, 27, 0b00010); patch((address)&insn, 26, 25, val); emit(insn); }; + void lr_d(Register Rd, Register Rs1, Aqrl memory_order = relaxed) { unsigned insn = 0; uint32_t val = memory_order & 0x3; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch((address)&insn, 25, 20, 0b00000); patch((address)&insn, 31, 27, 0b00010); patch((address)&insn, 26, 25, val); emit(insn); }; +# 798 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void sc_w(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = relaxed) { unsigned insn = 0; uint32_t val = memory_order & 0x3; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs2); patch_reg((address)&insn, 20, Rs1); patch((address)&insn, 31, 27, 0b00011); patch((address)&insn, 26, 25, val); emit(insn); }; + void sc_d(Register Rd, Register Rs1, Register Rs2, Aqrl memory_order = relaxed) { unsigned insn = 0; uint32_t val = memory_order & 0x3; patch((address)&insn, 6, 0, 0b0101111); patch((address)&insn, 14, 12, 0b011); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs2); patch_reg((address)&insn, 20, Rs1); patch((address)&insn, 31, 27, 0b00011); patch((address)&insn, 26, 25, val); emit(insn); }; +# 814 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void fsqrt_s(FloatRegister Rd, FloatRegister Rs1, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 31, 25, 0b0101100); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fsqrt_d(FloatRegister Rd, FloatRegister Rs1, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 31, 25, 0b0101101); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_s_d(FloatRegister Rd, FloatRegister Rs1, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00001); patch((address)&insn, 31, 25, 0b0100000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_d_s(FloatRegister Rd, FloatRegister Rs1, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 31, 25, 0b0100001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 833 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void _addi(Register Rd, Register Rs1, int32_t imm) { do { if (!(is_simm12(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 833, "guarantee(" "is_simm12(imm)" ") failed", "Immediate is out of validity"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 20, imm & 0x00000fff); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void slti(Register Rd, Register Rs1, int32_t imm) { do { if (!(is_simm12(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 834, "guarantee(" "is_simm12(imm)" ") failed", "Immediate is out of validity"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 31, 20, imm & 0x00000fff); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void _addiw(Register Rd, Register Rs1, int32_t imm) { do { if (!(is_simm12(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 835, "guarantee(" "is_simm12(imm)" ") failed", "Immediate is out of validity"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0011011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 20, imm & 0x00000fff); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void _and_imm12(Register Rd, Register Rs1, int32_t imm) { do { if (!(is_simm12(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 836, "guarantee(" "is_simm12(imm)" ") failed", "Immediate is out of validity"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b111); patch((address)&insn, 31, 20, imm & 0x00000fff); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void ori(Register Rd, Register Rs1, int32_t imm) { do { if (!(is_simm12(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 837, "guarantee(" "is_simm12(imm)" ") failed", "Immediate is out of validity"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 31, 20, imm & 0x00000fff); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void xori(Register Rd, Register Rs1, int32_t imm) { do { if (!(is_simm12(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 838, "guarantee(" "is_simm12(imm)" ") failed", "Immediate is out of validity"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 31, 20, imm & 0x00000fff); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 854 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void sltiu(Register Rd, Register Rs1, uint32_t imm) { do { if (!(is_uimm12(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 854, "guarantee(" "is_uimm12(imm)" ") failed", "Immediate is out of validity"); } } while (0); unsigned insn = 0; patch((address)&insn,6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 31, 20, imm & 0x00000fff); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 872 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void _slli(Register Rd, Register Rs1, unsigned shamt) { do { if (!(shamt <= 0x3f)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 872, "guarantee(" "shamt <= 0x3f" ") failed", "Shamt is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 25, 20, shamt); patch((address)&insn, 31, 26, 0b000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void _srai(Register Rd, Register Rs1, unsigned shamt) { do { if (!(shamt <= 0x3f)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 873, "guarantee(" "shamt <= 0x3f" ") failed", "Shamt is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 25, 20, shamt); patch((address)&insn, 31, 26, 0b010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void _srli(Register Rd, Register Rs1, unsigned shamt) { do { if (!(shamt <= 0x3f)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 874, "guarantee(" "shamt <= 0x3f" ") failed", "Shamt is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 25, 20, shamt); patch((address)&insn, 31, 26, 0b000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 892 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void slliw(Register Rd, Register Rs1, unsigned shamt) { do { if (!(shamt <= 0x1f)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 892, "guarantee(" "shamt <= 0x1f" ") failed", "Shamt is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0011011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 24, 20, shamt); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void sraiw(Register Rd, Register Rs1, unsigned shamt) { do { if (!(shamt <= 0x1f)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 893, "guarantee(" "shamt <= 0x1f" ") failed", "Shamt is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0011011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 24, 20, shamt); patch((address)&insn, 31, 25, 0b0100000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void srliw(Register Rd, Register Rs1, unsigned shamt) { do { if (!(shamt <= 0x1f)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 894, "guarantee(" "shamt <= 0x1f" ") failed", "Shamt is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0011011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 24, 20, shamt); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 910 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void _lui(Register Rd, int32_t imm) { int32_t upperImm = imm >> 12; unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110111); patch_reg((address)&insn, 7, Rd); upperImm &= 0x000fffff; patch((address)&insn, 31, 12, upperImm); emit(insn); }; + void auipc(Register Rd, int32_t imm) { int32_t upperImm = imm >> 12; unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010111); patch_reg((address)&insn, 7, Rd); upperImm &= 0x000fffff; patch((address)&insn, 31, 12, upperImm); emit(insn); }; +# 929 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void fmadd_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1000011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 26, 25, 0b00); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch_reg((address)&insn, 27, Rs3); emit(insn); }; + void fmsub_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1000111); patch((address)&insn, 14, 12, rm); patch((address)&insn, 26, 25, 0b00); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch_reg((address)&insn, 27, Rs3); emit(insn); }; + void fnmsub_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1001011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 26, 25, 0b00); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch_reg((address)&insn, 27, Rs3); emit(insn); }; + void fnmadd_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1001111); patch((address)&insn, 14, 12, rm); patch((address)&insn, 26, 25, 0b00); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch_reg((address)&insn, 27, Rs3); emit(insn); }; + void fmadd_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1000011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 26, 25, 0b01); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch_reg((address)&insn, 27, Rs3); emit(insn); }; + void fmsub_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1000111); patch((address)&insn, 14, 12, rm); patch((address)&insn, 26, 25, 0b01); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch_reg((address)&insn, 27, Rs3); emit(insn); }; + void fnmsub_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1001011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 26, 25, 0b01); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch_reg((address)&insn, 27, Rs3); emit(insn); }; + void fnmadd_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, FloatRegister Rs3, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1001111); patch((address)&insn, 14, 12, rm); patch((address)&insn, 26, 25, 0b01); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); patch_reg((address)&insn, 27, Rs3); emit(insn); }; +# 953 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void fsgnj_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 25, 0b0010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fsgnjn_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 25, 0b0010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fsgnjx_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 31, 25, 0b0010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fmin_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 25, 0b0010100); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fmax_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 25, 0b0010100); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fsgnj_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 25, 0b0010001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fsgnjn_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 25, 0b0010001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fsgnjx_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 31, 25, 0b0010001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fmin_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 25, 0b0010101); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fmax_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 25, 0b0010101); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; +# 979 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void feq_s(Register Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 31, 25, 0b1010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void flt_s(Register Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 25, 0b1010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fle_s(Register Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 25, 0b1010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void feq_d(Register Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 31, 25, 0b1010001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fle_d(Register Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 25, 0b1010001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void flt_d(Register Rd, FloatRegister Rs1, FloatRegister Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 25, 0b1010001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; +# 1000 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void fadd_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 31, 25, 0b0000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fsub_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 31, 25, 0b0000100); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fmul_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 31, 25, 0b0001000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fdiv_s(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 31, 25, 0b0001100); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fadd_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 31, 25, 0b0000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fsub_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 31, 25, 0b0000101); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fmul_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 31, 25, 0b0001001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void fdiv_d(FloatRegister Rd, FloatRegister Rs1, FloatRegister Rs2, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 31, 25, 0b0001101); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; +# 1024 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void fcvt_s_w(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 31, 25, 0b1101000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_s_wu(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00001); patch((address)&insn, 31, 25, 0b1101000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_s_l(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00010); patch((address)&insn, 31, 25, 0b1101000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_s_lu(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00011); patch((address)&insn, 31, 25, 0b1101000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_d_w(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 31, 25, 0b1101001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_d_wu(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00001); patch((address)&insn, 31, 25, 0b1101001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_d_l(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00010); patch((address)&insn, 31, 25, 0b1101001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_d_lu(FloatRegister Rd, Register Rs1, RoundingMode rm = rne) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00011); patch((address)&insn, 31, 25, 0b1101001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 1048 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void fcvt_w_s(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 31, 25, 0b1100000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_l_s(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00010); patch((address)&insn, 31, 25, 0b1100000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_wu_s(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00001); patch((address)&insn, 31, 25, 0b1100000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_lu_s(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00011); patch((address)&insn, 31, 25, 0b1100000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_w_d(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 31, 25, 0b1100001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_wu_d(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00001); patch((address)&insn, 31, 25, 0b1100001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_l_d(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00010); patch((address)&insn, 31, 25, 0b1100001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fcvt_lu_d(Register Rd, FloatRegister Rs1, RoundingMode rm = rtz) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, rm); patch((address)&insn, 24, 20, 0b00011); patch((address)&insn, 31, 25, 0b1100001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 1072 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void fmv_w_x(FloatRegister Rd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 20, 0b00000); patch((address)&insn, 31, 25, 0b1111000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fmv_d_x(FloatRegister Rd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 20, 0b00000); patch((address)&insn, 31, 25, 0b1111001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 1090 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void fclass_s(Register Rd, FloatRegister Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 20, 0b00000); patch((address)&insn, 31, 25, 0b1110000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fclass_d(Register Rd, FloatRegister Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 20, 0b00000); patch((address)&insn, 31, 25, 0b1110001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fmv_x_w(Register Rd, FloatRegister Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 20, 0b00000); patch((address)&insn, 31, 25, 0b1110000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void fmv_x_d(Register Rd, FloatRegister Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 20, 0b00000); patch((address)&insn, 31, 25, 0b1110001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + + + + + + +enum SEW { + e8, + e16, + e32, + e64, + RESERVED, +}; + +enum LMUL { + mf8 = 0b101, + mf4 = 0b110, + mf2 = 0b111, + m1 = 0b000, + m2 = 0b001, + m4 = 0b010, + m8 = 0b011, +}; + +enum VMA { + mu, + ma, +}; + +enum VTA { + tu, + ta, +}; + +static Assembler::SEW elembytes_to_sew(int ebytes) { + ; + return (Assembler::SEW) exact_log2(ebytes); +} + +static Assembler::SEW elemtype_to_sew(BasicType etype) { + return Assembler::elembytes_to_sew(type2aelembytes(etype)); +} +# 1162 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vsetvli(Register Rd, Register Rs1, SEW sew, LMUL lmul = m1, VMA vma = mu, VTA vta = tu, bool vill = false) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b111); if (vill == 1) { do { if (!((lmul | sew | vta | vma == 0))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1162, "guarantee(" "(lmul | sew | vta | vma == 0)" ") failed", "the other bits in vtype shall be zero"); } } while (0); } patch((address)&insn, 20 + 2, 20, lmul); patch((address)&insn, 20 + 5, 20 + 3, sew); patch((address)&insn, 20 + 6, vta); patch((address)&insn, 20 + 7, vma); patch((address)&insn, 30 - 1, 20 + 8, 0); patch((address)&insn, 30, vill); patch((address)&insn, 31, 0); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 1180 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vsetivli(Register Rd, uint32_t imm, SEW sew, LMUL lmul = m1, VMA vma = mu, VTA vta = tu, bool vill = false) { unsigned insn = 0; do { if (!(is_uimm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1180, "guarantee(" "is_uimm5(imm)" ") failed", "imm is invalid"); } } while (0); patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b111); patch((address)&insn, 19, 15, imm); if (vill == 1) { do { if (!((lmul | sew | vta | vma == 0))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1180, "guarantee(" "(lmul | sew | vta | vma == 0)" ") failed", "the other bits in vtype shall be zero"); } } while (0); } patch((address)&insn, 20 + 2, 20, lmul); patch((address)&insn, 20 + 5, 20 + 3, sew); patch((address)&insn, 20 + 6, vta); patch((address)&insn, 20 + 7, vma); patch((address)&insn, 29 - 1, 20 + 8, 0); patch((address)&insn, 29, vill); patch((address)&insn, 31, 30, 0b11); patch_reg((address)&insn, 7, Rd); emit(insn); }; +# 1199 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vsetvl(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b111); patch((address)&insn, 31, 25, 0b1000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + + + +enum VectorMask { + v0_t = 0b0, + unmasked = 0b1 +}; +# 1226 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vcpop_m(Register Rd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, 0b10000); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfirst_m(Register Rd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, 0b10001); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1236 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vzext_vf2(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, 0b00110); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vzext_vf4(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, 0b00100); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vzext_vf8(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, 0b00010); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vsext_vf2(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, 0b00111); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vsext_vf4(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, 0b00101); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vsext_vf8(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, 0b00011); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vmsbf_m(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, 0b00001); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsif_m(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, 0b00011); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsof_m(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, 0b00010); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void viota_m(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, 0b10000); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vfcvt_f_x_v(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, 0b00011); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfcvt_rtz_x_f_v(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, 0b00111); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vfwcvt_f_x_v(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, 0b01011); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfwcvt_f_f_v(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, 0b01100); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfwcvt_rtz_x_f_v(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, 0b01111); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vfncvt_f_x_w(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, 0b10011); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfncvt_f_f_w(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, 0b10100); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfncvt_rtz_x_f_w(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, 0b10111); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vfsqrt_v(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, 0b00000); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfclass_v(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, 0b10000); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1276 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vmv1r_v(VectorRegister Vd, VectorRegister Vs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, 0b00000); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b100111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmv2r_v(VectorRegister Vd, VectorRegister Vs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, 0b00001); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b100111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmv4r_v(VectorRegister Vd, VectorRegister Vs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, 0b00011); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b100111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmv8r_v(VectorRegister Vd, VectorRegister Vs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, 0b00111); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b100111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1289 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vfmv_f_s(FloatRegister Rd, VectorRegister Vs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, 0b00000); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1299 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vmv_x_s(Register Rd, VectorRegister Vs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, 0b00000); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1311 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vsra_vi(VectorRegister Vd, VectorRegister Vs2, uint32_t imm, VectorMask vm = unmasked) { do { if (!(is_uimm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1311, "guarantee(" "is_uimm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vsrl_vi(VectorRegister Vd, VectorRegister Vs2, uint32_t imm, VectorMask vm = unmasked) { do { if (!(is_uimm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1312, "guarantee(" "is_uimm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vsll_vi(VectorRegister Vd, VectorRegister Vs2, uint32_t imm, VectorMask vm = unmasked) { do { if (!(is_uimm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1313, "guarantee(" "is_uimm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vslidedown_vi(VectorRegister Vd, VectorRegister Vs2, uint32_t imm, VectorMask vm = unmasked) { do { if (!(is_uimm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1316, "guarantee(" "is_uimm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1326 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vfnmsub_vv(VectorRegister Vd, VectorRegister Vs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfmsub_vv(VectorRegister Vd, VectorRegister Vs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfnmadd_vv(VectorRegister Vd, VectorRegister Vs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfmadd_vv(VectorRegister Vd, VectorRegister Vs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfnmsac_vv(VectorRegister Vd, VectorRegister Vs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfmsac_vv(VectorRegister Vd, VectorRegister Vs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101110); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfmacc_vv(VectorRegister Vd, VectorRegister Vs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfnmacc_vv(VectorRegister Vd, VectorRegister Vs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vnmsub_vv(VectorRegister Vd, VectorRegister Vs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmadd_vv(VectorRegister Vd, VectorRegister Vs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vnmsac_vv(VectorRegister Vd, VectorRegister Vs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmacc_vv(VectorRegister Vd, VectorRegister Vs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1349 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vnmsub_vx(VectorRegister Vd, Register Rs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmadd_vx(VectorRegister Vd, Register Rs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vnmsac_vx(VectorRegister Vd, Register Rs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmacc_vx(VectorRegister Vd, Register Rs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1362 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vfnmsub_vf(VectorRegister Vd, FloatRegister Rs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfmsub_vf(VectorRegister Vd, FloatRegister Rs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfnmadd_vf(VectorRegister Vd, FloatRegister Rs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfmadd_vf(VectorRegister Vd, FloatRegister Rs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfnmsac_vf(VectorRegister Vd, FloatRegister Rs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfmsac_vf(VectorRegister Vd, FloatRegister Rs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101110); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfmacc_vf(VectorRegister Vd, FloatRegister Rs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfnmacc_vf(VectorRegister Vd, FloatRegister Rs1, VectorRegister Vs2, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1379 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vfredusum_vs(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfredosum_vs(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfredmin_vs(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfredmax_vs(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vredsum_vs(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vredand_vs(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vredor_vs(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vredxor_vs(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vredminu_vs(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vredmin_vs(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vredmaxu_vs(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000110); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vredmax_vs(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vmfle_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmflt_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmfne_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmfeq_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vfsgnjx_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfsgnjn_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vfmax_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000110); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfmin_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vfdiv_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfmul_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vfsub_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfadd_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vsmul_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vrem_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vremu_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vdiv_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vdivu_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vmulhsu_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100110); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmulhu_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmulh_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmul_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vmax_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmaxu_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000110); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmin_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vminu_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vmsle_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsleu_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmslt_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsltu_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsne_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmseq_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vsra_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vsrl_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vsll_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vxor_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vor_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vand_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vsub_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vadd_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vrgather_vv(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1471 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vrem_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vremu_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vdiv_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vdivu_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vmulhsu_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100110); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmulhu_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmulh_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmul_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vmax_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmaxu_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000110); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmin_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vminu_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vmsgt_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsgtu_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011110); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsle_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsleu_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmslt_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsltu_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsne_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmseq_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vnsra_wx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vnsrl_wx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vsra_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vsrl_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b101000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vsll_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vxor_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vor_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vand_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vsub_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vadd_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vrsub_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vslidedown_vx(VectorRegister Vd, VectorRegister Vs2, Register Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1528 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vmerge_vxm(VectorRegister Vd, VectorRegister Vs2, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, 0b0); patch((address)&insn, 31, 26, 0b010111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1538 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vfmerge_vfm(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, 0b0); patch((address)&insn, 31, 26, 0b010111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1548 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vmfge_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmfgt_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmfle_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmflt_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmfne_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmfeq_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vfmax_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000110); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfmin_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vfdiv_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfmul_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfrdiv_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vfsub_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfadd_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vfrsub_vf(VectorRegister Vd, VectorRegister Vs2, FloatRegister Rs1, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b100111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1577 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vmsgt_vi(VectorRegister Vd, VectorRegister Vs2, int32_t imm, VectorMask vm = unmasked) { do { if (!(is_simm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1577, "guarantee(" "is_simm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsgtu_vi(VectorRegister Vd, VectorRegister Vs2, int32_t imm, VectorMask vm = unmasked) { do { if (!(is_simm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1578, "guarantee(" "is_simm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011110); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsle_vi(VectorRegister Vd, VectorRegister Vs2, int32_t imm, VectorMask vm = unmasked) { do { if (!(is_simm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1579, "guarantee(" "is_simm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsleu_vi(VectorRegister Vd, VectorRegister Vs2, int32_t imm, VectorMask vm = unmasked) { do { if (!(is_simm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1580, "guarantee(" "is_simm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmsne_vi(VectorRegister Vd, VectorRegister Vs2, int32_t imm, VectorMask vm = unmasked) { do { if (!(is_simm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1581, "guarantee(" "is_simm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmseq_vi(VectorRegister Vd, VectorRegister Vs2, int32_t imm, VectorMask vm = unmasked) { do { if (!(is_simm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1582, "guarantee(" "is_simm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b011000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vxor_vi(VectorRegister Vd, VectorRegister Vs2, int32_t imm, VectorMask vm = unmasked) { do { if (!(is_simm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1583, "guarantee(" "is_simm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vor_vi(VectorRegister Vd, VectorRegister Vs2, int32_t imm, VectorMask vm = unmasked) { do { if (!(is_simm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1584, "guarantee(" "is_simm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vand_vi(VectorRegister Vd, VectorRegister Vs2, int32_t imm, VectorMask vm = unmasked) { do { if (!(is_simm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1585, "guarantee(" "is_simm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b001001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vadd_vi(VectorRegister Vd, VectorRegister Vs2, int32_t imm, VectorMask vm = unmasked) { do { if (!(is_simm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1586, "guarantee(" "is_simm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vrsub_vi(VectorRegister Vd, VectorRegister Vs2, int32_t imm, VectorMask vm = unmasked) { do { if (!(is_simm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1587, "guarantee(" "is_simm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b000011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1598 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vmerge_vim(VectorRegister Vd, VectorRegister Vs2, int32_t imm) { do { if (!(is_simm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1598, "guarantee(" "is_simm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, 0b0); patch((address)&insn, 31, 26, 0b010111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1608 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vcompress_vm(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b010111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vmxnor_mm(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b011111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmorn_mm(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b011100); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmnor_mm(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b011110); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmor_mm(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b011010); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmxor_mm(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b011011); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmandn_mm(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b011000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmnand_mm(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b011101); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + void vmand_mm(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b011001); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; + + + void vmerge_vvm(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, 0b0); patch((address)&insn, 31, 26, 0b010111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, Vs2); emit(insn); }; +# 1632 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vmv_v_i(VectorRegister Vd, int32_t imm) { do { if (!(is_simm5(imm))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1632, "guarantee(" "is_simm5(imm)" ") failed", "imm is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b011); patch((address)&insn, 19, 15, (uint32_t)(imm & 0x1f)); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b010111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, v0); emit(insn); }; +# 1642 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vfmv_s_f(VectorRegister Vd, FloatRegister Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b010000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, v0); emit(insn); }; + + void vfmv_v_f(VectorRegister Vd, FloatRegister Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b010111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, v0); emit(insn); }; +# 1654 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vmv_v_v(VectorRegister Vd, VectorRegister Vs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 19, 15, Vs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b010111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, v0); emit(insn); }; +# 1664 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vmv_s_x(VectorRegister Vd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b010000); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, v0); emit(insn); }; + + + void vmv_v_x(VectorRegister Vd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 19, 15, Rs1->raw_encoding()); patch((address)&insn, 25, 0b1); patch((address)&insn, 31, 26, 0b010111); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 20, v0); emit(insn); }; +# 1684 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vid_v(VectorRegister Vd, VectorMask vm = unmasked) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b1010111); patch((address)&insn, 24, 12, 0b0000010001010); patch((address)&insn, 25, vm); patch((address)&insn, 31, 26, 0b010100); patch_reg((address)&insn, 7, Vd); emit(insn); }; + + + +enum Nf { + g1 = 0b000, + g2 = 0b001, + g3 = 0b010, + g4 = 0b011, + g5 = 0b100, + g6 = 0b101, + g7 = 0b110, + g8 = 0b111 +}; +# 1719 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vl1re8_v(VectorRegister Vd, Register Rs1, uint32_t width = 0, bool mew = false) { do { if (!(is_uimm3(width))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1719, "guarantee(" "is_uimm3(width)" ") failed", "width is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, width); patch((address)&insn, 24, 20, 0b01000); patch((address)&insn, 25, 0b1); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, mew); patch((address)&insn, 31, 29, g1); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 1729 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vs1r_v(VectorRegister Vs3, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0100111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 24, 20, 0b01000); patch((address)&insn, 25, 0b1); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, g1); patch_reg((address)&insn, 7, Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 1740 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vlm_v(VectorRegister Vd_or_Vs3, Register Rs1, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 24, 20, 0b01011); patch((address)&insn, 25, 1); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void vsm_v(VectorRegister Vd_or_Vs3, Register Rs1, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0100111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 24, 20, 0b01011); patch((address)&insn, 25, 1); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 1751 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vle8_v(VectorRegister Vd_or_Vs3, Register Rs1, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void vle16_v(VectorRegister Vd_or_Vs3, Register Rs1, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void vle32_v(VectorRegister Vd_or_Vs3, Register Rs1, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void vle64_v(VectorRegister Vd_or_Vs3, Register Rs1, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b111); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + + + void vle8ff_v(VectorRegister Vd_or_Vs3, Register Rs1, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 24, 20, 0b10000); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void vle16ff_v(VectorRegister Vd_or_Vs3, Register Rs1, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 24, 20, 0b10000); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void vle32ff_v(VectorRegister Vd_or_Vs3, Register Rs1, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 24, 20, 0b10000); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void vle64ff_v(VectorRegister Vd_or_Vs3, Register Rs1, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b111); patch((address)&insn, 24, 20, 0b10000); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + + void vse8_v(VectorRegister Vd_or_Vs3, Register Rs1, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0100111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void vse16_v(VectorRegister Vd_or_Vs3, Register Rs1, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0100111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void vse32_v(VectorRegister Vd_or_Vs3, Register Rs1, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0100111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void vse64_v(VectorRegister Vd_or_Vs3, Register Rs1, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0100111); patch((address)&insn, 14, 12, 0b111); patch((address)&insn, 24, 20, 0b00000); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b00); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd_or_Vs3); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 1775 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vluxei32_v(VectorRegister Vd, Register Rs1, VectorRegister Vs2, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 24, 20, Vs2->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b01); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + + + void vsuxei32_v(VectorRegister Vd, Register Rs1, VectorRegister Vs2, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0100111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 24, 20, Vs2->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b01); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 1788 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void vlse8_v(VectorRegister Vd, Register Rs1, Register Rs2, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 24, 20, Rs2->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b10); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void vlse16_v(VectorRegister Vd, Register Rs1, Register Rs2, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 24, 20, Rs2->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b10); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void vlse32_v(VectorRegister Vd, Register Rs1, Register Rs2, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 24, 20, Rs2->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b10); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void vlse64_v(VectorRegister Vd, Register Rs1, Register Rs2, VectorMask vm = unmasked, Nf nf = g1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0000111); patch((address)&insn, 14, 12, 0b111); patch((address)&insn, 24, 20, Rs2->raw_encoding()); patch((address)&insn, 25, vm); patch((address)&insn, 27, 26, 0b10); patch((address)&insn, 28, 0b0); patch((address)&insn, 31, 29, nf); patch_reg((address)&insn, 7, Vd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 1812 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void add_uw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b000); patch((address)&insn, 31, 25, 0b0000100); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void rol(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 25, 0b0110000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void rolw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 25, 0b0110000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void ror(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 31, 25, 0b0110000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void rorw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 31, 25, 0b0110000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void sh1add(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 31, 25, 0b0010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void sh2add(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 31, 25, 0b0010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void sh3add(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 31, 25, 0b0010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void sh1add_uw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b010); patch((address)&insn, 31, 25, 0b0010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void sh2add_uw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 31, 25, 0b0010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void sh3add_uw(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 31, 25, 0b0010000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void andn(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b111); patch((address)&insn, 31, 25, 0b0100000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void orn(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 31, 25, 0b0100000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void xnor(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 31, 25, 0b0100000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void max(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b110); patch((address)&insn, 31, 25, 0b0000101); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void maxu(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b111); patch((address)&insn, 31, 25, 0b0000101); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void min(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 31, 25, 0b0000101); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; + void minu(Register Rd, Register Rs1, Register Rs2) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0110011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 31, 25, 0b0000101); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); patch_reg((address)&insn, 20, Rs2); emit(insn); }; +# 1844 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void rev8(Register Rd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 31, 20, 0b011010111000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void sext_b(Register Rd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 20, 0b011000000100); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void sext_h(Register Rd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 20, 0b011000000101); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void zext_h(Register Rd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0111011); patch((address)&insn, 14, 12, 0b100); patch((address)&insn, 31, 20, 0b000010000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void clz(Register Rd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 20, 0b011000000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void clzw(Register Rd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0011011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 20, 0b011000000000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void ctz(Register Rd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 20, 0b011000000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void ctzw(Register Rd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0011011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 20, 0b011000000001); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void cpop(Register Rd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 20, 0b011000000010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void cpopw(Register Rd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0011011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 31, 20, 0b011000000010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void orc_b(Register Rd, Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 31, 20, 0b001010000111); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 1871 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void rori(Register Rd, Register Rs1, unsigned shamt) { do { if (!(shamt <= 0x3f)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1871, "guarantee(" "shamt <= 0x3f" ") failed", "Shamt is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 25, 20, shamt); patch((address)&insn, 31, 26, 0b011000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void slli_uw(Register Rd, Register Rs1, unsigned shamt) { do { if (!(shamt <= 0x3f)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1872, "guarantee(" "shamt <= 0x3f" ") failed", "Shamt is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0011011); patch((address)&insn, 14, 12, 0b001); patch((address)&insn, 25, 20, shamt); patch((address)&insn, 31, 26, 0b000010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; + void bexti(Register Rd, Register Rs1, unsigned shamt) { do { if (!(shamt <= 0x3f)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1873, "guarantee(" "shamt <= 0x3f" ") failed", "Shamt is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 25, 20, shamt); patch((address)&insn, 31, 26, 0b010010); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 1890 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void roriw(Register Rd, Register Rs1, unsigned shamt) { do { if (!(shamt <= 0x1f)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1890, "guarantee(" "shamt <= 0x1f" ") failed", "Shamt is invalid"); } } while (0); unsigned insn = 0; patch((address)&insn, 6, 0, 0b0011011); patch((address)&insn, 14, 12, 0b101); patch((address)&insn, 24, 20, shamt); patch((address)&insn, 31, 25, 0b0110000); patch_reg((address)&insn, 7, Rd); patch_reg((address)&insn, 15, Rs1); emit(insn); }; +# 1923 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" +private: + bool _in_compressible_region; +public: + bool in_compressible_region() const { return _in_compressible_region; } + void set_in_compressible_region(bool b) { _in_compressible_region = b; } +public: + + + class AbstractCompressibleRegion : public StackObj { + protected: + Assembler *_masm; + bool _saved_in_compressible_region; + protected: + AbstractCompressibleRegion(Assembler *_masm) + : _masm(_masm) + , _saved_in_compressible_region(_masm->in_compressible_region()) {} + }; + + class CompressibleRegion : public AbstractCompressibleRegion { + public: + CompressibleRegion(Assembler *_masm) : AbstractCompressibleRegion(_masm) { + _masm->set_in_compressible_region(true); + } + ~CompressibleRegion() { + _masm->set_in_compressible_region(_saved_in_compressible_region); + } + }; + + class IncompressibleRegion : public AbstractCompressibleRegion { + public: + IncompressibleRegion(Assembler *_masm) : AbstractCompressibleRegion(_masm) { + _masm->set_in_compressible_region(false); + } + ~IncompressibleRegion() { + _masm->set_in_compressible_region(_saved_in_compressible_region); + } + }; + +public: + + void relocate(RelocationHolder const& rspec, int format = 0) { + AbstractAssembler::relocate(rspec, format); + } + void relocate(relocInfo::relocType rtype, int format = 0) { + AbstractAssembler::relocate(rtype, format); + } + template + void relocate(RelocationHolder const& rspec, Callback emit_insts, int format = 0) { + AbstractAssembler::relocate(rspec, format); + IncompressibleRegion ir(this); + emit_insts(); + } + template + void relocate(relocInfo::relocType rtype, Callback emit_insts, int format = 0) { + AbstractAssembler::relocate(rtype, format); + IncompressibleRegion ir(this); + emit_insts(); + } + + + static void c_patch(address a, unsigned msb, unsigned lsb, uint16_t val) { + ; + ; + unsigned nbits = msb - lsb + 1; + do { if (!(val < (1U << nbits))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 1987, "guarantee(" "val < (1U << nbits)" ") failed", "Field too big for insn"); } } while (0); + uint16_t mask = (1U << nbits) - 1; + val <<= lsb; + mask <<= lsb; + uint16_t target = ld_c_instr(a); + target &= ~mask; + target |= val; + sd_c_instr(a, target); + } + + static void c_patch(address a, unsigned bit, uint16_t val) { + c_patch(a, bit, bit, val); + } + + + static void c_patch_reg(address a, unsigned lsb, Register reg) { + c_patch(a, lsb + 4, lsb, reg->raw_encoding()); + } + + + static void c_patch_compressed_reg(address a, unsigned lsb, Register reg) { + c_patch(a, lsb + 2, lsb, reg->compressed_raw_encoding()); + } + + + static void c_patch_reg(address a, unsigned lsb, FloatRegister reg) { + c_patch(a, lsb + 4, lsb, reg->raw_encoding()); + } + + + static void c_patch_compressed_reg(address a, unsigned lsb, FloatRegister reg) { + c_patch(a, lsb + 2, lsb, reg->compressed_raw_encoding()); + } + + + + void c_nop() { + c_addi(x0, 0); + } +# 2039 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_addi(Register Rd_Rs1, int32_t imm) { ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch((address)&insn, 6, 2, (imm & ((((5) >= BitsPerWord) ? 0 : (OneBit << (5))) - 1))); c_patch_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 12, 12, (imm & (((5) >= BitsPerWord) ? 0 : (OneBit << (5)))) >> 5); c_patch((address)&insn, 15, 13, 0b000); emit_int16(insn); }; + void c_addiw(Register Rd_Rs1, int32_t imm) { ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch((address)&insn, 6, 2, (imm & ((((5) >= BitsPerWord) ? 0 : (OneBit << (5))) - 1))); c_patch_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 12, 12, (imm & (((5) >= BitsPerWord) ? 0 : (OneBit << (5)))) >> 5); c_patch((address)&insn, 15, 13, 0b001); emit_int16(insn); }; +# 2061 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_addi16sp(int32_t imm) { ; ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch((address)&insn, 2, 2, (imm & (((5) >= BitsPerWord) ? 0 : (OneBit << (5)))) >> 5); c_patch((address)&insn, 4, 3, (imm & ((((9) >= BitsPerWord) ? 0 : (OneBit << (9))) - 1)) >> 7); c_patch((address)&insn, 5, 5, (imm & (((6) >= BitsPerWord) ? 0 : (OneBit << (6)))) >> 6); c_patch((address)&insn, 6, 6, (imm & (((4) >= BitsPerWord) ? 0 : (OneBit << (4)))) >> 4); c_patch_reg((address)&insn, 7, sp); c_patch((address)&insn, 12, 12, (imm & (((9) >= BitsPerWord) ? 0 : (OneBit << (9)))) >> 9); c_patch((address)&insn, 15, 13, 0b011); emit_int16(insn); }; +# 2081 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_addi4spn(Register Rd, uint32_t uimm) { ; ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b00); c_patch_compressed_reg((address)&insn, 2, Rd); c_patch((address)&insn, 5, 5, (uimm & (((3) >= BitsPerWord) ? 0 : (OneBit << (3)))) >> 3); c_patch((address)&insn, 6, 6, (uimm & (((2) >= BitsPerWord) ? 0 : (OneBit << (2)))) >> 2); c_patch((address)&insn, 10, 7, (uimm & ((((10) >= BitsPerWord) ? 0 : (OneBit << (10))) - 1)) >> 6); c_patch((address)&insn, 12, 11, (uimm & ((((6) >= BitsPerWord) ? 0 : (OneBit << (6))) - 1)) >> 4); c_patch((address)&insn, 15, 13, 0b000); emit_int16(insn); }; +# 2099 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_slli(Register Rd_Rs1, uint32_t shamt) { ; ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b10); c_patch((address)&insn, 6, 2, (shamt & ((((5) >= BitsPerWord) ? 0 : (OneBit << (5))) - 1))); c_patch_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 12, 12, (shamt & (((5) >= BitsPerWord) ? 0 : (OneBit << (5)))) >> 5); c_patch((address)&insn, 15, 13, 0b000); emit_int16(insn); }; +# 2117 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_srli(Register Rd_Rs1, uint32_t shamt) { ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch((address)&insn, 6, 2, (shamt & ((((5) >= BitsPerWord) ? 0 : (OneBit << (5))) - 1))); c_patch_compressed_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 11, 10, 0b00); c_patch((address)&insn, 12, 12, (shamt & (((5) >= BitsPerWord) ? 0 : (OneBit << (5)))) >> 5); c_patch((address)&insn, 15, 13, 0b100); emit_int16(insn); }; + void c_srai(Register Rd_Rs1, uint32_t shamt) { ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch((address)&insn, 6, 2, (shamt & ((((5) >= BitsPerWord) ? 0 : (OneBit << (5))) - 1))); c_patch_compressed_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 11, 10, 0b01); c_patch((address)&insn, 12, 12, (shamt & (((5) >= BitsPerWord) ? 0 : (OneBit << (5)))) >> 5); c_patch((address)&insn, 15, 13, 0b100); emit_int16(insn); }; +# 2135 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_andi(Register Rd_Rs1, int32_t imm) { ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch((address)&insn, 6, 2, (imm & ((((5) >= BitsPerWord) ? 0 : (OneBit << (5))) - 1))); c_patch_compressed_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 11, 10, 0b10); c_patch((address)&insn, 12, 12, (imm & (((5) >= BitsPerWord) ? 0 : (OneBit << (5)))) >> 5); c_patch((address)&insn, 15, 13, 0b100); emit_int16(insn); }; +# 2150 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_sub(Register Rd_Rs1, Register Rs2) { uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch_compressed_reg((address)&insn, 2, Rs2); c_patch((address)&insn, 6, 5, 0b00); c_patch_compressed_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 15, 10, 0b100011); emit_int16(insn); }; + void c_xor(Register Rd_Rs1, Register Rs2) { uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch_compressed_reg((address)&insn, 2, Rs2); c_patch((address)&insn, 6, 5, 0b01); c_patch_compressed_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 15, 10, 0b100011); emit_int16(insn); }; + void c_or(Register Rd_Rs1, Register Rs2) { uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch_compressed_reg((address)&insn, 2, Rs2); c_patch((address)&insn, 6, 5, 0b10); c_patch_compressed_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 15, 10, 0b100011); emit_int16(insn); }; + void c_and(Register Rd_Rs1, Register Rs2) { uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch_compressed_reg((address)&insn, 2, Rs2); c_patch((address)&insn, 6, 5, 0b11); c_patch_compressed_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 15, 10, 0b100011); emit_int16(insn); }; + void c_subw(Register Rd_Rs1, Register Rs2) { uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch_compressed_reg((address)&insn, 2, Rs2); c_patch((address)&insn, 6, 5, 0b00); c_patch_compressed_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 15, 10, 0b100111); emit_int16(insn); }; + void c_addw(Register Rd_Rs1, Register Rs2) { uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch_compressed_reg((address)&insn, 2, Rs2); c_patch((address)&insn, 6, 5, 0b01); c_patch_compressed_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 15, 10, 0b100111); emit_int16(insn); }; +# 2170 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_mv(Register Rd_Rs1, Register Rs2) { ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b10); c_patch_reg((address)&insn, 2, Rs2); c_patch_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 15, 12, 0b1000); emit_int16(insn); }; + void c_add(Register Rd_Rs1, Register Rs2) { ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b10); c_patch_reg((address)&insn, 2, Rs2); c_patch_reg((address)&insn, 7, Rd_Rs1); c_patch((address)&insn, 15, 12, 0b1001); emit_int16(insn); }; +# 2186 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_jr(Register Rs1) { ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b10); c_patch_reg((address)&insn, 2, x0); c_patch_reg((address)&insn, 7, Rs1); c_patch((address)&insn, 15, 12, 0b1000); emit_int16(insn); }; + void c_jalr(Register Rs1) { ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b10); c_patch_reg((address)&insn, 2, x0); c_patch_reg((address)&insn, 7, Rs1); c_patch((address)&insn, 15, 12, 0b1001); emit_int16(insn); }; + + + + typedef void (Assembler::* j_c_insn)(address dest); + typedef void (Assembler::* compare_and_branch_c_insn)(Register Rs1, address dest); + + void wrap_label(Label &L, j_c_insn insn) { + if (L.is_bound()) { + (this->*insn)(target(L)); + } else { + L.add_patch_at(code(), locator()); + (this->*insn)(pc()); + } + } + + void wrap_label(Label &L, Register r, compare_and_branch_c_insn insn) { + if (L.is_bound()) { + (this->*insn)(r, target(L)); + } else { + L.add_patch_at(code(), locator()); + (this->*insn)(r, pc()); + } + } +# 2238 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_j(int32_t offset) { ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch((address)&insn, 2, 2, (offset & (((5) >= BitsPerWord) ? 0 : (OneBit << (5)))) >> 5); c_patch((address)&insn, 5, 3, (offset & ((((4) >= BitsPerWord) ? 0 : (OneBit << (4))) - 1)) >> 1); c_patch((address)&insn, 6, 6, (offset & (((7) >= BitsPerWord) ? 0 : (OneBit << (7)))) >> 7); c_patch((address)&insn, 7, 7, (offset & (((6) >= BitsPerWord) ? 0 : (OneBit << (6)))) >> 6); c_patch((address)&insn, 8, 8, (offset & (((10) >= BitsPerWord) ? 0 : (OneBit << (10)))) >> 10); c_patch((address)&insn, 10, 9, (offset & ((((10) >= BitsPerWord) ? 0 : (OneBit << (10))) - 1)) >> 8); c_patch((address)&insn, 11, 11, (offset & (((4) >= BitsPerWord) ? 0 : (OneBit << (4)))) >> 4); c_patch((address)&insn, 12, 12, (offset & (((11) >= BitsPerWord) ? 0 : (OneBit << (11)))) >> 11); c_patch((address)&insn, 15, 13, 0b101); emit_int16(insn); } void c_j(address dest) { ; int64_t distance = dest - pc(); ; c_j(distance); } void c_j(Label &L) { wrap_label(L, &Assembler::c_j); }; +# 2266 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_beqz(Register Rs1, int32_t imm) { ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch((address)&insn, 2, 2, (imm & (((5) >= BitsPerWord) ? 0 : (OneBit << (5)))) >> 5); c_patch((address)&insn, 4, 3, (imm & ((((3) >= BitsPerWord) ? 0 : (OneBit << (3))) - 1)) >> 1); c_patch((address)&insn, 6, 5, (imm & ((((8) >= BitsPerWord) ? 0 : (OneBit << (8))) - 1)) >> 6); c_patch_compressed_reg((address)&insn, 7, Rs1); c_patch((address)&insn, 11, 10, (imm & ((((5) >= BitsPerWord) ? 0 : (OneBit << (5))) - 1)) >> 3); c_patch((address)&insn, 12, 12, (imm & (((8) >= BitsPerWord) ? 0 : (OneBit << (8)))) >> 8); c_patch((address)&insn, 15, 13, 0b110); emit_int16(insn); } void c_beqz(Register Rs1, address dest) { ; int64_t distance = dest - pc(); ; c_beqz(Rs1, distance); } void c_beqz(Register Rs1, Label &L) { wrap_label(L, Rs1, &Assembler::c_beqz); }; + void c_bnez(Register Rs1, int32_t imm) { ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch((address)&insn, 2, 2, (imm & (((5) >= BitsPerWord) ? 0 : (OneBit << (5)))) >> 5); c_patch((address)&insn, 4, 3, (imm & ((((3) >= BitsPerWord) ? 0 : (OneBit << (3))) - 1)) >> 1); c_patch((address)&insn, 6, 5, (imm & ((((8) >= BitsPerWord) ? 0 : (OneBit << (8))) - 1)) >> 6); c_patch_compressed_reg((address)&insn, 7, Rs1); c_patch((address)&insn, 11, 10, (imm & ((((5) >= BitsPerWord) ? 0 : (OneBit << (5))) - 1)) >> 3); c_patch((address)&insn, 12, 12, (imm & (((8) >= BitsPerWord) ? 0 : (OneBit << (8)))) >> 8); c_patch((address)&insn, 15, 13, 0b111); emit_int16(insn); } void c_bnez(Register Rs1, address dest) { ; int64_t distance = dest - pc(); ; c_bnez(Rs1, distance); } void c_bnez(Register Rs1, Label &L) { wrap_label(L, Rs1, &Assembler::c_bnez); }; +# 2286 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_lui(Register Rd, int32_t imm) { ; ; ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch((address)&insn, 6, 2, (imm & ((((17) >= BitsPerWord) ? 0 : (OneBit << (17))) - 1)) >> 12); c_patch_reg((address)&insn, 7, Rd); c_patch((address)&insn, 12, 12, (imm & (((17) >= BitsPerWord) ? 0 : (OneBit << (17)))) >> 17); c_patch((address)&insn, 15, 13, 0b011); emit_int16(insn); }; +# 2303 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_li(Register Rd, int32_t imm) { ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b01); c_patch((address)&insn, 6, 2, (imm & ((((5) >= BitsPerWord) ? 0 : (OneBit << (5))) - 1))); c_patch_reg((address)&insn, 7, Rd); c_patch((address)&insn, 12, 12, (imm & ((((6) >= BitsPerWord) ? 0 : (OneBit << (6))) - 1)) >> 5); c_patch((address)&insn, 15, 13, 0b010); emit_int16(insn); }; +# 2322 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_ldsp(Register Rd, uint32_t uimm) { ; ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b10); c_patch((address)&insn, 4, 2, (uimm & ((((9) >= BitsPerWord) ? 0 : (OneBit << (9))) - 1)) >> 6); c_patch((address)&insn, 6, 5, (uimm & ((((5) >= BitsPerWord) ? 0 : (OneBit << (5))) - 1)) >> 3); c_patch_reg((address)&insn, 7, Rd); c_patch((address)&insn, 12, 12, (uimm & (((5) >= BitsPerWord) ? 0 : (OneBit << (5)))) >> 5); c_patch((address)&insn, 15, 13, 0b011); emit_int16(insn); }; +# 2340 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_fldsp(FloatRegister Rd, uint32_t uimm) { ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b10); c_patch((address)&insn, 4, 2, (uimm & ((((9) >= BitsPerWord) ? 0 : (OneBit << (9))) - 1)) >> 6); c_patch((address)&insn, 6, 5, (uimm & ((((5) >= BitsPerWord) ? 0 : (OneBit << (5))) - 1)) >> 3); c_patch_reg((address)&insn, 7, Rd); c_patch((address)&insn, 12, 12, (uimm & (((5) >= BitsPerWord) ? 0 : (OneBit << (5)))) >> 5); c_patch((address)&insn, 15, 13, 0b001); emit_int16(insn); }; +# 2358 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_ld(Register Rd_Rs2, Register Rs1, uint32_t uimm) { ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b00); c_patch_compressed_reg((address)&insn, 2, Rd_Rs2); c_patch((address)&insn, 6, 5, (uimm & ((((8) >= BitsPerWord) ? 0 : (OneBit << (8))) - 1)) >> 6); c_patch_compressed_reg((address)&insn, 7, Rs1); c_patch((address)&insn, 12, 10, (uimm & ((((6) >= BitsPerWord) ? 0 : (OneBit << (6))) - 1)) >> 3); c_patch((address)&insn, 15, 13, 0b011); emit_int16(insn); }; + void c_sd(Register Rd_Rs2, Register Rs1, uint32_t uimm) { ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b00); c_patch_compressed_reg((address)&insn, 2, Rd_Rs2); c_patch((address)&insn, 6, 5, (uimm & ((((8) >= BitsPerWord) ? 0 : (OneBit << (8))) - 1)) >> 6); c_patch_compressed_reg((address)&insn, 7, Rs1); c_patch((address)&insn, 12, 10, (uimm & ((((6) >= BitsPerWord) ? 0 : (OneBit << (6))) - 1)) >> 3); c_patch((address)&insn, 15, 13, 0b111); emit_int16(insn); }; + void c_fld(FloatRegister Rd_Rs2, Register Rs1, uint32_t uimm) { ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b00); c_patch_compressed_reg((address)&insn, 2, Rd_Rs2); c_patch((address)&insn, 6, 5, (uimm & ((((8) >= BitsPerWord) ? 0 : (OneBit << (8))) - 1)) >> 6); c_patch_compressed_reg((address)&insn, 7, Rs1); c_patch((address)&insn, 12, 10, (uimm & ((((6) >= BitsPerWord) ? 0 : (OneBit << (6))) - 1)) >> 3); c_patch((address)&insn, 15, 13, 0b001); emit_int16(insn); }; + void c_fsd(FloatRegister Rd_Rs2, Register Rs1, uint32_t uimm) { ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b00); c_patch_compressed_reg((address)&insn, 2, Rd_Rs2); c_patch((address)&insn, 6, 5, (uimm & ((((8) >= BitsPerWord) ? 0 : (OneBit << (8))) - 1)) >> 6); c_patch_compressed_reg((address)&insn, 7, Rs1); c_patch((address)&insn, 12, 10, (uimm & ((((6) >= BitsPerWord) ? 0 : (OneBit << (6))) - 1)) >> 3); c_patch((address)&insn, 15, 13, 0b101); emit_int16(insn); }; +# 2378 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_sdsp(Register Rs2, uint32_t uimm) { ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b10); c_patch_reg((address)&insn, 2, Rs2); c_patch((address)&insn, 9, 7, (uimm & ((((9) >= BitsPerWord) ? 0 : (OneBit << (9))) - 1)) >> 6); c_patch((address)&insn, 12, 10, (uimm & ((((6) >= BitsPerWord) ? 0 : (OneBit << (6))) - 1)) >> 3); c_patch((address)&insn, 15, 13, 0b111); emit_int16(insn); }; + void c_fsdsp(FloatRegister Rs2, uint32_t uimm) { ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b10); c_patch_reg((address)&insn, 2, Rs2); c_patch((address)&insn, 9, 7, (uimm & ((((9) >= BitsPerWord) ? 0 : (OneBit << (9))) - 1)) >> 6); c_patch((address)&insn, 12, 10, (uimm & ((((6) >= BitsPerWord) ? 0 : (OneBit << (6))) - 1)) >> 3); c_patch((address)&insn, 15, 13, 0b101); emit_int16(insn); }; +# 2396 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_swsp(Register Rs2, uint32_t uimm) { ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b10); c_patch_reg((address)&insn, 2, Rs2); c_patch((address)&insn, 8, 7, (uimm & ((((8) >= BitsPerWord) ? 0 : (OneBit << (8))) - 1)) >> 6); c_patch((address)&insn, 12, 9, (uimm & ((((6) >= BitsPerWord) ? 0 : (OneBit << (6))) - 1)) >> 2); c_patch((address)&insn, 15, 13, 0b110); emit_int16(insn); }; +# 2415 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_lwsp(Register Rd, uint32_t uimm) { ; ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b10); c_patch((address)&insn, 3, 2, (uimm & ((((8) >= BitsPerWord) ? 0 : (OneBit << (8))) - 1)) >> 6); c_patch((address)&insn, 6, 4, (uimm & ((((5) >= BitsPerWord) ? 0 : (OneBit << (5))) - 1)) >> 2); c_patch_reg((address)&insn, 7, Rd); c_patch((address)&insn, 12, 12, (uimm & (((5) >= BitsPerWord) ? 0 : (OneBit << (5)))) >> 5); c_patch((address)&insn, 15, 13, 0b010); emit_int16(insn); }; +# 2434 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_lw(Register Rd_Rs2, Register Rs1, uint32_t uimm) { ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b00); c_patch_compressed_reg((address)&insn, 2, Rd_Rs2); c_patch((address)&insn, 5, 5, (uimm & (((6) >= BitsPerWord) ? 0 : (OneBit << (6)))) >> 6); c_patch((address)&insn, 6, 6, (uimm & (((2) >= BitsPerWord) ? 0 : (OneBit << (2)))) >> 2); c_patch_compressed_reg((address)&insn, 7, Rs1); c_patch((address)&insn, 12, 10, (uimm & ((((6) >= BitsPerWord) ? 0 : (OneBit << (6))) - 1)) >> 3); c_patch((address)&insn, 15, 13, 0b010); emit_int16(insn); }; + void c_sw(Register Rd_Rs2, Register Rs1, uint32_t uimm) { ; ; uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b00); c_patch_compressed_reg((address)&insn, 2, Rd_Rs2); c_patch((address)&insn, 5, 5, (uimm & (((6) >= BitsPerWord) ? 0 : (OneBit << (6)))) >> 6); c_patch((address)&insn, 6, 6, (uimm & (((2) >= BitsPerWord) ? 0 : (OneBit << (2)))) >> 2); c_patch_compressed_reg((address)&insn, 7, Rs1); c_patch((address)&insn, 12, 10, (uimm & ((((6) >= BitsPerWord) ? 0 : (OneBit << (6))) - 1)) >> 3); c_patch((address)&insn, 15, 13, 0b110); emit_int16(insn); }; +# 2449 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void c_ebreak() { uint16_t insn = 0; c_patch((address)&insn, 1, 0, 0b10); c_patch((address)&insn, 11, 2, 0x0); c_patch((address)&insn, 12, 12, 0b1); c_patch((address)&insn, 15, 13, 0b100); emit_int16(insn); }; +# 2471 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void add(Register Rd, Register Rs1, Register Rs2) { if (do_compress()) { Register src = noreg; if (Rs1 != x0 && Rs2 != x0 && ((src = Rs1, Rs2 == Rd) || (src = Rs2, Rs1 == Rd))) { c_add(Rd, src); return; } } _add(Rd, Rs1, Rs2); }; +# 2487 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void sub(Register Rd, Register Rs1, Register Rs2) { if (do_compress() && (Rd == Rs1 && Rd->is_compressed_valid() && Rs2->is_compressed_valid())) { c_sub(Rd, Rs2); return; } _sub(Rd, Rs1, Rs2); }; + void subw(Register Rd, Register Rs1, Register Rs2) { if (do_compress() && (Rd == Rs1 && Rd->is_compressed_valid() && Rs2->is_compressed_valid())) { c_subw(Rd, Rs2); return; } _subw(Rd, Rs1, Rs2); }; +# 2507 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void andr(Register Rd, Register Rs1, Register Rs2) { if (do_compress()) { Register src = noreg; if (Rs1->is_compressed_valid() && Rs2->is_compressed_valid() && ((src = Rs1, Rs2 == Rd) || (src = Rs2, Rs1 == Rd))) { c_and(Rd, src); return; } } _andr(Rd, Rs1, Rs2); }; + void orr(Register Rd, Register Rs1, Register Rs2) { if (do_compress()) { Register src = noreg; if (Rs1->is_compressed_valid() && Rs2->is_compressed_valid() && ((src = Rs1, Rs2 == Rd) || (src = Rs2, Rs1 == Rd))) { c_or(Rd, src); return; } } _orr(Rd, Rs1, Rs2); }; + void xorr(Register Rd, Register Rs1, Register Rs2) { if (do_compress()) { Register src = noreg; if (Rs1->is_compressed_valid() && Rs2->is_compressed_valid() && ((src = Rs1, Rs2 == Rd) || (src = Rs2, Rs1 == Rd))) { c_xor(Rd, src); return; } } _xorr(Rd, Rs1, Rs2); }; + void addw(Register Rd, Register Rs1, Register Rs2) { if (do_compress()) { Register src = noreg; if (Rs1->is_compressed_valid() && Rs2->is_compressed_valid() && ((src = Rs1, Rs2 == Rd) || (src = Rs2, Rs1 == Rd))) { c_addw(Rd, src); return; } } _addw(Rd, Rs1, Rs2); }; + + + +private: +# 2524 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + bool is_c_ldsdsp(Register rs1, Register rd_rs2, int32_t imm12, bool ld) { return rs1 == sp && is_uimm(imm12, 9) && (intx(imm12) & 0b111) == 0x0 && (!ld || rd_rs2 != x0); }; + bool is_c_lwswsp(Register rs1, Register rd_rs2, int32_t imm12, bool ld) { return rs1 == sp && is_uimm(imm12, 8) && (intx(imm12) & 0b011) == 0x0 && (!ld || rd_rs2 != x0); }; +# 2536 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + bool is_c_fldsdsp(Register rs1, int32_t imm12) { return rs1 == sp && is_uimm(imm12, 9) && (intx(imm12) & 0b111) == 0x0; }; +# 2548 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + bool is_c_ldsd(Register rs1, Register rd_rs2, int32_t imm12) { return rs1->is_compressed_valid() && rd_rs2->is_compressed_valid() && is_uimm(imm12, 8) && (intx(imm12) & 0b111) == 0x0; }; + bool is_c_lwsw(Register rs1, Register rd_rs2, int32_t imm12) { return rs1->is_compressed_valid() && rd_rs2->is_compressed_valid() && is_uimm(imm12, 7) && (intx(imm12) & 0b011) == 0x0; }; + bool is_c_fldsd(Register rs1, FloatRegister rd_rs2, int32_t imm12) { return rs1->is_compressed_valid() && rd_rs2->is_compressed_valid() && is_uimm(imm12, 8) && (intx(imm12) & 0b111) == 0x0; }; + + + +public: + bool do_compress() const { + return UseRVC && in_compressible_region(); + } +# 2577 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void lw(Register Rd, Register Rs, const int32_t offset) { if (do_compress()) { if (is_c_lwswsp(Rs, Rd, offset, true)) { c_lwsp(Rd, offset); return; } else if (is_c_lwsw(Rs, Rd, offset)) { c_lw(Rd, Rs, offset); return; } } _lw(Rd, Rs, offset); }; +# 2597 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void ld(Register Rd, Register Rs, const int32_t offset) { if (do_compress()) { if (is_c_ldsdsp(Rs, Rd, offset, true)) { c_ldsp(Rd, offset); return; } else if (is_c_ldsd(Rs, Rd, offset)) { c_ld(Rd, Rs, offset); return; } } _ld(Rd, Rs, offset); }; +# 2617 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void fld(FloatRegister Rd, Register Rs, const int32_t offset) { if (do_compress()) { if (is_c_fldsdsp(Rs, offset)) { c_fldsp(Rd, offset); return; } else if (is_c_fldsd(Rs, Rd, offset)) { c_fld(Rd, Rs, offset); return; } } _fld(Rd, Rs, offset); }; +# 2637 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void sd(Register Rd, Register Rs, const int32_t offset) { if (do_compress()) { if (is_c_ldsdsp(Rs, Rd, offset, false)) { c_sdsp(Rd, offset); return; } else if (is_c_ldsd(Rs, Rd, offset)) { c_sd(Rd, Rs, offset); return; } } _sd(Rd, Rs, offset); }; +# 2657 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void sw(Register Rd, Register Rs, const int32_t offset) { if (do_compress()) { if (is_c_lwswsp(Rs, Rd, offset, false)) { c_swsp(Rd, offset); return; } else if (is_c_lwsw(Rs, Rd, offset)) { c_sw(Rd, Rs, offset); return; } } _sw(Rd, Rs, offset); }; +# 2677 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void fsd(FloatRegister Rd, Register Rs, const int32_t offset) { if (do_compress()) { if (is_c_fldsdsp(Rs, offset)) { c_fsdsp(Rd, offset); return; } else if (is_c_fldsd(Rs, Rd, offset)) { c_fsd(Rd, Rs, offset); return; } } _fsd(Rd, Rs, offset); }; +# 2699 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void jalr(Register Rd, Register Rs, const int32_t offset) { if (do_compress() && (offset == 0 && Rs != x0)) { if (Rd == x1) { c_jalr(Rs); return; } else if (Rd == x0) { c_jr(Rs); return; } } _jalr(Rd, Rs, offset); }; +# 2716 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void ebreak() { if (do_compress()) { c_ebreak(); return; } _ebreak(); }; +# 2746 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void addi(Register Rd, Register Rs1, int32_t imm) { if (do_compress()) { if (Rd == Rs1 && is_simm6(imm)) { c_addi(Rd, imm); return; } else if (imm == 0 && Rd != x0 && Rs1 != x0) { c_mv(Rd, Rs1); return; } else if (Rs1 == sp && imm != 0) { if (Rd == Rs1 && (imm & 0b1111) == 0x0 && is_simm10(imm)) { c_addi16sp(imm); return; } else if (Rd->is_compressed_valid() && (imm & 0b11) == 0x0 && is_uimm10(imm)) { c_addi4spn(Rd, imm); return; } } } _addi(Rd, Rs1, imm); }; +# 2761 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void addiw(Register Rd, Register Rs1, int32_t imm) { if (do_compress() && (Rd == Rs1 && Rd != x0 && is_simm6(imm))) { c_addiw(Rd, imm); return; } _addiw(Rd, Rs1, imm); }; +# 2777 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void and_imm12(Register Rd, Register Rs1, int32_t imm) { if (do_compress() && (Rd == Rs1 && Rd->is_compressed_valid() && is_simm6(imm))) { c_andi(Rd, imm); return; } _and_imm12(Rd, Rs1, imm); }; +# 2800 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void slli(Register Rd, Register Rs1, unsigned shamt) { if (do_compress() && (Rd == Rs1 && Rd != x0 && shamt != 0)) { c_slli(Rd, shamt); return; } if (shamt != 0) { _slli(Rd, Rs1, shamt); } else { if (Rd != Rs1) { addi(Rd, Rs1, 0); } } }; +# 2821 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void srai(Register Rd, Register Rs1, unsigned shamt) { if (do_compress() && (Rd == Rs1 && Rd->is_compressed_valid() && shamt != 0)) { c_srai(Rd, shamt); return; } if (shamt != 0) { _srai(Rd, Rs1, shamt); } else { if (Rd != Rs1) { addi(Rd, Rs1, 0); } } }; + void srli(Register Rd, Register Rs1, unsigned shamt) { if (do_compress() && (Rd == Rs1 && Rd->is_compressed_valid() && shamt != 0)) { c_srli(Rd, shamt); return; } if (shamt != 0) { _srli(Rd, Rs1, shamt); } else { if (Rd != Rs1) { addi(Rd, Rs1, 0); } } }; +# 2839 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void lui(Register Rd, int32_t imm) { if (do_compress() && (Rd != x0 && Rd != x2 && imm != 0 && is_simm18(imm))) { c_lui(Rd, imm); return; } _lui(Rd, imm); }; +# 2854 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void cbo_inval(Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0001111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 15, Rs1); patch((address)&insn, 31, 20, 0b0000000000000); emit(insn); }; + void cbo_clean(Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0001111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 15, Rs1); patch((address)&insn, 31, 20, 0b0000000000001); emit(insn); }; + void cbo_flush(Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0001111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 15, Rs1); patch((address)&insn, 31, 20, 0b0000000000010); emit(insn); }; + void cbo_zero(Register Rs1) { unsigned insn = 0; patch((address)&insn, 6, 0, 0b0001111); patch((address)&insn, 14, 12, 0b010); patch_reg((address)&insn, 15, Rs1); patch((address)&insn, 31, 20, 0b0000000000100); emit(insn); }; +# 2875 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void prefetch_i(Register Rs1, int32_t offset) { do { if (!((offset & 0x1f) == 0)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 2875, "guarantee(" "(offset & 0x1f) == 0" ") failed", "offset lowest 5 bits must be zero"); } } while (0); int32_t upperOffset = offset >> 5; unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b110); patch_reg((address)&insn, 15, Rs1); patch((address)&insn, 24, 20, 0b0000000000000); upperOffset &= 0x7f; patch((address)&insn, 31, 25, upperOffset); emit(insn); }; + void prefetch_r(Register Rs1, int32_t offset) { do { if (!((offset & 0x1f) == 0)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 2876, "guarantee(" "(offset & 0x1f) == 0" ") failed", "offset lowest 5 bits must be zero"); } } while (0); int32_t upperOffset = offset >> 5; unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b110); patch_reg((address)&insn, 15, Rs1); patch((address)&insn, 24, 20, 0b0000000000001); upperOffset &= 0x7f; patch((address)&insn, 31, 25, upperOffset); emit(insn); }; + void prefetch_w(Register Rs1, int32_t offset) { do { if (!((offset & 0x1f) == 0)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/assembler_riscv.hpp", 2877, "guarantee(" "(offset & 0x1f) == 0" ") failed", "offset lowest 5 bits must be zero"); } } while (0); int32_t upperOffset = offset >> 5; unsigned insn = 0; patch((address)&insn, 6, 0, 0b0010011); patch((address)&insn, 14, 12, 0b110); patch_reg((address)&insn, 15, Rs1); patch((address)&insn, 24, 20, 0b0000000000011); upperOffset &= 0x7f; patch((address)&insn, 31, 25, upperOffset); emit(insn); }; +# 2888 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.hpp" + void jr(Register Rs) { jalr(x0, Rs, 0); }; + void jalr(Register Rs) { jalr(x1, Rs, 0); }; + + + + + virtual void bang_stack_with_offset(int offset) { do { (*g_assert_poison) = 'X';; report_unimplemented("src/hotspot/cpu/riscv/assembler_riscv.hpp", 2894); } while (0); } + + static bool is_simm5(int64_t x); + static bool is_simm6(int64_t x); + static bool is_simm12(int64_t x); + static bool is_simm13(int64_t x); + static bool is_simm18(int64_t x); + static bool is_simm21(int64_t x); + + static bool is_uimm3(uint64_t x); + static bool is_uimm5(uint64_t x); + static bool is_uimm6(uint64_t x); + static bool is_uimm7(uint64_t x); + static bool is_uimm8(uint64_t x); + static bool is_uimm9(uint64_t x); + static bool is_uimm10(uint64_t x); + + + static const unsigned long branch_range = 1 * M; + + static bool reachable_from_branch_at(address branch, address target) { + return uabs(target - branch) < branch_range; + } + + Assembler(CodeBuffer* code) : AbstractAssembler(code), _in_compressible_region(true) {} +}; +# 517 "/home/rehn/source/jdk/open/src/hotspot/share/asm/assembler.hpp" 2 +# 31 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/nativeInst_riscv.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/continuation.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/continuation.hpp" +class ContinuationEntry; +class frame; +class FrameValues; +class Handle; +class outputStream; +class RegisterMap; + +class Continuations : public AllStatic { +public: + static void init(); + static bool enabled(); +}; + +void continuations_init(); + +class javaVFrame; +class JavaThread; + +class Continuation : AllStatic { +public: + + enum thaw_kind { + thaw_top = 0, + thaw_return_barrier = 1, + thaw_return_barrier_exception = 2, + }; + + static bool is_thaw_return_barrier(thaw_kind kind) { + return kind != thaw_top; + } + + static bool is_thaw_return_barrier_exception(thaw_kind kind) { + bool r = (kind == thaw_return_barrier_exception); + ; + return r; + } + + static void init(); + + static address freeze_entry(); + static int prepare_thaw(JavaThread* thread, bool return_barrier); + static address thaw_entry(); + + static ContinuationEntry* get_continuation_entry_for_continuation(JavaThread* thread, oop continuation); + static ContinuationEntry* get_continuation_entry_for_sp(JavaThread* thread, intptr_t* const sp); + static ContinuationEntry* get_continuation_entry_for_entry_frame(JavaThread* thread, const frame& f); + + static bool is_continuation_mounted(JavaThread* thread, oop continuation); + + static bool is_cont_barrier_frame(const frame& f); + static bool is_return_barrier_entry(const address pc); + static bool is_continuation_enterSpecial(const frame& f); + static bool is_continuation_entry_frame(const frame& f, const RegisterMap *map); + + static bool is_frame_in_continuation(const ContinuationEntry* entry, const frame& f); + static bool is_frame_in_continuation(JavaThread* thread, const frame& f); + + static bool has_last_Java_frame(oop continuation, frame* frame, RegisterMap* map); + static frame last_frame(oop continuation, RegisterMap *map); + static frame top_frame(const frame& callee, RegisterMap* map); + static javaVFrame* last_java_vframe(Handle continuation, RegisterMap *map); + static frame continuation_parent_frame(RegisterMap* map); + + static oop continuation_scope(oop continuation); + static bool is_scope_bottom(oop cont_scope, const frame& fr, const RegisterMap* map); + + static bool is_in_usable_stack(address addr, const RegisterMap* map); + + + static bool pin(JavaThread* current); + static bool unpin(JavaThread* current); + + static frame continuation_bottom_sender(JavaThread* thread, const frame& callee, intptr_t* sender_sp); + static address get_top_return_pc_post_barrier(JavaThread* thread, address pc); + static void set_cont_fastpath_thread_state(JavaThread* thread); + static void notify_deopt(JavaThread* thread, intptr_t* sp); + + + + + + + +private: + friend class InstanceStackChunkKlass; + + + + + + + +}; + +void CONT_RegisterNativeMethods(JNIEnv *env, jclass cls); +# 32 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/nativeInst_riscv.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/icache.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/icache.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stubCodeGenerator.hpp" 1 +# 39 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/stubCodeGenerator.hpp" +class StubCodeDesc: public CHeapObj { + private: + static StubCodeDesc* _list; + static bool _frozen; + + StubCodeDesc* _next; + const char* _group; + const char* _name; + address _begin; + address _end; + uint _disp; + + friend class StubCodeMark; + friend class StubCodeGenerator; + + void set_begin(address begin) { + ; + ; + _begin = begin; + } + + void set_end(address end) { + ; + _end = end; + } + + void set_disp(uint disp) { _disp = disp; } + + public: + static StubCodeDesc* first() { return _list; } + static StubCodeDesc* next(StubCodeDesc* desc) { return desc->_next; } + + static StubCodeDesc* desc_for(address pc); + + StubCodeDesc(const char* group, const char* name, address begin, address end = nullptr) { + ; + ; + _next = _list; + _group = group; + _name = name; + _begin = begin; + _end = end; + _disp = 0; + _list = this; + }; + + static void freeze(); + static void unfreeze(); + + const char* group() const { return _group; } + const char* name() const { return _name; } + address begin() const { return _begin; } + address end() const { return _end; } + uint disp() const { return _disp; } + int size_in_bytes() const { return pointer_delta_as_int(_end, _begin); } + bool contains(address pc) const { return _begin <= pc && pc < _end; } + void print_on(outputStream* st) const; + void print() const; +}; + + + + +class StubCodeGenerator: public StackObj { + private: + bool _print_code; + + protected: + MacroAssembler* _masm; + + public: + StubCodeGenerator(CodeBuffer* code, bool print_code = false); + ~StubCodeGenerator(); + + MacroAssembler* assembler() const { return _masm; } + + virtual void stub_prolog(StubCodeDesc* cdesc); + virtual void stub_epilog(StubCodeDesc* cdesc); + + enum StubsKind { + Initial_stubs, + + + Continuation_stubs, + + + + Compiler_stubs, + + + + Final_stubs + }; +}; + + + + + + + +class StubCodeMark: public StackObj { + private: + StubCodeGenerator* _cgen; + StubCodeDesc* _cdesc; + + public: + StubCodeMark(StubCodeGenerator* cgen, const char* group, const char* name); + ~StubCodeMark(); + +}; +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/icache.hpp" 2 +# 44 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/icache.hpp" +class AbstractICache : AllStatic { + public: + + typedef int (*flush_icache_stub_t)(address addr, int lines, int magic); + + protected: + + static flush_icache_stub_t _flush_icache_stub; + + + static void call_flush_stub(address start, int lines); + + public: + enum { + stub_size = 0, + line_size = 0, + log2_line_size = 0 + }; + + static void initialize(); + static void invalidate_word(address addr); + static void invalidate_range(address start, int nbytes); +}; + + + + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/icache_riscv.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/icache_riscv.hpp" +class ICache : public AbstractICache { +public: + enum { + stub_size = 16, + line_size = BytesPerWord, + log2_line_size = LogBytesPerWord + }; +}; +# 73 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/icache.hpp" 2 + +class ICacheStubGenerator : public StubCodeGenerator { + public: + ICacheStubGenerator(CodeBuffer *c) : StubCodeGenerator(c) {} +# 120 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/icache.hpp" + void generate_icache_flush(ICache::flush_icache_stub_t* flush_icache_stub); +}; +# 33 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/nativeInst_riscv.hpp" 2 +# 51 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/nativeInst_riscv.hpp" +class NativeCall; + +class NativeInstruction { + friend class Relocation; + friend bool is_NativeCallTrampolineStub_at(address); + public: + enum { + instruction_size = 4, + compressed_instruction_size = 2, + }; + + juint encoding() const { + return uint_at(0); + } + + bool is_jal() const { return is_jal_at(addr_at(0)); } + bool is_movptr() const { return is_movptr_at(addr_at(0)); } + bool is_call() const { return is_call_at(addr_at(0)); } + bool is_jump() const { return is_jump_at(addr_at(0)); } + + static bool is_jal_at(address instr) { ; return extract_opcode(instr) == 0b1101111; } + static bool is_jalr_at(address instr) { ; return extract_opcode(instr) == 0b1100111 && extract_funct3(instr) == 0b000; } + static bool is_branch_at(address instr) { ; return extract_opcode(instr) == 0b1100011; } + static bool is_ld_at(address instr) { ; return is_load_at(instr) && extract_funct3(instr) == 0b011; } + static bool is_load_at(address instr) { ; return extract_opcode(instr) == 0b0000011; } + static bool is_float_load_at(address instr) { ; return extract_opcode(instr) == 0b0000111; } + static bool is_auipc_at(address instr) { ; return extract_opcode(instr) == 0b0010111; } + static bool is_jump_at(address instr) { ; return is_branch_at(instr) || is_jal_at(instr) || is_jalr_at(instr); } + static bool is_addi_at(address instr) { ; return extract_opcode(instr) == 0b0010011 && extract_funct3(instr) == 0b000; } + static bool is_addiw_at(address instr) { ; return extract_opcode(instr) == 0b0011011 && extract_funct3(instr) == 0b000; } + static bool is_addiw_to_zr_at(address instr) { ; return is_addiw_at(instr) && extract_rd(instr) == zr; } + static bool is_lui_at(address instr) { ; return extract_opcode(instr) == 0b0110111; } + static bool is_lui_to_zr_at(address instr) { ; return is_lui_at(instr) && extract_rd(instr) == zr; } + + static bool is_srli_at(address instr) { + ; + return extract_opcode(instr) == 0b0010011 && + extract_funct3(instr) == 0b101 && + Assembler::extract(((unsigned*)instr)[0], 31, 26) == 0b000000; + } + + static bool is_slli_shift_at(address instr, uint32_t shift) { + ; + return (extract_opcode(instr) == 0b0010011 && + extract_funct3(instr) == 0b001 && + Assembler::extract(Assembler::ld_instr(instr), 25, 20) == shift); + } + + static Register extract_rs1(address instr); + static Register extract_rs2(address instr); + static Register extract_rd(address instr); + static uint32_t extract_opcode(address instr); + static uint32_t extract_funct3(address instr); +# 112 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/nativeInst_riscv.hpp" + static bool check_movptr_data_dependency(address instr) { + address lui = instr; + address addi1 = lui + instruction_size; + address slli1 = addi1 + instruction_size; + address addi2 = slli1 + instruction_size; + address slli2 = addi2 + instruction_size; + address last_instr = slli2 + instruction_size; + return extract_rs1(addi1) == extract_rd(lui) && + extract_rs1(addi1) == extract_rd(addi1) && + extract_rs1(slli1) == extract_rd(addi1) && + extract_rs1(slli1) == extract_rd(slli1) && + extract_rs1(addi2) == extract_rd(slli1) && + extract_rs1(addi2) == extract_rd(addi2) && + extract_rs1(slli2) == extract_rd(addi2) && + extract_rs1(slli2) == extract_rd(slli2) && + extract_rs1(last_instr) == extract_rd(slli2); + } +# 139 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/nativeInst_riscv.hpp" + static bool check_li64_data_dependency(address instr) { + address lui = instr; + address addi1 = lui + instruction_size; + address slli1 = addi1 + instruction_size; + address addi2 = slli1 + instruction_size; + address slli2 = addi2 + instruction_size; + address addi3 = slli2 + instruction_size; + address slli3 = addi3 + instruction_size; + address addi4 = slli3 + instruction_size; + return extract_rs1(addi1) == extract_rd(lui) && + extract_rs1(addi1) == extract_rd(addi1) && + extract_rs1(slli1) == extract_rd(addi1) && + extract_rs1(slli1) == extract_rd(slli1) && + extract_rs1(addi2) == extract_rd(slli1) && + extract_rs1(addi2) == extract_rd(addi2) && + extract_rs1(slli2) == extract_rd(addi2) && + extract_rs1(slli2) == extract_rd(slli2) && + extract_rs1(addi3) == extract_rd(slli2) && + extract_rs1(addi3) == extract_rd(addi3) && + extract_rs1(slli3) == extract_rd(addi3) && + extract_rs1(slli3) == extract_rd(slli3) && + extract_rs1(addi4) == extract_rd(slli3) && + extract_rs1(addi4) == extract_rd(addi4); + } + + + + + static bool check_li16u_data_dependency(address instr) { + address lui = instr; + address srli = lui + instruction_size; + + return extract_rs1(srli) == extract_rd(lui) && + extract_rs1(srli) == extract_rd(srli); + } + + + + + static bool check_li32_data_dependency(address instr) { + address lui = instr; + address addiw = lui + instruction_size; + + return extract_rs1(addiw) == extract_rd(lui) && + extract_rs1(addiw) == extract_rd(addiw); + } + + + + + static bool check_pc_relative_data_dependency(address instr) { + address auipc = instr; + address last_instr = auipc + instruction_size; + + return extract_rs1(last_instr) == extract_rd(auipc); + } + + + + + static bool check_load_pc_relative_data_dependency(address instr) { + address auipc = instr; + address load = auipc + instruction_size; + + return extract_rd(load) == extract_rd(auipc) && + extract_rs1(load) == extract_rd(load); + } + + static bool is_movptr_at(address instr); + static bool is_li16u_at(address instr); + static bool is_li32_at(address instr); + static bool is_li64_at(address instr); + static bool is_pc_relative_at(address branch); + static bool is_load_pc_relative_at(address branch); + + static bool is_call_at(address instr) { + if (is_jal_at(instr) || is_jalr_at(instr)) { + return true; + } + return false; + } + static bool is_lwu_to_zr(address instr); + + inline bool is_nop() const; + inline bool is_jump_or_nop(); + bool is_safepoint_poll(); + bool is_sigill_not_entrant(); + bool is_stop(); + + protected: + address addr_at(int offset) const { return address(this) + offset; } + + jint int_at(int offset) const { return (jint)Bytes::get_native_u4(addr_at(offset)); } + juint uint_at(int offset) const { return Bytes::get_native_u4(addr_at(offset)); } + + address ptr_at(int offset) const { return (address)Bytes::get_native_u8(addr_at(offset)); } + + oop oop_at (int offset) const { return cast_to_oop(Bytes::get_native_u8(addr_at(offset))); } + + + void set_int_at(int offset, jint i) { Bytes::put_native_u4(addr_at(offset), i); } + void set_uint_at(int offset, jint i) { Bytes::put_native_u4(addr_at(offset), i); } + void set_ptr_at (int offset, address ptr) { Bytes::put_native_u8(addr_at(offset), (u8)ptr); } + void set_oop_at (int offset, oop o) { Bytes::put_native_u8(addr_at(offset), cast_from_oop(o)); } + + public: + + inline friend NativeInstruction* nativeInstruction_at(address addr); + + static bool maybe_cpool_ref(address instr) { + return is_auipc_at(instr); + } + + bool is_membar() { + return (uint_at(0) & 0x7f) == 0b1111 && extract_funct3(addr_at(0)) == 0; + } +}; + +inline NativeInstruction* nativeInstruction_at(address addr) { + return (NativeInstruction*)addr; +} + + +inline NativeInstruction* nativeInstruction_at(uint32_t *addr) { + return (NativeInstruction*)addr; +} + +inline NativeCall* nativeCall_at(address addr); + + + + +class NativeCall: public NativeInstruction { + public: + enum RISCV_specific_constants { + instruction_size = 4, + instruction_offset = 0, + displacement_offset = 0, + return_address_offset = 4 + }; + + address instruction_address() const { return addr_at(instruction_offset); } + address next_instruction_address() const { return addr_at(return_address_offset); } + address return_address() const { return addr_at(return_address_offset); } + address destination() const; + + void set_destination(address dest) { + ; + intptr_t offset = (intptr_t)(dest - instruction_address()); + ; + ; + unsigned int insn = 0b1101111; + address pInsn = (address)(&insn); + Assembler::patch(pInsn, 31, 31, (offset >> 20) & 0x1); + Assembler::patch(pInsn, 30, 21, (offset >> 1) & 0x3ff); + Assembler::patch(pInsn, 20, 20, (offset >> 11) & 0x1); + Assembler::patch(pInsn, 19, 12, (offset >> 12) & 0xff); + Assembler::patch(pInsn, 11, 7, ra->encoding()); + set_int_at(displacement_offset, insn); + } + + void verify_alignment() {} + void verify(); + void print(); + + + inline friend NativeCall* nativeCall_at(address addr); + inline friend NativeCall* nativeCall_before(address return_address); + + static bool is_call_before(address return_address) { + return is_call_at(return_address - NativeCall::return_address_offset); + } + + + static void insert(address code_pos, address entry); + + static void replace_mt_safe(address instr_addr, address code_buffer); +# 330 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/nativeInst_riscv.hpp" + void set_destination_mt_safe(address dest, bool assert_lock = true); + + address get_trampoline(); +}; + +inline NativeCall* nativeCall_at(address addr) { + ; + NativeCall* call = (NativeCall*)(addr - NativeCall::instruction_offset); + ; + return call; +} + +inline NativeCall* nativeCall_before(address return_address) { + ; + NativeCall* call = (NativeCall*)(return_address - NativeCall::return_address_offset); + ; + return call; +} + + + +class NativeMovConstReg: public NativeInstruction { + public: + enum RISCV_specific_constants { + movptr_instruction_size = 6 * NativeInstruction::instruction_size, + load_pc_relative_instruction_size = 2 * NativeInstruction::instruction_size, + instruction_offset = 0, + displacement_offset = 0 + }; + + address instruction_address() const { return addr_at(instruction_offset); } + address next_instruction_address() const { + + + + + + if (nativeInstruction_at(instruction_address())->is_movptr()) { + if (is_addi_at(addr_at(movptr_instruction_size - NativeInstruction::instruction_size))) { + + return addr_at(movptr_instruction_size); + } else { + + return addr_at(movptr_instruction_size - NativeInstruction::instruction_size); + } + } else if (is_load_pc_relative_at(instruction_address())) { + + return addr_at(load_pc_relative_instruction_size); + } + do { if (!(false)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/nativeInst_riscv.hpp", 379, "guarantee(" "false" ") failed", "Unknown instruction in NativeMovConstReg"); } } while (0); + return nullptr; + } + + intptr_t data() const; + void set_data(intptr_t x); + + void flush() { + if (!maybe_cpool_ref(instruction_address())) { + ICache::invalidate_range(instruction_address(), movptr_instruction_size); + } + } + + void verify(); + void print(); + + + inline friend NativeMovConstReg* nativeMovConstReg_at(address addr); + inline friend NativeMovConstReg* nativeMovConstReg_before(address addr); +}; + +inline NativeMovConstReg* nativeMovConstReg_at(address addr) { + ; + NativeMovConstReg* test = (NativeMovConstReg*)(addr - NativeMovConstReg::instruction_offset); + ; + return test; +} + +inline NativeMovConstReg* nativeMovConstReg_before(address addr) { + ; + NativeMovConstReg* test = (NativeMovConstReg*)(addr - NativeMovConstReg::instruction_size - NativeMovConstReg::instruction_offset); + ; + return test; +} + + + +class NativeMovRegMem: public NativeInstruction { + public: + enum RISCV_specific_constants { + instruction_size = NativeInstruction::instruction_size, + instruction_offset = 0, + data_offset = 0, + next_instruction_offset = NativeInstruction::instruction_size + }; + + int instruction_start() const { return instruction_offset; } + + address instruction_address() const { return addr_at(instruction_offset); } + + int num_bytes_to_end_of_patch() const { return instruction_offset + instruction_size; } + + int offset() const; + + void set_offset(int x); + + void add_offset_in_bytes(int add_offset) { + set_offset(offset() + add_offset); + } + + void verify(); + void print(); + + private: + inline friend NativeMovRegMem* nativeMovRegMem_at(address addr); +}; + +inline NativeMovRegMem* nativeMovRegMem_at(address addr) { + NativeMovRegMem* test = (NativeMovRegMem*)(addr - NativeMovRegMem::instruction_offset); + ; + return test; +} + +class NativeJump: public NativeInstruction { + public: + enum RISCV_specific_constants { + instruction_size = NativeInstruction::instruction_size, + instruction_offset = 0, + data_offset = 0, + next_instruction_offset = NativeInstruction::instruction_size + }; + + address instruction_address() const { return addr_at(instruction_offset); } + address next_instruction_address() const { return addr_at(instruction_size); } + address jump_destination() const; + void set_jump_destination(address dest); + + + inline friend NativeJump* nativeJump_at(address address); + + void verify(); + + + static void insert(address code_pos, address entry); + + static void check_verified_entry_alignment(address entry, address verified_entry); + static void patch_verified_entry(address entry, address verified_entry, address dest); +}; + +inline NativeJump* nativeJump_at(address addr) { + NativeJump* jump = (NativeJump*)(addr - NativeJump::instruction_offset); + ; + return jump; +} + +class NativeGeneralJump: public NativeJump { +public: + enum RISCV_specific_constants { + instruction_size = 6 * NativeInstruction::instruction_size, + instruction_offset = 0, + data_offset = 0, + next_instruction_offset = 6 * NativeInstruction::instruction_size + }; + + address jump_destination() const; + + static void insert_unconditional(address code_pos, address entry); + static void replace_mt_safe(address instr_addr, address code_buffer); +}; + +inline NativeGeneralJump* nativeGeneralJump_at(address addr) { + ; + NativeGeneralJump* jump = (NativeGeneralJump*)(addr); + + return jump; +} + +class NativeIllegalInstruction: public NativeInstruction { + public: + + static void insert(address code_pos); +}; + +inline bool NativeInstruction::is_nop() const { + uint32_t insn = Assembler::ld_instr(addr_at(0)); + return insn == 0x13; +} + +inline bool NativeInstruction::is_jump_or_nop() { + return is_nop() || is_jump(); +} + + +class NativeCallTrampolineStub : public NativeInstruction { + public: + + enum RISCV_specific_constants { + + instruction_size = 3 * NativeInstruction::instruction_size + wordSize, + data_offset = 3 * NativeInstruction::instruction_size, + }; + + address destination(nmethod *nm = nullptr) const; + void set_destination(address new_destination); + ptrdiff_t destination_offset() const; +}; + +inline bool is_NativeCallTrampolineStub_at(address addr) { +# 546 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/nativeInst_riscv.hpp" + ; + const int instr_size = NativeInstruction::instruction_size; + if (NativeInstruction::is_auipc_at(addr) && + NativeInstruction::is_ld_at(addr + instr_size) && + NativeInstruction::is_jalr_at(addr + 2 * instr_size) && + (NativeInstruction::extract_rd(addr) == x5) && + (NativeInstruction::extract_rd(addr + instr_size) == x5) && + (NativeInstruction::extract_rs1(addr + instr_size) == x5) && + (NativeInstruction::extract_rs1(addr + 2 * instr_size) == x5) && + (Assembler::extract(Assembler::ld_instr(addr + 4), 31, 20) == NativeCallTrampolineStub::data_offset)) { + return true; + } + return false; +} + +inline NativeCallTrampolineStub* nativeCallTrampolineStub_at(address addr) { + ; + ; + return (NativeCallTrampolineStub*)addr; +} + +class NativeMembar : public NativeInstruction { +public: + uint32_t get_kind(); + void set_kind(uint32_t order_kind); +}; + +inline NativeMembar *NativeMembar_at(address addr) { + ; + ; + return (NativeMembar*)addr; +} + + + + + + + +class NativePostCallNop: public NativeInstruction { +public: + bool check() const { + + + + + return is_nop() && is_lui_to_zr_at(addr_at(4)); + } + int displacement() const; + void patch(jint diff); + void make_deopt(); +}; + +inline NativePostCallNop* nativePostCallNop_at(address address) { + NativePostCallNop* nop = (NativePostCallNop*) address; + if (nop->check()) { + return nop; + } + return nullptr; +} + +inline NativePostCallNop* nativePostCallNop_unsafe_at(address address) { + NativePostCallNop* nop = (NativePostCallNop*) address; + ; + return nop; +} + +class NativeDeoptInstruction: public NativeInstruction { + public: + enum { + instruction_size = 4, + instruction_offset = 0, + }; + + address instruction_address() const { return addr_at(instruction_offset); } + address next_instruction_address() const { return addr_at(instruction_size); } + + void verify(); + + static bool is_deopt_at(address instr) { + ; + uint32_t value = Assembler::ld_instr(instr); + + return value == 0xc0201073; + } + + + static void insert(address code_pos); +}; +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/code/nativeInst.hpp" 2 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/code/compiledMethod.inline.hpp" 2 + + + +inline bool CompiledMethod::is_deopt_pc(address pc) { return is_deopt_entry(pc) || is_deopt_mh_entry(pc); } + + +inline bool CompiledMethod::is_deopt_entry(address pc) { + return pc == deopt_handler_begin() + + || (is_compiled_by_jvmci() && pc == (deopt_handler_begin() + NativeCall::instruction_size)) + + ; +} + +inline bool CompiledMethod::is_deopt_mh_entry(address pc) { + return pc == deopt_mh_handler_begin() + + || (is_compiled_by_jvmci() && pc == (deopt_mh_handler_begin() + NativeCall::instruction_size)) + + ; +} +# 60 "/home/rehn/source/jdk/open/src/hotspot/share/code/compiledMethod.inline.hpp" +inline address CompiledMethod::get_deopt_original_pc(const frame* fr) { + if (fr->cb() == nullptr) return nullptr; + + CompiledMethod* cm = fr->cb()->as_compiled_method_or_null(); + if (cm != nullptr && cm->is_deopt_pc(fr->pc())) + return cm->get_original_pc(fr); + + return nullptr; +} + + + + +inline int ExceptionCache::count() { return Atomic::load_acquire(&_count); } + +address ExceptionCache::pc_at(int index) { + ; + return _pc[index]; +} + +address ExceptionCache::handler_at(int index) { + ; + return _handler[index]; +} + + +inline void ExceptionCache::increment_count() { Atomic::release_store(&_count, _count + 1); } +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/runtime/frame.inline.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/interpreter.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/interpreter.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/code/stubs.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/code/stubs.hpp" +class Mutex; +# 61 "/home/rehn/source/jdk/open/src/hotspot/share/code/stubs.hpp" +class Stub { + public: + + void initialize(int size) { do { (*g_assert_poison) = 'X';; report_should_not_call("src/hotspot/share/code/stubs.hpp", 64); } while (0); } + void finalize() { do { (*g_assert_poison) = 'X';; report_should_not_call("src/hotspot/share/code/stubs.hpp", 65); } while (0); } + + + int size() const { do { (*g_assert_poison) = 'X';; report_should_not_call("src/hotspot/share/code/stubs.hpp", 68); } while (0); return 0; } + + + address code_begin() const { do { (*g_assert_poison) = 'X';; report_should_not_call("src/hotspot/share/code/stubs.hpp", 71); } while (0); return nullptr; } + address code_end() const { do { (*g_assert_poison) = 'X';; report_should_not_call("src/hotspot/share/code/stubs.hpp", 72); } while (0); return nullptr; } + + + void verify() { do { (*g_assert_poison) = 'X';; report_should_not_call("src/hotspot/share/code/stubs.hpp", 75); } while (0); } + void print() { do { (*g_assert_poison) = 'X';; report_should_not_call("src/hotspot/share/code/stubs.hpp", 76); } while (0); } +}; +# 93 "/home/rehn/source/jdk/open/src/hotspot/share/code/stubs.hpp" +class StubInterface: public CHeapObj { + public: + + virtual void initialize(Stub* self, int size) = 0; + virtual void finalize(Stub* self) = 0; + + + virtual int size(Stub* self) const = 0; + virtual int alignment() const = 0; + + + virtual address code_begin(Stub* self) const = 0; + virtual address code_end(Stub* self) const = 0; + + + virtual void verify(Stub* self) = 0; + virtual void print(Stub* self) = 0; +}; +# 144 "/home/rehn/source/jdk/open/src/hotspot/share/code/stubs.hpp" +class StubQueue: public CHeapObj { + friend class VMStructs; + private: + StubInterface* _stub_interface; + address _stub_buffer; + int _buffer_size; + int _buffer_limit; + int _queue_begin; + int _queue_end; + int _number_of_stubs; + Mutex* const _mutex; + + void check_index(int i) const { ; } + bool is_contiguous() const { return _queue_begin <= _queue_end; } + int index_of(Stub* s) const { int i = (int)((address)s - _stub_buffer); check_index(i); return i; } + Stub* stub_at(int i) const { check_index(i); return (Stub*)(_stub_buffer + i); } + Stub* current_stub() const { return stub_at(_queue_end); } + + + void stub_initialize(Stub* s, int size) { ; _stub_interface->initialize(s, size); } + void stub_finalize(Stub* s) { _stub_interface->finalize(s); } + int stub_size(Stub* s) const { return _stub_interface->size(s); } + bool stub_contains(Stub* s, address pc) const { return _stub_interface->code_begin(s) <= pc && pc < _stub_interface->code_end(s); } + int stub_alignment() const { return _stub_interface->alignment(); } + address stub_code_begin(Stub* s) const { return _stub_interface->code_begin(s); } + void stub_verify(Stub* s) { _stub_interface->verify(s); } + void stub_print(Stub* s) { _stub_interface->print(s); } + + + int compute_stub_size(Stub* stub, int code_size); + + public: + StubQueue(StubInterface* stub_interface, int buffer_size, Mutex* lock, + const char* name); + ~StubQueue(); + + + bool is_empty() const { return _queue_begin == _queue_end; } + int total_space() const { return _buffer_size - 1; } + int available_space() const { int d = _queue_begin - _queue_end - 1; return d < 0 ? d + _buffer_size : d; } + int used_space() const { return total_space() - available_space(); } + int number_of_stubs() const { return _number_of_stubs; } + bool contains(address pc) const { return _stub_buffer <= pc && pc < _stub_buffer + _buffer_limit; } + Stub* stub_containing(address pc) const; + address code_start() const { return _stub_buffer; } + address code_end() const { return _stub_buffer + _buffer_limit; } + + + Stub* request_committed(int code_size); + Stub* request(int requested_code_size); + void commit (int committed_code_size); + + + void remove_first(); + void remove_first(int n); + void remove_all(); + + void deallocate_unused_tail(); + + + Stub* first() const { return number_of_stubs() > 0 ? stub_at(_queue_begin) : nullptr; } + Stub* next(Stub* s) const { int i = index_of(s) + stub_size(s); + + if (i == _buffer_limit && _queue_end < _buffer_limit) i = 0; + return (i == _queue_end) ? nullptr : stub_at(i); + } + + + void verify(); + void print(); + +}; +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/interpreter.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/interp_masm.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/interp_masm.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/asm/macroAssembler.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/asm/macroAssembler.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/asm/assembler.inline.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/asm/assembler.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.inline.hpp" 1 +# 30 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.inline.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/asm/assembler.inline.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/assembler_riscv.inline.hpp" 2 + + + +inline bool Assembler::is_simm5(int64_t x) { return is_simm(x, 5); } +inline bool Assembler::is_simm6(int64_t x) { return is_simm(x, 6); } +inline bool Assembler::is_simm12(int64_t x) { return is_simm(x, 12); } +inline bool Assembler::is_simm13(int64_t x) { return is_simm(x, 13); } +inline bool Assembler::is_simm18(int64_t x) { return is_simm(x, 18); } +inline bool Assembler::is_simm21(int64_t x) { return is_simm(x, 21); } + +inline bool Assembler::is_uimm3(uint64_t x) { return is_uimm(x, 3); } +inline bool Assembler::is_uimm5(uint64_t x) { return is_uimm(x, 5); } +inline bool Assembler::is_uimm6(uint64_t x) { return is_uimm(x, 6); } +inline bool Assembler::is_uimm7(uint64_t x) { return is_uimm(x, 7); } +inline bool Assembler::is_uimm8(uint64_t x) { return is_uimm(x, 8); } +inline bool Assembler::is_uimm9(uint64_t x) { return is_uimm(x, 9); } +inline bool Assembler::is_uimm10(uint64_t x) { return is_uimm(x, 10); } +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/asm/assembler.inline.hpp" 2 +# 31 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/nativeInst_riscv.hpp" 1 +# 34 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" 2 +# 42 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" +class MacroAssembler: public Assembler { + + public: + MacroAssembler(CodeBuffer* code) : Assembler(code) {} + + void safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod); + + + int align(int modulus, int extra_offset = 0); + + static inline void assert_alignment(address pc, int alignment = NativeInstruction::instruction_size) { + ; + } + + + void post_call_nop(); + + + + + void enter() { + addi(sp, sp, - 2 * wordSize); + sd(ra, Address(sp, wordSize)); + sd(fp, Address(sp)); + addi(fp, sp, 2 * wordSize); + } + + void leave() { + addi(sp, fp, - 2 * wordSize); + ld(fp, Address(sp)); + ld(ra, Address(sp, wordSize)); + addi(sp, sp, 2 * wordSize); + } + + + + + void get_thread(Register thread); + + + + + + + + void call_VM(Register oop_result, + address entry_point, + bool check_exceptions = true); + void call_VM(Register oop_result, + address entry_point, + Register arg_1, + bool check_exceptions = true); + void call_VM(Register oop_result, + address entry_point, + Register arg_1, Register arg_2, + bool check_exceptions = true); + void call_VM(Register oop_result, + address entry_point, + Register arg_1, Register arg_2, Register arg_3, + bool check_exceptions = true); + + + void call_VM(Register oop_result, + Register last_java_sp, + address entry_point, + int number_of_arguments = 0, + bool check_exceptions = true); + void call_VM(Register oop_result, + Register last_java_sp, + address entry_point, + Register arg_1, + bool check_exceptions = true); + void call_VM(Register oop_result, + Register last_java_sp, + address entry_point, + Register arg_1, Register arg_2, + bool check_exceptions = true); + void call_VM(Register oop_result, + Register last_java_sp, + address entry_point, + Register arg_1, Register arg_2, Register arg_3, + bool check_exceptions = true); + + void get_vm_result(Register oop_result, Register java_thread); + void get_vm_result_2(Register metadata_result, Register java_thread); + + + + void call_VM_leaf(address entry_point, + int number_of_arguments = 0); + void call_VM_leaf(address entry_point, + Register arg_0); + void call_VM_leaf(address entry_point, + Register arg_0, Register arg_1); + void call_VM_leaf(address entry_point, + Register arg_0, Register arg_1, Register arg_2); + + + + void super_call_VM_leaf(address entry_point, Register arg_0); + void super_call_VM_leaf(address entry_point, Register arg_0, Register arg_1); + void super_call_VM_leaf(address entry_point, Register arg_0, Register arg_1, Register arg_2); + void super_call_VM_leaf(address entry_point, Register arg_0, Register arg_1, Register arg_2, Register arg_3); + + + void set_last_Java_frame(Register last_java_sp, Register last_java_fp, address last_java_pc, Register tmp); + void set_last_Java_frame(Register last_java_sp, Register last_java_fp, Label &last_java_pc, Register tmp); + void set_last_Java_frame(Register last_java_sp, Register last_java_fp, Register last_java_pc, Register tmp); + + + void reset_last_Java_frame(bool clear_fp); + + virtual void call_VM_leaf_base( + address entry_point, + int number_of_arguments, + Label* retaddr = nullptr + ); + + virtual void call_VM_leaf_base( + address entry_point, + int number_of_arguments, + Label& retaddr) { + call_VM_leaf_base(entry_point, number_of_arguments, &retaddr); + } + + virtual void call_VM_base( + Register oop_result, + Register java_thread, + Register last_java_sp, + address entry_point, + int number_of_arguments, + bool check_exceptions + ); + + void call_VM_helper(Register oop_result, address entry_point, int number_of_arguments, bool check_exceptions); + + virtual void check_and_handle_earlyret(Register java_thread); + virtual void check_and_handle_popframe(Register java_thread); + + void resolve_weak_handle(Register result, Register tmp1, Register tmp2); + void resolve_oop_handle(Register result, Register tmp1, Register tmp2); + void resolve_jobject(Register value, Register tmp1, Register tmp2); + void resolve_global_jobject(Register value, Register tmp1, Register tmp2); + + void movoop(Register dst, jobject obj); + void mov_metadata(Register dst, Metadata* obj); + void bang_stack_size(Register size, Register tmp); + void set_narrow_oop(Register dst, jobject obj); + void set_narrow_klass(Register dst, Klass* k); + + void load_mirror(Register dst, Register method, Register tmp1, Register tmp2); + void access_load_at(BasicType type, DecoratorSet decorators, Register dst, + Address src, Register tmp1, Register tmp2); + void access_store_at(BasicType type, DecoratorSet decorators, Address dst, + Register val, Register tmp1, Register tmp2, Register tmp3); + void load_klass(Register dst, Register src, Register tmp = t0); + void store_klass(Register dst, Register src, Register tmp = t0); + void cmp_klass(Register oop, Register trial_klass, Register tmp1, Register tmp2, Label &L); + + void encode_klass_not_null(Register r, Register tmp = t0); + void decode_klass_not_null(Register r, Register tmp = t0); + void encode_klass_not_null(Register dst, Register src, Register tmp); + void decode_klass_not_null(Register dst, Register src, Register tmp); + void decode_heap_oop_not_null(Register r); + void decode_heap_oop_not_null(Register dst, Register src); + void decode_heap_oop(Register d, Register s); + void decode_heap_oop(Register r) { decode_heap_oop(r, r); } + void encode_heap_oop(Register d, Register s); + void encode_heap_oop(Register r) { encode_heap_oop(r, r); }; + void load_heap_oop(Register dst, Address src, Register tmp1, + Register tmp2, DecoratorSet decorators = 0); + void load_heap_oop_not_null(Register dst, Address src, Register tmp1, + Register tmp2, DecoratorSet decorators = 0); + void store_heap_oop(Address dst, Register val, Register tmp1, + Register tmp2, Register tmp3, DecoratorSet decorators = 0); + + void store_klass_gap(Register dst, Register src); + + + + + void store_heap_oop_null(Address dst); + + + + + + void store_heap_oop(Address dst, void* dummy); +# 238 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + virtual void null_check(Register reg, int offset = -1); + static bool needs_explicit_null_check(intptr_t offset); + static bool uses_implicit_null_check(void* address); + + + int corrected_idivl(Register result, Register rs1, Register rs2, + bool want_remainder); + int corrected_idivq(Register result, Register rs1, Register rs2, + bool want_remainder); + + + void lookup_interface_method(Register recv_klass, + Register intf_klass, + RegisterOrConstant itable_index, + Register method_result, + Register scan_tmp, + Label& no_such_interface, + bool return_method = true); + + + + void lookup_virtual_method(Register recv_klass, + RegisterOrConstant vtable_index, + Register method_result); + + + + + + Address form_address(Register Rd, Register base, int64_t byte_offset); + + + + Address legitimize_address(Register Rd, const Address &adr) { + if (adr.getMode() == Address::base_plus_offset) { + if (!is_simm12(adr.offset())) { + return form_address(Rd, adr.base(), adr.offset()); + } + } + return adr; + } + + + void tlab_allocate( + Register obj, + Register var_size_in_bytes, + int con_size_in_bytes, + Register tmp1, + Register tmp2, + Label& slow_case, + bool is_far = false + ); + + + + + + + + void check_klass_subtype_fast_path(Register sub_klass, + Register super_klass, + Register tmp_reg, + Label* L_success, + Label* L_failure, + Label* L_slow_path, + Register super_check_offset = noreg); + + + + + + void check_klass_subtype_slow_path(Register sub_klass, + Register super_klass, + Register tmp1_reg, + Register tmp2_reg, + Label* L_success, + Label* L_failure); + + void check_klass_subtype(Register sub_klass, + Register super_klass, + Register tmp_reg, + Label& L_success); + + Address argument_address(RegisterOrConstant arg_slot, int extra_slot_offset = 0); + + + void _verify_oop(Register reg, const char* s, const char* file, int line); + void _verify_oop_addr(Address addr, const char* s, const char* file, int line); + + void _verify_oop_checked(Register reg, const char* s, const char* file, int line) { + if (VerifyOops) { + _verify_oop(reg, s, file, line); + } + } + void _verify_oop_addr_checked(Address reg, const char* s, const char* file, int line) { + if (VerifyOops) { + _verify_oop_addr(reg, s, file, line); + } + } + + void _verify_method_ptr(Register reg, const char* msg, const char* file, int line) {} + void _verify_klass_ptr(Register reg, const char* msg, const char* file, int line) {} +# 350 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + enum Membar_mask_bits { + StoreStore = 0b0101, + LoadStore = 0b1001, + StoreLoad = 0b0110, + LoadLoad = 0b1010, + AnyAny = LoadStore | StoreLoad + }; + + void membar(uint32_t order_constraint); + + static void membar_mask_to_pred_succ(uint32_t order_constraint, + uint32_t& predecessor, uint32_t& successor) { + predecessor = (order_constraint >> 2) & 0x3; + successor = order_constraint & 0x3; + + + + + + if (UseConservativeFence) { + predecessor |= predecessor << 2; + successor |= successor << 2; + } + } + + static int pred_succ_to_membar_mask(uint32_t predecessor, uint32_t successor) { + return ((predecessor & 0x3) << 2) | (successor & 0x3); + } + + void fence(uint32_t predecessor, uint32_t successor) { + if (UseZtso) { + if ((pred_succ_to_membar_mask(predecessor, successor) & StoreLoad) == StoreLoad) { + + + + Assembler::fence(predecessor, successor); + } else { + + } + } else { + + Assembler::fence(predecessor, successor); + } + } + + void pause() { + Assembler::fence(w, 0); + } + + + void stop(const char* msg); + + static void debug64(char* msg, int64_t pc, int64_t regs[]); + + void unimplemented(const char* what = ""); + + void should_not_reach_here() { stop("should not reach here"); } + + static address target_addr_for_insn(address insn_addr); + + + + static int pd_patch_instruction_size(address branch, address target); + static void pd_patch_instruction(address branch, address target, const char* file = nullptr, int line = 0) { + pd_patch_instruction_size(branch, target); + } + static address pd_call_destination(address branch) { + return target_addr_for_insn(branch); + } + + static int patch_oop(address insn_addr, address o); + + static address get_target_of_li32(address insn_addr); + static int patch_imm_in_li32(address branch, int32_t target); + + + virtual bool in_scratch_emit_size() { + return false; + } + + address emit_trampoline_stub(int insts_call_instruction_offset, address target); + static int max_trampoline_stub_size(); + void emit_static_call_stub(); + static int static_call_stub_size(); + + + + + int load_unsigned_byte(Register dst, Address src); + int load_unsigned_short(Register dst, Address src); + + + int load_signed_byte(Register dst, Address src); + int load_signed_short(Register dst, Address src); + + + void load_sized_value(Register dst, Address src, size_t size_in_bytes, bool is_signed); + void store_sized_value(Address dst, Register src, size_t size_in_bytes); + + + void load_short_misaligned(Register dst, Address src, Register tmp, bool is_signed, int granularity = 1); + void load_int_misaligned(Register dst, Address src, Register tmp, bool is_signed, int granularity = 1); + void load_long_misaligned(Register dst, Address src, Register tmp, int granularity = 1); + + public: + + inline void nop() { + addi(x0, x0, 0); + } + + inline void mv(Register Rd, Register Rs) { + if (Rd != Rs) { + addi(Rd, Rs, 0); + } + } + + inline void notr(Register Rd, Register Rs) { + xori(Rd, Rs, -1); + } + + inline void neg(Register Rd, Register Rs) { + sub(Rd, x0, Rs); + } + + inline void negw(Register Rd, Register Rs) { + subw(Rd, x0, Rs); + } + + inline void sext_w(Register Rd, Register Rs) { + addiw(Rd, Rs, 0); + } + + inline void zext_b(Register Rd, Register Rs) { + andi(Rd, Rs, 0xFF); + } + + inline void seqz(Register Rd, Register Rs) { + sltiu(Rd, Rs, 1); + } + + inline void snez(Register Rd, Register Rs) { + sltu(Rd, x0, Rs); + } + + inline void sltz(Register Rd, Register Rs) { + slt(Rd, Rs, x0); + } + + inline void sgtz(Register Rd, Register Rs) { + slt(Rd, x0, Rs); + } + + + + inline void zext_w(Register Rd, Register Rs) { + add_uw(Rd, Rs, zr); + } + + + inline void fmv_s(FloatRegister Rd, FloatRegister Rs) { + if (Rd != Rs) { + fsgnj_s(Rd, Rs, Rs); + } + } + + inline void fabs_s(FloatRegister Rd, FloatRegister Rs) { + fsgnjx_s(Rd, Rs, Rs); + } + + inline void fneg_s(FloatRegister Rd, FloatRegister Rs) { + fsgnjn_s(Rd, Rs, Rs); + } + + inline void fmv_d(FloatRegister Rd, FloatRegister Rs) { + if (Rd != Rs) { + fsgnj_d(Rd, Rs, Rs); + } + } + + inline void fabs_d(FloatRegister Rd, FloatRegister Rs) { + fsgnjx_d(Rd, Rs, Rs); + } + + inline void fneg_d(FloatRegister Rd, FloatRegister Rs) { + fsgnjn_d(Rd, Rs, Rs); + } + + + void rdinstret(Register Rd); + void rdcycle(Register Rd); + void rdtime(Register Rd); + void csrr(Register Rd, unsigned csr); + void csrw(unsigned csr, Register Rs); + void csrs(unsigned csr, Register Rs); + void csrc(unsigned csr, Register Rs); + void csrwi(unsigned csr, unsigned imm); + void csrsi(unsigned csr, unsigned imm); + void csrci(unsigned csr, unsigned imm); + void frcsr(Register Rd); + void fscsr(Register Rd, Register Rs); + void fscsr(Register Rs); + void frrm(Register Rd); + void fsrm(Register Rd, Register Rs); + void fsrm(Register Rs); + void fsrmi(Register Rd, unsigned imm); + void fsrmi(unsigned imm); + void frflags(Register Rd); + void fsflags(Register Rd, Register Rs); + void fsflags(Register Rs); + void fsflagsi(Register Rd, unsigned imm); + void fsflagsi(unsigned imm); + + + void beqz(Register Rs, const address dest); + void bnez(Register Rs, const address dest); + void blez(Register Rs, const address dest); + void bgez(Register Rs, const address dest); + void bltz(Register Rs, const address dest); + void bgtz(Register Rs, const address dest); + + void j(Label &l, Register temp = t0); + void j(const address dest, Register temp = t0); + void j(const Address &adr, Register temp = t0); + void jal(Label &l, Register temp = t0); + void jal(const address dest, Register temp = t0); + void jal(const Address &adr, Register temp = t0); + void jal(Register Rd, Label &L, Register temp = t0); + void jal(Register Rd, const address dest, Register temp = t0); + + + void beqz(Register Rs, Label &l, bool is_far = false); + void bnez(Register Rs, Label &l, bool is_far = false); + void blez(Register Rs, Label &l, bool is_far = false); + void bgez(Register Rs, Label &l, bool is_far = false); + void bltz(Register Rs, Label &l, bool is_far = false); + void bgtz(Register Rs, Label &l, bool is_far = false); + + void beq (Register Rs1, Register Rs2, Label &L, bool is_far = false); + void bne (Register Rs1, Register Rs2, Label &L, bool is_far = false); + void blt (Register Rs1, Register Rs2, Label &L, bool is_far = false); + void bge (Register Rs1, Register Rs2, Label &L, bool is_far = false); + void bltu(Register Rs1, Register Rs2, Label &L, bool is_far = false); + void bgeu(Register Rs1, Register Rs2, Label &L, bool is_far = false); + + void bgt (Register Rs, Register Rt, const address dest); + void ble (Register Rs, Register Rt, const address dest); + void bgtu(Register Rs, Register Rt, const address dest); + void bleu(Register Rs, Register Rt, const address dest); + + void bgt (Register Rs, Register Rt, Label &l, bool is_far = false); + void ble (Register Rs, Register Rt, Label &l, bool is_far = false); + void bgtu(Register Rs, Register Rt, Label &l, bool is_far = false); + void bleu(Register Rs, Register Rt, Label &l, bool is_far = false); +# 624 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + void beq(Register Rs1, Register Rs2, const address dest) { ; int64_t offset = dest - pc(); do { if (!(is_simm13(offset) && is_even(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 624, "guarantee(" "is_simm13(offset) && is_even(offset)" ") failed", "offset is invalid: is_simm_13: %s offset: " "%" +# 624 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" 3 + "l" "d" +# 624 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + , ((is_simm13(offset)) ? "true" : "false"), offset); } } while (0); Assembler::beq(Rs1, Rs2, offset); } void beq(Register Rs1, Register Rs2, address dest, relocInfo::relocType rtype) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 624, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); beq(Rs1, Rs2, dest); }; + void bne(Register Rs1, Register Rs2, const address dest) { ; int64_t offset = dest - pc(); do { if (!(is_simm13(offset) && is_even(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 625, "guarantee(" "is_simm13(offset) && is_even(offset)" ") failed", "offset is invalid: is_simm_13: %s offset: " "%" +# 625 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" 3 + "l" "d" +# 625 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + , ((is_simm13(offset)) ? "true" : "false"), offset); } } while (0); Assembler::bne(Rs1, Rs2, offset); } void bne(Register Rs1, Register Rs2, address dest, relocInfo::relocType rtype) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 625, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); bne(Rs1, Rs2, dest); }; + void bge(Register Rs1, Register Rs2, const address dest) { ; int64_t offset = dest - pc(); do { if (!(is_simm13(offset) && is_even(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 626, "guarantee(" "is_simm13(offset) && is_even(offset)" ") failed", "offset is invalid: is_simm_13: %s offset: " "%" +# 626 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" 3 + "l" "d" +# 626 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + , ((is_simm13(offset)) ? "true" : "false"), offset); } } while (0); Assembler::bge(Rs1, Rs2, offset); } void bge(Register Rs1, Register Rs2, address dest, relocInfo::relocType rtype) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 626, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); bge(Rs1, Rs2, dest); }; + void bgeu(Register Rs1, Register Rs2, const address dest) { ; int64_t offset = dest - pc(); do { if (!(is_simm13(offset) && is_even(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 627, "guarantee(" "is_simm13(offset) && is_even(offset)" ") failed", "offset is invalid: is_simm_13: %s offset: " "%" +# 627 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" 3 + "l" "d" +# 627 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + , ((is_simm13(offset)) ? "true" : "false"), offset); } } while (0); Assembler::bgeu(Rs1, Rs2, offset); } void bgeu(Register Rs1, Register Rs2, address dest, relocInfo::relocType rtype) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 627, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); bgeu(Rs1, Rs2, dest); }; + void blt(Register Rs1, Register Rs2, const address dest) { ; int64_t offset = dest - pc(); do { if (!(is_simm13(offset) && is_even(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 628, "guarantee(" "is_simm13(offset) && is_even(offset)" ") failed", "offset is invalid: is_simm_13: %s offset: " "%" +# 628 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" 3 + "l" "d" +# 628 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + , ((is_simm13(offset)) ? "true" : "false"), offset); } } while (0); Assembler::blt(Rs1, Rs2, offset); } void blt(Register Rs1, Register Rs2, address dest, relocInfo::relocType rtype) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 628, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); blt(Rs1, Rs2, dest); }; + void bltu(Register Rs1, Register Rs2, const address dest) { ; int64_t offset = dest - pc(); do { if (!(is_simm13(offset) && is_even(offset))) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 629, "guarantee(" "is_simm13(offset) && is_even(offset)" ") failed", "offset is invalid: is_simm_13: %s offset: " "%" +# 629 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" 3 + "l" "d" +# 629 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + , ((is_simm13(offset)) ? "true" : "false"), offset); } } while (0); Assembler::bltu(Rs1, Rs2, offset); } void bltu(Register Rs1, Register Rs2, address dest, relocInfo::relocType rtype) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 629, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); bltu(Rs1, Rs2, dest); }; + + + + + + void float_beq(FloatRegister Rs1, FloatRegister Rs2, Label &l, bool is_far = false, bool is_unordered = false); + void float_bne(FloatRegister Rs1, FloatRegister Rs2, Label &l, bool is_far = false, bool is_unordered = false); + void float_ble(FloatRegister Rs1, FloatRegister Rs2, Label &l, bool is_far = false, bool is_unordered = false); + void float_bge(FloatRegister Rs1, FloatRegister Rs2, Label &l, bool is_far = false, bool is_unordered = false); + void float_blt(FloatRegister Rs1, FloatRegister Rs2, Label &l, bool is_far = false, bool is_unordered = false); + void float_bgt(FloatRegister Rs1, FloatRegister Rs2, Label &l, bool is_far = false, bool is_unordered = false); + + void double_beq(FloatRegister Rs1, FloatRegister Rs2, Label &l, bool is_far = false, bool is_unordered = false); + void double_bne(FloatRegister Rs1, FloatRegister Rs2, Label &l, bool is_far = false, bool is_unordered = false); + void double_ble(FloatRegister Rs1, FloatRegister Rs2, Label &l, bool is_far = false, bool is_unordered = false); + void double_bge(FloatRegister Rs1, FloatRegister Rs2, Label &l, bool is_far = false, bool is_unordered = false); + void double_blt(FloatRegister Rs1, FloatRegister Rs2, Label &l, bool is_far = false, bool is_unordered = false); + void double_bgt(FloatRegister Rs1, FloatRegister Rs2, Label &l, bool is_far = false, bool is_unordered = false); + +private: + int push_reg(unsigned int bitset, Register stack); + int pop_reg(unsigned int bitset, Register stack); + int push_fp(unsigned int bitset, Register stack); + int pop_fp(unsigned int bitset, Register stack); + + int push_v(unsigned int bitset, Register stack); + int pop_v(unsigned int bitset, Register stack); + + +public: + void push_reg(Register Rs); + void pop_reg(Register Rd); + void push_reg(RegSet regs, Register stack) { if (regs.bits()) push_reg(regs.bits(), stack); } + void pop_reg(RegSet regs, Register stack) { if (regs.bits()) pop_reg(regs.bits(), stack); } + void push_fp(FloatRegSet regs, Register stack) { if (regs.bits()) push_fp(regs.bits(), stack); } + void pop_fp(FloatRegSet regs, Register stack) { if (regs.bits()) pop_fp(regs.bits(), stack); } + + void push_v(VectorRegSet regs, Register stack) { if (regs.bits()) push_v(regs.bits(), stack); } + void pop_v(VectorRegSet regs, Register stack) { if (regs.bits()) pop_v(regs.bits(), stack); } + + + + + + + void push_call_clobbered_registers_except(RegSet exclude); + void pop_call_clobbered_registers_except(RegSet exclude); + + void push_call_clobbered_registers() { + push_call_clobbered_registers_except(RegSet()); + } + void pop_call_clobbered_registers() { + pop_call_clobbered_registers_except(RegSet()); + } + + void push_CPU_state(bool save_vectors = false, int vector_size_in_bytes = 0); + void pop_CPU_state(bool restore_vectors = false, int vector_size_in_bytes = 0); + + void push_cont_fastpath(Register java_thread); + void pop_cont_fastpath(Register java_thread); + + + void reinit_heapbase(); + + void bind(Label& L) { + Assembler::bind(L); + + code()->clear_last_insn(); + } + + typedef void (MacroAssembler::* compare_and_branch_insn)(Register Rs1, Register Rs2, const address dest); + typedef void (MacroAssembler::* compare_and_branch_label_insn)(Register Rs1, Register Rs2, Label &L, bool is_far); + typedef void (MacroAssembler::* jal_jalr_insn)(Register Rt, address dest); + typedef void (MacroAssembler::* load_insn_by_temp)(Register Rt, address dest, Register temp); + + void wrap_label(Register r, Label &L, Register t, load_insn_by_temp insn); + void wrap_label(Register r, Label &L, jal_jalr_insn insn); + void wrap_label(Register r1, Register r2, Label &L, + compare_and_branch_insn insn, + compare_and_branch_label_insn neg_insn, bool is_far = false); + + void la(Register Rd, Label &label); + void la(Register Rd, const address dest); + void la(Register Rd, const Address &adr); + + void li16u(Register Rd, uint16_t imm); + void li32(Register Rd, int32_t imm); + void li64(Register Rd, int64_t imm); + void li (Register Rd, int64_t imm); + + + void mv(Register Rd, address addr) { li(Rd, (int64_t)addr); } + void mv(Register Rd, address addr, int32_t &offset) { + + + offset = ((int32_t)(int64_t)addr << 20) >> 20; + li(Rd, (int64_t)addr - offset); + } + + template::value), int> = 0> + inline void mv(Register Rd, T o) { li(Rd, (int64_t)o); } + + void mv(Register Rd, Address dest) { + ; + relocate(dest.rspec(), [&] { + movptr(Rd, dest.target()); + }); + } + + void mv(Register Rd, RegisterOrConstant src) { + if (src.is_register()) { + mv(Rd, src.as_register()); + } else { + mv(Rd, src.as_constant()); + } + } + + void movptr(Register Rd, address addr, int32_t &offset); + + void movptr(Register Rd, address addr) { + int offset = 0; + movptr(Rd, addr, offset); + addi(Rd, Rd, offset); + } + + inline void movptr(Register Rd, uintptr_t imm64) { + movptr(Rd, (address)imm64); + } + + + void add (Register Rd, Register Rn, int64_t increment, Register temp = t0); + void addw(Register Rd, Register Rn, int32_t increment, Register temp = t0); + void sub (Register Rd, Register Rn, int64_t decrement, Register temp = t0); + void subw(Register Rd, Register Rn, int32_t decrement, Register temp = t0); + + + + + + + inline void add(Register Rd, Register Rs1, Register Rs2) { Assembler::add(Rd, Rs1, Rs2); }; + inline void addw(Register Rd, Register Rs1, Register Rs2) { Assembler::addw(Rd, Rs1, Rs2); }; + inline void sub(Register Rd, Register Rs1, Register Rs2) { Assembler::sub(Rd, Rs1, Rs2); }; + inline void subw(Register Rd, Register Rs1, Register Rs2) { Assembler::subw(Rd, Rs1, Rs2); }; + + + + + void andrw(Register Rd, Register Rs1, Register Rs2); + void orrw(Register Rd, Register Rs1, Register Rs2); + void xorrw(Register Rd, Register Rs1, Register Rs2); + + + void andn(Register Rd, Register Rs1, Register Rs2); + void orn(Register Rd, Register Rs1, Register Rs2); + + + void revb_h_h(Register Rd, Register Rs, Register tmp = t0); + void revb_w_w(Register Rd, Register Rs, Register tmp1 = t0, Register tmp2 = t1); + void revb_h_h_u(Register Rd, Register Rs, Register tmp = t0); + void revb_h_w_u(Register Rd, Register Rs, Register tmp1 = t0, Register tmp2 = t1); + void revb_h_helper(Register Rd, Register Rs, Register tmp1 = t0, Register tmp2= t1); + void revb_h(Register Rd, Register Rs, Register tmp1 = t0, Register tmp2= t1); + void revb_w(Register Rd, Register Rs, Register tmp1 = t0, Register tmp2= t1); + void revb(Register Rd, Register Rs, Register tmp1 = t0, Register tmp2 = t1); + + void ror_imm(Register dst, Register src, uint32_t shift, Register tmp = t0); + void rolw_imm(Register dst, Register src, uint32_t, Register tmp = t0); + void andi(Register Rd, Register Rn, int64_t imm, Register tmp = t0); + void orptr(Address adr, RegisterOrConstant src, Register tmp1 = t0, Register tmp2 = t1); +# 856 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + void lb(Register Rd, address dest) { ; int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(Rd, (int32_t)distance + 0x800); Assembler::lb(Rd, Rd, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(Rd, dest, offset); Assembler::lb(Rd, Rd, offset); } } void lb(Register Rd, address dest, relocInfo::relocType rtype) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 856, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); lb(Rd, dest); } void lb(Register Rd, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { relocate(adr.rspec(), [&] { lb(Rd, adr.target()); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::lb(Rd, adr.base(), adr.offset()); } else { int32_t offset = ((int32_t)adr.offset() << 20) >> 20; if (Rd == adr.base()) { la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::lb(Rd, temp, offset); } else { la(Rd, Address(adr.base(), adr.offset() - offset)); Assembler::lb(Rd, Rd, offset); } } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 856); } while (0); } } void lb(Register Rd, Label &L) { wrap_label(Rd, L, &MacroAssembler::lb); }; + void lbu(Register Rd, address dest) { ; int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(Rd, (int32_t)distance + 0x800); Assembler::lbu(Rd, Rd, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(Rd, dest, offset); Assembler::lbu(Rd, Rd, offset); } } void lbu(Register Rd, address dest, relocInfo::relocType rtype) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 857, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); lbu(Rd, dest); } void lbu(Register Rd, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { relocate(adr.rspec(), [&] { lbu(Rd, adr.target()); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::lbu(Rd, adr.base(), adr.offset()); } else { int32_t offset = ((int32_t)adr.offset() << 20) >> 20; if (Rd == adr.base()) { la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::lbu(Rd, temp, offset); } else { la(Rd, Address(adr.base(), adr.offset() - offset)); Assembler::lbu(Rd, Rd, offset); } } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 857); } while (0); } } void lbu(Register Rd, Label &L) { wrap_label(Rd, L, &MacroAssembler::lbu); }; + void lh(Register Rd, address dest) { ; int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(Rd, (int32_t)distance + 0x800); Assembler::lh(Rd, Rd, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(Rd, dest, offset); Assembler::lh(Rd, Rd, offset); } } void lh(Register Rd, address dest, relocInfo::relocType rtype) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 858, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); lh(Rd, dest); } void lh(Register Rd, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { relocate(adr.rspec(), [&] { lh(Rd, adr.target()); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::lh(Rd, adr.base(), adr.offset()); } else { int32_t offset = ((int32_t)adr.offset() << 20) >> 20; if (Rd == adr.base()) { la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::lh(Rd, temp, offset); } else { la(Rd, Address(adr.base(), adr.offset() - offset)); Assembler::lh(Rd, Rd, offset); } } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 858); } while (0); } } void lh(Register Rd, Label &L) { wrap_label(Rd, L, &MacroAssembler::lh); }; + void lhu(Register Rd, address dest) { ; int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(Rd, (int32_t)distance + 0x800); Assembler::lhu(Rd, Rd, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(Rd, dest, offset); Assembler::lhu(Rd, Rd, offset); } } void lhu(Register Rd, address dest, relocInfo::relocType rtype) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 859, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); lhu(Rd, dest); } void lhu(Register Rd, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { relocate(adr.rspec(), [&] { lhu(Rd, adr.target()); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::lhu(Rd, adr.base(), adr.offset()); } else { int32_t offset = ((int32_t)adr.offset() << 20) >> 20; if (Rd == adr.base()) { la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::lhu(Rd, temp, offset); } else { la(Rd, Address(adr.base(), adr.offset() - offset)); Assembler::lhu(Rd, Rd, offset); } } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 859); } while (0); } } void lhu(Register Rd, Label &L) { wrap_label(Rd, L, &MacroAssembler::lhu); }; + void lw(Register Rd, address dest) { ; int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(Rd, (int32_t)distance + 0x800); Assembler::lw(Rd, Rd, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(Rd, dest, offset); Assembler::lw(Rd, Rd, offset); } } void lw(Register Rd, address dest, relocInfo::relocType rtype) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 860, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); lw(Rd, dest); } void lw(Register Rd, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { relocate(adr.rspec(), [&] { lw(Rd, adr.target()); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::lw(Rd, adr.base(), adr.offset()); } else { int32_t offset = ((int32_t)adr.offset() << 20) >> 20; if (Rd == adr.base()) { la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::lw(Rd, temp, offset); } else { la(Rd, Address(adr.base(), adr.offset() - offset)); Assembler::lw(Rd, Rd, offset); } } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 860); } while (0); } } void lw(Register Rd, Label &L) { wrap_label(Rd, L, &MacroAssembler::lw); }; + void lwu(Register Rd, address dest) { ; int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(Rd, (int32_t)distance + 0x800); Assembler::lwu(Rd, Rd, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(Rd, dest, offset); Assembler::lwu(Rd, Rd, offset); } } void lwu(Register Rd, address dest, relocInfo::relocType rtype) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 861, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); lwu(Rd, dest); } void lwu(Register Rd, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { relocate(adr.rspec(), [&] { lwu(Rd, adr.target()); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::lwu(Rd, adr.base(), adr.offset()); } else { int32_t offset = ((int32_t)adr.offset() << 20) >> 20; if (Rd == adr.base()) { la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::lwu(Rd, temp, offset); } else { la(Rd, Address(adr.base(), adr.offset() - offset)); Assembler::lwu(Rd, Rd, offset); } } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 861); } while (0); } } void lwu(Register Rd, Label &L) { wrap_label(Rd, L, &MacroAssembler::lwu); }; + void ld(Register Rd, address dest) { ; int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(Rd, (int32_t)distance + 0x800); Assembler::ld(Rd, Rd, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(Rd, dest, offset); Assembler::ld(Rd, Rd, offset); } } void ld(Register Rd, address dest, relocInfo::relocType rtype) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 862, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); ld(Rd, dest); } void ld(Register Rd, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { relocate(adr.rspec(), [&] { ld(Rd, adr.target()); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::ld(Rd, adr.base(), adr.offset()); } else { int32_t offset = ((int32_t)adr.offset() << 20) >> 20; if (Rd == adr.base()) { la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::ld(Rd, temp, offset); } else { la(Rd, Address(adr.base(), adr.offset() - offset)); Assembler::ld(Rd, Rd, offset); } } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 862); } while (0); } } void ld(Register Rd, Label &L) { wrap_label(Rd, L, &MacroAssembler::ld); }; +# 906 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + void flw(FloatRegister Rd, address dest, Register temp = t0) { ; int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(temp, (int32_t)distance + 0x800); Assembler::flw(Rd, temp, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(temp, dest, offset); Assembler::flw(Rd, temp, offset); } } void flw(FloatRegister Rd, address dest, relocInfo::relocType rtype, Register temp = t0) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 906, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); flw(Rd, dest, temp); } void flw(FloatRegister Rd, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { relocate(adr.rspec(), [&] { flw(Rd, adr.target(), temp); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::flw(Rd, adr.base(), adr.offset()); } else { int32_t offset = ((int32_t)adr.offset() << 20) >> 20; la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::flw(Rd, temp, offset); } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 906); } while (0); } }; + void fld(FloatRegister Rd, address dest, Register temp = t0) { ; int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(temp, (int32_t)distance + 0x800); Assembler::fld(Rd, temp, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(temp, dest, offset); Assembler::fld(Rd, temp, offset); } } void fld(FloatRegister Rd, address dest, relocInfo::relocType rtype, Register temp = t0) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 907, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); fld(Rd, dest, temp); } void fld(FloatRegister Rd, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { relocate(adr.rspec(), [&] { fld(Rd, adr.target(), temp); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::fld(Rd, adr.base(), adr.offset()); } else { int32_t offset = ((int32_t)adr.offset() << 20) >> 20; la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::fld(Rd, temp, offset); } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 907); } while (0); } }; +# 917 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + void sb(Register Rs, address dest, relocInfo::relocType rtype, Register temp = t0) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 917, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); sb(Rs, dest, temp); }; + void sh(Register Rs, address dest, relocInfo::relocType rtype, Register temp = t0) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 918, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); sh(Rs, dest, temp); }; + void sw(Register Rs, address dest, relocInfo::relocType rtype, Register temp = t0) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 919, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); sw(Rs, dest, temp); }; + void sd(Register Rs, address dest, relocInfo::relocType rtype, Register temp = t0) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 920, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); sd(Rs, dest, temp); }; + void fsw(FloatRegister Rs, address dest, relocInfo::relocType rtype, Register temp = t0) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 921, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); fsw(Rs, dest, temp); }; + void fsd(FloatRegister Rs, address dest, relocInfo::relocType rtype, Register temp = t0) { do { if (!(rtype == relocInfo::internal_word_type)) { (*g_assert_poison) = 'X';; report_vm_error("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 922, "guarantee(" "rtype == relocInfo::internal_word_type" ") failed", "only internal_word_type relocs make sense here"); } } while (0); relocate(InternalAddress(dest).rspec()); IncompressibleRegion ir(this); fsd(Rs, dest, temp); }; +# 965 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + void sb(Register Rs, address dest, Register temp = t0) { ; assert_different_registers(Rs, temp); int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(temp, (int32_t)distance + 0x800); Assembler::sb(Rs, temp, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(temp, dest, offset); Assembler::sb(Rs, temp, offset); } } void sb(Register Rs, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { assert_different_registers(Rs, temp); relocate(adr.rspec(), [&] { sb(Rs, adr.target(), temp); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::sb(Rs, adr.base(), adr.offset()); } else { assert_different_registers(Rs, temp); int32_t offset = ((int32_t)adr.offset() << 20) >> 20; la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::sb(Rs, temp, offset); } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 965); } while (0); } }; + void sh(Register Rs, address dest, Register temp = t0) { ; assert_different_registers(Rs, temp); int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(temp, (int32_t)distance + 0x800); Assembler::sh(Rs, temp, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(temp, dest, offset); Assembler::sh(Rs, temp, offset); } } void sh(Register Rs, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { assert_different_registers(Rs, temp); relocate(adr.rspec(), [&] { sh(Rs, adr.target(), temp); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::sh(Rs, adr.base(), adr.offset()); } else { assert_different_registers(Rs, temp); int32_t offset = ((int32_t)adr.offset() << 20) >> 20; la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::sh(Rs, temp, offset); } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 966); } while (0); } }; + void sw(Register Rs, address dest, Register temp = t0) { ; assert_different_registers(Rs, temp); int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(temp, (int32_t)distance + 0x800); Assembler::sw(Rs, temp, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(temp, dest, offset); Assembler::sw(Rs, temp, offset); } } void sw(Register Rs, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { assert_different_registers(Rs, temp); relocate(adr.rspec(), [&] { sw(Rs, adr.target(), temp); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::sw(Rs, adr.base(), adr.offset()); } else { assert_different_registers(Rs, temp); int32_t offset = ((int32_t)adr.offset() << 20) >> 20; la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::sw(Rs, temp, offset); } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 967); } while (0); } }; + void sd(Register Rs, address dest, Register temp = t0) { ; assert_different_registers(Rs, temp); int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(temp, (int32_t)distance + 0x800); Assembler::sd(Rs, temp, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(temp, dest, offset); Assembler::sd(Rs, temp, offset); } } void sd(Register Rs, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { assert_different_registers(Rs, temp); relocate(adr.rspec(), [&] { sd(Rs, adr.target(), temp); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::sd(Rs, adr.base(), adr.offset()); } else { assert_different_registers(Rs, temp); int32_t offset = ((int32_t)adr.offset() << 20) >> 20; la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::sd(Rs, temp, offset); } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 968); } while (0); } }; +# 1008 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + void fsw(FloatRegister Rs, address dest, Register temp = t0) { ; int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(temp, (int32_t)distance + 0x800); Assembler::fsw(Rs, temp, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(temp, dest, offset); Assembler::fsw(Rs, temp, offset); } } void fsw(FloatRegister Rs, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { relocate(adr.rspec(), [&] { fsw(Rs, adr.target(), temp); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::fsw(Rs, adr.base(), adr.offset()); } else { int32_t offset = ((int32_t)adr.offset() << 20) >> 20; la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::fsw(Rs, temp, offset); } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 1008); } while (0); } }; + void fsd(FloatRegister Rs, address dest, Register temp = t0) { ; int64_t distance = dest - pc(); if (is_simm32(distance)) { auipc(temp, (int32_t)distance + 0x800); Assembler::fsd(Rs, temp, ((int32_t)distance << 20) >> 20); } else { int32_t offset = 0; movptr(temp, dest, offset); Assembler::fsd(Rs, temp, offset); } } void fsd(FloatRegister Rs, const Address &adr, Register temp = t0) { switch (adr.getMode()) { case Address::literal: { relocate(adr.rspec(), [&] { fsd(Rs, adr.target(), temp); }); break; } case Address::base_plus_offset: { if (is_simm12(adr.offset())) { Assembler::fsd(Rs, adr.base(), adr.offset()); } else { int32_t offset = ((int32_t)adr.offset() << 20) >> 20; la(temp, Address(adr.base(), adr.offset() - offset)); Assembler::fsd(Rs, temp, offset); } break; } default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 1009); } while (0); } }; + + + + + + void cmpxchg_obj_header(Register oldv, Register newv, Register obj, Register tmp, Label &succeed, Label *fail); + void cmpxchgptr(Register oldv, Register newv, Register addr, Register tmp, Label &succeed, Label *fail); + void cmpxchg(Register addr, Register expected, + Register new_val, + enum operand_size size, + Assembler::Aqrl acquire, Assembler::Aqrl release, + Register result, bool result_as_bool = false); + void cmpxchg_weak(Register addr, Register expected, + Register new_val, + enum operand_size size, + Assembler::Aqrl acquire, Assembler::Aqrl release, + Register result); + void cmpxchg_narrow_value_helper(Register addr, Register expected, + Register new_val, + enum operand_size size, + Register tmp1, Register tmp2, Register tmp3); + void cmpxchg_narrow_value(Register addr, Register expected, + Register new_val, + enum operand_size size, + Assembler::Aqrl acquire, Assembler::Aqrl release, + Register result, bool result_as_bool, + Register tmp1, Register tmp2, Register tmp3); + void weak_cmpxchg_narrow_value(Register addr, Register expected, + Register new_val, + enum operand_size size, + Assembler::Aqrl acquire, Assembler::Aqrl release, + Register result, + Register tmp1, Register tmp2, Register tmp3); + + void atomic_add(Register prev, RegisterOrConstant incr, Register addr); + void atomic_addw(Register prev, RegisterOrConstant incr, Register addr); + void atomic_addal(Register prev, RegisterOrConstant incr, Register addr); + void atomic_addalw(Register prev, RegisterOrConstant incr, Register addr); + + void atomic_xchg(Register prev, Register newv, Register addr); + void atomic_xchgw(Register prev, Register newv, Register addr); + void atomic_xchgal(Register prev, Register newv, Register addr); + void atomic_xchgalw(Register prev, Register newv, Register addr); + void atomic_xchgwu(Register prev, Register newv, Register addr); + void atomic_xchgalwu(Register prev, Register newv, Register addr); + + static bool far_branches() { + return ReservedCodeCacheSize > branch_range; + } +# 1069 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + void far_call(Address entry, Register tmp = t0); + void far_jump(Address entry, Register tmp = t0); + + static int far_branch_size() { + if (far_branches()) { + return 2 * 4; + } else { + return 4; + } + } + + void load_byte_map_base(Register reg); + + void bang_stack_with_offset(int offset) { + + ; + sub(t0, sp, offset); + sd(zr, Address(t0)); + } + + void la_patchable(Register reg1, const Address &dest, int32_t &offset); + + virtual void _call_Unimplemented(address call_site) { + mv(t1, call_site); + } + + + + + void build_frame(int framesize); + void remove_frame(int framesize); + + void reserved_stack_check(); + + void get_polling_page(Register dest, relocInfo::relocType rtype); + void read_polling_page(Register r, int32_t offset, relocInfo::relocType rtype); +# 1171 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + address trampoline_call(Address entry); + address ic_call(address entry, jint method_index = 0); +# 1182 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" + void increment(const Address dst, int64_t value = 1, Register tmp1 = t0, Register tmp2 = t1); + void incrementw(const Address dst, int32_t value = 1, Register tmp1 = t0, Register tmp2 = t1); + + void decrement(const Address dst, int64_t value = 1, Register tmp1 = t0, Register tmp2 = t1); + void decrementw(const Address dst, int32_t value = 1, Register tmp1 = t0, Register tmp2 = t1); + + void cmpptr(Register src1, Address src2, Label& equal); + + void clinit_barrier(Register klass, Register tmp, Label* L_fast_path = nullptr, Label* L_slow_path = nullptr); + void load_method_holder_cld(Register result, Register method); + void load_method_holder(Register holder, Register method); + + void compute_index(Register str1, Register trailing_zeros, Register match_mask, + Register result, Register char_tmp, Register tmp, + bool haystack_isL); + void compute_match_mask(Register src, Register pattern, Register match_mask, + Register mask1, Register mask2); + + + void mul_add(Register out, Register in, Register offset, + Register len, Register k, Register tmp); + void cad(Register dst, Register src1, Register src2, Register carry); + void cadc(Register dst, Register src1, Register src2, Register carry); + void adc(Register dst, Register src1, Register src2, Register carry); + void add2_with_carry(Register final_dest_hi, Register dest_hi, Register dest_lo, + Register src1, Register src2, Register carry); + void multiply_32_x_32_loop(Register x, Register xstart, Register x_xstart, + Register y, Register y_idx, Register z, + Register carry, Register product, + Register idx, Register kdx); + void multiply_64_x_64_loop(Register x, Register xstart, Register x_xstart, + Register y, Register y_idx, Register z, + Register carry, Register product, + Register idx, Register kdx); + void multiply_128_x_128_loop(Register y, Register z, + Register carry, Register carry2, + Register idx, Register jdx, + Register yz_idx1, Register yz_idx2, + Register tmp, Register tmp3, Register tmp4, + Register tmp6, Register product_hi); + void multiply_to_len(Register x, Register xlen, Register y, Register ylen, + Register z, Register zlen, + Register tmp1, Register tmp2, Register tmp3, Register tmp4, + Register tmp5, Register tmp6, Register product_hi); + + + void inflate_lo32(Register Rd, Register Rs, Register tmp1 = t0, Register tmp2 = t1); + void inflate_hi32(Register Rd, Register Rs, Register tmp1 = t0, Register tmp2 = t1); + + void ctzc_bit(Register Rd, Register Rs, bool isLL = false, Register tmp1 = t0, Register tmp2 = t1); + + void zero_words(Register base, uint64_t cnt); + address zero_words(Register ptr, Register cnt); + void fill_words(Register base, Register cnt, Register value); + void zero_memory(Register addr, Register len, Register tmp); + void zero_dcache_blocks(Register base, Register cnt, Register tmp1, Register tmp2); + + + void shadd(Register Rd, Register Rs1, Register Rs2, Register tmp, int shamt); + + + void test_bit(Register Rd, Register Rs, uint32_t bit_pos, Register tmp = t0); + + + + + + void fcvt_w_s_safe(Register dst, FloatRegister src, Register tmp = t0); + void fcvt_l_s_safe(Register dst, FloatRegister src, Register tmp = t0); + void fcvt_w_d_safe(Register dst, FloatRegister src, Register tmp = t0); + void fcvt_l_d_safe(Register dst, FloatRegister src, Register tmp = t0); + + + void vlex_v(VectorRegister vd, Register base, Assembler::SEW sew, VectorMask vm = unmasked) { + switch (sew) { + case Assembler::e64: + vle64_v(vd, base, vm); + break; + case Assembler::e32: + vle32_v(vd, base, vm); + break; + case Assembler::e16: + vle16_v(vd, base, vm); + break; + case Assembler::e8: + default: + vle8_v(vd, base, vm); + break; + } + } + + void vsex_v(VectorRegister store_data, Register base, Assembler::SEW sew, VectorMask vm = unmasked) { + switch (sew) { + case Assembler::e64: + vse64_v(store_data, base, vm); + break; + case Assembler::e32: + vse32_v(store_data, base, vm); + break; + case Assembler::e16: + vse16_v(store_data, base, vm); + break; + case Assembler::e8: + default: + vse8_v(store_data, base, vm); + break; + } + } + + + inline void vl1r_v(VectorRegister vd, Register rs) { + vl1re8_v(vd, rs); + } + + inline void vmnot_m(VectorRegister vd, VectorRegister vs) { + vmnand_mm(vd, vs, vs); + } + + inline void vncvt_x_x_w(VectorRegister vd, VectorRegister vs, VectorMask vm = unmasked) { + vnsrl_wx(vd, vs, x0, vm); + } + + inline void vneg_v(VectorRegister vd, VectorRegister vs, VectorMask vm = unmasked) { + vrsub_vx(vd, vs, x0, vm); + } + + inline void vfneg_v(VectorRegister vd, VectorRegister vs, VectorMask vm = unmasked) { + vfsgnjn_vv(vd, vs, vs, vm); + } + + inline void vfabs_v(VectorRegister vd, VectorRegister vs, VectorMask vm = unmasked) { + vfsgnjx_vv(vd, vs, vs, vm); + } + + inline void vmsgt_vv(VectorRegister vd, VectorRegister vs2, VectorRegister vs1, VectorMask vm = unmasked) { + vmslt_vv(vd, vs1, vs2, vm); + } + + inline void vmsgtu_vv(VectorRegister vd, VectorRegister vs2, VectorRegister vs1, VectorMask vm = unmasked) { + vmsltu_vv(vd, vs1, vs2, vm); + } + + inline void vmsge_vv(VectorRegister vd, VectorRegister vs2, VectorRegister vs1, VectorMask vm = unmasked) { + vmsle_vv(vd, vs1, vs2, vm); + } + + inline void vmsgeu_vv(VectorRegister vd, VectorRegister vs2, VectorRegister vs1, VectorMask vm = unmasked) { + vmsleu_vv(vd, vs1, vs2, vm); + } + + inline void vmfgt_vv(VectorRegister vd, VectorRegister vs2, VectorRegister vs1, VectorMask vm = unmasked) { + vmflt_vv(vd, vs1, vs2, vm); + } + + inline void vmfge_vv(VectorRegister vd, VectorRegister vs2, VectorRegister vs1, VectorMask vm = unmasked) { + vmfle_vv(vd, vs1, vs2, vm); + } + + + inline void vmmv_m(VectorRegister vd, VectorRegister vs) { + vmand_mm(vd, vs, vs); + } + + + inline void vmclr_m(VectorRegister vd) { + vmxor_mm(vd, vd, vd); + } + + + inline void vmset_m(VectorRegister vd) { + vmxnor_mm(vd, vd, vd); + } + + static const int zero_words_block_size; + + void cast_primitive_type(BasicType type, Register Rt) { + switch (type) { + case T_BOOLEAN: + sltu(Rt, zr, Rt); + break; + case T_CHAR : + zero_extend(Rt, Rt, 16); + break; + case T_BYTE : + sign_extend(Rt, Rt, 8); + break; + case T_SHORT : + sign_extend(Rt, Rt, 16); + break; + case T_INT : + sign_extend(Rt, Rt, 32); + break; + case T_LONG : break; + case T_VOID : break; + case T_FLOAT : break; + case T_DOUBLE : break; + default: do { (*g_assert_poison) = 'X';; report_should_not_reach_here("src/hotspot/cpu/riscv/macroAssembler_riscv.hpp", 1378); } while (0); + } + } + + + void float_compare(Register result, FloatRegister Rs1, FloatRegister Rs2, int unordered_result); + void double_compare(Register result, FloatRegister Rs1, FloatRegister Rs2, int unordered_result); + + + void zero_extend(Register dst, Register src, int bits); + void sign_extend(Register dst, Register src, int bits); + + + + + + void cmp_l2i(Register dst, Register src1, Register src2, Register tmp = t0); + + + void move32_64(VMRegPair src, VMRegPair dst, Register tmp = t0); + void float_move(VMRegPair src, VMRegPair dst, Register tmp = t0); + void long_move(VMRegPair src, VMRegPair dst, Register tmp = t0); + void double_move(VMRegPair src, VMRegPair dst, Register tmp = t0); + void object_move(OopMap* map, + int oop_handle_offset, + int framesize_in_slots, + VMRegPair src, + VMRegPair dst, + bool is_receiver, + int* receiver_offset); + void rt_call(address dest, Register tmp = t0); + + void call(const address dest, Register temp = t0) { + ; + ; + int32_t offset = 0; + mv(temp, dest, offset); + jalr(x1, temp, offset); + } + + inline void ret() { + jalr(x0, x1, 0); + } +# 1436 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" +private: + + void repne_scan(Register addr, Register value, Register count, Register tmp); + + void ld_constant(Register dest, const Address &const_addr) { + if (NearCpool) { + ld(dest, const_addr); + } else { + InternalAddress target(const_addr.target()); + relocate(target.rspec(), [&] { + int32_t offset; + la_patchable(dest, target, offset); + ld(dest, Address(dest, offset)); + }); + } + } + + int bitset_to_regs(unsigned int bitset, unsigned char* regs); + Address add_memory_helper(const Address dst, Register tmp); + + void load_reserved(Register dst, Register addr, enum operand_size size, Assembler::Aqrl acquire); + void store_conditional(Register dst, Register new_val, Register addr, enum operand_size size, Assembler::Aqrl release); + +public: + void fast_lock(Register obj, Register hdr, Register tmp1, Register tmp2, Label& slow); + void fast_unlock(Register obj, Register hdr, Register tmp1, Register tmp2, Label& slow); +}; +# 1476 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp" +class SkipIfEqual { + private: + MacroAssembler* _masm; + Label _label; + + public: + SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value); + ~SkipIfEqual(); +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/asm/macroAssembler.hpp" 2 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/interp_masm.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/interp_masm_riscv.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/interp_masm_riscv.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/invocationCounter.hpp" 1 +# 36 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/invocationCounter.hpp" +class InvocationCounter { + friend class VMStructs; + friend class JVMCIVMStructs; + friend class ciReplay; + private: + uint _counter; + + enum PrivateConstants { + number_of_carry_bits = 1, + number_of_noncount_bits = number_of_carry_bits, + count_grain = (((number_of_carry_bits) >= BitsPerWord) ? 0 : (OneBit << (number_of_carry_bits))), + carry_mask = ((((number_of_carry_bits) >= BitsPerWord) ? 0 : (OneBit << (number_of_carry_bits))) - 1), + count_mask = ((int)(-1) ^ carry_mask) + }; + + public: + enum PublicConstants { + count_increment = count_grain, + count_mask_value = count_mask, + count_shift = number_of_noncount_bits, + number_of_count_bits = BitsPerInt - number_of_noncount_bits, + count_limit = (((number_of_count_bits - 1) >= BitsPerWord) ? 0 : (OneBit << (number_of_count_bits - 1))) + }; + + + void reset(); + void init(); + void set_carry_on_overflow(); + void set(uint count); + void increment() { _counter += count_increment; } + + + bool carry() const { return (_counter & carry_mask) != 0; } + uint count() const { return _counter >> number_of_noncount_bits; } + intx limit() const { return CompileThreshold; } + uint raw_counter() const { return _counter; } + + void print(); + +private: + void set_carry() { _counter |= carry_mask; } + uint extract_carry(uint raw) const { return (raw & carry_mask); } + uint extract_count(uint raw) const { return raw >> number_of_noncount_bits; } + void update(uint new_count); + void set(uint count, uint carry); + +public: + + + static ByteSize counter_offset() { return in_ByteSize((int)([]() { alignas(16) char space[sizeof (InvocationCounter)]; InvocationCounter* dummyObj = (InvocationCounter*)space; char* c = (char*)(void*)&dummyObj->_counter; return (size_t)(c - space); }())); } +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/interp_masm_riscv.hpp" 2 + + + + +typedef ByteSize (*OffsetFunction)(uint); + +class InterpreterMacroAssembler: public MacroAssembler { + protected: + + using MacroAssembler::call_VM_leaf_base; + + virtual void call_VM_leaf_base(address entry_point, + int number_of_arguments); + + virtual void call_VM_base(Register oop_result, + Register java_thread, + Register last_java_sp, + address entry_point, + int number_of_arguments, + bool check_exceptions); + + + void dispatch_base(TosState state, address* table, bool verifyoop = true, + bool generate_poll = false, Register Rs = t0); + + public: + InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code) {} + + void load_earlyret_value(TosState state); + + void jump_to_entry(address entry); + + virtual void check_and_handle_popframe(Register java_thread); + virtual void check_and_handle_earlyret(Register java_thread); + + + void save_bcp() { + sd(xbcp, Address(fp, frame::interpreter_frame_bcp_offset * wordSize)); + } + + void restore_bcp() { + ld(xbcp, Address(fp, frame::interpreter_frame_bcp_offset * wordSize)); + } + + void restore_locals() { + ld(xlocals, Address(fp, frame::interpreter_frame_locals_offset * wordSize)); + shadd(xlocals, xlocals, fp, t0, LogBytesPerWord); + } + + void restore_constant_pool_cache() { + ld(xcpool, Address(fp, frame::interpreter_frame_cache_offset * wordSize)); + } + + void restore_sp_after_call() { + Label L; + ld(t0, Address(fp, frame::interpreter_frame_extended_sp_offset * wordSize)); + shadd(t0, t0, fp, t0, LogBytesPerWord); + + + + + bind(L); + mv(sp, t0); + } + + void check_extended_sp(const char* msg = "check extended SP") { +# 106 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/interp_masm_riscv.hpp" + } + + + + + void get_dispatch(); + + + void get_method(Register reg) { + ld(reg, Address(fp, frame::interpreter_frame_method_offset * wordSize)); + } + + void get_const(Register reg) { + get_method(reg); + ld(reg, Address(reg, in_bytes(Method::const_offset()))); + } + + void get_constant_pool(Register reg) { + get_const(reg); + ld(reg, Address(reg, in_bytes(ConstMethod::constants_offset()))); + } + + void get_constant_pool_cache(Register reg) { + get_constant_pool(reg); + ld(reg, Address(reg, ConstantPool::cache_offset())); + } + + void get_cpool_and_tags(Register cpool, Register tags) { + get_constant_pool(cpool); + ld(tags, Address(cpool, ConstantPool::tags_offset())); + } + + void get_unsigned_2_byte_index_at_bcp(Register reg, int bcp_offset); + void get_cache_and_index_at_bcp(Register cache, Register index, int bcp_offset, size_t index_size = sizeof(u2)); + void get_cache_and_index_and_bytecode_at_bcp(Register cache, Register index, Register bytecode, int byte_no, int bcp_offset, size_t index_size = sizeof(u2)); + void get_cache_entry_pointer_at_bcp(Register cache, Register tmp, int bcp_offset, size_t index_size = sizeof(u2)); + void get_cache_index_at_bcp(Register index, Register tmp, int bcp_offset, size_t index_size = sizeof(u2)); + void get_method_counters(Register method, Register mcs, Label& skip); + + + void load_resolved_reference_at_index(Register result, Register index, Register tmp = x15); + + + void load_resolved_klass_at_offset(Register cpool, Register index, Register klass, Register temp); + + void load_resolved_method_at_index(int byte_no, Register method, Register cache); + + void pop_ptr(Register r = x10); + void pop_i(Register r = x10); + void pop_l(Register r = x10); + void pop_f(FloatRegister r = f10); + void pop_d(FloatRegister r = f10); + void push_ptr(Register r = x10); + void push_i(Register r = x10); + void push_l(Register r = x10); + void push_f(FloatRegister r = f10); + void push_d(FloatRegister r = f10); + + void pop(TosState state); + void push(TosState state); + + void empty_expression_stack() { + ld(esp, Address(fp, frame::interpreter_frame_monitor_block_top_offset * wordSize)); + + sd(zr, Address(fp, frame::interpreter_frame_last_sp_offset * wordSize)); + } + + + void load_ptr(int n, Register val); + void store_ptr(int n, Register val); + + + void load_float(Address src); + void load_double(Address src); + + + + void gen_subtype_check( Register sub_klass, Label &ok_is_subtype ); + + + void dispatch_prolog(TosState state, int step = 0); + void dispatch_epilog(TosState state, int step = 0); + + void dispatch_only(TosState state, bool generate_poll = false, Register Rs = t0); + + void dispatch_only_normal(TosState state, Register Rs = t0); + void dispatch_only_noverify(TosState state, Register Rs = t0); + + void dispatch_next(TosState state, int step = 0, bool generate_poll = false); + + void dispatch_via (TosState state, address* table); + + + void prepare_to_jump_from_interpreted(); + void jump_from_interpreted(Register method); +# 215 "/home/rehn/source/jdk/open/src/hotspot/cpu/riscv/interp_masm_riscv.hpp" + void remove_activation(TosState state, + bool throw_monitor_exception = true, + bool install_monitor_exception = true, + bool notify_jvmdi = true); + + + virtual void null_check(Register reg, int offset = -1) { + MacroAssembler::null_check(reg, offset); + } + + + void lock_object (Register lock_reg); + void unlock_object(Register lock_reg); + + + void set_method_data_pointer_for_bcp(); + void test_method_data_pointer(Register mdp, Label& zero_continue); + void verify_method_data_pointer(); + + void set_mdp_data_at(Register mdp_in, int constant, Register value); + void increment_mdp_data_at(Address data, bool decrement = false); + void increment_mdp_data_at(Register mdp_in, int constant, + bool decrement = false); + void increment_mdp_data_at(Register mdp_in, Register reg, int constant, + bool decrement = false); + void increment_mask_and_jump(Address counter_addr, + int increment, Address mask, + Register tmp1, Register tmp2, + bool preloaded, Label* where); + + void set_mdp_flag_at(Register mdp_in, int flag_constant); + void test_mdp_data_at(Register mdp_in, int offset, Register value, + Register test_value_out, + Label& not_equal_continue); + + void record_klass_in_profile(Register receiver, Register mdp, + Register reg2); + void record_klass_in_profile_helper(Register receiver, Register mdp, + Register reg2, Label& done); + void record_item_in_profile_helper(Register item, Register mdp, + Register reg2, int start_row, Label& done, int total_rows, + OffsetFunction item_offset_fn, OffsetFunction item_count_offset_fn); + + void update_mdp_by_offset(Register mdp_in, int offset_of_offset); + void update_mdp_by_offset(Register mdp_in, Register reg, int offset_of_disp); + void update_mdp_by_constant(Register mdp_in, int constant); + void update_mdp_for_ret(Register return_bci); + + + void narrow(Register result); + + void profile_taken_branch(Register mdp, Register bumped_count); + void profile_not_taken_branch(Register mdp); + void profile_call(Register mdp); + void profile_final_call(Register mdp); + void profile_virtual_call(Register receiver, Register mdp, + Register t1, + bool receiver_can_be_null = false); + void profile_ret(Register return_bci, Register mdp); + void profile_null_seen(Register mdp); + void profile_typecheck(Register mdp, Register klass, Register temp); + void profile_typecheck_failed(Register mdp); + void profile_switch_default(Register mdp); + void profile_switch_case(Register index_in_scratch, Register mdp, + Register temp); + + void profile_obj_type(Register obj, const Address& mdo_addr, Register tmp); + void profile_arguments_type(Register mdp, Register callee, Register tmp, bool is_virtual); + void profile_return_type(Register mdp, Register ret, Register tmp); + void profile_parameters_type(Register mdp, Register tmp1, Register tmp2, Register tmp3); + + + + void verify_FPU(int stack_depth, TosState state = ftos); + + typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode; + + + void notify_method_entry(); + void notify_method_exit(TosState state, NotifyMethodExitMode mode); + + virtual void _call_Unimplemented(address call_site) { + save_bcp(); + set_last_Java_frame(esp, fp, (address) pc(), t0); + MacroAssembler::_call_Unimplemented(call_site); + } + + void load_resolved_indy_entry(Register cache, Register index); + void load_field_entry(Register cache, Register index, int bcp_offset = 1); + + + + + + +}; +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/interp_masm.hpp" 2 +# 30 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/interpreter.hpp" 2 +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/templateInterpreter.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/templateInterpreter.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/abstractInterpreter.hpp" 1 +# 29 "/home/rehn/source/jdk/open/src/hotspot/share/interpreter/abstractInterpreter.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/vmIntrinsics.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/classfile/vmIntrinsics.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrIntrinsics.hpp" 1 +# 31 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrIntrinsics.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdMacros.hpp" 1 +# 32 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/support/jfrIntrinsics.hpp" 2 + + +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/utilities/jfrTime.hpp" 1 +# 28 "/home/rehn/source/jdk/open/src/hotspot/share/jfr/utilities/jfrTime.hpp" +# 1 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/ticks.hpp" 1 +# 33 "/home/rehn/source/jdk/open/src/hotspot/share/utilities/ticks.hpp" +class ElapsedCounterSource { + public: + typedef jlong Type; + static uint64_t frequency(); + static Type now(); + static double seconds(Type value); + static uint64_t milliseconds(Type value); + static uint64_t microseconds(Type value); + static uint64_t nanoseconds(Type value); +}; + + + + + + +class FastUnorderedElapsedCounterSource { + public: + typedef jlong Type; + static uint64_t frequency(); + static Type now(); + static double seconds(Type value); + static uint64_t milliseconds(Type value); + static uint64_t microseconds(Type value); + static uint64_t nanoseconds(Type value); +}; + +template +class PairRep { + public: + T1 val1; + T2 val2; + + PairRep() : val1((T1)0), val2((T2)0) {} + void operator+=(const PairRep& rhs) { + val1 += rhs.val1; + val2 += rhs.val2; + } + void operator-=(const PairRep& rhs) { + val1 -= rhs.val1; + val2 -= rhs.val2; + } + bool operator==(const PairRep& rhs) const { + return val1 == rhs.val1; + } + bool operator!=(const PairRep& rhs) const { + return !operator==(rhs); + } + bool operator<(const PairRep& rhs) const { + return val1 < rhs.val1; + } + bool operator>(const PairRep& rhs) const { + return val1 > rhs.val1; + } +}; + +template +PairRep operator-(const PairRep& lhs, const PairRep& rhs) { + PairRep temp(lhs); + temp -= rhs; + return temp; +} + +typedef PairRep CompositeTime; + +class CompositeElapsedCounterSource { + public: + typedef CompositeTime Type; + static uint64_t frequency(); + static Type now(); + static double seconds(Type value); + static uint64_t milliseconds(Type value); + static uint64_t microseconds(Type value); + static uint64_t nanoseconds(Type value); +}; + +template +class Representation { + public: + typedef typename TimeSource::Type Type; + protected: + Type _rep; + Representation(const Representation& end, const Representation& start) : _rep(end._rep - start._rep) {} + Representation() : _rep() {} + public: + void operator+=(const Representation& rhs) { + _rep += rhs._rep; + } + void operator-=(const Representation& rhs) { + _rep -= rhs._rep; + } + bool operator==(const Representation& rhs) const { + return _rep == rhs._rep; + } + bool operator!=(const Representation& rhs) const { + return !operator==(rhs); + } + bool operator<(const Representation& rhs) const { + return _rep < rhs._rep; + } + bool operator>(const Representation& rhs) const { + return _rep > rhs._rep; + } + bool operator<=(const Representation& rhs) const { + return !operator>(rhs); + } + bool operator>=(const Representation& rhs) const { + return !operator<(rhs); + } + double seconds() const { + return TimeSource::seconds(_rep); + } + uint64_t milliseconds() const { + return TimeSource::milliseconds(_rep); + } + uint64_t microseconds() const { + return TimeSource::microseconds(_rep); + } + uint64_t nanoseconds() const { + return TimeSource::nanoseconds(_rep); + } +}; + +template +class CounterRepresentation : public Representation { + protected: + CounterRepresentation(const CounterRepresentation& end, const CounterRepresentation& start) : Representation(end, start) {} + explicit CounterRepresentation(jlong value) : Representation() { + this->_rep = value; + } + public: + CounterRepresentation() : Representation() {} + typename TimeSource::Type value() const { return this->_rep; } + operator typename TimeSource::Type() { return value(); } +}; + +template +class CompositeCounterRepresentation : public Representation { + protected: + CompositeCounterRepresentation(const CompositeCounterRepresentation& end, const CompositeCounterRepresentation& start) : + Representation(end, start) {} + explicit CompositeCounterRepresentation(jlong value) : Representation() { + this->_rep.val1 = value; + this->_rep.val2 = value; + } + public: + CompositeCounterRepresentation() : Representation() {} + ElapsedCounterSource::Type value() const { return this->_rep.val1; } + FastUnorderedElapsedCounterSource::Type ft_value() const { return this->_rep.val2; } +}; + +template