This commit is contained in:
Jesper Wilhelmsson 2018-12-21 01:25:46 +01:00
commit eb3549baf7
32 changed files with 298 additions and 230 deletions

View file

@ -529,3 +529,4 @@ eef755718cb24813031a842bbfc716a6cea18e9a jdk-12+23
cc4098b3bc10d1c390384289025fea7b0d4b9e93 jdk-13+0 cc4098b3bc10d1c390384289025fea7b0d4b9e93 jdk-13+0
7d4397b43fa305806160785a4c7210600d59581a jdk-12+24 7d4397b43fa305806160785a4c7210600d59581a jdk-12+24
11033c4ada542f9c9a873314b6ecf60af19e8256 jdk-13+1 11033c4ada542f9c9a873314b6ecf60af19e8256 jdk-13+1
7496df94b3b79f3da53925d2d137317715f11d97 jdk-12+25

View file

@ -517,7 +517,7 @@ $(foreach m, $(ALL_MODULES), \
) \ ) \
) )
ifneq ($(PANDOC), ) ifeq ($(ENABLE_PANDOC), true)
# For all markdown files in $module/share/specs directories, convert them to # For all markdown files in $module/share/specs directories, convert them to
# html, if we have pandoc (otherwise we'll just skip this). # html, if we have pandoc (otherwise we'll just skip this).

View file

@ -610,7 +610,14 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
BASIC_PATH_PROGS(DF, df) BASIC_PATH_PROGS(DF, df)
BASIC_PATH_PROGS(CPIO, [cpio bsdcpio]) BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
BASIC_PATH_PROGS(NICE, nice) BASIC_PATH_PROGS(NICE, nice)
BASIC_PATH_PROGS(PANDOC, pandoc) BASIC_PATH_PROGS(PANDOC, pandoc)
if test -n "$PANDOC"; then
ENABLE_PANDOC="true"
else
ENABLE_PANDOC="false"
fi
AC_SUBST(ENABLE_PANDOC)
]) ])
############################################################################### ###############################################################################

View file

@ -761,6 +761,7 @@ MSVCR_DLL:=@MSVCR_DLL@
MSVCP_DLL:=@MSVCP_DLL@ MSVCP_DLL:=@MSVCP_DLL@
UCRT_DLL_DIR:=@UCRT_DLL_DIR@ UCRT_DLL_DIR:=@UCRT_DLL_DIR@
STLPORT_LIB:=@STLPORT_LIB@ STLPORT_LIB:=@STLPORT_LIB@
ENABLE_PANDOC:=@ENABLE_PANDOC@
#################################################### ####################################################
# #

View file

@ -203,7 +203,7 @@ ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
ifneq ($(MAN_FILES_MD), ) ifneq ($(MAN_FILES_MD), )
# If we got markdown files, ignore the troff files # If we got markdown files, ignore the troff files
ifeq ($(PANDOC), ) ifeq ($(ENABLE_PANDOC), false)
$(info Warning: pandoc not found. Not generating man pages) $(info Warning: pandoc not found. Not generating man pages)
else else
# Create dynamic man pages from markdown using pandoc. We need # Create dynamic man pages from markdown using pandoc. We need

View file

@ -4896,7 +4896,7 @@ void MacroAssembler::string_compare(Register str1, Register str2,
// A very short string // A very short string
cmpw(cnt2, minCharsInWord); cmpw(cnt2, minCharsInWord);
br(Assembler::LT, SHORT_STRING); br(Assembler::LE, SHORT_STRING);
// Compare longwords // Compare longwords
// load first parts of strings and finish initialization while loading // load first parts of strings and finish initialization while loading
@ -4920,8 +4920,7 @@ void MacroAssembler::string_compare(Register str1, Register str2,
ldr(tmp2, Address(str2)); ldr(tmp2, Address(str2));
cmp(cnt2, STUB_THRESHOLD); cmp(cnt2, STUB_THRESHOLD);
br(GE, STUB); br(GE, STUB);
subsw(cnt2, cnt2, 4); subw(cnt2, cnt2, 4);
br(EQ, TAIL_CHECK);
eor(vtmpZ, T16B, vtmpZ, vtmpZ); eor(vtmpZ, T16B, vtmpZ, vtmpZ);
lea(str1, Address(str1, cnt2, Address::uxtw(str1_chr_shift))); lea(str1, Address(str1, cnt2, Address::uxtw(str1_chr_shift)));
lea(str2, Address(str2, cnt2, Address::uxtw(str2_chr_shift))); lea(str2, Address(str2, cnt2, Address::uxtw(str2_chr_shift)));
@ -4937,8 +4936,7 @@ void MacroAssembler::string_compare(Register str1, Register str2,
ldrs(vtmp, Address(str2)); ldrs(vtmp, Address(str2));
cmp(cnt2, STUB_THRESHOLD); cmp(cnt2, STUB_THRESHOLD);
br(GE, STUB); br(GE, STUB);
subsw(cnt2, cnt2, 4); subw(cnt2, cnt2, 4);
br(EQ, TAIL_CHECK);
lea(str1, Address(str1, cnt2, Address::uxtw(str1_chr_shift))); lea(str1, Address(str1, cnt2, Address::uxtw(str1_chr_shift)));
eor(vtmpZ, T16B, vtmpZ, vtmpZ); eor(vtmpZ, T16B, vtmpZ, vtmpZ);
lea(str2, Address(str2, cnt2, Address::uxtw(str2_chr_shift))); lea(str2, Address(str2, cnt2, Address::uxtw(str2_chr_shift)));

View file

@ -4265,132 +4265,196 @@ operand cmpOpUCF2() %{
// Operands for bound floating pointer register arguments // Operands for bound floating pointer register arguments
operand rxmm0() %{ operand rxmm0() %{
constraint(ALLOC_IN_RC(xmm0_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm0_reg));
predicate((UseSSE > 0) && (UseAVX<= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm1() %{ operand rxmm1() %{
constraint(ALLOC_IN_RC(xmm1_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm1_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm2() %{ operand rxmm2() %{
constraint(ALLOC_IN_RC(xmm2_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm2_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm3() %{ operand rxmm3() %{
constraint(ALLOC_IN_RC(xmm3_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm3_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm4() %{ operand rxmm4() %{
constraint(ALLOC_IN_RC(xmm4_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm4_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm5() %{ operand rxmm5() %{
constraint(ALLOC_IN_RC(xmm5_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm5_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm6() %{ operand rxmm6() %{
constraint(ALLOC_IN_RC(xmm6_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm6_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm7() %{ operand rxmm7() %{
constraint(ALLOC_IN_RC(xmm7_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm7_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm8() %{ operand rxmm8() %{
constraint(ALLOC_IN_RC(xmm8_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm8_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm9() %{ operand rxmm9() %{
constraint(ALLOC_IN_RC(xmm9_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm9_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm10() %{ operand rxmm10() %{
constraint(ALLOC_IN_RC(xmm10_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm10_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm11() %{ operand rxmm11() %{
constraint(ALLOC_IN_RC(xmm11_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm11_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm12() %{ operand rxmm12() %{
constraint(ALLOC_IN_RC(xmm12_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm12_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm13() %{ operand rxmm13() %{
constraint(ALLOC_IN_RC(xmm13_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm13_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm14() %{ operand rxmm14() %{
constraint(ALLOC_IN_RC(xmm14_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm14_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm15() %{ operand rxmm15() %{
constraint(ALLOC_IN_RC(xmm15_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm15_reg));
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm16() %{ operand rxmm16() %{
constraint(ALLOC_IN_RC(xmm16_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm16_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm17() %{ operand rxmm17() %{
constraint(ALLOC_IN_RC(xmm17_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm17_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm18() %{ operand rxmm18() %{
constraint(ALLOC_IN_RC(xmm18_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm18_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm19() %{ operand rxmm19() %{
constraint(ALLOC_IN_RC(xmm19_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm19_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm20() %{ operand rxmm20() %{
constraint(ALLOC_IN_RC(xmm20_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm20_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm21() %{ operand rxmm21() %{
constraint(ALLOC_IN_RC(xmm21_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm21_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm22() %{ operand rxmm22() %{
constraint(ALLOC_IN_RC(xmm22_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm22_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm23() %{ operand rxmm23() %{
constraint(ALLOC_IN_RC(xmm23_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm23_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm24() %{ operand rxmm24() %{
constraint(ALLOC_IN_RC(xmm24_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm24_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm25() %{ operand rxmm25() %{
constraint(ALLOC_IN_RC(xmm25_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm25_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm26() %{ operand rxmm26() %{
constraint(ALLOC_IN_RC(xmm26_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm26_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm27() %{ operand rxmm27() %{
constraint(ALLOC_IN_RC(xmm27_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm27_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm28() %{ operand rxmm28() %{
constraint(ALLOC_IN_RC(xmm28_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm28_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm29() %{ operand rxmm29() %{
constraint(ALLOC_IN_RC(xmm29_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm29_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm30() %{ operand rxmm30() %{
constraint(ALLOC_IN_RC(xmm30_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm30_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
operand rxmm31() %{ operand rxmm31() %{
constraint(ALLOC_IN_RC(xmm31_reg)); match(VecX); constraint(ALLOC_IN_RC(xmm31_reg));
predicate(UseAVX == 3); format%{%} interface(REG_INTER); match(VecX);
format%{%}
interface(REG_INTER);
%} %}
//----------OPERAND CLASSES---------------------------------------------------- //----------OPERAND CLASSES----------------------------------------------------
@ -12651,33 +12715,6 @@ instruct RethrowException()
// Execute ZGC load barrier (strong) slow path // Execute ZGC load barrier (strong) slow path
// //
// When running without XMM regs
instruct loadBarrierSlowRegNoVec(rRegP dst, memory mem, rFlagsReg cr) %{
match(Set dst (LoadBarrierSlowReg mem));
predicate(MaxVectorSize < 16);
effect(DEF dst, KILL cr);
format %{"LoadBarrierSlowRegNoVec $dst, $mem" %}
ins_encode %{
#if INCLUDE_ZGC
Register d = $dst$$Register;
ZBarrierSetAssembler* bs = (ZBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
assert(d != r12, "Can't be R12!");
assert(d != r15, "Can't be R15!");
assert(d != rsp, "Can't be RSP!");
__ lea(d, $mem$$Address);
__ call(RuntimeAddress(bs->load_barrier_slow_stub(d)));
#else
ShouldNotReachHere();
#endif
%}
ins_pipe(pipe_slow);
%}
// For XMM and YMM enabled processors // For XMM and YMM enabled processors
instruct loadBarrierSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr, instruct loadBarrierSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3, rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
@ -12686,7 +12723,7 @@ instruct loadBarrierSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{ rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{
match(Set dst (LoadBarrierSlowReg mem)); match(Set dst (LoadBarrierSlowReg mem));
predicate((UseSSE > 0) && (UseAVX <= 2) && (MaxVectorSize >= 16)); predicate(UseAVX <= 2);
effect(DEF dst, KILL cr, effect(DEF dst, KILL cr,
KILL x0, KILL x1, KILL x2, KILL x3, KILL x0, KILL x1, KILL x2, KILL x3,
@ -12694,7 +12731,7 @@ instruct loadBarrierSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
KILL x8, KILL x9, KILL x10, KILL x11, KILL x8, KILL x9, KILL x10, KILL x11,
KILL x12, KILL x13, KILL x14, KILL x15); KILL x12, KILL x13, KILL x14, KILL x15);
format %{"LoadBarrierSlowRegXmm $dst, $mem" %} format %{"LoadBarrierSlowRegXmmAndYmm $dst, $mem" %}
ins_encode %{ ins_encode %{
#if INCLUDE_ZGC #if INCLUDE_ZGC
Register d = $dst$$Register; Register d = $dst$$Register;
@ -12725,7 +12762,7 @@ instruct loadBarrierSlowRegZmm(rRegP dst, memory mem, rFlagsReg cr,
rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{ rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{
match(Set dst (LoadBarrierSlowReg mem)); match(Set dst (LoadBarrierSlowReg mem));
predicate((UseAVX == 3) && (MaxVectorSize >= 16)); predicate(UseAVX == 3);
effect(DEF dst, KILL cr, effect(DEF dst, KILL cr,
KILL x0, KILL x1, KILL x2, KILL x3, KILL x0, KILL x1, KILL x2, KILL x3,
@ -12760,33 +12797,6 @@ instruct loadBarrierSlowRegZmm(rRegP dst, memory mem, rFlagsReg cr,
// Execute ZGC load barrier (weak) slow path // Execute ZGC load barrier (weak) slow path
// //
// When running without XMM regs
instruct loadBarrierWeakSlowRegNoVec(rRegP dst, memory mem, rFlagsReg cr) %{
match(Set dst (LoadBarrierSlowReg mem));
predicate(MaxVectorSize < 16);
effect(DEF dst, KILL cr);
format %{"LoadBarrierSlowRegNoVec $dst, $mem" %}
ins_encode %{
#if INCLUDE_ZGC
Register d = $dst$$Register;
ZBarrierSetAssembler* bs = (ZBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
assert(d != r12, "Can't be R12!");
assert(d != r15, "Can't be R15!");
assert(d != rsp, "Can't be RSP!");
__ lea(d, $mem$$Address);
__ call(RuntimeAddress(bs->load_barrier_weak_slow_stub(d)));
#else
ShouldNotReachHere();
#endif
%}
ins_pipe(pipe_slow);
%}
// For XMM and YMM enabled processors // For XMM and YMM enabled processors
instruct loadBarrierWeakSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr, instruct loadBarrierWeakSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3, rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
@ -12795,7 +12805,7 @@ instruct loadBarrierWeakSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{ rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{
match(Set dst (LoadBarrierWeakSlowReg mem)); match(Set dst (LoadBarrierWeakSlowReg mem));
predicate((UseSSE > 0) && (UseAVX <= 2) && (MaxVectorSize >= 16)); predicate(UseAVX <= 2);
effect(DEF dst, KILL cr, effect(DEF dst, KILL cr,
KILL x0, KILL x1, KILL x2, KILL x3, KILL x0, KILL x1, KILL x2, KILL x3,
@ -12803,7 +12813,7 @@ instruct loadBarrierWeakSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
KILL x8, KILL x9, KILL x10, KILL x11, KILL x8, KILL x9, KILL x10, KILL x11,
KILL x12, KILL x13, KILL x14, KILL x15); KILL x12, KILL x13, KILL x14, KILL x15);
format %{"LoadBarrierWeakSlowRegXmm $dst, $mem" %} format %{"LoadBarrierWeakSlowRegXmmAndYmm $dst, $mem" %}
ins_encode %{ ins_encode %{
#if INCLUDE_ZGC #if INCLUDE_ZGC
Register d = $dst$$Register; Register d = $dst$$Register;
@ -12834,7 +12844,7 @@ instruct loadBarrierWeakSlowRegZmm(rRegP dst, memory mem, rFlagsReg cr,
rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{ rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{
match(Set dst (LoadBarrierWeakSlowReg mem)); match(Set dst (LoadBarrierWeakSlowReg mem));
predicate((UseAVX == 3) && (MaxVectorSize >= 16)); predicate(UseAVX == 3);
effect(DEF dst, KILL cr, effect(DEF dst, KILL cr,
KILL x0, KILL x1, KILL x2, KILL x3, KILL x0, KILL x1, KILL x2, KILL x3,

View file

@ -0,0 +1,40 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. 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.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "precompiled.hpp"
#include "gc/z/zArguments.hpp"
#include "runtime/globals.hpp"
#include "runtime/globals_extension.hpp"
#include "utilities/debug.hpp"
void ZArguments::initialize_platform() {
// The C2 barrier slow path expects vector registers to be least
// 16 bytes wide, which is the minimum width available on all
// x86-64 systems. However, the user could have speficied a lower
// number on the command-line, in which case we print a warning
// and raise it to 16.
if (MaxVectorSize < 16) {
warning("ZGC requires MaxVectorSize to be at least 16");
FLAG_SET_DEFAULT(MaxVectorSize, 16);
}
}

View file

@ -53,29 +53,29 @@ ICRefillVerifier::ICRefillVerifier()
_refill_remembered(false) _refill_remembered(false)
{ {
Thread* thread = Thread::current(); Thread* thread = Thread::current();
assert(thread->missed_ic_stub_refill_mark() == NULL, "nesting not supported"); assert(thread->missed_ic_stub_refill_verifier() == NULL, "nesting not supported");
thread->set_missed_ic_stub_refill_mark(this); thread->set_missed_ic_stub_refill_verifier(this);
} }
ICRefillVerifier::~ICRefillVerifier() { ICRefillVerifier::~ICRefillVerifier() {
assert(!_refill_requested || _refill_remembered, assert(!_refill_requested || _refill_remembered,
"Forgot to refill IC stubs after failed IC transition"); "Forgot to refill IC stubs after failed IC transition");
Thread::current()->set_missed_ic_stub_refill_mark(NULL); Thread::current()->set_missed_ic_stub_refill_verifier(NULL);
} }
ICRefillVerifierMark::ICRefillVerifierMark(ICRefillVerifier* verifier) { ICRefillVerifierMark::ICRefillVerifierMark(ICRefillVerifier* verifier) {
Thread* thread = Thread::current(); Thread* thread = Thread::current();
assert(thread->missed_ic_stub_refill_mark() == NULL, "nesting not supported"); assert(thread->missed_ic_stub_refill_verifier() == NULL, "nesting not supported");
thread->set_missed_ic_stub_refill_mark(this); thread->set_missed_ic_stub_refill_verifier(verifier);
} }
ICRefillVerifierMark::~ICRefillVerifierMark() { ICRefillVerifierMark::~ICRefillVerifierMark() {
Thread::current()->set_missed_ic_stub_refill_mark(NULL); Thread::current()->set_missed_ic_stub_refill_verifier(NULL);
} }
static ICRefillVerifier* current_ic_refill_verifier() { static ICRefillVerifier* current_ic_refill_verifier() {
Thread* current = Thread::current(); Thread* current = Thread::current();
ICRefillVerifier* verifier = reinterpret_cast<ICRefillVerifier*>(current->missed_ic_stub_refill_mark()); ICRefillVerifier* verifier = current->missed_ic_stub_refill_verifier();
assert(verifier != NULL, "need a verifier for safety"); assert(verifier != NULL, "need a verifier for safety");
return verifier; return verifier;
} }

View file

@ -1283,6 +1283,13 @@ bool nmethod::make_not_entrant_or_zombie(int state) {
flush_dependencies(/*delete_immediately*/true); flush_dependencies(/*delete_immediately*/true);
} }
// Clear ICStubs to prevent back patching stubs of zombie or flushed
// nmethods during the next safepoint (see ICStub::finalize).
{
CompiledICLocker ml(this);
clear_ic_stubs();
}
// zombie only - if a JVMTI agent has enabled the CompiledMethodUnload // zombie only - if a JVMTI agent has enabled the CompiledMethodUnload
// event and it hasn't already been reported for this nmethod then // event and it hasn't already been reported for this nmethod then
// report it now. The event may have been reported earlier if the GC // report it now. The event may have been reported earlier if the GC
@ -2533,6 +2540,7 @@ const char* nmethod::reloc_string_for(u_char* begin, u_char* end) {
case relocInfo::section_word_type: return "section_word"; case relocInfo::section_word_type: return "section_word";
case relocInfo::poll_type: return "poll"; case relocInfo::poll_type: return "poll";
case relocInfo::poll_return_type: return "poll_return"; case relocInfo::poll_return_type: return "poll_return";
case relocInfo::trampoline_stub_type: return "trampoline_stub";
case relocInfo::type_mask: return "type_bit_mask"; case relocInfo::type_mask: return "type_bit_mask";
default: default:

View file

@ -72,9 +72,9 @@ bool G1YoungRemSetSamplingThread::should_start_periodic_gc() {
// Check if load is lower than max. // Check if load is lower than max.
double recent_load; double recent_load;
if ((G1PeriodicGCSystemLoadThreshold > 0) && if ((G1PeriodicGCSystemLoadThreshold > 0.0f) &&
(os::loadavg(&recent_load, 1) == -1 || recent_load > G1PeriodicGCSystemLoadThreshold)) { (os::loadavg(&recent_load, 1) == -1 || recent_load > G1PeriodicGCSystemLoadThreshold)) {
log_debug(gc, periodic)("Load %1.2f is higher than threshold " UINTX_FORMAT ". Skipping.", log_debug(gc, periodic)("Load %1.2f is higher than threshold %1.2f. Skipping.",
recent_load, G1PeriodicGCSystemLoadThreshold); recent_load, G1PeriodicGCSystemLoadThreshold);
return false; return false;
} }

View file

@ -311,10 +311,11 @@
"perform a concurrent GC as periodic GC, otherwise use a STW " \ "perform a concurrent GC as periodic GC, otherwise use a STW " \
"Full GC.") \ "Full GC.") \
\ \
manageable(uintx, G1PeriodicGCSystemLoadThreshold, 0, \ manageable(double, G1PeriodicGCSystemLoadThreshold, 0.0, \
"Maximum recent system wide system load as returned by the 1m " \ "Maximum recent system wide load as returned by the 1m value " \
"value of getloadavg() at which G1 triggers a periodic GC. A " \ "of getloadavg() at which G1 triggers a periodic GC. A load " \
"load above this value cancels a given periodic GC. A value of " \ "above this value cancels a given periodic GC. A value of zero " \
"zero disables this check.") \ "disables this check.") \
range(0.0, (double)max_uintx) \
#endif // SHARE_VM_GC_G1_G1_GLOBALS_HPP #endif // SHARE_VM_GC_G1_G1_GLOBALS_HPP

View file

@ -19,7 +19,6 @@
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*
*/ */
#include "precompiled.hpp" #include "precompiled.hpp"
@ -91,6 +90,9 @@ void ZArguments::initialize() {
// Verification of stacks not (yet) supported, for the same reason // Verification of stacks not (yet) supported, for the same reason
// we need fixup_partial_loads // we need fixup_partial_loads
DEBUG_ONLY(FLAG_SET_DEFAULT(VerifyStack, false)); DEBUG_ONLY(FLAG_SET_DEFAULT(VerifyStack, false));
// Initialize platform specific arguments
initialize_platform();
} }
CollectedHeap* ZArguments::create_heap() { CollectedHeap* ZArguments::create_heap() {

View file

@ -29,6 +29,9 @@
class CollectedHeap; class CollectedHeap;
class ZArguments : public GCArguments { class ZArguments : public GCArguments {
private:
void initialize_platform();
public: public:
virtual void initialize(); virtual void initialize();
virtual size_t conservative_max_heap_alignment(); virtual size_t conservative_max_heap_alignment();

View file

@ -149,7 +149,7 @@ long NMethodSweeper::_time_counter = 0; // Virtual time u
long NMethodSweeper::_last_sweep = 0; // Value of _time_counter when the last sweep happened long NMethodSweeper::_last_sweep = 0; // Value of _time_counter when the last sweep happened
int NMethodSweeper::_seen = 0; // Nof. nmethod we have currently processed in current pass of CodeCache int NMethodSweeper::_seen = 0; // Nof. nmethod we have currently processed in current pass of CodeCache
volatile bool NMethodSweeper::_should_sweep = true; // Indicates if we should invoke the sweeper volatile bool NMethodSweeper::_should_sweep = false;// Indicates if we should invoke the sweeper
volatile bool NMethodSweeper::_force_sweep = false;// Indicates if we should force a sweep volatile bool NMethodSweeper::_force_sweep = false;// Indicates if we should force a sweep
volatile int NMethodSweeper::_bytes_changed = 0; // Counts the total nmethod size if the nmethod changed from: volatile int NMethodSweeper::_bytes_changed = 0; // Counts the total nmethod size if the nmethod changed from:
// 1) alive -> not_entrant // 1) alive -> not_entrant
@ -717,12 +717,6 @@ NMethodSweeper::MethodStateChange NMethodSweeper::process_compiled_method(Compil
// stack we can safely convert it to a zombie method // stack we can safely convert it to a zombie method
OrderAccess::loadload(); // _stack_traversal_mark and _state OrderAccess::loadload(); // _stack_traversal_mark and _state
if (cm->can_convert_to_zombie()) { if (cm->can_convert_to_zombie()) {
// Clear ICStubs to prevent back patching stubs of zombie or flushed
// nmethods during the next safepoint (see ICStub::finalize).
{
CompiledICLocker ml(cm);
cm->clear_ic_stubs();
}
// Code cache state change is tracked in make_zombie() // Code cache state change is tracked in make_zombie()
cm->make_zombie(); cm->make_zombie();
SWEEP(cm); SWEEP(cm);

View file

@ -231,7 +231,7 @@ Thread::Thread() {
set_active_handles(NULL); set_active_handles(NULL);
set_free_handle_block(NULL); set_free_handle_block(NULL);
set_last_handle_mark(NULL); set_last_handle_mark(NULL);
DEBUG_ONLY(_missed_ic_stub_refill_mark = NULL); DEBUG_ONLY(_missed_ic_stub_refill_verifier = NULL);
// This initial value ==> never claimed. // This initial value ==> never claimed.
_oops_do_parity = 0; _oops_do_parity = 0;

View file

@ -81,6 +81,7 @@ class jvmtiDeferredLocalVariableSet;
class GCTaskQueue; class GCTaskQueue;
class ThreadClosure; class ThreadClosure;
class ICRefillVerifier;
class IdealGraphPrinter; class IdealGraphPrinter;
class Metadata; class Metadata;
@ -329,15 +330,15 @@ class Thread: public ThreadShadow {
private: private:
#ifdef ASSERT #ifdef ASSERT
void* _missed_ic_stub_refill_mark; ICRefillVerifier* _missed_ic_stub_refill_verifier;
public: public:
void* missed_ic_stub_refill_mark() { ICRefillVerifier* missed_ic_stub_refill_verifier() {
return _missed_ic_stub_refill_mark; return _missed_ic_stub_refill_verifier;
} }
void set_missed_ic_stub_refill_mark(void* mark) { void set_missed_ic_stub_refill_verifier(ICRefillVerifier* verifier) {
_missed_ic_stub_refill_mark = mark; _missed_ic_stub_refill_verifier = verifier;
} }
#endif #endif

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -770,7 +770,7 @@ public class DistributionPointFetcher {
* *
* In practice, conforming CAs MUST use the key identifier method, * In practice, conforming CAs MUST use the key identifier method,
* and MUST include authority key identifier extension in all CRLs * and MUST include authority key identifier extension in all CRLs
* issued. [section 5.2.1, RFC 2459] * issued. [section 5.2.1, RFC 5280]
*/ */
AuthorityKeyIdentifierExtension crlAKID = crl.getAuthKeyIdExtension(); AuthorityKeyIdentifierExtension crlAKID = crl.getAuthKeyIdExtension();
issuerSelector.setSkiAndSerialNumber(crlAKID); issuerSelector.setSkiAndSerialNumber(crlAKID);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -668,7 +668,7 @@ class ForwardBuilder extends Builder {
* Verifies a matching certificate. * Verifies a matching certificate.
* *
* This method executes the validation steps in the PKIX path * This method executes the validation steps in the PKIX path
* validation algorithm <draft-ietf-pkix-new-part1-08.txt> which were * validation algorithm, RFC 5280, which were
* not satisfied by the selection criteria used by getCertificates() * not satisfied by the selection criteria used by getCertificates()
* to find the certs and only the steps that can be executed in a * to find the certs and only the steps that can be executed in a
* forward direction (target to trust anchor). Those steps that can * forward direction (target to trust anchor). Those steps that can

View file

@ -1045,7 +1045,7 @@ public class AVA implements DerEncoder {
if (valStr == null) { if (valStr == null) {
// rfc1779 specifies that attribute values associated // RFC 1779 specifies that attribute values associated
// with non-standard keyword attributes may be represented // with non-standard keyword attributes may be represented
// using the hex format below. This will be used only // using the hex format below. This will be used only
// when the value is not a string type // when the value is not a string type

View file

@ -166,15 +166,15 @@ public class AlgorithmId implements Serializable, DerEncoder {
// Several AlgorithmId should omit the whole parameter part when // Several AlgorithmId should omit the whole parameter part when
// it's NULL. They are --- // it's NULL. They are ---
// rfc3370 2.1: Implementations SHOULD generate SHA-1 // RFC 3370 2.1: Implementations SHOULD generate SHA-1
// AlgorithmIdentifiers with absent parameters. // AlgorithmIdentifiers with absent parameters.
// rfc3447 C1: When id-sha1, id-sha224, id-sha256, id-sha384 and // RFC 3447 C1: When id-sha1, id-sha224, id-sha256, id-sha384 and
// id-sha512 are used in an AlgorithmIdentifier the parameters // id-sha512 are used in an AlgorithmIdentifier the parameters
// (which are optional) SHOULD be omitted. // (which are optional) SHOULD be omitted.
// rfc3279 2.3.2: The id-dsa algorithm syntax includes optional // RFC 3279 2.3.2: The id-dsa algorithm syntax includes optional
// domain parameters... When omitted, the parameters component // domain parameters... When omitted, the parameters component
// MUST be omitted entirely // MUST be omitted entirely
// rfc3370 3.1: When the id-dsa-with-sha1 algorithm identifier // RFC 3370 3.1: When the id-dsa-with-sha1 algorithm identifier
// is used, the AlgorithmIdentifier parameters field MUST be absent. // is used, the AlgorithmIdentifier parameters field MUST be absent.
/*if ( /*if (
algid.equals((Object)SHA_oid) || algid.equals((Object)SHA_oid) ||

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -45,7 +45,7 @@ import sun.security.util.DerOutputStream;
* certificate. * certificate.
* <p> * <p>
* Optional qualifiers are not supported in this implementation, as they are * Optional qualifiers are not supported in this implementation, as they are
* not recommended by RFC2459. * not recommended by RFC 5280.
* *
* The ASN.1 syntax for this is (IMPLICIT tagging is defined in the * The ASN.1 syntax for this is (IMPLICIT tagging is defined in the
* module definition): * module definition):

View file

@ -181,7 +181,7 @@ public class DNSName implements GeneralNameInterface {
* For example, www.host.example.com would satisfy the constraint but * For example, www.host.example.com would satisfy the constraint but
* host1.example.com would not. * host1.example.com would not.
* <p> * <p>
* draft-ietf-pkix-new-part1-00.txt: DNSName restrictions are expressed as foo.bar.com. * RFC 5280: DNSName restrictions are expressed as foo.bar.com.
* Any DNSName that * Any DNSName that
* can be constructed by simply adding to the left hand side of the name * can be constructed by simply adding to the left hand side of the name
* satisfies the name constraint. For example, www.foo.bar.com would * satisfies the name constraint. For example, www.foo.bar.com would

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2002, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,27 +37,27 @@ import sun.security.util.DerValue;
/** /**
* This class implements the IPAddressName as required by the GeneralNames * This class implements the IPAddressName as required by the GeneralNames
* ASN.1 object. Both IPv4 and IPv6 addresses are supported using the * ASN.1 object. Both IPv4 and IPv6 addresses are supported using the
* formats specified in IETF PKIX RFC2459. * formats specified in IETF PKIX RFC 5280.
* <p> * <p>
* [RFC2459 4.2.1.7 Subject Alternative Name] * [RFC 5280 4.2.1.6 Subject Alternative Name]
* When the subjectAltName extension contains a iPAddress, the address * When the subjectAltName extension contains an iPAddress, the address
* MUST be stored in the octet string in "network byte order," as * MUST be stored in the octet string in "network byte order", as
* specified in RFC 791. The least significant bit (LSB) of * specified in [RFC791]. The least significant bit (LSB) of each octet
* each octet is the LSB of the corresponding byte in the network * is the LSB of the corresponding byte in the network address. For IP
* address. For IP Version 4, as specified in RFC 791, the octet string * version 4, as specified in [RFC791], the octet string MUST contain
* MUST contain exactly four octets. For IP Version 6, as specified in * exactly four octets. For IP version 6, as specified in
* RFC 1883, the octet string MUST contain exactly sixteen octets. * [RFC 2460], the octet string MUST contain exactly sixteen octets.
* <p> * <p>
* [RFC2459 4.2.1.11 Name Constraints] * [RFC 5280 4.2.1.10 Name Constraints]
* The syntax of iPAddress MUST be as described in section 4.2.1.7 with * The syntax of iPAddress MUST be as described in Section 4.2.1.6 with
* the following additions specifically for Name Constraints. For IPv4 * the following additions specifically for name constraints. For IPv4
* addresses, the ipAddress field of generalName MUST contain eight (8) * addresses, the iPAddress field of GeneralName MUST contain eight (8)
* octets, encoded in the style of RFC 1519 (CIDR) to represent an * octets, encoded in the style of RFC 4632 (CIDR) to represent an
* address range.[RFC 1519] For IPv6 addresses, the ipAddress field * address range [RFC 4632]. For IPv6 addresses, the iPAddress field
* MUST contain 32 octets similarly encoded. For example, a name * MUST contain 32 octets similarly encoded. For example, a name
* constraint for "class C" subnet 10.9.8.0 shall be represented as the * constraint for "class C" subnet 192.0.2.0 is represented as the
* octets 0A 09 08 00 FF FF FF 00, representing the CIDR notation * octets C0 00 02 00 FF FF FF 00, representing the CIDR notation
* 10.9.8.0/255.255.255.0. * 192.0.2.0/24 (mask 255.255.255.0).
* <p> * <p>
* @see GeneralName * @see GeneralName
* @see GeneralNameInterface * @see GeneralNameInterface
@ -376,15 +376,16 @@ public class IPAddressName implements GeneralNameInterface {
* </ul>. These results are used in checking NameConstraints during * </ul>. These results are used in checking NameConstraints during
* certification path verification. * certification path verification.
* <p> * <p>
* [RFC2459] The syntax of iPAddress MUST be as described in section * [RFC 5280 4.2.1.10 Name Constraints]
* 4.2.1.7 with the following additions specifically for Name Constraints. * The syntax of iPAddress MUST be as described in Section 4.2.1.6 with
* For IPv4 addresses, the ipAddress field of generalName MUST contain * the following additions specifically for name constraints. For IPv4
* eight (8) octets, encoded in the style of RFC 1519 (CIDR) to represent an * addresses, the iPAddress field of GeneralName MUST contain eight (8)
* address range.[RFC 1519] For IPv6 addresses, the ipAddress field * octets, encoded in the style of RFC 4632 (CIDR) to represent an
* address range [RFC 4632]. For IPv6 addresses, the iPAddress field
* MUST contain 32 octets similarly encoded. For example, a name * MUST contain 32 octets similarly encoded. For example, a name
* constraint for "class C" subnet 10.9.8.0 shall be represented as the * constraint for "class C" subnet 192.0.2.0 is represented as the
* octets 0A 09 08 00 FF FF FF 00, representing the CIDR notation * octets C0 00 02 00 FF FF FF 00, representing the CIDR notation
* 10.9.8.0/255.255.255.0. * 192.0.2.0/24 (mask 255.255.255.0).
* *
* @param inputName to be checked for being constrained * @param inputName to be checked for being constrained
* @return constraint type above * @return constraint type above

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -63,7 +63,7 @@ public class KeyIdentifier {
/** /**
* Creates a KeyIdentifier from a public-key value. * Creates a KeyIdentifier from a public-key value.
* *
* <p>From RFC2459: Two common methods for generating key identifiers from * <p>From RFC 5280: Two common methods for generating key identifiers from
* the public key are: * the public key are:
* <ol> * <ol>
* <li>The keyIdentifier is composed of the 160-bit SHA-1 hash of the * <li>The keyIdentifier is composed of the 160-bit SHA-1 hash of the

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -326,7 +326,7 @@ implements CertAttrSet<String>, Cloneable {
* expanded by a merge, just remain constant or become more * expanded by a merge, just remain constant or become more
* limiting. * limiting.
* <p> * <p>
* IETF RFC2459 specifies the processing of Name Constraints as * IETF RFC 5280 specifies the processing of Name Constraints as
* follows: * follows:
* <p> * <p>
* (j) If permittedSubtrees is present in the certificate, set the * (j) If permittedSubtrees is present in the certificate, set the

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -156,7 +156,7 @@ public class OIDName implements GeneralNameInterface {
else if (this.equals((OIDName)inputName)) else if (this.equals((OIDName)inputName))
constraintType = NAME_MATCH; constraintType = NAME_MATCH;
else else
//widens and narrows not defined in RFC2459 for OIDName (aka registeredID) //widens and narrows not defined in RFC 5280 for OIDName (aka registeredID)
throw new UnsupportedOperationException("Narrowing and widening are not supported for OIDNames"); throw new UnsupportedOperationException("Narrowing and widening are not supported for OIDNames");
return constraintType; return constraintType;
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -68,7 +68,7 @@ public class RFC822Name implements GeneralNameInterface
/** /**
* Parse an RFC822Name string to see if it is a valid * Parse an RFC822Name string to see if it is a valid
* addr-spec according to IETF RFC822 and RFC2459: * addr-spec according to IETF RFC 822 and RFC 5280:
* [local-part@]domain * [local-part@]domain
* <p> * <p>
* local-part@ could be empty for an RFC822Name NameConstraint, * local-part@ could be empty for an RFC822Name NameConstraint,
@ -131,7 +131,7 @@ public class RFC822Name implements GeneralNameInterface
* Compares this name with another, for equality. * Compares this name with another, for equality.
* *
* @return true iff the names are equivalent * @return true iff the names are equivalent
* according to RFC2459. * according to RFC 5280.
*/ */
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) if (this == obj)
@ -142,7 +142,7 @@ public class RFC822Name implements GeneralNameInterface
RFC822Name other = (RFC822Name)obj; RFC822Name other = (RFC822Name)obj;
// RFC2459 mandates that these names are // RFC 5280 mandates that these names are
// not case-sensitive // not case-sensitive
return name.equalsIgnoreCase(other.name); return name.equalsIgnoreCase(other.name);
} }
@ -166,14 +166,15 @@ public class RFC822Name implements GeneralNameInterface
* </ul>. These results are used in checking NameConstraints during * </ul>. These results are used in checking NameConstraints during
* certification path verification. * certification path verification.
* <p> * <p>
* [RFC2459] When the subjectAltName extension contains an Internet mail address, *
* the address MUST be included as an rfc822Name. The format of an * [RFC 5280]:
* rfc822Name is an "addr-spec" as defined in RFC 822 [RFC 822]. An * When the subjectAltName extension contains an Internet mail address,
* addr-spec has the form "local-part@domain". Note that an addr-spec * the address MUST be stored in the rfc822Name. The format of an
* has no phrase (such as a common name) before it, has no comment (text * rfc822Name is a "Mailbox" as defined in Section 4.1.2 of [RFC2821].
* A Mailbox has the form "Local-part@Domain". Note that a Mailbox has
* no phrase (such as a common name) before it, has no comment (text
* surrounded in parentheses) after it, and is not surrounded by "&lt;" and * surrounded in parentheses) after it, and is not surrounded by "&lt;" and
* "&gt;". Note that while upper and lower case letters are allowed in an * "&gt;".
* RFC 822 addr-spec, no significance is attached to the case.
* *
* @param inputName to be checked for being constrained * @param inputName to be checked for being constrained
* @return constraint type above * @return constraint type above
@ -187,7 +188,7 @@ public class RFC822Name implements GeneralNameInterface
else if (inputName.getType() != (GeneralNameInterface.NAME_RFC822)) { else if (inputName.getType() != (GeneralNameInterface.NAME_RFC822)) {
constraintType = NAME_DIFF_TYPE; constraintType = NAME_DIFF_TYPE;
} else { } else {
//RFC2459 specifies that case is not significant in RFC822Names //RFC 5280 specifies that case is not significant in RFC822Names
String inName = String inName =
(((RFC822Name)inputName).getName()).toLowerCase(Locale.ENGLISH); (((RFC822Name)inputName).getName()).toLowerCase(Locale.ENGLISH);
String thisName = name.toLowerCase(Locale.ENGLISH); String thisName = name.toLowerCase(Locale.ENGLISH);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -213,7 +213,7 @@ public class URIName implements GeneralNameInterface {
/** /**
* Compares this name with another, for equality. * Compares this name with another, for equality.
* *
* @return true iff the names are equivalent according to RFC2459. * @return true iff the names are equivalent according to RFC 5280.
*/ */
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) { if (this == obj) {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -403,7 +403,7 @@ public class X400Address implements GeneralNameInterface {
else if (inputName.getType() != NAME_X400) else if (inputName.getType() != NAME_X400)
constraintType = NAME_DIFF_TYPE; constraintType = NAME_DIFF_TYPE;
else else
//Narrowing, widening, and match constraints not defined in rfc2459 for X400Address //Narrowing, widening, and match constraints not defined in RFC 5280 for X400Address
throw new UnsupportedOperationException("Narrowing, widening, and match are not supported for X400Address."); throw new UnsupportedOperationException("Narrowing, widening, and match are not supported for X400Address.");
return constraintType; return constraintType;
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -63,14 +63,8 @@ import sun.security.provider.X509Factory;
* direct knowledge of each other. CA certificates are either signed by * direct knowledge of each other. CA certificates are either signed by
* themselves, or by some other CA such as a "root" CA. * themselves, or by some other CA such as a "root" CA.
* *
* <P>RFC 1422 is very informative, though it does not describe much * <P> Standards relating to X.509 Public Key Infrastructure for the Internet
* of the recent work being done with X.509 certificates. That includes * can be referenced in RFC 5280.
* a 1996 version (X.509v3) and a variety of enhancements being made to
* facilitate an explosion of personal certificates used as "Internet
* Drivers' Licences", or with SET for credit card transactions.
*
* <P>More recent work includes the IETF PKIX Working Group efforts,
* especially RFC2459.
* *
* @author Dave Brownell * @author Dave Brownell
* @author Amit Kapoor * @author Amit Kapoor

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved. * Copyright (c) 2016 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -642,6 +642,12 @@ public class TestStringIntrinsics2 {
assertEquals(-3, asmStringCompareTo(a2, b2), assertEquals(-3, asmStringCompareTo(a2, b2),
"TestOther.asmStringCompareTo(very_very_long_strings_2)"); "TestOther.asmStringCompareTo(very_very_long_strings_2)");
} }
// See bug 8215100
{
assertEquals(-20, asmStringCompareTo("e.\u0259.", "y.e."));
assertEquals(20, asmStringCompareTo("y.e.", "e.\u0259."));
}
} }