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 #ifndef SHARE_VM_INTERPRETER_TEMPLATETABLE_HPP 26 #define SHARE_VM_INTERPRETER_TEMPLATETABLE_HPP 27 28 #include "interpreter/bytecodes.hpp" 29 #include "memory/allocation.hpp" 30 #include "runtime/frame.hpp" 31 #if defined INTERP_MASM_MD_HPP 32 # include INTERP_MASM_MD_HPP 33 #elif defined TARGET_ARCH_x86 34 # include "interp_masm_x86.hpp" 35 #elif defined TARGET_ARCH_MODEL_sparc 36 # include "interp_masm_sparc.hpp" 37 #elif defined TARGET_ARCH_MODEL_zero 38 # include "interp_masm_zero.hpp" 39 #elif defined TARGET_ARCH_MODEL_ppc_64 40 # include "interp_masm_ppc_64.hpp" 41 #endif 42 43 #ifndef CC_INTERP 44 // All the necessary definitions used for (bytecode) template generation. Instead of 45 // spreading the implementation functionality for each bytecode in the interpreter 46 // and the snippet generator, a template is assigned to each bytecode which can be 47 // used to generate the bytecode's implementation if needed. 48 49 50 // A Template describes the properties of a code template for a given bytecode 51 // and provides a generator to generate the code template. 52 53 class Template VALUE_OBJ_CLASS_SPEC { 54 private: 340 341 // InterpreterMacroAssembler::is_a(), etc., need TemplateTable::call_VM(). 342 friend class InterpreterMacroAssembler; 343 344 public: 345 // Initialization 346 static void initialize(); 347 static void pd_initialize(); 348 349 // Templates 350 static Template* template_for (Bytecodes::Code code) { Bytecodes::check (code); return &_template_table [code]; } 351 static Template* template_for_wide(Bytecodes::Code code) { Bytecodes::wide_check(code); return &_template_table_wide[code]; } 352 353 // Platform specifics 354 #if defined TEMPLATETABLE_MD_HPP 355 # include TEMPLATETABLE_MD_HPP 356 #elif defined TARGET_ARCH_MODEL_x86_32 357 # include "templateTable_x86_32.hpp" 358 #elif defined TARGET_ARCH_MODEL_x86_64 359 # include "templateTable_x86_64.hpp" 360 #elif defined TARGET_ARCH_MODEL_sparc 361 # include "templateTable_sparc.hpp" 362 #elif defined TARGET_ARCH_MODEL_zero 363 # include "templateTable_zero.hpp" 364 #elif defined TARGET_ARCH_MODEL_ppc_64 365 # include "templateTable_ppc_64.hpp" 366 #endif 367 368 }; 369 #endif /* !CC_INTERP */ 370 371 #endif // SHARE_VM_INTERPRETER_TEMPLATETABLE_HPP | 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 #ifndef SHARE_VM_INTERPRETER_TEMPLATETABLE_HPP 26 #define SHARE_VM_INTERPRETER_TEMPLATETABLE_HPP 27 28 #include "interpreter/bytecodes.hpp" 29 #include "memory/allocation.hpp" 30 #include "runtime/frame.hpp" 31 #if defined INTERP_MASM_MD_HPP 32 # include INTERP_MASM_MD_HPP 33 #elif defined TARGET_ARCH_x86 34 # include "interp_masm_x86.hpp" 35 #elif defined TARGET_ARCH_MODEL_aarch64 36 # include "interp_masm_aarch64.hpp" 37 #elif defined TARGET_ARCH_MODEL_sparc 38 # include "interp_masm_sparc.hpp" 39 #elif defined TARGET_ARCH_MODEL_zero 40 # include "interp_masm_zero.hpp" 41 #elif defined TARGET_ARCH_MODEL_ppc_64 42 # include "interp_masm_ppc_64.hpp" 43 #endif 44 45 #ifndef CC_INTERP 46 // All the necessary definitions used for (bytecode) template generation. Instead of 47 // spreading the implementation functionality for each bytecode in the interpreter 48 // and the snippet generator, a template is assigned to each bytecode which can be 49 // used to generate the bytecode's implementation if needed. 50 51 52 // A Template describes the properties of a code template for a given bytecode 53 // and provides a generator to generate the code template. 54 55 class Template VALUE_OBJ_CLASS_SPEC { 56 private: 342 343 // InterpreterMacroAssembler::is_a(), etc., need TemplateTable::call_VM(). 344 friend class InterpreterMacroAssembler; 345 346 public: 347 // Initialization 348 static void initialize(); 349 static void pd_initialize(); 350 351 // Templates 352 static Template* template_for (Bytecodes::Code code) { Bytecodes::check (code); return &_template_table [code]; } 353 static Template* template_for_wide(Bytecodes::Code code) { Bytecodes::wide_check(code); return &_template_table_wide[code]; } 354 355 // Platform specifics 356 #if defined TEMPLATETABLE_MD_HPP 357 # include TEMPLATETABLE_MD_HPP 358 #elif defined TARGET_ARCH_MODEL_x86_32 359 # include "templateTable_x86_32.hpp" 360 #elif defined TARGET_ARCH_MODEL_x86_64 361 # include "templateTable_x86_64.hpp" 362 #elif defined TARGET_ARCH_MODEL_aarch64 363 # include "templateTable_aarch64.hpp" 364 #elif defined TARGET_ARCH_MODEL_sparc 365 # include "templateTable_sparc.hpp" 366 #elif defined TARGET_ARCH_MODEL_zero 367 # include "templateTable_zero.hpp" 368 #elif defined TARGET_ARCH_MODEL_ppc_64 369 # include "templateTable_ppc_64.hpp" 370 #endif 371 372 }; 373 #endif /* !CC_INTERP */ 374 375 #endif // SHARE_VM_INTERPRETER_TEMPLATETABLE_HPP |