Merge
authoramurillo
Thu, 24 Jul 2014 13:18:15 -0700
changeset 25744 4d54044eecb5
parent 25648 dcda1ef77e37 (current diff)
parent 25743 070874cf832a (diff)
child 25745 3a55fad9854a
child 25890 4d36851e4d29
child 25891 103846690fc2
child 25912 54911b14d5ee
child 25914 ad0233fa8767
Merge
hotspot/test/compiler/5091921/Test6890943.sh
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java	Thu Jul 24 13:18:15 2014 -0700
@@ -55,7 +55,10 @@
     layoutHelper = new IntField(type.getJIntField("_layout_helper"), 0);
     name         = type.getAddressField("_name");
     accessFlags  = new CIntField(type.getCIntegerField("_access_flags"), 0);
-    traceIDField  = type.getField("_trace_id");
+    try {
+      traceIDField  = type.getField("_trace_id");
+    } catch(Exception e) {
+    }
     subklass     = new MetadataField(type.getAddressField("_subklass"), 0);
     nextSibling  = new MetadataField(type.getAddressField("_next_sibling"), 0);
 
@@ -108,7 +111,11 @@
   public AccessFlags getAccessFlagsObj(){ return new AccessFlags(getAccessFlags());      }
   public Klass    getSubklassKlass()    { return (Klass)    subklass.getValue(this);     }
   public Klass    getNextSiblingKlass() { return (Klass)    nextSibling.getValue(this);  }
-  public long     traceID() { return traceIDField.getJLong(addr);  }
+
+  public long traceID() {
+    if (traceIDField == null) return 0;
+    return traceIDField.getJLong(addr);
+  }
 
   // computed access flags - takes care of inner classes etc.
   // This is closer to actual source level than getAccessFlags() etc.
--- a/hotspot/make/jprt.properties	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/make/jprt.properties	Thu Jul 24 13:18:15 2014 -0700
@@ -126,7 +126,7 @@
     ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jvm98, \
     ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jvm98_nontiered, \
     ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-scimark, \
-    ${jprt.my.solaris.sparcv9}-product-c2-runThese, \
+    ${jprt.my.solaris.sparcv9}-product-c2-runThese8, \
     ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_SerialGC, \
     ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
     ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
@@ -150,8 +150,9 @@
     ${jprt.my.solaris.x64}-{product|fastdebug}-c2-jvm98, \
     ${jprt.my.solaris.x64}-{product|fastdebug}-c2-jvm98_nontiered, \
     ${jprt.my.solaris.x64}-{product|fastdebug}-c2-scimark, \
-    ${jprt.my.solaris.x64}-product-c2-runThese, \
-    ${jprt.my.solaris.x64}-product-c2-runThese_Xcomp, \
+    ${jprt.my.solaris.x64}-product-c2-runThese8, \
+    ${jprt.my.solaris.x64}-product-c2-runThese8_Xcomp_lang, \
+    ${jprt.my.solaris.x64}-product-c2-runThese8_Xcomp_vm, \
     ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_SerialGC, \
     ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
     ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
@@ -175,9 +176,11 @@
     ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
     ${jprt.my.linux.i586}-{product|fastdebug}-c2-jvm98_nontiered, \
     ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
-    ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
-    ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
-    ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
+    ${jprt.my.linux.i586}-product-c1-runThese8_Xcomp_lang, \
+    ${jprt.my.linux.i586}-product-c1-runThese8_Xcomp_vm, \
+    ${jprt.my.linux.i586}-fastdebug-c1-runThese8_Xshare, \
+    ${jprt.my.linux.i586}-fastdebug-c2-runThese8_Xcomp_lang, \
+    ${jprt.my.linux.i586}-fastdebug-c2-runThese8_Xcomp_vm, \
     ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
     ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
     ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
@@ -243,9 +246,10 @@
     ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
     ${jprt.my.windows.i586}-{product|fastdebug}-c2-jvm98_nontiered, \
     ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-scimark, \
-    ${jprt.my.windows.i586}-product-{c1|c2}-runThese, \
-    ${jprt.my.windows.i586}-product-{c1|c2}-runThese_Xcomp, \
-    ${jprt.my.windows.i586}-fastdebug-c1-runThese_Xshare, \
+    ${jprt.my.windows.i586}-product-{c1|c2}-runThese8, \
+    ${jprt.my.windows.i586}-product-{c1|c2}-runThese8_Xcomp_lang, \
+    ${jprt.my.windows.i586}-product-{c1|c2}-runThese8_Xcomp_vm, \
+    ${jprt.my.windows.i586}-fastdebug-c1-runThese8_Xshare, \
     ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
     ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
     ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
@@ -269,8 +273,9 @@
     ${jprt.my.windows.x64}-{product|fastdebug}-c2-jvm98, \
     ${jprt.my.windows.x64}-{product|fastdebug}-c2-jvm98_nontiered, \
     ${jprt.my.windows.x64}-{product|fastdebug}-c2-scimark, \
-    ${jprt.my.windows.x64}-product-c2-runThese, \
-    ${jprt.my.windows.x64}-product-c2-runThese_Xcomp, \
+    ${jprt.my.windows.x64}-product-c2-runThese8, \
+    ${jprt.my.windows.x64}-product-c2-runThese8_Xcomp_lang, \
+    ${jprt.my.windows.x64}-product-c2-runThese8_Xcomp_vm, \
     ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_SerialGC, \
     ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
     ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
--- a/hotspot/src/cpu/ppc/vm/frame_ppc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/frame_ppc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -36,7 +36,6 @@
 #include "runtime/signature.hpp"
 #include "runtime/stubCodeGenerator.hpp"
 #include "runtime/stubRoutines.hpp"
-#include "vmreg_ppc.inline.hpp"
 #ifdef COMPILER1
 #include "c1/c1_Runtime1.hpp"
 #include "runtime/vframeArray.hpp"
@@ -155,15 +154,6 @@
   }
 }
 
-void frame::pd_gc_epilog() {
-  if (is_interpreted_frame()) {
-    // Set constant pool cache entry for interpreter.
-    Method* m = interpreter_frame_method();
-
-    *interpreter_frame_cpoolcache_addr() = m->constants()->cache();
-  }
-}
-
 bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
   // Is there anything to do?
   assert(is_interpreted_frame(), "Not an interpreted frame");
--- a/hotspot/src/cpu/ppc/vm/frame_ppc.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/frame_ppc.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012, 2014 SAP AG. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,6 +27,7 @@
 #define CPU_PPC_VM_FRAME_PPC_INLINE_HPP
 
 #include "code/codeCache.hpp"
+#include "code/vmreg.inline.hpp"
 
 // Inline functions for ppc64 frames:
 
@@ -134,12 +135,12 @@
   return (intptr_t**)&istate->_locals;
 }
 
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
   interpreterState istate = get_interpreterState();
   return (intptr_t*)&istate->_bcp;
 }
 
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
   interpreterState istate = get_interpreterState();
   return (intptr_t*)&istate->_mdx;
 }
@@ -209,10 +210,10 @@
 inline intptr_t** frame::interpreter_frame_locals_addr() const {
   return (intptr_t**) &(get_ijava_state()->locals);
 }
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
   return (intptr_t*) &(get_ijava_state()->bcp);
 }
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
   return (intptr_t*) &(get_ijava_state()->mdx);
 }
 // Pointer beyond the "oldest/deepest" BasicObjectLock on stack.
--- a/hotspot/src/cpu/ppc/vm/icache_ppc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/icache_ppc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -68,7 +68,6 @@
 }
 
 void ICacheStubGenerator::generate_icache_flush(ICache::flush_icache_stub_t* flush_icache_stub) {
-  StubCodeMark mark(this, "ICache", "flush_icache_stub");
 
   *flush_icache_stub = (ICache::flush_icache_stub_t)ICache::ppc64_flush_icache;
 
--- a/hotspot/src/cpu/ppc/vm/interpreterRT_ppc.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/interpreterRT_ppc.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2012, 2014 SAP AG. 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
@@ -26,6 +26,7 @@
 #ifndef CPU_PPC_VM_INTERPRETERRT_PPC_HPP
 #define CPU_PPC_VM_INTERPRETERRT_PPC_HPP
 
+#include "asm/macroAssembler.hpp"
 #include "memory/allocation.hpp"
 
 // native method calls
--- a/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -30,6 +30,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -32,6 +32,7 @@
 #include "memory/resourceArea.hpp"
 #include "prims/methodHandles.hpp"
 #include "runtime/biasedLocking.hpp"
+#include "runtime/icache.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/objectMonitor.hpp"
 #include "runtime/os.hpp"
--- a/hotspot/src/cpu/ppc/vm/ppc.ad	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/ppc.ad	Thu Jul 24 13:18:15 2014 -0700
@@ -267,7 +267,7 @@
 // It's worth about 1% on SPEC geomean to get this right.
 
 // Chunk0, chunk1, and chunk2 form the MachRegisterNumbers enumeration
-// in adGlobals_ppc64.hpp which defines the <register>_num values, e.g.
+// in adGlobals_ppc.hpp which defines the <register>_num values, e.g.
 // R3_num. Therefore, R3_num may not be (and in reality is not)
 // the same as R3->encoding()! Furthermore, we cannot make any
 // assumptions on ordering, e.g. R3_num may be less than R2_num.
@@ -1632,7 +1632,7 @@
 static enum RC rc_class(OptoReg::Name reg) {
   // Return the register class for the given register. The given register
   // reg is a <register>_num value, which is an index into the MachRegisterNumbers
-  // enumeration in adGlobals_ppc64.hpp.
+  // enumeration in adGlobals_ppc.hpp.
 
   if (reg == OptoReg::Bad) return rc_bad;
 
--- a/hotspot/src/cpu/ppc/vm/register_ppc.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/register_ppc.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012, 2014 SAP AG. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,7 +27,6 @@
 #define CPU_PPC_VM_REGISTER_PPC_HPP
 
 #include "asm/register.hpp"
-#include "vm_version_ppc.hpp"
 
 // forward declaration
 class Address;
@@ -92,8 +91,8 @@
   inline friend Register as_Register(int encoding);
 
   // accessors
-  int      encoding()  const { assert(is_valid(), "invalid register"); return value(); }
-  VMReg    as_VMReg();
+  int encoding()  const { assert(is_valid(), "invalid register"); return value(); }
+  inline VMReg as_VMReg();
   Register successor() const { return as_Register(encoding() + 1); }
 
   // testers
@@ -208,8 +207,8 @@
   inline friend ConditionRegister as_ConditionRegister(int encoding);
 
   // accessors
-  int   encoding() const { assert(is_valid(), "invalid register"); return value(); }
-  VMReg as_VMReg();
+  int encoding() const { assert(is_valid(), "invalid register"); return value(); }
+  inline VMReg as_VMReg();
 
   // testers
   bool is_valid()       const { return  (0 <= value()        &&  value() < number_of_registers); }
@@ -264,7 +263,7 @@
 
   // accessors
   int           encoding() const { assert(is_valid(), "invalid register"); return value(); }
-  VMReg         as_VMReg();
+  inline VMReg  as_VMReg();
   FloatRegister successor() const { return as_FloatRegister(encoding() + 1); }
 
   // testers
@@ -365,7 +364,7 @@
 
   // accessors
   int             encoding()  const { assert(is_valid(), "invalid register"); return value(); }
-  VMReg           as_VMReg();
+  inline VMReg    as_VMReg();
 
   // testers
   bool is_valid()       const { return 0 <= value() && value() < number_of_registers; }
--- a/hotspot/src/cpu/ppc/vm/runtime_ppc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/runtime_ppc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2012, 2014 SAP AG. 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
@@ -30,6 +30,7 @@
 #include "classfile/systemDictionary.hpp"
 #include "code/vmreg.hpp"
 #include "interpreter/interpreter.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "nativeInst_ppc.hpp"
 #include "opto/runtime.hpp"
 #include "runtime/interfaceSupport.hpp"
@@ -37,7 +38,6 @@
 #include "runtime/stubRoutines.hpp"
 #include "runtime/vframeArray.hpp"
 #include "utilities/globalDefinitions.hpp"
-#include "vmreg_ppc.inline.hpp"
 #endif
 
 #define __ masm->
--- a/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012, 2014 SAP AG. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,16 +29,17 @@
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "oops/compiledICHolder.hpp"
 #include "prims/jvmtiRedefineClassesTrace.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/vframeArray.hpp"
 #include "vmreg_ppc.inline.hpp"
-#include "adfiles/ad_ppc_64.hpp"
 #ifdef COMPILER1
 #include "c1/c1_Runtime1.hpp"
 #endif
 #ifdef COMPILER2
+#include "adfiles/ad_ppc_64.hpp"
 #include "opto/runtime.hpp"
 #endif
 
--- a/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012, 2014 SAP AG. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -401,11 +401,11 @@
     __ load_const(exception_file, (void*)__FILE__);
     __ load_const(exception_line, (void*)__LINE__);
 
-    __ std(R3_ARG1, thread_(pending_exception));
+    __ std(R3_ARG1, in_bytes(JavaThread::pending_exception_offset()), R16_thread);
     // store into `char *'
-    __ std(exception_file, thread_(exception_file));
+    __ std(exception_file, in_bytes(JavaThread::exception_file_offset()), R16_thread);
     // store into `int'
-    __ stw(exception_line, thread_(exception_line));
+    __ stw(exception_line, in_bytes(JavaThread::exception_line_offset()), R16_thread);
 
     // complete return to VM
     assert(StubRoutines::_call_stub_return_address != NULL, "must have been generated before");
@@ -524,8 +524,6 @@
     int frame_size_in_bytes = frame::abi_reg_args_size;
     OopMap* map = new OopMap(frame_size_in_bytes / sizeof(jint), 0);
 
-    StubCodeMark mark(this, "StubRoutines", "throw_exception");
-
     address start = __ pc();
 
     __ save_LR_CR(R11_scratch1);
@@ -846,8 +844,6 @@
   //
   // Don't generate, rather use C++ code.
   address generate_verify_oop() {
-    StubCodeMark mark(this, "StubRoutines", "verify_oop");
-
     // this is actually a `FunctionDescriptor*'.
     address start = 0;
 
--- a/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -30,6 +30,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -27,6 +27,7 @@
 #include "asm/macroAssembler.inline.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateInterpreter.hpp"
 #include "interpreter/templateTable.hpp"
 #include "memory/universe.inline.hpp"
--- a/hotspot/src/cpu/ppc/vm/vmreg_ppc.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/vmreg_ppc.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -26,10 +26,28 @@
 #ifndef CPU_PPC_VM_VMREG_PPC_HPP
 #define CPU_PPC_VM_VMREG_PPC_HPP
 
-  bool is_Register();
-  Register as_Register();
+inline bool is_Register() {
+  return (unsigned int)value() < (unsigned int)ConcreteRegisterImpl::max_gpr;
+}
+
+inline bool is_FloatRegister() {
+  return value() >= ConcreteRegisterImpl::max_gpr &&
+         value() < ConcreteRegisterImpl::max_fpr;
+}
 
-  bool is_FloatRegister();
-  FloatRegister as_FloatRegister();
+inline Register as_Register() {
+  assert(is_Register() && is_even(value()), "even-aligned GPR name");
+  return ::as_Register(value()>>1);
+}
+
+inline FloatRegister as_FloatRegister() {
+  assert(is_FloatRegister() && is_even(value()), "must be");
+  return ::as_FloatRegister((value() - ConcreteRegisterImpl::max_gpr) >> 1);
+}
+
+inline bool is_concrete() {
+  assert(is_reg(), "must be");
+  return is_even(value());
+}
 
 #endif // CPU_PPC_VM_VMREG_PPC_HPP
--- a/hotspot/src/cpu/ppc/vm/vmreg_ppc.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/ppc/vm/vmreg_ppc.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -44,28 +44,5 @@
   return VMRegImpl::as_VMReg((encoding()) + ConcreteRegisterImpl::max_cnd);
 }
 
-inline bool VMRegImpl::is_Register() {
-  return (unsigned int)value() < (unsigned int)ConcreteRegisterImpl::max_gpr;
-}
-
-inline bool VMRegImpl::is_FloatRegister() {
-  return value() >= ConcreteRegisterImpl::max_gpr &&
-         value() < ConcreteRegisterImpl::max_fpr;
-}
-
-inline Register VMRegImpl::as_Register() {
-  assert(is_Register() && is_even(value()), "even-aligned GPR name");
-  return ::as_Register(value()>>1);
-}
-
-inline FloatRegister VMRegImpl::as_FloatRegister() {
-  assert(is_FloatRegister() && is_even(value()), "must be");
-  return ::as_FloatRegister((value() - ConcreteRegisterImpl::max_gpr) >> 1);
-}
-
-inline bool VMRegImpl::is_concrete() {
-  assert(is_reg(), "must be");
-  return is_even(value());
-}
 
 #endif // CPU_PPC_VM_VMREG_PPC_INLINE_HPP
--- a/hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -31,7 +31,6 @@
 #include "oops/compiledICHolder.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jvmtiExport.hpp"
-#include "register_sparc.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/signature.hpp"
 #include "runtime/vframeArray.hpp"
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "code/codeCache.hpp"
 #include "interpreter/interpreter.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/markOop.hpp"
@@ -593,17 +594,6 @@
   return this->fp() == fp;
 }
 
-
-void frame::pd_gc_epilog() {
-  if (is_interpreted_frame()) {
-    // set constant pool cache entry for interpreter
-    Method* m = interpreter_frame_method();
-
-    *interpreter_frame_cpoolcache_addr() = m->constants()->cache();
-  }
-}
-
-
 bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
 #ifdef CC_INTERP
   // Is there anything to do?
@@ -641,10 +631,10 @@
     return false;
   }
 
-  // validate bci/bcx
+  // validate bci/bcp
 
-  intptr_t  bcx    = interpreter_frame_bcx();
-  if (m->validate_bci_from_bcx(bcx) < 0) {
+  address bcp = interpreter_frame_bcp();
+  if (m->validate_bci_from_bcp(bcp) < 0) {
     return false;
   }
 
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -78,7 +78,6 @@
 //    Lesp         first free element of expression stack
 //                 (which grows towards __higher__ addresses)
 //    Lbcp         is set to address of bytecode to execute
-//                 It is accessed in the frame under the name "bcx".
 //                 It may at times (during GC) be an index instead.
 //    Lmethod      the method being interpreted
 //    Llocals      the base pointer for accessing the locals array
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -26,6 +26,7 @@
 #define CPU_SPARC_VM_FRAME_SPARC_INLINE_HPP
 
 #include "asm/macroAssembler.hpp"
+#include "code/vmreg.inline.hpp"
 
 // Inline functions for SPARC frames:
 
@@ -98,12 +99,12 @@
   return (intptr_t**) &istate->_locals;
 }
 
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
   interpreterState istate = get_interpreterState();
   return (intptr_t*) &istate->_bcp;
 }
 
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
   interpreterState istate = get_interpreterState();
   return (intptr_t*) &istate->_mdx;
 }
@@ -165,12 +166,11 @@
   return (intptr_t**) sp_addr_at( Llocals->sp_offset_in_saved_window());
 }
 
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
-  // %%%%% reinterpreting Lbcp as a bcx
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
   return (intptr_t*) sp_addr_at( Lbcp->sp_offset_in_saved_window());
 }
 
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
   // %%%%% reinterpreting ImethodDataPtr as a mdx
   return (intptr_t*) sp_addr_at( ImethodDataPtr->sp_offset_in_saved_window());
 }
--- a/hotspot/src/cpu/sparc/vm/interpreterRT_sparc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/interpreterRT_sparc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "asm/macroAssembler.inline.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/allocation.inline.hpp"
--- a/hotspot/src/cpu/sparc/vm/interpreter_sparc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/interpreter_sparc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -28,6 +28,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "asm/assembler.inline.hpp"
+#include "asm/macroAssembler.inline.hpp"
 #include "compiler/disassembler.hpp"
 #include "gc_interface/collectedHeap.inline.hpp"
 #include "interpreter/interpreter.hpp"
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -186,8 +186,7 @@
 //       the interpreter to work right
 // (These assignments must be compatible with L7_thread_cache; see above.)
 
-// Since Lbcp points into the middle of the method object,
-// it is temporarily converted into a "bcx" during GC.
+// Lbcp points into the middle of the method object.
 
 // Exception processing
 // These registers are passed into exception handlers.
--- a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, 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
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "asm/macroAssembler.hpp"
 #include "interpreter/interpreter.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "memory/allocation.inline.hpp"
 #include "prims/methodHandles.hpp"
 
--- a/hotspot/src/cpu/sparc/vm/register_sparc.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/register_sparc.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -26,7 +26,6 @@
 #define CPU_SPARC_VM_REGISTER_SPARC_HPP
 
 #include "asm/register.hpp"
-#include "vm_version_sparc.hpp"
 
 // forward declaration
 class Address;
@@ -65,7 +64,7 @@
   friend Register as_oRegister(int number);
   friend Register as_gRegister(int number);
 
-  VMReg as_VMReg();
+  inline VMReg as_VMReg();
 
   // accessors
   int   encoding() const                              { assert(is_valid(), "invalid register"); return value(); }
@@ -234,7 +233,7 @@
   };
 
   // construction
-  VMReg as_VMReg( );
+  inline VMReg as_VMReg( );
 
   // accessors
   int encoding() const                                { assert(is_valid(), "invalid register"); return value(); }
--- a/hotspot/src/cpu/sparc/vm/sparc.ad	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/sparc.ad	Thu Jul 24 13:18:15 2014 -0700
@@ -9728,7 +9728,7 @@
 
   size(4);
   ins_cost(BRANCH_COST);
-  format %{ "CWB$cmp  $op1,op2,$labl\t! compressed ptr" %}
+  format %{ "CWB$cmp  $op1,$op2,$labl\t! compressed ptr" %}
   ins_encode %{
     Label* L = $labl$$label;
     assert(__ use_cbcond(*L), "back to back cbcond");
--- a/hotspot/src/cpu/sparc/vm/templateInterpreter_sparc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/templateInterpreter_sparc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -28,6 +28,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
@@ -1785,7 +1786,7 @@
   __ verify_thread();
   // expression stack is undefined here
   // O0: exception, i.e. Oexception
-  // Lbcp: exception bcx
+  // Lbcp: exception bcp
   __ verify_oop(Oexception);
 
 
--- a/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/sparc/vm/vmreg_sparc.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/vmreg_sparc.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -25,10 +25,35 @@
 #ifndef CPU_SPARC_VM_VMREG_SPARC_HPP
 #define CPU_SPARC_VM_VMREG_SPARC_HPP
 
-  bool is_Register();
-  Register as_Register();
+inline bool is_Register() { return value() >= 0 && value() < ConcreteRegisterImpl::max_gpr; }
+inline bool is_FloatRegister() { return value() >= ConcreteRegisterImpl::max_gpr &&
+                                                   value() < ConcreteRegisterImpl::max_fpr; }
+inline Register as_Register() {
+
+  assert( is_Register() && is_even(value()), "even-aligned GPR name" );
+  // Yuk
+  return ::as_Register(value()>>1);
+}
 
-  bool is_FloatRegister();
-  FloatRegister as_FloatRegister();
+inline FloatRegister as_FloatRegister() {
+  assert( is_FloatRegister(), "must be" );
+  // Yuk
+  return ::as_FloatRegister( value() - ConcreteRegisterImpl::max_gpr );
+}
+
+inline   bool is_concrete() {
+  assert(is_reg(), "must be");
+  int v = value();
+  if ( v  <  ConcreteRegisterImpl::max_gpr ) {
+    return is_even(v);
+  }
+  // F0..F31
+  if ( v <= ConcreteRegisterImpl::max_gpr + 31) return true;
+  if ( v <  ConcreteRegisterImpl::max_fpr) {
+    return is_even(v);
+  }
+  assert(false, "what register?");
+  return false;
+}
 
 #endif // CPU_SPARC_VM_VMREG_SPARC_HPP
--- a/hotspot/src/cpu/sparc/vm/vmreg_sparc.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/sparc/vm/vmreg_sparc.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -33,35 +33,5 @@
 inline VMReg FloatRegisterImpl::as_VMReg() { return VMRegImpl::as_VMReg( ConcreteRegisterImpl::max_gpr + encoding() ); }
 
 
-inline bool VMRegImpl::is_Register() { return value() >= 0 && value() < ConcreteRegisterImpl::max_gpr; }
-inline bool VMRegImpl::is_FloatRegister() { return value() >= ConcreteRegisterImpl::max_gpr &&
-                                                   value() < ConcreteRegisterImpl::max_fpr; }
-inline Register VMRegImpl::as_Register() {
-
-  assert( is_Register() && is_even(value()), "even-aligned GPR name" );
-  // Yuk
-  return ::as_Register(value()>>1);
-}
-
-inline FloatRegister VMRegImpl::as_FloatRegister() {
-  assert( is_FloatRegister(), "must be" );
-  // Yuk
-  return ::as_FloatRegister( value() - ConcreteRegisterImpl::max_gpr );
-}
-
-inline   bool VMRegImpl::is_concrete() {
-  assert(is_reg(), "must be");
-  int v = value();
-  if ( v  <  ConcreteRegisterImpl::max_gpr ) {
-    return is_even(v);
-  }
-  // F0..F31
-  if ( v <= ConcreteRegisterImpl::max_gpr + 31) return true;
-  if ( v <  ConcreteRegisterImpl::max_fpr) {
-    return is_even(v);
-  }
-  assert(false, "what register?");
-  return false;
-}
 
 #endif // CPU_SPARC_VM_VMREG_SPARC_INLINE_HPP
--- a/hotspot/src/cpu/x86/vm/frame_x86.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/frame_x86.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -537,10 +537,6 @@
   return _fp == (fp - diff);
 }
 
-void frame::pd_gc_epilog() {
-  // nothing done here now
-}
-
 bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
 // QQQ
 #ifdef CC_INTERP
@@ -577,10 +573,10 @@
     return false;
   }
 
-  // validate bci/bcx
+  // validate bci/bcp
 
-  intptr_t  bcx    = interpreter_frame_bcx();
-  if (m->validate_bci_from_bcx(bcx) < 0) {
+  address bcp = interpreter_frame_bcp();
+  if (m->validate_bci_from_bcp(bcp) < 0) {
     return false;
   }
 
@@ -692,10 +688,10 @@
     DESCRIBE_FP_OFFSET(interpreter_frame_sender_sp);
     DESCRIBE_FP_OFFSET(interpreter_frame_last_sp);
     DESCRIBE_FP_OFFSET(interpreter_frame_method);
-    DESCRIBE_FP_OFFSET(interpreter_frame_mdx);
+    DESCRIBE_FP_OFFSET(interpreter_frame_mdp);
     DESCRIBE_FP_OFFSET(interpreter_frame_cache);
     DESCRIBE_FP_OFFSET(interpreter_frame_locals);
-    DESCRIBE_FP_OFFSET(interpreter_frame_bcx);
+    DESCRIBE_FP_OFFSET(interpreter_frame_bcp);
     DESCRIBE_FP_OFFSET(interpreter_frame_initial_sp);
 #endif
   }
--- a/hotspot/src/cpu/x86/vm/frame_x86.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/frame_x86.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -40,7 +40,7 @@
 //     ...                        | monitor block size
 //    [monitors              ]   /
 //    [monitor block size    ]
-//    [byte code index/pointr]                   = bcx()                bcx_offset
+//    [byte code pointer     ]                   = bcp()                bcp_offset
 //    [pointer to locals     ]                   = locals()             locals_offset
 //    [constant pool cache   ]                   = cache()              cache_offset
 //    [methodData            ]                   = mdp()                mdx_offset
@@ -111,11 +111,11 @@
     // outgoing sp before a call to an invoked method
     interpreter_frame_last_sp_offset                 = interpreter_frame_sender_sp_offset - 1,
     interpreter_frame_method_offset                  = interpreter_frame_last_sp_offset - 1,
-    interpreter_frame_mdx_offset                     = interpreter_frame_method_offset - 1,
-    interpreter_frame_cache_offset                   = interpreter_frame_mdx_offset - 1,
+    interpreter_frame_mdp_offset                     = interpreter_frame_method_offset - 1,
+    interpreter_frame_cache_offset                   = interpreter_frame_mdp_offset - 1,
     interpreter_frame_locals_offset                  = interpreter_frame_cache_offset - 1,
-    interpreter_frame_bcx_offset                     = interpreter_frame_locals_offset - 1,
-    interpreter_frame_initial_sp_offset              = interpreter_frame_bcx_offset - 1,
+    interpreter_frame_bcp_offset                     = interpreter_frame_locals_offset - 1,
+    interpreter_frame_initial_sp_offset              = interpreter_frame_bcp_offset - 1,
 
     interpreter_frame_monitor_block_top_offset       = interpreter_frame_initial_sp_offset,
     interpreter_frame_monitor_block_bottom_offset    = interpreter_frame_initial_sp_offset,
--- a/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -26,6 +26,7 @@
 #define CPU_X86_VM_FRAME_X86_INLINE_HPP
 
 #include "code/codeCache.hpp"
+#include "code/vmreg.inline.hpp"
 
 // Inline functions for Intel frames:
 
@@ -168,7 +169,7 @@
   return &(get_interpreterState()->_locals);
 }
 
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
   assert(is_interpreted_frame(), "must be interpreted");
   return (intptr_t*) &(get_interpreterState()->_bcp);
 }
@@ -188,7 +189,7 @@
   return &(get_interpreterState()->_method);
 }
 
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
   assert(is_interpreted_frame(), "must be interpreted");
   return (intptr_t*) &(get_interpreterState()->_mdx);
 }
@@ -210,13 +211,13 @@
   return *(intptr_t**)addr_at(interpreter_frame_last_sp_offset);
 }
 
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
-  return (intptr_t*)addr_at(interpreter_frame_bcx_offset);
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
+  return (intptr_t*)addr_at(interpreter_frame_bcp_offset);
 }
 
 
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
-  return (intptr_t*)addr_at(interpreter_frame_mdx_offset);
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
+  return (intptr_t*)addr_at(interpreter_frame_mdp_offset);
 }
 
 
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -134,7 +134,7 @@
         shll(tmp, exact_log2(DataLayout::cell_size));
         addptr(mdp, tmp);
       }
-      movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp);
+      movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp);
     } else {
       assert(MethodData::profile_return(), "either profile call args or call ret");
       update_mdp_by_constant(mdp, in_bytes(TypeEntriesAtCall::return_only_size()));
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -826,7 +826,7 @@
 // Test ImethodDataPtr.  If it is null, continue at the specified label
 void InterpreterMacroAssembler::test_method_data_pointer(Register mdp, Label& zero_continue) {
   assert(ProfileInterpreter, "must be profiling interpreter");
-  movptr(mdp, Address(rbp, frame::interpreter_frame_mdx_offset * wordSize));
+  movptr(mdp, Address(rbp, frame::interpreter_frame_mdp_offset * wordSize));
   testptr(mdp, mdp);
   jcc(Assembler::zero, zero_continue);
 }
@@ -853,7 +853,7 @@
   addptr(rbx, in_bytes(MethodData::data_offset()));
   addptr(rax, rbx);
   bind(set_mdp);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), rax);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), rax);
   pop(rbx);
   pop(rax);
 }
@@ -975,7 +975,7 @@
   assert(ProfileInterpreter, "must be profiling interpreter");
   Address disp_address(mdp_in, offset_of_disp);
   addptr(mdp_in,disp_address);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
 }
 
 
@@ -983,14 +983,14 @@
   assert(ProfileInterpreter, "must be profiling interpreter");
   Address disp_address(mdp_in, reg, Address::times_1, offset_of_disp);
   addptr(mdp_in, disp_address);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
 }
 
 
 void InterpreterMacroAssembler::update_mdp_by_constant(Register mdp_in, int constant) {
   assert(ProfileInterpreter, "must be profiling interpreter");
   addptr(mdp_in, constant);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
 }
 
 
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_32.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_32.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -61,8 +61,8 @@
 
 #else
 
-  void save_bcp()                                          { movptr(Address(rbp, frame::interpreter_frame_bcx_offset * wordSize), rsi); }
-  void restore_bcp()                                       { movptr(rsi, Address(rbp, frame::interpreter_frame_bcx_offset * wordSize)); }
+  void save_bcp()                                          { movptr(Address(rbp, frame::interpreter_frame_bcp_offset * wordSize), rsi); }
+  void restore_bcp()                                       { movptr(rsi, Address(rbp, frame::interpreter_frame_bcp_offset * wordSize)); }
   void restore_locals()                                    { movptr(rdi, Address(rbp, frame::interpreter_frame_locals_offset * wordSize)); }
 
   // Helpers for runtime call arguments/results
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -841,7 +841,7 @@
 void InterpreterMacroAssembler::test_method_data_pointer(Register mdp,
                                                          Label& zero_continue) {
   assert(ProfileInterpreter, "must be profiling interpreter");
-  movptr(mdp, Address(rbp, frame::interpreter_frame_mdx_offset * wordSize));
+  movptr(mdp, Address(rbp, frame::interpreter_frame_mdp_offset * wordSize));
   testptr(mdp, mdp);
   jcc(Assembler::zero, zero_continue);
 }
@@ -868,7 +868,7 @@
   addptr(rbx, in_bytes(MethodData::data_offset()));
   addptr(rax, rbx);
   bind(set_mdp);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), rax);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), rax);
   pop(rbx);
   pop(rax);
 }
@@ -991,7 +991,7 @@
   assert(ProfileInterpreter, "must be profiling interpreter");
   Address disp_address(mdp_in, offset_of_disp);
   addptr(mdp_in, disp_address);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
 }
 
 
@@ -1001,7 +1001,7 @@
   assert(ProfileInterpreter, "must be profiling interpreter");
   Address disp_address(mdp_in, reg, Address::times_1, offset_of_disp);
   addptr(mdp_in, disp_address);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
 }
 
 
@@ -1009,7 +1009,7 @@
                                                        int constant) {
   assert(ProfileInterpreter, "must be profiling interpreter");
   addptr(mdp_in, constant);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
 }
 
 
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_64.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_64.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -58,11 +58,11 @@
 
   // Interpreter-specific registers
   void save_bcp() {
-    movptr(Address(rbp, frame::interpreter_frame_bcx_offset * wordSize), r13);
+    movptr(Address(rbp, frame::interpreter_frame_bcp_offset * wordSize), r13);
   }
 
   void restore_bcp() {
-    movptr(r13, Address(rbp, frame::interpreter_frame_bcx_offset * wordSize));
+    movptr(r13, Address(rbp, frame::interpreter_frame_bcp_offset * wordSize));
   }
 
   void restore_locals() {
--- a/hotspot/src/cpu/x86/vm/interpreter_x86_32.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/interpreter_x86_32.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -28,6 +28,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/x86/vm/interpreter_x86_64.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/interpreter_x86_64.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -28,6 +28,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/x86/vm/register_x86.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/register_x86.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -26,7 +26,6 @@
 #define CPU_X86_VM_REGISTER_X86_HPP
 
 #include "asm/register.hpp"
-#include "vm_version_x86.hpp"
 
 class VMRegImpl;
 typedef VMRegImpl* VMReg;
@@ -59,7 +58,7 @@
   // construction
   inline friend Register as_Register(int encoding);
 
-  VMReg as_VMReg();
+  inline VMReg as_VMReg();
 
   // accessors
   int   encoding() const                         { assert(is_valid(), "invalid register"); return (intptr_t)this; }
@@ -110,9 +109,10 @@
   // construction
   inline friend FloatRegister as_FloatRegister(int encoding);
 
-  VMReg as_VMReg();
+  inline VMReg as_VMReg();
 
   // derived registers, offsets, and addresses
+
   FloatRegister successor() const                          { return as_FloatRegister(encoding() + 1); }
 
   // accessors
@@ -152,7 +152,7 @@
   // construction
   friend XMMRegister as_XMMRegister(int encoding);
 
-  VMReg as_VMReg();
+  inline VMReg as_VMReg();
 
   // derived registers, offsets, and addresses
   XMMRegister successor() const                          { return as_XMMRegister(encoding() + 1); }
--- a/hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -28,6 +28,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
@@ -51,7 +52,7 @@
 
 #ifndef CC_INTERP
 const int method_offset = frame::interpreter_frame_method_offset * wordSize;
-const int bci_offset    = frame::interpreter_frame_bcx_offset    * wordSize;
+const int bcp_offset    = frame::interpreter_frame_bcp_offset    * wordSize;
 const int locals_offset = frame::interpreter_frame_locals_offset * wordSize;
 
 //------------------------------------------------------------------------------------------------------------------------
--- a/hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -28,6 +28,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
@@ -51,7 +52,7 @@
 #ifndef CC_INTERP
 
 const int method_offset = frame::interpreter_frame_method_offset * wordSize;
-const int bci_offset    = frame::interpreter_frame_bcx_offset    * wordSize;
+const int bcp_offset    = frame::interpreter_frame_bcp_offset    * wordSize;
 const int locals_offset = frame::interpreter_frame_locals_offset * wordSize;
 
 //-----------------------------------------------------------------------------
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -26,6 +26,7 @@
 #include "asm/macroAssembler.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -26,6 +26,7 @@
 #include "asm/macroAssembler.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/x86/vm/vmreg_x86.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/vmreg_x86.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -25,13 +25,49 @@
 #ifndef CPU_X86_VM_VMREG_X86_HPP
 #define CPU_X86_VM_VMREG_X86_HPP
 
-  bool is_Register();
-  Register as_Register();
+
+
+inline bool is_Register() {
+  return (unsigned int) value() < (unsigned int) ConcreteRegisterImpl::max_gpr;
+}
+
+inline bool is_FloatRegister() {
+  return value() >= ConcreteRegisterImpl::max_gpr && value() < ConcreteRegisterImpl::max_fpr;
+}
+
+inline bool is_XMMRegister() {
+  return value() >= ConcreteRegisterImpl::max_fpr && value() < ConcreteRegisterImpl::max_xmm;
+}
+
+inline Register as_Register() {
 
-  bool is_FloatRegister();
-  FloatRegister as_FloatRegister();
+  assert( is_Register(), "must be");
+  // Yuk
+#ifdef AMD64
+  return ::as_Register(value() >> 1);
+#else
+  return ::as_Register(value());
+#endif // AMD64
+}
 
-  bool is_XMMRegister();
-  XMMRegister as_XMMRegister();
+inline FloatRegister as_FloatRegister() {
+  assert( is_FloatRegister() && is_even(value()), "must be" );
+  // Yuk
+  return ::as_FloatRegister((value() - ConcreteRegisterImpl::max_gpr) >> 1);
+}
+
+inline XMMRegister as_XMMRegister() {
+  assert( is_XMMRegister() && is_even(value()), "must be" );
+  // Yuk
+  return ::as_XMMRegister((value() - ConcreteRegisterImpl::max_fpr) >> 3);
+}
+
+inline   bool is_concrete() {
+  assert(is_reg(), "must be");
+#ifndef AMD64
+  if (is_Register()) return true;
+#endif // AMD64
+  return is_even(value());
+}
 
 #endif // CPU_X86_VM_VMREG_X86_HPP
--- a/hotspot/src/cpu/x86/vm/vmreg_x86.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/vmreg_x86.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -42,48 +42,4 @@
   return VMRegImpl::as_VMReg((encoding() << 3) + ConcreteRegisterImpl::max_fpr);
 }
 
-
-inline bool VMRegImpl::is_Register() {
-  return (unsigned int) value() < (unsigned int) ConcreteRegisterImpl::max_gpr;
-}
-
-inline bool VMRegImpl::is_FloatRegister() {
-  return value() >= ConcreteRegisterImpl::max_gpr && value() < ConcreteRegisterImpl::max_fpr;
-}
-
-inline bool VMRegImpl::is_XMMRegister() {
-  return value() >= ConcreteRegisterImpl::max_fpr && value() < ConcreteRegisterImpl::max_xmm;
-}
-
-inline Register VMRegImpl::as_Register() {
-
-  assert( is_Register(), "must be");
-  // Yuk
-#ifdef AMD64
-  return ::as_Register(value() >> 1);
-#else
-  return ::as_Register(value());
-#endif // AMD64
-}
-
-inline FloatRegister VMRegImpl::as_FloatRegister() {
-  assert( is_FloatRegister() && is_even(value()), "must be" );
-  // Yuk
-  return ::as_FloatRegister((value() - ConcreteRegisterImpl::max_gpr) >> 1);
-}
-
-inline XMMRegister VMRegImpl::as_XMMRegister() {
-  assert( is_XMMRegister() && is_even(value()), "must be" );
-  // Yuk
-  return ::as_XMMRegister((value() - ConcreteRegisterImpl::max_fpr) >> 3);
-}
-
-inline   bool VMRegImpl::is_concrete() {
-  assert(is_reg(), "must be");
-#ifndef AMD64
-  if (is_Register()) return true;
-#endif // AMD64
-  return is_even(value());
-}
-
 #endif // CPU_X86_VM_VMREG_X86_INLINE_HPP
--- a/hotspot/src/cpu/x86/vm/x86.ad	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/x86/vm/x86.ad	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2011, 2014, 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
@@ -487,6 +487,8 @@
 // To keep related declarations/definitions/uses close together,
 // we switch between source %{ }% and source_hpp %{ }% freely as needed.
 
+class NativeJump;
+
 class CallStubImpl {
  
   //--------------------------------------------------------------
--- a/hotspot/src/cpu/zero/vm/frame_zero.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/zero/vm/frame_zero.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -119,9 +119,6 @@
   return false;
 }
 
-void frame::pd_gc_epilog() {
-}
-
 bool frame::is_interpreted_frame_valid(JavaThread *thread) const {
   ShouldNotCallThis();
   return false;
--- a/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -101,7 +101,7 @@
   return &(get_interpreterState()->_locals);
 }
 
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
   return (intptr_t*) &(get_interpreterState()->_bcp);
 }
 
@@ -113,7 +113,7 @@
   return &(get_interpreterState()->_method);
 }
 
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
   return (intptr_t*) &(get_interpreterState()->_mdx);
 }
 
--- a/hotspot/src/os/aix/vm/os_aix.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os/aix/vm/os_aix.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -66,6 +66,7 @@
 #include "runtime/thread.inline.hpp"
 #include "runtime/threadCritical.hpp"
 #include "runtime/timer.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/attachListener.hpp"
 #include "services/runtimeService.hpp"
 #include "utilities/decoder.hpp"
@@ -1213,10 +1214,6 @@
   ::abort();
 }
 
-// Unused on Aix for now.
-void os::set_error_file(const char *logfile) {}
-
-
 // This method is a copy of JDK's sysGetLastErrorString
 // from src/solaris/hpi/src/system_md.c
 
--- a/hotspot/src/os/aix/vm/os_aix.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os/aix/vm/os_aix.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -36,9 +36,6 @@
 #include <sys/ioctl.h>
 #include <netdb.h>
 
-// Defined in the system headers included above.
-#undef rem_size
-
 inline void* os::thread_local_storage_at(int index) {
   return pthread_getspecific((pthread_key_t)index);
 }
--- a/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -202,11 +202,11 @@
   GEN_VALUE(OFFSET_interpreter_frame_method, 2 * pointer_size);     /* L2 in saved window */
   GEN_VALUE(OFFSET_interpreter_frame_sender_sp, 13 * pointer_size); /* I5 in saved window */
   // Fake value for consistency. It is not going to be used.
-  GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, 0xFFFF);
+  GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, 0xFFFF);
 #elif defined(i386) || defined(__i386) || defined(__amd64)
   GEN_VALUE(OFFSET_interpreter_frame_sender_sp, -1 * pointer_size);
   GEN_VALUE(OFFSET_interpreter_frame_method, -3 * pointer_size);
-  GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, -7 * pointer_size);
+  GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, -7 * pointer_size);
 #endif
 
   GEN_OFFS(Klass, _name);
--- a/hotspot/src/os/bsd/dtrace/libjvm_db.c	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os/bsd/dtrace/libjvm_db.c	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -164,7 +164,7 @@
   int32_t  SIZE_CodeCache_log2_segment;
 
   uint64_t methodPtr;
-  uint64_t bcx;
+  uint64_t bcp;
 
   Nmethod_t *N;                 /*Inlined methods support */
   Frame_t   prev_fr;
@@ -260,6 +260,9 @@
   uint64_t base;
   int err;
 
+  /* Clear *vmp now in case we jump to fail: */
+  memset(vmp, 0, sizeof(VMStructEntry));
+
   err = ps_pglobal_lookup(J->P, LIBJVM_SO, "gHotSpotVMStructs", &sym_addr);
   CHECK_FAIL(err);
   err = read_pointer(J, sym_addr, &gHotSpotVMStructs);
@@ -1068,19 +1071,9 @@
   return err;
 }
 
-int is_bci(intptr_t bcx) {
-  switch (DATA_MODEL) {
-  case PR_MODEL_LP64:
-    return ((uintptr_t) bcx) <= ((uintptr_t) MAX_METHOD_CODE_SIZE) ;
-  case PR_MODEL_ILP32:
-  default:
-    return 0 <= bcx && bcx <= MAX_METHOD_CODE_SIZE;
-  }
-}
-
 static int
 name_for_imethod(jvm_agent_t* J,
-                 uint64_t bcx,
+                 uint64_t bcp,
                  uint64_t method,
                  char *result,
                  size_t size,
@@ -1095,7 +1088,7 @@
   err = read_pointer(J, method + OFFSET_Method_constMethod, &constMethod);
   CHECK_FAIL(err);
 
-  bci = is_bci(bcx) ? bcx : bcx - (constMethod + (uint64_t) SIZE_ConstMethod);
+  bci = bcp - (constMethod + (uint64_t) SIZE_ConstMethod);
 
   if (debug)
       fprintf(stderr, "\t name_for_imethod: BEGIN: method: %#llx\n", method);
@@ -1169,7 +1162,7 @@
     if (err == PS_OK && strncmp(name, "Interpreter", 11) == 0) {
       *is_interpreted = 1;
       if (is_method(J, J->methodPtr)) {
-        return name_for_imethod(J, J->bcx, J->methodPtr, result, size, jframe);
+        return name_for_imethod(J, J->bcp, J->methodPtr, result, size, jframe);
       }
     }
 
@@ -1326,7 +1319,7 @@
   /* arguments given to read_pointer need to be worst case sized */
   uint64_t methodPtr = 0;
   uint64_t sender_sp;
-  uint64_t bcx = 0;
+  uint64_t bcp = 0;
   int is_interpreted = 0;
   int result = PS_OK;
   int err = PS_OK;
@@ -1357,7 +1350,7 @@
      * regs[R_PC] contains a CALL instruction pc offset.
      */
     pc += 8;
-    bcx          = (uintptr_t) regs[R_L1];
+    bcp          = (uintptr_t) regs[R_L1];
     methodPtr = (uintptr_t) regs[R_L2];
     sender_sp = regs[R_I5];
     if (debug > 2) {
@@ -1385,13 +1378,13 @@
     if (read_pointer(J,  fp + OFFSET_interpreter_frame_sender_sp, &sender_sp) != PS_OK) {
       sender_sp = 0;
     }
-    if (read_pointer(J,  fp + OFFSET_interpreter_frame_bcx_offset, &bcx) != PS_OK) {
-      bcx = 0;
+    if (read_pointer(J,  fp + OFFSET_interpreter_frame_bcp_offset, &bcp) != PS_OK) {
+      bcp = 0;
     }
 #endif /* i386 */
 
   J->methodPtr = methodPtr;
-  J->bcx = bcx;
+  J->bcp = bcp;
 
   /* On x86 with C2 JVM: native frame may have wrong regs[R_FP]
    * For example: JVM_SuspendThread frame poins to the top interpreted frame.
@@ -1402,7 +1395,7 @@
    */
 #ifndef X86_COMPILER2
   if (is_method(J, J->methodPtr)) {
-    result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
+    result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
     /* If the methodPtr is a method then this is highly likely to be
        an interpreter frame */
     if (result >= 0) {
@@ -1416,7 +1409,7 @@
   }
 #ifdef X86_COMPILER2
   else if (is_method(J, J->methodPtr)) {
-    result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
+    result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
     /* If the methodPtr is a method then this is highly likely to be
        an interpreter frame */
     if (result >= 0) {
--- a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -197,11 +197,11 @@
   GEN_VALUE(OFFSET_interpreter_frame_method, 2 * pointer_size);     /* L2 in saved window */
   GEN_VALUE(OFFSET_interpreter_frame_sender_sp, 13 * pointer_size); /* I5 in saved window */
   // Fake value for consistency. It is not going to be used.
-  GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, 0xFFFF);
+  GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, 0xFFFF);
 #elif defined(i386) || defined(__i386) || defined(__amd64)
   GEN_VALUE(OFFSET_interpreter_frame_sender_sp, -1 * pointer_size);
   GEN_VALUE(OFFSET_interpreter_frame_method, -3 * pointer_size);
-  GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, -7 * pointer_size);
+  GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, -7 * pointer_size);
 #endif
 
   GEN_OFFS(Klass, _name);
--- a/hotspot/src/os/solaris/dtrace/libjvm_db.c	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os/solaris/dtrace/libjvm_db.c	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -164,7 +164,7 @@
   int32_t  SIZE_CodeCache_log2_segment;
 
   uint64_t methodPtr;
-  uint64_t bcx;
+  uint64_t bcp;
 
   Nmethod_t *N;                 /*Inlined methods support */
   Frame_t   prev_fr;
@@ -260,6 +260,9 @@
   uint64_t base;
   int err;
 
+  /* Clear *vmp now in case we jump to fail: */
+  memset(vmp, 0, sizeof(VMStructEntry));
+
   err = ps_pglobal_lookup(J->P, LIBJVM_SO, "gHotSpotVMStructs", &sym_addr);
   CHECK_FAIL(err);
   err = read_pointer(J, sym_addr, &gHotSpotVMStructs);
@@ -1068,19 +1071,9 @@
   return err;
 }
 
-int is_bci(intptr_t bcx) {
-  switch (DATA_MODEL) {
-  case PR_MODEL_LP64:
-    return ((uintptr_t) bcx) <= ((uintptr_t) MAX_METHOD_CODE_SIZE) ;
-  case PR_MODEL_ILP32:
-  default:
-    return 0 <= bcx && bcx <= MAX_METHOD_CODE_SIZE;
-  }
-}
-
 static int
 name_for_imethod(jvm_agent_t* J,
-                 uint64_t bcx,
+                 uint64_t bcp,
                  uint64_t method,
                  char *result,
                  size_t size,
@@ -1095,7 +1088,7 @@
   err = read_pointer(J, method + OFFSET_Method_constMethod, &constMethod);
   CHECK_FAIL(err);
 
-  bci = is_bci(bcx) ? bcx : bcx - (constMethod + (uint64_t) SIZE_ConstMethod);
+  bci = bcp - (constMethod + (uint64_t) SIZE_ConstMethod);
 
   if (debug)
       fprintf(stderr, "\t name_for_imethod: BEGIN: method: %#llx\n", method);
@@ -1169,7 +1162,7 @@
     if (err == PS_OK && strncmp(name, "Interpreter", 11) == 0) {
       *is_interpreted = 1;
       if (is_method(J, J->methodPtr)) {
-        return name_for_imethod(J, J->bcx, J->methodPtr, result, size, jframe);
+        return name_for_imethod(J, J->bcp, J->methodPtr, result, size, jframe);
       }
     }
 
@@ -1326,7 +1319,7 @@
   /* arguments given to read_pointer need to be worst case sized */
   uint64_t methodPtr = 0;
   uint64_t sender_sp;
-  uint64_t bcx = 0;
+  uint64_t bcp = 0;
   int is_interpreted = 0;
   int result = PS_OK;
   int err = PS_OK;
@@ -1357,7 +1350,7 @@
      * regs[R_PC] contains a CALL instruction pc offset.
      */
     pc += 8;
-    bcx          = (uintptr_t) regs[R_L1];
+    bcp          = (uintptr_t) regs[R_L1];
     methodPtr = (uintptr_t) regs[R_L2];
     sender_sp = regs[R_I5];
     if (debug > 2) {
@@ -1385,13 +1378,13 @@
     if (read_pointer(J,  fp + OFFSET_interpreter_frame_sender_sp, &sender_sp) != PS_OK) {
       sender_sp = 0;
     }
-    if (read_pointer(J,  fp + OFFSET_interpreter_frame_bcx_offset, &bcx) != PS_OK) {
-      bcx = 0;
+    if (read_pointer(J,  fp + OFFSET_interpreter_frame_bcp_offset, &bcp) != PS_OK) {
+      bcp = 0;
     }
 #endif /* i386 */
 
   J->methodPtr = methodPtr;
-  J->bcx = bcx;
+  J->bcp = bcp;
 
   /* On x86 with C2 JVM: native frame may have wrong regs[R_FP]
    * For example: JVM_SuspendThread frame poins to the top interpreted frame.
@@ -1402,7 +1395,7 @@
    */
 #ifndef X86_COMPILER2
   if (is_method(J, J->methodPtr)) {
-    result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
+    result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
     /* If the methodPtr is a method then this is highly likely to be
        an interpreter frame */
     if (result >= 0) {
@@ -1416,7 +1409,7 @@
   }
 #ifdef X86_COMPILER2
   else if (is_method(J, J->methodPtr)) {
-    result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
+    result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
     /* If the methodPtr is a method then this is highly likely to be
        an interpreter frame */
     if (result >= 0) {
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -59,6 +59,7 @@
 #include "runtime/thread.inline.hpp"
 #include "runtime/threadCritical.hpp"
 #include "runtime/timer.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/attachListener.hpp"
 #include "services/memTracker.hpp"
 #include "services/runtimeService.hpp"
--- a/hotspot/src/os/windows/vm/os_windows.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os/windows/vm/os_windows.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -62,6 +62,7 @@
 #include "runtime/thread.inline.hpp"
 #include "runtime/threadCritical.hpp"
 #include "runtime/timer.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/attachListener.hpp"
 #include "services/memTracker.hpp"
 #include "services/runtimeService.hpp"
--- a/hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, SAP AG. 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
@@ -28,7 +28,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_ppc.hpp"
 
 #ifndef _LP64
 #error "Atomic currently only impleneted for PPC64"
--- a/hotspot/src/os_cpu/aix_ppc/vm/orderAccess_aix_ppc.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/aix_ppc/vm/orderAccess_aix_ppc.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, SAP AG. 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
@@ -27,7 +27,6 @@
 #define OS_CPU_AIX_OJDKPPC_VM_ORDERACCESS_AIX_PPC_INLINE_HPP
 
 #include "runtime/orderAccess.hpp"
-#include "vm_version_ppc.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // Implementation of class atomic
 
--- a/hotspot/src/os_cpu/bsd_x86/vm/orderAccess_bsd_x86.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/bsd_x86/vm/orderAccess_bsd_x86.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -28,7 +28,6 @@
 #include "runtime/atomic.inline.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2011 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -28,7 +28,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_zero.hpp"
 
 // Implementation of class atomic
 
--- a/hotspot/src/os_cpu/bsd_zero/vm/orderAccess_bsd_zero.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/bsd_zero/vm/orderAccess_bsd_zero.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,7 +27,6 @@
 #define OS_CPU_BSD_ZERO_VM_ORDERACCESS_BSD_ZERO_INLINE_HPP
 
 #include "runtime/orderAccess.hpp"
-#include "vm_version_zero.hpp"
 
 #ifdef ARM
 
--- a/hotspot/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, SAP AG. 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
@@ -28,7 +28,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_ppc.hpp"
 
 #ifndef PPC64
 #error "Atomic currently only implemented for PPC64"
--- a/hotspot/src/os_cpu/linux_ppc/vm/orderAccess_linux_ppc.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/linux_ppc/vm/orderAccess_linux_ppc.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, SAP AG. 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
@@ -27,7 +27,6 @@
 #define OS_CPU_LINUX_PPC_VM_ORDERACCESS_LINUX_PPC_INLINE_HPP
 
 #include "runtime/orderAccess.hpp"
-#include "vm_version_ppc.hpp"
 
 #ifndef PPC64
 #error "OrderAccess currently only implemented for PPC64"
--- a/hotspot/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_sparc.hpp"
 
 // Implementation of class atomic
 
--- a/hotspot/src/os_cpu/linux_sparc/vm/orderAccess_linux_sparc.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/linux_sparc/vm/orderAccess_linux_sparc.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -26,7 +26,6 @@
 #define OS_CPU_LINUX_SPARC_VM_ORDERACCESS_LINUX_SPARC_INLINE_HPP
 
 #include "runtime/orderAccess.hpp"
-#include "vm_version_sparc.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -118,7 +118,7 @@
       *ret_sp = os::Linux::ucontext_get_sp(uc);
     }
     if (ret_fp) {
-      *ret_fp = os::Linux::ucontext_get_fp(uc);
+      *ret_fp = (intptr_t*)NULL;
     }
   } else {
     // construct empty ExtendedPC for return value checking
@@ -136,18 +136,15 @@
 
 frame os::fetch_frame_from_context(void* ucVoid) {
   intptr_t* sp;
-  intptr_t* fp;
-  ExtendedPC epc = fetch_frame_from_context(ucVoid, &sp, &fp);
-  return frame(sp, fp, epc.pc());
+  ExtendedPC epc = fetch_frame_from_context(ucVoid, &sp, NULL);
+  return frame(sp, frame::unpatchable, epc.pc());
 }
 
 frame os::get_sender_for_C_frame(frame* fr) {
-  return frame(fr->sender_sp(), fr->link(), fr->sender_pc());
+  return frame(fr->sender_sp(), frame::unpatchable, fr->sender_pc());
 }
 
 frame os::current_frame() {
-  fprintf(stderr, "current_frame()");
-
   intptr_t* sp = StubRoutines::Sparc::flush_callers_register_windows_func()();
   frame myframe(sp, frame::unpatchable,
                 CAST_FROM_FN_PTR(address, os::current_frame));
--- a/hotspot/src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // Implementation of class atomic
 
--- a/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -28,7 +28,6 @@
 #include "runtime/atomic.inline.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2011 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -28,7 +28,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_zero.hpp"
 
 // Implementation of class atomic
 
--- a/hotspot/src/os_cpu/linux_zero/vm/orderAccess_linux_zero.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/linux_zero/vm/orderAccess_linux_zero.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,7 +27,6 @@
 #define OS_CPU_LINUX_ZERO_VM_ORDERACCESS_LINUX_ZERO_INLINE_HPP
 
 #include "runtime/orderAccess.hpp"
-#include "vm_version_zero.hpp"
 
 #ifdef ARM
 
--- a/hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_sparc.hpp"
 
 // Implementation of class atomic
 
--- a/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.inline.hpp"
 #include "runtime/orderAccess.hpp"
-#include "vm_version_sparc.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -27,6 +27,7 @@
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
--- a/hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 inline void Atomic::store    (jbyte    store_value, jbyte*    dest) { *dest = store_value; }
 inline void Atomic::store    (jshort   store_value, jshort*   dest) { *dest = store_value; }
--- a/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -28,7 +28,6 @@
 #include "runtime/atomic.inline.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/os_cpu/windows_x86/vm/atomic_windows_x86.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/windows_x86/vm/atomic_windows_x86.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // The following alternative implementations are needed because
 // Windows 95 doesn't support (some of) the corresponding Windows NT
--- a/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -28,7 +28,6 @@
 #include "runtime/atomic.inline.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/share/vm/adlc/main.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/adlc/main.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -213,7 +213,8 @@
   AD.addInclude(AD._CPP_file, "memory/allocation.inline.hpp");
   AD.addInclude(AD._CPP_file, "asm/macroAssembler.inline.hpp");
   AD.addInclude(AD._CPP_file, "code/compiledIC.hpp");
-  AD.addInclude(AD._CPP_file, "code/vmreg.hpp");
+  AD.addInclude(AD._CPP_file, "code/nativeInst.hpp");
+  AD.addInclude(AD._CPP_file, "code/vmreg.inline.hpp");
   AD.addInclude(AD._CPP_file, "gc_interface/collectedHeap.inline.hpp");
   AD.addInclude(AD._CPP_file, "oops/compiledICHolder.hpp");
   AD.addInclude(AD._CPP_file, "oops/markOop.hpp");
@@ -230,23 +231,8 @@
   AD.addInclude(AD._CPP_file, "runtime/sharedRuntime.hpp");
   AD.addInclude(AD._CPP_file, "runtime/stubRoutines.hpp");
   AD.addInclude(AD._CPP_file, "utilities/growableArray.hpp");
-#ifdef TARGET_ARCH_x86
-  AD.addInclude(AD._CPP_file, "nativeInst_x86.hpp");
-  AD.addInclude(AD._CPP_file, "vmreg_x86.inline.hpp");
-#endif
-#ifdef TARGET_ARCH_sparc
-  AD.addInclude(AD._CPP_file, "nativeInst_sparc.hpp");
-  AD.addInclude(AD._CPP_file, "vmreg_sparc.inline.hpp");
-#endif
-#ifdef TARGET_ARCH_arm
-  AD.addInclude(AD._CPP_file, "nativeInst_arm.hpp");
-  AD.addInclude(AD._CPP_file, "vmreg_arm.inline.hpp");
-#endif
-#ifdef TARGET_ARCH_ppc
-  AD.addInclude(AD._CPP_file, "nativeInst_ppc.hpp");
-  AD.addInclude(AD._CPP_file, "vmreg_ppc.inline.hpp");
-#endif
   AD.addInclude(AD._HPP_file, "memory/allocation.hpp");
+  AD.addInclude(AD._HPP_file, "code/nativeInst.hpp");
   AD.addInclude(AD._HPP_file, "opto/machnode.hpp");
   AD.addInclude(AD._HPP_file, "opto/node.hpp");
   AD.addInclude(AD._HPP_file, "opto/regalloc.hpp");
--- a/hotspot/src/share/vm/asm/assembler.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/asm/assembler.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -26,34 +26,15 @@
 #define SHARE_VM_ASM_ASSEMBLER_HPP
 
 #include "asm/codeBuffer.hpp"
+#include "asm/register.hpp"
 #include "code/oopRecorder.hpp"
 #include "code/relocInfo.hpp"
 #include "memory/allocation.hpp"
+#include "runtime/vm_version.hpp"
 #include "utilities/debug.hpp"
 #include "utilities/growableArray.hpp"
 #include "utilities/top.hpp"
 
-#ifdef TARGET_ARCH_x86
-# include "register_x86.hpp"
-# include "vm_version_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "register_sparc.hpp"
-# include "vm_version_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "register_zero.hpp"
-# include "vm_version_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "register_arm.hpp"
-# include "vm_version_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "register_ppc.hpp"
-# include "vm_version_ppc.hpp"
-#endif
-
 // This file contains platform-independent assembler declarations.
 
 class MacroAssembler;
--- a/hotspot/src/share/vm/asm/codeBuffer.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/asm/codeBuffer.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -28,6 +28,7 @@
 #include "memory/gcLocker.hpp"
 #include "oops/methodData.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/icache.hpp"
 #include "utilities/copy.hpp"
 #include "utilities/xmlstream.hpp"
 
--- a/hotspot/src/share/vm/c1/c1_CodeStubs.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/c1/c1_CodeStubs.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -30,6 +30,7 @@
 #include "c1/c1_Instruction.hpp"
 #include "c1/c1_LIR.hpp"
 #include "c1/c1_Runtime1.hpp"
+#include "code/nativeInst.hpp"
 #include "utilities/array.hpp"
 #include "utilities/macros.hpp"
 
--- a/hotspot/src/share/vm/c1/c1_Defs.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/c1/c1_Defs.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -26,21 +26,7 @@
 #define SHARE_VM_C1_C1_DEFS_HPP
 
 #include "utilities/globalDefinitions.hpp"
-#ifdef TARGET_ARCH_x86
-# include "register_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "register_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "register_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "register_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "register_ppc.hpp"
-#endif
+#include "asm/register.hpp"
 
 // set frame size and return address offset to these values in blobs
 // (if the compiled frame uses ebp as link pointer on IA; otherwise,
--- a/hotspot/src/share/vm/c1/c1_FrameMap.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/c1/c1_FrameMap.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -25,24 +25,8 @@
 #include "precompiled.hpp"
 #include "c1/c1_FrameMap.hpp"
 #include "c1/c1_LIR.hpp"
+#include "code/vmreg.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vmreg_ppc.inline.hpp"
-#endif
-
-
 
 //-----------------------------------------------------
 
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -36,6 +36,7 @@
 #include "interpreter/bytecode.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/compilationPolicy.hpp"
+#include "runtime/vm_version.hpp"
 #include "utilities/bitMap.inline.hpp"
 
 class BlockListBuilder VALUE_OBJ_CLASS_SPEC {
--- a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -30,27 +30,6 @@
 #include "c1/c1_MacroAssembler.hpp"
 #include "c1/c1_ValueStack.hpp"
 #include "ci/ciInstance.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-# include "vmreg_ppc.inline.hpp"
-#endif
-
 
 void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) {
   // we must have enough patching space so that call can be inserted
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -34,6 +34,7 @@
 #include "ci/ciObjArray.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
+#include "runtime/vm_version.hpp"
 #include "utilities/bitMap.inline.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
--- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -31,23 +31,8 @@
 #include "c1/c1_LIRGenerator.hpp"
 #include "c1/c1_LinearScan.hpp"
 #include "c1/c1_ValueStack.hpp"
+#include "code/vmreg.inline.hpp"
 #include "utilities/bitMap.inline.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vmreg_ppc.inline.hpp"
-#endif
-
 
 #ifndef PRODUCT
 
--- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -56,6 +56,7 @@
 #include "runtime/threadCritical.hpp"
 #include "runtime/vframe.hpp"
 #include "runtime/vframeArray.hpp"
+#include "runtime/vm_version.hpp"
 #include "utilities/copy.hpp"
 #include "utilities/events.hpp"
 
--- a/hotspot/src/share/vm/ci/ciField.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/ci/ciField.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -138,6 +138,17 @@
     return;
   }
 
+  // Access check based on declared_holder. canonical_holder should not be used
+  // to check access because it can erroneously succeed. If this check fails,
+  // propagate the declared holder to will_link() which in turn will bail out
+  // compilation for this field access.
+  if (!Reflection::verify_field_access(klass->get_Klass(), declared_holder->get_Klass(), canonical_holder, field_desc.access_flags(), true)) {
+    _holder = declared_holder;
+    _offset = -1;
+    _is_constant = false;
+    return;
+  }
+
   assert(canonical_holder == field_desc.field_holder(), "just checking");
   initialize_from(&field_desc);
 }
--- a/hotspot/src/share/vm/classfile/bytecodeAssembler.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/classfile/bytecodeAssembler.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, 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
@@ -28,22 +28,7 @@
 #include "interpreter/bytecodes.hpp"
 #include "memory/oopFactory.hpp"
 #include "oops/constantPool.hpp"
-
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
 
 u2 BytecodeConstantPool::find_or_add(BytecodeCPEntry const& bcpe) {
   u2 index;
--- a/hotspot/src/share/vm/classfile/classFileStream.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/classfile/classFileStream.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -25,22 +25,8 @@
 #ifndef SHARE_VM_CLASSFILE_CLASSFILESTREAM_HPP
 #define SHARE_VM_CLASSFILE_CLASSFILESTREAM_HPP
 
+#include "utilities/bytes.hpp"
 #include "utilities/top.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
 
 // Input stream for reading .class file
 //
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1639,9 +1639,9 @@
       if (fr.is_first_frame()) break;
       address pc = fr.pc();
       if (fr.is_interpreted_frame()) {
-        intptr_t bcx = fr.interpreter_frame_bcx();
+        address bcp = fr.interpreter_frame_bcp();
         method = fr.interpreter_frame_method();
-        bci =  fr.is_bci(bcx) ? bcx : method->bci_from((address)bcx);
+        bci =  method->bci_from(bcp);
         fr = fr.sender(&map);
       } else {
         CodeBlob* cb = fr.cb();
--- a/hotspot/src/share/vm/classfile/stackMapTable.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/classfile/stackMapTable.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -30,22 +30,8 @@
 #include "memory/allocation.hpp"
 #include "oops/constantPool.hpp"
 #include "oops/method.hpp"
+#include "utilities/bytes.hpp"
 #include "utilities/globalDefinitions.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
 
 class StackMapReader;
 
--- a/hotspot/src/share/vm/classfile/verifier.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/classfile/verifier.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -45,21 +45,7 @@
 #include "runtime/javaCalls.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/os.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
 
 #define NOFAILOVER_MAJOR_VERSION                       51
 #define NONZERO_PADDING_BYTES_IN_SWITCH_MAJOR_VERSION  51
@@ -439,7 +425,7 @@
   if (_bci != -1 && method != NULL) {
     streamIndentor si(ss);
     const char* bytecode_name = "<invalid>";
-    if (method->validate_bci_from_bcx(_bci) != -1) {
+    if (method->validate_bci(_bci) != -1) {
       Bytecodes::Code code = Bytecodes::code_or_bp_at(method->bcp_from(_bci));
       if (Bytecodes::is_defined(code)) {
           bytecode_name = Bytecodes::name(code);
--- a/hotspot/src/share/vm/code/codeBlob.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/code/codeBlob.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -39,21 +39,6 @@
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/vframe.hpp"
 #include "services/memoryService.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-#endif
 #ifdef COMPILER1
 #include "c1/c1_Runtime1.hpp"
 #endif
--- a/hotspot/src/share/vm/code/compiledIC.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/code/compiledIC.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -25,23 +25,9 @@
 #ifndef SHARE_VM_CODE_COMPILEDIC_HPP
 #define SHARE_VM_CODE_COMPILEDIC_HPP
 
+#include "code/nativeInst.hpp"
 #include "interpreter/linkResolver.hpp"
 #include "oops/compiledICHolder.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-#endif
 
 //-----------------------------------------------------------------------------
 // The CompiledIC represents a compiled inline cache.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/code/nativeInst.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ */
+
+#ifndef SHARE_VM_CODE_NATIVEINST_HPP
+#define SHARE_VM_CODE_NATIVEINST_HPP
+
+#ifdef TARGET_ARCH_x86
+# include "nativeInst_x86.hpp"
+#endif
+#ifdef TARGET_ARCH_sparc
+# include "nativeInst_sparc.hpp"
+#endif
+#ifdef TARGET_ARCH_zero
+# include "nativeInst_zero.hpp"
+#endif
+#ifdef TARGET_ARCH_arm
+# include "nativeInst_arm.hpp"
+#endif
+#ifdef TARGET_ARCH_ppc
+# include "nativeInst_ppc.hpp"
+#endif
+
+#endif // SHARE_VM_CODE_NATIVEINST_HPP
--- a/hotspot/src/share/vm/code/nmethod.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/code/nmethod.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -69,7 +69,12 @@
   friend class VMStructs;
  private:
   enum { cache_size = 4 };
-  PcDesc* _pc_descs[cache_size]; // last cache_size pc_descs found
+  // The array elements MUST be volatile! Several threads may modify
+  // and read from the cache concurrently. find_pc_desc_internal has
+  // returned wrong results. C++ compiler (namely xlC12) may duplicate
+  // C++ field accesses if the elements are not volatile.
+  typedef PcDesc* PcDescPtr;
+  volatile PcDescPtr _pc_descs[cache_size]; // last cache_size pc_descs found
  public:
   PcDescCache() { debug_only(_pc_descs[0] = NULL); }
   void    reset_to(PcDesc* initial_pc_desc);
--- a/hotspot/src/share/vm/code/vmreg.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/code/vmreg.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -25,34 +25,13 @@
 #ifndef SHARE_VM_CODE_VMREG_HPP
 #define SHARE_VM_CODE_VMREG_HPP
 
+#include "asm/register.hpp"
 #include "memory/allocation.hpp"
 #include "utilities/globalDefinitions.hpp"
-#include "asm/register.hpp"
 
 #ifdef COMPILER2
 #include "opto/adlcVMDeps.hpp"
 #include "utilities/ostream.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/adGlobals_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/adGlobals_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/adGlobals_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/adGlobals_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/adGlobals_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/adGlobals_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/adGlobals_ppc_64.hpp"
-#endif
 #endif
 
 //------------------------------VMReg------------------------------------------
@@ -107,7 +86,7 @@
   // also a register you could use in the assembler. On machines with
   // 64bit registers only one half of the VMReg (and OptoReg) is considered
   // concrete.
-  bool is_concrete();
+  //  bool is_concrete();
 
   // VMRegs are 4 bytes wide on all platforms
   static const int stack_slot_size;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/code/vmreg.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ */
+
+#ifndef SHARE_VM_CODE_VMREG_INLINE_HPP
+#define SHARE_VM_CODE_VMREG_INLINE_HPP
+
+#include "asm/register.hpp"
+#include "code/vmreg.hpp"
+#ifdef TARGET_ARCH_x86
+# include "vmreg_x86.inline.hpp"
+#endif
+#ifdef TARGET_ARCH_sparc
+# include "vmreg_sparc.inline.hpp"
+#endif
+#ifdef TARGET_ARCH_zero
+# include "vmreg_zero.inline.hpp"
+#endif
+#ifdef TARGET_ARCH_arm
+# include "vmreg_arm.inline.hpp"
+#endif
+#ifdef TARGET_ARCH_ppc
+# include "vmreg_ppc.inline.hpp"
+#endif
+
+#endif // SHARE_VM_CODE_VMREG_INLINE_HPP
--- a/hotspot/src/share/vm/compiler/compileLog.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/compiler/compileLog.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "ci/ciMethod.hpp"
+#include "code/codeCache.hpp"
 #include "compiler/compileLog.hpp"
 #include "memory/allocation.inline.hpp"
 #include "oops/method.hpp"
--- a/hotspot/src/share/vm/compiler/oopMap.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/compiler/oopMap.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -36,6 +36,9 @@
 #ifdef COMPILER1
 #include "c1/c1_Defs.hpp"
 #endif
+#ifdef COMPILER2
+#include "opto/optoreg.hpp"
+#endif
 
 // OopMapStream
 
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1904,12 +1904,12 @@
   assert(size > new_size, "Split from a smaller block?");
   assert(is_aligned(chunk), "alignment problem");
   assert(size == adjustObjectSize(size), "alignment problem");
-  size_t rem_size = size - new_size;
-  assert(rem_size == adjustObjectSize(rem_size), "alignment problem");
-  assert(rem_size >= MinChunkSize, "Free chunk smaller than minimum");
+  size_t rem_sz = size - new_size;
+  assert(rem_sz == adjustObjectSize(rem_sz), "alignment problem");
+  assert(rem_sz >= MinChunkSize, "Free chunk smaller than minimum");
   FreeChunk* ffc = (FreeChunk*)((HeapWord*)chunk + new_size);
   assert(is_aligned(ffc), "alignment problem");
-  ffc->set_size(rem_size);
+  ffc->set_size(rem_sz);
   ffc->link_next(NULL);
   ffc->link_prev(NULL); // Mark as a free block for other (parallel) GC threads.
   // Above must occur before BOT is updated below.
@@ -1917,18 +1917,18 @@
   OrderAccess::storestore();
   assert(chunk->is_free() && ffc->is_free(), "Error");
   _bt.split_block((HeapWord*)chunk, chunk->size(), new_size);
-  if (rem_size < SmallForDictionary) {
+  if (rem_sz < SmallForDictionary) {
     bool is_par = (SharedHeap::heap()->n_par_threads() > 0);
-    if (is_par) _indexedFreeListParLocks[rem_size]->lock();
+    if (is_par) _indexedFreeListParLocks[rem_sz]->lock();
     assert(!is_par ||
            (SharedHeap::heap()->n_par_threads() ==
             SharedHeap::heap()->workers()->active_workers()), "Mismatch");
     returnChunkToFreeList(ffc);
-    split(size, rem_size);
-    if (is_par) _indexedFreeListParLocks[rem_size]->unlock();
+    split(size, rem_sz);
+    if (is_par) _indexedFreeListParLocks[rem_sz]->unlock();
   } else {
     returnChunkToDictionary(ffc);
-    split(size ,rem_size);
+    split(size, rem_sz);
   }
   chunk->set_size(new_size);
   return chunk;
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -891,6 +891,10 @@
   guarantee(!g1h->mark_in_progress(), "invariant");
 }
 
+bool ConcurrentMark::nextMarkBitmapIsClear() {
+  return _nextMarkBitMap->getNextMarkedWordAddress(_heap_start, _heap_end) == _heap_end;
+}
+
 class NoteStartOfMarkHRClosure: public HeapRegionClosure {
 public:
   bool doHeapRegion(HeapRegion* r) {
@@ -3358,7 +3362,8 @@
 
 // abandon current marking iteration due to a Full GC
 void ConcurrentMark::abort() {
-  // Clear all marks to force marking thread to do nothing
+  // Clear all marks in the next bitmap for the next marking cycle. This will allow us to skip the next
+  // concurrent bitmap clearing.
   _nextMarkBitMap->clearAll();
 
   // Note we cannot clear the previous marking bitmap here
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -736,6 +736,9 @@
   // Clear the next marking bitmap (will be called concurrently).
   void clearNextBitmap();
 
+  // Return whether the next mark bitmap has no marks set.
+  bool nextMarkBitmapIsClear();
+
   // These two do the work that needs to be done before and after the
   // initial root checkpoint. Since this checkpoint can be done at two
   // different points (i.e. an explicit pause or piggy-backed on a
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -277,9 +277,13 @@
 
       // We now want to allow clearing of the marking bitmap to be
       // suspended by a collection pause.
-      {
+      // We may have aborted just before the remark. Do not bother clearing the
+      // bitmap then, as it has been done during mark abort.
+      if (!cm()->has_aborted()) {
         SuspendibleThreadSetJoiner sts;
         _cm->clearNextBitmap();
+      } else {
+        assert(!G1VerifyBitmaps || _cm->nextMarkBitmapIsClear(), "Next mark bitmap must be clear");
       }
     }
 
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -2950,10 +2950,17 @@
   }
 }
 
-CompactibleSpace* G1CollectedHeap::first_compactible_space() {
-  return n_regions() > 0 ? region_at(0) : NULL;
-}
-
+HeapRegion* G1CollectedHeap::next_compaction_region(const HeapRegion* from) const {
+  // We're not using an iterator given that it will wrap around when
+  // it reaches the last region and this is not what we want here.
+  for (uint index = from->hrs_index() + 1; index < n_regions(); index++) {
+    HeapRegion* hr = region_at(index);
+    if (!hr->isHumongous()) {
+      return hr;
+    }
+  }
+  return NULL;
+}
 
 Space* G1CollectedHeap::space_containing(const void* addr) const {
   return heap_region_containing(addr);
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1158,19 +1158,19 @@
   }
 
   // The total number of regions in the heap.
-  uint n_regions() { return _hrs.length(); }
+  uint n_regions() const { return _hrs.length(); }
 
   // The max number of regions in the heap.
-  uint max_regions() { return _hrs.max_length(); }
+  uint max_regions() const { return _hrs.max_length(); }
 
   // The number of regions that are completely free.
-  uint free_regions() { return _free_list.length(); }
+  uint free_regions() const { return _free_list.length(); }
 
   // The number of regions that are not completely free.
-  uint used_regions() { return n_regions() - free_regions(); }
+  uint used_regions() const { return n_regions() - free_regions(); }
 
   // The number of regions available for "regular" expansion.
-  uint expansion_regions() { return _expansion_regions; }
+  uint expansion_regions() const { return _expansion_regions; }
 
   // Factory method for HeapRegion instances. It will return NULL if
   // the allocation fails.
@@ -1392,8 +1392,7 @@
   // As above but starting from region r
   void collection_set_iterate_from(HeapRegion* r, HeapRegionClosure *blk);
 
-  // Returns the first (lowest address) compactible space in the heap.
-  virtual CompactibleSpace* first_compactible_space();
+  HeapRegion* next_compaction_region(const HeapRegion* from) const;
 
   // A CollectedHeap will contain some number of spaces.  This finds the
   // space containing a given address, or else returns NULL.
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1047,7 +1047,7 @@
 
   bool new_in_marking_window = _in_marking_window;
   bool new_in_marking_window_im = false;
-  if (during_initial_mark_pause()) {
+  if (last_pause_included_initial_mark) {
     new_in_marking_window = true;
     new_in_marking_window_im = true;
   }
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -76,7 +76,6 @@
   // When collecting the permanent generation Method*s may be moving,
   // so we either have to flush all bcp data or convert it into bci.
   CodeCache::gc_prologue();
-  Threads::gc_prologue();
 
   bool marked_for_unloading = false;
 
@@ -106,7 +105,6 @@
   //  Universe::set_heap_capacity_at_last_gc(Universe::heap()->capacity());
   //  Universe::set_heap_used_at_last_gc(Universe::heap()->used());
 
-  Threads::gc_epilogue();
   CodeCache::gc_epilogue();
   JvmtiExport::gc_epilogue();
 
@@ -201,6 +199,23 @@
   CompactPoint _cp;
   HeapRegionSetCount _humongous_regions_removed;
 
+  bool is_cp_initialized() const {
+    return _cp.space != NULL;
+  }
+
+  void prepare_for_compaction(HeapRegion* hr, HeapWord* end) {
+    // If this is the first live region that we came across which we can compact,
+    // initialize the CompactPoint.
+    if (!is_cp_initialized()) {
+      _cp.space = hr;
+      _cp.threshold = hr->initialize_threshold();
+    }
+    hr->prepare_for_compaction(&_cp);
+    // Also clear the part of the card table that will be unused after
+    // compaction.
+    _mrbs->clear(MemRegion(hr->compaction_top(), end));
+  }
+
   void free_humongous_region(HeapRegion* hr) {
     HeapWord* end = hr->end();
     FreeRegionList dummy_free_list("Dummy Free List for G1MarkSweep");
@@ -212,18 +227,15 @@
     _humongous_regions_removed.increment(1u, hr->capacity());
 
     _g1h->free_humongous_region(hr, &dummy_free_list, false /* par */);
-    hr->prepare_for_compaction(&_cp);
-    // Also clear the part of the card table that will be unused after
-    // compaction.
-    _mrbs->clear(MemRegion(hr->compaction_top(), end));
+    prepare_for_compaction(hr, end);
     dummy_free_list.remove_all();
   }
 
 public:
-  G1PrepareCompactClosure(CompactibleSpace* cs)
+  G1PrepareCompactClosure()
   : _g1h(G1CollectedHeap::heap()),
     _mrbs(_g1h->g1_barrier_set()),
-    _cp(NULL, cs, cs->initialize_threshold()),
+    _cp(NULL),
     _humongous_regions_removed() { }
 
   void update_sets() {
@@ -246,10 +258,7 @@
         assert(hr->continuesHumongous(), "Invalid humongous.");
       }
     } else {
-      hr->prepare_for_compaction(&_cp);
-      // Also clear the part of the card table that will be unused after
-      // compaction.
-      _mrbs->clear(MemRegion(hr->compaction_top(), hr->end()));
+      prepare_for_compaction(hr, hr->end());
     }
     return false;
   }
@@ -267,14 +276,7 @@
   GCTraceTime tm("phase 2", G1Log::fine() && Verbose, true, gc_timer(), gc_tracer()->gc_id());
   GenMarkSweep::trace("2");
 
-  // find the first region
-  HeapRegion* r = g1h->region_at(0);
-  CompactibleSpace* sp = r;
-  if (r->isHumongous() && oop(r->bottom())->is_gc_marked()) {
-    sp = r->next_compaction_space();
-  }
-
-  G1PrepareCompactClosure blk(sp);
+  G1PrepareCompactClosure blk;
   g1h->heap_region_iterate(&blk);
   blk.update_sets();
 }
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -381,18 +381,7 @@
 }
 
 CompactibleSpace* HeapRegion::next_compaction_space() const {
-  // We're not using an iterator given that it will wrap around when
-  // it reaches the last region and this is not what we want here.
-  G1CollectedHeap* g1h = G1CollectedHeap::heap();
-  uint index = hrs_index() + 1;
-  while (index < g1h->n_regions()) {
-    HeapRegion* hr = g1h->region_at(index);
-    if (!hr->isHumongous()) {
-      return hr;
-    }
-    index += 1;
-  }
-  return NULL;
+  return G1CollectedHeap::heap()->next_compaction_region(this);
 }
 
 void HeapRegion::note_self_forwarding_removal_start(bool during_initial_mark,
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -119,7 +119,7 @@
 public:
   const char* name() { return _name; }
 
-  uint length() { return _count.length(); }
+  uint length() const { return _count.length(); }
 
   bool is_empty() { return _count.length() == 0; }
 
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -180,7 +180,6 @@
     size_policy->major_collection_begin();
 
     CodeCache::gc_prologue();
-    Threads::gc_prologue();
     BiasedLocking::preserve_marks();
 
     // Capture heap size before collection for printing.
@@ -251,7 +250,6 @@
     MetaspaceAux::verify_metrics();
 
     BiasedLocking::restore_marks();
-    Threads::gc_epilogue();
     CodeCache::gc_epilogue();
     JvmtiExport::gc_epilogue();
 
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1066,7 +1066,6 @@
   ClassLoaderDataGraph::purge();
   MetaspaceAux::verify_metrics();
 
-  Threads::gc_epilogue();
   CodeCache::gc_epilogue();
   JvmtiExport::gc_epilogue();
 
@@ -2068,7 +2067,6 @@
     size_policy->major_collection_begin();
 
     CodeCache::gc_prologue();
-    Threads::gc_prologue();
 
     COMPILER2_PRESENT(DerivedPointerTable::clear());
 
--- a/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -25,29 +25,12 @@
 #ifndef SHARE_VM_INTERPRETER_ABSTRACTINTERPRETER_HPP
 #define SHARE_VM_INTERPRETER_ABSTRACTINTERPRETER_HPP
 
+#include "asm/macroAssembler.hpp"
 #include "code/stubs.hpp"
 #include "interpreter/bytecodes.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/vmThread.hpp"
 #include "utilities/top.hpp"
-#ifdef TARGET_ARCH_x86
-# include "interp_masm_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "interp_masm_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "interp_masm_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "interp_masm_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "interp_masm_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "interp_masm_ppc_64.hpp"
-#endif
 
 // This file contains the platform-independent parts
 // of the abstract interpreter and the abstract interpreter generator.
@@ -75,6 +58,8 @@
 //------------------------------------------------------------------------------------------------------------------------
 // The C++ interface to the bytecode interpreter(s).
 
+class InterpreterMacroAssembler;
+
 class AbstractInterpreter: AllStatic {
   friend class VMStructs;
   friend class Interpreter;
--- a/hotspot/src/share/vm/interpreter/bytecode.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/interpreter/bytecode.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -28,21 +28,7 @@
 #include "interpreter/bytecodes.hpp"
 #include "memory/allocation.hpp"
 #include "oops/method.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
 
 class ciBytecodeStream;
 
--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -32,21 +32,6 @@
 #include "runtime/frame.hpp"
 #include "runtime/globals.hpp"
 #include "utilities/globalDefinitions.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
 
 #ifdef CC_INTERP
 
@@ -56,6 +41,8 @@
 
 // CVM definitions find hotspot equivalents...
 
+class InterpreterMacroAssembler;
+
 union VMJavaVal64 {
     jlong   l;
     jdouble d;
--- a/hotspot/src/share/vm/interpreter/bytecodeStream.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/interpreter/bytecodeStream.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,21 +29,7 @@
 #include "memory/allocation.hpp"
 #include "oops/method.hpp"
 #include "runtime/handles.inline.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
 
 // A BytecodeStream is used for fast iteration over the bytecodes
 // of a Method*.
--- a/hotspot/src/share/vm/interpreter/bytecodes.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/interpreter/bytecodes.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -26,21 +26,7 @@
 #include "interpreter/bytecodes.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/method.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
 
 
 #if defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER < 1600))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/interpreter/interp_masm.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ */
+
+#ifndef SHARE_VM_INTERPRETER_INTERP_MASM_HPP
+#define SHARE_VM_INTERPRETER_INTERP_MASM_HPP
+
+#include "asm/macroAssembler.hpp"
+
+#ifdef TARGET_ARCH_x86
+# include "interp_masm_x86.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_sparc
+# include "interp_masm_sparc.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_zero
+# include "interp_masm_zero.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_arm
+# include "interp_masm_arm.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_ppc_32
+# include "interp_masm_ppc_32.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_ppc_64
+# include "interp_masm_ppc_64.hpp"
+#endif
+
+#endif // SHARE_VM_INTERPRETER_INTERP_MASM_HPP
--- a/hotspot/src/share/vm/interpreter/interpreter.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/interpreter/interpreter.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -30,6 +30,7 @@
 #include "interpreter/bytecodeInterpreter.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
@@ -80,9 +81,35 @@
   }
 }
 
+CodeletMark::CodeletMark(InterpreterMacroAssembler*& masm,
+                         const char* description,
+                         Bytecodes::Code bytecode) :
+  _clet((InterpreterCodelet*)AbstractInterpreter::code()->request(codelet_size())),
+  _cb(_clet->code_begin(), _clet->code_size()) {
+  // Request all space (add some slack for Codelet data).
+  assert(_clet != NULL, "we checked not enough space already");
+
+  // Initialize Codelet attributes.
+  _clet->initialize(description, bytecode);
+  // Create assembler for code generation.
+  masm = new InterpreterMacroAssembler(&_cb);
+  _masm = &masm;
+}
+
+CodeletMark::~CodeletMark() {
+  // Align so printing shows nop's instead of random code at the end (Codelets are aligned).
+  (*_masm)->align(wordSize);
+  // Make sure all code is in code buffer.
+  (*_masm)->flush();
+
+  // Commit Codelet.
+  AbstractInterpreter::code()->commit((*_masm)->code()->pure_insts_size(), (*_masm)->code()->strings());
+  // Make sure nobody can use _masm outside a CodeletMark lifespan.
+  *_masm = NULL;
+}
 
 //------------------------------------------------------------------------------------------------------------------------
-// Implementation of  platform independent aspects of Interpreter
+// Implementation of platform independent aspects of Interpreter
 
 void AbstractInterpreter::initialize() {
   if (_code != NULL) return;
--- a/hotspot/src/share/vm/interpreter/interpreter.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/interpreter/interpreter.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -37,6 +37,8 @@
 // This file contains the platform-independent parts
 // of the interpreter and the interpreter generator.
 
+class InterpreterMacroAssembler;
+
 //------------------------------------------------------------------------------------------------------------------------
 // An InterpreterCodelet is a piece of interpreter code. All
 // interpreter code is generated into little codelets which
@@ -99,42 +101,17 @@
     int codelet_size = AbstractInterpreter::code()->available_space() - 2*K;
 
     // Guarantee there's a little bit of code space left.
-    guarantee (codelet_size > 0 && (size_t)codelet_size >  2*K,
-               "not enough space for interpreter generation");
+    guarantee(codelet_size > 0 && (size_t)codelet_size > 2*K,
+              "not enough space for interpreter generation");
 
     return codelet_size;
   }
 
  public:
-  CodeletMark(
-    InterpreterMacroAssembler*& masm,
-    const char* description,
-    Bytecodes::Code bytecode = Bytecodes::_illegal):
-    _clet((InterpreterCodelet*)AbstractInterpreter::code()->request(codelet_size())),
-    _cb(_clet->code_begin(), _clet->code_size())
-
-  { // request all space (add some slack for Codelet data)
-    assert (_clet != NULL, "we checked not enough space already");
-
-    // initialize Codelet attributes
-    _clet->initialize(description, bytecode);
-    // create assembler for code generation
-    masm  = new InterpreterMacroAssembler(&_cb);
-    _masm = &masm;
-  }
-
-  ~CodeletMark() {
-    // align so printing shows nop's instead of random code at the end (Codelets are aligned)
-    (*_masm)->align(wordSize);
-    // make sure all code is in code buffer
-    (*_masm)->flush();
-
-
-    // commit Codelet
-    AbstractInterpreter::code()->commit((*_masm)->code()->pure_insts_size(), (*_masm)->code()->strings());
-    // make sure nobody can use _masm outside a CodeletMark lifespan
-    *_masm = NULL;
-  }
+  CodeletMark(InterpreterMacroAssembler*& masm,
+              const char* description,
+              Bytecodes::Code bytecode = Bytecodes::_illegal);
+  ~CodeletMark();
 };
 
 // Wrapper classes to produce Interpreter/InterpreterGenerator from either
@@ -142,9 +119,10 @@
 
 class Interpreter: public CC_INTERP_ONLY(CppInterpreter) NOT_CC_INTERP(TemplateInterpreter) {
 
-  public:
+ public:
   // Debugging/printing
-  static InterpreterCodelet* codelet_containing(address pc)     { return (InterpreterCodelet*)_code->stub_containing(pc); }
+  static InterpreterCodelet* codelet_containing(address pc) { return (InterpreterCodelet*)_code->stub_containing(pc); }
+
 #ifdef TARGET_ARCH_x86
 # include "interpreter_x86.hpp"
 #endif
--- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -48,6 +48,7 @@
 #include "runtime/deoptimization.hpp"
 #include "runtime/fieldDescriptor.hpp"
 #include "runtime/handles.inline.hpp"
+#include "runtime/icache.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/java.hpp"
 #include "runtime/jfieldIDWorkaround.hpp"
@@ -57,21 +58,6 @@
 #include "runtime/synchronizer.hpp"
 #include "runtime/threadCritical.hpp"
 #include "utilities/events.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vm_version_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vm_version_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vm_version_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vm_version_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vm_version_ppc.hpp"
-#endif
 #ifdef COMPILER2
 #include "opto/runtime.hpp"
 #endif
--- a/hotspot/src/share/vm/interpreter/templateInterpreter.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/interpreter/templateInterpreter.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -26,6 +26,8 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
+#include "interpreter/templateInterpreter.hpp"
 #include "interpreter/templateTable.hpp"
 
 #ifndef CC_INTERP
--- a/hotspot/src/share/vm/interpreter/templateInterpreter.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/interpreter/templateInterpreter.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -33,6 +33,8 @@
 
 #ifndef CC_INTERP
 
+class InterpreterMacroAssembler;
+
 //------------------------------------------------------------------------------------------------------------------------
 // A little wrapper class to group tosca-specific entry points into a unit.
 // (tosca = Top-Of-Stack CAche)
--- a/hotspot/src/share/vm/interpreter/templateTable.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/interpreter/templateTable.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "gc_interface/collectedHeap.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "runtime/timer.hpp"
 
--- a/hotspot/src/share/vm/interpreter/templateTable.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/interpreter/templateTable.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -28,24 +28,6 @@
 #include "interpreter/bytecodes.hpp"
 #include "memory/allocation.hpp"
 #include "runtime/frame.hpp"
-#ifdef TARGET_ARCH_x86
-# include "interp_masm_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "interp_masm_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "interp_masm_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "interp_masm_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "interp_masm_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "interp_masm_ppc_64.hpp"
-#endif
 
 #ifndef CC_INTERP
 // All the necessary definitions used for (bytecode) template generation. Instead of
@@ -53,6 +35,7 @@
 // and the snippet generator, a template is assigned to each bytecode which can be
 // used to generate the bytecode's implementation if needed.
 
+class InterpreterMacroAssembler;
 
 // A Template describes the properties of a code template for a given bytecode
 // and provides a generator to generate the code template.
--- a/hotspot/src/share/vm/memory/filemap.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/memory/filemap.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -30,6 +30,7 @@
 #include "runtime/arguments.hpp"
 #include "runtime/java.hpp"
 #include "runtime/os.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/memTracker.hpp"
 #include "utilities/defaultStream.hpp"
 
--- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1088,7 +1088,7 @@
   guarantee(_n_gens = 2, "Wrong number of generations");
   Generation* old_gen = _gens[1];
   // Start by compacting into same gen.
-  CompactPoint cp(old_gen, NULL, NULL);
+  CompactPoint cp(old_gen);
   old_gen->prepare_for_compaction(&cp);
   Generation* young_gen = _gens[0];
   young_gen->prepare_for_compaction(&cp);
--- a/hotspot/src/share/vm/memory/genMarkSweep.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/memory/genMarkSweep.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -76,7 +76,6 @@
   // When collecting the permanent generation Method*s may be moving,
   // so we either have to flush all bcp data or convert it into bci.
   CodeCache::gc_prologue();
-  Threads::gc_prologue();
 
   // Increment the invocation count
   _total_invocations++;
@@ -132,7 +131,6 @@
     rs->invalidate_or_clear(old_gen);
   }
 
-  Threads::gc_epilogue();
   CodeCache::gc_epilogue();
   JvmtiExport::gc_epilogue();
 
--- a/hotspot/src/share/vm/memory/space.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/memory/space.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -330,9 +330,9 @@
   Generation* gen;
   CompactibleSpace* space;
   HeapWord* threshold;
-  CompactPoint(Generation* _gen, CompactibleSpace* _space,
-               HeapWord* _threshold) :
-    gen(_gen), space(_space), threshold(_threshold) {}
+
+  CompactPoint(Generation* _gen) :
+    gen(_gen), space(NULL), threshold(0) {}
 };
 
 
--- a/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -28,6 +28,7 @@
 #include "gc_implementation/shared/gcUtil.hpp"
 #include "oops/typeArrayOop.hpp"
 #include "runtime/perfData.hpp"
+#include "runtime/vm_version.hpp"
 
 class GlobalTLABStats;
 
--- a/hotspot/src/share/vm/oops/constantPool.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/oops/constantPool.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -31,22 +31,8 @@
 #include "oops/symbol.hpp"
 #include "oops/typeArrayOop.hpp"
 #include "runtime/handles.hpp"
+#include "utilities/bytes.hpp"
 #include "utilities/constantTag.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
 
 // A ConstantPool is an array containing class constants as described in the
 // class file.
--- a/hotspot/src/share/vm/oops/method.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/oops/method.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -240,6 +240,9 @@
 
 
 int Method::bci_from(address bcp) const {
+  if (is_native() && bcp == 0) {
+    return 0;
+  }
 #ifdef ASSERT
   { ResourceMark rm;
   assert(is_native() && bcp == code_base() || contains(bcp) || is_error_reported(),
@@ -250,24 +253,23 @@
 }
 
 
-// Return (int)bcx if it appears to be a valid BCI.
-// Return bci_from((address)bcx) if it appears to be a valid BCP.
+int Method::validate_bci(int bci) const {
+  return (bci == 0 || bci < code_size()) ? bci : -1;
+}
+
+// Return bci if it appears to be a valid bcp
 // Return -1 otherwise.
 // Used by profiling code, when invalid data is a possibility.
 // The caller is responsible for validating the Method* itself.
-int Method::validate_bci_from_bcx(intptr_t bcx) const {
+int Method::validate_bci_from_bcp(address bcp) const {
   // keep bci as -1 if not a valid bci
   int bci = -1;
-  if (bcx == 0 || (address)bcx == code_base()) {
+  if (bcp == 0 || bcp == code_base()) {
     // code_size() may return 0 and we allow 0 here
     // the method may be native
     bci = 0;
-  } else if (frame::is_bci(bcx)) {
-    if (bcx < code_size()) {
-      bci = (int)bcx;
-    }
-  } else if (contains((address)bcx)) {
-    bci = (address)bcx - code_base();
+  } else if (contains(bcp)) {
+    bci = bcp - code_base();
   }
   // Assert that if we have dodged any asserts, bci is negative.
   assert(bci == -1 || bci == bci_from(bcp_from(bci)), "sane bci if >=0");
--- a/hotspot/src/share/vm/oops/method.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/oops/method.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -649,7 +649,8 @@
   // Returns the byte code index from the byte code pointer
   int     bci_from(address bcp) const;
   address bcp_from(int     bci) const;
-  int validate_bci_from_bcx(intptr_t bcx) const;
+  int validate_bci_from_bcp(address bcp) const;
+  int validate_bci(int bci) const;
 
   // Returns the line number for a bci if debugging information for the method is prowided,
   // -1 is returned otherwise.
--- a/hotspot/src/share/vm/oops/methodData.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/oops/methodData.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -2338,10 +2338,6 @@
     return dp - ((address)_data);
   }
 
-  address di_to_dp(int di) {
-    return (address)data_layout_at(di);
-  }
-
   // bci to di/dp conversion.
   address bci_to_dp(int bci);
   int bci_to_di(int bci) {
--- a/hotspot/src/share/vm/oops/oop.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/oops/oop.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -42,21 +42,6 @@
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/os.hpp"
 #include "utilities/macros.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
 
 // Implementation of all inlined member functions defined in oop.hpp
 // We need a separate file to avoid circular references
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/opto/ad.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ */
+
+#ifndef SHARE_VM_OPTO_AD_HPP
+#define SHARE_VM_OPTO_AD_HPP
+
+#ifdef TARGET_ARCH_MODEL_x86_32
+# include "adfiles/ad_x86_32.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_x86_64
+# include "adfiles/ad_x86_64.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_sparc
+# include "adfiles/ad_sparc.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_zero
+# include "adfiles/ad_zero.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_arm
+# include "adfiles/ad_arm.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_ppc_32
+# include "adfiles/ad_ppc_32.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_ppc_64
+# include "adfiles/ad_ppc_64.hpp"
+#endif
+
+#endif // SHARE_VM_OPTO_AD_HPP
--- a/hotspot/src/share/vm/opto/buildOopMap.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/buildOopMap.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "code/vmreg.inline.hpp"
 #include "compiler/oopMap.hpp"
 #include "opto/addnode.hpp"
 #include "opto/callnode.hpp"
@@ -32,21 +33,6 @@
 #include "opto/phase.hpp"
 #include "opto/regalloc.hpp"
 #include "opto/rootnode.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vmreg_ppc.inline.hpp"
-#endif
 
 // The functions in this file builds OopMaps after all scheduling is done.
 //
--- a/hotspot/src/share/vm/opto/c2compiler.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/c2compiler.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -24,28 +24,8 @@
 
 #include "precompiled.hpp"
 #include "opto/c2compiler.hpp"
+#include "opto/optoreg.hpp"
 #include "opto/runtime.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 // register information defined by ADLC
 extern const char register_save_policy[];
--- a/hotspot/src/share/vm/opto/compile.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/compile.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -69,27 +69,6 @@
 #include "runtime/timer.hpp"
 #include "trace/tracing.hpp"
 #include "utilities/copy.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 
 // -------------------- Compile::mach_constant_base_node -----------------------
--- a/hotspot/src/share/vm/opto/gcm.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/gcm.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -35,28 +35,6 @@
 #include "opto/rootnode.hpp"
 #include "opto/runtime.hpp"
 #include "runtime/deoptimization.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
-
 
 // Portions of code courtesy of Clifford Click
 
--- a/hotspot/src/share/vm/opto/lcm.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/lcm.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -24,33 +24,13 @@
 
 #include "precompiled.hpp"
 #include "memory/allocation.inline.hpp"
+#include "opto/ad.hpp"
 #include "opto/block.hpp"
 #include "opto/c2compiler.hpp"
 #include "opto/callnode.hpp"
 #include "opto/cfgnode.hpp"
 #include "opto/machnode.hpp"
 #include "opto/runtime.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 // Optimization - Graph Style
 
--- a/hotspot/src/share/vm/opto/library_call.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "asm/macroAssembler.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "compiler/compileBroker.hpp"
--- a/hotspot/src/share/vm/opto/locknode.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/locknode.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -28,27 +28,9 @@
 #include "opto/node.hpp"
 #include "opto/opcodes.hpp"
 #include "opto/subnode.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
+
+class BiasedLockingCounters;
+class RTMLockingCounters;
 
 //------------------------------BoxLockNode------------------------------------
 class BoxLockNode : public Node {
--- a/hotspot/src/share/vm/opto/matcher.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/matcher.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "memory/allocation.inline.hpp"
+#include "opto/ad.hpp"
 #include "opto/addnode.hpp"
 #include "opto/callnode.hpp"
 #include "opto/idealGraphPrinter.hpp"
@@ -37,27 +38,6 @@
 #include "opto/type.hpp"
 #include "opto/vectornode.hpp"
 #include "runtime/os.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 OptoReg::Name OptoReg::c_frame_pointer;
 
--- a/hotspot/src/share/vm/opto/optoreg.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/optoreg.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, 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
@@ -25,6 +25,30 @@
 #ifndef SHARE_VM_OPTO_OPTOREG_HPP
 #define SHARE_VM_OPTO_OPTOREG_HPP
 
+// AdGlobals contains c2 specific register handling code as specified
+// in the .ad files.
+#ifdef TARGET_ARCH_MODEL_x86_32
+# include "adfiles/adGlobals_x86_32.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_x86_64
+# include "adfiles/adGlobals_x86_64.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_sparc
+# include "adfiles/adGlobals_sparc.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_zero
+# include "adfiles/adGlobals_zero.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_arm
+# include "adfiles/adGlobals_arm.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_ppc_32
+# include "adfiles/adGlobals_ppc_32.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_ppc_64
+# include "adfiles/adGlobals_ppc_64.hpp"
+#endif
+
 //------------------------------OptoReg----------------------------------------
 // We eventually need Registers for the Real World.  Registers are essentially
 // non-SSA names.  A Register is represented as a number.  Non-regular values
--- a/hotspot/src/share/vm/opto/output.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/output.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -30,10 +30,12 @@
 #include "compiler/compileBroker.hpp"
 #include "compiler/oopMap.hpp"
 #include "memory/allocation.inline.hpp"
+#include "opto/ad.hpp"
 #include "opto/callnode.hpp"
 #include "opto/cfgnode.hpp"
 #include "opto/locknode.hpp"
 #include "opto/machnode.hpp"
+#include "opto/optoreg.hpp"
 #include "opto/output.hpp"
 #include "opto/regalloc.hpp"
 #include "opto/runtime.hpp"
--- a/hotspot/src/share/vm/opto/output.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/output.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -25,29 +25,9 @@
 #ifndef SHARE_VM_OPTO_OUTPUT_HPP
 #define SHARE_VM_OPTO_OUTPUT_HPP
 
+#include "opto/ad.hpp"
 #include "opto/block.hpp"
 #include "opto/node.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 class Arena;
 class Bundle;
--- a/hotspot/src/share/vm/opto/phaseX.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/phaseX.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1089,7 +1089,7 @@
 #endif
 
   while (i != NULL) {
-#ifndef PRODUCT
+#ifdef ASSERT
     if (loop_count >= K) {
       dump_infinite_loop_info(i);
     }
--- a/hotspot/src/share/vm/opto/regmask.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/regmask.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -23,29 +23,9 @@
  */
 
 #include "precompiled.hpp"
+#include "opto/ad.hpp"
 #include "opto/compile.hpp"
 #include "opto/regmask.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 #define RM_SIZE _RM_SIZE /* a constant private to the class RegMask */
 
--- a/hotspot/src/share/vm/opto/regmask.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/regmask.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -27,27 +27,6 @@
 
 #include "code/vmreg.hpp"
 #include "opto/optoreg.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/adGlobals_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/adGlobals_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/adGlobals_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/adGlobals_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/adGlobals_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/adGlobals_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/adGlobals_ppc_64.hpp"
-#endif
 
 // Some fun naming (textual) substitutions:
 //
--- a/hotspot/src/share/vm/opto/runtime.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/runtime.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/compiledIC.hpp"
 #include "code/icBuffer.hpp"
 #include "code/nmethod.hpp"
@@ -45,6 +46,7 @@
 #include "memory/oopFactory.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
+#include "opto/ad.hpp"
 #include "opto/addnode.hpp"
 #include "opto/callnode.hpp"
 #include "opto/cfgnode.hpp"
@@ -68,27 +70,6 @@
 #include "runtime/vframe_hp.hpp"
 #include "utilities/copy.hpp"
 #include "utilities/preserveException.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 
 // For debugging purposes:
--- a/hotspot/src/share/vm/opto/runtime.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/opto/runtime.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -27,6 +27,7 @@
 
 #include "code/codeBlob.hpp"
 #include "opto/machnode.hpp"
+#include "opto/optoreg.hpp"
 #include "opto/type.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/rtmLocking.hpp"
--- a/hotspot/src/share/vm/precompiled/precompiled.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/precompiled/precompiled.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -70,6 +70,7 @@
 # include "code/exceptionHandlerTable.hpp"
 # include "code/jvmticmlr.h"
 # include "code/location.hpp"
+# include "code/nativeInst.hpp"
 # include "code/nmethod.hpp"
 # include "code/oopRecorder.hpp"
 # include "code/pcDesc.hpp"
@@ -106,6 +107,7 @@
 # include "interpreter/bytecodes.hpp"
 # include "interpreter/cppInterpreter.hpp"
 # include "interpreter/interpreter.hpp"
+# include "interpreter/interp_masm.hpp"
 # include "interpreter/invocationCounter.hpp"
 # include "interpreter/linkResolver.hpp"
 # include "interpreter/templateInterpreter.hpp"
@@ -228,6 +230,7 @@
 # include "utilities/array.hpp"
 # include "utilities/bitMap.hpp"
 # include "utilities/bitMap.inline.hpp"
+# include "utilities/bytes.hpp"
 # include "utilities/constantTag.hpp"
 # include "utilities/copy.hpp"
 # include "utilities/debug.hpp"
@@ -250,6 +253,7 @@
 # include "libadt/dict.hpp"
 # include "libadt/set.hpp"
 # include "libadt/vectset.hpp"
+# include "opto/ad.hpp"
 # include "opto/addnode.hpp"
 # include "opto/adlcVMDeps.hpp"
 # include "opto/block.hpp"
--- a/hotspot/src/share/vm/prims/forte.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/prims/forte.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -234,9 +234,8 @@
     *method_p = method;
     if (!method->is_valid_method()) return false;
 
-    intptr_t bcx = fr->interpreter_frame_bcx();
-
-    int      bci = method->validate_bci_from_bcx(bcx);
+    address bcp = fr->interpreter_frame_bcp();
+    int bci = method->validate_bci_from_bcp(bcp);
 
     // note: bci is set to -1 if not a valid bci
     *bci_p = bci;
--- a/hotspot/src/share/vm/prims/jniCheck.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/prims/jniCheck.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -37,21 +37,6 @@
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/jfieldIDWorkaround.hpp"
 #include "runtime/thread.inline.hpp"
-#ifdef TARGET_ARCH_x86
-# include "jniTypes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "jniTypes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "jniTypes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "jniTypes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "jniTypes_ppc.hpp"
-#endif
 
 // Complain every extra number of unplanned local refs
 #define CHECK_JNI_LOCAL_REF_CAP_WARN_THRESHOLD 32
--- a/hotspot/src/share/vm/prims/jvm.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/prims/jvm.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -59,6 +59,7 @@
 #include "runtime/thread.inline.hpp"
 #include "runtime/vframe.hpp"
 #include "runtime/vm_operations.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/attachListener.hpp"
 #include "services/management.hpp"
 #include "services/threadService.hpp"
--- a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -28,21 +28,8 @@
 #include "oops/fieldStreams.hpp"
 #include "prims/jvmtiClassFileReconstituter.hpp"
 #include "runtime/signature.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
+
 // FIXME: add Deprecated attribute
 // FIXME: fix Synthetic attribute
 // FIXME: per Serguei, add error return handling for ConstantPool::copy_cpool_bytes()
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -26,6 +26,7 @@
 #include "classfile/symbolTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "jvmtifiles/jvmtiEnv.hpp"
 #include "oops/instanceMirrorKlass.hpp"
 #include "oops/objArrayKlass.hpp"
--- a/hotspot/src/share/vm/prims/unsafe.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/prims/unsafe.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -38,6 +38,7 @@
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/reflection.hpp"
 #include "runtime/synchronizer.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/threadService.hpp"
 #include "trace/tracing.hpp"
 #include "utilities/copy.hpp"
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 
+#include "code/codeCache.hpp"
 #include "memory/metadataFactory.hpp"
 #include "memory/universe.hpp"
 #include "oops/oop.inline.hpp"
@@ -38,6 +39,7 @@
 #include "runtime/arguments.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/os.hpp"
+#include "runtime/vm_version.hpp"
 
 #include "utilities/array.hpp"
 #include "utilities/debug.hpp"
--- a/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "code/codeCache.hpp"
 #include "runtime/advancedThresholdPolicy.hpp"
 #include "runtime/simpleThresholdPolicy.inline.hpp"
 
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -38,6 +38,7 @@
 #include "runtime/globals_extension.hpp"
 #include "runtime/java.hpp"
 #include "runtime/os.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/management.hpp"
 #include "services/memTracker.hpp"
 #include "utilities/defaultStream.hpp"
@@ -1537,8 +1538,10 @@
     heap_alignment = G1CollectedHeap::conservative_max_heap_alignment();
   }
 #endif // INCLUDE_ALL_GCS
-  _conservative_max_heap_alignment = MAX3(heap_alignment, os::max_page_size(),
-    CollectorPolicy::compute_heap_alignment());
+  _conservative_max_heap_alignment = MAX4(heap_alignment,
+                                          (size_t)os::vm_allocation_granularity(),
+                                          os::max_page_size(),
+                                          CollectorPolicy::compute_heap_alignment());
 }
 
 void Arguments::set_ergonomics_flags() {
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "classfile/systemDictionary.hpp"
+#include "code/codeCache.hpp"
 #include "code/debugInfoRec.hpp"
 #include "code/nmethod.hpp"
 #include "code/pcDesc.hpp"
@@ -50,44 +51,6 @@
 #include "runtime/vframe_hp.hpp"
 #include "utilities/events.hpp"
 #include "utilities/xmlstream.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vmreg_ppc.inline.hpp"
-#endif
-#ifdef COMPILER2
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
-#endif // COMPILER2
 
 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
 
--- a/hotspot/src/share/vm/runtime/dtraceJSDT.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/dtraceJSDT.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "classfile/javaClasses.hpp"
 #include "code/codeBlob.hpp"
+#include "code/nativeInst.hpp"
 #include "memory/allocation.hpp"
 #include "prims/jvm.h"
 #include "runtime/dtraceJSDT.hpp"
--- a/hotspot/src/share/vm/runtime/dtraceJSDT.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/dtraceJSDT.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -26,21 +26,6 @@
 #define SHARE_VM_RUNTIME_DTRACEJSDT_HPP
 
 #include "code/nmethod.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-#endif
 
 class RegisteredProbes;
 typedef jlong OpaqueProbes;
--- a/hotspot/src/share/vm/runtime/fprofiler.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/fprofiler.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "classfile/classLoader.hpp"
+#include "code/codeCache.hpp"
 #include "code/vtableStubs.hpp"
 #include "gc_interface/collectedHeap.inline.hpp"
 #include "interpreter/interpreter.hpp"
--- a/hotspot/src/share/vm/runtime/frame.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/frame.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -23,6 +23,8 @@
  */
 
 #include "precompiled.hpp"
+#include "code/codeCache.hpp"
+#include "code/vmreg.inline.hpp"
 #include "compiler/abstractCompiler.hpp"
 #include "compiler/disassembler.hpp"
 #include "gc_interface/collectedHeap.inline.hpp"
@@ -48,21 +50,6 @@
 #include "runtime/thread.inline.hpp"
 #include "utilities/decoder.hpp"
 
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-#endif
 
 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
 
@@ -412,91 +399,32 @@
   *interpreter_frame_method_addr() = method;
 }
 
-void frame::interpreter_frame_set_bcx(intptr_t bcx) {
-  assert(is_interpreted_frame(), "Not an interpreted frame");
-  if (ProfileInterpreter) {
-    bool formerly_bci = is_bci(interpreter_frame_bcx());
-    bool is_now_bci = is_bci(bcx);
-    *interpreter_frame_bcx_addr() = bcx;
-
-    intptr_t mdx = interpreter_frame_mdx();
-
-    if (mdx != 0) {
-      if (formerly_bci) {
-        if (!is_now_bci) {
-          // The bcx was just converted from bci to bcp.
-          // Convert the mdx in parallel.
-          MethodData* mdo = interpreter_frame_method()->method_data();
-          assert(mdo != NULL, "");
-          int mdi = mdx - 1; // We distinguish valid mdi from zero by adding one.
-          address mdp = mdo->di_to_dp(mdi);
-          interpreter_frame_set_mdx((intptr_t)mdp);
-        }
-      } else {
-        if (is_now_bci) {
-          // The bcx was just converted from bcp to bci.
-          // Convert the mdx in parallel.
-          MethodData* mdo = interpreter_frame_method()->method_data();
-          assert(mdo != NULL, "");
-          int mdi = mdo->dp_to_di((address)mdx);
-          interpreter_frame_set_mdx((intptr_t)mdi + 1); // distinguish valid from 0.
-        }
-      }
-    }
-  } else {
-    *interpreter_frame_bcx_addr() = bcx;
-  }
-}
-
 jint frame::interpreter_frame_bci() const {
   assert(is_interpreted_frame(), "interpreted frame expected");
-  intptr_t bcx = interpreter_frame_bcx();
-  return is_bci(bcx) ? bcx : interpreter_frame_method()->bci_from((address)bcx);
-}
-
-void frame::interpreter_frame_set_bci(jint bci) {
-  assert(is_interpreted_frame(), "interpreted frame expected");
-  assert(!is_bci(interpreter_frame_bcx()), "should not set bci during GC");
-  interpreter_frame_set_bcx((intptr_t)interpreter_frame_method()->bcp_from(bci));
+  address bcp = interpreter_frame_bcp();
+  return interpreter_frame_method()->bci_from(bcp);
 }
 
 address frame::interpreter_frame_bcp() const {
   assert(is_interpreted_frame(), "interpreted frame expected");
-  intptr_t bcx = interpreter_frame_bcx();
-  return is_bci(bcx) ? interpreter_frame_method()->bcp_from(bcx) : (address)bcx;
+  return (address)*interpreter_frame_bcp_addr();
 }
 
 void frame::interpreter_frame_set_bcp(address bcp) {
   assert(is_interpreted_frame(), "interpreted frame expected");
-  assert(!is_bci(interpreter_frame_bcx()), "should not set bcp during GC");
-  interpreter_frame_set_bcx((intptr_t)bcp);
-}
-
-void frame::interpreter_frame_set_mdx(intptr_t mdx) {
-  assert(is_interpreted_frame(), "Not an interpreted frame");
-  assert(ProfileInterpreter, "must be profiling interpreter");
-  *interpreter_frame_mdx_addr() = mdx;
+  *interpreter_frame_bcp_addr() = (intptr_t)bcp;
 }
 
 address frame::interpreter_frame_mdp() const {
   assert(ProfileInterpreter, "must be profiling interpreter");
   assert(is_interpreted_frame(), "interpreted frame expected");
-  intptr_t bcx = interpreter_frame_bcx();
-  intptr_t mdx = interpreter_frame_mdx();
-
-  assert(!is_bci(bcx), "should not access mdp during GC");
-  return (address)mdx;
+  return (address)*interpreter_frame_mdp_addr();
 }
 
 void frame::interpreter_frame_set_mdp(address mdp) {
   assert(is_interpreted_frame(), "interpreted frame expected");
-  if (mdp == NULL) {
-    // Always allow the mdp to be cleared.
-    interpreter_frame_set_mdx((intptr_t)mdp);
-  }
-  intptr_t bcx = interpreter_frame_bcx();
-  assert(!is_bci(bcx), "should not set mdp during GC");
-  interpreter_frame_set_mdx((intptr_t)mdp);
+  assert(ProfileInterpreter, "must be profiling interpreter");
+  *interpreter_frame_mdp_addr() = (intptr_t)mdp;
 }
 
 BasicObjectLock* frame::next_monitor_in_interpreter_frame(BasicObjectLock* current) const {
@@ -1182,24 +1110,6 @@
   }
 }
 
-void frame::gc_prologue() {
-  if (is_interpreted_frame()) {
-    // set bcx to bci to become Method* position independent during GC
-    interpreter_frame_set_bcx(interpreter_frame_bci());
-  }
-}
-
-
-void frame::gc_epilogue() {
-  if (is_interpreted_frame()) {
-    // set bcx back to bcp for interpreter
-    interpreter_frame_set_bcx((intptr_t)interpreter_frame_bcp());
-  }
-  // call processor specific epilog function
-  pd_gc_epilog();
-}
-
-
 # ifdef ENABLE_ZAP_DEAD_LOCALS
 
 void frame::CheckValueClosure::do_oop(oop* p) {
--- a/hotspot/src/share/vm/runtime/frame.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/frame.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -30,29 +30,6 @@
 #include "runtime/monitorChunk.hpp"
 #include "runtime/registerMap.hpp"
 #include "utilities/top.hpp"
-#ifdef COMPILER2
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/adGlobals_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/adGlobals_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/adGlobals_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/adGlobals_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/adGlobals_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/adGlobals_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/adGlobals_ppc_64.hpp"
-#endif
-#endif // COMPILER2
 #ifdef ZERO
 #ifdef TARGET_ARCH_zero
 # include "stack_zero.hpp"
@@ -241,8 +218,8 @@
 
  private:
   intptr_t** interpreter_frame_locals_addr() const;
-  intptr_t*  interpreter_frame_bcx_addr() const;
-  intptr_t*  interpreter_frame_mdx_addr() const;
+  intptr_t*  interpreter_frame_bcp_addr() const;
+  intptr_t*  interpreter_frame_mdp_addr() const;
 
  public:
   // Locals
@@ -252,23 +229,13 @@
 
   void interpreter_frame_set_locals(intptr_t* locs);
 
-  // byte code index/pointer (use these functions for unchecked frame access only!)
-  intptr_t interpreter_frame_bcx() const                  { return *interpreter_frame_bcx_addr(); }
-  void interpreter_frame_set_bcx(intptr_t bcx);
-
   // byte code index
   jint interpreter_frame_bci() const;
-  void interpreter_frame_set_bci(jint bci);
 
   // byte code pointer
   address interpreter_frame_bcp() const;
   void    interpreter_frame_set_bcp(address bcp);
 
-  // Unchecked access to the method data index/pointer.
-  // Only use this if you know what you are doing.
-  intptr_t interpreter_frame_mdx() const                  { return *interpreter_frame_mdx_addr(); }
-  void interpreter_frame_set_mdx(intptr_t mdx);
-
   // method data pointer
   address interpreter_frame_mdp() const;
   void    interpreter_frame_set_mdp(address dp);
@@ -437,10 +404,6 @@
   // RedefineClasses support for finding live interpreted methods on the stack
   void metadata_do(void f(Metadata*));
 
-  void gc_prologue();
-  void gc_epilogue();
-  void pd_gc_epilog();
-
 # ifdef ENABLE_ZAP_DEAD_LOCALS
  private:
   class CheckValueClosure: public OopClosure {
@@ -477,7 +440,6 @@
   // Verification
   void verify(const RegisterMap* map);
   static bool verify_return_pc(address x);
-  static bool is_bci(intptr_t bcx);
   // Usage:
   // assert(frame::verify_return_pc(return_address), "must be a return pc");
 
--- a/hotspot/src/share/vm/runtime/frame.inline.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/frame.inline.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -31,21 +31,6 @@
 #include "oops/method.hpp"
 #include "runtime/frame.hpp"
 #include "runtime/signature.hpp"
-#ifdef TARGET_ARCH_x86
-# include "jniTypes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "jniTypes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "jniTypes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "jniTypes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "jniTypes_ppc.hpp"
-#endif
 #ifdef ZERO
 #ifdef TARGET_ARCH_zero
 # include "entryFrame_zero.hpp"
@@ -55,26 +40,6 @@
 #endif
 #endif
 
-// This file holds platform-independent bodies of inline functions for frames.
-
-// Note: The bcx usually contains the bcp; however during GC it contains the bci
-//       (changed by gc_prologue() and gc_epilogue()) to be Method* position
-//       independent. These accessors make sure the correct value is returned
-//       by testing the range of the bcx value. bcp's are guaranteed to be above
-//       max_method_code_size, since methods are always allocated in OldSpace and
-//       Eden is allocated before OldSpace.
-//
-//       The bcp is accessed sometimes during GC for ArgumentDescriptors; than
-//       the correct translation has to be performed (was bug).
-
-inline bool frame::is_bci(intptr_t bcx) {
-#ifdef _LP64
-  return ((uintptr_t) bcx) <= ((uintptr_t) max_method_code_size) ;
-#else
-  return 0 <= bcx && bcx <= max_method_code_size;
-#endif
-}
-
 inline bool frame::is_entry_frame() const {
   return StubRoutines::returns_to_call_stub(pc());
 }
--- a/hotspot/src/share/vm/runtime/java.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/java.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -65,21 +65,6 @@
 #include "utilities/histogram.hpp"
 #include "utilities/macros.hpp"
 #include "utilities/vmError.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vm_version_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vm_version_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vm_version_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vm_version_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vm_version_ppc.hpp"
-#endif
 #if INCLUDE_ALL_GCS
 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
 #include "gc_implementation/parallelScavenge/psScavenge.hpp"
--- a/hotspot/src/share/vm/runtime/os.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/os.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -27,6 +27,7 @@
 #include "classfile/javaClasses.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "gc_implementation/shared/vmGCOperations.hpp"
@@ -49,6 +50,7 @@
 #include "runtime/os.inline.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "runtime/thread.inline.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/attachListener.hpp"
 #include "services/memTracker.hpp"
 #include "services/threadService.hpp"
--- a/hotspot/src/share/vm/runtime/registerMap.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/registerMap.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -27,21 +27,6 @@
 
 #include "code/vmreg.hpp"
 #include "utilities/globalDefinitions.hpp"
-#ifdef TARGET_ARCH_x86
-# include "register_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "register_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "register_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "register_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "register_ppc.hpp"
-#endif
 
 class JavaThread;
 
--- a/hotspot/src/share/vm/runtime/relocator.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/relocator.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -27,21 +27,7 @@
 
 #include "interpreter/bytecodes.hpp"
 #include "oops/method.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
 
 // This code has been converted from the 1.1E java virtual machine
 // Thanks to the JavaTopics group for using the code
--- a/hotspot/src/share/vm/runtime/rframe.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/rframe.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "code/codeCache.hpp"
 #include "interpreter/interpreter.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
--- a/hotspot/src/share/vm/runtime/safepoint.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/safepoint.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -56,26 +56,6 @@
 #include "services/runtimeService.hpp"
 #include "utilities/events.hpp"
 #include "utilities/macros.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-# include "vmreg_ppc.inline.hpp"
-#endif
 #if INCLUDE_ALL_GCS
 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
 #include "gc_implementation/shared/suspendibleThreadSet.hpp"
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/compiledIC.hpp"
 #include "code/scopeDesc.hpp"
 #include "code/vtableStubs.hpp"
@@ -59,26 +60,6 @@
 #include "utilities/hashtable.inline.hpp"
 #include "utilities/macros.hpp"
 #include "utilities/xmlstream.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-# include "vmreg_ppc.inline.hpp"
-#endif
 #ifdef COMPILER1
 #include "c1/c1_Runtime1.hpp"
 #endif
--- a/hotspot/src/share/vm/runtime/stackValueCollection.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/stackValueCollection.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -24,21 +24,6 @@
 
 #include "precompiled.hpp"
 #include "runtime/stackValueCollection.hpp"
-#ifdef TARGET_ARCH_x86
-# include "jniTypes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "jniTypes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "jniTypes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "jniTypes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "jniTypes_ppc.hpp"
-#endif
 
 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
 
--- a/hotspot/src/share/vm/runtime/statSampler.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/statSampler.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -33,21 +33,7 @@
 #include "runtime/javaCalls.hpp"
 #include "runtime/os.hpp"
 #include "runtime/statSampler.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vm_version_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vm_version_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vm_version_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vm_version_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vm_version_ppc.hpp"
-#endif
+#include "runtime/vm_version.hpp"
 
 // --------------------------------------------------------
 // StatSamplerTask
--- a/hotspot/src/share/vm/runtime/stubRoutines.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/stubRoutines.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -31,21 +31,6 @@
 #include "runtime/mutexLocker.hpp"
 #include "runtime/stubCodeGenerator.hpp"
 #include "utilities/top.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-#endif
 
 // StubRoutines provides entry points to assembly routines used by
 // compiled code and the run-time system. Platform-specific entry
--- a/hotspot/src/share/vm/runtime/thread.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -27,6 +27,7 @@
 #include "classfile/javaClasses.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/scopeDesc.hpp"
 #include "compiler/compileBroker.hpp"
 #include "interpreter/interpreter.hpp"
@@ -74,6 +75,7 @@
 #include "runtime/vframe_hp.hpp"
 #include "runtime/vmThread.hpp"
 #include "runtime/vm_operations.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/attachListener.hpp"
 #include "services/management.hpp"
 #include "services/memTracker.hpp"
@@ -2647,20 +2649,6 @@
 }
 
 
-// GC support
-static void frame_gc_epilogue(frame* f, const RegisterMap* map) { f->gc_epilogue(); }
-
-void JavaThread::gc_epilogue() {
-  frames_do(frame_gc_epilogue);
-}
-
-
-static void frame_gc_prologue(frame* f, const RegisterMap* map) { f->gc_prologue(); }
-
-void JavaThread::gc_prologue() {
-  frames_do(frame_gc_prologue);
-}
-
 // If the caller is a NamedThread, then remember, in the current scope,
 // the given JavaThread in its _processed_thread field.
 class RememberProcessedThread: public StackObj {
@@ -4149,18 +4137,6 @@
   }
 }
 
-void Threads::gc_epilogue() {
-  ALL_JAVA_THREADS(p) {
-    p->gc_epilogue();
-  }
-}
-
-void Threads::gc_prologue() {
-  ALL_JAVA_THREADS(p) {
-    p->gc_prologue();
-  }
-}
-
 void Threads::deoptimized_wrt_marked_nmethods() {
   ALL_JAVA_THREADS(p) {
     p->deoptimized_wrt_marked_nmethods();
--- a/hotspot/src/share/vm/runtime/thread.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/thread.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1416,10 +1416,6 @@
   // RedefineClasses Support
   void metadata_do(void f(Metadata*));
 
-  // Memory management operations
-  void gc_epilogue();
-  void gc_prologue();
-
   // Misc. operations
   char* name() const { return (char*)get_thread_name(); }
   void print_on(outputStream* st) const;
@@ -1899,8 +1895,6 @@
   // RedefineClasses support
   static void metadata_do(void f(Metadata*));
 
-  static void gc_epilogue();
-  static void gc_prologue();
 #ifdef ASSERT
   static bool is_vm_complete() { return _vm_complete; }
 #endif
--- a/hotspot/src/share/vm/runtime/vframe.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/vframe.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -511,8 +511,8 @@
 
 inline void vframeStreamCommon::fill_from_interpreter_frame() {
   Method* method = _frame.interpreter_frame_method();
-  intptr_t  bcx    = _frame.interpreter_frame_bcx();
-  int       bci    = method->validate_bci_from_bcx(bcx);
+  address   bcp    = _frame.interpreter_frame_bcp();
+  int       bci    = method->validate_bci_from_bcp(bcp);
   // 6379830 AsyncGetCallTrace sometimes feeds us wild frames.
   if (bci < 0) {
     found_bad_method_frame();
--- a/hotspot/src/share/vm/runtime/vframeArray.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/vframeArray.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/vmreg.inline.hpp"
 #include "interpreter/bytecode.hpp"
 #include "interpreter/interpreter.hpp"
 #include "memory/allocation.inline.hpp"
@@ -296,9 +297,9 @@
     src->lock()->move_to(src->obj(), top->lock());
   }
   if (ProfileInterpreter) {
-    iframe()->interpreter_frame_set_mdx(0); // clear out the mdp.
+    iframe()->interpreter_frame_set_mdp(0); // clear out the mdp.
   }
-  iframe()->interpreter_frame_set_bcx((intptr_t)bcp); // cannot use bcp because frame is not initialized yet
+  iframe()->interpreter_frame_set_bcp(bcp);
   if (ProfileInterpreter) {
     MethodData* mdo = method()->method_data();
     if (mdo != NULL) {
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -193,33 +193,13 @@
 #include "opto/movenode.hpp"
 #include "opto/narrowptrnode.hpp"
 #include "opto/opaquenode.hpp"
+#include "opto/optoreg.hpp"
 #include "opto/phaseX.hpp"
 #include "opto/parse.hpp"
 #include "opto/regalloc.hpp"
 #include "opto/rootnode.hpp"
 #include "opto/subnode.hpp"
 #include "opto/vectornode.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/adGlobals_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/adGlobals_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/adGlobals_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/adGlobals_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/adGlobals_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/adGlobals_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/adGlobals_ppc_64.hpp"
-#endif
 #endif // COMPILER2
 
 // Note: the cross-product of (c1, c2, product, nonproduct, ...),
--- a/hotspot/src/share/vm/runtime/vm_operations.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/vm_operations.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "classfile/symbolTable.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "compiler/compileBroker.hpp"
 #include "compiler/compilerOracle.hpp"
 #include "gc_implementation/shared/isGCActiveMark.hpp"
--- a/hotspot/src/share/vm/runtime/vm_version.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -26,21 +26,7 @@
 #include "memory/universe.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/arguments.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vm_version_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vm_version_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vm_version_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vm_version_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vm_version_ppc.hpp"
-#endif
+#include "runtime/vm_version.hpp"
 
 const char* Abstract_VM_Version::_s_vm_release = Abstract_VM_Version::vm_release();
 const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Version::internal_vm_info_string();
--- a/hotspot/src/share/vm/runtime/vm_version.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/runtime/vm_version.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -128,4 +128,20 @@
   static unsigned int calc_parallel_worker_threads();
 };
 
+#ifdef TARGET_ARCH_x86
+# include "vm_version_x86.hpp"
+#endif
+#ifdef TARGET_ARCH_sparc
+# include "vm_version_sparc.hpp"
+#endif
+#ifdef TARGET_ARCH_zero
+# include "vm_version_zero.hpp"
+#endif
+#ifdef TARGET_ARCH_arm
+# include "vm_version_arm.hpp"
+#endif
+#ifdef TARGET_ARCH_ppc
+# include "vm_version_ppc.hpp"
+#endif
+
 #endif // SHARE_VM_RUNTIME_VM_VERSION_HPP
--- a/hotspot/src/share/vm/services/diagnosticCommand.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/services/diagnosticCommand.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -25,17 +25,16 @@
 #ifndef SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP
 #define SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP
 
+#include "classfile/vmSymbols.hpp"
 #include "runtime/arguments.hpp"
-#include "classfile/vmSymbols.hpp"
-#include "utilities/ostream.hpp"
-#include "runtime/vm_version.hpp"
+#include "runtime/os.hpp"
 #include "runtime/vmThread.hpp"
-#include "runtime/os.hpp"
 #include "services/diagnosticArgument.hpp"
 #include "services/diagnosticCommand.hpp"
+#include "services/diagnosticCommand_ext.hpp"
 #include "services/diagnosticFramework.hpp"
-#include "services/diagnosticCommand_ext.hpp"
 #include "utilities/macros.hpp"
+#include "utilities/ostream.hpp"
 
 class HelpDCmd : public DCmdWithParser {
 protected:
--- a/hotspot/src/share/vm/services/diagnosticFramework.hpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/services/diagnosticFramework.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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,7 +29,6 @@
 #include "memory/allocation.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/os.hpp"
-#include "runtime/vm_version.hpp"
 #include "runtime/vmThread.hpp"
 #include "utilities/ostream.hpp"
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/utilities/bytes.hpp	Thu Jul 24 13:18:15 2014 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ */
+
+#ifndef SHARE_VM_UTILITIES_BYTES_HPP
+#define SHARE_VM_UTILITIES_BYTES_HPP
+
+#ifdef TARGET_ARCH_x86
+# include "bytes_x86.hpp"
+#endif
+#ifdef TARGET_ARCH_sparc
+# include "bytes_sparc.hpp"
+#endif
+#ifdef TARGET_ARCH_zero
+# include "bytes_zero.hpp"
+#endif
+#ifdef TARGET_ARCH_arm
+# include "bytes_arm.hpp"
+#endif
+#ifdef TARGET_ARCH_ppc
+# include "bytes_ppc.hpp"
+#endif
+
+#endif // SHARE_VM_UTILITIES_BYTES_HPP
--- a/hotspot/src/share/vm/utilities/debug.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/utilities/debug.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -48,6 +48,7 @@
 #include "runtime/stubRoutines.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/vframe.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/heapDumper.hpp"
 #include "utilities/defaultStream.hpp"
 #include "utilities/events.hpp"
--- a/hotspot/src/share/vm/utilities/ostream.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/utilities/ostream.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -28,6 +28,7 @@
 #include "oops/oop.inline.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/os.hpp"
+#include "runtime/vm_version.hpp"
 #include "utilities/defaultStream.hpp"
 #include "utilities/ostream.hpp"
 #include "utilities/top.hpp"
--- a/hotspot/src/share/vm/utilities/vmError.cpp	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/src/share/vm/utilities/vmError.cpp	Thu Jul 24 13:18:15 2014 -0700
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "code/codeCache.hpp"
 #include "compiler/compileBroker.hpp"
 #include "gc_interface/collectedHeap.hpp"
 #include "prims/whitebox.hpp"
--- a/hotspot/test/TEST.groups	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/TEST.groups	Thu Jul 24 13:18:15 2014 -0700
@@ -117,15 +117,6 @@
 # Tests that require compact3 API's
 #
 needs_compact3 = \
-  compiler/8009761/Test8009761.java \
-  compiler/whitebox/DeoptimizeMethodTest.java \
-  compiler/whitebox/SetForceInlineMethodTest.java \
-  compiler/whitebox/SetDontInlineMethodTest.java \
-  compiler/whitebox/DeoptimizeAllTest.java \
-  compiler/whitebox/MakeMethodNotCompilableTest.java \
-  compiler/whitebox/ClearMethodStateTest.java \
-  compiler/whitebox/EnqueueMethodForCompilationTest.java \
-  compiler/whitebox/IsMethodCompilableTest.java \
   gc/6581734/Test6581734.java \
   gc/7072527/TestFullGCCount.java \
   gc/g1/TestHumongousAllocInitialMark.java \
@@ -138,11 +129,7 @@
   runtime/InternalApi/ThreadCpuTimesDeadlock.java \
   serviceability/threads/TestFalseDeadLock.java \
   serviceability/jvmti/GetObjectSizeOverflow.java \
-  serviceability/jvmti/TestRedefineWithUnresolvedClass.java \
-  compiler/tiered/NonTieredLevelsTest.java \
-  compiler/tiered/TieredLevelsTest.java \
-  compiler/intrinsics/bmi/verifycode \
-  runtime/whitebox/WBStackSize.java
+  serviceability/jvmti/TestRedefineWithUnresolvedClass.java
 
 # Compact 2 adds full VM tests
 compact2 = \
@@ -199,8 +186,7 @@
 
 # Tests that require compact2 API's
 #
-needs_compact2 = \
-  compiler/6589834/Test_ia32.java
+needs_compact2 =
 
 # All tests that run on the most minimal configuration: Minimal VM on Compact 1
 compact1_minimal = \
--- a/hotspot/test/compiler/5091921/Test6890943.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/5091921/Test6890943.java	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -27,163 +27,195 @@
  * @bug 6890943
  * @summary JVM mysteriously gives wrong result on 64-bit 1.6 VMs in hotspot mode.
  *
- * @run shell/timeout=240 Test6890943.sh
+ * @run main/othervm/timeout=240 Test6890943
  */
-import java.util.*;
+
 import java.io.*;
-import java.util.regex.*;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Scanner;
 
 public class Test6890943 {
-  public static final boolean AIR = true, ROCK = false;
-  public static void main(String[] args) {
-    new Test6890943().go();
-  }
+    public static final boolean AIR = true, ROCK = false;
+    private static final Path PATH = Paths.get(System.getProperty("test.src", "."));
+    private static final Path INPUT_FILE = PATH.resolve("input6890943.txt");
+    private static final Path GOLDEN_FILE = PATH.resolve("output6890943.txt");
+
+    public static void main(String[] args) {
+        new Test6890943().go();
+    }
 
-  int r, c, f, t;
-  boolean[][] grid;
+    int r, c, f, t;
+    boolean[][] grid;
+
+    public void go() {
+        Scanner in, golden;
+        try {
+            in = new Scanner(new FileInputStream(INPUT_FILE.toFile()));
+            golden = new Scanner(new FileInputStream(GOLDEN_FILE.toFile()));
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException("TEST failure: can't open test file", e);
+        }
+        in.useDelimiter("\\s+");
+        golden.useDelimiter("\\s+");
 
-  public void go() {
-    Scanner s = new Scanner(System.in);
-    s.useDelimiter("\\s+");
-    int T = s.nextInt();
-    for (t = 0 ; t < T ; t++) {
-      r = s.nextInt(); c = s.nextInt(); f = s.nextInt();
-      grid = new boolean[r][c];
-      for (int x = 0 ; x < r ; x++) {
-        String line = s.next();
-        for (int y = 0 ; y < c ; y++) grid[x][y] = line.charAt(y) == '.';
-      }
-      int digs = solve();
-      String res = digs == -1 ? "No" : "Yes " + digs;
-      System.out.printf("Case #%d: %s\n", t+1, res);
+        int T = in.nextInt();
+        for (t = 0; t < T; t++) {
+            r = in.nextInt();
+            c = in.nextInt();
+            f = in.nextInt();
+            grid = new boolean[r][c];
+            for (int x = 0; x < r; x++) {
+                String line = in.next();
+                for (int y = 0; y < c; y++) {
+                    grid[x][y] = line.charAt(y) == '.';
+                }
+            }
+            int digs = solve();
+            String result = "Case #" + (t + 1) + ": " + (digs == -1 ? "No" : "Yes " + digs);
+            System.out.println(result);
+            // Compare with golden string from the file
+            String goldenStr = golden.nextLine();
+            if (!result.equals(goldenStr)) {
+                System.err.println("FAIL: strings are not equal\n"
+                        + "-- Result: " + result + "\n"
+                        + "-- Golden: " + goldenStr);
+                throw new RuntimeException("FAIL: Result string is not equal to the golden");
+            }
+        }
     }
-  }
 
-  Map<Integer, Integer> M = new HashMap<Integer, Integer>();
+    Map<Integer, Integer> M = new HashMap<Integer, Integer>();
 
-  private int solve() {
-    M = new HashMap<Integer, Integer>();
-    M.put(calcWalkingRange(0, 0), 0);
-    for (int digDown = 0 ; digDown < r ; digDown++) {
-      Map<Integer, Integer> tries = new HashMap<Integer, Integer>();
-      for (Map.Entry<Integer, Integer> m : M.entrySet()) {
-        int q = m.getKey();
-        if (depth(q) != (digDown)) continue;
-        if (stuck(q)) continue;
-        tries.put(q, m.getValue());
-      }
+    private int solve() {
+        M = new HashMap<Integer, Integer>();
+        M.put(calcWalkingRange(0, 0), 0);
+        for (int digDown = 0; digDown < r; digDown++) {
+            Map<Integer, Integer> tries = new HashMap<Integer, Integer>();
+            for (Map.Entry<Integer, Integer> m : M.entrySet()) {
+                int q = m.getKey();
+                if (depth(q) != (digDown)) continue;
+                if (stuck(q)) continue;
+                tries.put(q, m.getValue());
+            }
+
+            for (Map.Entry<Integer, Integer> m : tries.entrySet()) {
+                int q = m.getKey();
+                int fallLeftDelta = 0, fallRightDelta = 0;
+                //fall left
+                int fallLeft = fall(digDown, start(q));
+                if (fallLeft > 0) {
+                    fallLeftDelta = 1;
+                    if (fallLeft <= f) addToM(calcWalkingRange(digDown + fallLeft, start(q)), m.getValue());
+                }
+
+                //fall right
+                int fallRight = fall(digDown, end(q));
+                if (fallRight > 0) {
+                    fallRightDelta = 1;
+
+                    if (fallRight <= f) addToM(calcWalkingRange(digDown + fallRight, end(q)), m.getValue());
+                }
 
-      for (Map.Entry<Integer, Integer> m : tries.entrySet()) {
-        int q = m.getKey();
-        int fallLeftDelta = 0, fallRightDelta = 0;
-        //fall left
-        int fallLeft = fall(digDown, start(q));
-        if (fallLeft > 0) {
-          fallLeftDelta = 1;
-          if (fallLeft <= f) addToM(calcWalkingRange(digDown+fallLeft, start(q)), m.getValue());
-        }
+                for (int p = start(q) + fallLeftDelta; p <= end(q) - fallRightDelta; p++) {
+                    //goLeft
+                    for (int digSpot = p; digSpot > start(q) + fallLeftDelta; digSpot--) {
+                        int fallDown = 1 + fall(digDown + 1, digSpot);
+                        if (fallDown <= f) {
+                            if (fallDown == 1) {
+                                addToM(calcWalkingRange(digDown + 1, digSpot, digSpot, p),
+                                        m.getValue() + Math.abs(digSpot - p) + 1);
+                            } else {
+                                addToM(calcWalkingRange(digDown + fallDown, digSpot),
+                                        m.getValue() + Math.abs(digSpot - p) + 1);
+                            }
+                        }
+                    }
 
-        //fall right
-        int fallRight = fall(digDown, end(q));
-        if (fallRight > 0) {
-          fallRightDelta = 1;
-
-          if (fallRight <= f) addToM(calcWalkingRange(digDown+fallRight, end(q)), m.getValue());
+                    //goRight
+                    for (int digSpot = p; digSpot < end(q) - fallRightDelta; digSpot++) {
+                        int fallDown = 1 + fall(digDown + 1, digSpot);
+                        if (fallDown <= f) {
+                            if (fallDown == 1) {
+                                addToM(calcWalkingRange(digDown + 1, digSpot, p, digSpot),
+                                        m.getValue() + Math.abs(digSpot - p) + 1);
+                            } else {
+                                addToM(calcWalkingRange(digDown + fallDown, digSpot),
+                                        m.getValue() + Math.abs(digSpot - p) + 1);
+                            }
+                        }
+                    }
+                }
+            }
         }
 
-        for (int p = start(q) + fallLeftDelta ; p <= end(q) - fallRightDelta ; p++) {
-          //goLeft
-          for (int digSpot = p ; digSpot > start(q) +fallLeftDelta ; digSpot--) {
-            int fallDown = 1+fall(digDown+1, digSpot);
-            if (fallDown <= f) {
-              if (fallDown == 1) {
-                addToM(calcWalkingRange(digDown + 1, digSpot, digSpot, p), m.getValue() + Math.abs(digSpot-p)+1);
-              } else {
-                addToM(calcWalkingRange(digDown + fallDown, digSpot), m.getValue() + Math.abs(digSpot-p)+1);
-              }
-            }
-          }
+        int result = Integer.MAX_VALUE;
+        for (Map.Entry<Integer, Integer> m : M.entrySet()) {
+            if (depth(m.getKey()) == r - 1) result = Math.min(m.getValue(), result);
+        }
 
-          //goRight
-          for (int digSpot = p ; digSpot < end(q)-fallRightDelta ;digSpot++) {
-            int fallDown = 1+fall(digDown+1, digSpot);
-            if (fallDown <= f) {
-              if (fallDown == 1) {
-                addToM(calcWalkingRange(digDown + 1, digSpot, p, digSpot), m.getValue() + Math.abs(digSpot-p)+1);
-              } else {
-                addToM(calcWalkingRange(digDown + fallDown, digSpot), m.getValue() + Math.abs(digSpot-p)+1);
-              }
-            }
-          }
-        }
-      }
+        if (result == Integer.MAX_VALUE) return -1;
+        return result;
+    }
+
+    private void addToM(int q, int i) {
+        Integer original = M.get(q);
+        if (original == null) M.put(q, i);
+        else M.put(q, Math.min(original, i));
     }
 
-    int result = Integer.MAX_VALUE;
-    for (Map.Entry<Integer, Integer> m : M.entrySet()) {
-      if (depth(m.getKey()) == r-1) result = Math.min(m.getValue(), result);
+    private int fall(int row, int column) {
+        int res = 0;
+        for (int p = row + 1; p < r; p++) {
+            if (grid[p][column] == AIR) res++;
+            else break;
+        }
+        return res;
+    }
+
+    private boolean stuck(int q) {
+        return start(q) == end(q);
+    }
+
+    private int depth(int q) {
+        return q % 50;
     }
 
-    if (result == Integer.MAX_VALUE) return -1;
-    return result;
-  }
-
-  private void addToM(int q, int i) {
-    Integer original = M.get(q);
-    if ( original == null ) M.put(q, i);
-    else M.put(q, Math.min(original, i));
-  }
-
-  private int fall(int row, int column) {
-    int res = 0;
-    for ( int p = row+1 ; p < r ; p++) {
-      if (grid[p][column] == AIR) res++;
-      else break;
+    private int start(int q) {
+        return q / (50 * 50);
     }
-    return res;
-  }
-
-  private boolean stuck(int q) {
-    return start(q) == end(q);
-  }
-
-  private int depth(int q) {
-    return q % 50;
-  }
 
-  private int start(int q) {
-    return q / (50*50);
-  }
-
-  private int end(int q) {
-    return (q / 50) % 50;
-  }
-
-  private int calcWalkingRange(int depth, int pos) {
-    return calcWalkingRange(depth, pos, Integer.MAX_VALUE, Integer.MIN_VALUE);
-  }
-
-  private int calcWalkingRange(int depth, int pos, int airOverrideStart, int airOverrideEnd) {
-    int left = pos, right = pos;
-    if (depth >= r) return (c-1)*50 + depth;
+    private int end(int q) {
+        return (q / 50) % 50;
+    }
 
-    while (left > 0) {
-      if (grid[depth][left-1] == ROCK && (left-1 < airOverrideStart || left-1 > airOverrideEnd)) break;
-      if (depth < r-1 && grid[depth+1][left-1] == AIR) {
-        left--;
-        break;
-      }
-      left--;
-    }
-    while (right < c-1) {
-      if (grid[depth][right+1] == ROCK && (right+1 < airOverrideStart || right+1 > airOverrideEnd)) break;
-      if (depth < r-1 && grid[depth+1][right+1] == AIR) {
-        right++;
-        break;
-      }
-      right++;
+    private int calcWalkingRange(int depth, int pos) {
+        return calcWalkingRange(depth, pos, Integer.MAX_VALUE, Integer.MIN_VALUE);
     }
 
-    return left *50*50 + right*50 + depth;
-  }
+    private int calcWalkingRange(int depth, int pos, int airOverrideStart, int airOverrideEnd) {
+        int left = pos, right = pos;
+        if (depth >= r) return (c - 1) * 50 + depth;
+
+        while (left > 0) {
+            if (grid[depth][left - 1] == ROCK && (left - 1 < airOverrideStart || left - 1 > airOverrideEnd)) break;
+            if (depth < r - 1 && grid[depth + 1][left - 1] == AIR) {
+                left--;
+                break;
+            }
+            left--;
+        }
+        while (right < c - 1) {
+            if (grid[depth][right + 1] == ROCK && (right + 1 < airOverrideStart || right + 1 > airOverrideEnd)) break;
+            if (depth < r - 1 && grid[depth + 1][right + 1] == AIR) {
+                right++;
+                break;
+            }
+            right++;
+        }
+
+        return left * 50 * 50 + right * 50 + depth;
+    }
 }
--- a/hotspot/test/compiler/5091921/Test6890943.sh	Tue Jul 22 11:56:22 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-#!/bin/sh
-# 
-# Copyright (c) 2011, 2013, 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.
-# 
-# 
-## some tests require path to find test source dir
-if [ "${TESTSRC}" = "" ]
-then
-  TESTSRC=${PWD}
-  echo "TESTSRC not set.  Using "${TESTSRC}" as default"
-fi
-echo "TESTSRC=${TESTSRC}"
-## Adding common setup Variables for running shell tests.
-. ${TESTSRC}/../../test_env.sh
-
-
-set -x
-
-cp ${TESTSRC}/Test6890943.java .
-cp ${TESTSRC}/input6890943.txt .
-cp ${TESTSRC}/output6890943.txt .
-cp ${TESTSRC}/Test6890943.sh .
-
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} -d . Test6890943.java
-
-${TESTJAVA}/bin/java -XX:-PrintVMOptions -XX:+IgnoreUnrecognizedVMOptions ${TESTVMOPTS} Test6890943 < input6890943.txt > pretest.out 2>&1
-
-# This test sometimes tickles an unrelated performance warning that interferes with diff.
-grep -v 'warning: Performance bug: SystemDictionary' pretest.out > test.out
-
-diff output6890943.txt test.out
-
-result=$?
-if [ $result -eq 0 ]
-then
-  echo "Passed"
-  exit 0
-else
-  echo "Failed"
-  exit 1
-fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/6589834/InlinedArrayCloneTestCase.java	Thu Jul 24 13:18:15 2014 -0700
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+
+public class InlinedArrayCloneTestCase implements Runnable {
+    private Test_ia32 executionController;
+
+    public InlinedArrayCloneTestCase(Test_ia32 executionController) {
+        this.executionController = executionController;
+    }
+
+    /*
+     * Please leave following two methods (invokeArrayClone and verifyArguments)
+     * static.
+     *
+     * It does not really matter if these methods are static or instance,
+     * original issue could be reproduced in both cases, but if these methods
+     * are static then it is much easier to understand that reproduced issue
+     * is actually interpreter's stack corruption.
+     *
+     * If these methods are non-static, then interpreter's stack will contain
+     * invalid 'this' pointer required for instance's method call and
+     * verifyArguments' call may throw NullPointerException. There was another
+     * issue w/ NPE after deoptimization addressed by JDK-6833129, so NPE looks
+     * a little bit confusing.
+     *
+     * If these methods are static then after deptimization we'll get incorrect
+     * arguments values in verifyArguments.
+     * Something like "2, -1289936896, 3, 4" instead of "1, 2, 3, 4".
+     * This information tells much more about actual issue comparing to NPE,
+     * so it's preferable to leave these methods static.
+     */
+    private static int verifyArguments(int i1, int i2, LoadedClass[] arr,
+            int i3, int i4) {
+        if (!(i1==1 && i2==2 && i3==3 && i4==4)) {
+            throw new RuntimeException(String.format(
+                    "Arguments have unexpected values: %d, %d, %d, %d",
+                    i1, i2, i3, i4));
+        }
+        return arr.length;
+    }
+
+    private static int invokeArrayClone(LoadedClass[] a) {
+        return InlinedArrayCloneTestCase.verifyArguments(1, 2, a.clone(), 3, 4);
+    }
+
+    @Override
+    public void run() {
+        LoadedClass[] array = executionController.getArray();
+        int length;
+
+        while (executionController.continueExecution()) {
+            try {
+                length = InlinedArrayCloneTestCase.invokeArrayClone(array);
+            } catch (Throwable e) {
+                e.printStackTrace();
+                executionController.setTestFailed();
+                return;
+            }
+            if (length != array.length) {
+                System.out.println(String.format("f(array) returned %d "
+                        + "instead of %d.", length, array.length));
+                executionController.setTestFailed();
+            }
+        }
+    }
+}
--- a/hotspot/test/compiler/6589834/Test_ia32.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/6589834/Test_ia32.java	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2014, 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
@@ -24,103 +24,116 @@
 /**
  * @test
  * @bug 6589834
- * @summary deoptimization problem with -XX:+DeoptimizeALot
- *
- * @run main Test_ia32
+ * @summary Safepoint placed between stack pointer increment and decrement leads
+ *          to interpreter's stack corruption after deoptimization.
+ * @library /testlibrary /testlibrary/whitebox
+ * @build ClassFileInstaller sun.hotspot.WhiteBox com.oracle.java.testlibrary.*
+ *        Test_ia32 InlinedArrayCloneTestCase
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ *                              sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI -XX:CompileOnly=InlinedArrayCloneTestCase
+ *      -XX:CompileCommand=dontinline,InlinedArrayCloneTestCase.invokeArrayClone
+ *      -XX:CompileCommand=inline,InlinedArrayCloneTestCase.verifyArguments
+ *      -XX:+IgnoreUnrecognizedVMOptions -XX:+VerifyStack Test_ia32
  */
 
-/***************************************************************************************
-NOTE: The bug shows up (with several "Bug!" message) even without the
-      flag -XX:+DeoptimizeALot. In a debug build, you may want to try
-      the flags -XX:+VerifyStack and -XX:+DeoptimizeALot to get more information.
-****************************************************************************************/
-import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+import com.oracle.java.testlibrary.Asserts;
+import sun.hotspot.WhiteBox;
 
 public class Test_ia32 {
+    private static final int NUM_THREADS
+            = Math.min(100, 2 * Runtime.getRuntime().availableProcessors());
+    private static final int CLONE_LENGTH = 1000;
 
-    public static int NUM_THREADS = 100;
+    private static WhiteBox wb = WhiteBox.getWhiteBox();
+
+    private final LoadedClass[] ARRAY = new LoadedClass[Test_ia32.CLONE_LENGTH];
+    private volatile boolean doSpin = true;
+    private volatile boolean testFailed = false;
 
-    public static int CLONE_LENGTH = 1000;
+    public boolean continueExecution() {
+        return doSpin;
+    }
+
+    public void stopExecution() {
+        doSpin = false;
+    }
+
+    public boolean isTestFailed() {
+        return testFailed;
+    }
 
-    public static void main(String[] args) throws InterruptedException, ClassNotFoundException {
+    public void setTestFailed() {
+        this.testFailed = true;
+        stopExecution();
+    }
+
+    public LoadedClass[] getArray() {
+        return ARRAY;
+    }
+
+    public void runTest() {
+        Thread[] threads = new Thread[Test_ia32.NUM_THREADS];
+        Method method;
 
-        Reflector[] threads = new Reflector[NUM_THREADS];
+        try {
+            method = InlinedArrayCloneTestCase.class.getDeclaredMethod(
+                    "invokeArrayClone", LoadedClass[].class);
+        } catch (NoSuchMethodException e) {
+            throw new Error("Tested method not found", e);
+        }
+
+        Asserts.assertTrue(wb.isMethodCompilable(method),
+                "Method " + method.getName() + " should be compilable.");
+
         for (int i = 0; i < threads.length; i++) {
-            threads[i] = new Reflector();
+            threads[i] = new Thread(new InlinedArrayCloneTestCase(this));
             threads[i].start();
         }
 
-        System.out.println("Give Reflector.run() some time to compile...");
-        Thread.sleep(5000);
+        /*
+         * Wait until InlinedArrayCloneTestCase::invokeArrayClone is compiled.
+         */
+        while (!wb.isMethodCompiled(method)) {
+            Thread.yield();
+        }
 
-        System.out.println("Load RMISecurityException causing run() deoptimization");
-        ClassLoader.getSystemClassLoader().loadClass("java.rmi.RMISecurityException");
+        /*
+         * Load NotLoadedClass to cause deoptimization of
+         * InlinedArrayCloneTestCase::invokeArrayClone due to invalidated
+         * dependency.
+         */
+        try {
+            Class.forName("NotLoadedClass");
+        } catch (ClassNotFoundException e) {
+            throw new Error("Unable to load class that invalidates "
+                    + "CHA-dependency for method " + method.getName(), e);
+        }
 
-        for (Reflector thread : threads)
-            thread.requestStop();
+        stopExecution();
 
-        for (Reflector thread : threads)
+        for (Thread thread : threads) {
             try {
                 thread.join();
             } catch (InterruptedException e) {
-                System.out.println(e);
+                throw new Error("Fail to join thread " + thread, e);
             }
-
-    }
-
-}
-
-class Reflector extends Thread {
-
-    volatile boolean _doSpin = true;
-
-    Test_ia32[] _tests;
-
-    Reflector() {
-        _tests = new Test_ia32[Test_ia32.CLONE_LENGTH];
-        for (int i = 0; i < _tests.length; i++) {
-            _tests[i] = new Test_ia32();
-        }
-    }
-
-    static int g(int i1, int i2, Test_ia32[] arr, int i3, int i4) {
-
-        if (!(i1==1 && i2==2 && i3==3 && i4==4)) {
-            System.out.println("Bug!");
         }
 
-        return arr.length;
+        Asserts.assertFalse(isTestFailed(), "Test failed.");
     }
 
-    static int f(Test_ia32[] arr) {
-        return g(1, 2, arr.clone(), 3, 4);
+    public static void main(String[] args) {
+        new Test_ia32().runTest();
     }
-
-    @Override
-    public void run() {
-        Constructor[] ctrs = null;
-        Class<Test_ia32> klass = Test_ia32.class;
-        try {
-            ctrs = klass.getConstructors();
-        } catch (SecurityException e) {
-            System.out.println(e);
-        }
+}
 
-        try {
-            while (_doSpin) {
-                if (f(_tests) < 0)
-                    System.out.println("return value usage");
-            }
-        } catch (NullPointerException e) {
-            e.printStackTrace();
-        }
+class LoadedClass {
+}
 
-        System.out.println(this + " - stopped.");
-    }
-
-    public void requestStop() {
-        System.out.println(this + " - stop requested.");
-        _doSpin = false;
-    }
-
+@SuppressWarnings("unused")
+class NotLoadedClass extends LoadedClass {
 }
--- a/hotspot/test/compiler/8004051/Test8004051.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/8004051/Test8004051.java	Thu Jul 24 13:18:15 2014 -0700
@@ -28,7 +28,7 @@
  * @bug 8005722
  * @summary assert(_oprs_len[mode] < maxNumberOfOperands) failed: array overflow
  *
- * @run main/othervm -Xcomp -client Test8004051
+ * @run main/othervm -Xcomp Test8004051
  */
 
 public class Test8004051 {
--- a/hotspot/test/compiler/ciReplay/TestSA.sh	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/ciReplay/TestSA.sh	Thu Jul 24 13:18:15 2014 -0700
@@ -26,7 +26,7 @@
 ##
 ## @test
 ## @bug 8011675
-## @ignore 8032226, 8031978
+## @ignore 8031978
 ## @summary testing of ciReplay with using generated by SA replay.txt 
 ## @author igor.ignatyev@oracle.com
 ## @run shell TestSA.sh
--- a/hotspot/test/compiler/ciReplay/TestVM.sh	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/ciReplay/TestVM.sh	Thu Jul 24 13:18:15 2014 -0700
@@ -26,7 +26,6 @@
 ##
 ## @test
 ## @bug 8011675
-## @ignore 8031978
 ## @summary testing of ciReplay with using generated by VM replay.txt 
 ## @author igor.ignatyev@oracle.com
 ## @run shell TestVM.sh
--- a/hotspot/test/compiler/ciReplay/TestVM_no_comp_level.sh	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/ciReplay/TestVM_no_comp_level.sh	Thu Jul 24 13:18:15 2014 -0700
@@ -26,7 +26,6 @@
 ##
 ## @test
 ## @bug 8011675
-## @ignore 8031978
 ## @summary testing of ciReplay with using generated by VM replay.txt w/o comp_level
 ## @author igor.ignatyev@oracle.com
 ## @run shell TestVM_no_comp_level.sh
--- a/hotspot/test/compiler/ciReplay/common.sh	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/ciReplay/common.sh	Thu Jul 24 13:18:15 2014 -0700
@@ -1,6 +1,6 @@
 #!/bin/sh
 # 
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2014, 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
@@ -223,21 +223,29 @@
             -XX:CICrashAt=1 \
             -XX:+CreateMinidumpOnCrash \
             -XX:+DumpReplayDataOnError \
+            -XX:-TransmitErrorReport \
+            -XX:+PreferInterpreterNativeStubs \
+            -XX:+PrintCompilation \
             -XX:ReplayDataFile=${replay_data} \
             -version"
     echo GENERATION OF REPLAY.TXT:
     echo $cmd
 
     ${cmd} > crash.out 2>&1
-    
+
+    exit_code=$?
+    if [ ${exit_code} -eq 0 ]
+    then
+        cat crash.out
+        test_fail 3 "CHECK :: CRASH" "JVM exits gracefully"
+    fi
+
     core_locations=`grep -i core crash.out | grep "location:" | \
             sed -e 's/.*location: //'`
-    echo CRASH OUTPUT:
-    cat crash.out    
-    
-    if [ "${core_locations}" = "" ]
+   
+    if [ -z "${core_locations}" ]
     then
-        test_fail 2 "CHECK :: CORE_LOCATION" "output doesn't contain the location of core file, see crash.out"
+        test_fail 4 "CHECK :: CORE_LOCATION" "output doesn't contain the location of core file, see crash.out"
     fi
 
     rm crash.out 
@@ -245,16 +253,19 @@
     # processing core locations for *nix
     if [ $VM_OS != "windows" ]
     then
-        # remove 'or' between '/core.<pid>' and 'core'
+        # remove 'or' between '<core_path>/core.<pid>' and 'core'
+        # and the rest of line -- ' (max size ...) . To ensure a full core ...'
         core_locations=`echo $core_locations | \
-                sed -e 's/\([^ ]*\) or \([^ ]*\)/\1 \2/'`
-        # add <core_path>/core.<pid> core.<pid>
+                sed -e 's/\([^ ]*\) or \([^ ]*\).*/\1 \2/'`
         core_with_dir=`echo $core_locations | awk '{print $1}'`
+        core_with_pid=`echo $core_locations | awk '{print $2}'`
         dir=`dirname $core_with_dir`
-        core_with_pid=`echo $core_locations | awk '{print $2}'`
-        if [ -n ${core_with_pid} ]
+        file=`basename $core_with_dir`
+        # add <core_path>/core.<pid> core
+        core_locations="'$core_with_dir' '$file'"
+        if [ -n "${core_with_pid}" ]
         then
-            core_locations="$core_locations $dir${FS}$core_with_pid $core_with_pid"
+            core_locations="$core_locations '$core_with_pid' '$dir${FS}$core_with_pid'"
         fi
     fi
 
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/BmiIntrinsicBase.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/BmiIntrinsicBase.java	Thu Jul 24 13:18:15 2014 -0700
@@ -146,6 +146,10 @@
         }
 
         protected int countCpuInstructions(byte[] nativeCode) {
+            return countCpuInstructions(nativeCode, instrMask, instrPattern);
+        }
+
+        public static int countCpuInstructions(byte[] nativeCode, byte[] instrMask, byte[] instrPattern) {
             int count = 0;
             int patternSize = Math.min(instrMask.length, instrPattern.length);
             boolean found;
@@ -183,4 +187,21 @@
             return "UseBMI1Instructions";
         }
     }
+
+    abstract static class BmiTestCase_x64 extends BmiTestCase {
+        protected byte[] instrMask_x64;
+        protected byte[] instrPattern_x64;
+
+        protected BmiTestCase_x64(Method method) {
+            super(method);
+        }
+
+        protected int countCpuInstructions(byte[] nativeCode) {
+            int cnt = super.countCpuInstructions(nativeCode);
+            if (Platform.isX64()) { // on x64 platform the instruction we search for can be encoded in 2 different ways
+                cnt += countCpuInstructions(nativeCode, instrMask_x64, instrPattern_x64);
+            }
+            return cnt;
+        }
+    }
 }
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestI.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestI.java	Thu Jul 24 13:18:15 2014 -0700
@@ -33,12 +33,15 @@
 
 import java.lang.reflect.Method;
 
-public class LZcntTestI extends BmiIntrinsicBase.BmiTestCase {
+public class LZcntTestI extends BmiIntrinsicBase.BmiTestCase_x64 {
 
     protected LZcntTestI(Method method) {
         super(method);
         instrMask = new byte[]{(byte) 0xFF, (byte) 0xFF, (byte) 0xFF};
         instrPattern = new byte[]{(byte) 0xF3, (byte) 0x0F, (byte) 0xBD};
+
+        instrMask_x64 = new byte[]{(byte) 0xFF, (byte) 0x00, (byte) 0xFF, (byte) 0xFF};
+        instrPattern_x64 = new byte[]{(byte) 0xF3, (byte) 0x00, (byte) 0x0F, (byte) 0xBD};
     }
 
     public static void main(String[] args) throws Exception {
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestL.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestL.java	Thu Jul 24 13:18:15 2014 -0700
@@ -31,8 +31,6 @@
  *                   -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCountLeadingZerosInstruction LZcntTestL
  */
 
-import com.oracle.java.testlibrary.Platform;
-
 import java.lang.reflect.Method;
 
 public class LZcntTestL extends LZcntTestI {
@@ -40,10 +38,6 @@
     protected LZcntTestL(Method method) {
         super(method);
         isLongOperation = true;
-        if (Platform.isX64()) {
-            instrMask = new byte[]{(byte) 0xFF, (byte) 0x00, (byte) 0xFF, (byte) 0xFF};
-            instrPattern = new byte[]{(byte) 0xF3, (byte) 0x00, (byte) 0x0F, (byte) 0xBD};
-        }
     }
 
     public static void main(String[] args) throws Exception {
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestI.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestI.java	Thu Jul 24 13:18:15 2014 -0700
@@ -33,12 +33,15 @@
 
 import java.lang.reflect.Method;
 
-public class TZcntTestI extends BmiIntrinsicBase.BmiTestCase {
+public class TZcntTestI extends BmiIntrinsicBase.BmiTestCase_x64 {
 
     protected TZcntTestI(Method method) {
         super(method);
         instrMask = new byte[]{(byte) 0xFF, (byte) 0xFF, (byte) 0xFF};
         instrPattern = new byte[]{(byte) 0xF3, (byte) 0x0F, (byte) 0xBC};
+
+        instrMask_x64 = new byte[]{(byte) 0xFF, (byte) 0x00, (byte) 0xFF, (byte) 0xFF};
+        instrPattern_x64 = new byte[]{(byte) 0xF3, (byte) 0x00, (byte) 0x0F, (byte) 0xBC};
     }
 
     public static void main(String[] args) throws Exception {
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestL.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestL.java	Thu Jul 24 13:18:15 2014 -0700
@@ -31,8 +31,6 @@
  *                   -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCountTrailingZerosInstruction TZcntTestL
  */
 
-import com.oracle.java.testlibrary.Platform;
-
 import java.lang.reflect.Method;
 
 public class TZcntTestL extends TZcntTestI {
@@ -40,11 +38,6 @@
     protected TZcntTestL(Method method) {
         super(method);
         isLongOperation = true;
-        if (Platform.isX64()) {
-            instrMask = new byte[]{(byte) 0xFF, (byte) 0x00, (byte) 0xFF, (byte) 0xFF};
-            instrPattern = new byte[]{(byte) 0xF3, (byte) 0x00, (byte) 0x0F, (byte) 0xBC};
-        }
-        isLongOperation = true;
     }
 
     public static void main(String[] args) throws Exception {
--- a/hotspot/test/compiler/tiered/NonTieredLevelsTest.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/tiered/NonTieredLevelsTest.java	Thu Jul 24 13:18:15 2014 -0700
@@ -25,8 +25,8 @@
 
 /**
  * @test NonTieredLevelsTest
+ * @library /testlibrary /testlibrary/whitebox /compiler/whitebox
  * @ignore 8046268
- * @library /testlibrary /testlibrary/whitebox /compiler/whitebox
  * @build NonTieredLevelsTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:-TieredCompilation
--- a/hotspot/test/compiler/tiered/TieredLevelsTest.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/tiered/TieredLevelsTest.java	Thu Jul 24 13:18:15 2014 -0700
@@ -23,8 +23,8 @@
 
 /**
  * @test TieredLevelsTest
+ * @library /testlibrary /testlibrary/whitebox /compiler/whitebox
  * @ignore 8046268
- * @library /testlibrary /testlibrary/whitebox /compiler/whitebox
  * @build TieredLevelsTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+TieredCompilation
--- a/hotspot/test/compiler/whitebox/ClearMethodStateTest.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/whitebox/ClearMethodStateTest.java	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -25,9 +25,9 @@
 
 /*
  * @test ClearMethodStateTest
- * @ignore 8046268
  * @bug 8006683 8007288 8022832
  * @library /testlibrary /testlibrary/whitebox
+ * @ignore 8046268
  * @build ClearMethodStateTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* ClearMethodStateTest
--- a/hotspot/test/compiler/whitebox/CompilerWhiteBoxTest.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/whitebox/CompilerWhiteBoxTest.java	Thu Jul 24 13:18:15 2014 -0700
@@ -21,11 +21,8 @@
  * questions.
  */
 
-import com.sun.management.HotSpotDiagnosticMXBean;
-import com.sun.management.VMOption;
 import sun.hotspot.WhiteBox;
 import sun.hotspot.code.NMethod;
-import sun.management.ManagementFactoryHelper;
 
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Executable;
@@ -98,15 +95,7 @@
      */
     protected static String getVMOption(String name) {
         Objects.requireNonNull(name);
-        HotSpotDiagnosticMXBean diagnostic
-                = ManagementFactoryHelper.getDiagnosticMXBean();
-        VMOption tmp;
-        try {
-            tmp = diagnostic.getVMOption(name);
-        } catch (IllegalArgumentException e) {
-            tmp = null;
-        }
-        return (tmp == null ? null : tmp.getValue());
+        return Objects.toString(WHITE_BOX.getVMFlag(name), null);
     }
 
     /**
@@ -174,7 +163,7 @@
      * @see #test()
      */
     protected final void runTest() {
-        if (ManagementFactoryHelper.getCompilationMXBean() == null) {
+        if (CompilerWhiteBoxTest.MODE.startsWith("interpreted ")) {
             System.err.println(
                     "Warning: test is not applicable in interpreted mode");
             return;
--- a/hotspot/test/compiler/whitebox/DeoptimizeAllTest.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/whitebox/DeoptimizeAllTest.java	Thu Jul 24 13:18:15 2014 -0700
@@ -23,9 +23,9 @@
 
 /*
  * @test DeoptimizeAllTest
- * @ignore 8046268
  * @bug 8006683 8007288 8022832
  * @library /testlibrary /testlibrary/whitebox
+ * @ignore 8046268
  * @build DeoptimizeAllTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* DeoptimizeAllTest
--- a/hotspot/test/compiler/whitebox/DeoptimizeMethodTest.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/whitebox/DeoptimizeMethodTest.java	Thu Jul 24 13:18:15 2014 -0700
@@ -23,9 +23,9 @@
 
 /*
  * @test DeoptimizeMethodTest
- * @ignore 8046268
  * @bug 8006683 8007288 8022832
  * @library /testlibrary /testlibrary/whitebox
+ * @ignore 8046268
  * @build DeoptimizeMethodTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* DeoptimizeMethodTest
--- a/hotspot/test/compiler/whitebox/EnqueueMethodForCompilationTest.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/whitebox/EnqueueMethodForCompilationTest.java	Thu Jul 24 13:18:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -23,9 +23,9 @@
 
 /*
  * @test EnqueueMethodForCompilationTest
- * @ignore 8046268
  * @bug 8006683 8007288 8022832
  * @library /testlibrary /testlibrary/whitebox
+ * @ignore 8046268
  * @build EnqueueMethodForCompilationTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm/timeout=600 -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* EnqueueMethodForCompilationTest
--- a/hotspot/test/compiler/whitebox/GetNMethodTest.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/whitebox/GetNMethodTest.java	Thu Jul 24 13:18:15 2014 -0700
@@ -26,9 +26,9 @@
 
 /*
  * @test GetNMethodTest
- * @ignore 8046268
  * @bug 8038240
  * @library /testlibrary /testlibrary/whitebox
+ * @ignore 8046268
  * @build GetNMethodTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* GetNMethodTest
--- a/hotspot/test/compiler/whitebox/MakeMethodNotCompilableTest.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/compiler/whitebox/MakeMethodNotCompilableTest.java	Thu Jul 24 13:18:15 2014 -0700
@@ -23,9 +23,9 @@
 
 /*
  * @test MakeMethodNotCompilableTest
- * @ignore 8046268
  * @bug 8012322 8006683 8007288 8022832
  * @library /testlibrary /testlibrary/whitebox
+ * @ignore 8046268
  * @build MakeMethodNotCompilableTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm/timeout=2400 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* MakeMethodNotCompilableTest
--- a/hotspot/test/runtime/whitebox/WBStackSize.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/runtime/whitebox/WBStackSize.java	Thu Jul 24 13:18:15 2014 -0700
@@ -39,7 +39,6 @@
  * Please file a test bug, if this is a problem.
  */
 
-import com.sun.management.HotSpotDiagnosticMXBean;
 import sun.hotspot.WhiteBox;
 
 public class WBStackSize {
@@ -81,8 +80,7 @@
     }
 
     public static void main(String[] args) {
-        HotSpotDiagnosticMXBean bean = sun.management.ManagementFactoryHelper.getDiagnosticMXBean();
-        long configStackSize = Long.valueOf(bean.getVMOption("ThreadStackSize").getValue()) * K;
+        long configStackSize = wb.getIntxVMFlag("ThreadStackSize") * K;
 
         System.out.println("ThreadStackSize VM option: " + configStackSize);
 
--- a/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java	Thu Jul 24 13:18:15 2014 -0700
@@ -25,6 +25,10 @@
 package sun.hotspot;
 
 import java.lang.reflect.Executable;
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Stream;
 import java.security.BasicPermission;
 import sun.hotspot.parser.DiagnosticCommand;
 
@@ -171,4 +175,15 @@
   public native Long    getUint64VMFlag(String name);
   public native String  getStringVMFlag(String name);
   public native Double  getDoubleVMFlag(String name);
+  private final List<Function<String,Object>> flagsGetters = Arrays.asList(
+    this::getBooleanVMFlag, this::getIntxVMFlag, this::getUintxVMFlag,
+    this::getUint64VMFlag, this::getStringVMFlag, this::getDoubleVMFlag);
+
+  public Object getVMFlag(String name) {
+    return flagsGetters.stream()
+                       .map(f -> f.apply(name))
+                       .filter(x -> x != null)
+                       .findAny()
+                       .orElse(null);
+  }
 }
--- a/hotspot/test/testlibrary_tests/whitebox/vm_flags/VmFlagTest.java	Tue Jul 22 11:56:22 2014 -0700
+++ b/hotspot/test/testlibrary_tests/whitebox/vm_flags/VmFlagTest.java	Thu Jul 24 13:18:15 2014 -0700
@@ -91,16 +91,20 @@
     }
 
     private void testPositive(T value, T expected) {
-        Asserts.assertEQ(getVMOptionAsString(), asString(getValue()));
+        String oldValue = getVMOptionAsString();
+        Asserts.assertEQ(oldValue, asString(getValue()));
+        Asserts.assertEQ(oldValue, asString(WHITE_BOX.getVMFlag(flagName)));
         setNewValue(value);
         String newValue = getVMOptionAsString();
         Asserts.assertEQ(newValue, asString(expected));
-        Asserts.assertEQ(getVMOptionAsString(), asString(getValue()));
+        Asserts.assertEQ(newValue, asString(getValue()));
+        Asserts.assertEQ(newValue, asString(WHITE_BOX.getVMFlag(flagName)));
     }
 
     private void testNegative(T value, T expected) {
         String oldValue = getVMOptionAsString();
         Asserts.assertEQ(oldValue, asString(getValue()));
+        Asserts.assertEQ(oldValue, asString(WHITE_BOX.getVMFlag(flagName)));
         setNewValue(value);
         String newValue = getVMOptionAsString();
         Asserts.assertEQ(oldValue, newValue);