/* * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
// This file specializes the assembler with interpreter-specific macros
typedef ByteSize (*OffsetFunction)(uint);
class InterpreterMacroAssembler: public MacroAssembler { public: // Interpreter specific version of call_VM_base virtualvoid call_VM_leaf_base(address entry_point, int number_of_arguments);
// load cpool->resolved_klass_at(index) void load_resolved_klass_at_index(Register klass, // contains the Klass on return Register cpool, // the constant pool (corrupted on return) Register index); // the constant pool index (corrupted on return)
NOT_LP64(void f2ieee();) // truncate ftos to 32bits
NOT_LP64(void d2ieee();) // truncate dtos to 64bits
// Expression stack void pop_ptr(Register r = rax); void pop_i(Register r = rax);
// On x86, pushing a ptr or an int is semantically identical, but we // maintain a distinction for clarity and for making it easier to change // semantics in the future void push_ptr(Register r = rax); void push_i(Register r = rax);
// push_i_or_ptr is provided for when explicitly allowing either a ptr or // an int might have some advantage, while still documenting the fact that a // ptr might be pushed to the stack. void push_i_or_ptr(Register r = rax);
void push_f(XMMRegister r); void pop_f(XMMRegister r); void pop_d(XMMRegister r); void push_d(XMMRegister r); #ifdef _LP64 void pop_l(Register r = rax); void push_l(Register r = rax); #else void pop_l(Register lo = rax, Register hi = rdx); void pop_f(); void pop_d();
void push_l(Register lo = rax, Register hi = rdx); void push_d(); void push_f(); #endif// _LP64
// Helpers for swap and dup void load_ptr(int n, Register val); void store_ptr(int n, Register val);
// Generate a subtype check: branch to ok_is_subtype if sub_klass is // a subtype of super_klass. void gen_subtype_check( Register sub_klass, Label &ok_is_subtype );
// Dispatching void dispatch_prolog(TosState state, int step = 0); void dispatch_epilog(TosState state, int step = 0); // dispatch via rbx (assume rbx is loaded already) void dispatch_only(TosState state, bool generate_poll = false); // dispatch normal table via rbx (assume rbx is loaded already) void dispatch_only_normal(TosState state); void dispatch_only_noverify(TosState state); // load rbx from [_bcp_register + step] and dispatch via rbx void dispatch_next(TosState state, int step = 0, bool generate_poll = false); // load rbx from [_bcp_register] and dispatch via rbx and table void dispatch_via (TosState state, address* table);
// jump to an invoked target void prepare_to_jump_from_interpreted(); void jump_from_interpreted(Register method, Register temp);
// narrow int return value void narrow(Register result);
// Returning from interpreted functions // // Removes the current activation (incl. unlocking of monitors) // and sets up the return address. This code is also used for // exception unwindwing. In that case, we do not want to throw // IllegalMonitorStateExceptions, since that might get us into an // infinite rethrow exception loop. // Additionally this code is used for popFrame and earlyReturn. // In popFrame case we want to skip throwing an exception, // installing an exception, and notifying jvmdi. // In earlyReturn case we only want to skip throwing an exception // and installing an exception. void remove_activation(TosState state, Register ret_addr, bool throw_monitor_exception = true, bool install_monitor_exception = true, bool notify_jvmdi = true); void get_method_counters(Register method, Register mcs, Label& skip);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.