< prev index next >
src/hotspot/cpu/ppc/stubRoutines_ppc.hpp
Print this page
rev 53302 : 8216060: [PPC64] Vector CRC implementation should be used by interpreter and be faster for short arrays
Reviewed-by: gromero, goetz
*** 1,8 ****
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 2012, 2018, SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,8 ----
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 2012, 2019, SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 43,75 ****
#ifdef CRC32_BYFOUR
#define CRC32_TABLES 8
#else
#define CRC32_TABLES 1
#endif
! #define CRC32_CONSTANTS_SIZE 1084
! #define CRC32_BARRET_CONSTANTS 10
class ppc64 {
friend class StubGenerator;
private:
// CRC32 Intrinsics.
static juint _crc_table[CRC32_TABLES][CRC32_COLUMN_SIZE];
static juint _crc32c_table[CRC32_TABLES][CRC32_COLUMN_SIZE];
! static juint *_crc_constants, *_crc_barret_constants;
! static juint *_crc32c_constants, *_crc32c_barret_constants;
public:
// CRC32 Intrinsics.
static void generate_load_crc_table_addr(MacroAssembler* masm, Register table);
static void generate_load_crc_constants_addr(MacroAssembler* masm, Register table);
- static void generate_load_crc_barret_constants_addr(MacroAssembler* masm, Register table);
static void generate_load_crc32c_table_addr(MacroAssembler* masm, Register table);
static void generate_load_crc32c_constants_addr(MacroAssembler* masm, Register table);
- static void generate_load_crc32c_barret_constants_addr(MacroAssembler* masm, Register table);
static juint* generate_crc_constants(juint reverse_poly);
- static juint* generate_crc_barret_constants(juint reverse_poly);
};
#endif // CPU_PPC_STUBROUTINES_PPC_HPP
--- 43,78 ----
#ifdef CRC32_BYFOUR
#define CRC32_TABLES 8
#else
#define CRC32_TABLES 1
#endif
!
! #define REVERSE_CRC32_POLY 0xEDB88320
! #define REVERSE_CRC32C_POLY 0x82F63B78
! #define INVERSE_REVERSE_CRC32_POLY 0x1aab14226ull
! #define INVERSE_REVERSE_CRC32C_POLY 0x105fd79bdull
! #define CRC32_UNROLL_FACTOR 2048
! #define CRC32_UNROLL_FACTOR2 8
!
class ppc64 {
friend class StubGenerator;
private:
// CRC32 Intrinsics.
static juint _crc_table[CRC32_TABLES][CRC32_COLUMN_SIZE];
static juint _crc32c_table[CRC32_TABLES][CRC32_COLUMN_SIZE];
! static juint *_crc_constants;
! static juint *_crc32c_constants;
public:
// CRC32 Intrinsics.
static void generate_load_crc_table_addr(MacroAssembler* masm, Register table);
static void generate_load_crc_constants_addr(MacroAssembler* masm, Register table);
static void generate_load_crc32c_table_addr(MacroAssembler* masm, Register table);
static void generate_load_crc32c_constants_addr(MacroAssembler* masm, Register table);
static juint* generate_crc_constants(juint reverse_poly);
};
#endif // CPU_PPC_STUBROUTINES_PPC_HPP
< prev index next >