1 /*
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "runtime/deoptimization.hpp"
27 #include "runtime/frame.inline.hpp"
28 #include "runtime/stubRoutines.hpp"
29 #include "runtime/thread.inline.hpp"
30
31 // Implementation of the platform-specific part of StubRoutines - for
32 // a description of how to extend it, see the stubRoutines.hpp file.
33
34 address StubRoutines::x86::_verify_mxcsr_entry = NULL;
35 address StubRoutines::x86::_key_shuffle_mask_addr = NULL;
36
37 uint64_t StubRoutines::x86::_crc_by128_masks[] =
38 {
39 /* The fields in this structure are arranged so that they can be
40 * picked up two at a time with 128-bit loads.
41 *
42 * Because of flipped bit order for this CRC polynomials
43 * the constant for X**N is left-shifted by 1. This is because
44 * a 64 x 64 polynomial multiply produces a 127-bit result
45 * but the highest term is always aligned to bit 0 in the container.
46 * Pre-shifting by one fixes this, at the cost of potentially making
47 * the 32-bit constant no longer fit in a 32-bit container (thus the
48 * use of uint64_t, though this is also the size used by the carry-
49 * less multiply instruction.
50 *
51 * In addition, the flipped bit order and highest-term-at-least-bit
52 * multiply changes the constants used. The 96-bit result will be
53 * aligned to the high-term end of the target 128-bit container,
54 * not the low-term end; that is, instead of a 512-bit or 576-bit fold,
55 * instead it is a 480 (=512-32) or 544 (=512+64-32) bit fold.
|
1 /*
2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "runtime/deoptimization.hpp"
27 #include "runtime/frame.inline.hpp"
28 #include "runtime/stubRoutines.hpp"
29 #include "runtime/thread.inline.hpp"
30
31 // Implementation of the platform-specific part of StubRoutines - for
32 // a description of how to extend it, see the stubRoutines.hpp file.
33
34 address StubRoutines::x86::_verify_mxcsr_entry = NULL;
35 address StubRoutines::x86::_key_shuffle_mask_addr = NULL;
36 address StubRoutines::x86::_ghash_long_swap_mask_addr = NULL;
37 address StubRoutines::x86::_ghash_byte_swap_mask_addr = NULL;
38
39 uint64_t StubRoutines::x86::_crc_by128_masks[] =
40 {
41 /* The fields in this structure are arranged so that they can be
42 * picked up two at a time with 128-bit loads.
43 *
44 * Because of flipped bit order for this CRC polynomials
45 * the constant for X**N is left-shifted by 1. This is because
46 * a 64 x 64 polynomial multiply produces a 127-bit result
47 * but the highest term is always aligned to bit 0 in the container.
48 * Pre-shifting by one fixes this, at the cost of potentially making
49 * the 32-bit constant no longer fit in a 32-bit container (thus the
50 * use of uint64_t, though this is also the size used by the carry-
51 * less multiply instruction.
52 *
53 * In addition, the flipped bit order and highest-term-at-least-bit
54 * multiply changes the constants used. The 96-bit result will be
55 * aligned to the high-term end of the target 128-bit container,
56 * not the low-term end; that is, instead of a 512-bit or 576-bit fold,
57 * instead it is a 480 (=512-32) or 544 (=512+64-32) bit fold.
|