aoqi@0: /* gromero@9496: * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. gromero@9496: * Copyright (c) 2012, 2018 SAP SE. All rights reserved. aoqi@0: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. aoqi@0: * aoqi@0: * This code is free software; you can redistribute it and/or modify it aoqi@0: * under the terms of the GNU General Public License version 2 only, as aoqi@0: * published by the Free Software Foundation. aoqi@0: * aoqi@0: * This code is distributed in the hope that it will be useful, but WITHOUT aoqi@0: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or aoqi@0: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License aoqi@0: * version 2 for more details (a copy is included in the LICENSE file that aoqi@0: * accompanied this code). aoqi@0: * aoqi@0: * You should have received a copy of the GNU General Public License version aoqi@0: * 2 along with this work; if not, write to the Free Software Foundation, aoqi@0: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. aoqi@0: * aoqi@0: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA aoqi@0: * or visit www.oracle.com if you need additional information or have any aoqi@0: * questions. aoqi@0: * aoqi@0: */ aoqi@0: aoqi@0: #ifndef CPU_PPC_VM_STUBROUTINES_PPC_64_HPP aoqi@0: #define CPU_PPC_VM_STUBROUTINES_PPC_64_HPP aoqi@0: aoqi@0: // This file holds the platform specific parts of the StubRoutines aoqi@0: // definition. See stubRoutines.hpp for a description on how to aoqi@0: // extend it. aoqi@0: gromero@9496: static bool returns_to_call_stub(address return_pc) { return return_pc == _call_stub_return_address; } aoqi@0: aoqi@0: enum platform_dependent_constants { aoqi@0: code_size1 = 20000, // simply increase if too small (assembler will crash if too small) ogatak@9713: code_size2 = 22000 // simply increase if too small (assembler will crash if too small) aoqi@0: }; aoqi@0: gromero@9496: // CRC32 Intrinsics. gromero@9496: #define CRC32_COLUMN_SIZE 256 gromero@9496: #define CRC32_BYFOUR gromero@9496: #ifdef CRC32_BYFOUR gromero@9496: #define CRC32_TABLES 8 gromero@9496: #else gromero@9496: #define CRC32_TABLES 1 gromero@9496: #endif mdoerr@9497: #define CRC32_CONSTANTS_SIZE 1084 mdoerr@9497: #define CRC32_BARRET_CONSTANTS 10 gromero@9496: gromero@9496: class ppc64 { gromero@9496: friend class StubGenerator; gromero@9496: gromero@9496: private: gromero@9496: gromero@9496: // CRC32 Intrinsics. gromero@9496: static juint _crc_table[CRC32_TABLES][CRC32_COLUMN_SIZE]; mdoerr@9497: static juint* _constants; mdoerr@9497: static juint* _barret_constants; gromero@9496: gromero@9496: public: gromero@9496: gromero@9496: // CRC32 Intrinsics. gromero@9496: static void generate_load_crc_table_addr(MacroAssembler* masm, Register table); mdoerr@9497: static void generate_load_crc_constants_addr(MacroAssembler* masm, Register table); mdoerr@9497: static void generate_load_crc_barret_constants_addr(MacroAssembler* masm, Register table); mdoerr@9497: static juint* generate_crc_constants(); mdoerr@9497: static juint* generate_crc_barret_constants(); gromero@9496: gromero@9496: }; gromero@9496: aoqi@0: #endif // CPU_PPC_VM_STUBROUTINES_PPC_64_HPP