src/cpu/ppc/vm/stubRoutines_ppc_64.hpp

Tue, 18 Jun 2019 09:33:34 -0400

author
ogatak
date
Tue, 18 Jun 2019 09:33:34 -0400
changeset 9713
c4567d28f31f
parent 9497
f892c3b6b651
child 9730
42118db355f5
permissions
-rw-r--r--

8185979: PPC64: Implement SHA2 intrinsic
Reviewed-by: mdoerr, goetz
Contributed-by: Bruno Rosa <bruno.rosa@eldorado.org.br>, Gustavo Serra Scalet <gustavo.scalet@eldorado.org.br>, Igor Nunes <igor.nunes@eldorado.org.br>, Martin Doerr <martin.doerr@sap.com>

aoqi@0 1 /*
gromero@9496 2 * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
gromero@9496 3 * Copyright (c) 2012, 2018 SAP SE. All rights reserved.
aoqi@0 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 5 *
aoqi@0 6 * This code is free software; you can redistribute it and/or modify it
aoqi@0 7 * under the terms of the GNU General Public License version 2 only, as
aoqi@0 8 * published by the Free Software Foundation.
aoqi@0 9 *
aoqi@0 10 * This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 13 * version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 14 * accompanied this code).
aoqi@0 15 *
aoqi@0 16 * You should have received a copy of the GNU General Public License version
aoqi@0 17 * 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 19 *
aoqi@0 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 21 * or visit www.oracle.com if you need additional information or have any
aoqi@0 22 * questions.
aoqi@0 23 *
aoqi@0 24 */
aoqi@0 25
aoqi@0 26 #ifndef CPU_PPC_VM_STUBROUTINES_PPC_64_HPP
aoqi@0 27 #define CPU_PPC_VM_STUBROUTINES_PPC_64_HPP
aoqi@0 28
aoqi@0 29 // This file holds the platform specific parts of the StubRoutines
aoqi@0 30 // definition. See stubRoutines.hpp for a description on how to
aoqi@0 31 // extend it.
aoqi@0 32
gromero@9496 33 static bool returns_to_call_stub(address return_pc) { return return_pc == _call_stub_return_address; }
aoqi@0 34
aoqi@0 35 enum platform_dependent_constants {
aoqi@0 36 code_size1 = 20000, // simply increase if too small (assembler will crash if too small)
ogatak@9713 37 code_size2 = 22000 // simply increase if too small (assembler will crash if too small)
aoqi@0 38 };
aoqi@0 39
gromero@9496 40 // CRC32 Intrinsics.
gromero@9496 41 #define CRC32_COLUMN_SIZE 256
gromero@9496 42 #define CRC32_BYFOUR
gromero@9496 43 #ifdef CRC32_BYFOUR
gromero@9496 44 #define CRC32_TABLES 8
gromero@9496 45 #else
gromero@9496 46 #define CRC32_TABLES 1
gromero@9496 47 #endif
mdoerr@9497 48 #define CRC32_CONSTANTS_SIZE 1084
mdoerr@9497 49 #define CRC32_BARRET_CONSTANTS 10
gromero@9496 50
gromero@9496 51 class ppc64 {
gromero@9496 52 friend class StubGenerator;
gromero@9496 53
gromero@9496 54 private:
gromero@9496 55
gromero@9496 56 // CRC32 Intrinsics.
gromero@9496 57 static juint _crc_table[CRC32_TABLES][CRC32_COLUMN_SIZE];
mdoerr@9497 58 static juint* _constants;
mdoerr@9497 59 static juint* _barret_constants;
gromero@9496 60
gromero@9496 61 public:
gromero@9496 62
gromero@9496 63 // CRC32 Intrinsics.
gromero@9496 64 static void generate_load_crc_table_addr(MacroAssembler* masm, Register table);
mdoerr@9497 65 static void generate_load_crc_constants_addr(MacroAssembler* masm, Register table);
mdoerr@9497 66 static void generate_load_crc_barret_constants_addr(MacroAssembler* masm, Register table);
mdoerr@9497 67 static juint* generate_crc_constants();
mdoerr@9497 68 static juint* generate_crc_barret_constants();
gromero@9496 69
gromero@9496 70 };
gromero@9496 71
aoqi@0 72 #endif // CPU_PPC_VM_STUBROUTINES_PPC_64_HPP

mercurial