comparison src/cpu/sparc/vm/templateTable_sparc.cpp @ 18041:52b4284cb496

Merge with jdk8u20-b26
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 15 Oct 2014 16:02:50 +0200
parents 4ca6dc0799b6
children 922e104f179a
comparison
equal deleted inserted replaced
17606:45d7b2c7029d 18041:52b4284cb496
2940 } 2940 }
2941 } 2941 }
2942 2942
2943 2943
2944 void TemplateTable::generate_vtable_call(Register Rrecv, Register Rindex, Register Rret) { 2944 void TemplateTable::generate_vtable_call(Register Rrecv, Register Rindex, Register Rret) {
2945 Register Rtemp = G4_scratch;
2946 Register Rcall = Rindex; 2945 Register Rcall = Rindex;
2947 assert_different_registers(Rcall, G5_method, Gargs, Rret); 2946 assert_different_registers(Rcall, G5_method, Gargs, Rret);
2948 2947
2949 // get target Method* & entry point 2948 // get target Method* & entry point
2950 __ lookup_virtual_method(Rrecv, Rindex, G5_method); 2949 __ lookup_virtual_method(Rrecv, Rindex, G5_method);
2950 __ profile_arguments_type(G5_method, Rcall, Gargs, true);
2951 #ifdef GRAAL 2951 #ifdef GRAAL
2952 __ profile_called_method(G5_method, Rtemp); 2952 __ profile_called_method(G5_method, Rtemp);
2953 #endif 2953 #endif
2954 __ call_from_interpreter(Rcall, Gargs, Rret); 2954 __ call_from_interpreter(Rcall, Gargs, Rret);
2955 } 2955 }
3023 3023
3024 // receiver NULL check 3024 // receiver NULL check
3025 __ null_check(O0); 3025 __ null_check(O0);
3026 3026
3027 __ profile_final_call(O4); 3027 __ profile_final_call(O4);
3028 __ profile_arguments_type(G5_method, Rscratch, Gargs, true);
3028 3029
3029 // get return address 3030 // get return address
3030 AddressLiteral table(Interpreter::invoke_return_entry_table()); 3031 AddressLiteral table(Interpreter::invoke_return_entry_table());
3031 __ set(table, Rtemp); 3032 __ set(table, Rtemp);
3032 __ srl(Rret, ConstantPoolCacheEntry::tos_state_shift, Rret); // get return type 3033 __ srl(Rret, ConstantPoolCacheEntry::tos_state_shift, Rret); // get return type
3052 prepare_invoke(byte_no, G5_method, Rret, noreg, O0_recv); // get receiver also for null check 3053 prepare_invoke(byte_no, G5_method, Rret, noreg, O0_recv); // get receiver also for null check
3053 __ null_check(O0_recv); 3054 __ null_check(O0_recv);
3054 3055
3055 // do the call 3056 // do the call
3056 __ profile_call(O4); 3057 __ profile_call(O4);
3058 __ profile_arguments_type(G5_method, Rscratch, Gargs, false);
3057 __ call_from_interpreter(Rscratch, Gargs, Rret); 3059 __ call_from_interpreter(Rscratch, Gargs, Rret);
3058 } 3060 }
3059 3061
3060 3062
3061 void TemplateTable::invokestatic(int byte_no) { 3063 void TemplateTable::invokestatic(int byte_no) {
3067 3069
3068 prepare_invoke(byte_no, G5_method, Rret); // get f1 Method* 3070 prepare_invoke(byte_no, G5_method, Rret); // get f1 Method*
3069 3071
3070 // do the call 3072 // do the call
3071 __ profile_call(O4); 3073 __ profile_call(O4);
3074 __ profile_arguments_type(G5_method, Rscratch, Gargs, false);
3072 __ call_from_interpreter(Rscratch, Gargs, Rret); 3075 __ call_from_interpreter(Rscratch, Gargs, Rret);
3073 } 3076 }
3074 3077
3075 void TemplateTable::invokeinterface_object_method(Register RKlass, 3078 void TemplateTable::invokeinterface_object_method(Register RKlass,
3076 Register Rcall, 3079 Register Rcall,
3092 __ profile_final_call(O4); 3095 __ profile_final_call(O4);
3093 3096
3094 // do the call - the index (f2) contains the Method* 3097 // do the call - the index (f2) contains the Method*
3095 assert_different_registers(G5_method, Gargs, Rcall); 3098 assert_different_registers(G5_method, Gargs, Rcall);
3096 __ mov(Rindex, G5_method); 3099 __ mov(Rindex, G5_method);
3100 __ profile_arguments_type(G5_method, Rcall, Gargs, true);
3097 __ call_from_interpreter(Rcall, Gargs, Rret); 3101 __ call_from_interpreter(Rcall, Gargs, Rret);
3098 __ bind(notFinal); 3102 __ bind(notFinal);
3099 3103
3100 __ profile_virtual_call(RKlass, O4); 3104 __ profile_virtual_call(RKlass, O4);
3101 generate_vtable_call(RKlass, Rindex, Rret); 3105 generate_vtable_call(RKlass, Rindex, Rret);
3198 } 3202 }
3199 3203
3200 Register Rcall = Rinterface; 3204 Register Rcall = Rinterface;
3201 assert_different_registers(Rcall, G5_method, Gargs, Rret); 3205 assert_different_registers(Rcall, G5_method, Gargs, Rret);
3202 3206
3207 __ profile_arguments_type(G5_method, Rcall, Gargs, true);
3203 #ifdef GRAAL 3208 #ifdef GRAAL
3204 __ profile_called_method(G5_method, Rscratch); 3209 __ profile_called_method(G5_method, Rscratch);
3205 #endif 3210 #endif
3206
3207 __ call_from_interpreter(Rcall, Gargs, Rret); 3211 __ call_from_interpreter(Rcall, Gargs, Rret);
3208 } 3212 }
3209 3213
3210 void TemplateTable::invokehandle(int byte_no) { 3214 void TemplateTable::invokehandle(int byte_no) {
3211 transition(vtos, vtos); 3215 transition(vtos, vtos);
3231 // Note: G4_mtype is already pushed (if necessary) by prepare_invoke 3235 // Note: G4_mtype is already pushed (if necessary) by prepare_invoke
3232 3236
3233 // do the call 3237 // do the call
3234 __ verify_oop(G4_mtype); 3238 __ verify_oop(G4_mtype);
3235 __ profile_final_call(O4); // FIXME: profile the LambdaForm also 3239 __ profile_final_call(O4); // FIXME: profile the LambdaForm also
3240 __ profile_arguments_type(G5_method, Rscratch, Gargs, true);
3236 __ call_from_interpreter(Rscratch, Gargs, Rret); 3241 __ call_from_interpreter(Rscratch, Gargs, Rret);
3237 } 3242 }
3238 3243
3239 3244
3240 void TemplateTable::invokedynamic(int byte_no) { 3245 void TemplateTable::invokedynamic(int byte_no) {
3267 // profile this call 3272 // profile this call
3268 __ profile_call(O4); 3273 __ profile_call(O4);
3269 3274
3270 // do the call 3275 // do the call
3271 __ verify_oop(G4_callsite); 3276 __ verify_oop(G4_callsite);
3277 __ profile_arguments_type(G5_method, Rscratch, Gargs, false);
3272 __ call_from_interpreter(Rscratch, Gargs, Rret); 3278 __ call_from_interpreter(Rscratch, Gargs, Rret);
3273 } 3279 }
3274 3280
3275 3281
3276 //---------------------------------------------------------------------------------------------------- 3282 //----------------------------------------------------------------------------------------------------