comparison src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp @ 3615: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
51:dcd0819da984 52:90c8cb49c845
445 __ bind(*stub->continuation()); 445 __ bind(*stub->continuation());
446 } 446 }
447 447
448 if (compilation()->env()->dtrace_method_probes()) { 448 if (compilation()->env()->dtrace_method_probes()) {
449 __ mov(G2_thread, O0); 449 __ mov(G2_thread, O0);
450 __ save_thread(I1); // need to preserve thread in G2 across
451 // runtime call
450 metadata2reg(method()->constant_encoding(), O1); 452 metadata2reg(method()->constant_encoding(), O1);
451 __ call(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), relocInfo::runtime_call_type); 453 __ call(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), relocInfo::runtime_call_type);
452 __ delayed()->nop(); 454 __ delayed()->nop();
455 __ restore_thread(I1);
453 } 456 }
454 457
455 if (method()->is_synchronized() || compilation()->env()->dtrace_method_probes()) { 458 if (method()->is_synchronized() || compilation()->env()->dtrace_method_probes()) {
456 __ mov(I0, O0); // Restore the exception 459 __ mov(I0, O0); // Restore the exception
457 } 460 }
841 __ stw(from_reg->as_register_lo(), base, offset + lo_word_offset_in_bytes); 844 __ stw(from_reg->as_register_lo(), base, offset + lo_word_offset_in_bytes);
842 __ stw(from_reg->as_register_hi(), base, offset + hi_word_offset_in_bytes); 845 __ stw(from_reg->as_register_hi(), base, offset + hi_word_offset_in_bytes);
843 #endif 846 #endif
844 break; 847 break;
845 case T_ADDRESS: 848 case T_ADDRESS:
849 case T_METADATA:
846 __ st_ptr(from_reg->as_register(), base, offset); 850 __ st_ptr(from_reg->as_register(), base, offset);
847 break; 851 break;
848 case T_ARRAY : // fall through 852 case T_ARRAY : // fall through
849 case T_OBJECT: 853 case T_OBJECT:
850 { 854 {
963 __ ld(base, offset + hi_word_offset_in_bytes, to_reg->as_register_hi()); 967 __ ld(base, offset + hi_word_offset_in_bytes, to_reg->as_register_hi());
964 } 968 }
965 #endif 969 #endif
966 } 970 }
967 break; 971 break;
972 case T_METADATA:
968 case T_ADDRESS: __ ld_ptr(base, offset, to_reg->as_register()); break; 973 case T_ADDRESS: __ ld_ptr(base, offset, to_reg->as_register()); break;
969 case T_ARRAY : // fall through 974 case T_ARRAY : // fall through
970 case T_OBJECT: 975 case T_OBJECT:
971 { 976 {
972 if (UseCompressedOops && !wide) { 977 if (UseCompressedOops && !wide) {
1364 1369
1365 1370
1366 void LIR_Assembler::mem2reg(LIR_Opr src_opr, LIR_Opr dest, BasicType type, 1371 void LIR_Assembler::mem2reg(LIR_Opr src_opr, LIR_Opr dest, BasicType type,
1367 LIR_PatchCode patch_code, CodeEmitInfo* info, bool wide, bool unaligned) { 1372 LIR_PatchCode patch_code, CodeEmitInfo* info, bool wide, bool unaligned) {
1368 1373
1374 assert(type != T_METADATA, "load of metadata ptr not supported");
1369 LIR_Address* addr = src_opr->as_address_ptr(); 1375 LIR_Address* addr = src_opr->as_address_ptr();
1370 LIR_Opr to_reg = dest; 1376 LIR_Opr to_reg = dest;
1371 1377
1372 Register src = addr->base()->as_pointer_register(); 1378 Register src = addr->base()->as_pointer_register();
1373 Register disp_reg = noreg; 1379 Register disp_reg = noreg;
1511 1517
1512 1518
1513 void LIR_Assembler::reg2mem(LIR_Opr from_reg, LIR_Opr dest, BasicType type, 1519 void LIR_Assembler::reg2mem(LIR_Opr from_reg, LIR_Opr dest, BasicType type,
1514 LIR_PatchCode patch_code, CodeEmitInfo* info, bool pop_fpu_stack, 1520 LIR_PatchCode patch_code, CodeEmitInfo* info, bool pop_fpu_stack,
1515 bool wide, bool unaligned) { 1521 bool wide, bool unaligned) {
1522 assert(type != T_METADATA, "store of metadata ptr not supported");
1516 LIR_Address* addr = dest->as_address_ptr(); 1523 LIR_Address* addr = dest->as_address_ptr();
1517 1524
1518 Register src = addr->base()->as_pointer_register(); 1525 Register src = addr->base()->as_pointer_register();
1519 Register disp_reg = noreg; 1526 Register disp_reg = noreg;
1520 int disp_value = addr->disp(); 1527 int disp_value = addr->disp();