Mercurial > hg > truffle
comparison src/cpu/x86/vm/c1_LIRGenerator_x86.cpp @ 6739:8a02ca5e5576
7195816: NPG: Crash in c1_ValueType - ShouldNotReachHere
Summary: C1 needs knowledge of T_METADATA at the LIR level.
Reviewed-by: kvn, coleenp
author | roland |
---|---|
date | Tue, 11 Sep 2012 16:20:57 +0200 |
parents | da91efe96a93 |
children | 7eca5de9e0b6 |
comparison
equal
deleted
inserted
replaced
6738:ec98e58952b2 | 6739:8a02ca5e5576 |
---|---|
1000 tty->print_cr(" ###class not loaded at new bci %d", x->printable_bci()); | 1000 tty->print_cr(" ###class not loaded at new bci %d", x->printable_bci()); |
1001 } | 1001 } |
1002 #endif | 1002 #endif |
1003 CodeEmitInfo* info = state_for(x, x->state()); | 1003 CodeEmitInfo* info = state_for(x, x->state()); |
1004 LIR_Opr reg = result_register_for(x->type()); | 1004 LIR_Opr reg = result_register_for(x->type()); |
1005 LIR_Opr klass_reg = new_register(objectType); | |
1006 new_instance(reg, x->klass(), | 1005 new_instance(reg, x->klass(), |
1007 FrameMap::rcx_oop_opr, | 1006 FrameMap::rcx_oop_opr, |
1008 FrameMap::rdi_oop_opr, | 1007 FrameMap::rdi_oop_opr, |
1009 FrameMap::rsi_oop_opr, | 1008 FrameMap::rsi_oop_opr, |
1010 LIR_OprFact::illegalOpr, | 1009 LIR_OprFact::illegalOpr, |
1011 FrameMap::rdx_oop_opr, info); | 1010 FrameMap::rdx_metadata_opr, info); |
1012 LIR_Opr result = rlock_result(x); | 1011 LIR_Opr result = rlock_result(x); |
1013 __ move(reg, result); | 1012 __ move(reg, result); |
1014 } | 1013 } |
1015 | 1014 |
1016 | 1015 |
1023 LIR_Opr reg = result_register_for(x->type()); | 1022 LIR_Opr reg = result_register_for(x->type()); |
1024 LIR_Opr tmp1 = FrameMap::rcx_oop_opr; | 1023 LIR_Opr tmp1 = FrameMap::rcx_oop_opr; |
1025 LIR_Opr tmp2 = FrameMap::rsi_oop_opr; | 1024 LIR_Opr tmp2 = FrameMap::rsi_oop_opr; |
1026 LIR_Opr tmp3 = FrameMap::rdi_oop_opr; | 1025 LIR_Opr tmp3 = FrameMap::rdi_oop_opr; |
1027 LIR_Opr tmp4 = reg; | 1026 LIR_Opr tmp4 = reg; |
1028 LIR_Opr klass_reg = FrameMap::rdx_oop_opr; | 1027 LIR_Opr klass_reg = FrameMap::rdx_metadata_opr; |
1029 LIR_Opr len = length.result(); | 1028 LIR_Opr len = length.result(); |
1030 BasicType elem_type = x->elt_type(); | 1029 BasicType elem_type = x->elt_type(); |
1031 | 1030 |
1032 __ oop2reg(ciTypeArrayKlass::make(elem_type)->constant_encoding(), klass_reg); | 1031 __ metadata2reg(ciTypeArrayKlass::make(elem_type)->constant_encoding(), klass_reg); |
1033 | 1032 |
1034 CodeStub* slow_path = new NewTypeArrayStub(klass_reg, len, reg, info); | 1033 CodeStub* slow_path = new NewTypeArrayStub(klass_reg, len, reg, info); |
1035 __ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, elem_type, klass_reg, slow_path); | 1034 __ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, elem_type, klass_reg, slow_path); |
1036 | 1035 |
1037 LIR_Opr result = rlock_result(x); | 1036 LIR_Opr result = rlock_result(x); |
1053 const LIR_Opr reg = result_register_for(x->type()); | 1052 const LIR_Opr reg = result_register_for(x->type()); |
1054 LIR_Opr tmp1 = FrameMap::rcx_oop_opr; | 1053 LIR_Opr tmp1 = FrameMap::rcx_oop_opr; |
1055 LIR_Opr tmp2 = FrameMap::rsi_oop_opr; | 1054 LIR_Opr tmp2 = FrameMap::rsi_oop_opr; |
1056 LIR_Opr tmp3 = FrameMap::rdi_oop_opr; | 1055 LIR_Opr tmp3 = FrameMap::rdi_oop_opr; |
1057 LIR_Opr tmp4 = reg; | 1056 LIR_Opr tmp4 = reg; |
1058 LIR_Opr klass_reg = FrameMap::rdx_oop_opr; | 1057 LIR_Opr klass_reg = FrameMap::rdx_metadata_opr; |
1059 | 1058 |
1060 length.load_item_force(FrameMap::rbx_opr); | 1059 length.load_item_force(FrameMap::rbx_opr); |
1061 LIR_Opr len = length.result(); | 1060 LIR_Opr len = length.result(); |
1062 | 1061 |
1063 CodeStub* slow_path = new NewObjectArrayStub(klass_reg, len, reg, info); | 1062 CodeStub* slow_path = new NewObjectArrayStub(klass_reg, len, reg, info); |
1101 size->load_nonconstant(); | 1100 size->load_nonconstant(); |
1102 | 1101 |
1103 store_stack_parameter(size->result(), in_ByteSize(i*4)); | 1102 store_stack_parameter(size->result(), in_ByteSize(i*4)); |
1104 } | 1103 } |
1105 | 1104 |
1106 LIR_Opr reg = result_register_for(x->type()); | 1105 LIR_Opr klass_reg = FrameMap::rax_metadata_opr; |
1107 klass2reg_with_patching(reg, x->klass(), patching_info); | 1106 klass2reg_with_patching(klass_reg, x->klass(), patching_info); |
1108 | 1107 |
1109 LIR_Opr rank = FrameMap::rbx_opr; | 1108 LIR_Opr rank = FrameMap::rbx_opr; |
1110 __ move(LIR_OprFact::intConst(x->rank()), rank); | 1109 __ move(LIR_OprFact::intConst(x->rank()), rank); |
1111 LIR_Opr varargs = FrameMap::rcx_opr; | 1110 LIR_Opr varargs = FrameMap::rcx_opr; |
1112 __ move(FrameMap::rsp_opr, varargs); | 1111 __ move(FrameMap::rsp_opr, varargs); |
1113 LIR_OprList* args = new LIR_OprList(3); | 1112 LIR_OprList* args = new LIR_OprList(3); |
1114 args->append(reg); | 1113 args->append(klass_reg); |
1115 args->append(rank); | 1114 args->append(rank); |
1116 args->append(varargs); | 1115 args->append(varargs); |
1116 LIR_Opr reg = result_register_for(x->type()); | |
1117 __ call_runtime(Runtime1::entry_for(Runtime1::new_multi_array_id), | 1117 __ call_runtime(Runtime1::entry_for(Runtime1::new_multi_array_id), |
1118 LIR_OprFact::illegalOpr, | 1118 LIR_OprFact::illegalOpr, |
1119 reg, args, info); | 1119 reg, args, info); |
1120 | 1120 |
1121 LIR_Opr result = rlock_result(x); | 1121 LIR_Opr result = rlock_result(x); |