hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp
changeset 35214 d86005e0b4c2
parent 30601 faffde6a6773
child 35479 62c12ca7a45e
--- a/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp	Tue Dec 22 11:03:37 2015 +0100
+++ b/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp	Tue Dec 22 11:11:29 2015 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -29,46 +29,48 @@
 // of the template interpreter generator.
 
 #ifdef CC_INTERP
-#ifdef TARGET_ARCH_zero
+#ifdef ZERO
 # include "entry_zero.hpp"
 # include "interpreter/interp_masm.hpp"
 #endif
 
 class CppInterpreterGenerator: public AbstractInterpreterGenerator {
-  protected:
-  // shared code sequences
-  // Converter for native abi result to tosca result
-  address generate_result_handler_for(BasicType type);
-  address generate_tosca_to_stack_converter(BasicType type);
-  address generate_stack_to_stack_converter(BasicType type);
-  address generate_stack_to_native_abi_converter(BasicType type);
+
+ private:
+  void generate_all();
 
-  void generate_all();
+  address generate_method_entry(AbstractInterpreter::MethodKind kind);
+  address generate_normal_entry(bool synchronized);
+  address generate_native_entry(bool synchronized);
+  address generate_abstract_entry();
+  address generate_math_entry(AbstractInterpreter::MethodKind kind);
+  address generate_empty_entry();
+  address generate_accessor_entry();
+  address generate_Reference_get_entry();
 
  public:
   CppInterpreterGenerator(StubQueue* _code);
 
-#ifdef TARGET_ARCH_x86
-# include "cppInterpreterGenerator_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "cppInterpreterGenerator_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "cppInterpreterGenerator_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "cppInterpreterGenerator_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "cppInterpreterGenerator_ppc.hpp"
-#endif
-#ifdef TARGET_ARCH_aarch64
-# include "cppInterpreterGenerator_aarch64.hpp"
-#endif
+#ifdef ZERO
+ protected:
+  MacroAssembler* assembler() const {
+    return _masm;
+  }
 
+ public:
+  static address generate_entry_impl(MacroAssembler* masm, address entry_point) {
+    ZeroEntry *entry = (ZeroEntry *) masm->pc();
+    masm->advance(sizeof(ZeroEntry));
+    entry->set_entry_point(entry_point);
+    return (address) entry;
+  }
+
+ protected:
+  address generate_entry(address entry_point) {
+    return generate_entry_impl(assembler(), entry_point);
+  }
+#endif // ZERO
 };
 
 #endif // CC_INTERP
-
 #endif // SHARE_VM_INTERPRETER_CPPINTERPRETERGENERATOR_HPP