93 Register r = jni_arg.is_register() ? jni_arg.as_register() : R11_scratch1; 94 95 // The handle for a receiver will never be null. 96 bool do_NULL_check = offset() != 0 || is_static(); 97 98 Label do_null; 99 if (do_NULL_check) { 100 __ ld(R0, locals_j_arg_at(offset())); 101 __ cmpdi(CCR0, R0, 0); 102 __ li(r, 0); 103 __ beq(CCR0, do_null); 104 } 105 __ addir(r, locals_j_arg_at(offset())); 106 __ bind(do_null); 107 if (DEBUG_ONLY(true ||) !jni_arg.is_register()) { 108 __ std(r, sp_c_arg_at(jni_arg.number())); 109 } 110 } 111 112 void InterpreterRuntime::SignatureHandlerGenerator::generate(uint64_t fingerprint) { 113 #if !defined(ABI_ELFv2) 114 // Emit fd for current codebuffer. Needs patching! 115 __ emit_fd(); 116 #endif 117 118 // Generate code to handle arguments. 119 iterate(fingerprint); 120 121 // Return the result handler. 122 __ load_const(R3_RET, AbstractInterpreter::result_handler(method()->result_type())); 123 __ blr(); 124 125 __ flush(); 126 } 127 128 #undef __ 129 130 // Implementation of SignatureHandlerLibrary 131 132 void SignatureHandlerLibrary::pd_set_handler(address handler) { 133 #if !defined(ABI_ELFv2) 134 // patch fd here. 135 FunctionDescriptor* fd = (FunctionDescriptor*) handler; 136 | 93 Register r = jni_arg.is_register() ? jni_arg.as_register() : R11_scratch1; 94 95 // The handle for a receiver will never be null. 96 bool do_NULL_check = offset() != 0 || is_static(); 97 98 Label do_null; 99 if (do_NULL_check) { 100 __ ld(R0, locals_j_arg_at(offset())); 101 __ cmpdi(CCR0, R0, 0); 102 __ li(r, 0); 103 __ beq(CCR0, do_null); 104 } 105 __ addir(r, locals_j_arg_at(offset())); 106 __ bind(do_null); 107 if (DEBUG_ONLY(true ||) !jni_arg.is_register()) { 108 __ std(r, sp_c_arg_at(jni_arg.number())); 109 } 110 } 111 112 void InterpreterRuntime::SignatureHandlerGenerator::generate(uint64_t fingerprint) { 113 // Emit fd for current codebuffer. Needs patching! 114 __ emit_fd(); 115 116 // Generate code to handle arguments. 117 iterate(fingerprint); 118 119 // Return the result handler. 120 __ load_const(R3_RET, AbstractInterpreter::result_handler(method()->result_type())); 121 __ blr(); 122 123 __ flush(); 124 } 125 126 #undef __ 127 128 // Implementation of SignatureHandlerLibrary 129 130 void SignatureHandlerLibrary::pd_set_handler(address handler) { 131 #if !defined(ABI_ELFv2) 132 // patch fd here. 133 FunctionDescriptor* fd = (FunctionDescriptor*) handler; 134 |