提交 dedad5ff 编写于 作者: A anoll

Merge

...@@ -757,7 +757,7 @@ void verify_oops_warning(const MachNode *n, int ideal_op, int mem_op) { ...@@ -757,7 +757,7 @@ void verify_oops_warning(const MachNode *n, int ideal_op, int mem_op) {
#endif #endif
void emit_form3_mem_reg(CodeBuffer &cbuf, const MachNode* n, int primary, int tertiary, void emit_form3_mem_reg(CodeBuffer &cbuf, PhaseRegAlloc* ra, const MachNode* n, int primary, int tertiary,
int src1_enc, int disp32, int src2_enc, int dst_enc) { int src1_enc, int disp32, int src2_enc, int dst_enc) {
#ifdef ASSERT #ifdef ASSERT
...@@ -912,8 +912,14 @@ void emit_form3_mem_reg(CodeBuffer &cbuf, const MachNode* n, int primary, int te ...@@ -912,8 +912,14 @@ void emit_form3_mem_reg(CodeBuffer &cbuf, const MachNode* n, int primary, int te
uint index = src2_enc; uint index = src2_enc;
int disp = disp32; int disp = disp32;
if (src1_enc == R_SP_enc || src1_enc == R_FP_enc) if (src1_enc == R_SP_enc || src1_enc == R_FP_enc) {
disp += STACK_BIAS; disp += STACK_BIAS;
// Quick fix for JDK-8029668: check that stack offset fits, bailout if not
if (!Assembler::is_simm13(disp)) {
ra->C->record_method_not_compilable("unable to handle large constant offsets");
return;
}
}
// We should have a compiler bailout here rather than a guarantee. // We should have a compiler bailout here rather than a guarantee.
// Better yet would be some mechanism to handle variable-size matches correctly. // Better yet would be some mechanism to handle variable-size matches correctly.
...@@ -1279,20 +1285,15 @@ static enum RC rc_class( OptoReg::Name reg ) { ...@@ -1279,20 +1285,15 @@ static enum RC rc_class( OptoReg::Name reg ) {
return rc_float; return rc_float;
} }
static int impl_helper( const MachNode *mach, CodeBuffer *cbuf, PhaseRegAlloc *ra_, bool do_size, bool is_load, int offset, int reg, int opcode, const char *op_str, int size, outputStream* st ) { static int impl_helper(const MachNode* mach, CodeBuffer* cbuf, PhaseRegAlloc* ra, bool do_size, bool is_load, int offset, int reg, int opcode, const char *op_str, int size, outputStream* st ) {
if( cbuf ) { if (cbuf) {
// Better yet would be some mechanism to handle variable-size matches correctly emit_form3_mem_reg(*cbuf, ra, mach, opcode, -1, R_SP_enc, offset, 0, Matcher::_regEncode[reg]);
if (!Assembler::is_simm13(offset + STACK_BIAS)) {
ra_->C->record_method_not_compilable("unable to handle large constant offsets");
} else {
emit_form3_mem_reg(*cbuf, mach, opcode, -1, R_SP_enc, offset, 0, Matcher::_regEncode[reg]);
}
} }
#ifndef PRODUCT #ifndef PRODUCT
else if( !do_size ) { else if (!do_size) {
if( size != 0 ) st->print("\n\t"); if (size != 0) st->print("\n\t");
if( is_load ) st->print("%s [R_SP + #%d],R_%s\t! spill",op_str,offset,OptoReg::regname(reg)); if (is_load) st->print("%s [R_SP + #%d],R_%s\t! spill",op_str,offset,OptoReg::regname(reg));
else st->print("%s R_%s,[R_SP + #%d]\t! spill",op_str,OptoReg::regname(reg),offset); else st->print("%s R_%s,[R_SP + #%d]\t! spill",op_str,OptoReg::regname(reg),offset);
} }
#endif #endif
return size+4; return size+4;
...@@ -2087,22 +2088,22 @@ encode %{ ...@@ -2087,22 +2088,22 @@ encode %{
%} %}
enc_class form3_mem_reg( memory mem, iRegI dst ) %{ enc_class form3_mem_reg( memory mem, iRegI dst ) %{
emit_form3_mem_reg(cbuf, this, $primary, $tertiary, emit_form3_mem_reg(cbuf, ra_, this, $primary, $tertiary,
$mem$$base, $mem$$disp, $mem$$index, $dst$$reg); $mem$$base, $mem$$disp, $mem$$index, $dst$$reg);
%} %}
enc_class simple_form3_mem_reg( memory mem, iRegI dst ) %{ enc_class simple_form3_mem_reg( memory mem, iRegI dst ) %{
emit_form3_mem_reg(cbuf, this, $primary, -1, emit_form3_mem_reg(cbuf, ra_, this, $primary, -1,
$mem$$base, $mem$$disp, $mem$$index, $dst$$reg); $mem$$base, $mem$$disp, $mem$$index, $dst$$reg);
%} %}
enc_class form3_mem_prefetch_read( memory mem ) %{ enc_class form3_mem_prefetch_read( memory mem ) %{
emit_form3_mem_reg(cbuf, this, $primary, -1, emit_form3_mem_reg(cbuf, ra_, this, $primary, -1,
$mem$$base, $mem$$disp, $mem$$index, 0/*prefetch function many-reads*/); $mem$$base, $mem$$disp, $mem$$index, 0/*prefetch function many-reads*/);
%} %}
enc_class form3_mem_prefetch_write( memory mem ) %{ enc_class form3_mem_prefetch_write( memory mem ) %{
emit_form3_mem_reg(cbuf, this, $primary, -1, emit_form3_mem_reg(cbuf, ra_, this, $primary, -1,
$mem$$base, $mem$$disp, $mem$$index, 2/*prefetch function many-writes*/); $mem$$base, $mem$$disp, $mem$$index, 2/*prefetch function many-writes*/);
%} %}
...@@ -2110,8 +2111,8 @@ encode %{ ...@@ -2110,8 +2111,8 @@ encode %{
assert(Assembler::is_simm13($mem$$disp ), "need disp and disp+4"); assert(Assembler::is_simm13($mem$$disp ), "need disp and disp+4");
assert(Assembler::is_simm13($mem$$disp+4), "need disp and disp+4"); assert(Assembler::is_simm13($mem$$disp+4), "need disp and disp+4");
guarantee($mem$$index == R_G0_enc, "double index?"); guarantee($mem$$index == R_G0_enc, "double index?");
emit_form3_mem_reg(cbuf, this, $primary, -1, $mem$$base, $mem$$disp+4, R_G0_enc, R_O7_enc ); emit_form3_mem_reg(cbuf, ra_, this, $primary, -1, $mem$$base, $mem$$disp+4, R_G0_enc, R_O7_enc );
emit_form3_mem_reg(cbuf, this, $primary, -1, $mem$$base, $mem$$disp, R_G0_enc, $reg$$reg ); emit_form3_mem_reg(cbuf, ra_, this, $primary, -1, $mem$$base, $mem$$disp, R_G0_enc, $reg$$reg );
emit3_simm13( cbuf, Assembler::arith_op, $reg$$reg, Assembler::sllx_op3, $reg$$reg, 0x1020 ); emit3_simm13( cbuf, Assembler::arith_op, $reg$$reg, Assembler::sllx_op3, $reg$$reg, 0x1020 );
emit3( cbuf, Assembler::arith_op, $reg$$reg, Assembler::or_op3, $reg$$reg, 0, R_O7_enc ); emit3( cbuf, Assembler::arith_op, $reg$$reg, Assembler::or_op3, $reg$$reg, 0, R_O7_enc );
%} %}
...@@ -2121,14 +2122,14 @@ encode %{ ...@@ -2121,14 +2122,14 @@ encode %{
assert(Assembler::is_simm13($mem$$disp+4), "need disp and disp+4"); assert(Assembler::is_simm13($mem$$disp+4), "need disp and disp+4");
guarantee($mem$$index == R_G0_enc, "double index?"); guarantee($mem$$index == R_G0_enc, "double index?");
// Load long with 2 instructions // Load long with 2 instructions
emit_form3_mem_reg(cbuf, this, $primary, -1, $mem$$base, $mem$$disp, R_G0_enc, $reg$$reg+0 ); emit_form3_mem_reg(cbuf, ra_, this, $primary, -1, $mem$$base, $mem$$disp, R_G0_enc, $reg$$reg+0 );
emit_form3_mem_reg(cbuf, this, $primary, -1, $mem$$base, $mem$$disp+4, R_G0_enc, $reg$$reg+1 ); emit_form3_mem_reg(cbuf, ra_, this, $primary, -1, $mem$$base, $mem$$disp+4, R_G0_enc, $reg$$reg+1 );
%} %}
//%%% form3_mem_plus_4_reg is a hack--get rid of it //%%% form3_mem_plus_4_reg is a hack--get rid of it
enc_class form3_mem_plus_4_reg( memory mem, iRegI dst ) %{ enc_class form3_mem_plus_4_reg( memory mem, iRegI dst ) %{
guarantee($mem$$disp, "cannot offset a reg-reg operand by 4"); guarantee($mem$$disp, "cannot offset a reg-reg operand by 4");
emit_form3_mem_reg(cbuf, this, $primary, -1, $mem$$base, $mem$$disp + 4, $mem$$index, $dst$$reg); emit_form3_mem_reg(cbuf, ra_, this, $primary, -1, $mem$$base, $mem$$disp + 4, $mem$$index, $dst$$reg);
%} %}
enc_class form3_g0_rs2_rd_move( iRegI rs2, iRegI rd ) %{ enc_class form3_g0_rs2_rd_move( iRegI rs2, iRegI rd ) %{
......
...@@ -1049,6 +1049,9 @@ Klass* SystemDictionary::parse_stream(Symbol* class_name, ...@@ -1049,6 +1049,9 @@ Klass* SystemDictionary::parse_stream(Symbol* class_name,
add_to_hierarchy(k, CHECK_NULL); // No exception, but can block add_to_hierarchy(k, CHECK_NULL); // No exception, but can block
// But, do not add to system dictionary. // But, do not add to system dictionary.
// compiled code dependencies need to be validated anyway
notice_modification();
} }
// Rewrite and patch constant pool here. // Rewrite and patch constant pool here.
......
...@@ -1863,11 +1863,8 @@ void GenerateOopMap::do_ldc(int bci) { ...@@ -1863,11 +1863,8 @@ void GenerateOopMap::do_ldc(int bci) {
constantTag tag = cp->tag_at(ldc.pool_index()); // idx is index in resolved_references constantTag tag = cp->tag_at(ldc.pool_index()); // idx is index in resolved_references
BasicType bt = ldc.result_type(); BasicType bt = ldc.result_type();
CellTypeState cts; CellTypeState cts;
if (tag.is_klass() || if (tag.basic_type() == T_OBJECT) {
tag.is_unresolved_klass() || assert(!tag.is_string_index() && !tag.is_klass_index(), "Unexpected index tag");
tag.is_string() ||
tag.is_method_handle() ||
tag.is_method_type()) {
assert(bt == T_OBJECT, "Guard is incorrect"); assert(bt == T_OBJECT, "Guard is incorrect");
cts = CellTypeState::make_line_ref(bci); cts = CellTypeState::make_line_ref(bci);
} else { } else {
......
...@@ -147,9 +147,6 @@ void VM_RedefineClasses::doit() { ...@@ -147,9 +147,6 @@ void VM_RedefineClasses::doit() {
_scratch_classes[i] = NULL; _scratch_classes[i] = NULL;
} }
// Disable any dependent concurrent compilations
SystemDictionary::notice_modification();
// Set flag indicating that some invariants are no longer true. // Set flag indicating that some invariants are no longer true.
// See jvmtiExport.hpp for detailed explanation. // See jvmtiExport.hpp for detailed explanation.
JvmtiExport::set_has_redefined_a_class(); JvmtiExport::set_has_redefined_a_class();
......
...@@ -159,34 +159,18 @@ public class ConcurrentClassLoadingTest { ...@@ -159,34 +159,18 @@ public class ConcurrentClassLoadingTest {
} }
final static String[] classNames = { final static String[] classNames = {
"java.lang.invoke.AbstractValidatingLambdaMetafactory",
"java.lang.invoke.BoundMethodHandle",
"java.lang.invoke.CallSite", "java.lang.invoke.CallSite",
"java.lang.invoke.ConstantCallSite", "java.lang.invoke.ConstantCallSite",
"java.lang.invoke.DirectMethodHandle",
"java.lang.invoke.InnerClassLambdaMetafactory",
"java.lang.invoke.InvokeDynamic",
"java.lang.invoke.InvokeGeneric",
"java.lang.invoke.InvokerBytecodeGenerator",
"java.lang.invoke.Invokers",
"java.lang.invoke.LambdaConversionException", "java.lang.invoke.LambdaConversionException",
"java.lang.invoke.LambdaForm",
"java.lang.invoke.LambdaMetafactory", "java.lang.invoke.LambdaMetafactory",
"java.lang.invoke.MemberName",
"java.lang.invoke.MethodHandle", "java.lang.invoke.MethodHandle",
"java.lang.invoke.MethodHandleImpl",
"java.lang.invoke.MethodHandleInfo", "java.lang.invoke.MethodHandleInfo",
"java.lang.invoke.MethodHandleNatives",
"java.lang.invoke.MethodHandleProxies", "java.lang.invoke.MethodHandleProxies",
"java.lang.invoke.MethodHandles", "java.lang.invoke.MethodHandles",
"java.lang.invoke.MethodHandleStatics",
"java.lang.invoke.MethodType", "java.lang.invoke.MethodType",
"java.lang.invoke.MethodTypeForm",
"java.lang.invoke.MutableCallSite", "java.lang.invoke.MutableCallSite",
"java.lang.invoke.SerializedLambda", "java.lang.invoke.SerializedLambda",
"java.lang.invoke.SimpleMethodHandle",
"java.lang.invoke.SwitchPoint", "java.lang.invoke.SwitchPoint",
"java.lang.invoke.TypeConvertingMethodAdapter",
"java.lang.invoke.VolatileCallSite", "java.lang.invoke.VolatileCallSite",
"java.lang.invoke.WrongMethodTypeException" "java.lang.invoke.WrongMethodTypeException"
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册