33 // interpreter specific |
33 // interpreter specific |
34 // |
34 // |
35 // Note: No need to save/restore bcp & locals (r13 & r14) pointer |
35 // Note: No need to save/restore bcp & locals (r13 & r14) pointer |
36 // since these are callee saved registers and no blocking/ |
36 // since these are callee saved registers and no blocking/ |
37 // GC can happen in leaf calls. |
37 // GC can happen in leaf calls. |
|
38 // Further Note: DO NOT save/restore bcp/locals. If a caller has |
|
39 // already saved them so that it can use esi/edi as temporaries |
|
40 // then a save/restore here will DESTROY the copy the caller |
|
41 // saved! There used to be a save_bcp() that only happened in |
|
42 // the ASSERT path (no restore_bcp). Which caused bizarre failures |
|
43 // when jvm built with ASSERTs. |
38 #ifdef ASSERT |
44 #ifdef ASSERT |
39 save_bcp(); |
|
40 { |
45 { |
41 Label L; |
46 Label L; |
42 cmpq(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int)NULL_WORD); |
47 cmpq(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int)NULL_WORD); |
43 jcc(Assembler::equal, L); |
48 jcc(Assembler::equal, L); |
44 stop("InterpreterMacroAssembler::call_VM_leaf_base:" |
49 stop("InterpreterMacroAssembler::call_VM_leaf_base:" |
47 } |
52 } |
48 #endif |
53 #endif |
49 // super call |
54 // super call |
50 MacroAssembler::call_VM_leaf_base(entry_point, number_of_arguments); |
55 MacroAssembler::call_VM_leaf_base(entry_point, number_of_arguments); |
51 // interpreter specific |
56 // interpreter specific |
52 #ifdef ASSERT |
57 // Used to ASSERT that r13/r14 were equal to frame's bcp/locals |
53 { |
58 // but since they may not have been saved (and we don't want to |
54 Label L; |
59 // save thme here (see note above) the assert is invalid. |
55 cmpq(r13, Address(rbp, frame::interpreter_frame_bcx_offset * wordSize)); |
|
56 jcc(Assembler::equal, L); |
|
57 stop("InterpreterMacroAssembler::call_VM_leaf_base:" |
|
58 " r13 not callee saved?"); |
|
59 bind(L); |
|
60 } |
|
61 { |
|
62 Label L; |
|
63 cmpq(r14, Address(rbp, frame::interpreter_frame_locals_offset * wordSize)); |
|
64 jcc(Assembler::equal, L); |
|
65 stop("InterpreterMacroAssembler::call_VM_leaf_base:" |
|
66 " r14 not callee saved?"); |
|
67 bind(L); |
|
68 } |
|
69 #endif |
|
70 } |
60 } |
71 |
61 |
72 void InterpreterMacroAssembler::call_VM_base(Register oop_result, |
62 void InterpreterMacroAssembler::call_VM_base(Register oop_result, |
73 Register java_thread, |
63 Register java_thread, |
74 Register last_java_sp, |
64 Register last_java_sp, |