7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "asm/macroAssembler.inline.hpp" 27 #include "interpreter/interpreter.hpp" 28 #include "interpreter/interpreterRuntime.hpp" 29 #include "memory/allocation.inline.hpp" 30 #include "memory/universe.hpp" 31 #include "oops/method.hpp" 32 #include "oops/oop.inline.hpp" 33 #include "runtime/handles.inline.hpp" 34 #include "runtime/icache.hpp" 35 #include "runtime/interfaceSupport.inline.hpp" 36 #include "runtime/signature.hpp" 37 38 39 #define __ _masm-> 40 41 42 // Implementation of SignatureHandlerGenerator 43 44 void InterpreterRuntime::SignatureHandlerGenerator::pass_word(int size_of_arg, int offset_in_arg) { 45 Argument jni_arg(jni_offset() + offset_in_arg, false); 46 Register Rtmp = O0; 47 __ ld(Llocals, Interpreter::local_offset_in_bytes(offset()), Rtmp); 48 49 __ store_argument(Rtmp, jni_arg); 50 } 51 52 void InterpreterRuntime::SignatureHandlerGenerator::pass_long() { 53 Argument jni_arg(jni_offset(), false); 54 Register Rtmp = O0; 55 56 __ ldx(Llocals, Interpreter::local_offset_in_bytes(offset() + 1), Rtmp); 57 __ store_long_argument(Rtmp, jni_arg); 58 } 59 60 61 void InterpreterRuntime::SignatureHandlerGenerator::pass_float() { 62 Argument jni_arg(jni_offset(), false); | 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "asm/macroAssembler.inline.hpp" 27 #include "interpreter/interp_masm.hpp" 28 #include "interpreter/interpreter.hpp" 29 #include "interpreter/interpreterRuntime.hpp" 30 #include "memory/allocation.inline.hpp" 31 #include "memory/universe.hpp" 32 #include "oops/method.hpp" 33 #include "oops/oop.inline.hpp" 34 #include "runtime/handles.inline.hpp" 35 #include "runtime/icache.hpp" 36 #include "runtime/interfaceSupport.inline.hpp" 37 #include "runtime/signature.hpp" 38 39 40 #define __ _masm-> 41 42 43 // Implementation of SignatureHandlerGenerator 44 InterpreterRuntime::SignatureHandlerGenerator::SignatureHandlerGenerator( 45 const methodHandle& method, CodeBuffer* buffer) : NativeSignatureIterator(method) { 46 _masm = new MacroAssembler(buffer); 47 } 48 49 void InterpreterRuntime::SignatureHandlerGenerator::pass_word(int size_of_arg, int offset_in_arg) { 50 Argument jni_arg(jni_offset() + offset_in_arg, false); 51 Register Rtmp = O0; 52 __ ld(Llocals, Interpreter::local_offset_in_bytes(offset()), Rtmp); 53 54 __ store_argument(Rtmp, jni_arg); 55 } 56 57 void InterpreterRuntime::SignatureHandlerGenerator::pass_long() { 58 Argument jni_arg(jni_offset(), false); 59 Register Rtmp = O0; 60 61 __ ldx(Llocals, Interpreter::local_offset_in_bytes(offset() + 1), Rtmp); 62 __ store_long_argument(Rtmp, jni_arg); 63 } 64 65 66 void InterpreterRuntime::SignatureHandlerGenerator::pass_float() { 67 Argument jni_arg(jni_offset(), false); |