< prev index next >

src/hotspot/cpu/aarch64/frame_aarch64.cpp

Print this page




 577   Method* method = interpreter_frame_method();
 578   BasicType type = method->result_type();
 579 
 580   intptr_t* tos_addr;
 581   if (method->is_native()) {
 582     // TODO : ensure AARCH64 does the same as Intel here i.e. push v0 then r0
 583     // Prior to calling into the runtime to report the method_exit the possible
 584     // return value is pushed to the native stack. If the result is a jfloat/jdouble
 585     // then ST0 is saved before EAX/EDX. See the note in generate_native_result
 586     tos_addr = (intptr_t*)sp();
 587     if (type == T_FLOAT || type == T_DOUBLE) {
 588       // This is times two because we do a push(ltos) after pushing XMM0
 589       // and that takes two interpreter stack slots.
 590       tos_addr += 2 * Interpreter::stackElementWords;
 591     }
 592   } else {
 593     tos_addr = (intptr_t*)interpreter_frame_tos_address();
 594   }
 595 
 596   switch (type) {

 597     case T_OBJECT  :
 598     case T_ARRAY   : {
 599       oop obj;
 600       if (method->is_native()) {
 601         obj = cast_to_oop(at(interpreter_frame_oop_temp_offset));
 602       } else {
 603         oop* obj_p = (oop*)tos_addr;
 604         obj = (obj_p == NULL) ? (oop)NULL : *obj_p;
 605       }
 606       assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check");
 607       *oop_result = obj;
 608       break;
 609     }
 610     case T_BOOLEAN : value_result->z = *(jboolean*)tos_addr; break;
 611     case T_BYTE    : value_result->b = *(jbyte*)tos_addr; break;
 612     case T_CHAR    : value_result->c = *(jchar*)tos_addr; break;
 613     case T_SHORT   : value_result->s = *(jshort*)tos_addr; break;
 614     case T_INT     : value_result->i = *(jint*)tos_addr; break;
 615     case T_LONG    : value_result->j = *(jlong*)tos_addr; break;
 616     case T_FLOAT   : {




 577   Method* method = interpreter_frame_method();
 578   BasicType type = method->result_type();
 579 
 580   intptr_t* tos_addr;
 581   if (method->is_native()) {
 582     // TODO : ensure AARCH64 does the same as Intel here i.e. push v0 then r0
 583     // Prior to calling into the runtime to report the method_exit the possible
 584     // return value is pushed to the native stack. If the result is a jfloat/jdouble
 585     // then ST0 is saved before EAX/EDX. See the note in generate_native_result
 586     tos_addr = (intptr_t*)sp();
 587     if (type == T_FLOAT || type == T_DOUBLE) {
 588       // This is times two because we do a push(ltos) after pushing XMM0
 589       // and that takes two interpreter stack slots.
 590       tos_addr += 2 * Interpreter::stackElementWords;
 591     }
 592   } else {
 593     tos_addr = (intptr_t*)interpreter_frame_tos_address();
 594   }
 595 
 596   switch (type) {
 597     case T_VALUETYPE :
 598     case T_OBJECT  :
 599     case T_ARRAY   : {
 600       oop obj;
 601       if (method->is_native()) {
 602         obj = cast_to_oop(at(interpreter_frame_oop_temp_offset));
 603       } else {
 604         oop* obj_p = (oop*)tos_addr;
 605         obj = (obj_p == NULL) ? (oop)NULL : *obj_p;
 606       }
 607       assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check");
 608       *oop_result = obj;
 609       break;
 610     }
 611     case T_BOOLEAN : value_result->z = *(jboolean*)tos_addr; break;
 612     case T_BYTE    : value_result->b = *(jbyte*)tos_addr; break;
 613     case T_CHAR    : value_result->c = *(jchar*)tos_addr; break;
 614     case T_SHORT   : value_result->s = *(jshort*)tos_addr; break;
 615     case T_INT     : value_result->i = *(jint*)tos_addr; break;
 616     case T_LONG    : value_result->j = *(jlong*)tos_addr; break;
 617     case T_FLOAT   : {


< prev index next >