1 /* 2 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. 3 * Copyright (c) 2016 SAP SE. All rights reserved. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 * 6 * This code is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 only, as 8 * published by the Free Software Foundation. 9 * 10 * This code is distributed in the hope that it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 * version 2 for more details (a copy is included in the LICENSE file that 14 * accompanied this code). 15 * 16 * You should have received a copy of the GNU General Public License version 17 * 2 along with this work; if not, write to the Free Software Foundation, 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 * 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 * or visit www.oracle.com if you need additional information or have any 22 * questions. 23 * 55 // guaranteed by jlong table element type. 56 #define TROT_COLUMN_SIZE (256*sizeof(jchar)/sizeof(jlong)) 57 58 class zarch { 59 friend class StubGenerator; 60 61 public: 62 enum { nof_instance_allocators = 10 }; 63 64 // allocator lock values 65 enum { 66 unlocked = 0, 67 locked = 1 68 }; 69 70 private: 71 static int _atomic_memory_operation_lock; 72 73 static address _partial_subtype_check; 74 static juint _crc_table[CRC32_TABLES][CRC32_COLUMN_SIZE]; 75 76 // Comapct string intrinsics: Translate table for string inflate intrinsic. Used by trot instruction. 77 static address _trot_table_addr; 78 static jlong _trot_table[TROT_COLUMN_SIZE]; 79 80 public: 81 // Global lock for everyone who needs to use atomic_compare_and_exchange 82 // or atomic_increment -- should probably use more locks for more 83 // scalability -- for instance one for each eden space or group of. 84 85 // Address of the lock for atomic_compare_and_exchange. 86 static int* atomic_memory_operation_lock_addr() { return &_atomic_memory_operation_lock; } 87 88 // Accessor and mutator for _atomic_memory_operation_lock. 89 static int atomic_memory_operation_lock() { return _atomic_memory_operation_lock; } 90 static void set_atomic_memory_operation_lock(int value) { _atomic_memory_operation_lock = value; } 91 92 static address partial_subtype_check() { return _partial_subtype_check; } 93 94 static void generate_load_crc_table_addr(MacroAssembler* masm, Register table); 95 96 // Comapct string intrinsics: Translate table for string inflate intrinsic. Used by trot instruction. 97 static void generate_load_trot_table_addr(MacroAssembler* masm, Register table); 98 }; 99 100 #endif // CPU_S390_VM_STUBROUTINES_ZARCH_64_64_HPP | 1 /* 2 * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. 3 * Copyright (c) 2016, 2017, SAP SE. All rights reserved. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 * 6 * This code is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 only, as 8 * published by the Free Software Foundation. 9 * 10 * This code is distributed in the hope that it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 * version 2 for more details (a copy is included in the LICENSE file that 14 * accompanied this code). 15 * 16 * You should have received a copy of the GNU General Public License version 17 * 2 along with this work; if not, write to the Free Software Foundation, 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 * 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 * or visit www.oracle.com if you need additional information or have any 22 * questions. 23 * 55 // guaranteed by jlong table element type. 56 #define TROT_COLUMN_SIZE (256*sizeof(jchar)/sizeof(jlong)) 57 58 class zarch { 59 friend class StubGenerator; 60 61 public: 62 enum { nof_instance_allocators = 10 }; 63 64 // allocator lock values 65 enum { 66 unlocked = 0, 67 locked = 1 68 }; 69 70 private: 71 static int _atomic_memory_operation_lock; 72 73 static address _partial_subtype_check; 74 static juint _crc_table[CRC32_TABLES][CRC32_COLUMN_SIZE]; 75 static juint _crc32c_table[CRC32_TABLES][CRC32_COLUMN_SIZE]; 76 77 // Comapct string intrinsics: Translate table for string inflate intrinsic. Used by trot instruction. 78 static address _trot_table_addr; 79 static jlong _trot_table[TROT_COLUMN_SIZE]; 80 81 public: 82 // Global lock for everyone who needs to use atomic_compare_and_exchange 83 // or atomic_increment -- should probably use more locks for more 84 // scalability -- for instance one for each eden space or group of. 85 86 // Address of the lock for atomic_compare_and_exchange. 87 static int* atomic_memory_operation_lock_addr() { return &_atomic_memory_operation_lock; } 88 89 // Accessor and mutator for _atomic_memory_operation_lock. 90 static int atomic_memory_operation_lock() { return _atomic_memory_operation_lock; } 91 static void set_atomic_memory_operation_lock(int value) { _atomic_memory_operation_lock = value; } 92 93 static address partial_subtype_check() { return _partial_subtype_check; } 94 95 static void generate_load_absolute_address(MacroAssembler* masm, Register table, address table_addr, uint64_t table_contents); 96 static void generate_load_crc_table_addr(MacroAssembler* masm, Register table); 97 static void generate_load_crc32c_table_addr(MacroAssembler* masm, Register table); 98 99 // Comapct string intrinsics: Translate table for string inflate intrinsic. Used by trot instruction. 100 static void generate_load_trot_table_addr(MacroAssembler* masm, Register table); 101 }; 102 103 #endif // CPU_S390_VM_STUBROUTINES_ZARCH_64_64_HPP |