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