1.1 --- a/src/cpu/mips/vm/sharedRuntime_mips_64.cpp Wed Mar 08 14:49:50 2017 +0800 1.2 +++ b/src/cpu/mips/vm/sharedRuntime_mips_64.cpp Wed Mar 08 05:42:36 2017 -0500 1.3 @@ -3714,7 +3714,7 @@ 1.4 // Prolog for non exception case! 1.5 // Correct the return address we were given. 1.6 //FIXME, return address is on the tos or Ra? 1.7 - __ addi(RA, RA, - (NativeCall::return_address_offset)); 1.8 + __ addi(RA, RA, - (NativeCall::return_address_offset_short)); 1.9 // Save everything in sight. 1.10 map = RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words); 1.11 // Normal deoptimization 1.12 @@ -3758,7 +3758,7 @@ 1.13 // available now because loading it from memory would destroy registers. 1.14 // Save everything in sight. 1.15 // No need to update map as each call to save_live_registers will produce identical oopmap 1.16 - __ addi(RA, RA, - (NativeCall::return_address_offset)); 1.17 + __ addi(RA, RA, - (NativeCall::return_address_offset_short)); 1.18 (void) RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words); 1.19 1.20 // Now it is safe to overwrite any register 1.21 @@ -3795,29 +3795,6 @@ 1.22 __ get_thread(thread); 1.23 #endif 1.24 1.25 -/* 1.26 - * 1.27 - 0x000000555bd82aec: dadd a0, s6, zero ; __ move(A0, thread); 1.28 - 0x000000555bd82af0: daddi sp, sp, 0xfffffff0 ; __ addi(SP, SP, -additional_words * wordSize); 1.29 - 0x000000555bd82af4: sd sp, 0x1c8(s6) ; __ set_last_Java_frame(thread, NOREG, NOREG, NULL); 1.30 - 0x000000555bd82af8: lui at, 0x0 ; __ li64(AT, save_pc); 1.31 - 0x000000555bd82afc: ori at, at, 0x55 1.32 - 0x000000555bd82b00: dsll at, at, 16 1.33 - 0x000000555bd82b04: ori at, at, 0x5bd8 1.34 - 0x000000555bd82b08: dsll at, at, 16 1.35 - 0x000000555bd82b0c: ori at, at, 0x2b34 ; save_pc = pc() + NativeMovConstReg::instruction_size + NativeCall::return_address_offset + 4 1.36 - 0x000000555bd82b10: sd at, 0x1d0(s6) 1.37 - 0x000000555bd82b14: lui t9, 0x0 1.38 - 0x000000555bd82b18: ori t9, t9, 0x55 1.39 - 0x000000555bd82b1c: dsll t9, t9, 16 1.40 - 0x000000555bd82b20: ori t9, t9, 0x5aa6 1.41 - 0x000000555bd82b24: dsll t9, t9, 16 1.42 - 0x000000555bd82b28: ori t9, t9, 0x4074 1.43 - 0x000000555bd82b2c: jalr t9 1.44 - 0x000000555bd82b30: sll zero, zero, 0 1.45 - 1.46 - 0x000000555bd82b34: daddiu sp, sp, 0x10 ; save_pc 1.47 - */ 1.48 __ move(A0, thread); 1.49 __ addi(SP, SP, -additional_words * wordSize); 1.50 1.51 @@ -3828,7 +3805,7 @@ 1.52 1.53 __ relocate(relocInfo::internal_pc_type); 1.54 { 1.55 - intptr_t save_pc = (intptr_t)__ pc() + NativeMovConstReg::instruction_size + NativeCall::return_address_offset + 4; 1.56 + intptr_t save_pc = (intptr_t)__ pc() + NativeMovConstReg::instruction_size + 28; 1.57 __ patchable_set48(AT, save_pc); 1.58 } 1.59 __ sd(AT, thread, in_bytes(JavaThread::frame_anchor_offset() + JavaFrameAnchor::last_Java_pc_offset())); 1.60 @@ -3993,7 +3970,7 @@ 1.61 1.62 __ relocate(relocInfo::internal_pc_type); 1.63 { 1.64 - intptr_t save_pc = (intptr_t)__ pc() + NativeMovConstReg::instruction_size + NativeCall::return_address_offset + 4; 1.65 + intptr_t save_pc = (intptr_t)__ pc() + NativeMovConstReg::instruction_size + 28; 1.66 __ patchable_set48(AT, save_pc); 1.67 } 1.68 __ sd(AT, thread, in_bytes(JavaThread::frame_anchor_offset() + JavaFrameAnchor::last_Java_pc_offset())); 1.69 @@ -4091,9 +4068,8 @@ 1.70 // set last_Java_sp 1.71 __ set_last_Java_frame(NOREG, FP, NULL); 1.72 __ relocate(relocInfo::internal_pc_type); 1.73 - assert(NativeCall::return_address_offset == 24, "in sharedRuntime return_address_offset"); 1.74 { 1.75 - long save_pc = (long)__ pc() + 28 + NativeCall::return_address_offset; 1.76 + long save_pc = (long)__ pc() + 52; 1.77 __ patchable_set48(AT, (long)save_pc); 1.78 __ sd(AT, thread, in_bytes(JavaThread::frame_anchor_offset() + JavaFrameAnchor::last_Java_pc_offset())); 1.79 } 1.80 @@ -4103,7 +4079,7 @@ 1.81 __ move(A0, thread); 1.82 // argument already in T0 1.83 __ move(A1, T0); 1.84 - __ set64(T9, (long)Deoptimization::uncommon_trap); 1.85 + __ patchable_set48(T9, (long)Deoptimization::uncommon_trap); 1.86 __ jalr(T9); 1.87 __ delayed()->nop(); 1.88 1.89 @@ -4215,7 +4191,7 @@ 1.90 1.91 __ relocate(relocInfo::internal_pc_type); 1.92 { 1.93 - long save_pc = (long)__ pc() + 28 + NativeCall::return_address_offset; 1.94 + long save_pc = (long)__ pc() + 52; 1.95 __ patchable_set48(AT, (long)save_pc); 1.96 } 1.97 __ sd(AT, thread,in_bytes(JavaThread::frame_anchor_offset() + JavaFrameAnchor::last_Java_pc_offset())); 1.98 @@ -4225,7 +4201,7 @@ 1.99 // restore return values to their stack-slots with the new SP. 1.100 __ move(A0, thread); 1.101 __ move(A1, Deoptimization::Unpack_uncommon_trap); 1.102 - __ set64(T9, (long)Deoptimization::unpack_frames); 1.103 + __ patchable_set48(T9, (long)Deoptimization::unpack_frames); 1.104 __ jalr(T9); 1.105 __ delayed()->nop(); 1.106 // Set an oopmap for the call site 1.107 @@ -4406,7 +4382,7 @@ 1.108 __ andr(SP, SP, AT); 1.109 __ relocate(relocInfo::internal_pc_type); 1.110 { 1.111 - intptr_t save_pc = (intptr_t)__ pc() + NativeMovConstReg::instruction_size + NativeCall::return_address_offset + 1 * BytesPerInstWord; 1.112 + intptr_t save_pc = (intptr_t)__ pc() + NativeMovConstReg::instruction_size + 24 + 1 * BytesPerInstWord; 1.113 //tty->print_cr(" %s :%d, name:%s, pc: %lx, save_pc: %lx, frame_size_words: %lx", __func__, __LINE__, name, __ pc(), save_pc, frame_size_words); //aoqi_test 1.114 __ patchable_set48(AT, save_pc); 1.115 }