Merge
authoramurillo
Thu, 28 Apr 2016 14:44:52 -0700
changeset 38126 c3706b502779
parent 37761 82b8d12a553f (current diff)
parent 38079 fd24ad51113a (diff)
child 38127 2ab00cd4556e
Merge
hotspot/src/cpu/ppc/vm/c1_LIRGenerator_ppc.cpp
hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp
hotspot/src/cpu/x86/vm/macroAssembler_libm_x86_32.cpp
hotspot/src/cpu/x86/vm/macroAssembler_libm_x86_64.cpp
hotspot/src/share/vm/prims/jvmtiExport.cpp
hotspot/src/share/vm/utilities/array.cpp
hotspot/test/compiler/jvmci/code/CodeInstallationTest.java
hotspot/test/compiler/jvmci/code/DataPatchTest.java
hotspot/test/compiler/jvmci/code/DebugInfoTest.java
hotspot/test/compiler/jvmci/code/InterpreterFrameSizeTest.java
hotspot/test/compiler/jvmci/code/SimpleCodeInstallationTest.java
hotspot/test/compiler/jvmci/code/SimpleDebugInfoTest.java
hotspot/test/compiler/jvmci/code/TestAssembler.java
hotspot/test/compiler/jvmci/code/VirtualObjectDebugInfoTest.java
hotspot/test/compiler/jvmci/code/amd64/AMD64TestAssembler.java
hotspot/test/compiler/jvmci/code/sparc/SPARCTestAssembler.java
hotspot/test/runtime/8003720/Asmator.java
hotspot/test/runtime/8003720/Test8003720.java
hotspot/test/runtime/8003720/Victim.java
hotspot/test/runtime/8003720/VictimClassLoader.java
hotspot/test/runtime/SharedArchiveFile/BasicJarBuilder.java
hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/TypeUtil.java
--- a/hotspot/.mx.jvmci/suite.py	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/.mx.jvmci/suite.py	Thu Apr 28 14:44:52 2016 -0700
@@ -83,6 +83,21 @@
       "workingSets" : "API,JVMCI",
     },
 
+    "jdk.vm.ci.code.test" : {
+      "subDir" : "test/compiler/jvmci",
+      "sourceDirs" : ["src"],
+      "dependencies" : [
+        "mx:JUNIT",
+        "jdk.vm.ci.amd64",
+        "jdk.vm.ci.sparc",
+        "jdk.vm.ci.code",
+        "jdk.vm.ci.hotspot",
+      ],
+      "checkstyle" : "jdk.vm.ci.services",
+      "javaCompliance" : "1.8",
+      "workingSets" : "API,JVMCI",
+    },
+
     "jdk.vm.ci.runtime" : {
       "subDir" : "src/jdk.vm.ci/share/classes",
       "sourceDirs" : ["src"],
@@ -164,7 +179,7 @@
       "subDir" : "test/compiler/jvmci",
       "sourceDirs" : ["src"],
       "dependencies" : [
-        "mx:TESTNG",
+        "TESTNG",
         "jdk.vm.ci.hotspot",
       ],
       "checkstyle" : "jdk.vm.ci.services",
--- a/hotspot/src/cpu/aarch64/vm/aarch64.ad	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad	Thu Apr 28 14:44:52 2016 -0700
@@ -3325,9 +3325,15 @@
 
 const bool Matcher::match_rule_supported(int opcode) {
 
-  // TODO
-  // identify extra cases that we might want to provide match rules for
-  // e.g. Op_StrEquals and other intrinsics
+  switch (opcode) {
+  case Op_StrComp:
+  case Op_StrIndexOf:
+    if (CompactStrings)  return false;
+    break;
+  default:
+    break;
+  }
+
   if (!has_match_rule(opcode)) {
     return false;
   }
@@ -3346,6 +3352,10 @@
   return ret_value;  // Per default match rules are supported.
 }
 
+const bool Matcher::has_predicated_vectors(void) {
+  return false;
+}
+
 const int Matcher::float_pressure(int default_pressure_threshold) {
   return default_pressure_threshold;
 }
@@ -4190,55 +4200,6 @@
     }
   %}
 
-  enc_class aarch64_enc_clear_array_reg_reg(iRegL_R11 cnt, iRegP_R10 base) %{
-    MacroAssembler _masm(&cbuf);
-    Register cnt_reg = as_Register($cnt$$reg);
-    Register base_reg = as_Register($base$$reg);
-    // base is word aligned
-    // cnt is count of words
-
-    Label loop;
-    Label entry;
-
-//  Algorithm:
-//
-//    scratch1 = cnt & 7;
-//    cnt -= scratch1;
-//    p += scratch1;
-//    switch (scratch1) {
-//      do {
-//        cnt -= 8;
-//          p[-8] = 0;
-//        case 7:
-//          p[-7] = 0;
-//        case 6:
-//          p[-6] = 0;
-//          // ...
-//        case 1:
-//          p[-1] = 0;
-//        case 0:
-//          p += 8;
-//      } while (cnt);
-//    }
-
-    const int unroll = 8; // Number of str(zr) instructions we'll unroll
-
-    __ andr(rscratch1, cnt_reg, unroll - 1);  // tmp1 = cnt % unroll
-    __ sub(cnt_reg, cnt_reg, rscratch1);      // cnt -= unroll
-    // base_reg always points to the end of the region we're about to zero
-    __ add(base_reg, base_reg, rscratch1, Assembler::LSL, exact_log2(wordSize));
-    __ adr(rscratch2, entry);
-    __ sub(rscratch2, rscratch2, rscratch1, Assembler::LSL, 2);
-    __ br(rscratch2);
-    __ bind(loop);
-    __ sub(cnt_reg, cnt_reg, unroll);
-    for (int i = -unroll; i < 0; i++)
-      __ str(zr, Address(base_reg, i * wordSize));
-    __ bind(entry);
-    __ add(base_reg, base_reg, unroll * wordSize);
-    __ cbnz(cnt_reg, loop);
-  %}
-
   /// mov envcodings
 
   enc_class aarch64_enc_movw_imm(iRegI dst, immI src) %{
@@ -12123,21 +12084,21 @@
   %}
 %}
 
-instruct rorI_rReg_Var_C_32(iRegLNoSp dst, iRegL src, iRegI shift, immI_32 c_32, rFlagsReg cr)
+instruct rorI_rReg_Var_C_32(iRegINoSp dst, iRegI src, iRegI shift, immI_32 c_32, rFlagsReg cr)
 %{
   match(Set dst (OrI (URShiftI src shift) (LShiftI src (SubI c_32 shift))));
 
   expand %{
-    rorL_rReg(dst, src, shift, cr);
-  %}
-%}
-
-instruct rorI_rReg_Var_C0(iRegLNoSp dst, iRegL src, iRegI shift, immI0 c0, rFlagsReg cr)
+    rorI_rReg(dst, src, shift, cr);
+  %}
+%}
+
+instruct rorI_rReg_Var_C0(iRegINoSp dst, iRegI src, iRegI shift, immI0 c0, rFlagsReg cr)
 %{
   match(Set dst (OrI (URShiftI src shift) (LShiftI src (SubI c0 shift))));
 
   expand %{
-    rorL_rReg(dst, src, shift, cr);
+    rorI_rReg(dst, src, shift, cr);
   %}
 %}
 
@@ -13363,7 +13324,23 @@
   ins_cost(4 * INSN_COST);
   format %{ "ClearArray $cnt, $base" %}
 
-  ins_encode(aarch64_enc_clear_array_reg_reg(cnt, base));
+  ins_encode %{
+    __ zero_words($base$$Register, $cnt$$Register);
+  %}
+
+  ins_pipe(pipe_class_memory);
+%}
+
+instruct clearArray_imm_reg(immL cnt, iRegP base, Universe dummy, rFlagsReg cr)
+%{
+  match(Set dummy (ClearArray cnt base));
+
+  ins_cost(4 * INSN_COST);
+  format %{ "ClearArray $cnt, $base" %}
+
+  ins_encode %{
+    __ zero_words($base$$Register, (u_int64_t)$cnt$$constant);
+  %}
 
   ins_pipe(pipe_class_memory);
 %}
@@ -14797,10 +14774,10 @@
   ins_pipe(pipe_class_memory);
 %}
 
-instruct string_compare(iRegP_R1 str1, iRegI_R2 cnt1, iRegP_R3 str2, iRegI_R4 cnt2,
+instruct string_compareU(iRegP_R1 str1, iRegI_R2 cnt1, iRegP_R3 str2, iRegI_R4 cnt2,
                         iRegI_R0 result, iRegP_R10 tmp1, rFlagsReg cr)
 %{
-  predicate(!CompactStrings);
+  predicate(((StrCompNode*)n)->encoding() == StrIntrinsicNode::UU);
   match(Set result (StrComp (Binary str1 cnt1) (Binary str2 cnt2)));
   effect(KILL tmp1, USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, KILL cr);
 
@@ -14819,7 +14796,7 @@
 instruct string_indexof(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
        iRegI_R0 result, iRegI tmp1, iRegI tmp2, iRegI tmp3, iRegI tmp4, rFlagsReg cr)
 %{
-  predicate(!CompactStrings);
+  predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UU);
   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
@@ -14839,7 +14816,7 @@
                  immI_le_4 int_cnt2, iRegI_R0 result, iRegI tmp1, iRegI tmp2,
                  iRegI tmp3, iRegI tmp4, rFlagsReg cr)
 %{
-  predicate(!CompactStrings);
+  predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UU);
   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
@@ -14856,10 +14833,27 @@
   ins_pipe(pipe_class_memory);
 %}
 
-instruct string_equals(iRegP_R1 str1, iRegP_R3 str2, iRegI_R4 cnt,
+instruct string_equalsL(iRegP_R1 str1, iRegP_R3 str2, iRegI_R4 cnt,
                         iRegI_R0 result, rFlagsReg cr)
 %{
-  predicate(!CompactStrings);
+  predicate(((StrEqualsNode*)n)->encoding() == StrIntrinsicNode::LL);
+  match(Set result (StrEquals (Binary str1 str2) cnt));
+  effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt, KILL cr);
+
+  format %{ "String Equals $str1,$str2,$cnt -> $result" %}
+  ins_encode %{
+    // Count is in 8-bit bytes; non-Compact chars are 16 bits.
+    __ arrays_equals($str1$$Register, $str2$$Register,
+                     $result$$Register, $cnt$$Register,
+                     1, /*is_string*/true);
+  %}
+  ins_pipe(pipe_class_memory);
+%}
+
+instruct string_equalsU(iRegP_R1 str1, iRegP_R3 str2, iRegI_R4 cnt,
+                        iRegI_R0 result, rFlagsReg cr)
+%{
+  predicate(((StrEqualsNode*)n)->encoding() == StrIntrinsicNode::UU);
   match(Set result (StrEquals (Binary str1 str2) cnt));
   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt, KILL cr);
 
@@ -14907,6 +14901,40 @@
 %}
 
 
+// fast char[] to byte[] compression
+instruct string_compress(iRegP_R2 src, iRegP_R1 dst, iRegI_R3 len,
+                         vRegD_V0 tmp1, vRegD_V1 tmp2,
+                         vRegD_V2 tmp3, vRegD_V3 tmp4,
+                         iRegI_R0 result, rFlagsReg cr)
+%{
+  match(Set result (StrCompressedCopy src (Binary dst len)));
+  effect(TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, USE_KILL src, USE_KILL dst, USE_KILL len, KILL cr);
+
+  format %{ "String Compress $src,$dst -> $result    // KILL R1, R2, R3, R4" %}
+  ins_encode %{
+    __ char_array_compress($src$$Register, $dst$$Register, $len$$Register,
+                           $tmp1$$FloatRegister, $tmp2$$FloatRegister,
+                           $tmp3$$FloatRegister, $tmp4$$FloatRegister,
+                           $result$$Register);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
+// fast byte[] to char[] inflation
+instruct string_inflate(Universe dummy, iRegP_R0 src, iRegP_R1 dst, iRegI_R2 len,
+                        vRegD tmp1, vRegD tmp2, vRegD tmp3, iRegP_R3 tmp4, rFlagsReg cr)
+%{
+  match(Set dummy (StrInflatedCopy src (Binary dst len)));
+  effect(TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, USE_KILL src, USE_KILL dst, USE_KILL len, KILL cr);
+
+  format %{ "String Inflate $src,$dst    // KILL $tmp1, $tmp2" %}
+  ins_encode %{
+    __ byte_array_inflate($src$$Register, $dst$$Register, $len$$Register,
+                          $tmp1$$FloatRegister, $tmp2$$FloatRegister, $tmp3$$FloatRegister, $tmp4$$Register);
+  %}
+  ins_pipe(pipe_class_memory);
+%}
+
 // encode char[] to byte[] in ISO_8859_1
 instruct encode_iso_array(iRegP_R2 src, iRegP_R1 dst, iRegI_R3 len,
                           vRegD_V0 Vtmp1, vRegD_V1 Vtmp2,
--- a/hotspot/src/cpu/aarch64/vm/abstractInterpreter_aarch64.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/abstractInterpreter_aarch64.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -177,4 +177,6 @@
   }
   *interpreter_frame->interpreter_frame_cache_addr() =
     method->constants()->cache();
+  *interpreter_frame->interpreter_frame_mirror_addr() =
+    method->method_holder()->java_mirror();
 }
--- a/hotspot/src/cpu/aarch64/vm/assembler_aarch64.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/assembler_aarch64.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2245,18 +2245,18 @@
     rf(Vn, 5), rf(Rd, 0);
   }
 
-#define INSN(NAME, opc, opc2) \
-  void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, int shift){         \
-    starti;                                                                             \
-    /* The encodings for the immh:immb fields (bits 22:16) are                          \
-     *   0001 xxx       8B/16B, shift = xxx                                             \
-     *   001x xxx       4H/8H,  shift = xxxx                                            \
-     *   01xx xxx       2S/4S,  shift = xxxxx                                           \
-     *   1xxx xxx       1D/2D,  shift = xxxxxx (1D is RESERVED)                         \
-     */                                                                                 \
-    assert((1 << ((T>>1)+3)) > shift, "Invalid Shift value");                           \
-    f(0, 31), f(T & 1, 30), f(opc, 29), f(0b011110, 28, 23),                            \
-    f((1 << ((T>>1)+3))|shift, 22, 16); f(opc2, 15, 10), rf(Vn, 5), rf(Vd, 0);          \
+#define INSN(NAME, opc, opc2)                                           \
+  void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, int shift){ \
+    starti;                                                             \
+    /* The encodings for the immh:immb fields (bits 22:16) are          \
+     *   0001 xxx       8B/16B, shift = xxx                             \
+     *   001x xxx       4H/8H,  shift = xxxx                            \
+     *   01xx xxx       2S/4S,  shift = xxxxx                           \
+     *   1xxx xxx       1D/2D,  shift = xxxxxx (1D is RESERVED)         \
+     */                                                                 \
+    assert((1 << ((T>>1)+3)) > shift, "Invalid Shift value");           \
+    f(0, 31), f(T & 1, 30), f(opc, 29), f(0b011110, 28, 23),            \
+    f((1 << ((T>>1)+3))|shift, 22, 16); f(opc2, 15, 10), rf(Vn, 5), rf(Vd, 0); \
   }
 
   INSN(shl,  0, 0b010101);
@@ -2347,6 +2347,24 @@
     f(0b000001, 15, 10), rf(Vn, 5), rf(Vd, 0);
   }
 
+  // AdvSIMD ZIP/UZP/TRN
+#define INSN(NAME, opcode)                                              \
+  void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, FloatRegister Vm) { \
+    starti;                                                             \
+    f(0, 31), f(0b001110, 29, 24), f(0, 21), f(0b001110, 15, 10);       \
+    rf(Vm, 16), rf(Vn, 5), rf(Vd, 0);                                   \
+    f(T & 1, 30), f(T >> 1, 23, 22);                                    \
+  }
+
+  INSN(uzp1, 0b001);
+  INSN(trn1, 0b010);
+  INSN(zip1, 0b011);
+  INSN(uzp2, 0b101);
+  INSN(trn2, 0b110);
+  INSN(zip2, 0b111);
+
+#undef INSN
+
   // CRC32 instructions
 #define INSN(NAME, c, sf, sz)                                             \
   void NAME(Register Rd, Register Rn, Register Rm) {                      \
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2942,6 +2942,10 @@
 
 void LIR_Assembler::membar_storeload() { __ membar(MacroAssembler::StoreLoad); }
 
+void LIR_Assembler::on_spin_wait() {
+  Unimplemented();
+}
+
 void LIR_Assembler::get_thread(LIR_Opr result_reg) {
   __ mov(result_reg->as_register(), rthread);
 }
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -331,7 +331,7 @@
     length.load_item();
 
   }
-  if (needs_store_check) {
+  if (needs_store_check || x->check_boolean()) {
     value.load_item();
   } else {
     value.load_for_store(x->elt_type());
@@ -380,7 +380,8 @@
     // Seems to be a precise
     post_barrier(LIR_OprFact::address(array_addr), value.result());
   } else {
-    __ move(value.result(), array_addr, null_check_info);
+    LIR_Opr result = maybe_mask_boolean(x, array.result(), value.result(), null_check_info);
+    __ move(result, array_addr, null_check_info);
   }
 }
 
@@ -1127,7 +1128,7 @@
 void LIRGenerator::do_NewMultiArray(NewMultiArray* x) {
   Values* dims = x->dims();
   int i = dims->length();
-  LIRItemList* items = new LIRItemList(dims->length(), NULL);
+  LIRItemList* items = new LIRItemList(i, i, NULL);
   while (i-- > 0) {
     LIRItem* size = new LIRItem(dims->at(i), this);
     items->at_put(i, size);
--- a/hotspot/src/cpu/aarch64/vm/compiledIC_aarch64.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/compiledIC_aarch64.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -32,22 +32,6 @@
 #include "runtime/mutexLocker.hpp"
 #include "runtime/safepoint.hpp"
 
-// Release the CompiledICHolder* associated with this call site is there is one.
-void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
-  // This call site might have become stale so inspect it carefully.
-  NativeCall* call = nativeCall_at(call_site->addr());
-  if (is_icholder_entry(call->destination())) {
-    NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
-    InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
-  }
-}
-
-bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
-  // This call site might have become stale so inspect it carefully.
-  NativeCall* call = nativeCall_at(call_site->addr());
-  return is_icholder_entry(call->destination());
-}
-
 // ----------------------------------------------------------------------------
 
 #define __ _masm.
--- a/hotspot/src/cpu/aarch64/vm/frame_aarch64.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/frame_aarch64.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -78,7 +78,9 @@
     interpreter_frame_last_sp_offset                 = interpreter_frame_sender_sp_offset - 1,
     interpreter_frame_method_offset                  = interpreter_frame_last_sp_offset - 1,
     interpreter_frame_mdp_offset                     = interpreter_frame_method_offset - 1,
-    interpreter_frame_cache_offset                   = interpreter_frame_mdp_offset - 1,
+    interpreter_frame_padding_offset                 = interpreter_frame_mdp_offset - 1,
+    interpreter_frame_mirror_offset                  = interpreter_frame_padding_offset - 1,
+    interpreter_frame_cache_offset                   = interpreter_frame_mirror_offset - 1,
     interpreter_frame_locals_offset                  = interpreter_frame_cache_offset - 1,
     interpreter_frame_bcp_offset                     = interpreter_frame_locals_offset - 1,
     interpreter_frame_initial_sp_offset              = interpreter_frame_bcp_offset - 1,
--- a/hotspot/src/cpu/aarch64/vm/frame_aarch64.inline.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/frame_aarch64.inline.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -188,6 +188,12 @@
   return (Method**)addr_at(interpreter_frame_method_offset);
 }
 
+// Mirror
+
+inline oop* frame::interpreter_frame_mirror_addr() const {
+  return (oop*)addr_at(interpreter_frame_mirror_offset);
+}
+
 // top of expression stack
 inline intptr_t* frame::interpreter_frame_tos_address() const {
   intptr_t* last_sp = interpreter_frame_last_sp();
--- a/hotspot/src/cpu/aarch64/vm/globals_aarch64.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/globals_aarch64.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -48,9 +48,9 @@
 #define DEFAULT_STACK_SHADOW_PAGES (4 DEBUG_ONLY(+5))
 #define DEFAULT_STACK_RESERVED_PAGES (0)
 
-#define MIN_STACK_YELLOW_PAGES 1
-#define MIN_STACK_RED_PAGES    1
-#define MIN_STACK_SHADOW_PAGES 1
+#define MIN_STACK_YELLOW_PAGES DEFAULT_STACK_YELLOW_PAGES
+#define MIN_STACK_RED_PAGES    DEFAULT_STACK_RED_PAGES
+#define MIN_STACK_SHADOW_PAGES DEFAULT_STACK_SHADOW_PAGES
 #define MIN_STACK_RESERVED_PAGES (0)
 
 define_pd_global(intx, StackYellowPages, DEFAULT_STACK_YELLOW_PAGES);
@@ -76,7 +76,8 @@
 // avoid biased locking while we are bootstrapping the aarch64 build
 define_pd_global(bool, UseBiasedLocking, false);
 
-define_pd_global(intx, InitArrayShortSize, 18*BytesPerLong);
+// Clear short arrays bigger than one word in an arch-specific way
+define_pd_global(intx, InitArrayShortSize, BytesPerLong);
 
 #if defined(COMPILER1) || defined(COMPILER2)
 define_pd_global(intx, InlineSmallCode,          1000);
--- a/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -40,7 +40,43 @@
 #include "runtime/thread.inline.hpp"
 
 
-// Implementation of InterpreterMacroAssembler
+void InterpreterMacroAssembler::narrow(Register result) {
+
+  // Get method->_constMethod->_result_type
+  ldr(rscratch1, Address(rfp, frame::interpreter_frame_method_offset * wordSize));
+  ldr(rscratch1, Address(rscratch1, Method::const_offset()));
+  ldrb(rscratch1, Address(rscratch1, ConstMethod::result_type_offset()));
+
+  Label done, notBool, notByte, notChar;
+
+  // common case first
+  cmpw(rscratch1, T_INT);
+  br(Assembler::EQ, done);
+
+  // mask integer result to narrower return type.
+  cmpw(rscratch1, T_BOOLEAN);
+  br(Assembler::NE, notBool);
+  andw(result, result, 0x1);
+  b(done);
+
+  bind(notBool);
+  cmpw(rscratch1, T_BYTE);
+  br(Assembler::NE, notByte);
+  sbfx(result, result, 0, 8);
+  b(done);
+
+  bind(notByte);
+  cmpw(rscratch1, T_CHAR);
+  br(Assembler::NE, notChar);
+  ubfx(result, result, 0, 16);  // truncate upper 16 bits
+  b(done);
+
+  bind(notChar);
+  sbfx(result, result, 0, 16);     // sign-extend short
+
+  // Nothing to do for T_INT
+  bind(done);
+}
 
 void InterpreterMacroAssembler::jump_to_entry(address entry) {
   assert(entry, "Entry must have been generated by now");
@@ -81,6 +117,7 @@
                verify_oop(r0, state);               break;
     case ltos: ldr(r0, val_addr);                   break;
     case btos:                                   // fall through
+    case ztos:                                   // fall through
     case ctos:                                   // fall through
     case stos:                                   // fall through
     case itos: ldrw(r0, val_addr);                  break;
@@ -314,6 +351,7 @@
   switch (state) {
   case atos: pop_ptr();                 break;
   case btos:
+  case ztos:
   case ctos:
   case stos:
   case itos: pop_i();                   break;
@@ -331,6 +369,7 @@
   switch (state) {
   case atos: push_ptr();                break;
   case btos:
+  case ztos:
   case ctos:
   case stos:
   case itos: push_i();                  break;
--- a/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -245,6 +245,9 @@
   void update_mdp_by_constant(Register mdp_in, int constant);
   void update_mdp_for_ret(Register return_bci);
 
+  // narrow int return value
+  void narrow(Register result);
+
   void profile_taken_branch(Register mdp, Register bumped_count);
   void profile_not_taken_branch(Register mdp);
   void profile_call(Register mdp);
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -3217,6 +3217,14 @@
   }
 }
 
+void MacroAssembler::load_mirror(Register dst, Register method) {
+  const int mirror_offset = in_bytes(Klass::java_mirror_offset());
+  ldr(dst, Address(rmethod, Method::const_offset()));
+  ldr(dst, Address(dst, ConstMethod::constants_offset()));
+  ldr(dst, Address(dst, ConstantPool::pool_holder_offset_in_bytes()));
+  ldr(dst, Address(dst, mirror_offset));
+}
+
 void MacroAssembler::cmp_klass(Register oop, Register trial_klass, Register tmp) {
   if (UseCompressedClassPointers) {
     ldrw(tmp, Address(oop, oopDesc::klass_offset_in_bytes()));
@@ -4585,7 +4593,16 @@
   assert(elem_size == 1 || elem_size == 2, "must be char or byte");
   assert_different_registers(a1, a2, result, cnt1, rscratch1, rscratch2);
 
-  BLOCK_COMMENT(is_string ? "string_equals {" : "array_equals {");
+#ifndef PRODUCT
+  {
+    const char kind = (elem_size == 2) ? 'U' : 'L';
+    char comment[64];
+    snprintf(comment, sizeof comment, "%s%c%s {",
+             is_string ? "string_equals" : "array_equals",
+             kind, "{");
+    BLOCK_COMMENT(comment);
+  }
+#endif
 
   mov(result, false);
 
@@ -4670,8 +4687,97 @@
   BLOCK_COMMENT(is_string ? "} string_equals" : "} array_equals");
 }
 
-
-// encode char[] to byte[] in ISO_8859_1
+// base:   Address of a buffer to be zeroed, 8 bytes aligned.
+// cnt:    Count in 8-byte unit.
+void MacroAssembler::zero_words(Register base, Register cnt)
+{
+  fill_words(base, cnt, zr);
+}
+
+// base:   Address of a buffer to be zeroed, 8 bytes aligned.
+// cnt:    Immediate count in 8-byte unit.
+#define ShortArraySize (18 * BytesPerLong)
+void MacroAssembler::zero_words(Register base, u_int64_t cnt)
+{
+  int i = cnt & 1;  // store any odd word to start
+  if (i) str(zr, Address(base));
+
+  if (cnt <= ShortArraySize / BytesPerLong) {
+    for (; i < (int)cnt; i += 2)
+      stp(zr, zr, Address(base, i * wordSize));
+  } else {
+    const int unroll = 4; // Number of stp(zr, zr) instructions we'll unroll
+    int remainder = cnt % (2 * unroll);
+    for (; i < remainder; i += 2)
+      stp(zr, zr, Address(base, i * wordSize));
+
+    Label loop;
+    Register cnt_reg = rscratch1;
+    Register loop_base = rscratch2;
+    cnt = cnt - remainder;
+    mov(cnt_reg, cnt);
+    // adjust base and prebias by -2 * wordSize so we can pre-increment
+    add(loop_base, base, (remainder - 2) * wordSize);
+    bind(loop);
+    sub(cnt_reg, cnt_reg, 2 * unroll);
+    for (i = 1; i < unroll; i++)
+      stp(zr, zr, Address(loop_base, 2 * i * wordSize));
+    stp(zr, zr, Address(pre(loop_base, 2 * unroll * wordSize)));
+    cbnz(cnt_reg, loop);
+  }
+}
+
+// base:   Address of a buffer to be filled, 8 bytes aligned.
+// cnt:    Count in 8-byte unit.
+// value:  Value to be filled with.
+// base will point to the end of the buffer after filling.
+void MacroAssembler::fill_words(Register base, Register cnt, Register value)
+{
+//  Algorithm:
+//
+//    scratch1 = cnt & 7;
+//    cnt -= scratch1;
+//    p += scratch1;
+//    switch (scratch1) {
+//      do {
+//        cnt -= 8;
+//          p[-8] = v;
+//        case 7:
+//          p[-7] = v;
+//        case 6:
+//          p[-6] = v;
+//          // ...
+//        case 1:
+//          p[-1] = v;
+//        case 0:
+//          p += 8;
+//      } while (cnt);
+//    }
+
+  assert_different_registers(base, cnt, value, rscratch1, rscratch2);
+
+  Label entry, loop;
+  const int unroll = 8; // Number of str instructions we'll unroll
+
+  andr(rscratch1, cnt, unroll - 1);  // tmp1 = cnt % unroll
+  cbz(rscratch1, entry);
+  sub(cnt, cnt, rscratch1);          // cnt -= tmp1
+  // base always points to the end of the region we're about to fill
+  add(base, base, rscratch1, Assembler::LSL, 3);
+  adr(rscratch2, entry);
+  sub(rscratch2, rscratch2, rscratch1, Assembler::LSL, 2);
+  br(rscratch2);
+  bind(loop);
+  add(base, base, unroll * 8);
+  sub(cnt, cnt, unroll);
+  for (int i = -unroll; i < 0; i++)
+    str(value, Address(base, i * 8));
+  bind(entry);
+  cbnz(cnt, loop);
+}
+
+// Intrinsic for sun/nio/cs/ISO_8859_1$Encoder.implEncodeISOArray and
+// java/lang/StringUTF16.compress.
 void MacroAssembler::encode_iso_array(Register src, Register dst,
                       Register len, Register result,
                       FloatRegister Vtmp1, FloatRegister Vtmp2,
@@ -4734,6 +4840,90 @@
 
     BIND(DONE);
       sub(result, result, len); // Return index where we stopped
+                                // Return len == 0 if we processed all
+                                // characters
+}
+
+
+// Inflate byte[] array to char[].
+void MacroAssembler::byte_array_inflate(Register src, Register dst, Register len,
+                                        FloatRegister vtmp1, FloatRegister vtmp2, FloatRegister vtmp3,
+                                        Register tmp4) {
+  Label big, done;
+
+  assert_different_registers(src, dst, len, tmp4, rscratch1);
+
+  fmovd(vtmp1 , zr);
+  lsrw(rscratch1, len, 3);
+
+  cbnzw(rscratch1, big);
+
+  // Short string: less than 8 bytes.
+  {
+    Label loop, around, tiny;
+
+    subsw(len, len, 4);
+    andw(len, len, 3);
+    br(LO, tiny);
+
+    // Use SIMD to do 4 bytes.
+    ldrs(vtmp2, post(src, 4));
+    zip1(vtmp3, T8B, vtmp2, vtmp1);
+    strd(vtmp3, post(dst, 8));
+
+    cbzw(len, done);
+
+    // Do the remaining bytes by steam.
+    bind(loop);
+    ldrb(tmp4, post(src, 1));
+    strh(tmp4, post(dst, 2));
+    subw(len, len, 1);
+
+    bind(tiny);
+    cbnz(len, loop);
+
+    bind(around);
+    b(done);
+  }
+
+  // Unpack the bytes 8 at a time.
+  bind(big);
+  andw(len, len, 7);
+
+  {
+    Label loop, around;
+
+    bind(loop);
+    ldrd(vtmp2, post(src, 8));
+    sub(rscratch1, rscratch1, 1);
+    zip1(vtmp3, T16B, vtmp2, vtmp1);
+    st1(vtmp3, T8H, post(dst, 16));
+    cbnz(rscratch1, loop);
+
+    bind(around);
+  }
+
+  // Do the tail of up to 8 bytes.
+  sub(src, src, 8);
+  add(src, src, len, ext::uxtw, 0);
+  ldrd(vtmp2, Address(src));
+  sub(dst, dst, 16);
+  add(dst, dst, len, ext::uxtw, 1);
+  zip1(vtmp3, T16B, vtmp2, vtmp1);
+  st1(vtmp3, T8H, Address(dst));
+
+  bind(done);
+}
+
+// Compress char[] array to byte[].
+void MacroAssembler::char_array_compress(Register src, Register dst, Register len,
+                                         FloatRegister tmp1Reg, FloatRegister tmp2Reg,
+                                         FloatRegister tmp3Reg, FloatRegister tmp4Reg,
+                                         Register result) {
+  encode_iso_array(src, dst, len, result,
+                   tmp1Reg, tmp2Reg, tmp3Reg, tmp4Reg);
+  cmp(len, zr);
+  csel(result, result, zr, EQ);
 }
 
 // get_thread() can be called anywhere inside generated code so we
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -770,6 +770,8 @@
   void store_klass(Register dst, Register src);
   void cmp_klass(Register oop, Register trial_klass, Register tmp);
 
+  void load_mirror(Register dst, Register method);
+
   void load_heap_oop(Register dst, Address src);
 
   void load_heap_oop_not_null(Register dst, Address src);
@@ -1184,6 +1186,19 @@
                      Register result, Register cnt1,
                      int elem_size, bool is_string);
 
+  void fill_words(Register base, Register cnt, Register value);
+  void zero_words(Register base, Register cnt);
+  void zero_words(Register base, u_int64_t cnt);
+
+  void byte_array_inflate(Register src, Register dst, Register len,
+                          FloatRegister vtmp1, FloatRegister vtmp2,
+                          FloatRegister vtmp3, Register tmp4);
+
+  void char_array_compress(Register src, Register dst, Register len,
+                           FloatRegister tmp1Reg, FloatRegister tmp2Reg,
+                           FloatRegister tmp3Reg, FloatRegister tmp4Reg,
+                           Register result);
+
   void encode_iso_array(Register src, Register dst,
                         Register len, Register result,
                         FloatRegister Vtmp1, FloatRegister Vtmp2,
--- a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2021,6 +2021,136 @@
     return start;
   }
 
+  //
+  // Generate stub for array fill. If "aligned" is true, the
+  // "to" address is assumed to be heapword aligned.
+  //
+  // Arguments for generated stub:
+  //   to:    c_rarg0
+  //   value: c_rarg1
+  //   count: c_rarg2 treated as signed
+  //
+  address generate_fill(BasicType t, bool aligned, const char *name) {
+    __ align(CodeEntryAlignment);
+    StubCodeMark mark(this, "StubRoutines", name);
+    address start = __ pc();
+
+    BLOCK_COMMENT("Entry:");
+
+    const Register to        = c_rarg0;  // source array address
+    const Register value     = c_rarg1;  // value
+    const Register count     = c_rarg2;  // elements count
+    const Register cnt_words = c_rarg3; // temp register
+
+    __ enter();
+
+    Label L_fill_elements, L_exit1;
+
+    int shift = -1;
+    switch (t) {
+      case T_BYTE:
+        shift = 0;
+        __ cmpw(count, 8 >> shift); // Short arrays (< 8 bytes) fill by element
+        __ bfi(value, value, 8, 8);   // 8 bit -> 16 bit
+        __ bfi(value, value, 16, 16); // 16 bit -> 32 bit
+        __ br(Assembler::LO, L_fill_elements);
+        break;
+      case T_SHORT:
+        shift = 1;
+        __ cmpw(count, 8 >> shift); // Short arrays (< 8 bytes) fill by element
+        __ bfi(value, value, 16, 16); // 16 bit -> 32 bit
+        __ br(Assembler::LO, L_fill_elements);
+        break;
+      case T_INT:
+        shift = 2;
+        __ cmpw(count, 8 >> shift); // Short arrays (< 8 bytes) fill by element
+        __ br(Assembler::LO, L_fill_elements);
+        break;
+      default: ShouldNotReachHere();
+    }
+
+    // Align source address at 8 bytes address boundary.
+    Label L_skip_align1, L_skip_align2, L_skip_align4;
+    if (!aligned) {
+      switch (t) {
+        case T_BYTE:
+          // One byte misalignment happens only for byte arrays.
+          __ tbz(to, 0, L_skip_align1);
+          __ strb(value, Address(__ post(to, 1)));
+          __ subw(count, count, 1);
+          __ bind(L_skip_align1);
+          // Fallthrough
+        case T_SHORT:
+          // Two bytes misalignment happens only for byte and short (char) arrays.
+          __ tbz(to, 1, L_skip_align2);
+          __ strh(value, Address(__ post(to, 2)));
+          __ subw(count, count, 2 >> shift);
+          __ bind(L_skip_align2);
+          // Fallthrough
+        case T_INT:
+          // Align to 8 bytes, we know we are 4 byte aligned to start.
+          __ tbz(to, 2, L_skip_align4);
+          __ strw(value, Address(__ post(to, 4)));
+          __ subw(count, count, 4 >> shift);
+          __ bind(L_skip_align4);
+          break;
+        default: ShouldNotReachHere();
+      }
+    }
+
+    //
+    //  Fill large chunks
+    //
+    __ lsrw(cnt_words, count, 3 - shift); // number of words
+    __ bfi(value, value, 32, 32);         // 32 bit -> 64 bit
+    __ subw(count, count, cnt_words, Assembler::LSL, 3 - shift);
+    __ fill_words(to, cnt_words, value);
+
+    // Remaining count is less than 8 bytes. Fill it by a single store.
+    // Note that the total length is no less than 8 bytes.
+    if (t == T_BYTE || t == T_SHORT) {
+      Label L_exit1;
+      __ cbzw(count, L_exit1);
+      __ add(to, to, count, Assembler::LSL, shift); // points to the end
+      __ str(value, Address(to, -8));    // overwrite some elements
+      __ bind(L_exit1);
+      __ leave();
+      __ ret(lr);
+    }
+
+    // Handle copies less than 8 bytes.
+    Label L_fill_2, L_fill_4, L_exit2;
+    __ bind(L_fill_elements);
+    switch (t) {
+      case T_BYTE:
+        __ tbz(count, 0, L_fill_2);
+        __ strb(value, Address(__ post(to, 1)));
+        __ bind(L_fill_2);
+        __ tbz(count, 1, L_fill_4);
+        __ strh(value, Address(__ post(to, 2)));
+        __ bind(L_fill_4);
+        __ tbz(count, 2, L_exit2);
+        __ strw(value, Address(to));
+        break;
+      case T_SHORT:
+        __ tbz(count, 0, L_fill_4);
+        __ strh(value, Address(__ post(to, 2)));
+        __ bind(L_fill_4);
+        __ tbz(count, 1, L_exit2);
+        __ strw(value, Address(to));
+        break;
+      case T_INT:
+        __ cbzw(count, L_exit2);
+        __ strw(value, Address(to));
+        break;
+      default: ShouldNotReachHere();
+    }
+    __ bind(L_exit2);
+    __ leave();
+    __ ret(lr);
+    return start;
+  }
+
   void generate_arraycopy_stubs() {
     address entry;
     address entry_jbyte_arraycopy;
@@ -2124,6 +2254,12 @@
                                                                entry_jlong_arraycopy,
                                                                entry_checkcast_arraycopy);
 
+    StubRoutines::_jbyte_fill = generate_fill(T_BYTE, false, "jbyte_fill");
+    StubRoutines::_jshort_fill = generate_fill(T_SHORT, false, "jshort_fill");
+    StubRoutines::_jint_fill = generate_fill(T_INT, false, "jint_fill");
+    StubRoutines::_arrayof_jbyte_fill = generate_fill(T_BYTE, true, "arrayof_jbyte_fill");
+    StubRoutines::_arrayof_jshort_fill = generate_fill(T_SHORT, true, "arrayof_jshort_fill");
+    StubRoutines::_arrayof_jint_fill = generate_fill(T_INT, true, "arrayof_jint_fill");
   }
 
   void generate_math_stubs() { Unimplemented(); }
--- a/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -759,18 +759,13 @@
 
   // get synchronization object
   {
-    const int mirror_offset = in_bytes(Klass::java_mirror_offset());
     Label done;
     __ ldrw(r0, access_flags);
     __ tst(r0, JVM_ACC_STATIC);
     // get receiver (assume this is frequent case)
     __ ldr(r0, Address(rlocals, Interpreter::local_offset_in_bytes(0)));
     __ br(Assembler::EQ, done);
-    __ ldr(r0, Address(rmethod, Method::const_offset()));
-    __ ldr(r0, Address(r0, ConstMethod::constants_offset()));
-    __ ldr(r0, Address(r0,
-                           ConstantPool::pool_holder_offset_in_bytes()));
-    __ ldr(r0, Address(r0, mirror_offset));
+    __ load_mirror(r0, rmethod);
 
 #ifdef ASSERT
     {
@@ -807,16 +802,16 @@
 void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
   // initialize fixed part of activation frame
   if (native_call) {
-    __ sub(esp, sp, 12 *  wordSize);
+    __ sub(esp, sp, 14 *  wordSize);
     __ mov(rbcp, zr);
-    __ stp(esp, zr, Address(__ pre(sp, -12 * wordSize)));
+    __ stp(esp, zr, Address(__ pre(sp, -14 * wordSize)));
     // add 2 zero-initialized slots for native calls
-    __ stp(zr, zr, Address(sp, 10 * wordSize));
+    __ stp(zr, zr, Address(sp, 12 * wordSize));
   } else {
-    __ sub(esp, sp, 10 *  wordSize);
+    __ sub(esp, sp, 12 *  wordSize);
     __ ldr(rscratch1, Address(rmethod, Method::const_offset()));      // get ConstMethod
     __ add(rbcp, rscratch1, in_bytes(ConstMethod::codes_offset())); // get codebase
-    __ stp(esp, rbcp, Address(__ pre(sp, -10 * wordSize)));
+    __ stp(esp, rbcp, Address(__ pre(sp, -12 * wordSize)));
   }
 
   if (ProfileInterpreter) {
@@ -825,22 +820,26 @@
     __ cbz(rscratch1, method_data_continue);
     __ lea(rscratch1, Address(rscratch1, in_bytes(MethodData::data_offset())));
     __ bind(method_data_continue);
-    __ stp(rscratch1, rmethod, Address(sp, 4 * wordSize));  // save Method* and mdp (method data pointer)
+    __ stp(rscratch1, rmethod, Address(sp, 6 * wordSize));  // save Method* and mdp (method data pointer)
   } else {
-    __ stp(zr, rmethod, Address(sp, 4 * wordSize));        // save Method* (no mdp)
+    __ stp(zr, rmethod, Address(sp, 6 * wordSize));        // save Method* (no mdp)
   }
 
+  // Get mirror and store it in the frame as GC root for this Method*
+  __ load_mirror(rscratch1, rmethod);
+  __ stp(rscratch1, zr, Address(sp, 4 * wordSize));
+
   __ ldr(rcpool, Address(rmethod, Method::const_offset()));
   __ ldr(rcpool, Address(rcpool, ConstMethod::constants_offset()));
   __ ldr(rcpool, Address(rcpool, ConstantPool::cache_offset_in_bytes()));
   __ stp(rlocals, rcpool, Address(sp, 2 * wordSize));
 
-  __ stp(rfp, lr, Address(sp, 8 * wordSize));
-  __ lea(rfp, Address(sp, 8 * wordSize));
+  __ stp(rfp, lr, Address(sp, 10 * wordSize));
+  __ lea(rfp, Address(sp, 10 * wordSize));
 
   // set sender sp
   // leave last_sp as null
-  __ stp(zr, r13, Address(sp, 6 * wordSize));
+  __ stp(zr, r13, Address(sp, 8 * wordSize));
 
   // Move SP out of the way
   if (! native_call) {
@@ -1242,15 +1241,11 @@
   // pass mirror handle if static call
   {
     Label L;
-    const int mirror_offset = in_bytes(Klass::java_mirror_offset());
     __ ldrw(t, Address(rmethod, Method::access_flags_offset()));
     __ tst(t, JVM_ACC_STATIC);
     __ br(Assembler::EQ, L);
     // get mirror
-    __ ldr(t, Address(rmethod, Method::const_offset()));
-    __ ldr(t, Address(t, ConstMethod::constants_offset()));
-    __ ldr(t, Address(t, ConstantPool::pool_holder_offset_in_bytes()));
-    __ ldr(t, Address(t, mirror_offset));
+    __ load_mirror(t, rmethod);
     // copy mirror into activation frame
     __ str(t, Address(rfp, frame::interpreter_frame_oop_temp_offset * wordSize));
     // pass handle to mirror
--- a/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -229,6 +229,7 @@
   switch (bc) {
   case Bytecodes::_fast_aputfield:
   case Bytecodes::_fast_bputfield:
+  case Bytecodes::_fast_zputfield:
   case Bytecodes::_fast_cputfield:
   case Bytecodes::_fast_dputfield:
   case Bytecodes::_fast_fputfield:
@@ -1082,6 +1083,17 @@
   // r1: index
   // r3: array
   index_check(r3, r1); // prefer index in r1
+
+  // Need to check whether array is boolean or byte
+  // since both types share the bastore bytecode.
+  __ load_klass(r2, r3);
+  __ ldrw(r2, Address(r2, Klass::layout_helper_offset()));
+  int diffbit_index = exact_log2(Klass::layout_helper_boolean_diffbit());
+  Label L_skip;
+  __ tbz(r2, diffbit_index, L_skip);
+  __ andw(r0, r0, 1);  // if it is a T_BOOLEAN array, mask the stored value to 0/1
+  __ bind(L_skip);
+
   __ lea(rscratch1, Address(r3, r1, Address::uxtw(0)));
   __ strb(r0, Address(rscratch1,
                       arrayOopDesc::base_offset_in_bytes(T_BYTE)));
@@ -2193,6 +2205,13 @@
   if (_desc->bytecode() == Bytecodes::_return)
     __ membar(MacroAssembler::StoreStore);
 
+  // Narrow result if state is itos but result type is smaller.
+  // Need to narrow in the return bytecode rather than in generate_return_entry
+  // since compiled code callers expect the result to already be narrowed.
+  if (state == itos) {
+    __ narrow(r0);
+  }
+
   __ remove_activation(state);
   __ ret(lr);
 }
@@ -2386,7 +2405,7 @@
 
   const Address field(obj, off);
 
-  Label Done, notByte, notInt, notShort, notChar,
+  Label Done, notByte, notBool, notInt, notShort, notChar,
               notLong, notFloat, notObj, notDouble;
 
   // x86 uses a shift and mask or wings it with a shift plus assert
@@ -2409,6 +2428,20 @@
   __ b(Done);
 
   __ bind(notByte);
+  __ cmp(flags, ztos);
+  __ br(Assembler::NE, notBool);
+
+  // ztos (same code as btos)
+  __ ldrsb(r0, field);
+  __ push(ztos);
+  // Rewrite bytecode to be faster
+  if (!is_static) {
+    // use btos rewriting, no truncating to t/f bit is needed for getfield.
+    patch_bytecode(Bytecodes::_fast_bgetfield, bc, r1);
+  }
+  __ b(Done);
+
+  __ bind(notBool);
   __ cmp(flags, atos);
   __ br(Assembler::NE, notObj);
   // atos
@@ -2604,7 +2637,7 @@
   // field address
   const Address field(obj, off);
 
-  Label notByte, notInt, notShort, notChar,
+  Label notByte, notBool, notInt, notShort, notChar,
         notLong, notFloat, notObj, notDouble;
 
   // x86 uses a shift and mask or wings it with a shift plus assert
@@ -2629,6 +2662,22 @@
   }
 
   __ bind(notByte);
+  __ cmp(flags, ztos);
+  __ br(Assembler::NE, notBool);
+
+  // ztos
+  {
+    __ pop(ztos);
+    if (!is_static) pop_and_check_object(obj);
+    __ andw(r0, r0, 0x1);
+    __ strb(r0, field);
+    if (!is_static) {
+      patch_bytecode(Bytecodes::_fast_zputfield, bc, r1, true, byte_no);
+    }
+    __ b(Done);
+  }
+
+  __ bind(notBool);
   __ cmp(flags, atos);
   __ br(Assembler::NE, notObj);
 
@@ -2783,6 +2832,7 @@
     switch (bytecode()) {          // load values into the jvalue object
     case Bytecodes::_fast_aputfield: __ push_ptr(r0); break;
     case Bytecodes::_fast_bputfield: // fall through
+    case Bytecodes::_fast_zputfield: // fall through
     case Bytecodes::_fast_sputfield: // fall through
     case Bytecodes::_fast_cputfield: // fall through
     case Bytecodes::_fast_iputfield: __ push_i(r0); break;
@@ -2808,6 +2858,7 @@
     switch (bytecode()) {             // restore tos values
     case Bytecodes::_fast_aputfield: __ pop_ptr(r0); break;
     case Bytecodes::_fast_bputfield: // fall through
+    case Bytecodes::_fast_zputfield: // fall through
     case Bytecodes::_fast_sputfield: // fall through
     case Bytecodes::_fast_cputfield: // fall through
     case Bytecodes::_fast_iputfield: __ pop_i(r0); break;
@@ -2863,6 +2914,9 @@
   case Bytecodes::_fast_iputfield:
     __ strw(r0, field);
     break;
+  case Bytecodes::_fast_zputfield:
+    __ andw(r0, r0, 0x1);  // boolean is true if LSB is 1
+    // fall through to bputfield
   case Bytecodes::_fast_bputfield:
     __ strb(r0, field);
     break;
@@ -2982,7 +3036,7 @@
   __ null_check(r0);
   switch (state) {
   case itos:
-    __ ldr(r0, Address(r0, r1, Address::lsl(0)));
+    __ ldrw(r0, Address(r0, r1, Address::lsl(0)));
     break;
   case atos:
     __ load_heap_oop(r0, Address(r0, r1, Address::lsl(0)));
@@ -3000,7 +3054,7 @@
     __ ldrw(r3, Address(r2, in_bytes(ConstantPoolCache::base_offset() +
                                      ConstantPoolCacheEntry::flags_offset())));
     __ tbz(r3, ConstantPoolCacheEntry::is_volatile_shift, notVolatile);
-    __ membar(MacroAssembler::LoadLoad);
+    __ membar(MacroAssembler::LoadLoad | MacroAssembler::LoadStore);
     __ bind(notVolatile);
   }
 
--- a/hotspot/src/cpu/ppc/vm/abstractInterpreter_ppc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/ppc/vm/abstractInterpreter_ppc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2015 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -152,6 +152,7 @@
   intptr_t* top_frame_sp = is_top_frame ? sp : sp + (frame::abi_minframe_size - frame::abi_reg_args_size) / Interpreter::stackElementSize;
 
   interpreter_frame->interpreter_frame_set_method(method);
+  interpreter_frame->interpreter_frame_set_mirror(method->method_holder()->java_mirror());
   interpreter_frame->interpreter_frame_set_locals(locals_base);
   interpreter_frame->interpreter_frame_set_cpcache(method->constants()->cache());
   interpreter_frame->interpreter_frame_set_esp(esp);
--- a/hotspot/src/cpu/ppc/vm/c1_LIRAssembler_ppc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/ppc/vm/c1_LIRAssembler_ppc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2845,6 +2845,9 @@
   __ membar(Assembler::StoreLoad);
 }
 
+void LIR_Assembler::on_spin_wait() {
+  Unimplemented();
+}
 
 void LIR_Assembler::leal(LIR_Opr addr_opr, LIR_Opr dest) {
   LIR_Address* addr = addr_opr->as_address_ptr();
--- a/hotspot/src/cpu/ppc/vm/c1_LIRGenerator_ppc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/ppc/vm/c1_LIRGenerator_ppc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -1056,7 +1056,7 @@
 void LIRGenerator::do_NewMultiArray(NewMultiArray* x) {
   Values* dims = x->dims();
   int i = dims->length();
-  LIRItemList* items = new LIRItemList(dims->length(), NULL);
+  LIRItemList* items = new LIRItemList(i, i, NULL);
   while (i-- > 0) {
     LIRItem* size = new LIRItem(dims->at(i), this);
     items->at_put(i, size);
--- a/hotspot/src/cpu/ppc/vm/compiledIC_ppc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/ppc/vm/compiledIC_ppc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,22 +35,6 @@
 #include "opto/matcher.hpp"
 #endif
 
-// Release the CompiledICHolder* associated with this call site is there is one.
-void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
-  // This call site might have become stale so inspect it carefully.
-  NativeCall* call = nativeCall_at(call_site->addr());
-  if (is_icholder_entry(call->destination())) {
-    NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
-    InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
-  }
-}
-
-bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
-  // This call site might have become stale so inspect it carefully.
-  NativeCall* call = nativeCall_at(call_site->addr());
-  return is_icholder_entry(call->destination());
-}
-
 // ----------------------------------------------------------------------------
 
 // A PPC CompiledStaticCall looks like this:
--- a/hotspot/src/cpu/ppc/vm/frame_ppc.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/ppc/vm/frame_ppc.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -261,6 +261,7 @@
     uint64_t ijava_reserved2; // Inserted for alignment.
 #endif
     uint64_t method;
+    uint64_t mirror;
     uint64_t locals;
     uint64_t monitors;
     uint64_t cpoolCache;
--- a/hotspot/src/cpu/ppc/vm/frame_ppc.inline.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/ppc/vm/frame_ppc.inline.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -148,6 +148,11 @@
 inline Method** frame::interpreter_frame_method_addr() const {
   return (Method**) &(get_ijava_state()->method);
 }
+
+inline oop* frame::interpreter_frame_mirror_addr() const {
+  return (oop*) &(get_ijava_state()->mirror);
+}
+
 inline ConstantPoolCache** frame::interpreter_frame_cpoolcache_addr() const {
   return (ConstantPoolCache**) &(get_ijava_state()->cpoolCache);
 }
--- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -3118,6 +3118,14 @@
   }
 }
 
+void MacroAssembler::load_mirror(Register mirror, Register method) {
+  const int mirror_offset = in_bytes(Klass::java_mirror_offset());
+  ld(mirror, in_bytes(Method::const_offset()), method);
+  ld(mirror, in_bytes(ConstMethod::constants_offset()), mirror);
+  ld(mirror, ConstantPool::pool_holder_offset_in_bytes(), mirror);
+  ld(mirror, mirror_offset, mirror);
+}
+
 // Clear Array
 // Kills both input registers. tmp == R0 is allowed.
 void MacroAssembler::clear_memory_doubleword(Register base_ptr, Register cnt_dwords, Register tmp) {
--- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -647,6 +647,9 @@
   void load_klass(Register dst, Register src);
   void store_klass(Register dst_oop, Register klass, Register tmp = R0);
   void store_klass_gap(Register dst_oop, Register val = noreg); // Will store 0 if val not specified.
+
+  void load_mirror(Register mirror, Register method);
+
   static int instr_size_for_decode_klass_not_null();
   void decode_klass_not_null(Register dst, Register src = noreg);
   Register encode_klass_not_null(Register dst, Register src = noreg);
--- a/hotspot/src/cpu/ppc/vm/ppc.ad	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/ppc/vm/ppc.ad	Thu Apr 28 14:44:52 2016 -0700
@@ -2047,6 +2047,10 @@
   return ret_value;  // Per default match rules are supported.
 }
 
+const bool Matcher::has_predicated_vectors(void) {
+  return false;
+}
+
 const int Matcher::float_pressure(int default_pressure_threshold) {
   return default_pressure_threshold;
 }
--- a/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -871,7 +871,6 @@
 
   // Get synchronization object to Rscratch2.
   {
-    const int mirror_offset = in_bytes(Klass::java_mirror_offset());
     Label Lstatic;
     Label Ldone;
 
@@ -883,10 +882,7 @@
     __ b(Ldone);
 
     __ bind(Lstatic); // Static case: Lock the java mirror
-    __ ld(Robj_to_lock, in_bytes(Method::const_offset()), R19_method);
-    __ ld(Robj_to_lock, in_bytes(ConstMethod::constants_offset()), Robj_to_lock);
-    __ ld(Robj_to_lock, ConstantPool::pool_holder_offset_in_bytes(), Robj_to_lock);
-    __ ld(Robj_to_lock, mirror_offset, Robj_to_lock);
+    __ load_mirror(Robj_to_lock, R19_method);
 
     __ bind(Ldone);
     __ verify_oop(Robj_to_lock);
@@ -1051,10 +1047,14 @@
   __ addi(R26_monitor, R1_SP, - frame::ijava_state_size);
   __ addi(R15_esp, R26_monitor, - Interpreter::stackElementSize);
 
+  // Get mirror and store it in the frame as GC root for this Method*
+  __ load_mirror(R12_scratch2, R19_method);
+
   // Store values.
   // R15_esp, R14_bcp, R26_monitor, R28_mdx are saved at java calls
   // in InterpreterMacroAssembler::call_from_interpreter.
   __ std(R19_method, _ijava_state_neg(method), R1_SP);
+  __ std(R12_scratch2, _ijava_state_neg(mirror), R1_SP);
   __ std(R21_sender_SP, _ijava_state_neg(sender_sp), R1_SP);
   __ std(R27_constPoolCache, _ijava_state_neg(cpoolCache), R1_SP);
   __ std(R18_locals, _ijava_state_neg(locals), R1_SP);
@@ -1319,21 +1319,11 @@
     __ testbitdi(CCR0, R0, access_flags, JVM_ACC_STATIC_BIT);
     __ bfalse(CCR0, method_is_not_static);
 
-    // constants = method->constants();
-    __ ld(R11_scratch1, in_bytes(Method::const_offset()), R19_method);
-    __ ld(R11_scratch1, in_bytes(ConstMethod::constants_offset()), R11_scratch1);
-    // pool_holder = method->constants()->pool_holder();
-    __ ld(R11_scratch1/*pool_holder*/, ConstantPool::pool_holder_offset_in_bytes(),
-          R11_scratch1/*constants*/);
-
-    const int mirror_offset = in_bytes(Klass::java_mirror_offset());
-
-    // mirror = pool_holder->klass_part()->java_mirror();
-    __ ld(R0/*mirror*/, mirror_offset, R11_scratch1/*pool_holder*/);
+    __ load_mirror(R12_sratch2, R19_method);
     // state->_native_mirror = mirror;
 
     __ ld(R11_scratch1, 0, R1_SP);
-    __ std(R0/*mirror*/, _ijava_state_neg(oop_tmp), R11_scratch1);
+    __ std(R12_scratch2/*mirror*/, _ijava_state_neg(oop_tmp), R11_scratch1);
     // R4_ARG2 = &state->_oop_temp;
     __ addi(R4_ARG2, R11_scratch1, _ijava_state_neg(oop_tmp));
     BIND(method_is_not_static);
--- a/hotspot/src/cpu/sparc/vm/abstractInterpreter_sparc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/abstractInterpreter_sparc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -281,11 +281,12 @@
   // Llast_SP will be same as SP as there is no adapter space
   *interpreter_frame->register_addr(Llast_SP)    = (intptr_t) interpreter_frame->sp() - STACK_BIAS;
   *interpreter_frame->register_addr(LcpoolCache) = (intptr_t) method->constants()->cache();
+  // save the mirror in the interpreter frame
+  *interpreter_frame->interpreter_frame_mirror_addr() = method->method_holder()->java_mirror();
 #ifdef FAST_DISPATCH
   *interpreter_frame->register_addr(IdispatchTables) = (intptr_t) Interpreter::dispatch_table();
 #endif
 
-
 #ifdef ASSERT
   BasicObjectLock* mp = (BasicObjectLock*)monitors;
 
--- a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -3313,6 +3313,9 @@
   __ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad));
 }
 
+void LIR_Assembler::on_spin_wait() {
+  Unimplemented();
+}
 
 // Pack two sequential registers containing 32 bit values
 // into a single 64 bit register.
--- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, 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
@@ -1034,7 +1034,7 @@
 void LIRGenerator::do_NewMultiArray(NewMultiArray* x) {
   Values* dims = x->dims();
   int i = dims->length();
-  LIRItemList* items = new LIRItemList(dims->length(), NULL);
+  LIRItemList* items = new LIRItemList(i, i, NULL);
   while (i-- > 0) {
     LIRItem* size = new LIRItem(dims->at(i), this);
     items->at_put(i, size);
--- a/hotspot/src/cpu/sparc/vm/compiledIC_sparc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/compiledIC_sparc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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,22 +34,6 @@
 #include "opto/matcher.hpp"
 #endif
 
-// Release the CompiledICHolder* associated with this call site is there is one.
-void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
-  // This call site might have become stale so inspect it carefully.
-  NativeCall* call = nativeCall_at(call_site->addr());
-  if (is_icholder_entry(call->destination())) {
-    NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
-    InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
-  }
-}
-
-bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
-  // This call site might have become stale so inspect it carefully.
-  NativeCall* call = nativeCall_at(call_site->addr());
-  return is_icholder_entry(call->destination());
-}
-
 // ----------------------------------------------------------------------------
 
 #define __ _masm.
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -783,7 +783,7 @@
   if (is_interpreted_frame()) {
     DESCRIBE_FP_OFFSET(interpreter_frame_d_scratch_fp);
     DESCRIBE_FP_OFFSET(interpreter_frame_l_scratch_fp);
-    DESCRIBE_FP_OFFSET(interpreter_frame_padding);
+    DESCRIBE_FP_OFFSET(interpreter_frame_mirror);
     DESCRIBE_FP_OFFSET(interpreter_frame_oop_temp);
 
     // esp, according to Lesp (e.g. not depending on bci), if seems valid
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -209,7 +209,8 @@
        // 2 words, also used to save float regs across  calls to C
        interpreter_frame_d_scratch_fp_offset          = -2,
        interpreter_frame_l_scratch_fp_offset          = -4,
-       interpreter_frame_padding_offset               = -5, // for native calls only
+       interpreter_frame_mirror_offset                = -5, // keep interpreted method alive
+
        interpreter_frame_oop_temp_offset              = -6, // for native calls only
        interpreter_frame_vm_locals_fp_offset          = -6, // should be same as above, and should be zero mod 8
 
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -163,6 +163,10 @@
   *interpreter_frame_monitors_addr() = monitors;
 }
 
+inline oop* frame::interpreter_frame_mirror_addr() const {
+  return (oop*)(fp() + interpreter_frame_mirror_offset);
+}
+
 // Constant pool cache
 
 // where LcpoolCache is saved:
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -3257,12 +3257,12 @@
     if (var_size_in_bytes->is_valid()) {
       // size is unknown at compile time
       cmp(free, var_size_in_bytes);
-      br(Assembler::lessUnsigned, false, Assembler::pn, slow_case); // if there is not enough space go the slow case
+      brx(Assembler::lessUnsigned, false, Assembler::pn, slow_case); // if there is not enough space go the slow case
       delayed()->add(obj, var_size_in_bytes, end);
     } else {
       // size is known at compile time
       cmp(free, con_size_in_bytes);
-      br(Assembler::lessUnsigned, false, Assembler::pn, slow_case); // if there is not enough space go the slow case
+      brx(Assembler::lessUnsigned, false, Assembler::pn, slow_case); // if there is not enough space go the slow case
       delayed()->add(obj, con_size_in_bytes, end);
     }
     // Compare obj with the value at top_addr; if still equal, swap the value of
@@ -3972,6 +3972,14 @@
   card_table_write(bs->byte_map_base, tmp, store_addr);
 }
 
+void MacroAssembler::load_mirror(Register mirror, Register method) {
+  const int mirror_offset = in_bytes(Klass::java_mirror_offset());
+  ld_ptr(method, in_bytes(Method::const_offset()), mirror);
+  ld_ptr(mirror, in_bytes(ConstMethod::constants_offset()), mirror);
+  ld_ptr(mirror, ConstantPool::pool_holder_offset_in_bytes(), mirror);
+  ld_ptr(mirror, mirror_offset, mirror);
+}
+
 void MacroAssembler::load_klass(Register src_oop, Register klass) {
   // The number of bytes in this code is used by
   // MachCallDynamicJavaNode::ret_addr_offset()
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1012,6 +1012,8 @@
   inline void ldbool(const Address& a, Register d);
   inline void movbool( bool boolconst, Register d);
 
+  void load_mirror(Register mirror, Register method);
+
   // klass oop manipulations if compressed
   void load_klass(Register src_oop, Register klass);
   void store_klass(Register klass, Register dst_oop);
--- a/hotspot/src/cpu/sparc/vm/sparc.ad	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/sparc.ad	Thu Apr 28 14:44:52 2016 -0700
@@ -1904,6 +1904,10 @@
   return ret_value;  // Per default match rules are supported.
 }
 
+const bool Matcher::has_predicated_vectors(void) {
+  return false;
+}
+
 const int Matcher::float_pressure(int default_pressure_threshold) {
   return default_pressure_threshold;
 }
--- a/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -557,17 +557,12 @@
 
   // get synchronization object to O0
   { Label done;
-    const int mirror_offset = in_bytes(Klass::java_mirror_offset());
     __ btst(JVM_ACC_STATIC, O0);
     __ br( Assembler::zero, true, Assembler::pt, done);
     __ delayed()->ld_ptr(Llocals, Interpreter::local_offset_in_bytes(0), O0); // get receiver for not-static case
 
-    __ ld_ptr( Lmethod, in_bytes(Method::const_offset()), O0);
-    __ ld_ptr( O0, in_bytes(ConstMethod::constants_offset()), O0);
-    __ ld_ptr( O0, ConstantPool::pool_holder_offset_in_bytes(), O0);
-
     // lock the mirror, not the Klass*
-    __ ld_ptr( O0, mirror_offset, O0);
+    __ load_mirror(O0, Lmethod);
 
 #ifdef ASSERT
     __ tst(O0);
@@ -881,6 +876,10 @@
     __ add(Lbcp, in_bytes(ConstMethod::codes_offset()), Lbcp);
   }
   __ mov( G5_method, Lmethod);                 // set Lmethod
+  // Get mirror and store it in the frame as GC root for this Method*
+  Register mirror = LcpoolCache;
+  __ load_mirror(mirror, Lmethod);
+  __ st_ptr(mirror, FP, (frame::interpreter_frame_mirror_offset * wordSize) + STACK_BIAS);
   __ get_constant_pool_cache( LcpoolCache );   // set LcpoolCache
   __ sub(FP, rounded_vm_local_words * BytesPerWord, Lmonitors ); // set Lmonitors
 #ifdef _LP64
@@ -1297,12 +1296,7 @@
     // get native function entry point(O0 is a good temp until the very end)
     __ delayed()->ld_ptr(Lmethod, in_bytes(Method::native_function_offset()), O0);
     // for static methods insert the mirror argument
-    const int mirror_offset = in_bytes(Klass::java_mirror_offset());
-
-    __ ld_ptr(Lmethod, Method:: const_offset(), O1);
-    __ ld_ptr(O1, ConstMethod::constants_offset(), O1);
-    __ ld_ptr(O1, ConstantPool::pool_holder_offset_in_bytes(), O1);
-    __ ld_ptr(O1, mirror_offset, O1);
+    __ load_mirror(O1, Lmethod);
 #ifdef ASSERT
     if (!PrintSignatureHandlers)  // do not dirty the output with this
     { Label L;
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -112,11 +112,14 @@
         FLAG_SET_DEFAULT(AllocatePrefetchDistance, 256);
       }
       if (AllocatePrefetchInstr == 1) {
-        // Need a space at the end of TLAB for BIS since it
-        // will fault when accessing memory outside of heap.
+        // Need extra space at the end of TLAB for BIS, otherwise prefetching
+        // instructions will fault (due to accessing memory outside of heap).
+        // The amount of space is the max of the number of lines to
+        // prefetch for array and for instance allocations. (Extra space must be
+        // reserved to accomodate both types of allocations.)
 
         // +1 for rounding up to next cache line, +1 to be safe
-        int lines = AllocatePrefetchLines + 2;
+        int lines = MAX2(AllocatePrefetchLines, AllocateInstancePrefetchLines) + 2;
         int step_size = AllocatePrefetchStepSize;
         int distance = AllocatePrefetchDistance;
         _reserve_for_allocation_prefetch = (distance + step_size*lines)/(int)HeapWordSize;
--- a/hotspot/src/cpu/x86/vm/abstractInterpreter_x86.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/abstractInterpreter_x86.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -113,6 +113,8 @@
   }
   *interpreter_frame->interpreter_frame_cache_addr() =
     method->constants()->cache();
+  *interpreter_frame->interpreter_frame_mirror_addr() =
+    method->method_holder()->java_mirror();
 }
 
 #ifndef _LP64
--- a/hotspot/src/cpu/x86/vm/assembler_x86.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/assembler_x86.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1240,6 +1240,7 @@
 void Assembler::addsd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x58);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -1250,6 +1251,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x58);
   emit_operand(dst, src);
@@ -1599,6 +1601,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);;
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, xnoreg, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x2F);
   emit_operand(dst, src);
@@ -1607,6 +1610,7 @@
 void Assembler::comisd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, xnoreg, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x2F);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -1733,6 +1737,7 @@
 void Assembler::cvtsd2ss(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5A);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -1743,6 +1748,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5A);
   emit_operand(dst, src);
@@ -1827,6 +1833,15 @@
   emit_int8((unsigned char)(0xC0 | encode));
 }
 
+void Assembler::cvttpd2dq(XMMRegister dst, XMMRegister src) {
+  NOT_LP64(assert(VM_Version::supports_sse2(), ""));
+  int vector_len = VM_Version::supports_avx512novl() ? AVX_512bit : AVX_128bit;
+  InstructionAttr attributes(vector_len, /* rex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  int encode = simd_prefix_and_encode(dst, xnoreg, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
+  emit_int8((unsigned char)0xE6);
+  emit_int8((unsigned char)(0xC0 | encode));
+}
+
 void Assembler::decl(Address dst) {
   // Don't use it directly. Use MacroAssembler::decrement() instead.
   InstructionMark im(this);
@@ -1840,6 +1855,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5E);
   emit_operand(dst, src);
@@ -1848,6 +1864,7 @@
 void Assembler::divsd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5E);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -2122,6 +2139,7 @@
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   int vector_len = VM_Version::supports_avx512novl() ? AVX_512bit : AVX_128bit;
   InstructionAttr attributes(vector_len, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, xnoreg, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x28);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -2156,6 +2174,7 @@
   NOT_LP64(assert(VM_Version::supports_sse3(), ""));
   int vector_len = VM_Version::supports_avx512novl() ? AVX_512bit : AVX_128bit;
   InstructionAttr attributes(vector_len, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, xnoreg, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x12);
   emit_int8(0xC0 | encode);
@@ -2193,6 +2212,15 @@
   emit_int8((unsigned char)(0xC0 | encode));
 }
 
+void Assembler::kmovwl(KRegister dst, Address src) {
+  assert(VM_Version::supports_evex(), "");
+  InstructionMark im(this);
+  InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false);
+  vex_prefix(src, 0, dst->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F, &attributes);
+  emit_int8((unsigned char)0x90);
+  emit_operand((Register)dst, src);
+}
+
 void Assembler::kmovdl(KRegister dst, Register src) {
   assert(VM_Version::supports_avx512bw(), "");
   InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false);
@@ -2251,6 +2279,14 @@
   emit_int8((unsigned char)(0xC0 | encode));
 }
 
+void Assembler::knotwl(KRegister dst, KRegister src) {
+  assert(VM_Version::supports_evex(), "");
+  InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false);
+  int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F, &attributes);
+  emit_int8((unsigned char)0x44);
+  emit_int8((unsigned char)(0xC0 | encode));
+}
+
 // This instruction produces ZF or CF flags
 void Assembler::kortestbl(KRegister src1, KRegister src2) {
   assert(VM_Version::supports_avx512dq(), "");
@@ -2423,6 +2459,7 @@
 void Assembler::evmovdqub(XMMRegister dst, XMMRegister src, int vector_len) {
   assert(VM_Version::supports_evex(), "");
   InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
+  attributes.set_is_evex_instruction();
   int prefix = (_legacy_mode_bw) ? VEX_SIMD_F2 : VEX_SIMD_F3;
   int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), (Assembler::VexSimdPrefix)prefix, VEX_OPCODE_0F, &attributes);
   emit_int8(0x6F);
@@ -2435,6 +2472,7 @@
   InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
   int prefix = (_legacy_mode_bw) ? VEX_SIMD_F2 : VEX_SIMD_F3;
   attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
+  attributes.set_is_evex_instruction();
   vex_prefix(src, 0, dst->encoding(), (Assembler::VexSimdPrefix)prefix, VEX_OPCODE_0F, &attributes);
   emit_int8(0x6F);
   emit_operand(dst, src);
@@ -2447,6 +2485,7 @@
   InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
   int prefix = (_legacy_mode_bw) ? VEX_SIMD_F2 : VEX_SIMD_F3;
   attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
+  attributes.set_is_evex_instruction();
   vex_prefix(dst, 0, src->encoding(), (Assembler::VexSimdPrefix)prefix, VEX_OPCODE_0F, &attributes);
   emit_int8(0x7F);
   emit_operand(src, dst);
@@ -2455,6 +2494,7 @@
 void Assembler::evmovdquw(XMMRegister dst, XMMRegister src, int vector_len) {
   assert(VM_Version::supports_evex(), "");
   InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
+  attributes.set_is_evex_instruction();
   int prefix = (_legacy_mode_bw) ? VEX_SIMD_F2 : VEX_SIMD_F3;
   int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), (Assembler::VexSimdPrefix)prefix, VEX_OPCODE_0F, &attributes);
   emit_int8(0x6F);
@@ -2466,6 +2506,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
+  attributes.set_is_evex_instruction();
   int prefix = (_legacy_mode_bw) ? VEX_SIMD_F2 : VEX_SIMD_F3;
   vex_prefix(src, 0, dst->encoding(), (Assembler::VexSimdPrefix)prefix, VEX_OPCODE_0F, &attributes);
   emit_int8(0x6F);
@@ -2478,6 +2519,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
+  attributes.set_is_evex_instruction();
   int prefix = (_legacy_mode_bw) ? VEX_SIMD_F2 : VEX_SIMD_F3;
   vex_prefix(dst, 0, src->encoding(), (Assembler::VexSimdPrefix)prefix, VEX_OPCODE_0F, &attributes);
   emit_int8(0x7F);
@@ -2509,8 +2551,8 @@
   assert(src != xnoreg, "sanity");
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
   attributes.set_is_evex_instruction();
-  attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
   vex_prefix(dst, 0, src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
   emit_int8(0x7F);
   emit_operand(src, dst);
@@ -2529,8 +2571,8 @@
   assert(VM_Version::supports_evex(), "");
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
   attributes.set_is_evex_instruction();
-  attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
   vex_prefix(src, 0, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
   emit_int8(0x6F);
   emit_operand(dst, src);
@@ -2541,8 +2583,8 @@
   assert(src != xnoreg, "sanity");
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
   attributes.set_is_evex_instruction();
-  attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
   vex_prefix(dst, 0, src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
   emit_int8(0x7F);
   emit_operand(src, dst);
@@ -2592,6 +2634,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x12);
   emit_operand(dst, src);
@@ -2622,6 +2665,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, xnoreg, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
   emit_int8(0x7E);
   emit_operand(dst, src);
@@ -2632,6 +2676,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(src, xnoreg, dst, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xD6);
   emit_operand(src, dst);
@@ -2656,6 +2701,7 @@
 void Assembler::movsd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x10);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -2666,6 +2712,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, xnoreg, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x10);
   emit_operand(dst, src);
@@ -2676,6 +2723,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(src, xnoreg, dst, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x11);
   emit_operand(src, dst);
@@ -2799,6 +2847,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x59);
   emit_operand(dst, src);
@@ -2807,6 +2856,7 @@
 void Assembler::mulsd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x59);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -3786,6 +3836,7 @@
 void Assembler::punpcklqdq(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x6C);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4081,6 +4132,7 @@
 void Assembler::sqrtsd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x51);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4091,6 +4143,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x51);
   emit_operand(dst, src);
@@ -4166,6 +4219,7 @@
 void Assembler::subsd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5C);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4176,6 +4230,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5C);
   emit_operand(dst, src);
@@ -4263,6 +4318,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, xnoreg, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x2E);
   emit_operand(dst, src);
@@ -4271,6 +4327,7 @@
 void Assembler::ucomisd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, xnoreg, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x2E);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4382,6 +4439,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   vex_prefix(src, nds->encoding(), dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x58);
   emit_operand(dst, src);
@@ -4390,6 +4448,7 @@
 void Assembler::vaddsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
   assert(VM_Version::supports_avx(), "");
   InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x58);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4418,6 +4477,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   vex_prefix(src, nds->encoding(), dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5E);
   emit_operand(dst, src);
@@ -4426,6 +4486,7 @@
 void Assembler::vdivsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
   assert(VM_Version::supports_avx(), "");
   InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5E);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4454,6 +4515,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   vex_prefix(src, nds->encoding(), dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x59);
   emit_operand(dst, src);
@@ -4462,6 +4524,7 @@
 void Assembler::vmulsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
   assert(VM_Version::supports_avx(), "");
   InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x59);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4490,6 +4553,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   vex_prefix(src, nds->encoding(), dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5C);
   emit_operand(dst, src);
@@ -4498,6 +4562,7 @@
 void Assembler::vsubsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
   assert(VM_Version::supports_avx(), "");
   InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5C);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4528,6 +4593,7 @@
 void Assembler::addpd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x58);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4537,6 +4603,7 @@
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
   simd_prefix(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x58);
@@ -4555,6 +4622,7 @@
 void Assembler::vaddpd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
   assert(VM_Version::supports_avx(), "");
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x58);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4573,6 +4641,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   vex_prefix(src, nds->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x58);
   emit_operand(dst, src);
@@ -4591,6 +4660,7 @@
 void Assembler::subpd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5C);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4607,6 +4677,7 @@
 void Assembler::vsubpd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
   assert(VM_Version::supports_avx(), "");
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5C);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4625,6 +4696,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   vex_prefix(src, nds->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5C);
   emit_operand(dst, src);
@@ -4643,6 +4715,7 @@
 void Assembler::mulpd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x59);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4653,6 +4726,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x59);
   emit_operand(dst, src);
@@ -4669,6 +4743,7 @@
 void Assembler::vmulpd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
   assert(VM_Version::supports_avx(), "");
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x59);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4687,6 +4762,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   vex_prefix(src, nds->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x59);
   emit_operand(dst, src);
@@ -4705,6 +4781,7 @@
 void Assembler::divpd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5E);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4721,6 +4798,7 @@
 void Assembler::vdivpd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
   assert(VM_Version::supports_avx(), "");
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5E);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4739,6 +4817,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   vex_prefix(src, nds->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x5E);
   emit_operand(dst, src);
@@ -4757,6 +4836,7 @@
 void Assembler::vsqrtpd(XMMRegister dst, XMMRegister src, int vector_len) {
   assert(VM_Version::supports_avx(), "");
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x51);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4767,6 +4847,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   vex_prefix(src, 0, dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x51);
   emit_operand(dst, src);
@@ -4775,6 +4856,7 @@
 void Assembler::andpd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ !_legacy_mode_dq, /* legacy_mode */ _legacy_mode_dq, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x54);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4803,6 +4885,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ !_legacy_mode_dq, /* legacy_mode */ _legacy_mode_dq, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x54);
   emit_operand(dst, src);
@@ -4811,6 +4894,7 @@
 void Assembler::vandpd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
   assert(VM_Version::supports_avx(), "");
   InstructionAttr attributes(vector_len, /* vex_w */ !_legacy_mode_dq, /* legacy_mode */ _legacy_mode_dq, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x54);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4829,6 +4913,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ !_legacy_mode_dq, /* legacy_mode */ _legacy_mode_dq, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   vex_prefix(src, nds->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x54);
   emit_operand(dst, src);
@@ -4847,6 +4932,7 @@
 void Assembler::unpckhpd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x15);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4855,6 +4941,7 @@
 void Assembler::unpcklpd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x14);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4863,6 +4950,7 @@
 void Assembler::xorpd(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ !_legacy_mode_dq, /* legacy_mode */ _legacy_mode_dq, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x57);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4881,6 +4969,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(AVX_128bit, /* rex_w */ !_legacy_mode_dq, /* legacy_mode */ _legacy_mode_dq, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   simd_prefix(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x57);
   emit_operand(dst, src);
@@ -4899,6 +4988,7 @@
 void Assembler::vxorpd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
   assert(VM_Version::supports_avx(), "");
   InstructionAttr attributes(vector_len, /* vex_w */ !_legacy_mode_dq, /* legacy_mode */ _legacy_mode_dq, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x57);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -4917,6 +5007,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ !_legacy_mode_dq, /* legacy_mode */ _legacy_mode_dq, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   vex_prefix(src, nds->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x57);
   emit_operand(dst, src);
@@ -4987,13 +5078,14 @@
 void Assembler::paddq(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xD4);
   emit_int8((unsigned char)(0xC0 | encode));
 }
 
 void Assembler::phaddw(XMMRegister dst, XMMRegister src) {
-  NOT_LP64(assert(VM_Version::supports_sse3(), ""));
+  assert(VM_Version::supports_sse3(), "");
   InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ false, /* uses_vl */ false);
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
   emit_int8(0x01);
@@ -5001,7 +5093,7 @@
 }
 
 void Assembler::phaddd(XMMRegister dst, XMMRegister src) {
-  NOT_LP64(assert(VM_Version::supports_sse3(), ""));
+  assert(VM_Version::supports_sse3(), "");
   InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ false, /* uses_vl */ false);
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
   emit_int8(0x02);
@@ -5035,6 +5127,7 @@
 void Assembler::vpaddq(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
   assert(UseAVX > 0, "requires some form of AVX");
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xD4);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -5075,6 +5168,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   vex_prefix(src, nds->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xD4);
   emit_operand(dst, src);
@@ -5106,6 +5200,7 @@
 void Assembler::psubq(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xFB);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -5138,6 +5233,7 @@
 void Assembler::vpsubq(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
   assert(UseAVX > 0, "requires some form of AVX");
   InstructionAttr attributes(vector_len, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xFB);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -5178,6 +5274,7 @@
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   vex_prefix(src, nds->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xFB);
   emit_operand(dst, src);
@@ -5216,8 +5313,9 @@
 }
 
 void Assembler::vpmullq(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
-  assert(UseAVX > 2, "requires some form of AVX");
-  InstructionAttr attributes(vector_len, /* rex_w */ true, /* legacy_mode */ _legacy_mode_dq, /* no_mask_reg */ false, /* uses_vl */ true);
+  assert(UseAVX > 2, "requires some form of EVEX");
+  InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ _legacy_mode_dq, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_is_evex_instruction();
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
   emit_int8(0x40);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -5244,10 +5342,11 @@
 }
 
 void Assembler::vpmullq(XMMRegister dst, XMMRegister nds, Address src, int vector_len) {
-  assert(UseAVX > 0, "requires some form of AVX");
+  assert(UseAVX > 2, "requires some form of EVEX");
   InstructionMark im(this);
   InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ _legacy_mode_dq, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_is_evex_instruction();
   vex_prefix(src, nds->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
   emit_int8(0x40);
   emit_operand(dst, src);
@@ -5303,6 +5402,7 @@
 void Assembler::psllq(XMMRegister dst, XMMRegister shift) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, shift, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xF3);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -5332,6 +5432,7 @@
 void Assembler::vpsllq(XMMRegister dst, XMMRegister src, int shift, int vector_len) {
   assert(UseAVX > 0, "requires some form of AVX");
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   // XMM6 is for /6 encoding: 66 0F 73 /6 ib
   int encode = vex_prefix_and_encode(xmm6->encoding(), dst->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x73);
@@ -5358,6 +5459,7 @@
 void Assembler::vpsllq(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len) {
   assert(UseAVX > 0, "requires some form of AVX");
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), src->encoding(), shift->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xF3);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -5389,6 +5491,7 @@
   // shifts 128 bit value in xmm register by number of bytes.
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   // XMM2 is for /2 encoding: 66 0F 73 /2 ib
   int encode = simd_prefix_and_encode(xmm2, dst, dst, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x73);
@@ -5415,6 +5518,7 @@
 void Assembler::psrlq(XMMRegister dst, XMMRegister shift) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, shift, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xD3);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -5443,6 +5547,7 @@
 void Assembler::vpsrlq(XMMRegister dst, XMMRegister src, int shift, int vector_len) {
   assert(UseAVX > 0, "requires some form of AVX");
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   // XMM2 is for /2 encoding: 66 0F 73 /2 ib
   int encode = vex_prefix_and_encode(xmm2->encoding(), dst->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8(0x73);
@@ -5469,6 +5574,7 @@
 void Assembler::vpsrlq(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len) {
   assert(UseAVX > 0, "requires some form of AVX");
   InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), src->encoding(), shift->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xD3);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -5578,6 +5684,7 @@
 void Assembler::pandn(XMMRegister dst, XMMRegister src) {
   NOT_LP64(assert(VM_Version::supports_sse2(), ""));
   InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xDF);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -5867,9 +5974,9 @@
 }
 
 void Assembler::vextracti64x2(XMMRegister dst, XMMRegister src, uint8_t imm8) {
-  assert(VM_Version::supports_evex(), "");
+  assert(VM_Version::supports_avx512dq(), "");
   assert(imm8 <= 0x03, "imm8: %u", imm8);
-  InstructionAttr attributes(AVX_512bit, /* vex_w */ !_legacy_mode_dq, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  InstructionAttr attributes(AVX_512bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   int encode = vex_prefix_and_encode(src->encoding(), 0, dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3A, &attributes);
   emit_int8(0x39);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -5957,9 +6064,9 @@
 }
 
 void Assembler::vextractf64x2(XMMRegister dst, XMMRegister src, uint8_t imm8) {
-  assert(VM_Version::supports_evex(), "");
+  assert(VM_Version::supports_avx512dq(), "");
   assert(imm8 <= 0x03, "imm8: %u", imm8);
-  InstructionAttr attributes(AVX_512bit, /* vex_w */ !_legacy_mode_dq, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
+  InstructionAttr attributes(AVX_512bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
   int encode = vex_prefix_and_encode(src->encoding(), 0, dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3A, &attributes);
   emit_int8(0x19);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -6084,7 +6191,8 @@
 // duplicate 8-byte integer data from src into programmed locations in dest : requires AVX512VL
 void Assembler::evpbroadcastq(XMMRegister dst, XMMRegister src, int vector_len) {
   assert(VM_Version::supports_evex(), "");
-  InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
   emit_int8(0x59);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -6094,7 +6202,8 @@
   assert(VM_Version::supports_evex(), "");
   assert(dst != xnoreg, "sanity");
   InstructionMark im(this);
-  InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
   // swap src<->dst for encoding
   vex_prefix(src, 0, dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
@@ -6129,7 +6238,8 @@
 // duplicate double precision data from src into programmed locations in dest : requires AVX512VL
 void Assembler::evpbroadcastsd(XMMRegister dst, XMMRegister src, int vector_len) {
   assert(VM_Version::supports_evex(), "");
-  InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_rex_vex_w_reverted();
   int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
   emit_int8(0x19);
   emit_int8((unsigned char)(0xC0 | encode));
@@ -6139,8 +6249,9 @@
   assert(VM_Version::supports_evex(), "");
   assert(dst != xnoreg, "sanity");
   InstructionMark im(this);
-  InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
   attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
+  attributes.set_rex_vex_w_reverted();
   // swap src<->dst for encoding
   vex_prefix(src, 0, dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
   emit_int8(0x19);
@@ -6154,12 +6265,9 @@
 void Assembler::evpbroadcastb(XMMRegister dst, Register src, int vector_len) {
   assert(VM_Version::supports_evex(), "");
   InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
+  attributes.set_is_evex_instruction();
   int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
-  if (attributes.is_evex_instruction()) {
-    emit_int8(0x7A);
-  } else {
-    emit_int8(0x78);
-  }
+  emit_int8(0x7A);
   emit_int8((unsigned char)(0xC0 | encode));
 }
 
@@ -6167,12 +6275,9 @@
 void Assembler::evpbroadcastw(XMMRegister dst, Register src, int vector_len) {
   assert(VM_Version::supports_evex(), "");
   InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
+  attributes.set_is_evex_instruction();
   int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
-  if (attributes.is_evex_instruction()) {
-    emit_int8(0x7B);
-  } else {
-    emit_int8(0x79);
-  }
+  emit_int8(0x7B);
   emit_int8((unsigned char)(0xC0 | encode));
 }
 
@@ -6180,12 +6285,9 @@
 void Assembler::evpbroadcastd(XMMRegister dst, Register src, int vector_len) {
   assert(VM_Version::supports_evex(), "");
   InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_is_evex_instruction();
   int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
-  if (attributes.is_evex_instruction()) {
-    emit_int8(0x7C);
-  } else {
-    emit_int8(0x58);
-  }
+  emit_int8(0x7C);
   emit_int8((unsigned char)(0xC0 | encode));
 }
 
@@ -6193,12 +6295,9 @@
 void Assembler::evpbroadcastq(XMMRegister dst, Register src, int vector_len) {
   assert(VM_Version::supports_evex(), "");
   InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
+  attributes.set_is_evex_instruction();
   int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
-  if (attributes.is_evex_instruction()) {
-    emit_int8(0x7C);
-  } else {
-    emit_int8(0x59);
-  }
+  emit_int8(0x7C);
   emit_int8((unsigned char)(0xC0 | encode));
 }
 
@@ -6853,6 +6952,9 @@
     attributes->set_is_evex_instruction();
     evex_prefix(vex_r, vex_b, vex_x, evex_r, evex_v, nds_enc, pre, opc);
   } else {
+    if (UseAVX > 2 && attributes->is_rex_vex_w_reverted()) {
+      attributes->set_rex_vex_w(false);
+    }
     vex_prefix(vex_r, vex_b, vex_x, nds_enc, pre, opc);
   }
 }
@@ -6912,6 +7014,9 @@
     attributes->set_is_evex_instruction();
     evex_prefix(vex_r, vex_b, vex_x, evex_r, evex_v, nds_enc, pre, opc);
   } else {
+    if (UseAVX > 2 && attributes->is_rex_vex_w_reverted()) {
+      attributes->set_rex_vex_w(false);
+    }
     vex_prefix(vex_r, vex_b, vex_x, nds_enc, pre, opc);
   }
 
@@ -6966,6 +7071,21 @@
   emit_int8((unsigned char)(0xF0 & src2_enc<<4));
 }
 
+void Assembler::shlxl(Register dst, Register src1, Register src2) {
+  assert(VM_Version::supports_bmi2(), "");
+  InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ false, /* uses_vl */ false);
+  int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
+  emit_int8((unsigned char)0xF7);
+  emit_int8((unsigned char)(0xC0 | encode));
+}
+
+void Assembler::shlxq(Register dst, Register src1, Register src2) {
+  assert(VM_Version::supports_bmi2(), "");
+  InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ true, /* no_mask_reg */ false, /* uses_vl */ false);
+  int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
+  emit_int8((unsigned char)0xF7);
+  emit_int8((unsigned char)(0xC0 | encode));
+}
 
 #ifndef _LP64
 
--- a/hotspot/src/cpu/x86/vm/assembler_x86.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/assembler_x86.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1048,6 +1048,8 @@
   void cvttss2sil(Register dst, XMMRegister src);
   void cvttss2siq(Register dst, XMMRegister src);
 
+  void cvttpd2dq(XMMRegister dst, XMMRegister src);
+
   // Divide Scalar Double-Precision Floating-Point Values
   void divsd(XMMRegister dst, Address src);
   void divsd(XMMRegister dst, XMMRegister src);
@@ -1335,6 +1337,7 @@
   void kmovbl(KRegister dst, Register src);
   void kmovbl(Register dst, KRegister src);
   void kmovwl(KRegister dst, Register src);
+  void kmovwl(KRegister dst, Address src);
   void kmovwl(Register dst, KRegister src);
   void kmovdl(KRegister dst, Register src);
   void kmovdl(Register dst, KRegister src);
@@ -1344,6 +1347,8 @@
   void kmovql(KRegister dst, Register src);
   void kmovql(Register dst, KRegister src);
 
+  void knotwl(KRegister dst, KRegister src);
+
   void kortestbl(KRegister dst, KRegister src);
   void kortestwl(KRegister dst, KRegister src);
   void kortestdl(KRegister dst, KRegister src);
@@ -2050,6 +2055,8 @@
   void cmppd(XMMRegister dst, XMMRegister nds, XMMRegister src, int cop, int vector_len);
   void vpblendd(XMMRegister dst, XMMRegister nds, XMMRegister src1, XMMRegister src2, int vector_len);
 
+  void shlxl(Register dst, Register src1, Register src2);
+  void shlxq(Register dst, Register src1, Register src2);
 
  protected:
   // Next instructions require address alignment 16 bytes SSE mode.
@@ -2075,6 +2082,7 @@
     :
       _avx_vector_len(vector_len),
       _rex_vex_w(rex_vex_w),
+      _rex_vex_w_reverted(false),
       _legacy_mode(legacy_mode),
       _no_reg_mask(no_reg_mask),
       _uses_vl(uses_vl),
@@ -2098,6 +2106,7 @@
 private:
   int  _avx_vector_len;
   bool _rex_vex_w;
+  bool _rex_vex_w_reverted;
   bool _legacy_mode;
   bool _no_reg_mask;
   bool _uses_vl;
@@ -2114,6 +2123,7 @@
   // query functions for field accessors
   int  get_vector_len(void) const { return _avx_vector_len; }
   bool is_rex_vex_w(void) const { return _rex_vex_w; }
+  bool is_rex_vex_w_reverted(void) { return _rex_vex_w_reverted; }
   bool is_legacy_mode(void) const { return _legacy_mode; }
   bool is_no_reg_mask(void) const { return _no_reg_mask; }
   bool uses_vl(void) const { return _uses_vl; }
@@ -2127,6 +2137,12 @@
   // Set the vector len manually
   void set_vector_len(int vector_len) { _avx_vector_len = vector_len; }
 
+  // Set revert rex_vex_w for avx encoding
+  void set_rex_vex_w_reverted(void) { _rex_vex_w_reverted = true; }
+
+  // Set rex_vex_w based on state
+  void set_rex_vex_w(bool state) { _rex_vex_w = state; }
+
   // Set the instruction to be encoded in AVX mode
   void set_is_legacy_mode(void) { _legacy_mode = true; }
 
--- a/hotspot/src/cpu/x86/vm/c1_FpuStackSim_x86.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/c1_FpuStackSim_x86.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, 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
@@ -169,18 +169,18 @@
 
 intArray* FpuStackSim::write_state() {
   intArray* res = new intArray(1 + FrameMap::nof_fpu_regs);
-  (*res)[0] = stack_size();
+  res->append(stack_size());
   for (int i = 0; i < FrameMap::nof_fpu_regs; i++) {
-    (*res)[1 + i] = regs_at(i);
+    res->append(regs_at(i));
   }
   return res;
 }
 
 
 void FpuStackSim::read_state(intArray* fpu_stack_state) {
-  _stack_size = (*fpu_stack_state)[0];
+  _stack_size = fpu_stack_state->at(0);
   for (int i = 0; i < FrameMap::nof_fpu_regs; i++) {
-    set_regs_at(i, (*fpu_stack_state)[1 + i]);
+    set_regs_at(i, fpu_stack_state->at(1 + i));
   }
 }
 
--- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2365,13 +2365,8 @@
   } else if (value->is_double_fpu()) {
     assert(value->fpu_regnrLo() == 0 && dest->fpu_regnrLo() == 0, "both must be on TOS");
     switch(code) {
-      case lir_log10 : __ flog10() ; break;
       case lir_abs   : __ fabs() ; break;
       case lir_sqrt  : __ fsqrt(); break;
-      case lir_tan :
-        // Should consider not saving rbx, if not necessary
-        __ trigfunc('t', op->as_Op2()->fpu_stack_size());
-        break;
       default      : ShouldNotReachHere();
     }
   } else {
@@ -3886,6 +3881,10 @@
   __ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad));
 }
 
+void LIR_Assembler::on_spin_wait() {
+  __ pause ();
+}
+
 void LIR_Assembler::get_thread(LIR_Opr result_reg) {
   assert(result_reg->is_register(), "check");
 #ifdef _LP64
--- a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, 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
@@ -813,7 +813,8 @@
 
   if (x->id() == vmIntrinsics::_dexp || x->id() == vmIntrinsics::_dlog ||
       x->id() == vmIntrinsics::_dpow || x->id() == vmIntrinsics::_dcos ||
-      x->id() == vmIntrinsics::_dsin) {
+      x->id() == vmIntrinsics::_dsin || x->id() == vmIntrinsics::_dtan ||
+      x->id() == vmIntrinsics::_dlog10) {
     do_LibmIntrinsic(x);
     return;
   }
@@ -821,58 +822,17 @@
   LIRItem value(x->argument_at(0), this);
 
   bool use_fpu = false;
-  if (UseSSE >= 2) {
-    switch(x->id()) {
-      case vmIntrinsics::_dtan:
-      case vmIntrinsics::_dlog10:
-        use_fpu = true;
-        break;
-    }
-  } else {
+  if (UseSSE < 2) {
     value.set_destroys_register();
   }
-
   value.load_item();
 
   LIR_Opr calc_input = value.result();
-  LIR_Opr calc_input2 = NULL;
-  if (x->id() == vmIntrinsics::_dpow) {
-    LIRItem extra_arg(x->argument_at(1), this);
-    if (UseSSE < 2) {
-      extra_arg.set_destroys_register();
-    }
-    extra_arg.load_item();
-    calc_input2 = extra_arg.result();
-  }
   LIR_Opr calc_result = rlock_result(x);
 
-  // sin, cos, pow and exp need two free fpu stack slots, so register
-  // two temporary operands
-  LIR_Opr tmp1 = FrameMap::caller_save_fpu_reg_at(0);
-  LIR_Opr tmp2 = FrameMap::caller_save_fpu_reg_at(1);
-
-  if (use_fpu) {
-    LIR_Opr tmp = FrameMap::fpu0_double_opr;
-    int tmp_start = 1;
-    if (calc_input2 != NULL) {
-      __ move(calc_input2, tmp);
-      tmp_start = 2;
-      calc_input2 = tmp;
-    }
-    __ move(calc_input, tmp);
-
-    calc_input = tmp;
-    calc_result = tmp;
-
-    tmp1 = FrameMap::caller_save_fpu_reg_at(tmp_start);
-    tmp2 = FrameMap::caller_save_fpu_reg_at(tmp_start + 1);
-  }
-
   switch(x->id()) {
     case vmIntrinsics::_dabs:   __ abs  (calc_input, calc_result, LIR_OprFact::illegalOpr); break;
     case vmIntrinsics::_dsqrt:  __ sqrt (calc_input, calc_result, LIR_OprFact::illegalOpr); break;
-    case vmIntrinsics::_dtan:   __ tan  (calc_input, calc_result, tmp1, tmp2);              break;
-    case vmIntrinsics::_dlog10: __ log10(calc_input, calc_result, tmp1);                    break;
     default:                    ShouldNotReachHere();
   }
 
@@ -913,21 +873,28 @@
   result_reg = tmp;
   switch(x->id()) {
     case vmIntrinsics::_dexp:
-      if (VM_Version::supports_sse2()) {
+      if (StubRoutines::dexp() != NULL) {
         __ call_runtime_leaf(StubRoutines::dexp(), getThreadTemp(), result_reg, cc->args());
       } else {
         __ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dexp), getThreadTemp(), result_reg, cc->args());
       }
       break;
     case vmIntrinsics::_dlog:
-      if (VM_Version::supports_sse2()) {
+      if (StubRoutines::dlog() != NULL) {
         __ call_runtime_leaf(StubRoutines::dlog(), getThreadTemp(), result_reg, cc->args());
       } else {
         __ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog), getThreadTemp(), result_reg, cc->args());
       }
       break;
+    case vmIntrinsics::_dlog10:
+      if (StubRoutines::dlog10() != NULL) {
+       __ call_runtime_leaf(StubRoutines::dlog10(), getThreadTemp(), result_reg, cc->args());
+      } else {
+        __ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog10), getThreadTemp(), result_reg, cc->args());
+      }
+      break;
     case vmIntrinsics::_dpow:
-      if (VM_Version::supports_sse2()) {
+      if (StubRoutines::dpow() != NULL) {
         __ call_runtime_leaf(StubRoutines::dpow(), getThreadTemp(), result_reg, cc->args());
       } else {
         __ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dpow), getThreadTemp(), result_reg, cc->args());
@@ -947,18 +914,44 @@
         __ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dcos), getThreadTemp(), result_reg, cc->args());
       }
       break;
+    case vmIntrinsics::_dtan:
+      if (StubRoutines::dtan() != NULL) {
+        __ call_runtime_leaf(StubRoutines::dtan(), getThreadTemp(), result_reg, cc->args());
+      } else {
+        __ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtan), getThreadTemp(), result_reg, cc->args());
+      }
+      break;
     default:  ShouldNotReachHere();
   }
 #else
   switch (x->id()) {
     case vmIntrinsics::_dexp:
-      __ call_runtime_leaf(StubRoutines::dexp(), getThreadTemp(), result_reg, cc->args());
+      if (StubRoutines::dexp() != NULL) {
+        __ call_runtime_leaf(StubRoutines::dexp(), getThreadTemp(), result_reg, cc->args());
+      } else {
+        __ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dexp), getThreadTemp(), result_reg, cc->args());
+      }
       break;
     case vmIntrinsics::_dlog:
+      if (StubRoutines::dlog() != NULL) {
       __ call_runtime_leaf(StubRoutines::dlog(), getThreadTemp(), result_reg, cc->args());
+      } else {
+        __ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog), getThreadTemp(), result_reg, cc->args());
+      }
+      break;
+    case vmIntrinsics::_dlog10:
+      if (StubRoutines::dlog10() != NULL) {
+      __ call_runtime_leaf(StubRoutines::dlog10(), getThreadTemp(), result_reg, cc->args());
+      } else {
+        __ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog10), getThreadTemp(), result_reg, cc->args());
+      }
       break;
     case vmIntrinsics::_dpow:
+       if (StubRoutines::dpow() != NULL) {
       __ call_runtime_leaf(StubRoutines::dpow(), getThreadTemp(), result_reg, cc->args());
+      } else {
+        __ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dpow), getThreadTemp(), result_reg, cc->args());
+      }
       break;
     case vmIntrinsics::_dsin:
       if (StubRoutines::dsin() != NULL) {
@@ -974,6 +967,13 @@
         __ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dcos), getThreadTemp(), result_reg, cc->args());
       }
       break;
+    case vmIntrinsics::_dtan:
+       if (StubRoutines::dtan() != NULL) {
+      __ call_runtime_leaf(StubRoutines::dtan(), getThreadTemp(), result_reg, cc->args());
+      } else {
+        __ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtan), getThreadTemp(), result_reg, cc->args());
+      }
+      break;
     default:  ShouldNotReachHere();
   }
 #endif // _LP64
@@ -1261,7 +1261,7 @@
 void LIRGenerator::do_NewMultiArray(NewMultiArray* x) {
   Values* dims = x->dims();
   int i = dims->length();
-  LIRItemList* items = new LIRItemList(dims->length(), NULL);
+  LIRItemList* items = new LIRItemList(i, i, NULL);
   while (i-- > 0) {
     LIRItem* size = new LIRItem(dims->at(i), this);
     items->at_put(i, size);
--- a/hotspot/src/cpu/x86/vm/c1_LinearScan_x86.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/c1_LinearScan_x86.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -786,58 +786,6 @@
       break;
     }
 
-    case lir_log10: {
-      // log and log10 need one temporary fpu stack slot, so
-      // there is one temporary registers stored in temp of the
-      // operation. the stack allocator must guarantee that the stack
-      // slots are really free, otherwise there might be a stack
-      // overflow.
-      assert(right->is_illegal(), "must be");
-      assert(left->is_fpu_register(), "must be");
-      assert(res->is_fpu_register(), "must be");
-      assert(op2->tmp1_opr()->is_fpu_register(), "must be");
-
-      insert_free_if_dead(op2->tmp1_opr());
-      insert_free_if_dead(res, left);
-      insert_exchange(left);
-      do_rename(left, res);
-
-      new_left = to_fpu_stack_top(res);
-      new_res = new_left;
-
-      op2->set_fpu_stack_size(sim()->stack_size());
-      assert(sim()->stack_size() <= 7, "at least one stack slot must be free");
-      break;
-    }
-
-
-    case lir_tan: {
-      // sin, cos and exp need two temporary fpu stack slots, so there are two temporary
-      // registers (stored in right and temp of the operation).
-      // the stack allocator must guarantee that the stack slots are really free,
-      // otherwise there might be a stack overflow.
-      assert(left->is_fpu_register(), "must be");
-      assert(res->is_fpu_register(), "must be");
-      // assert(left->is_last_use(), "old value gets destroyed");
-      assert(right->is_fpu_register(), "right is used as the first temporary register");
-      assert(op2->tmp1_opr()->is_fpu_register(), "temp is used as the second temporary register");
-      assert(fpu_num(left) != fpu_num(right) && fpu_num(right) != fpu_num(op2->tmp1_opr()) && fpu_num(op2->tmp1_opr()) != fpu_num(res), "need distinct temp registers");
-
-      insert_free_if_dead(right);
-      insert_free_if_dead(op2->tmp1_opr());
-
-      insert_free_if_dead(res, left);
-      insert_exchange(left);
-      do_rename(left, res);
-
-      new_left = to_fpu_stack_top(res);
-      new_res = new_left;
-
-      op2->set_fpu_stack_size(sim()->stack_size());
-      assert(sim()->stack_size() <= 6, "at least two stack slots must be free");
-      break;
-    }
-
     default: {
       assert(false, "missed a fpu-operation");
     }
--- a/hotspot/src/cpu/x86/vm/compiledIC_x86.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/compiledIC_x86.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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,22 +31,6 @@
 #include "runtime/mutexLocker.hpp"
 #include "runtime/safepoint.hpp"
 
-// Release the CompiledICHolder* associated with this call site is there is one.
-void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
-  // This call site might have become stale so inspect it carefully.
-  NativeCall* call = nativeCall_at(call_site->addr());
-  if (is_icholder_entry(call->destination())) {
-    NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
-    InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
-  }
-}
-
-bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
-  // This call site might have become stale so inspect it carefully.
-  NativeCall* call = nativeCall_at(call_site->addr());
-  return is_icholder_entry(call->destination());
-}
-
 // ----------------------------------------------------------------------------
 
 #define __ _masm.
--- a/hotspot/src/cpu/x86/vm/frame_x86.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/frame_x86.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -640,6 +640,7 @@
     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_mirror);
     DESCRIBE_FP_OFFSET(interpreter_frame_mdp);
     DESCRIBE_FP_OFFSET(interpreter_frame_cache);
     DESCRIBE_FP_OFFSET(interpreter_frame_locals);
--- a/hotspot/src/cpu/x86/vm/frame_x86.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/frame_x86.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -70,7 +70,8 @@
     // 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_mdp_offset                     = interpreter_frame_method_offset - 1,
+    interpreter_frame_mirror_offset                  = interpreter_frame_method_offset - 1,
+    interpreter_frame_mdp_offset                     = interpreter_frame_mirror_offset - 1,
     interpreter_frame_cache_offset                   = interpreter_frame_mdp_offset - 1,
     interpreter_frame_locals_offset                  = interpreter_frame_cache_offset - 1,
     interpreter_frame_bcp_offset                     = interpreter_frame_locals_offset - 1,
--- a/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -184,6 +184,12 @@
   return (Method**)addr_at(interpreter_frame_method_offset);
 }
 
+// Mirror
+
+inline oop* frame::interpreter_frame_mirror_addr() const {
+  return (oop*)addr_at(interpreter_frame_mirror_offset);
+}
+
 // top of expression stack
 inline intptr_t* frame::interpreter_frame_tos_address() const {
   intptr_t* last_sp = interpreter_frame_last_sp();
--- a/hotspot/src/cpu/x86/vm/globals_x86.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/globals_x86.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -194,9 +194,6 @@
   product(bool, UseBMI2Instructions, false,                                 \
           "Use BMI2 instructions")                                          \
                                                                             \
-  diagnostic(bool, UseLibmSinIntrinsic, true,                               \
-          "Use Libm Sin Intrinsic")                                         \
-                                                                            \
-  diagnostic(bool, UseLibmCosIntrinsic, true,                               \
-          "Use Libm Cos Intrinsic")
+  diagnostic(bool, UseLibmIntrinsic, true,                                  \
+          "Use Libm Intrinsics")
 #endif // CPU_X86_VM_GLOBALS_X86_HPP
--- a/hotspot/src/cpu/x86/vm/macroAssembler_libm_x86_32.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4571 +0,0 @@
-/*
- * Copyright (c) 2015, Intel Corporation.
- * Intel Math Library (LIBM) Source Code
- *
- * 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.
- *
- */
-
-#include "precompiled.hpp"
-#include "asm/assembler.hpp"
-#include "asm/assembler.inline.hpp"
-#include "runtime/stubRoutines.hpp"
-#include "macroAssembler_x86.hpp"
-
-#ifdef _MSC_VER
-#define ALIGNED_(x) __declspec(align(x))
-#else
-#define ALIGNED_(x) __attribute__ ((aligned(x)))
-#endif
-
-// The 32 bit code is at most SSE2 compliant
-
-/******************************************************************************/
-//                     ALGORITHM DESCRIPTION - EXP()
-//                     ---------------------
-//
-// Description:
-//  Let K = 64 (table size).
-//        x    x/log(2)     n
-//       e  = 2          = 2 * T[j] * (1 + P(y))
-//  where
-//       x = m*log(2)/K + y,    y in [-log(2)/K..log(2)/K]
-//       m = n*K + j,           m,n,j - signed integer, j in [-K/2..K/2]
-//                  j/K
-//       values of 2   are tabulated as T[j] = T_hi[j] ( 1 + T_lo[j]).
-//
-//       P(y) is a minimax polynomial approximation of exp(x)-1
-//       on small interval [-log(2)/K..log(2)/K] (were calculated by Maple V).
-//
-//  To avoid problems with arithmetic overflow and underflow,
-//            n                        n1  n2
-//  value of 2  is safely computed as 2 * 2 where n1 in [-BIAS/2..BIAS/2]
-//  where BIAS is a value of exponent bias.
-//
-// Special cases:
-//  exp(NaN) = NaN
-//  exp(+INF) = +INF
-//  exp(-INF) = 0
-//  exp(x) = 1 for subnormals
-//  for finite argument, only exp(0)=1 is exact
-//  For IEEE double
-//    if x >  709.782712893383973096 then exp(x) overflow
-//    if x < -745.133219101941108420 then exp(x) underflow
-//
-/******************************************************************************/
-
-ALIGNED_(16) juint _static_const_table[] =
-{
-    0x00000000UL, 0xfff00000UL, 0x00000000UL, 0xfff00000UL, 0xffffffc0UL,
-    0x00000000UL, 0xffffffc0UL, 0x00000000UL, 0x0000ffc0UL, 0x00000000UL,
-    0x0000ffc0UL, 0x00000000UL, 0x00000000UL, 0x43380000UL, 0x00000000UL,
-    0x43380000UL, 0x652b82feUL, 0x40571547UL, 0x652b82feUL, 0x40571547UL,
-    0xfefa0000UL, 0x3f862e42UL, 0xfefa0000UL, 0x3f862e42UL, 0xbc9e3b3aUL,
-    0x3d1cf79aUL, 0xbc9e3b3aUL, 0x3d1cf79aUL, 0xfffffffeUL, 0x3fdfffffUL,
-    0xfffffffeUL, 0x3fdfffffUL, 0xe3289860UL, 0x3f56c15cUL, 0x555b9e25UL,
-    0x3fa55555UL, 0xc090cf0fUL, 0x3f811115UL, 0x55548ba1UL, 0x3fc55555UL,
-    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x0e03754dUL,
-    0x3cad7bbfUL, 0x3e778060UL, 0x00002c9aUL, 0x3567f613UL, 0x3c8cd252UL,
-    0xd3158574UL, 0x000059b0UL, 0x61e6c861UL, 0x3c60f74eUL, 0x18759bc8UL,
-    0x00008745UL, 0x5d837b6cUL, 0x3c979aa6UL, 0x6cf9890fUL, 0x0000b558UL,
-    0x702f9cd1UL, 0x3c3ebe3dUL, 0x32d3d1a2UL, 0x0000e3ecUL, 0x1e63bcd8UL,
-    0x3ca3516eUL, 0xd0125b50UL, 0x00011301UL, 0x26f0387bUL, 0x3ca4c554UL,
-    0xaea92ddfUL, 0x0001429aUL, 0x62523fb6UL, 0x3ca95153UL, 0x3c7d517aUL,
-    0x000172b8UL, 0x3f1353bfUL, 0x3c8b898cUL, 0xeb6fcb75UL, 0x0001a35bUL,
-    0x3e3a2f5fUL, 0x3c9aecf7UL, 0x3168b9aaUL, 0x0001d487UL, 0x44a6c38dUL,
-    0x3c8a6f41UL, 0x88628cd6UL, 0x0002063bUL, 0xe3a8a894UL, 0x3c968efdUL,
-    0x6e756238UL, 0x0002387aUL, 0x981fe7f2UL, 0x3c80472bUL, 0x65e27cddUL,
-    0x00026b45UL, 0x6d09ab31UL, 0x3c82f7e1UL, 0xf51fdee1UL, 0x00029e9dUL,
-    0x720c0ab3UL, 0x3c8b3782UL, 0xa6e4030bUL, 0x0002d285UL, 0x4db0abb6UL,
-    0x3c834d75UL, 0x0a31b715UL, 0x000306feUL, 0x5dd3f84aUL, 0x3c8fdd39UL,
-    0xb26416ffUL, 0x00033c08UL, 0xcc187d29UL, 0x3ca12f8cUL, 0x373aa9caUL,
-    0x000371a7UL, 0x738b5e8bUL, 0x3ca7d229UL, 0x34e59ff6UL, 0x0003a7dbUL,
-    0xa72a4c6dUL, 0x3c859f48UL, 0x4c123422UL, 0x0003dea6UL, 0x259d9205UL,
-    0x3ca8b846UL, 0x21f72e29UL, 0x0004160aUL, 0x60c2ac12UL, 0x3c4363edUL,
-    0x6061892dUL, 0x00044e08UL, 0xdaa10379UL, 0x3c6ecce1UL, 0xb5c13cd0UL,
-    0x000486a2UL, 0xbb7aafb0UL, 0x3c7690ceUL, 0xd5362a27UL, 0x0004bfdaUL,
-    0x9b282a09UL, 0x3ca083ccUL, 0x769d2ca6UL, 0x0004f9b2UL, 0xc1aae707UL,
-    0x3ca509b0UL, 0x569d4f81UL, 0x0005342bUL, 0x18fdd78eUL, 0x3c933505UL,
-    0x36b527daUL, 0x00056f47UL, 0xe21c5409UL, 0x3c9063e1UL, 0xdd485429UL,
-    0x0005ab07UL, 0x2b64c035UL, 0x3c9432e6UL, 0x15ad2148UL, 0x0005e76fUL,
-    0x99f08c0aUL, 0x3ca01284UL, 0xb03a5584UL, 0x0006247eUL, 0x0073dc06UL,
-    0x3c99f087UL, 0x82552224UL, 0x00066238UL, 0x0da05571UL, 0x3c998d4dUL,
-    0x667f3bccUL, 0x0006a09eUL, 0x86ce4786UL, 0x3ca52bb9UL, 0x3c651a2eUL,
-    0x0006dfb2UL, 0x206f0dabUL, 0x3ca32092UL, 0xe8ec5f73UL, 0x00071f75UL,
-    0x8e17a7a6UL, 0x3ca06122UL, 0x564267c8UL, 0x00075febUL, 0x461e9f86UL,
-    0x3ca244acUL, 0x73eb0186UL, 0x0007a114UL, 0xabd66c55UL, 0x3c65ebe1UL,
-    0x36cf4e62UL, 0x0007e2f3UL, 0xbbff67d0UL, 0x3c96fe9fUL, 0x994cce12UL,
-    0x00082589UL, 0x14c801dfUL, 0x3c951f14UL, 0x9b4492ecUL, 0x000868d9UL,
-    0xc1f0eab4UL, 0x3c8db72fUL, 0x422aa0dbUL, 0x0008ace5UL, 0x59f35f44UL,
-    0x3c7bf683UL, 0x99157736UL, 0x0008f1aeUL, 0x9c06283cUL, 0x3ca360baUL,
-    0xb0cdc5e4UL, 0x00093737UL, 0x20f962aaUL, 0x3c95e8d1UL, 0x9fde4e4fUL,
-    0x00097d82UL, 0x2b91ce27UL, 0x3c71affcUL, 0x82a3f090UL, 0x0009c491UL,
-    0x589a2ebdUL, 0x3c9b6d34UL, 0x7b5de564UL, 0x000a0c66UL, 0x9ab89880UL,
-    0x3c95277cUL, 0xb23e255cUL, 0x000a5503UL, 0x6e735ab3UL, 0x3c846984UL,
-    0x5579fdbfUL, 0x000a9e6bUL, 0x92cb3387UL, 0x3c8c1a77UL, 0x995ad3adUL,
-    0x000ae89fUL, 0xdc2d1d96UL, 0x3ca22466UL, 0xb84f15faUL, 0x000b33a2UL,
-    0xb19505aeUL, 0x3ca1112eUL, 0xf2fb5e46UL, 0x000b7f76UL, 0x0a5fddcdUL,
-    0x3c74ffd7UL, 0x904bc1d2UL, 0x000bcc1eUL, 0x30af0cb3UL, 0x3c736eaeUL,
-    0xdd85529cUL, 0x000c199bUL, 0xd10959acUL, 0x3c84e08fUL, 0x2e57d14bUL,
-    0x000c67f1UL, 0x6c921968UL, 0x3c676b2cUL, 0xdcef9069UL, 0x000cb720UL,
-    0x36df99b3UL, 0x3c937009UL, 0x4a07897bUL, 0x000d072dUL, 0xa63d07a7UL,
-    0x3c74a385UL, 0xdcfba487UL, 0x000d5818UL, 0xd5c192acUL, 0x3c8e5a50UL,
-    0x03db3285UL, 0x000da9e6UL, 0x1c4a9792UL, 0x3c98bb73UL, 0x337b9b5eUL,
-    0x000dfc97UL, 0x603a88d3UL, 0x3c74b604UL, 0xe78b3ff6UL, 0x000e502eUL,
-    0x92094926UL, 0x3c916f27UL, 0xa2a490d9UL, 0x000ea4afUL, 0x41aa2008UL,
-    0x3c8ec3bcUL, 0xee615a27UL, 0x000efa1bUL, 0x31d185eeUL, 0x3c8a64a9UL,
-    0x5b6e4540UL, 0x000f5076UL, 0x4d91cd9dUL, 0x3c77893bUL, 0x819e90d8UL,
-    0x000fa7c1UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x7ff00000UL,
-    0x00000000UL, 0x00000000UL, 0xffffffffUL, 0x7fefffffUL, 0x00000000UL,
-    0x00100000UL
-};
-
-//registers,
-// input: (rbp + 8)
-// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
-//          rax, rdx, rcx, rbx (tmp)
-
-// Code generated by Intel C compiler for LIBM library
-
-void MacroAssembler::fast_exp(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
-  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
-  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
-  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
-  Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
-
-  assert_different_registers(tmp, eax, ecx, edx);
-  jmp(start);
-  address static_const_table = (address)_static_const_table;
-
-  bind(start);
-  subl(rsp, 120);
-  movl(Address(rsp, 64), tmp);
-  lea(tmp, ExternalAddress(static_const_table));
-  movdqu(xmm0, Address(rsp, 128));
-  unpcklpd(xmm0, xmm0);
-  movdqu(xmm1, Address(tmp, 64));          // 0x652b82feUL, 0x40571547UL, 0x652b82feUL, 0x40571547UL
-  movdqu(xmm6, Address(tmp, 48));          // 0x00000000UL, 0x43380000UL, 0x00000000UL, 0x43380000UL
-  movdqu(xmm2, Address(tmp, 80));          // 0xfefa0000UL, 0x3f862e42UL, 0xfefa0000UL, 0x3f862e42UL
-  movdqu(xmm3, Address(tmp, 96));          // 0xbc9e3b3aUL, 0x3d1cf79aUL, 0xbc9e3b3aUL, 0x3d1cf79aUL
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32767);
-  movl(edx, 16527);
-  subl(edx, eax);
-  subl(eax, 15504);
-  orl(edx, eax);
-  cmpl(edx, INT_MIN);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
-  mulpd(xmm1, xmm0);
-  addpd(xmm1, xmm6);
-  movapd(xmm7, xmm1);
-  subpd(xmm1, xmm6);
-  mulpd(xmm2, xmm1);
-  movdqu(xmm4, Address(tmp, 128));         // 0xe3289860UL, 0x3f56c15cUL, 0x555b9e25UL, 0x3fa55555UL
-  mulpd(xmm3, xmm1);
-  movdqu(xmm5, Address(tmp, 144));         // 0xc090cf0fUL, 0x3f811115UL, 0x55548ba1UL, 0x3fc55555UL
-  subpd(xmm0, xmm2);
-  movdl(eax, xmm7);
-  movl(ecx, eax);
-  andl(ecx, 63);
-  shll(ecx, 4);
-  sarl(eax, 6);
-  movl(edx, eax);
-  movdqu(xmm6, Address(tmp, 16));          // 0xffffffc0UL, 0x00000000UL, 0xffffffc0UL, 0x00000000UL
-  pand(xmm7, xmm6);
-  movdqu(xmm6, Address(tmp, 32));          // 0x0000ffc0UL, 0x00000000UL, 0x0000ffc0UL, 0x00000000UL
-  paddq(xmm7, xmm6);
-  psllq(xmm7, 46);
-  subpd(xmm0, xmm3);
-  movdqu(xmm2, Address(tmp, ecx, Address::times_1, 160));
-  mulpd(xmm4, xmm0);
-  movapd(xmm6, xmm0);
-  movapd(xmm1, xmm0);
-  mulpd(xmm6, xmm6);
-  mulpd(xmm0, xmm6);
-  addpd(xmm5, xmm4);
-  mulsd(xmm0, xmm6);
-  mulpd(xmm6, Address(tmp, 112));          // 0xfffffffeUL, 0x3fdfffffUL, 0xfffffffeUL, 0x3fdfffffUL
-  addsd(xmm1, xmm2);
-  unpckhpd(xmm2, xmm2);
-  mulpd(xmm0, xmm5);
-  addsd(xmm1, xmm0);
-  por(xmm2, xmm7);
-  unpckhpd(xmm0, xmm0);
-  addsd(xmm0, xmm1);
-  addsd(xmm0, xmm6);
-  addl(edx, 894);
-  cmpl(edx, 1916);
-  jcc (Assembler::above, L_2TAG_PACKET_1_0_2);
-  mulsd(xmm0, xmm2);
-  addsd(xmm0, xmm2);
-  jmp(L_2TAG_PACKET_2_0_2);
-
-  bind(L_2TAG_PACKET_1_0_2);
-  fnstcw(Address(rsp, 24));
-  movzwl(edx, Address(rsp, 24));
-  orl(edx, 768);
-  movw(Address(rsp, 28), edx);
-  fldcw(Address(rsp, 28));
-  movl(edx, eax);
-  sarl(eax, 1);
-  subl(edx, eax);
-  movdqu(xmm6, Address(tmp, 0));           // 0x00000000UL, 0xfff00000UL, 0x00000000UL, 0xfff00000UL
-  pandn(xmm6, xmm2);
-  addl(eax, 1023);
-  movdl(xmm3, eax);
-  psllq(xmm3, 52);
-  por(xmm6, xmm3);
-  addl(edx, 1023);
-  movdl(xmm4, edx);
-  psllq(xmm4, 52);
-  movsd(Address(rsp, 8), xmm0);
-  fld_d(Address(rsp, 8));
-  movsd(Address(rsp, 16), xmm6);
-  fld_d(Address(rsp, 16));
-  fmula(1);
-  faddp(1);
-  movsd(Address(rsp, 8), xmm4);
-  fld_d(Address(rsp, 8));
-  fmulp(1);
-  fstp_d(Address(rsp, 8));
-  movsd(xmm0,Address(rsp, 8));
-  fldcw(Address(rsp, 24));
-  pextrw(ecx, xmm0, 3);
-  andl(ecx, 32752);
-  cmpl(ecx, 32752);
-  jcc(Assembler::greaterEqual, L_2TAG_PACKET_3_0_2);
-  cmpl(ecx, 0);
-  jcc(Assembler::equal, L_2TAG_PACKET_4_0_2);
-  jmp(L_2TAG_PACKET_2_0_2);
-  cmpl(ecx, INT_MIN);
-  jcc(Assembler::less, L_2TAG_PACKET_3_0_2);
-  cmpl(ecx, -1064950997);
-  jcc(Assembler::less, L_2TAG_PACKET_2_0_2);
-  jcc(Assembler::greater, L_2TAG_PACKET_4_0_2);
-  movl(edx, Address(rsp, 128));
-  cmpl(edx ,-17155601);
-  jcc(Assembler::less, L_2TAG_PACKET_2_0_2);
-  jmp(L_2TAG_PACKET_4_0_2);
-
-  bind(L_2TAG_PACKET_3_0_2);
-  movl(edx, 14);
-  jmp(L_2TAG_PACKET_5_0_2);
-
-  bind(L_2TAG_PACKET_4_0_2);
-  movl(edx, 15);
-
-  bind(L_2TAG_PACKET_5_0_2);
-  movsd(Address(rsp, 0), xmm0);
-  movsd(xmm0, Address(rsp, 128));
-  fld_d(Address(rsp, 0));
-  jmp(L_2TAG_PACKET_6_0_2);
-
-  bind(L_2TAG_PACKET_7_0_2);
-  cmpl(eax, 2146435072);
-  jcc(Assembler::greaterEqual, L_2TAG_PACKET_8_0_2);
-  movl(eax, Address(rsp, 132));
-  cmpl(eax, INT_MIN);
-  jcc(Assembler::greaterEqual, L_2TAG_PACKET_9_0_2);
-  movsd(xmm0, Address(tmp, 1208));         // 0xffffffffUL, 0x7fefffffUL
-  mulsd(xmm0, xmm0);
-  movl(edx, 14);
-  jmp(L_2TAG_PACKET_5_0_2);
-
-  bind(L_2TAG_PACKET_9_0_2);
-  movsd(xmm0, Address(tmp, 1216));
-  mulsd(xmm0, xmm0);
-  movl(edx, 15);
-  jmp(L_2TAG_PACKET_5_0_2);
-
-  bind(L_2TAG_PACKET_8_0_2);
-  movl(edx, Address(rsp, 128));
-  cmpl(eax, 2146435072);
-  jcc(Assembler::above, L_2TAG_PACKET_10_0_2);
-  cmpl(edx, 0);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_10_0_2);
-  movl(eax, Address(rsp, 132));
-  cmpl(eax, 2146435072);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_11_0_2);
-  movsd(xmm0, Address(tmp, 1192));         // 0x00000000UL, 0x7ff00000UL
-  jmp(L_2TAG_PACKET_2_0_2);
-
-  bind(L_2TAG_PACKET_11_0_2);
-  movsd(xmm0, Address(tmp, 1200));         // 0x00000000UL, 0x00000000UL
-  jmp(L_2TAG_PACKET_2_0_2);
-
-  bind(L_2TAG_PACKET_10_0_2);
-  movsd(xmm0, Address(rsp, 128));
-  addsd(xmm0, xmm0);
-  jmp(L_2TAG_PACKET_2_0_2);
-
-  bind(L_2TAG_PACKET_0_0_2);
-  movl(eax, Address(rsp, 132));
-  andl(eax, 2147483647);
-  cmpl(eax, 1083179008);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_7_0_2);
-  movsd(xmm0, Address(rsp, 128));
-  addsd(xmm0, Address(tmp, 1184));         // 0x00000000UL, 0x3ff00000UL
-  jmp(L_2TAG_PACKET_2_0_2);
-
-  bind(L_2TAG_PACKET_2_0_2);
-  movsd(Address(rsp, 48), xmm0);
-  fld_d(Address(rsp, 48));
-
-  bind(L_2TAG_PACKET_6_0_2);
-  movl(tmp, Address(rsp, 64));
-}
-
-/******************************************************************************/
-//                     ALGORITHM DESCRIPTION - LOG()
-//                     ---------------------
-//
-//    x=2^k * mx, mx in [1,2)
-//
-//    Get B~1/mx based on the output of rcpss instruction (B0)
-//    B = int((B0*2^7+0.5))/2^7
-//
-//    Reduced argument: r=B*mx-1.0 (computed accurately in high and low parts)
-//
-//    Result:  k*log(2) - log(B) + p(r) if |x-1| >= small value (2^-6)  and
-//             p(r) is a degree 7 polynomial
-//             -log(B) read from data table (high, low parts)
-//             Result is formed from high and low parts
-//
-// Special cases:
-//  log(NaN) = quiet NaN, and raise invalid exception
-//  log(+INF) = that INF
-//  log(0) = -INF with divide-by-zero exception raised
-//  log(1) = +0
-//  log(x) = NaN with invalid exception raised if x < -0, including -INF
-//
-/******************************************************************************/
-
-ALIGNED_(16) juint _static_const_table_log[] =
-{
-  0xfefa3800UL, 0x3fe62e42UL, 0x93c76730UL, 0x3d2ef357UL, 0xaa241800UL,
-  0x3fe5ee82UL, 0x0cda46beUL, 0x3d220238UL, 0x5c364800UL, 0x3fe5af40UL,
-  0xac10c9fbUL, 0x3d2dfa63UL, 0x26bb8c00UL, 0x3fe5707aUL, 0xff3303ddUL,
-  0x3d09980bUL, 0x26867800UL, 0x3fe5322eUL, 0x5d257531UL, 0x3d05ccc4UL,
-  0x835a5000UL, 0x3fe4f45aUL, 0x6d93b8fbUL, 0xbd2e6c51UL, 0x6f970c00UL,
-  0x3fe4b6fdUL, 0xed4c541cUL, 0x3cef7115UL, 0x27e8a400UL, 0x3fe47a15UL,
-  0xf94d60aaUL, 0xbd22cb6aUL, 0xf2f92400UL, 0x3fe43d9fUL, 0x481051f7UL,
-  0xbcfd984fUL, 0x2125cc00UL, 0x3fe4019cUL, 0x30f0c74cUL, 0xbd26ce79UL,
-  0x0c36c000UL, 0x3fe3c608UL, 0x7cfe13c2UL, 0xbd02b736UL, 0x17197800UL,
-  0x3fe38ae2UL, 0xbb5569a4UL, 0xbd218b7aUL, 0xad9d8c00UL, 0x3fe35028UL,
-  0x9527e6acUL, 0x3d10b83fUL, 0x44340800UL, 0x3fe315daUL, 0xc5a0ed9cUL,
-  0xbd274e93UL, 0x57b0e000UL, 0x3fe2dbf5UL, 0x07b9dc11UL, 0xbd17a6e5UL,
-  0x6d0ec000UL, 0x3fe2a278UL, 0xe797882dUL, 0x3d206d2bUL, 0x1134dc00UL,
-  0x3fe26962UL, 0x05226250UL, 0xbd0b61f1UL, 0xd8bebc00UL, 0x3fe230b0UL,
-  0x6e48667bUL, 0x3d12fc06UL, 0x5fc61800UL, 0x3fe1f863UL, 0xc9fe81d3UL,
-  0xbd2a7242UL, 0x49ae6000UL, 0x3fe1c078UL, 0xed70e667UL, 0x3cccacdeUL,
-  0x40f23c00UL, 0x3fe188eeUL, 0xf8ab4650UL, 0x3d14cc4eUL, 0xf6f29800UL,
-  0x3fe151c3UL, 0xa293ae49UL, 0xbd2edd97UL, 0x23c75c00UL, 0x3fe11af8UL,
-  0xbb9ddcb2UL, 0xbd258647UL, 0x8611cc00UL, 0x3fe0e489UL, 0x07801742UL,
-  0x3d1c2998UL, 0xe2d05400UL, 0x3fe0ae76UL, 0x887e7e27UL, 0x3d1f486bUL,
-  0x0533c400UL, 0x3fe078bfUL, 0x41edf5fdUL, 0x3d268122UL, 0xbe760400UL,
-  0x3fe04360UL, 0xe79539e0UL, 0xbd04c45fUL, 0xe5b20800UL, 0x3fe00e5aUL,
-  0xb1727b1cUL, 0xbd053ba3UL, 0xaf7a4800UL, 0x3fdfb358UL, 0x3c164935UL,
-  0x3d0085faUL, 0xee031800UL, 0x3fdf4aa7UL, 0x6f014a8bUL, 0x3d12cde5UL,
-  0x56b41000UL, 0x3fdee2a1UL, 0x5a470251UL, 0x3d2f27f4UL, 0xc3ddb000UL,
-  0x3fde7b42UL, 0x5372bd08UL, 0xbd246550UL, 0x1a272800UL, 0x3fde148aUL,
-  0x07322938UL, 0xbd1326b2UL, 0x484c9800UL, 0x3fddae75UL, 0x60dc616aUL,
-  0xbd1ea42dUL, 0x46def800UL, 0x3fdd4902UL, 0xe9a767a8UL, 0x3d235bafUL,
-  0x18064800UL, 0x3fdce42fUL, 0x3ec7a6b0UL, 0xbd0797c3UL, 0xc7455800UL,
-  0x3fdc7ff9UL, 0xc15249aeUL, 0xbd29b6ddUL, 0x693fa000UL, 0x3fdc1c60UL,
-  0x7fe8e180UL, 0x3d2cec80UL, 0x1b80e000UL, 0x3fdbb961UL, 0xf40a666dUL,
-  0x3d27d85bUL, 0x04462800UL, 0x3fdb56faUL, 0x2d841995UL, 0x3d109525UL,
-  0x5248d000UL, 0x3fdaf529UL, 0x52774458UL, 0xbd217cc5UL, 0x3c8ad800UL,
-  0x3fda93edUL, 0xbea77a5dUL, 0x3d1e36f2UL, 0x0224f800UL, 0x3fda3344UL,
-  0x7f9d79f5UL, 0x3d23c645UL, 0xea15f000UL, 0x3fd9d32bUL, 0x10d0c0b0UL,
-  0xbd26279eUL, 0x43135800UL, 0x3fd973a3UL, 0xa502d9f0UL, 0xbd152313UL,
-  0x635bf800UL, 0x3fd914a8UL, 0x2ee6307dUL, 0xbd1766b5UL, 0xa88b3000UL,
-  0x3fd8b639UL, 0xe5e70470UL, 0xbd205ae1UL, 0x776dc800UL, 0x3fd85855UL,
-  0x3333778aUL, 0x3d2fd56fUL, 0x3bd81800UL, 0x3fd7fafaUL, 0xc812566aUL,
-  0xbd272090UL, 0x687cf800UL, 0x3fd79e26UL, 0x2efd1778UL, 0x3d29ec7dUL,
-  0x76c67800UL, 0x3fd741d8UL, 0x49dc60b3UL, 0x3d2d8b09UL, 0xe6af1800UL,
-  0x3fd6e60eUL, 0x7c222d87UL, 0x3d172165UL, 0x3e9c6800UL, 0x3fd68ac8UL,
-  0x2756eba0UL, 0x3d20a0d3UL, 0x0b3ab000UL, 0x3fd63003UL, 0xe731ae00UL,
-  0xbd2db623UL, 0xdf596000UL, 0x3fd5d5bdUL, 0x08a465dcUL, 0xbd0a0b2aUL,
-  0x53c8d000UL, 0x3fd57bf7UL, 0xee5d40efUL, 0x3d1fadedUL, 0x0738a000UL,
-  0x3fd522aeUL, 0x8164c759UL, 0x3d2ebe70UL, 0x9e173000UL, 0x3fd4c9e0UL,
-  0x1b0ad8a4UL, 0xbd2e2089UL, 0xc271c800UL, 0x3fd4718dUL, 0x0967d675UL,
-  0xbd2f27ceUL, 0x23d5e800UL, 0x3fd419b4UL, 0xec90e09dUL, 0x3d08e436UL,
-  0x77333000UL, 0x3fd3c252UL, 0xb606bd5cUL, 0x3d183b54UL, 0x76be1000UL,
-  0x3fd36b67UL, 0xb0f177c8UL, 0x3d116ecdUL, 0xe1d36000UL, 0x3fd314f1UL,
-  0xd3213cb8UL, 0xbd28e27aUL, 0x7cdc9000UL, 0x3fd2bef0UL, 0x4a5004f4UL,
-  0x3d2a9cfaUL, 0x1134d800UL, 0x3fd26962UL, 0xdf5bb3b6UL, 0x3d2c93c1UL,
-  0x6d0eb800UL, 0x3fd21445UL, 0xba46baeaUL, 0x3d0a87deUL, 0x635a6800UL,
-  0x3fd1bf99UL, 0x5147bdb7UL, 0x3d2ca6edUL, 0xcbacf800UL, 0x3fd16b5cUL,
-  0xf7a51681UL, 0x3d2b9acdUL, 0x8227e800UL, 0x3fd1178eUL, 0x63a5f01cUL,
-  0xbd2c210eUL, 0x67616000UL, 0x3fd0c42dUL, 0x163ceae9UL, 0x3d27188bUL,
-  0x604d5800UL, 0x3fd07138UL, 0x16ed4e91UL, 0x3cf89cdbUL, 0x5626c800UL,
-  0x3fd01eaeUL, 0x1485e94aUL, 0xbd16f08cUL, 0x6cb3b000UL, 0x3fcf991cUL,
-  0xca0cdf30UL, 0x3d1bcbecUL, 0xe4dd0000UL, 0x3fcef5adUL, 0x65bb8e11UL,
-  0xbcca2115UL, 0xffe71000UL, 0x3fce530eUL, 0x6041f430UL, 0x3cc21227UL,
-  0xb0d49000UL, 0x3fcdb13dUL, 0xf715b035UL, 0xbd2aff2aUL, 0xf2656000UL,
-  0x3fcd1037UL, 0x75b6f6e4UL, 0xbd084a7eUL, 0xc6f01000UL, 0x3fcc6ffbUL,
-  0xc5962bd2UL, 0xbcf1ec72UL, 0x383be000UL, 0x3fcbd087UL, 0x595412b6UL,
-  0xbd2d4bc4UL, 0x575bd000UL, 0x3fcb31d8UL, 0x4eace1aaUL, 0xbd0c358dUL,
-  0x3c8ae000UL, 0x3fca93edUL, 0x50562169UL, 0xbd287243UL, 0x07089000UL,
-  0x3fc9f6c4UL, 0x6865817aUL, 0x3d29904dUL, 0xdcf70000UL, 0x3fc95a5aUL,
-  0x58a0ff6fUL, 0x3d07f228UL, 0xeb390000UL, 0x3fc8beafUL, 0xaae92cd1UL,
-  0xbd073d54UL, 0x6551a000UL, 0x3fc823c1UL, 0x9a631e83UL, 0x3d1e0ddbUL,
-  0x85445000UL, 0x3fc7898dUL, 0x70914305UL, 0xbd1c6610UL, 0x8b757000UL,
-  0x3fc6f012UL, 0xe59c21e1UL, 0xbd25118dUL, 0xbe8c1000UL, 0x3fc6574eUL,
-  0x2c3c2e78UL, 0x3d19cf8bUL, 0x6b544000UL, 0x3fc5bf40UL, 0xeb68981cUL,
-  0xbd127023UL, 0xe4a1b000UL, 0x3fc527e5UL, 0xe5697dc7UL, 0x3d2633e8UL,
-  0x8333b000UL, 0x3fc4913dUL, 0x54fdb678UL, 0x3d258379UL, 0xa5993000UL,
-  0x3fc3fb45UL, 0x7e6a354dUL, 0xbd2cd1d8UL, 0xb0159000UL, 0x3fc365fcUL,
-  0x234b7289UL, 0x3cc62fa8UL, 0x0c868000UL, 0x3fc2d161UL, 0xcb81b4a1UL,
-  0x3d039d6cUL, 0x2a49c000UL, 0x3fc23d71UL, 0x8fd3df5cUL, 0x3d100d23UL,
-  0x7e23f000UL, 0x3fc1aa2bUL, 0x44389934UL, 0x3d2ca78eUL, 0x8227e000UL,
-  0x3fc1178eUL, 0xce2d07f2UL, 0x3d21ef78UL, 0xb59e4000UL, 0x3fc08598UL,
-  0x7009902cUL, 0xbd27e5ddUL, 0x39dbe000UL, 0x3fbfe891UL, 0x4fa10afdUL,
-  0xbd2534d6UL, 0x830a2000UL, 0x3fbec739UL, 0xafe645e0UL, 0xbd2dc068UL,
-  0x63844000UL, 0x3fbda727UL, 0x1fa71733UL, 0x3d1a8940UL, 0x01bc4000UL,
-  0x3fbc8858UL, 0xc65aacd3UL, 0x3d2646d1UL, 0x8dad6000UL, 0x3fbb6ac8UL,
-  0x2bf768e5UL, 0xbd139080UL, 0x40b1c000UL, 0x3fba4e76UL, 0xb94407c8UL,
-  0xbd0e42b6UL, 0x5d594000UL, 0x3fb9335eUL, 0x3abd47daUL, 0x3d23115cUL,
-  0x2f40e000UL, 0x3fb8197eUL, 0xf96ffdf7UL, 0x3d0f80dcUL, 0x0aeac000UL,
-  0x3fb700d3UL, 0xa99ded32UL, 0x3cec1e8dUL, 0x4d97a000UL, 0x3fb5e95aUL,
-  0x3c5d1d1eUL, 0xbd2c6906UL, 0x5d208000UL, 0x3fb4d311UL, 0x82f4e1efUL,
-  0xbcf53a25UL, 0xa7d1e000UL, 0x3fb3bdf5UL, 0xa5db4ed7UL, 0x3d2cc85eUL,
-  0xa4472000UL, 0x3fb2aa04UL, 0xae9c697dUL, 0xbd20b6e8UL, 0xd1466000UL,
-  0x3fb1973bUL, 0x560d9e9bUL, 0xbd25325dUL, 0xb59e4000UL, 0x3fb08598UL,
-  0x7009902cUL, 0xbd17e5ddUL, 0xc006c000UL, 0x3faeea31UL, 0x4fc93b7bUL,
-  0xbd0e113eUL, 0xcdddc000UL, 0x3faccb73UL, 0x47d82807UL, 0xbd1a68f2UL,
-  0xd0fb0000UL, 0x3faaaef2UL, 0x353bb42eUL, 0x3d20fc1aUL, 0x149fc000UL,
-  0x3fa894aaUL, 0xd05a267dUL, 0xbd197995UL, 0xf2d4c000UL, 0x3fa67c94UL,
-  0xec19afa2UL, 0xbd029efbUL, 0xd42e0000UL, 0x3fa466aeUL, 0x75bdfd28UL,
-  0xbd2c1673UL, 0x2f8d0000UL, 0x3fa252f3UL, 0xe021b67bUL, 0x3d283e9aUL,
-  0x89e74000UL, 0x3fa0415dUL, 0x5cf1d753UL, 0x3d0111c0UL, 0xec148000UL,
-  0x3f9c63d2UL, 0x3f9eb2f3UL, 0x3d2578c6UL, 0x28c90000UL, 0x3f984925UL,
-  0x325a0c34UL, 0xbd2aa0baUL, 0x25980000UL, 0x3f9432a9UL, 0x928637feUL,
-  0x3d098139UL, 0x58938000UL, 0x3f902056UL, 0x06e2f7d2UL, 0xbd23dc5bUL,
-  0xa3890000UL, 0x3f882448UL, 0xda74f640UL, 0xbd275577UL, 0x75890000UL,
-  0x3f801015UL, 0x999d2be8UL, 0xbd10c76bUL, 0x59580000UL, 0x3f700805UL,
-  0xcb31c67bUL, 0x3d2166afUL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-  0x80000000UL, 0xfefa3800UL, 0x3fa62e42UL, 0x93c76730UL, 0x3ceef357UL,
-  0x92492492UL, 0x3fc24924UL, 0x00000000UL, 0xbfd00000UL, 0x3d6fb175UL,
-  0xbfc5555eUL, 0x55555555UL, 0x3fd55555UL, 0x9999999aUL, 0x3fc99999UL,
-  0x00000000UL, 0xbfe00000UL, 0x00000000UL, 0xffffe000UL, 0x00000000UL,
-  0xffffe000UL
-};
-//registers,
-// input: xmm0
-// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
-//          rax, rdx, rcx, rbx (tmp)
-
-void MacroAssembler::fast_log(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
-  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
-  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
-  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2;
-  Label L_2TAG_PACKET_10_0_2, start;
-
-  assert_different_registers(tmp, eax, ecx, edx);
-  jmp(start);
-  address static_const_table = (address)_static_const_table_log;
-
-  bind(start);
-  subl(rsp, 104);
-  movl(Address(rsp, 40), tmp);
-  lea(tmp, ExternalAddress(static_const_table));
-  xorpd(xmm2, xmm2);
-  movl(eax, 16368);
-  pinsrw(xmm2, eax, 3);
-  xorpd(xmm3, xmm3);
-  movl(edx, 30704);
-  pinsrw(xmm3, edx, 3);
-  movsd(xmm0, Address(rsp, 112));
-  movapd(xmm1, xmm0);
-  movl(ecx, 32768);
-  movdl(xmm4, ecx);
-  movsd(xmm5, Address(tmp, 2128));         // 0x00000000UL, 0xffffe000UL
-  pextrw(eax, xmm0, 3);
-  por(xmm0, xmm2);
-  psllq(xmm0, 5);
-  movl(ecx, 16352);
-  psrlq(xmm0, 34);
-  rcpss(xmm0, xmm0);
-  psllq(xmm1, 12);
-  pshufd(xmm6, xmm5, 228);
-  psrlq(xmm1, 12);
-  subl(eax, 16);
-  cmpl(eax, 32736);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
-
-  bind(L_2TAG_PACKET_1_0_2);
-  paddd(xmm0, xmm4);
-  por(xmm1, xmm3);
-  movdl(edx, xmm0);
-  psllq(xmm0, 29);
-  pand(xmm5, xmm1);
-  pand(xmm0, xmm6);
-  subsd(xmm1, xmm5);
-  mulpd(xmm5, xmm0);
-  andl(eax, 32752);
-  subl(eax, ecx);
-  cvtsi2sdl(xmm7, eax);
-  mulsd(xmm1, xmm0);
-  movsd(xmm6, Address(tmp, 2064));         // 0xfefa3800UL, 0x3fa62e42UL
-  movdqu(xmm3, Address(tmp, 2080));        // 0x92492492UL, 0x3fc24924UL, 0x00000000UL, 0xbfd00000UL
-  subsd(xmm5, xmm2);
-  andl(edx, 16711680);
-  shrl(edx, 12);
-  movdqu(xmm0, Address(tmp, edx));
-  movdqu(xmm4, Address(tmp, 2096));        // 0x3d6fb175UL, 0xbfc5555eUL, 0x55555555UL, 0x3fd55555UL
-  addsd(xmm1, xmm5);
-  movdqu(xmm2, Address(tmp, 2112));        // 0x9999999aUL, 0x3fc99999UL, 0x00000000UL, 0xbfe00000UL
-  mulsd(xmm6, xmm7);
-  pshufd(xmm5, xmm1, 68);
-  mulsd(xmm7, Address(tmp, 2072));         // 0x93c76730UL, 0x3ceef357UL, 0x92492492UL, 0x3fc24924UL
-  mulsd(xmm3, xmm1);
-  addsd(xmm0, xmm6);
-  mulpd(xmm4, xmm5);
-  mulpd(xmm5, xmm5);
-  pshufd(xmm6, xmm0, 228);
-  addsd(xmm0, xmm1);
-  addpd(xmm4, xmm2);
-  mulpd(xmm3, xmm5);
-  subsd(xmm6, xmm0);
-  mulsd(xmm4, xmm1);
-  pshufd(xmm2, xmm0, 238);
-  addsd(xmm1, xmm6);
-  mulsd(xmm5, xmm5);
-  addsd(xmm7, xmm2);
-  addpd(xmm4, xmm3);
-  addsd(xmm1, xmm7);
-  mulpd(xmm4, xmm5);
-  addsd(xmm1, xmm4);
-  pshufd(xmm5, xmm4, 238);
-  addsd(xmm1, xmm5);
-  addsd(xmm0, xmm1);
-  jmp(L_2TAG_PACKET_2_0_2);
-
-  bind(L_2TAG_PACKET_0_0_2);
-  movsd(xmm0, Address(rsp, 112));
-  movdqu(xmm1, xmm0);
-  addl(eax, 16);
-  cmpl(eax, 32768);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_3_0_2);
-  cmpl(eax, 16);
-  jcc(Assembler::below, L_2TAG_PACKET_4_0_2);
-
-  bind(L_2TAG_PACKET_5_0_2);
-  addsd(xmm0, xmm0);
-  jmp(L_2TAG_PACKET_2_0_2);
-
-  bind(L_2TAG_PACKET_6_0_2);
-  jcc(Assembler::above, L_2TAG_PACKET_5_0_2);
-  cmpl(edx, 0);
-  jcc(Assembler::above, L_2TAG_PACKET_5_0_2);
-  jmp(L_2TAG_PACKET_7_0_2);
-
-  bind(L_2TAG_PACKET_3_0_2);
-  movdl(edx, xmm1);
-  psrlq(xmm1, 32);
-  movdl(ecx, xmm1);
-  addl(ecx, ecx);
-  cmpl(ecx, -2097152);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_6_0_2);
-  orl(edx, ecx);
-  cmpl(edx, 0);
-  jcc(Assembler::equal, L_2TAG_PACKET_8_0_2);
-
-  bind(L_2TAG_PACKET_7_0_2);
-  xorpd(xmm1, xmm1);
-  xorpd(xmm0, xmm0);
-  movl(eax, 32752);
-  pinsrw(xmm1, eax, 3);
-  movl(edx, 3);
-  mulsd(xmm0, xmm1);
-
-  bind(L_2TAG_PACKET_9_0_2);
-  movsd(Address(rsp, 0), xmm0);
-  movsd(xmm0, Address(rsp, 112));
-  fld_d(Address(rsp, 0));
-  jmp(L_2TAG_PACKET_10_0_2);
-
-  bind(L_2TAG_PACKET_8_0_2);
-  xorpd(xmm1, xmm1);
-  xorpd(xmm0, xmm0);
-  movl(eax, 49136);
-  pinsrw(xmm0, eax, 3);
-  divsd(xmm0, xmm1);
-  movl(edx, 2);
-  jmp(L_2TAG_PACKET_9_0_2);
-
-  bind(L_2TAG_PACKET_4_0_2);
-  movdl(edx, xmm1);
-  psrlq(xmm1, 32);
-  movdl(ecx, xmm1);
-  orl(edx, ecx);
-  cmpl(edx, 0);
-  jcc(Assembler::equal, L_2TAG_PACKET_8_0_2);
-  xorpd(xmm1, xmm1);
-  movl(eax, 18416);
-  pinsrw(xmm1, eax, 3);
-  mulsd(xmm0, xmm1);
-  movapd(xmm1, xmm0);
-  pextrw(eax, xmm0, 3);
-  por(xmm0, xmm2);
-  psllq(xmm0, 5);
-  movl(ecx, 18416);
-  psrlq(xmm0, 34);
-  rcpss(xmm0, xmm0);
-  psllq(xmm1, 12);
-  pshufd(xmm6, xmm5, 228);
-  psrlq(xmm1, 12);
-  jmp(L_2TAG_PACKET_1_0_2);
-
-  bind(L_2TAG_PACKET_2_0_2);
-  movsd(Address(rsp, 24), xmm0);
-  fld_d(Address(rsp, 24));
-
-  bind(L_2TAG_PACKET_10_0_2);
-  movl(tmp, Address(rsp, 40));
-}
-
-/******************************************************************************/
-//                     ALGORITHM DESCRIPTION  - POW()
-//                     ---------------------
-//
-//    Let x=2^k * mx, mx in [1,2)
-//
-//    log2(x) calculation:
-//
-//    Get B~1/mx based on the output of rcpps instruction (B0)
-//    B = int((B0*LH*2^9+0.5))/2^9
-//    LH is a short approximation for log2(e)
-//
-//    Reduced argument, scaled by LH:
-//                r=B*mx-LH (computed accurately in high and low parts)
-//
-//    log2(x) result:  k - log2(B) + p(r)
-//             p(r) is a degree 8 polynomial
-//             -log2(B) read from data table (high, low parts)
-//             log2(x) is formed from high and low parts
-//    For |x| in [1-1/32, 1+1/16), a slower but more accurate computation
-//    based om the same table design is performed.
-//
-//   Main path is taken if | floor(log2(|log2(|x|)|) + floor(log2|y|) | < 8,
-//   to filter out all potential OF/UF cases.
-//   exp2(y*log2(x)) is computed using an 8-bit index table and a degree 5
-//   polynomial
-//
-// Special cases:
-//  pow(-0,y) = -INF and raises the divide-by-zero exception for y an odd
-//  integer < 0.
-//  pow(-0,y) = +INF and raises the divide-by-zero exception for y < 0 and
-//  not an odd integer.
-//  pow(-0,y) = -0 for y an odd integer > 0.
-//  pow(-0,y) = +0 for y > 0 and not an odd integer.
-//  pow(-1,-INF) = NaN.
-//  pow(+1,y) = NaN for any y, even a NaN.
-//  pow(x,-0) = 1 for any x, even a NaN.
-//  pow(x,y) = a NaN and raises the invalid exception for finite x < 0 and
-//  finite non-integer y.
-//  pow(x,-INF) = +INF for |x|<1.
-//  pow(x,-INF) = +0 for |x|>1.
-//  pow(x,+INF) = +0 for |x|<1.
-//  pow(x,+INF) = +INF for |x|>1.
-//  pow(-INF,y) = -0 for y an odd integer < 0.
-//  pow(-INF,y) = +0 for y < 0 and not an odd integer.
-//  pow(-INF,y) = -INF for y an odd integer > 0.
-//  pow(-INF,y) = +INF for y > 0 and not an odd integer.
-//  pow(+INF,y) = +0 for y <0.
-//  pow(+INF,y) = +INF for y >0.
-//
-/******************************************************************************/
-
-ALIGNED_(16) juint _static_const_table_pow[] =
-{
-  0x00000000UL, 0xbfd61a00UL, 0x00000000UL, 0xbf5dabe1UL, 0xf8000000UL,
-  0xffffffffUL, 0x00000000UL, 0xfffff800UL, 0x00000000UL, 0x3ff00000UL,
-  0x00000000UL, 0x00000000UL, 0x20000000UL, 0x3feff00aUL, 0x96621f95UL,
-  0x3e5b1856UL, 0xe0000000UL, 0x3fefe019UL, 0xe5916f9eUL, 0xbe325278UL,
-  0x00000000UL, 0x3fefd02fUL, 0x859a1062UL, 0x3e595fb7UL, 0xc0000000UL,
-  0x3fefc049UL, 0xb245f18fUL, 0xbe529c38UL, 0xe0000000UL, 0x3fefb069UL,
-  0xad2880a7UL, 0xbe501230UL, 0x60000000UL, 0x3fefa08fUL, 0xc8e72420UL,
-  0x3e597bd1UL, 0x80000000UL, 0x3fef90baUL, 0xc30c4500UL, 0xbe5d6c75UL,
-  0xe0000000UL, 0x3fef80eaUL, 0x02c63f43UL, 0x3e2e1318UL, 0xc0000000UL,
-  0x3fef7120UL, 0xb3d4ccccUL, 0xbe44c52aUL, 0x00000000UL, 0x3fef615cUL,
-  0xdbd91397UL, 0xbe4e7d6cUL, 0xa0000000UL, 0x3fef519cUL, 0x65c5cd68UL,
-  0xbe522dc8UL, 0xa0000000UL, 0x3fef41e2UL, 0x46d1306cUL, 0xbe5a840eUL,
-  0xe0000000UL, 0x3fef322dUL, 0xd2980e94UL, 0x3e5071afUL, 0xa0000000UL,
-  0x3fef227eUL, 0x773abadeUL, 0xbe5891e5UL, 0xa0000000UL, 0x3fef12d4UL,
-  0xdc6bf46bUL, 0xbe5cccbeUL, 0xe0000000UL, 0x3fef032fUL, 0xbc7247faUL,
-  0xbe2bab83UL, 0x80000000UL, 0x3feef390UL, 0xbcaa1e46UL, 0xbe53bb3bUL,
-  0x60000000UL, 0x3feee3f6UL, 0x5f6c682dUL, 0xbe54c619UL, 0x80000000UL,
-  0x3feed461UL, 0x5141e368UL, 0xbe4b6d86UL, 0xe0000000UL, 0x3feec4d1UL,
-  0xec678f76UL, 0xbe369af6UL, 0x80000000UL, 0x3feeb547UL, 0x41301f55UL,
-  0xbe2d4312UL, 0x60000000UL, 0x3feea5c2UL, 0x676da6bdUL, 0xbe4d8dd0UL,
-  0x60000000UL, 0x3fee9642UL, 0x57a891c4UL, 0x3e51f991UL, 0xa0000000UL,
-  0x3fee86c7UL, 0xe4eb491eUL, 0x3e579bf9UL, 0x20000000UL, 0x3fee7752UL,
-  0xfddc4a2cUL, 0xbe3356e6UL, 0xc0000000UL, 0x3fee67e1UL, 0xd75b5bf1UL,
-  0xbe449531UL, 0x80000000UL, 0x3fee5876UL, 0xbd423b8eUL, 0x3df54fe4UL,
-  0x60000000UL, 0x3fee4910UL, 0x330e51b9UL, 0x3e54289cUL, 0x80000000UL,
-  0x3fee39afUL, 0x8651a95fUL, 0xbe55aad6UL, 0xa0000000UL, 0x3fee2a53UL,
-  0x5e98c708UL, 0xbe2fc4a9UL, 0xe0000000UL, 0x3fee1afcUL, 0x0989328dUL,
-  0x3e23958cUL, 0x40000000UL, 0x3fee0babUL, 0xee642abdUL, 0xbe425dd8UL,
-  0xa0000000UL, 0x3fedfc5eUL, 0xc394d236UL, 0x3e526362UL, 0x20000000UL,
-  0x3feded17UL, 0xe104aa8eUL, 0x3e4ce247UL, 0xc0000000UL, 0x3fedddd4UL,
-  0x265a9be4UL, 0xbe5bb77aUL, 0x40000000UL, 0x3fedce97UL, 0x0ecac52fUL,
-  0x3e4a7cb1UL, 0xe0000000UL, 0x3fedbf5eUL, 0x124cb3b8UL, 0x3e257024UL,
-  0x80000000UL, 0x3fedb02bUL, 0xe6d4febeUL, 0xbe2033eeUL, 0x20000000UL,
-  0x3feda0fdUL, 0x39cca00eUL, 0xbe3ddabcUL, 0xc0000000UL, 0x3fed91d3UL,
-  0xef8a552aUL, 0xbe543390UL, 0x40000000UL, 0x3fed82afUL, 0xb8e85204UL,
-  0x3e513850UL, 0xe0000000UL, 0x3fed738fUL, 0x3d59fe08UL, 0xbe5db728UL,
-  0x40000000UL, 0x3fed6475UL, 0x3aa7ead1UL, 0x3e58804bUL, 0xc0000000UL,
-  0x3fed555fUL, 0xf8a35ba9UL, 0xbe5298b0UL, 0x00000000UL, 0x3fed464fUL,
-  0x9a88dd15UL, 0x3e5a8cdbUL, 0x40000000UL, 0x3fed3743UL, 0xb0b0a190UL,
-  0x3e598635UL, 0x80000000UL, 0x3fed283cUL, 0xe2113295UL, 0xbe5c1119UL,
-  0x80000000UL, 0x3fed193aUL, 0xafbf1728UL, 0xbe492e9cUL, 0x60000000UL,
-  0x3fed0a3dUL, 0xe4a4ccf3UL, 0x3e19b90eUL, 0x20000000UL, 0x3fecfb45UL,
-  0xba3cbeb8UL, 0x3e406b50UL, 0xc0000000UL, 0x3fecec51UL, 0x110f7dddUL,
-  0x3e0d6806UL, 0x40000000UL, 0x3fecdd63UL, 0x7dd7d508UL, 0xbe5a8943UL,
-  0x80000000UL, 0x3fecce79UL, 0x9b60f271UL, 0xbe50676aUL, 0x80000000UL,
-  0x3fecbf94UL, 0x0b9ad660UL, 0x3e59174fUL, 0x60000000UL, 0x3fecb0b4UL,
-  0x00823d9cUL, 0x3e5bbf72UL, 0x20000000UL, 0x3feca1d9UL, 0x38a6ec89UL,
-  0xbe4d38f9UL, 0x80000000UL, 0x3fec9302UL, 0x3a0b7d8eUL, 0x3e53dbfdUL,
-  0xc0000000UL, 0x3fec8430UL, 0xc6826b34UL, 0xbe27c5c9UL, 0xc0000000UL,
-  0x3fec7563UL, 0x0c706381UL, 0xbe593653UL, 0x60000000UL, 0x3fec669bUL,
-  0x7df34ec7UL, 0x3e461ab5UL, 0xe0000000UL, 0x3fec57d7UL, 0x40e5e7e8UL,
-  0xbe5c3daeUL, 0x00000000UL, 0x3fec4919UL, 0x5602770fUL, 0xbe55219dUL,
-  0xc0000000UL, 0x3fec3a5eUL, 0xec7911ebUL, 0x3e5a5d25UL, 0x60000000UL,
-  0x3fec2ba9UL, 0xb39ea225UL, 0xbe53c00bUL, 0x80000000UL, 0x3fec1cf8UL,
-  0x967a212eUL, 0x3e5a8ddfUL, 0x60000000UL, 0x3fec0e4cUL, 0x580798bdUL,
-  0x3e5f53abUL, 0x00000000UL, 0x3febffa5UL, 0xb8282df6UL, 0xbe46b874UL,
-  0x20000000UL, 0x3febf102UL, 0xe33a6729UL, 0x3e54963fUL, 0x00000000UL,
-  0x3febe264UL, 0x3b53e88aUL, 0xbe3adce1UL, 0x60000000UL, 0x3febd3caUL,
-  0xc2585084UL, 0x3e5cde9fUL, 0x80000000UL, 0x3febc535UL, 0xa335c5eeUL,
-  0xbe39fd9cUL, 0x20000000UL, 0x3febb6a5UL, 0x7325b04dUL, 0x3e42ba15UL,
-  0x60000000UL, 0x3feba819UL, 0x1564540fUL, 0x3e3a9f35UL, 0x40000000UL,
-  0x3feb9992UL, 0x83fff592UL, 0xbe5465ceUL, 0xa0000000UL, 0x3feb8b0fUL,
-  0xb9da63d3UL, 0xbe4b1a0aUL, 0x80000000UL, 0x3feb7c91UL, 0x6d6f1ea4UL,
-  0x3e557657UL, 0x00000000UL, 0x3feb6e18UL, 0x5e80a1bfUL, 0x3e4ddbb6UL,
-  0x00000000UL, 0x3feb5fa3UL, 0x1c9eacb5UL, 0x3e592877UL, 0xa0000000UL,
-  0x3feb5132UL, 0x6d40beb3UL, 0xbe51858cUL, 0xa0000000UL, 0x3feb42c6UL,
-  0xd740c67bUL, 0x3e427ad2UL, 0x40000000UL, 0x3feb345fUL, 0xa3e0cceeUL,
-  0xbe5c2fc4UL, 0x40000000UL, 0x3feb25fcUL, 0x8e752b50UL, 0xbe3da3c2UL,
-  0xc0000000UL, 0x3feb179dUL, 0xa892e7deUL, 0x3e1fb481UL, 0xc0000000UL,
-  0x3feb0943UL, 0x21ed71e9UL, 0xbe365206UL, 0x20000000UL, 0x3feafaeeUL,
-  0x0e1380a3UL, 0x3e5c5b7bUL, 0x20000000UL, 0x3feaec9dUL, 0x3c3d640eUL,
-  0xbe5dbbd0UL, 0x60000000UL, 0x3feade50UL, 0x8f97a715UL, 0x3e3a8ec5UL,
-  0x20000000UL, 0x3fead008UL, 0x23ab2839UL, 0x3e2fe98aUL, 0x40000000UL,
-  0x3feac1c4UL, 0xf4bbd50fUL, 0x3e54d8f6UL, 0xe0000000UL, 0x3feab384UL,
-  0x14757c4dUL, 0xbe48774cUL, 0xc0000000UL, 0x3feaa549UL, 0x7c7b0eeaUL,
-  0x3e5b51bbUL, 0x20000000UL, 0x3fea9713UL, 0xf56f7013UL, 0x3e386200UL,
-  0xe0000000UL, 0x3fea88e0UL, 0xbe428ebeUL, 0xbe514af5UL, 0xe0000000UL,
-  0x3fea7ab2UL, 0x8d0e4496UL, 0x3e4f9165UL, 0x60000000UL, 0x3fea6c89UL,
-  0xdbacc5d5UL, 0xbe5c063bUL, 0x20000000UL, 0x3fea5e64UL, 0x3f19d970UL,
-  0xbe5a0c8cUL, 0x20000000UL, 0x3fea5043UL, 0x09ea3e6bUL, 0x3e5065dcUL,
-  0x80000000UL, 0x3fea4226UL, 0x78df246cUL, 0x3e5e05f6UL, 0x40000000UL,
-  0x3fea340eUL, 0x4057d4a0UL, 0x3e431b2bUL, 0x40000000UL, 0x3fea25faUL,
-  0x82867bb5UL, 0x3e4b76beUL, 0xa0000000UL, 0x3fea17eaUL, 0x9436f40aUL,
-  0xbe5aad39UL, 0x20000000UL, 0x3fea09dfUL, 0x4b5253b3UL, 0x3e46380bUL,
-  0x00000000UL, 0x3fe9fbd8UL, 0x8fc52466UL, 0xbe386f9bUL, 0x20000000UL,
-  0x3fe9edd5UL, 0x22d3f344UL, 0xbe538347UL, 0x60000000UL, 0x3fe9dfd6UL,
-  0x1ac33522UL, 0x3e5dbc53UL, 0x00000000UL, 0x3fe9d1dcUL, 0xeabdff1dUL,
-  0x3e40fc0cUL, 0xe0000000UL, 0x3fe9c3e5UL, 0xafd30e73UL, 0xbe585e63UL,
-  0xe0000000UL, 0x3fe9b5f3UL, 0xa52f226aUL, 0xbe43e8f9UL, 0x20000000UL,
-  0x3fe9a806UL, 0xecb8698dUL, 0xbe515b36UL, 0x80000000UL, 0x3fe99a1cUL,
-  0xf2b4e89dUL, 0x3e48b62bUL, 0x20000000UL, 0x3fe98c37UL, 0x7c9a88fbUL,
-  0x3e44414cUL, 0x00000000UL, 0x3fe97e56UL, 0xda015741UL, 0xbe5d13baUL,
-  0xe0000000UL, 0x3fe97078UL, 0x5fdace06UL, 0x3e51b947UL, 0x00000000UL,
-  0x3fe962a0UL, 0x956ca094UL, 0x3e518785UL, 0x40000000UL, 0x3fe954cbUL,
-  0x01164c1dUL, 0x3e5d5b57UL, 0xc0000000UL, 0x3fe946faUL, 0xe63b3767UL,
-  0xbe4f84e7UL, 0x40000000UL, 0x3fe9392eUL, 0xe57cc2a9UL, 0x3e34eda3UL,
-  0xe0000000UL, 0x3fe92b65UL, 0x8c75b544UL, 0x3e5766a0UL, 0xc0000000UL,
-  0x3fe91da1UL, 0x37d1d087UL, 0xbe5e2ab1UL, 0x80000000UL, 0x3fe90fe1UL,
-  0xa953dc20UL, 0x3e5fa1f3UL, 0x80000000UL, 0x3fe90225UL, 0xdbd3f369UL,
-  0x3e47d6dbUL, 0xa0000000UL, 0x3fe8f46dUL, 0x1c9be989UL, 0xbe5e2b0aUL,
-  0xa0000000UL, 0x3fe8e6b9UL, 0x3c93d76aUL, 0x3e5c8618UL, 0xe0000000UL,
-  0x3fe8d909UL, 0x2182fc9aUL, 0xbe41aa9eUL, 0x20000000UL, 0x3fe8cb5eUL,
-  0xe6b3539dUL, 0xbe530d19UL, 0x60000000UL, 0x3fe8bdb6UL, 0x49e58cc3UL,
-  0xbe3bb374UL, 0xa0000000UL, 0x3fe8b012UL, 0xa7cfeb8fUL, 0x3e56c412UL,
-  0x00000000UL, 0x3fe8a273UL, 0x8d52bc19UL, 0x3e1429b8UL, 0x60000000UL,
-  0x3fe894d7UL, 0x4dc32c6cUL, 0xbe48604cUL, 0xc0000000UL, 0x3fe8873fUL,
-  0x0c868e56UL, 0xbe564ee5UL, 0x00000000UL, 0x3fe879acUL, 0x56aee828UL,
-  0x3e5e2fd8UL, 0x60000000UL, 0x3fe86c1cUL, 0x7ceab8ecUL, 0x3e493365UL,
-  0xc0000000UL, 0x3fe85e90UL, 0x78d4dadcUL, 0xbe4f7f25UL, 0x00000000UL,
-  0x3fe85109UL, 0x0ccd8280UL, 0x3e31e7a2UL, 0x40000000UL, 0x3fe84385UL,
-  0x34ba4e15UL, 0x3e328077UL, 0x80000000UL, 0x3fe83605UL, 0xa670975aUL,
-  0xbe53eee5UL, 0xa0000000UL, 0x3fe82889UL, 0xf61b77b2UL, 0xbe43a20aUL,
-  0xa0000000UL, 0x3fe81b11UL, 0x13e6643bUL, 0x3e5e5fe5UL, 0xc0000000UL,
-  0x3fe80d9dUL, 0x82cc94e8UL, 0xbe5ff1f9UL, 0xa0000000UL, 0x3fe8002dUL,
-  0x8a0c9c5dUL, 0xbe42b0e7UL, 0x60000000UL, 0x3fe7f2c1UL, 0x22a16f01UL,
-  0x3e5d9ea0UL, 0x20000000UL, 0x3fe7e559UL, 0xc38cd451UL, 0x3e506963UL,
-  0xc0000000UL, 0x3fe7d7f4UL, 0x9902bc71UL, 0x3e4503d7UL, 0x40000000UL,
-  0x3fe7ca94UL, 0xdef2a3c0UL, 0x3e3d98edUL, 0xa0000000UL, 0x3fe7bd37UL,
-  0xed49abb0UL, 0x3e24c1ffUL, 0xe0000000UL, 0x3fe7afdeUL, 0xe3b0be70UL,
-  0xbe40c467UL, 0x00000000UL, 0x3fe7a28aUL, 0xaf9f193cUL, 0xbe5dff6cUL,
-  0xe0000000UL, 0x3fe79538UL, 0xb74cf6b6UL, 0xbe258ed0UL, 0xa0000000UL,
-  0x3fe787ebUL, 0x1d9127c7UL, 0x3e345fb0UL, 0x40000000UL, 0x3fe77aa2UL,
-  0x1028c21dUL, 0xbe4619bdUL, 0xa0000000UL, 0x3fe76d5cUL, 0x7cb0b5e4UL,
-  0x3e40f1a2UL, 0xe0000000UL, 0x3fe7601aUL, 0x2b1bc4adUL, 0xbe32e8bbUL,
-  0xe0000000UL, 0x3fe752dcUL, 0x6839f64eUL, 0x3e41f57bUL, 0xc0000000UL,
-  0x3fe745a2UL, 0xc4121f7eUL, 0xbe52c40aUL, 0x60000000UL, 0x3fe7386cUL,
-  0xd6852d72UL, 0xbe5c4e6bUL, 0xc0000000UL, 0x3fe72b39UL, 0x91d690f7UL,
-  0xbe57f88fUL, 0xe0000000UL, 0x3fe71e0aUL, 0x627a2159UL, 0xbe4425d5UL,
-  0xc0000000UL, 0x3fe710dfUL, 0x50a54033UL, 0x3e422b7eUL, 0x60000000UL,
-  0x3fe703b8UL, 0x3b0b5f91UL, 0x3e5d3857UL, 0xe0000000UL, 0x3fe6f694UL,
-  0x84d628a2UL, 0xbe51f090UL, 0x00000000UL, 0x3fe6e975UL, 0x306d8894UL,
-  0xbe414d83UL, 0xe0000000UL, 0x3fe6dc58UL, 0x30bf24aaUL, 0xbe4650caUL,
-  0x80000000UL, 0x3fe6cf40UL, 0xd4628d69UL, 0xbe5db007UL, 0xc0000000UL,
-  0x3fe6c22bUL, 0xa2aae57bUL, 0xbe31d279UL, 0xc0000000UL, 0x3fe6b51aUL,
-  0x860edf7eUL, 0xbe2d4c4aUL, 0x80000000UL, 0x3fe6a80dUL, 0xf3559341UL,
-  0xbe5f7e98UL, 0xe0000000UL, 0x3fe69b03UL, 0xa885899eUL, 0xbe5c2011UL,
-  0xe0000000UL, 0x3fe68dfdUL, 0x2bdc6d37UL, 0x3e224a82UL, 0xa0000000UL,
-  0x3fe680fbUL, 0xc12ad1b9UL, 0xbe40cf56UL, 0x00000000UL, 0x3fe673fdUL,
-  0x1bcdf659UL, 0xbdf52f2dUL, 0x00000000UL, 0x3fe66702UL, 0x5df10408UL,
-  0x3e5663e0UL, 0xc0000000UL, 0x3fe65a0aUL, 0xa4070568UL, 0xbe40b12fUL,
-  0x00000000UL, 0x3fe64d17UL, 0x71c54c47UL, 0x3e5f5e8bUL, 0x00000000UL,
-  0x3fe64027UL, 0xbd4b7e83UL, 0x3e42ead6UL, 0xa0000000UL, 0x3fe6333aUL,
-  0x61598bd2UL, 0xbe4c48d4UL, 0xc0000000UL, 0x3fe62651UL, 0x6f538d61UL,
-  0x3e548401UL, 0xa0000000UL, 0x3fe6196cUL, 0x14344120UL, 0xbe529af6UL,
-  0x00000000UL, 0x3fe60c8bUL, 0x5982c587UL, 0xbe3e1e4fUL, 0x00000000UL,
-  0x3fe5ffadUL, 0xfe51d4eaUL, 0xbe4c897aUL, 0x80000000UL, 0x3fe5f2d2UL,
-  0xfd46ebe1UL, 0x3e552e00UL, 0xa0000000UL, 0x3fe5e5fbUL, 0xa4695699UL,
-  0x3e5ed471UL, 0x60000000UL, 0x3fe5d928UL, 0x80d118aeUL, 0x3e456b61UL,
-  0xa0000000UL, 0x3fe5cc58UL, 0x304c330bUL, 0x3e54dc29UL, 0x80000000UL,
-  0x3fe5bf8cUL, 0x0af2dedfUL, 0xbe3aa9bdUL, 0xe0000000UL, 0x3fe5b2c3UL,
-  0x15fc9258UL, 0xbe479a37UL, 0xc0000000UL, 0x3fe5a5feUL, 0x9292c7eaUL,
-  0x3e188650UL, 0x20000000UL, 0x3fe5993dUL, 0x33b4d380UL, 0x3e5d6d93UL,
-  0x20000000UL, 0x3fe58c7fUL, 0x02fd16c7UL, 0x3e2fe961UL, 0xa0000000UL,
-  0x3fe57fc4UL, 0x4a05edb6UL, 0xbe4d55b4UL, 0xa0000000UL, 0x3fe5730dUL,
-  0x3d443abbUL, 0xbe5e6954UL, 0x00000000UL, 0x3fe5665aUL, 0x024acfeaUL,
-  0x3e50e61bUL, 0x00000000UL, 0x3fe559aaUL, 0xcc9edd09UL, 0xbe325403UL,
-  0x60000000UL, 0x3fe54cfdUL, 0x1fe26950UL, 0x3e5d500eUL, 0x60000000UL,
-  0x3fe54054UL, 0x6c5ae164UL, 0xbe4a79b4UL, 0xc0000000UL, 0x3fe533aeUL,
-  0x154b0287UL, 0xbe401571UL, 0xa0000000UL, 0x3fe5270cUL, 0x0673f401UL,
-  0xbe56e56bUL, 0xe0000000UL, 0x3fe51a6dUL, 0x751b639cUL, 0x3e235269UL,
-  0xa0000000UL, 0x3fe50dd2UL, 0x7c7b2bedUL, 0x3ddec887UL, 0xc0000000UL,
-  0x3fe5013aUL, 0xafab4e17UL, 0x3e5e7575UL, 0x60000000UL, 0x3fe4f4a6UL,
-  0x2e308668UL, 0x3e59aed6UL, 0x80000000UL, 0x3fe4e815UL, 0xf33e2a76UL,
-  0xbe51f184UL, 0xe0000000UL, 0x3fe4db87UL, 0x839f3e3eUL, 0x3e57db01UL,
-  0xc0000000UL, 0x3fe4cefdUL, 0xa9eda7bbUL, 0x3e535e0fUL, 0x00000000UL,
-  0x3fe4c277UL, 0x2a8f66a5UL, 0x3e5ce451UL, 0xc0000000UL, 0x3fe4b5f3UL,
-  0x05192456UL, 0xbe4e8518UL, 0xc0000000UL, 0x3fe4a973UL, 0x4aa7cd1dUL,
-  0x3e46784aUL, 0x40000000UL, 0x3fe49cf7UL, 0x8e23025eUL, 0xbe5749f2UL,
-  0x00000000UL, 0x3fe4907eUL, 0x18d30215UL, 0x3e360f39UL, 0x20000000UL,
-  0x3fe48408UL, 0x63dcf2f3UL, 0x3e5e00feUL, 0xc0000000UL, 0x3fe47795UL,
-  0x46182d09UL, 0xbe5173d9UL, 0xa0000000UL, 0x3fe46b26UL, 0x8f0e62aaUL,
-  0xbe48f281UL, 0xe0000000UL, 0x3fe45ebaUL, 0x5775c40cUL, 0xbe56aad4UL,
-  0x60000000UL, 0x3fe45252UL, 0x0fe25f69UL, 0x3e48bd71UL, 0x40000000UL,
-  0x3fe445edUL, 0xe9989ec5UL, 0x3e590d97UL, 0x80000000UL, 0x3fe4398bUL,
-  0xb3d9ffe3UL, 0x3e479dbcUL, 0x20000000UL, 0x3fe42d2dUL, 0x388e4d2eUL,
-  0xbe5eed80UL, 0xe0000000UL, 0x3fe420d1UL, 0x6f797c18UL, 0x3e554b4cUL,
-  0x20000000UL, 0x3fe4147aUL, 0x31048bb4UL, 0xbe5b1112UL, 0x80000000UL,
-  0x3fe40825UL, 0x2efba4f9UL, 0x3e48ebc7UL, 0x40000000UL, 0x3fe3fbd4UL,
-  0x50201119UL, 0x3e40b701UL, 0x40000000UL, 0x3fe3ef86UL, 0x0a4db32cUL,
-  0x3e551de8UL, 0xa0000000UL, 0x3fe3e33bUL, 0x0c9c148bUL, 0xbe50c1f6UL,
-  0x20000000UL, 0x3fe3d6f4UL, 0xc9129447UL, 0x3e533fa0UL, 0x00000000UL,
-  0x3fe3cab0UL, 0xaae5b5a0UL, 0xbe22b68eUL, 0x20000000UL, 0x3fe3be6fUL,
-  0x02305e8aUL, 0xbe54fc08UL, 0x60000000UL, 0x3fe3b231UL, 0x7f908258UL,
-  0x3e57dc05UL, 0x00000000UL, 0x3fe3a5f7UL, 0x1a09af78UL, 0x3e08038bUL,
-  0xe0000000UL, 0x3fe399bfUL, 0x490643c1UL, 0xbe5dbe42UL, 0xe0000000UL,
-  0x3fe38d8bUL, 0x5e8ad724UL, 0xbe3c2b72UL, 0x20000000UL, 0x3fe3815bUL,
-  0xc67196b6UL, 0x3e1713cfUL, 0xa0000000UL, 0x3fe3752dUL, 0x6182e429UL,
-  0xbe3ec14cUL, 0x40000000UL, 0x3fe36903UL, 0xab6eb1aeUL, 0x3e5a2cc5UL,
-  0x40000000UL, 0x3fe35cdcUL, 0xfe5dc064UL, 0xbe5c5878UL, 0x40000000UL,
-  0x3fe350b8UL, 0x0ba6b9e4UL, 0x3e51619bUL, 0x80000000UL, 0x3fe34497UL,
-  0x857761aaUL, 0x3e5fff53UL, 0x00000000UL, 0x3fe3387aUL, 0xf872d68cUL,
-  0x3e484f4dUL, 0xa0000000UL, 0x3fe32c5fUL, 0x087e97c2UL, 0x3e52842eUL,
-  0x80000000UL, 0x3fe32048UL, 0x73d6d0c0UL, 0xbe503edfUL, 0x80000000UL,
-  0x3fe31434UL, 0x0c1456a1UL, 0xbe5f72adUL, 0xa0000000UL, 0x3fe30823UL,
-  0x83a1a4d5UL, 0xbe5e65ccUL, 0xe0000000UL, 0x3fe2fc15UL, 0x855a7390UL,
-  0xbe506438UL, 0x40000000UL, 0x3fe2f00bUL, 0xa2898287UL, 0x3e3d22a2UL,
-  0xe0000000UL, 0x3fe2e403UL, 0x8b56f66fUL, 0xbe5aa5fdUL, 0x80000000UL,
-  0x3fe2d7ffUL, 0x52db119aUL, 0x3e3a2e3dUL, 0x60000000UL, 0x3fe2cbfeUL,
-  0xe2ddd4c0UL, 0xbe586469UL, 0x40000000UL, 0x3fe2c000UL, 0x6b01bf10UL,
-  0x3e352b9dUL, 0x40000000UL, 0x3fe2b405UL, 0xb07a1cdfUL, 0x3e5c5cdaUL,
-  0x80000000UL, 0x3fe2a80dUL, 0xc7b5f868UL, 0xbe5668b3UL, 0xc0000000UL,
-  0x3fe29c18UL, 0x185edf62UL, 0xbe563d66UL, 0x00000000UL, 0x3fe29027UL,
-  0xf729e1ccUL, 0x3e59a9a0UL, 0x80000000UL, 0x3fe28438UL, 0x6433c727UL,
-  0xbe43cc89UL, 0x00000000UL, 0x3fe2784dUL, 0x41782631UL, 0xbe30750cUL,
-  0xa0000000UL, 0x3fe26c64UL, 0x914911b7UL, 0xbe58290eUL, 0x40000000UL,
-  0x3fe2607fUL, 0x3dcc73e1UL, 0xbe4269cdUL, 0x00000000UL, 0x3fe2549dUL,
-  0x2751bf70UL, 0xbe5a6998UL, 0xc0000000UL, 0x3fe248bdUL, 0x4248b9fbUL,
-  0xbe4ddb00UL, 0x80000000UL, 0x3fe23ce1UL, 0xf35cf82fUL, 0x3e561b71UL,
-  0x60000000UL, 0x3fe23108UL, 0x8e481a2dUL, 0x3e518fb9UL, 0x60000000UL,
-  0x3fe22532UL, 0x5ab96edcUL, 0xbe5fafc5UL, 0x40000000UL, 0x3fe2195fUL,
-  0x80943911UL, 0xbe07f819UL, 0x40000000UL, 0x3fe20d8fUL, 0x386f2d6cUL,
-  0xbe54ba8bUL, 0x40000000UL, 0x3fe201c2UL, 0xf29664acUL, 0xbe5eb815UL,
-  0x20000000UL, 0x3fe1f5f8UL, 0x64f03390UL, 0x3e5e320cUL, 0x20000000UL,
-  0x3fe1ea31UL, 0x747ff696UL, 0x3e5ef0a5UL, 0x40000000UL, 0x3fe1de6dUL,
-  0x3e9ceb51UL, 0xbe5f8d27UL, 0x20000000UL, 0x3fe1d2acUL, 0x4ae0b55eUL,
-  0x3e5faa21UL, 0x20000000UL, 0x3fe1c6eeUL, 0x28569a5eUL, 0x3e598a4fUL,
-  0x20000000UL, 0x3fe1bb33UL, 0x54b33e07UL, 0x3e46130aUL, 0x20000000UL,
-  0x3fe1af7bUL, 0x024f1078UL, 0xbe4dbf93UL, 0x00000000UL, 0x3fe1a3c6UL,
-  0xb0783bfaUL, 0x3e419248UL, 0xe0000000UL, 0x3fe19813UL, 0x2f02b836UL,
-  0x3e4e02b7UL, 0xc0000000UL, 0x3fe18c64UL, 0x28dec9d4UL, 0x3e09064fUL,
-  0x80000000UL, 0x3fe180b8UL, 0x45cbf406UL, 0x3e5b1f46UL, 0x40000000UL,
-  0x3fe1750fUL, 0x03d9964cUL, 0x3e5b0a79UL, 0x00000000UL, 0x3fe16969UL,
-  0x8b5b882bUL, 0xbe238086UL, 0xa0000000UL, 0x3fe15dc5UL, 0x73bad6f8UL,
-  0xbdf1fca4UL, 0x20000000UL, 0x3fe15225UL, 0x5385769cUL, 0x3e5e8d76UL,
-  0xa0000000UL, 0x3fe14687UL, 0x1676dc6bUL, 0x3e571d08UL, 0x20000000UL,
-  0x3fe13aedUL, 0xa8c41c7fUL, 0xbe598a25UL, 0x60000000UL, 0x3fe12f55UL,
-  0xc4e1aaf0UL, 0x3e435277UL, 0xa0000000UL, 0x3fe123c0UL, 0x403638e1UL,
-  0xbe21aa7cUL, 0xc0000000UL, 0x3fe1182eUL, 0x557a092bUL, 0xbdd0116bUL,
-  0xc0000000UL, 0x3fe10c9fUL, 0x7d779f66UL, 0x3e4a61baUL, 0xc0000000UL,
-  0x3fe10113UL, 0x2b09c645UL, 0xbe5d586eUL, 0x20000000UL, 0x3fe0ea04UL,
-  0xea2cad46UL, 0x3e5aa97cUL, 0x20000000UL, 0x3fe0d300UL, 0x23190e54UL,
-  0x3e50f1a7UL, 0xa0000000UL, 0x3fe0bc07UL, 0x1379a5a6UL, 0xbe51619dUL,
-  0x60000000UL, 0x3fe0a51aUL, 0x926a3d4aUL, 0x3e5cf019UL, 0xa0000000UL,
-  0x3fe08e38UL, 0xa8c24358UL, 0x3e35241eUL, 0x20000000UL, 0x3fe07762UL,
-  0x24317e7aUL, 0x3e512cfaUL, 0x00000000UL, 0x3fe06097UL, 0xfd9cf274UL,
-  0xbe55bef3UL, 0x00000000UL, 0x3fe049d7UL, 0x3689b49dUL, 0xbe36d26dUL,
-  0x40000000UL, 0x3fe03322UL, 0xf72ef6c4UL, 0xbe54cd08UL, 0xa0000000UL,
-  0x3fe01c78UL, 0x23702d2dUL, 0xbe5900bfUL, 0x00000000UL, 0x3fe005daUL,
-  0x3f59c14cUL, 0x3e57d80bUL, 0x40000000UL, 0x3fdfde8dUL, 0xad67766dUL,
-  0xbe57fad4UL, 0x40000000UL, 0x3fdfb17cUL, 0x644f4ae7UL, 0x3e1ee43bUL,
-  0x40000000UL, 0x3fdf8481UL, 0x903234d2UL, 0x3e501a86UL, 0x40000000UL,
-  0x3fdf579cUL, 0xafe9e509UL, 0xbe267c3eUL, 0x00000000UL, 0x3fdf2acdUL,
-  0xb7dfda0bUL, 0xbe48149bUL, 0x40000000UL, 0x3fdefe13UL, 0x3b94305eUL,
-  0x3e5f4ea7UL, 0x80000000UL, 0x3fded16fUL, 0x5d95da61UL, 0xbe55c198UL,
-  0x00000000UL, 0x3fdea4e1UL, 0x406960c9UL, 0xbdd99a19UL, 0x00000000UL,
-  0x3fde7868UL, 0xd22f3539UL, 0x3e470c78UL, 0x80000000UL, 0x3fde4c04UL,
-  0x83eec535UL, 0xbe3e1232UL, 0x40000000UL, 0x3fde1fb6UL, 0x3dfbffcbUL,
-  0xbe4b7d71UL, 0x40000000UL, 0x3fddf37dUL, 0x7e1be4e0UL, 0xbe5b8f8fUL,
-  0x40000000UL, 0x3fddc759UL, 0x46dae887UL, 0xbe350458UL, 0x80000000UL,
-  0x3fdd9b4aUL, 0xed6ecc49UL, 0xbe5f0045UL, 0x80000000UL, 0x3fdd6f50UL,
-  0x2e9e883cUL, 0x3e2915daUL, 0x80000000UL, 0x3fdd436bUL, 0xf0bccb32UL,
-  0x3e4a68c9UL, 0x80000000UL, 0x3fdd179bUL, 0x9bbfc779UL, 0xbe54a26aUL,
-  0x00000000UL, 0x3fdcebe0UL, 0x7cea33abUL, 0x3e43c6b7UL, 0x40000000UL,
-  0x3fdcc039UL, 0xe740fd06UL, 0x3e5526c2UL, 0x40000000UL, 0x3fdc94a7UL,
-  0x9eadeb1aUL, 0xbe396d8dUL, 0xc0000000UL, 0x3fdc6929UL, 0xf0a8f95aUL,
-  0xbe5c0ab2UL, 0x80000000UL, 0x3fdc3dc0UL, 0x6ee2693bUL, 0x3e0992e6UL,
-  0xc0000000UL, 0x3fdc126bUL, 0x5ac6b581UL, 0xbe2834b6UL, 0x40000000UL,
-  0x3fdbe72bUL, 0x8cc226ffUL, 0x3e3596a6UL, 0x00000000UL, 0x3fdbbbffUL,
-  0xf92a74bbUL, 0x3e3c5813UL, 0x00000000UL, 0x3fdb90e7UL, 0x479664c0UL,
-  0xbe50d644UL, 0x00000000UL, 0x3fdb65e3UL, 0x5004975bUL, 0xbe55258fUL,
-  0x00000000UL, 0x3fdb3af3UL, 0xe4b23194UL, 0xbe588407UL, 0xc0000000UL,
-  0x3fdb1016UL, 0xe65d4d0aUL, 0x3e527c26UL, 0x80000000UL, 0x3fdae54eUL,
-  0x814fddd6UL, 0x3e5962a2UL, 0x40000000UL, 0x3fdaba9aUL, 0xe19d0913UL,
-  0xbe562f4eUL, 0x80000000UL, 0x3fda8ff9UL, 0x43cfd006UL, 0xbe4cfdebUL,
-  0x40000000UL, 0x3fda656cUL, 0x686f0a4eUL, 0x3e5e47a8UL, 0xc0000000UL,
-  0x3fda3af2UL, 0x7200d410UL, 0x3e5e1199UL, 0xc0000000UL, 0x3fda108cUL,
-  0xabd2266eUL, 0x3e5ee4d1UL, 0x40000000UL, 0x3fd9e63aUL, 0x396f8f2cUL,
-  0x3e4dbffbUL, 0x00000000UL, 0x3fd9bbfbUL, 0xe32b25ddUL, 0x3e5c3a54UL,
-  0x40000000UL, 0x3fd991cfUL, 0x431e4035UL, 0xbe457925UL, 0x80000000UL,
-  0x3fd967b6UL, 0x7bed3dd3UL, 0x3e40c61dUL, 0x00000000UL, 0x3fd93db1UL,
-  0xd7449365UL, 0x3e306419UL, 0x80000000UL, 0x3fd913beUL, 0x1746e791UL,
-  0x3e56fcfcUL, 0x40000000UL, 0x3fd8e9dfUL, 0xf3a9028bUL, 0xbe5041b9UL,
-  0xc0000000UL, 0x3fd8c012UL, 0x56840c50UL, 0xbe26e20aUL, 0x40000000UL,
-  0x3fd89659UL, 0x19763102UL, 0xbe51f466UL, 0x80000000UL, 0x3fd86cb2UL,
-  0x7032de7cUL, 0xbe4d298aUL, 0x80000000UL, 0x3fd8431eUL, 0xdeb39fabUL,
-  0xbe4361ebUL, 0x40000000UL, 0x3fd8199dUL, 0x5d01cbe0UL, 0xbe5425b3UL,
-  0x80000000UL, 0x3fd7f02eUL, 0x3ce99aa9UL, 0x3e146fa8UL, 0x80000000UL,
-  0x3fd7c6d2UL, 0xd1a262b9UL, 0xbe5a1a69UL, 0xc0000000UL, 0x3fd79d88UL,
-  0x8606c236UL, 0x3e423a08UL, 0x80000000UL, 0x3fd77451UL, 0x8fd1e1b7UL,
-  0x3e5a6a63UL, 0xc0000000UL, 0x3fd74b2cUL, 0xe491456aUL, 0x3e42c1caUL,
-  0x40000000UL, 0x3fd7221aUL, 0x4499a6d7UL, 0x3e36a69aUL, 0x00000000UL,
-  0x3fd6f91aUL, 0x5237df94UL, 0xbe0f8f02UL, 0x00000000UL, 0x3fd6d02cUL,
-  0xb6482c6eUL, 0xbe5abcf7UL, 0x00000000UL, 0x3fd6a750UL, 0x1919fd61UL,
-  0xbe57ade2UL, 0x00000000UL, 0x3fd67e86UL, 0xaa7a994dUL, 0xbe3f3fbdUL,
-  0x00000000UL, 0x3fd655ceUL, 0x67db014cUL, 0x3e33c550UL, 0x00000000UL,
-  0x3fd62d28UL, 0xa82856b7UL, 0xbe1409d1UL, 0xc0000000UL, 0x3fd60493UL,
-  0x1e6a300dUL, 0x3e55d899UL, 0x80000000UL, 0x3fd5dc11UL, 0x1222bd5cUL,
-  0xbe35bfc0UL, 0xc0000000UL, 0x3fd5b3a0UL, 0x6e8dc2d3UL, 0x3e5d4d79UL,
-  0x00000000UL, 0x3fd58b42UL, 0xe0e4ace6UL, 0xbe517303UL, 0x80000000UL,
-  0x3fd562f4UL, 0xb306e0a8UL, 0x3e5edf0fUL, 0xc0000000UL, 0x3fd53ab8UL,
-  0x6574bc54UL, 0x3e5ee859UL, 0x80000000UL, 0x3fd5128eUL, 0xea902207UL,
-  0x3e5f6188UL, 0xc0000000UL, 0x3fd4ea75UL, 0x9f911d79UL, 0x3e511735UL,
-  0x80000000UL, 0x3fd4c26eUL, 0xf9c77397UL, 0xbe5b1643UL, 0x40000000UL,
-  0x3fd49a78UL, 0x15fc9258UL, 0x3e479a37UL, 0x80000000UL, 0x3fd47293UL,
-  0xd5a04dd9UL, 0xbe426e56UL, 0xc0000000UL, 0x3fd44abfUL, 0xe04042f5UL,
-  0x3e56f7c6UL, 0x40000000UL, 0x3fd422fdUL, 0x1d8bf2c8UL, 0x3e5d8810UL,
-  0x00000000UL, 0x3fd3fb4cUL, 0x88a8ddeeUL, 0xbe311454UL, 0xc0000000UL,
-  0x3fd3d3abUL, 0x3e3b5e47UL, 0xbe5d1b72UL, 0x40000000UL, 0x3fd3ac1cUL,
-  0xc2ab5d59UL, 0x3e31b02bUL, 0xc0000000UL, 0x3fd3849dUL, 0xd4e34b9eUL,
-  0x3e51cb2fUL, 0x40000000UL, 0x3fd35d30UL, 0x177204fbUL, 0xbe2b8cd7UL,
-  0x80000000UL, 0x3fd335d3UL, 0xfcd38c82UL, 0xbe4356e1UL, 0x80000000UL,
-  0x3fd30e87UL, 0x64f54accUL, 0xbe4e6224UL, 0x00000000UL, 0x3fd2e74cUL,
-  0xaa7975d9UL, 0x3e5dc0feUL, 0x80000000UL, 0x3fd2c021UL, 0x516dab3fUL,
-  0xbe50ffa3UL, 0x40000000UL, 0x3fd29907UL, 0x2bfb7313UL, 0x3e5674a2UL,
-  0xc0000000UL, 0x3fd271fdUL, 0x0549fc99UL, 0x3e385d29UL, 0xc0000000UL,
-  0x3fd24b04UL, 0x55b63073UL, 0xbe500c6dUL, 0x00000000UL, 0x3fd2241cUL,
-  0x3f91953aUL, 0x3e389977UL, 0xc0000000UL, 0x3fd1fd43UL, 0xa1543f71UL,
-  0xbe3487abUL, 0xc0000000UL, 0x3fd1d67bUL, 0x4ec8867cUL, 0x3df6a2dcUL,
-  0x00000000UL, 0x3fd1afc4UL, 0x4328e3bbUL, 0x3e41d9c0UL, 0x80000000UL,
-  0x3fd1891cUL, 0x2e1cda84UL, 0x3e3bdd87UL, 0x40000000UL, 0x3fd16285UL,
-  0x4b5331aeUL, 0xbe53128eUL, 0x00000000UL, 0x3fd13bfeUL, 0xb9aec164UL,
-  0xbe52ac98UL, 0xc0000000UL, 0x3fd11586UL, 0xd91e1316UL, 0xbe350630UL,
-  0x80000000UL, 0x3fd0ef1fUL, 0x7cacc12cUL, 0x3e3f5219UL, 0x40000000UL,
-  0x3fd0c8c8UL, 0xbce277b7UL, 0x3e3d30c0UL, 0x00000000UL, 0x3fd0a281UL,
-  0x2a63447dUL, 0xbe541377UL, 0x80000000UL, 0x3fd07c49UL, 0xfac483b5UL,
-  0xbe5772ecUL, 0xc0000000UL, 0x3fd05621UL, 0x36b8a570UL, 0xbe4fd4bdUL,
-  0xc0000000UL, 0x3fd03009UL, 0xbae505f7UL, 0xbe450388UL, 0x80000000UL,
-  0x3fd00a01UL, 0x3e35aeadUL, 0xbe5430fcUL, 0x80000000UL, 0x3fcfc811UL,
-  0x707475acUL, 0x3e38806eUL, 0x80000000UL, 0x3fcf7c3fUL, 0xc91817fcUL,
-  0xbe40cceaUL, 0x80000000UL, 0x3fcf308cUL, 0xae05d5e9UL, 0xbe4919b8UL,
-  0x80000000UL, 0x3fcee4f8UL, 0xae6cc9e6UL, 0xbe530b94UL, 0x00000000UL,
-  0x3fce9983UL, 0x1efe3e8eUL, 0x3e57747eUL, 0x00000000UL, 0x3fce4e2dUL,
-  0xda78d9bfUL, 0xbe59a608UL, 0x00000000UL, 0x3fce02f5UL, 0x8abe2c2eUL,
-  0x3e4a35adUL, 0x00000000UL, 0x3fcdb7dcUL, 0x1495450dUL, 0xbe0872ccUL,
-  0x80000000UL, 0x3fcd6ce1UL, 0x86ee0ba0UL, 0xbe4f59a0UL, 0x00000000UL,
-  0x3fcd2205UL, 0xe81ca888UL, 0x3e5402c3UL, 0x00000000UL, 0x3fccd747UL,
-  0x3b4424b9UL, 0x3e5dfdc3UL, 0x80000000UL, 0x3fcc8ca7UL, 0xd305b56cUL,
-  0x3e202da6UL, 0x00000000UL, 0x3fcc4226UL, 0x399a6910UL, 0xbe482a1cUL,
-  0x80000000UL, 0x3fcbf7c2UL, 0x747f7938UL, 0xbe587372UL, 0x80000000UL,
-  0x3fcbad7cUL, 0x6fc246a0UL, 0x3e50d83dUL, 0x00000000UL, 0x3fcb6355UL,
-  0xee9e9be5UL, 0xbe5c35bdUL, 0x80000000UL, 0x3fcb194aUL, 0x8416c0bcUL,
-  0x3e546d4fUL, 0x00000000UL, 0x3fcacf5eUL, 0x49f7f08fUL, 0x3e56da76UL,
-  0x00000000UL, 0x3fca858fUL, 0x5dc30de2UL, 0x3e5f390cUL, 0x00000000UL,
-  0x3fca3bdeUL, 0x950583b6UL, 0xbe5e4169UL, 0x80000000UL, 0x3fc9f249UL,
-  0x33631553UL, 0x3e52aeb1UL, 0x00000000UL, 0x3fc9a8d3UL, 0xde8795a6UL,
-  0xbe59a504UL, 0x00000000UL, 0x3fc95f79UL, 0x076bf41eUL, 0x3e5122feUL,
-  0x80000000UL, 0x3fc9163cUL, 0x2914c8e7UL, 0x3e3dd064UL, 0x00000000UL,
-  0x3fc8cd1dUL, 0x3a30eca3UL, 0xbe21b4aaUL, 0x80000000UL, 0x3fc8841aUL,
-  0xb2a96650UL, 0xbe575444UL, 0x80000000UL, 0x3fc83b34UL, 0x2376c0cbUL,
-  0xbe2a74c7UL, 0x80000000UL, 0x3fc7f26bUL, 0xd8a0b653UL, 0xbe5181b6UL,
-  0x00000000UL, 0x3fc7a9bfUL, 0x32257882UL, 0xbe4a78b4UL, 0x00000000UL,
-  0x3fc7612fUL, 0x1eee8bd9UL, 0xbe1bfe9dUL, 0x80000000UL, 0x3fc718bbUL,
-  0x0c603cc4UL, 0x3e36fdc9UL, 0x80000000UL, 0x3fc6d064UL, 0x3728b8cfUL,
-  0xbe1e542eUL, 0x80000000UL, 0x3fc68829UL, 0xc79a4067UL, 0x3e5c380fUL,
-  0x00000000UL, 0x3fc6400bUL, 0xf69eac69UL, 0x3e550a84UL, 0x80000000UL,
-  0x3fc5f808UL, 0xb7a780a4UL, 0x3e5d9224UL, 0x80000000UL, 0x3fc5b022UL,
-  0xad9dfb1eUL, 0xbe55242fUL, 0x00000000UL, 0x3fc56858UL, 0x659b18beUL,
-  0xbe4bfda3UL, 0x80000000UL, 0x3fc520a9UL, 0x66ee3631UL, 0xbe57d769UL,
-  0x80000000UL, 0x3fc4d916UL, 0x1ec62819UL, 0x3e2427f7UL, 0x80000000UL,
-  0x3fc4919fUL, 0xdec25369UL, 0xbe435431UL, 0x00000000UL, 0x3fc44a44UL,
-  0xa8acfc4bUL, 0xbe3c62e8UL, 0x00000000UL, 0x3fc40304UL, 0xcf1d3eabUL,
-  0xbdfba29fUL, 0x80000000UL, 0x3fc3bbdfUL, 0x79aba3eaUL, 0xbdf1b7c8UL,
-  0x80000000UL, 0x3fc374d6UL, 0xb8d186daUL, 0xbe5130cfUL, 0x80000000UL,
-  0x3fc32de8UL, 0x9d74f152UL, 0x3e2285b6UL, 0x00000000UL, 0x3fc2e716UL,
-  0x50ae7ca9UL, 0xbe503920UL, 0x80000000UL, 0x3fc2a05eUL, 0x6caed92eUL,
-  0xbe533924UL, 0x00000000UL, 0x3fc259c2UL, 0x9cb5034eUL, 0xbe510e31UL,
-  0x80000000UL, 0x3fc21340UL, 0x12c4d378UL, 0xbe540b43UL, 0x80000000UL,
-  0x3fc1ccd9UL, 0xcc418706UL, 0x3e59887aUL, 0x00000000UL, 0x3fc1868eUL,
-  0x921f4106UL, 0xbe528e67UL, 0x80000000UL, 0x3fc1405cUL, 0x3969441eUL,
-  0x3e5d8051UL, 0x00000000UL, 0x3fc0fa46UL, 0xd941ef5bUL, 0x3e5f9079UL,
-  0x80000000UL, 0x3fc0b44aUL, 0x5a3e81b2UL, 0xbe567691UL, 0x00000000UL,
-  0x3fc06e69UL, 0x9d66afe7UL, 0xbe4d43fbUL, 0x00000000UL, 0x3fc028a2UL,
-  0x0a92a162UL, 0xbe52f394UL, 0x00000000UL, 0x3fbfc5eaUL, 0x209897e5UL,
-  0x3e529e37UL, 0x00000000UL, 0x3fbf3ac5UL, 0x8458bd7bUL, 0x3e582831UL,
-  0x00000000UL, 0x3fbeafd5UL, 0xb8d8b4b8UL, 0xbe486b4aUL, 0x00000000UL,
-  0x3fbe2518UL, 0xe0a3b7b6UL, 0x3e5bafd2UL, 0x00000000UL, 0x3fbd9a90UL,
-  0x2bf2710eUL, 0x3e383b2bUL, 0x00000000UL, 0x3fbd103cUL, 0x73eb6ab7UL,
-  0xbe56d78dUL, 0x00000000UL, 0x3fbc861bUL, 0x32ceaff5UL, 0xbe32dc5aUL,
-  0x00000000UL, 0x3fbbfc2eUL, 0xbee04cb7UL, 0xbe4a71a4UL, 0x00000000UL,
-  0x3fbb7274UL, 0x35ae9577UL, 0x3e38142fUL, 0x00000000UL, 0x3fbae8eeUL,
-  0xcbaddab4UL, 0xbe5490f0UL, 0x00000000UL, 0x3fba5f9aUL, 0x95ce1114UL,
-  0x3e597c71UL, 0x00000000UL, 0x3fb9d67aUL, 0x6d7c0f78UL, 0x3e3abc2dUL,
-  0x00000000UL, 0x3fb94d8dUL, 0x2841a782UL, 0xbe566cbcUL, 0x00000000UL,
-  0x3fb8c4d2UL, 0x6ed429c6UL, 0xbe3cfff9UL, 0x00000000UL, 0x3fb83c4aUL,
-  0xe4a49fbbUL, 0xbe552964UL, 0x00000000UL, 0x3fb7b3f4UL, 0x2193d81eUL,
-  0xbe42fa72UL, 0x00000000UL, 0x3fb72bd0UL, 0xdd70c122UL, 0x3e527a8cUL,
-  0x00000000UL, 0x3fb6a3dfUL, 0x03108a54UL, 0xbe450393UL, 0x00000000UL,
-  0x3fb61c1fUL, 0x30ff7954UL, 0x3e565840UL, 0x00000000UL, 0x3fb59492UL,
-  0xdedd460cUL, 0xbe5422b5UL, 0x00000000UL, 0x3fb50d36UL, 0x950f9f45UL,
-  0xbe5313f6UL, 0x00000000UL, 0x3fb4860bUL, 0x582cdcb1UL, 0x3e506d39UL,
-  0x00000000UL, 0x3fb3ff12UL, 0x7216d3a6UL, 0x3e4aa719UL, 0x00000000UL,
-  0x3fb3784aUL, 0x57a423fdUL, 0x3e5a9b9fUL, 0x00000000UL, 0x3fb2f1b4UL,
-  0x7a138b41UL, 0xbe50b418UL, 0x00000000UL, 0x3fb26b4eUL, 0x2fbfd7eaUL,
-  0x3e23a53eUL, 0x00000000UL, 0x3fb1e519UL, 0x18913ccbUL, 0x3e465fc1UL,
-  0x00000000UL, 0x3fb15f15UL, 0x7ea24e21UL, 0x3e042843UL, 0x00000000UL,
-  0x3fb0d941UL, 0x7c6d9c77UL, 0x3e59f61eUL, 0x00000000UL, 0x3fb0539eUL,
-  0x114efd44UL, 0x3e4ccab7UL, 0x00000000UL, 0x3faf9c56UL, 0x1777f657UL,
-  0x3e552f65UL, 0x00000000UL, 0x3fae91d2UL, 0xc317b86aUL, 0xbe5a61e0UL,
-  0x00000000UL, 0x3fad87acUL, 0xb7664efbUL, 0xbe41f64eUL, 0x00000000UL,
-  0x3fac7de6UL, 0x5d3d03a9UL, 0x3e0807a0UL, 0x00000000UL, 0x3fab7480UL,
-  0x743c38ebUL, 0xbe3726e1UL, 0x00000000UL, 0x3faa6b78UL, 0x06a253f1UL,
-  0x3e5ad636UL, 0x00000000UL, 0x3fa962d0UL, 0xa35f541bUL, 0x3e5a187aUL,
-  0x00000000UL, 0x3fa85a88UL, 0x4b86e446UL, 0xbe508150UL, 0x00000000UL,
-  0x3fa7529cUL, 0x2589cacfUL, 0x3e52938aUL, 0x00000000UL, 0x3fa64b10UL,
-  0xaf6b11f2UL, 0xbe3454cdUL, 0x00000000UL, 0x3fa543e2UL, 0x97506fefUL,
-  0xbe5fdec5UL, 0x00000000UL, 0x3fa43d10UL, 0xe75f7dd9UL, 0xbe388dd3UL,
-  0x00000000UL, 0x3fa3369cUL, 0xa4139632UL, 0xbdea5177UL, 0x00000000UL,
-  0x3fa23086UL, 0x352d6f1eUL, 0xbe565ad6UL, 0x00000000UL, 0x3fa12accUL,
-  0x77449eb7UL, 0xbe50d5c7UL, 0x00000000UL, 0x3fa0256eUL, 0x7478da78UL,
-  0x3e404724UL, 0x00000000UL, 0x3f9e40dcUL, 0xf59cef7fUL, 0xbe539d0aUL,
-  0x00000000UL, 0x3f9c3790UL, 0x1511d43cUL, 0x3e53c2c8UL, 0x00000000UL,
-  0x3f9a2f00UL, 0x9b8bff3cUL, 0xbe43b3e1UL, 0x00000000UL, 0x3f982724UL,
-  0xad1e22a5UL, 0x3e46f0bdUL, 0x00000000UL, 0x3f962000UL, 0x130d9356UL,
-  0x3e475ba0UL, 0x00000000UL, 0x3f941994UL, 0x8f86f883UL, 0xbe513d0bUL,
-  0x00000000UL, 0x3f9213dcUL, 0x914d0dc8UL, 0xbe534335UL, 0x00000000UL,
-  0x3f900ed8UL, 0x2d73e5e7UL, 0xbe22ba75UL, 0x00000000UL, 0x3f8c1510UL,
-  0xc5b7d70eUL, 0x3e599c5dUL, 0x00000000UL, 0x3f880de0UL, 0x8a27857eUL,
-  0xbe3d28c8UL, 0x00000000UL, 0x3f840810UL, 0xda767328UL, 0x3e531b3dUL,
-  0x00000000UL, 0x3f8003b0UL, 0x77bacaf3UL, 0xbe5f04e3UL, 0x00000000UL,
-  0x3f780150UL, 0xdf4b0720UL, 0x3e5a8bffUL, 0x00000000UL, 0x3f6ffc40UL,
-  0x34c48e71UL, 0xbe3fcd99UL, 0x00000000UL, 0x3f5ff6c0UL, 0x1ad218afUL,
-  0xbe4c78a7UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x80000000UL,
-  0x00000000UL, 0xfffff800UL, 0x00000000UL, 0xfffff800UL, 0x00000000UL,
-  0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL, 0x6dc96112UL, 0xbf836578UL,
-  0xee241472UL, 0xbf9b0301UL, 0x9f95985aUL, 0xbfb528dbUL, 0xb3841d2aUL,
-  0xbfd619b6UL, 0x518775e3UL, 0x3f9004f2UL, 0xac8349bbUL, 0x3fa76c9bUL,
-  0x486ececcUL, 0x3fc4635eUL, 0x161bb241UL, 0xbf5dabe1UL, 0x9f95985aUL,
-  0xbfb528dbUL, 0xf8b5787dUL, 0x3ef2531eUL, 0x486ececbUL, 0x3fc4635eUL,
-  0x412055ccUL, 0xbdd61bb2UL, 0x00000000UL, 0xfffffff8UL, 0x00000000UL,
-  0xffffffffUL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x3b700000UL,
-  0xfa5abcbfUL, 0x3ff00b1aUL, 0xa7609f71UL, 0xbc84f6b2UL, 0xa9fb3335UL,
-  0x3ff0163dUL, 0x9ab8cdb7UL, 0x3c9b6129UL, 0x143b0281UL, 0x3ff02168UL,
-  0x0fc54eb6UL, 0xbc82bf31UL, 0x3e778061UL, 0x3ff02c9aUL, 0x535b085dUL,
-  0xbc719083UL, 0x2e11bbccUL, 0x3ff037d4UL, 0xeeade11aUL, 0x3c656811UL,
-  0xe86e7f85UL, 0x3ff04315UL, 0x1977c96eUL, 0xbc90a31cUL, 0x72f654b1UL,
-  0x3ff04e5fUL, 0x3aa0d08cUL, 0x3c84c379UL, 0xd3158574UL, 0x3ff059b0UL,
-  0xa475b465UL, 0x3c8d73e2UL, 0x0e3c1f89UL, 0x3ff0650aUL, 0x5799c397UL,
-  0xbc95cb7bUL, 0x29ddf6deUL, 0x3ff0706bUL, 0xe2b13c27UL, 0xbc8c91dfUL,
-  0x2b72a836UL, 0x3ff07bd4UL, 0x54458700UL, 0x3c832334UL, 0x18759bc8UL,
-  0x3ff08745UL, 0x4bb284ffUL, 0x3c6186beUL, 0xf66607e0UL, 0x3ff092bdUL,
-  0x800a3fd1UL, 0xbc968063UL, 0xcac6f383UL, 0x3ff09e3eUL, 0x18316136UL,
-  0x3c914878UL, 0x9b1f3919UL, 0x3ff0a9c7UL, 0x873d1d38UL, 0x3c85d16cUL,
-  0x6cf9890fUL, 0x3ff0b558UL, 0x4adc610bUL, 0x3c98a62eUL, 0x45e46c85UL,
-  0x3ff0c0f1UL, 0x06d21cefUL, 0x3c94f989UL, 0x2b7247f7UL, 0x3ff0cc92UL,
-  0x16e24f71UL, 0x3c901edcUL, 0x23395decUL, 0x3ff0d83bUL, 0xe43f316aUL,
-  0xbc9bc14dUL, 0x32d3d1a2UL, 0x3ff0e3ecUL, 0x27c57b52UL, 0x3c403a17UL,
-  0x5fdfa9c5UL, 0x3ff0efa5UL, 0xbc54021bUL, 0xbc949db9UL, 0xaffed31bUL,
-  0x3ff0fb66UL, 0xc44ebd7bUL, 0xbc6b9bedUL, 0x28d7233eUL, 0x3ff10730UL,
-  0x1692fdd5UL, 0x3c8d46ebUL, 0xd0125b51UL, 0x3ff11301UL, 0x39449b3aUL,
-  0xbc96c510UL, 0xab5e2ab6UL, 0x3ff11edbUL, 0xf703fb72UL, 0xbc9ca454UL,
-  0xc06c31ccUL, 0x3ff12abdUL, 0xb36ca5c7UL, 0xbc51b514UL, 0x14f204abUL,
-  0x3ff136a8UL, 0xba48dcf0UL, 0xbc67108fUL, 0xaea92de0UL, 0x3ff1429aUL,
-  0x9af1369eUL, 0xbc932fbfUL, 0x934f312eUL, 0x3ff14e95UL, 0x39bf44abUL,
-  0xbc8b91e8UL, 0xc8a58e51UL, 0x3ff15a98UL, 0xb9eeab0aUL, 0x3c82406aUL,
-  0x5471c3c2UL, 0x3ff166a4UL, 0x82ea1a32UL, 0x3c58f23bUL, 0x3c7d517bUL,
-  0x3ff172b8UL, 0xb9d78a76UL, 0xbc819041UL, 0x8695bbc0UL, 0x3ff17ed4UL,
-  0xe2ac5a64UL, 0x3c709e3fUL, 0x388c8deaUL, 0x3ff18af9UL, 0xd1970f6cUL,
-  0xbc911023UL, 0x58375d2fUL, 0x3ff19726UL, 0x85f17e08UL, 0x3c94aaddUL,
-  0xeb6fcb75UL, 0x3ff1a35bUL, 0x7b4968e4UL, 0x3c8e5b4cUL, 0xf8138a1cUL,
-  0x3ff1af99UL, 0xa4b69280UL, 0x3c97bf85UL, 0x84045cd4UL, 0x3ff1bbe0UL,
-  0x352ef607UL, 0xbc995386UL, 0x95281c6bUL, 0x3ff1c82fUL, 0x8010f8c9UL,
-  0x3c900977UL, 0x3168b9aaUL, 0x3ff1d487UL, 0x00a2643cUL, 0x3c9e016eUL,
-  0x5eb44027UL, 0x3ff1e0e7UL, 0x088cb6deUL, 0xbc96fdd8UL, 0x22fcd91dUL,
-  0x3ff1ed50UL, 0x027bb78cUL, 0xbc91df98UL, 0x8438ce4dUL, 0x3ff1f9c1UL,
-  0xa097af5cUL, 0xbc9bf524UL, 0x88628cd6UL, 0x3ff2063bUL, 0x814a8495UL,
-  0x3c8dc775UL, 0x3578a819UL, 0x3ff212beUL, 0x2cfcaac9UL, 0x3c93592dUL,
-  0x917ddc96UL, 0x3ff21f49UL, 0x9494a5eeUL, 0x3c82a97eUL, 0xa27912d1UL,
-  0x3ff22bddUL, 0x5577d69fUL, 0x3c8d34fbUL, 0x6e756238UL, 0x3ff2387aUL,
-  0xb6c70573UL, 0x3c99b07eUL, 0xfb82140aUL, 0x3ff2451fUL, 0x911ca996UL,
-  0x3c8acfccUL, 0x4fb2a63fUL, 0x3ff251ceUL, 0xbef4f4a4UL, 0x3c8ac155UL,
-  0x711ece75UL, 0x3ff25e85UL, 0x4ac31b2cUL, 0x3c93e1a2UL, 0x65e27cddUL,
-  0x3ff26b45UL, 0x9940e9d9UL, 0x3c82bd33UL, 0x341ddf29UL, 0x3ff2780eUL,
-  0x05f9e76cUL, 0x3c9e067cUL, 0xe1f56381UL, 0x3ff284dfUL, 0x8c3f0d7eUL,
-  0xbc9a4c3aUL, 0x7591bb70UL, 0x3ff291baUL, 0x28401cbdUL, 0xbc82cc72UL,
-  0xf51fdee1UL, 0x3ff29e9dUL, 0xafad1255UL, 0x3c8612e8UL, 0x66d10f13UL,
-  0x3ff2ab8aUL, 0x191690a7UL, 0xbc995743UL, 0xd0dad990UL, 0x3ff2b87fUL,
-  0xd6381aa4UL, 0xbc410adcUL, 0x39771b2fUL, 0x3ff2c57eUL, 0xa6eb5124UL,
-  0xbc950145UL, 0xa6e4030bUL, 0x3ff2d285UL, 0x54db41d5UL, 0x3c900247UL,
-  0x1f641589UL, 0x3ff2df96UL, 0xfbbce198UL, 0x3c9d16cfUL, 0xa93e2f56UL,
-  0x3ff2ecafUL, 0x45d52383UL, 0x3c71ca0fUL, 0x4abd886bUL, 0x3ff2f9d2UL,
-  0x532bda93UL, 0xbc653c55UL, 0x0a31b715UL, 0x3ff306feUL, 0xd23182e4UL,
-  0x3c86f46aUL, 0xedeeb2fdUL, 0x3ff31432UL, 0xf3f3fcd1UL, 0x3c8959a3UL,
-  0xfc4cd831UL, 0x3ff32170UL, 0x8e18047cUL, 0x3c8a9ce7UL, 0x3ba8ea32UL,
-  0x3ff32eb8UL, 0x3cb4f318UL, 0xbc9c45e8UL, 0xb26416ffUL, 0x3ff33c08UL,
-  0x843659a6UL, 0x3c932721UL, 0x66e3fa2dUL, 0x3ff34962UL, 0x930881a4UL,
-  0xbc835a75UL, 0x5f929ff1UL, 0x3ff356c5UL, 0x5c4e4628UL, 0xbc8b5ceeUL,
-  0xa2de883bUL, 0x3ff36431UL, 0xa06cb85eUL, 0xbc8c3144UL, 0x373aa9cbUL,
-  0x3ff371a7UL, 0xbf42eae2UL, 0xbc963aeaUL, 0x231e754aUL, 0x3ff37f26UL,
-  0x9eceb23cUL, 0xbc99f5caUL, 0x6d05d866UL, 0x3ff38caeUL, 0x3c9904bdUL,
-  0xbc9e958dUL, 0x1b7140efUL, 0x3ff39a40UL, 0xfc8e2934UL, 0xbc99a9a5UL,
-  0x34e59ff7UL, 0x3ff3a7dbUL, 0xd661f5e3UL, 0xbc75e436UL, 0xbfec6cf4UL,
-  0x3ff3b57fUL, 0xe26fff18UL, 0x3c954c66UL, 0xc313a8e5UL, 0x3ff3c32dUL,
-  0x375d29c3UL, 0xbc9efff8UL, 0x44ede173UL, 0x3ff3d0e5UL, 0x8c284c71UL,
-  0x3c7fe8d0UL, 0x4c123422UL, 0x3ff3dea6UL, 0x11f09ebcUL, 0x3c8ada09UL,
-  0xdf1c5175UL, 0x3ff3ec70UL, 0x7b8c9bcaUL, 0xbc8af663UL, 0x04ac801cUL,
-  0x3ff3fa45UL, 0xf956f9f3UL, 0xbc97d023UL, 0xc367a024UL, 0x3ff40822UL,
-  0xb6f4d048UL, 0x3c8bddf8UL, 0x21f72e2aUL, 0x3ff4160aUL, 0x1c309278UL,
-  0xbc5ef369UL, 0x2709468aUL, 0x3ff423fbUL, 0xc0b314ddUL, 0xbc98462dUL,
-  0xd950a897UL, 0x3ff431f5UL, 0xe35f7999UL, 0xbc81c7ddUL, 0x3f84b9d4UL,
-  0x3ff43ffaUL, 0x9704c003UL, 0x3c8880beUL, 0x6061892dUL, 0x3ff44e08UL,
-  0x04ef80d0UL, 0x3c489b7aUL, 0x42a7d232UL, 0x3ff45c20UL, 0x82fb1f8eUL,
-  0xbc686419UL, 0xed1d0057UL, 0x3ff46a41UL, 0xd1648a76UL, 0x3c9c944bUL,
-  0x668b3237UL, 0x3ff4786dUL, 0xed445733UL, 0xbc9c20f0UL, 0xb5c13cd0UL,
-  0x3ff486a2UL, 0xb69062f0UL, 0x3c73c1a3UL, 0xe192aed2UL, 0x3ff494e1UL,
-  0x5e499ea0UL, 0xbc83b289UL, 0xf0d7d3deUL, 0x3ff4a32aUL, 0xf3d1be56UL,
-  0x3c99cb62UL, 0xea6db7d7UL, 0x3ff4b17dUL, 0x7f2897f0UL, 0xbc8125b8UL,
-  0xd5362a27UL, 0x3ff4bfdaUL, 0xafec42e2UL, 0x3c7d4397UL, 0xb817c114UL,
-  0x3ff4ce41UL, 0x690abd5dUL, 0x3c905e29UL, 0x99fddd0dUL, 0x3ff4dcb2UL,
-  0xbc6a7833UL, 0x3c98ecdbUL, 0x81d8abffUL, 0x3ff4eb2dUL, 0x2e5d7a52UL,
-  0xbc95257dUL, 0x769d2ca7UL, 0x3ff4f9b2UL, 0xd25957e3UL, 0xbc94b309UL,
-  0x7f4531eeUL, 0x3ff50841UL, 0x49b7465fUL, 0x3c7a249bUL, 0xa2cf6642UL,
-  0x3ff516daUL, 0x69bd93efUL, 0xbc8f7685UL, 0xe83f4eefUL, 0x3ff5257dUL,
-  0x43efef71UL, 0xbc7c998dUL, 0x569d4f82UL, 0x3ff5342bUL, 0x1db13cadUL,
-  0xbc807abeUL, 0xf4f6ad27UL, 0x3ff542e2UL, 0x192d5f7eUL, 0x3c87926dUL,
-  0xca5d920fUL, 0x3ff551a4UL, 0xefede59bUL, 0xbc8d689cUL, 0xdde910d2UL,
-  0x3ff56070UL, 0x168eebf0UL, 0xbc90fb6eUL, 0x36b527daUL, 0x3ff56f47UL,
-  0x011d93adUL, 0x3c99bb2cUL, 0xdbe2c4cfUL, 0x3ff57e27UL, 0x8a57b9c4UL,
-  0xbc90b98cUL, 0xd497c7fdUL, 0x3ff58d12UL, 0x5b9a1de8UL, 0x3c8295e1UL,
-  0x27ff07ccUL, 0x3ff59c08UL, 0xe467e60fUL, 0xbc97e2ceUL, 0xdd485429UL,
-  0x3ff5ab07UL, 0x054647adUL, 0x3c96324cUL, 0xfba87a03UL, 0x3ff5ba11UL,
-  0x4c233e1aUL, 0xbc9b77a1UL, 0x8a5946b7UL, 0x3ff5c926UL, 0x816986a2UL,
-  0x3c3c4b1bUL, 0x90998b93UL, 0x3ff5d845UL, 0xa8b45643UL, 0xbc9cd6a7UL,
-  0x15ad2148UL, 0x3ff5e76fUL, 0x3080e65eUL, 0x3c9ba6f9UL, 0x20dceb71UL,
-  0x3ff5f6a3UL, 0xe3cdcf92UL, 0xbc89eaddUL, 0xb976dc09UL, 0x3ff605e1UL,
-  0x9b56de47UL, 0xbc93e242UL, 0xe6cdf6f4UL, 0x3ff6152aUL, 0x4ab84c27UL,
-  0x3c9e4b3eUL, 0xb03a5585UL, 0x3ff6247eUL, 0x7e40b497UL, 0xbc9383c1UL,
-  0x1d1929fdUL, 0x3ff633ddUL, 0xbeb964e5UL, 0x3c984710UL, 0x34ccc320UL,
-  0x3ff64346UL, 0x759d8933UL, 0xbc8c483cUL, 0xfebc8fb7UL, 0x3ff652b9UL,
-  0xc9a73e09UL, 0xbc9ae3d5UL, 0x82552225UL, 0x3ff66238UL, 0x87591c34UL,
-  0xbc9bb609UL, 0xc70833f6UL, 0x3ff671c1UL, 0x586c6134UL, 0xbc8e8732UL,
-  0xd44ca973UL, 0x3ff68155UL, 0x44f73e65UL, 0x3c6038aeUL, 0xb19e9538UL,
-  0x3ff690f4UL, 0x9aeb445dUL, 0x3c8804bdUL, 0x667f3bcdUL, 0x3ff6a09eUL,
-  0x13b26456UL, 0xbc9bdd34UL, 0xfa75173eUL, 0x3ff6b052UL, 0x2c9a9d0eUL,
-  0x3c7a38f5UL, 0x750bdabfUL, 0x3ff6c012UL, 0x67ff0b0dUL, 0xbc728956UL,
-  0xddd47645UL, 0x3ff6cfdcUL, 0xb6f17309UL, 0x3c9c7aa9UL, 0x3c651a2fUL,
-  0x3ff6dfb2UL, 0x683c88abUL, 0xbc6bbe3aUL, 0x98593ae5UL, 0x3ff6ef92UL,
-  0x9e1ac8b2UL, 0xbc90b974UL, 0xf9519484UL, 0x3ff6ff7dUL, 0x25860ef6UL,
-  0xbc883c0fUL, 0x66f42e87UL, 0x3ff70f74UL, 0xd45aa65fUL, 0x3c59d644UL,
-  0xe8ec5f74UL, 0x3ff71f75UL, 0x86887a99UL, 0xbc816e47UL, 0x86ead08aUL,
-  0x3ff72f82UL, 0x2cd62c72UL, 0xbc920aa0UL, 0x48a58174UL, 0x3ff73f9aUL,
-  0x6c65d53cUL, 0xbc90a8d9UL, 0x35d7cbfdUL, 0x3ff74fbdUL, 0x618a6e1cUL,
-  0x3c9047fdUL, 0x564267c9UL, 0x3ff75febUL, 0x57316dd3UL, 0xbc902459UL,
-  0xb1ab6e09UL, 0x3ff77024UL, 0x169147f8UL, 0x3c9b7877UL, 0x4fde5d3fUL,
-  0x3ff78069UL, 0x0a02162dUL, 0x3c9866b8UL, 0x38ac1cf6UL, 0x3ff790b9UL,
-  0x62aadd3eUL, 0x3c9349a8UL, 0x73eb0187UL, 0x3ff7a114UL, 0xee04992fUL,
-  0xbc841577UL, 0x0976cfdbUL, 0x3ff7b17bUL, 0x8468dc88UL, 0xbc9bebb5UL,
-  0x0130c132UL, 0x3ff7c1edUL, 0xd1164dd6UL, 0x3c9f124cUL, 0x62ff86f0UL,
-  0x3ff7d26aUL, 0xfb72b8b4UL, 0x3c91bddbUL, 0x36cf4e62UL, 0x3ff7e2f3UL,
-  0xba15797eUL, 0x3c705d02UL, 0x8491c491UL, 0x3ff7f387UL, 0xcf9311aeUL,
-  0xbc807f11UL, 0x543e1a12UL, 0x3ff80427UL, 0x626d972bUL, 0xbc927c86UL,
-  0xadd106d9UL, 0x3ff814d2UL, 0x0d151d4dUL, 0x3c946437UL, 0x994cce13UL,
-  0x3ff82589UL, 0xd41532d8UL, 0xbc9d4c1dUL, 0x1eb941f7UL, 0x3ff8364cUL,
-  0x31df2bd5UL, 0x3c999b9aUL, 0x4623c7adUL, 0x3ff8471aUL, 0xa341cdfbUL,
-  0xbc88d684UL, 0x179f5b21UL, 0x3ff857f4UL, 0xf8b216d0UL, 0xbc5ba748UL,
-  0x9b4492edUL, 0x3ff868d9UL, 0x9bd4f6baUL, 0xbc9fc6f8UL, 0xd931a436UL,
-  0x3ff879caUL, 0xd2db47bdUL, 0x3c85d2d7UL, 0xd98a6699UL, 0x3ff88ac7UL,
-  0xf37cb53aUL, 0x3c9994c2UL, 0xa478580fUL, 0x3ff89bd0UL, 0x4475202aUL,
-  0x3c9d5395UL, 0x422aa0dbUL, 0x3ff8ace5UL, 0x56864b27UL, 0x3c96e9f1UL,
-  0xbad61778UL, 0x3ff8be05UL, 0xfc43446eUL, 0x3c9ecb5eUL, 0x16b5448cUL,
-  0x3ff8cf32UL, 0x32e9e3aaUL, 0xbc70d55eUL, 0x5e0866d9UL, 0x3ff8e06aUL,
-  0x6fc9b2e6UL, 0xbc97114aUL, 0x99157736UL, 0x3ff8f1aeUL, 0xa2e3976cUL,
-  0x3c85cc13UL, 0xd0282c8aUL, 0x3ff902feUL, 0x85fe3fd2UL, 0x3c9592caUL,
-  0x0b91ffc6UL, 0x3ff9145bUL, 0x2e582524UL, 0xbc9dd679UL, 0x53aa2fe2UL,
-  0x3ff925c3UL, 0xa639db7fUL, 0xbc83455fUL, 0xb0cdc5e5UL, 0x3ff93737UL,
-  0x81b57ebcUL, 0xbc675fc7UL, 0x2b5f98e5UL, 0x3ff948b8UL, 0x797d2d99UL,
-  0xbc8dc3d6UL, 0xcbc8520fUL, 0x3ff95a44UL, 0x96a5f039UL, 0xbc764b7cUL,
-  0x9a7670b3UL, 0x3ff96bddUL, 0x7f19c896UL, 0xbc5ba596UL, 0x9fde4e50UL,
-  0x3ff97d82UL, 0x7c1b85d1UL, 0xbc9d185bUL, 0xe47a22a2UL, 0x3ff98f33UL,
-  0xa24c78ecUL, 0x3c7cabdaUL, 0x70ca07baUL, 0x3ff9a0f1UL, 0x91cee632UL,
-  0xbc9173bdUL, 0x4d53fe0dUL, 0x3ff9b2bbUL, 0x4df6d518UL, 0xbc9dd84eUL,
-  0x82a3f090UL, 0x3ff9c491UL, 0xb071f2beUL, 0x3c7c7c46UL, 0x194bb8d5UL,
-  0x3ff9d674UL, 0xa3dd8233UL, 0xbc9516beUL, 0x19e32323UL, 0x3ff9e863UL,
-  0x78e64c6eUL, 0x3c7824caUL, 0x8d07f29eUL, 0x3ff9fa5eUL, 0xaaf1faceUL,
-  0xbc84a9ceUL, 0x7b5de565UL, 0x3ffa0c66UL, 0x5d1cd533UL, 0xbc935949UL,
-  0xed8eb8bbUL, 0x3ffa1e7aUL, 0xee8be70eUL, 0x3c9c6618UL, 0xec4a2d33UL,
-  0x3ffa309bUL, 0x7ddc36abUL, 0x3c96305cUL, 0x80460ad8UL, 0x3ffa42c9UL,
-  0x589fb120UL, 0xbc9aa780UL, 0xb23e255dUL, 0x3ffa5503UL, 0xdb8d41e1UL,
-  0xbc9d2f6eUL, 0x8af46052UL, 0x3ffa674aUL, 0x30670366UL, 0x3c650f56UL,
-  0x1330b358UL, 0x3ffa799eUL, 0xcac563c7UL, 0x3c9bcb7eUL, 0x53c12e59UL,
-  0x3ffa8bfeUL, 0xb2ba15a9UL, 0xbc94f867UL, 0x5579fdbfUL, 0x3ffa9e6bUL,
-  0x0ef7fd31UL, 0x3c90fac9UL, 0x21356ebaUL, 0x3ffab0e5UL, 0xdae94545UL,
-  0x3c889c31UL, 0xbfd3f37aUL, 0x3ffac36bUL, 0xcae76cd0UL, 0xbc8f9234UL,
-  0x3a3c2774UL, 0x3ffad5ffUL, 0xb6b1b8e5UL, 0x3c97ef3bUL, 0x995ad3adUL,
-  0x3ffae89fUL, 0x345dcc81UL, 0x3c97a1cdUL, 0xe622f2ffUL, 0x3ffafb4cUL,
-  0x0f315ecdUL, 0xbc94b2fcUL, 0x298db666UL, 0x3ffb0e07UL, 0x4c80e425UL,
-  0xbc9bdef5UL, 0x6c9a8952UL, 0x3ffb20ceUL, 0x4a0756ccUL, 0x3c94dd02UL,
-  0xb84f15fbUL, 0x3ffb33a2UL, 0x3084d708UL, 0xbc62805eUL, 0x15b749b1UL,
-  0x3ffb4684UL, 0xe9df7c90UL, 0xbc7f763dUL, 0x8de5593aUL, 0x3ffb5972UL,
-  0xbbba6de3UL, 0xbc9c71dfUL, 0x29f1c52aUL, 0x3ffb6c6eUL, 0x52883f6eUL,
-  0x3c92a8f3UL, 0xf2fb5e47UL, 0x3ffb7f76UL, 0x7e54ac3bUL, 0xbc75584fUL,
-  0xf22749e4UL, 0x3ffb928cUL, 0x54cb65c6UL, 0xbc9b7216UL, 0x30a1064aUL,
-  0x3ffba5b0UL, 0x0e54292eUL, 0xbc9efcd3UL, 0xb79a6f1fUL, 0x3ffbb8e0UL,
-  0xc9696205UL, 0xbc3f52d1UL, 0x904bc1d2UL, 0x3ffbcc1eUL, 0x7a2d9e84UL,
-  0x3c823dd0UL, 0xc3f3a207UL, 0x3ffbdf69UL, 0x60ea5b53UL, 0xbc3c2623UL,
-  0x5bd71e09UL, 0x3ffbf2c2UL, 0x3f6b9c73UL, 0xbc9efdcaUL, 0x6141b33dUL,
-  0x3ffc0628UL, 0xa1fbca34UL, 0xbc8d8a5aUL, 0xdd85529cUL, 0x3ffc199bUL,
-  0x895048ddUL, 0x3c811065UL, 0xd9fa652cUL, 0x3ffc2d1cUL, 0x17c8a5d7UL,
-  0xbc96e516UL, 0x5fffd07aUL, 0x3ffc40abUL, 0xe083c60aUL, 0x3c9b4537UL,
-  0x78fafb22UL, 0x3ffc5447UL, 0x2493b5afUL, 0x3c912f07UL, 0x2e57d14bUL,
-  0x3ffc67f1UL, 0xff483cadUL, 0x3c92884dUL, 0x8988c933UL, 0x3ffc7ba8UL,
-  0xbe255559UL, 0xbc8e76bbUL, 0x9406e7b5UL, 0x3ffc8f6dUL, 0x48805c44UL,
-  0x3c71acbcUL, 0x5751c4dbUL, 0x3ffca340UL, 0xd10d08f5UL, 0xbc87f2beUL,
-  0xdcef9069UL, 0x3ffcb720UL, 0xd1e949dbUL, 0x3c7503cbUL, 0x2e6d1675UL,
-  0x3ffccb0fUL, 0x86009092UL, 0xbc7d220fUL, 0x555dc3faUL, 0x3ffcdf0bUL,
-  0x53829d72UL, 0xbc8dd83bUL, 0x5b5bab74UL, 0x3ffcf315UL, 0xb86dff57UL,
-  0xbc9a08e9UL, 0x4a07897cUL, 0x3ffd072dUL, 0x43797a9cUL, 0xbc9cbc37UL,
-  0x2b08c968UL, 0x3ffd1b53UL, 0x219a36eeUL, 0x3c955636UL, 0x080d89f2UL,
-  0x3ffd2f87UL, 0x719d8578UL, 0xbc9d487bUL, 0xeacaa1d6UL, 0x3ffd43c8UL,
-  0xbf5a1614UL, 0x3c93db53UL, 0xdcfba487UL, 0x3ffd5818UL, 0xd75b3707UL,
-  0x3c82ed02UL, 0xe862e6d3UL, 0x3ffd6c76UL, 0x4a8165a0UL, 0x3c5fe87aUL,
-  0x16c98398UL, 0x3ffd80e3UL, 0x8beddfe8UL, 0xbc911ec1UL, 0x71ff6075UL,
-  0x3ffd955dUL, 0xbb9af6beUL, 0x3c9a052dUL, 0x03db3285UL, 0x3ffda9e6UL,
-  0x696db532UL, 0x3c9c2300UL, 0xd63a8315UL, 0x3ffdbe7cUL, 0x926b8be4UL,
-  0xbc9b76f1UL, 0xf301b460UL, 0x3ffdd321UL, 0x78f018c3UL, 0x3c92da57UL,
-  0x641c0658UL, 0x3ffde7d5UL, 0x8e79ba8fUL, 0xbc9ca552UL, 0x337b9b5fUL,
-  0x3ffdfc97UL, 0x4f184b5cUL, 0xbc91a5cdUL, 0x6b197d17UL, 0x3ffe1167UL,
-  0xbd5c7f44UL, 0xbc72b529UL, 0x14f5a129UL, 0x3ffe2646UL, 0x817a1496UL,
-  0xbc97b627UL, 0x3b16ee12UL, 0x3ffe3b33UL, 0x31fdc68bUL, 0xbc99f4a4UL,
-  0xe78b3ff6UL, 0x3ffe502eUL, 0x80a9cc8fUL, 0x3c839e89UL, 0x24676d76UL,
-  0x3ffe6539UL, 0x7522b735UL, 0xbc863ff8UL, 0xfbc74c83UL, 0x3ffe7a51UL,
-  0xca0c8de2UL, 0x3c92d522UL, 0x77cdb740UL, 0x3ffe8f79UL, 0x80b054b1UL,
-  0xbc910894UL, 0xa2a490daUL, 0x3ffea4afUL, 0x179c2893UL, 0xbc9e9c23UL,
-  0x867cca6eUL, 0x3ffeb9f4UL, 0x2293e4f2UL, 0x3c94832fUL, 0x2d8e67f1UL,
-  0x3ffecf48UL, 0xb411ad8cUL, 0xbc9c93f3UL, 0xa2188510UL, 0x3ffee4aaUL,
-  0xa487568dUL, 0x3c91c68dUL, 0xee615a27UL, 0x3ffefa1bUL, 0x86a4b6b0UL,
-  0x3c9dc7f4UL, 0x1cb6412aUL, 0x3fff0f9cUL, 0x65181d45UL, 0xbc932200UL,
-  0x376bba97UL, 0x3fff252bUL, 0xbf0d8e43UL, 0x3c93a1a5UL, 0x48dd7274UL,
-  0x3fff3ac9UL, 0x3ed837deUL, 0xbc795a5aUL, 0x5b6e4540UL, 0x3fff5076UL,
-  0x2dd8a18bUL, 0x3c99d3e1UL, 0x798844f8UL, 0x3fff6632UL, 0x3539343eUL,
-  0x3c9fa37bUL, 0xad9cbe14UL, 0x3fff7bfdUL, 0xd006350aUL, 0xbc9dbb12UL,
-  0x02243c89UL, 0x3fff91d8UL, 0xa779f689UL, 0xbc612ea8UL, 0x819e90d8UL,
-  0x3fffa7c1UL, 0xf3a5931eUL, 0x3c874853UL, 0x3692d514UL, 0x3fffbdbaUL,
-  0x15098eb6UL, 0xbc796773UL, 0x2b8f71f1UL, 0x3fffd3c2UL, 0x966579e7UL,
-  0x3c62eb74UL, 0x6b2a23d9UL, 0x3fffe9d9UL, 0x7442fde3UL, 0x3c74a603UL,
-  0xe78a6731UL, 0x3f55d87fUL, 0xd704a0c0UL, 0x3fac6b08UL, 0x6fba4e77UL,
-  0x3f83b2abUL, 0xff82c58fUL, 0x3fcebfbdUL, 0xfefa39efUL, 0x3fe62e42UL,
-  0x00000000UL, 0x00000000UL, 0xfefa39efUL, 0x3fe62e42UL, 0xfefa39efUL,
-  0xbfe62e42UL, 0xf8000000UL, 0xffffffffUL, 0xf8000000UL, 0xffffffffUL,
-  0x00000000UL, 0x80000000UL, 0x00000000UL, 0x00000000UL
-
-};
-
-//registers,
-// input: xmm0, xmm1
-// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
-//          eax, edx, ecx, ebx
-
-// Code generated by Intel C compiler for LIBM library
-
-void MacroAssembler::fast_pow(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
-  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
-  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
-  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
-  Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, L_2TAG_PACKET_14_0_2, L_2TAG_PACKET_15_0_2;
-  Label L_2TAG_PACKET_16_0_2, L_2TAG_PACKET_17_0_2, L_2TAG_PACKET_18_0_2, L_2TAG_PACKET_19_0_2;
-  Label L_2TAG_PACKET_20_0_2, L_2TAG_PACKET_21_0_2, L_2TAG_PACKET_22_0_2, L_2TAG_PACKET_23_0_2;
-  Label L_2TAG_PACKET_24_0_2, L_2TAG_PACKET_25_0_2, L_2TAG_PACKET_26_0_2, L_2TAG_PACKET_27_0_2;
-  Label L_2TAG_PACKET_28_0_2, L_2TAG_PACKET_29_0_2, L_2TAG_PACKET_30_0_2, L_2TAG_PACKET_31_0_2;
-  Label L_2TAG_PACKET_32_0_2, L_2TAG_PACKET_33_0_2, L_2TAG_PACKET_34_0_2, L_2TAG_PACKET_35_0_2;
-  Label L_2TAG_PACKET_36_0_2, L_2TAG_PACKET_37_0_2, L_2TAG_PACKET_38_0_2, L_2TAG_PACKET_39_0_2;
-  Label L_2TAG_PACKET_40_0_2, L_2TAG_PACKET_41_0_2, L_2TAG_PACKET_42_0_2, L_2TAG_PACKET_43_0_2;
-  Label L_2TAG_PACKET_44_0_2, L_2TAG_PACKET_45_0_2, L_2TAG_PACKET_46_0_2, L_2TAG_PACKET_47_0_2;
-  Label L_2TAG_PACKET_48_0_2, L_2TAG_PACKET_49_0_2, L_2TAG_PACKET_50_0_2, L_2TAG_PACKET_51_0_2;
-  Label L_2TAG_PACKET_52_0_2, L_2TAG_PACKET_53_0_2, L_2TAG_PACKET_54_0_2, L_2TAG_PACKET_55_0_2;
-  Label L_2TAG_PACKET_56_0_2, L_2TAG_PACKET_57_0_2, L_2TAG_PACKET_58_0_2, start;
-
-  assert_different_registers(tmp, eax, ecx, edx);
-
-  address static_const_table_pow = (address)_static_const_table_pow;
-
-  bind(start);
-  subl(rsp, 120);
-  movl(Address(rsp, 64), tmp);
-  lea(tmp, ExternalAddress(static_const_table_pow));
-  movsd(xmm0, Address(rsp, 128));
-  movsd(xmm1, Address(rsp, 136));
-  xorpd(xmm2, xmm2);
-  movl(eax, 16368);
-  pinsrw(xmm2, eax, 3);
-  movl(ecx, 1069088768);
-  movdl(xmm7, ecx);
-  movsd(Address(rsp, 16), xmm1);
-  xorpd(xmm1, xmm1);
-  movl(edx, 30704);
-  pinsrw(xmm1, edx, 3);
-  movsd(Address(rsp, 8), xmm0);
-  movdqu(xmm3, xmm0);
-  movl(edx, 8192);
-  movdl(xmm4, edx);
-  movdqu(xmm6, Address(tmp, 8240));
-  pextrw(eax, xmm0, 3);
-  por(xmm0, xmm2);
-  psllq(xmm0, 5);
-  movsd(xmm2, Address(tmp, 8256));
-  psrlq(xmm0, 34);
-  movl(edx, eax);
-  andl(edx, 32752);
-  subl(edx, 16368);
-  movl(ecx, edx);
-  sarl(edx, 31);
-  addl(ecx, edx);
-  xorl(ecx, edx);
-  rcpss(xmm0, xmm0);
-  psllq(xmm3, 12);
-  addl(ecx, 16);
-  bsrl(ecx, ecx);
-  psrlq(xmm3, 12);
-  movl(Address(rsp, 24), rsi);
-  subl(eax, 16);
-  cmpl(eax, 32736);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
-  movl(rsi, 0);
-
-  bind(L_2TAG_PACKET_1_0_2);
-  mulss(xmm0, xmm7);
-  movl(edx, -1);
-  subl(ecx, 4);
-  shll(edx);
-  movdl(xmm5, edx);
-  por(xmm3, xmm1);
-  subl(eax, 16351);
-  cmpl(eax, 1);
-  jcc(Assembler::belowEqual, L_2TAG_PACKET_2_0_2);
-  paddd(xmm0, xmm4);
-  psllq(xmm5, 32);
-  movdl(edx, xmm0);
-  psllq(xmm0, 29);
-  pand(xmm5, xmm3);
-
-  bind(L_2TAG_PACKET_3_0_2);
-  pand(xmm0, xmm6);
-  subsd(xmm3, xmm5);
-  subl(eax, 1);
-  sarl(eax, 4);
-  cvtsi2sdl(xmm7, eax);
-  mulpd(xmm5, xmm0);
-
-  bind(L_2TAG_PACKET_4_0_2);
-  mulsd(xmm3, xmm0);
-  movdqu(xmm1, Address(tmp, 8272));
-  subsd(xmm5, xmm2);
-  movdqu(xmm4, Address(tmp, 8288));
-  movl(ecx, eax);
-  sarl(eax, 31);
-  addl(ecx, eax);
-  xorl(eax, ecx);
-  addl(eax, 1);
-  bsrl(eax, eax);
-  unpcklpd(xmm5, xmm3);
-  movdqu(xmm6, Address(tmp, 8304));
-  addsd(xmm3, xmm5);
-  andl(edx, 16760832);
-  shrl(edx, 10);
-  addpd(xmm5, Address(tmp, edx, Address::times_1, -3616));
-  movdqu(xmm0, Address(tmp, 8320));
-  pshufd(xmm2, xmm3, 68);
-  mulsd(xmm3, xmm3);
-  mulpd(xmm1, xmm2);
-  mulpd(xmm4, xmm2);
-  addsd(xmm5, xmm7);
-  mulsd(xmm2, xmm3);
-  addpd(xmm6, xmm1);
-  mulsd(xmm3, xmm3);
-  addpd(xmm0, xmm4);
-  movsd(xmm1, Address(rsp, 16));
-  movzwl(ecx, Address(rsp, 22));
-  pshufd(xmm7, xmm5, 238);
-  movsd(xmm4, Address(tmp, 8368));
-  mulpd(xmm6, xmm2);
-  pshufd(xmm3, xmm3, 68);
-  mulpd(xmm0, xmm2);
-  shll(eax, 4);
-  subl(eax, 15872);
-  andl(ecx, 32752);
-  addl(eax, ecx);
-  mulpd(xmm3, xmm6);
-  cmpl(eax, 624);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_5_0_2);
-  xorpd(xmm6, xmm6);
-  movl(edx, 17080);
-  pinsrw(xmm6, edx, 3);
-  movdqu(xmm2, xmm1);
-  pand(xmm4, xmm1);
-  subsd(xmm1, xmm4);
-  mulsd(xmm4, xmm5);
-  addsd(xmm0, xmm7);
-  mulsd(xmm1, xmm5);
-  movdqu(xmm7, xmm6);
-  addsd(xmm6, xmm4);
-  addpd(xmm3, xmm0);
-  movdl(edx, xmm6);
-  subsd(xmm6, xmm7);
-  pshufd(xmm0, xmm3, 238);
-  subsd(xmm4, xmm6);
-  addsd(xmm0, xmm3);
-  movl(ecx, edx);
-  andl(edx, 255);
-  addl(edx, edx);
-  movdqu(xmm5, Address(tmp, edx, Address::times_8, 8384));
-  addsd(xmm4, xmm1);
-  mulsd(xmm2, xmm0);
-  movdqu(xmm7, Address(tmp, 12480));
-  movdqu(xmm3, Address(tmp, 12496));
-  shll(ecx, 12);
-  xorl(ecx, rsi);
-  andl(ecx, -1048576);
-  movdl(xmm6, ecx);
-  addsd(xmm2, xmm4);
-  movsd(xmm1, Address(tmp, 12512));
-  pshufd(xmm0, xmm2, 68);
-  pshufd(xmm4, xmm2, 68);
-  mulpd(xmm0, xmm0);
-  movl(rsi, Address(rsp, 24));
-  mulpd(xmm7, xmm4);
-  pshufd(xmm6, xmm6, 17);
-  mulsd(xmm1, xmm2);
-  mulsd(xmm0, xmm0);
-  paddd(xmm5, xmm6);
-  addpd(xmm3, xmm7);
-  mulsd(xmm1, xmm5);
-  pshufd(xmm6, xmm5, 238);
-  mulpd(xmm0, xmm3);
-  addsd(xmm1, xmm6);
-  pshufd(xmm3, xmm0, 238);
-  mulsd(xmm0, xmm5);
-  mulsd(xmm3, xmm5);
-  addsd(xmm0, xmm1);
-  addsd(xmm0, xmm3);
-  addsd(xmm0, xmm5);
-  movsd(Address(rsp, 0), xmm0);
-  fld_d(Address(rsp, 0));
-  jmp(L_2TAG_PACKET_6_0_2);
-
-  bind(L_2TAG_PACKET_7_0_2);
-  movsd(xmm0, Address(rsp, 128));
-  movsd(xmm1, Address(rsp, 136));
-  mulsd(xmm0, xmm1);
-  movsd(Address(rsp, 0), xmm0);
-  fld_d(Address(rsp, 0));
-  jmp(L_2TAG_PACKET_6_0_2);
-
-  bind(L_2TAG_PACKET_0_0_2);
-  addl(eax, 16);
-  movl(edx, 32752);
-  andl(edx, eax);
-  cmpl(edx, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_8_0_2);
-  testl(eax, 32768);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_9_0_2);
-
-  bind(L_2TAG_PACKET_10_0_2);
-  movl(ecx, Address(rsp, 16));
-  xorl(edx, edx);
-  testl(ecx, ecx);
-  movl(ecx, 1);
-  cmovl(Assembler::notEqual, edx, ecx);
-  orl(edx, Address(rsp, 20));
-  cmpl(edx, 1072693248);
-  jcc(Assembler::equal, L_2TAG_PACKET_7_0_2);
-  movsd(xmm0, Address(rsp, 8));
-  movsd(xmm3, Address(rsp, 8));
-  movdl(edx, xmm3);
-  psrlq(xmm3, 32);
-  movdl(ecx, xmm3);
-  orl(edx, ecx);
-  cmpl(edx, 0);
-  jcc(Assembler::equal, L_2TAG_PACKET_11_0_2);
-  xorpd(xmm3, xmm3);
-  movl(eax, 18416);
-  pinsrw(xmm3, eax, 3);
-  mulsd(xmm0, xmm3);
-  xorpd(xmm2, xmm2);
-  movl(eax, 16368);
-  pinsrw(xmm2, eax, 3);
-  movdqu(xmm3, xmm0);
-  pextrw(eax, xmm0, 3);
-  por(xmm0, xmm2);
-  movl(ecx, 18416);
-  psllq(xmm0, 5);
-  movsd(xmm2, Address(tmp, 8256));
-  psrlq(xmm0, 34);
-  rcpss(xmm0, xmm0);
-  psllq(xmm3, 12);
-  movdqu(xmm6, Address(tmp, 8240));
-  psrlq(xmm3, 12);
-  mulss(xmm0, xmm7);
-  movl(edx, -1024);
-  movdl(xmm5, edx);
-  por(xmm3, xmm1);
-  paddd(xmm0, xmm4);
-  psllq(xmm5, 32);
-  movdl(edx, xmm0);
-  psllq(xmm0, 29);
-  pand(xmm5, xmm3);
-  movl(rsi, 0);
-  pand(xmm0, xmm6);
-  subsd(xmm3, xmm5);
-  andl(eax, 32752);
-  subl(eax, 18416);
-  sarl(eax, 4);
-  cvtsi2sdl(xmm7, eax);
-  mulpd(xmm5, xmm0);
-  jmp(L_2TAG_PACKET_4_0_2);
-
-  bind(L_2TAG_PACKET_12_0_2);
-  movl(ecx, Address(rsp, 16));
-  xorl(edx, edx);
-  testl(ecx, ecx);
-  movl(ecx, 1);
-  cmovl(Assembler::notEqual, edx, ecx);
-  orl(edx, Address(rsp, 20));
-  cmpl(edx, 1072693248);
-  jcc(Assembler::equal, L_2TAG_PACKET_7_0_2);
-  movsd(xmm0, Address(rsp, 8));
-  movsd(xmm3, Address(rsp, 8));
-  movdl(edx, xmm3);
-  psrlq(xmm3, 32);
-  movdl(ecx, xmm3);
-  orl(edx, ecx);
-  cmpl(edx, 0);
-  jcc(Assembler::equal, L_2TAG_PACKET_11_0_2);
-  xorpd(xmm3, xmm3);
-  movl(eax, 18416);
-  pinsrw(xmm3, eax, 3);
-  mulsd(xmm0, xmm3);
-  xorpd(xmm2, xmm2);
-  movl(eax, 16368);
-  pinsrw(xmm2, eax, 3);
-  movdqu(xmm3, xmm0);
-  pextrw(eax, xmm0, 3);
-  por(xmm0, xmm2);
-  movl(ecx, 18416);
-  psllq(xmm0, 5);
-  movsd(xmm2, Address(tmp, 8256));
-  psrlq(xmm0, 34);
-  rcpss(xmm0, xmm0);
-  psllq(xmm3, 12);
-  movdqu(xmm6, Address(tmp, 8240));
-  psrlq(xmm3, 12);
-  mulss(xmm0, xmm7);
-  movl(edx, -1024);
-  movdl(xmm5, edx);
-  por(xmm3, xmm1);
-  paddd(xmm0, xmm4);
-  psllq(xmm5, 32);
-  movdl(edx, xmm0);
-  psllq(xmm0, 29);
-  pand(xmm5, xmm3);
-  movl(rsi, INT_MIN);
-  pand(xmm0, xmm6);
-  subsd(xmm3, xmm5);
-  andl(eax, 32752);
-  subl(eax, 18416);
-  sarl(eax, 4);
-  cvtsi2sdl(xmm7, eax);
-  mulpd(xmm5, xmm0);
-  jmp(L_2TAG_PACKET_4_0_2);
-
-  bind(L_2TAG_PACKET_5_0_2);
-  cmpl(eax, 0);
-  jcc(Assembler::less, L_2TAG_PACKET_13_0_2);
-  cmpl(eax, 752);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_14_0_2);
-
-  bind(L_2TAG_PACKET_15_0_2);
-  addsd(xmm0, xmm7);
-  movsd(xmm2, Address(tmp, 12544));
-  addpd(xmm3, xmm0);
-  xorpd(xmm6, xmm6);
-  movl(eax, 17080);
-  pinsrw(xmm6, eax, 3);
-  pshufd(xmm0, xmm3, 238);
-  addsd(xmm0, xmm3);
-  movdqu(xmm3, xmm5);
-  addsd(xmm5, xmm0);
-  movdqu(xmm4, xmm2);
-  subsd(xmm3, xmm5);
-  movdqu(xmm7, xmm5);
-  pand(xmm5, xmm2);
-  movdqu(xmm2, xmm1);
-  pand(xmm4, xmm1);
-  subsd(xmm7, xmm5);
-  addsd(xmm0, xmm3);
-  subsd(xmm1, xmm4);
-  mulsd(xmm4, xmm5);
-  addsd(xmm0, xmm7);
-  mulsd(xmm2, xmm0);
-  movdqu(xmm7, xmm6);
-  mulsd(xmm1, xmm5);
-  addsd(xmm6, xmm4);
-  movdl(eax, xmm6);
-  subsd(xmm6, xmm7);
-  addsd(xmm2, xmm1);
-  movdqu(xmm7, Address(tmp, 12480));
-  movdqu(xmm3, Address(tmp, 12496));
-  subsd(xmm4, xmm6);
-  pextrw(edx, xmm6, 3);
-  movl(ecx, eax);
-  andl(eax, 255);
-  addl(eax, eax);
-  movdqu(xmm5, Address(tmp, eax, Address::times_8, 8384));
-  addsd(xmm2, xmm4);
-  sarl(ecx, 8);
-  movl(eax, ecx);
-  sarl(ecx, 1);
-  subl(eax, ecx);
-  shll(ecx, 20);
-  xorl(ecx, rsi);
-  movdl(xmm6, ecx);
-  movsd(xmm1, Address(tmp, 12512));
-  andl(edx, 32767);
-  cmpl(edx, 16529);
-  jcc(Assembler::above, L_2TAG_PACKET_14_0_2);
-  pshufd(xmm0, xmm2, 68);
-  pshufd(xmm4, xmm2, 68);
-  mulpd(xmm0, xmm0);
-  mulpd(xmm7, xmm4);
-  pshufd(xmm6, xmm6, 17);
-  mulsd(xmm1, xmm2);
-  mulsd(xmm0, xmm0);
-  paddd(xmm5, xmm6);
-  addpd(xmm3, xmm7);
-  mulsd(xmm1, xmm5);
-  pshufd(xmm6, xmm5, 238);
-  mulpd(xmm0, xmm3);
-  addsd(xmm1, xmm6);
-  pshufd(xmm3, xmm0, 238);
-  mulsd(xmm0, xmm5);
-  mulsd(xmm3, xmm5);
-  shll(eax, 4);
-  xorpd(xmm4, xmm4);
-  addl(eax, 16368);
-  pinsrw(xmm4, eax, 3);
-  addsd(xmm0, xmm1);
-  movl(rsi, Address(rsp, 24));
-  addsd(xmm0, xmm3);
-  movdqu(xmm1, xmm0);
-  addsd(xmm0, xmm5);
-  mulsd(xmm0, xmm4);
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_16_0_2);
-  cmpl(eax, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_17_0_2);
-
-  bind(L_2TAG_PACKET_18_0_2);
-  movsd(Address(rsp, 0), xmm0);
-  fld_d(Address(rsp, 0));
-  jmp(L_2TAG_PACKET_6_0_2);
-
-  bind(L_2TAG_PACKET_8_0_2);
-  movsd(xmm1, Address(rsp, 16));
-  movsd(xmm0, Address(rsp, 8));
-  movdqu(xmm2, xmm0);
-  movdl(eax, xmm2);
-  psrlq(xmm2, 20);
-  movdl(edx, xmm2);
-  orl(eax, edx);
-  jcc(Assembler::equal, L_2TAG_PACKET_19_0_2);
-  addsd(xmm0, xmm0);
-  movdl(eax, xmm1);
-  psrlq(xmm1, 32);
-  movdl(edx, xmm1);
-  movl(ecx, edx);
-  addl(edx, edx);
-  orl(eax, edx);
-  jcc(Assembler::equal, L_2TAG_PACKET_20_0_2);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_20_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 16368);
-  pinsrw(xmm0, eax, 3);
-  movl(edx, 29);
-  jmp(L_2TAG_PACKET_21_0_2);
-
-  bind(L_2TAG_PACKET_22_0_2);
-  movsd(xmm0, Address(rsp, 16));
-  addpd(xmm0, xmm0);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_19_0_2);
-  movdl(eax, xmm1);
-  movdqu(xmm2, xmm1);
-  psrlq(xmm1, 32);
-  movdl(edx, xmm1);
-  movl(ecx, edx);
-  addl(edx, edx);
-  orl(eax, edx);
-  jcc(Assembler::equal, L_2TAG_PACKET_23_0_2);
-  pextrw(eax, xmm2, 3);
-  andl(eax, 32752);
-  cmpl(eax, 32752);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_24_0_2);
-  movdl(eax, xmm2);
-  psrlq(xmm2, 20);
-  movdl(edx, xmm2);
-  orl(eax, edx);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_22_0_2);
-
-  bind(L_2TAG_PACKET_24_0_2);
-  pextrw(eax, xmm0, 3);
-  testl(eax, 32768);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_25_0_2);
-  testl(ecx, INT_MIN);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_26_0_2);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_27_0_2);
-  movsd(xmm1, Address(rsp, 16));
-  movdl(eax, xmm1);
-  testl(eax, 1);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_28_0_2);
-  testl(eax, 2);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_29_0_2);
-  jmp(L_2TAG_PACKET_28_0_2);
-
-  bind(L_2TAG_PACKET_25_0_2);
-  shrl(ecx, 20);
-  andl(ecx, 2047);
-  cmpl(ecx, 1075);
-  jcc(Assembler::above, L_2TAG_PACKET_28_0_2);
-  jcc(Assembler::equal, L_2TAG_PACKET_30_0_2);
-  cmpl(ecx, 1074);
-  jcc(Assembler::above, L_2TAG_PACKET_27_0_2);
-  cmpl(ecx, 1023);
-  jcc(Assembler::below, L_2TAG_PACKET_28_0_2);
-  movsd(xmm1, Address(rsp, 16));
-  movl(eax, 17208);
-  xorpd(xmm3, xmm3);
-  pinsrw(xmm3, eax, 3);
-  movdqu(xmm4, xmm3);
-  addsd(xmm3, xmm1);
-  subsd(xmm4, xmm3);
-  addsd(xmm1, xmm4);
-  pextrw(eax, xmm1, 3);
-  andl(eax, 32752);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_28_0_2);
-  movdl(eax, xmm3);
-  andl(eax, 1);
-  jcc(Assembler::equal, L_2TAG_PACKET_28_0_2);
-
-  bind(L_2TAG_PACKET_29_0_2);
-  movsd(xmm1, Address(rsp, 16));
-  pextrw(eax, xmm1, 3);
-  andl(eax, 32768);
-  jcc(Assembler::equal, L_2TAG_PACKET_18_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 32768);
-  pinsrw(xmm0, eax, 3);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_28_0_2);
-  movsd(xmm1, Address(rsp, 16));
-  pextrw(eax, xmm1, 3);
-  andl(eax, 32768);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_26_0_2);
-
-  bind(L_2TAG_PACKET_31_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 32752);
-  pinsrw(xmm0, eax, 3);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_30_0_2);
-  movsd(xmm1, Address(rsp, 16));
-  movdl(eax, xmm1);
-  andl(eax, 1);
-  jcc(Assembler::equal, L_2TAG_PACKET_28_0_2);
-  jmp(L_2TAG_PACKET_29_0_2);
-
-  bind(L_2TAG_PACKET_32_0_2);
-  movdl(eax, xmm1);
-  psrlq(xmm1, 20);
-  movdl(edx, xmm1);
-  orl(eax, edx);
-  jcc(Assembler::equal, L_2TAG_PACKET_33_0_2);
-  movsd(xmm0, Address(rsp, 16));
-  addsd(xmm0, xmm0);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_33_0_2);
-  movsd(xmm0, Address(rsp, 8));
-  pextrw(eax, xmm0, 3);
-  cmpl(eax, 49136);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_34_0_2);
-  movdl(ecx, xmm0);
-  psrlq(xmm0, 20);
-  movdl(edx, xmm0);
-  orl(ecx, edx);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_34_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 32760);
-  pinsrw(xmm0, eax, 3);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_34_0_2);
-  movsd(xmm1, Address(rsp, 16));
-  andl(eax, 32752);
-  subl(eax, 16368);
-  pextrw(edx, xmm1, 3);
-  xorpd(xmm0, xmm0);
-  xorl(eax, edx);
-  andl(eax, 32768);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_18_0_2);
-  movl(ecx, 32752);
-  pinsrw(xmm0, ecx, 3);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_35_0_2);
-  movdl(eax, xmm1);
-  cmpl(edx, 17184);
-  jcc(Assembler::above, L_2TAG_PACKET_36_0_2);
-  testl(eax, 1);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_37_0_2);
-  testl(eax, 2);
-  jcc(Assembler::equal, L_2TAG_PACKET_38_0_2);
-  jmp(L_2TAG_PACKET_39_0_2);
-
-  bind(L_2TAG_PACKET_36_0_2);
-  testl(eax, 1);
-  jcc(Assembler::equal, L_2TAG_PACKET_38_0_2);
-  jmp(L_2TAG_PACKET_39_0_2);
-
-  bind(L_2TAG_PACKET_9_0_2);
-  movsd(xmm2, Address(rsp, 8));
-  movdl(eax, xmm2);
-  psrlq(xmm2, 31);
-  movdl(ecx, xmm2);
-  orl(eax, ecx);
-  jcc(Assembler::equal, L_2TAG_PACKET_11_0_2);
-  movsd(xmm1, Address(rsp, 16));
-  pextrw(edx, xmm1, 3);
-  movdl(eax, xmm1);
-  movdqu(xmm2, xmm1);
-  psrlq(xmm2, 32);
-  movdl(ecx, xmm2);
-  addl(ecx, ecx);
-  orl(ecx, eax);
-  jcc(Assembler::equal, L_2TAG_PACKET_40_0_2);
-  andl(edx, 32752);
-  cmpl(edx, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_32_0_2);
-  cmpl(edx, 17200);
-  jcc(Assembler::above, L_2TAG_PACKET_38_0_2);
-  cmpl(edx, 17184);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_35_0_2);
-  cmpl(edx, 16368);
-  jcc(Assembler::below, L_2TAG_PACKET_37_0_2);
-  movl(eax, 17208);
-  xorpd(xmm2, xmm2);
-  pinsrw(xmm2, eax, 3);
-  movdqu(xmm4, xmm2);
-  addsd(xmm2, xmm1);
-  subsd(xmm4, xmm2);
-  addsd(xmm1, xmm4);
-  pextrw(eax, xmm1, 3);
-  andl(eax, 32767);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_37_0_2);
-  movdl(eax, xmm2);
-  andl(eax, 1);
-  jcc(Assembler::equal, L_2TAG_PACKET_38_0_2);
-
-  bind(L_2TAG_PACKET_39_0_2);
-  xorpd(xmm1, xmm1);
-  movl(edx, 30704);
-  pinsrw(xmm1, edx, 3);
-  movsd(xmm2, Address(tmp, 8256));
-  movsd(xmm4, Address(rsp, 8));
-  pextrw(eax, xmm4, 3);
-  movl(edx, 8192);
-  movdl(xmm4, edx);
-  andl(eax, 32767);
-  subl(eax, 16);
-  jcc(Assembler::less, L_2TAG_PACKET_12_0_2);
-  movl(edx, eax);
-  andl(edx, 32752);
-  subl(edx, 16368);
-  movl(ecx, edx);
-  sarl(edx, 31);
-  addl(ecx, edx);
-  xorl(ecx, edx);
-  addl(ecx, 16);
-  bsrl(ecx, ecx);
-  movl(rsi, INT_MIN);
-  jmp(L_2TAG_PACKET_1_0_2);
-
-  bind(L_2TAG_PACKET_37_0_2);
-  xorpd(xmm1, xmm1);
-  movl(eax, 32752);
-  pinsrw(xmm1, eax, 3);
-  xorpd(xmm0, xmm0);
-  mulsd(xmm0, xmm1);
-  movl(edx, 28);
-  jmp(L_2TAG_PACKET_21_0_2);
-
-  bind(L_2TAG_PACKET_38_0_2);
-  xorpd(xmm1, xmm1);
-  movl(edx, 30704);
-  pinsrw(xmm1, edx, 3);
-  movsd(xmm2, Address(tmp, 8256));
-  movsd(xmm4, Address(rsp, 8));
-  pextrw(eax, xmm4, 3);
-  movl(edx, 8192);
-  movdl(xmm4, edx);
-  andl(eax, 32767);
-  subl(eax, 16);
-  jcc(Assembler::less, L_2TAG_PACKET_10_0_2);
-  movl(edx, eax);
-  andl(edx, 32752);
-  subl(edx, 16368);
-  movl(ecx, edx);
-  sarl(edx, 31);
-  addl(ecx, edx);
-  xorl(ecx, edx);
-  addl(ecx, 16);
-  bsrl(ecx, ecx);
-  movl(rsi, 0);
-  jmp(L_2TAG_PACKET_1_0_2);
-
-  bind(L_2TAG_PACKET_23_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 16368);
-  pinsrw(xmm0, eax, 3);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_26_0_2);
-  xorpd(xmm0, xmm0);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_13_0_2);
-  addl(eax, 384);
-  cmpl(eax, 0);
-  jcc(Assembler::less, L_2TAG_PACKET_41_0_2);
-  mulsd(xmm5, xmm1);
-  addsd(xmm0, xmm7);
-  shrl(rsi, 31);
-  addpd(xmm3, xmm0);
-  pshufd(xmm0, xmm3, 238);
-  addsd(xmm3, xmm0);
-  movsd(xmm4, Address(tmp, rsi, Address::times_8, 12528));
-  mulsd(xmm1, xmm3);
-  xorpd(xmm0, xmm0);
-  movl(eax, 16368);
-  shll(rsi, 15);
-  orl(eax, rsi);
-  pinsrw(xmm0, eax, 3);
-  addsd(xmm5, xmm1);
-  movl(rsi, Address(rsp, 24));
-  mulsd(xmm5, xmm4);
-  addsd(xmm0, xmm5);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_41_0_2);
-  movl(rsi, Address(rsp, 24));
-  xorpd(xmm0, xmm0);
-  movl(eax, 16368);
-  pinsrw(xmm0, eax, 3);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_40_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 16368);
-  pinsrw(xmm0, eax, 3);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_42_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 16368);
-  pinsrw(xmm0, eax, 3);
-  movl(edx, 26);
-  jmp(L_2TAG_PACKET_21_0_2);
-
-  bind(L_2TAG_PACKET_11_0_2);
-  movsd(xmm1, Address(rsp, 16));
-  movdqu(xmm2, xmm1);
-  pextrw(eax, xmm1, 3);
-  andl(eax, 32752);
-  cmpl(eax, 32752);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_43_0_2);
-  movdl(eax, xmm2);
-  psrlq(xmm2, 20);
-  movdl(edx, xmm2);
-  orl(eax, edx);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_22_0_2);
-
-  bind(L_2TAG_PACKET_43_0_2);
-  movdl(eax, xmm1);
-  psrlq(xmm1, 32);
-  movdl(edx, xmm1);
-  movl(ecx, edx);
-  addl(edx, edx);
-  orl(eax, edx);
-  jcc(Assembler::equal, L_2TAG_PACKET_42_0_2);
-  shrl(edx, 21);
-  cmpl(edx, 1075);
-  jcc(Assembler::above, L_2TAG_PACKET_44_0_2);
-  jcc(Assembler::equal, L_2TAG_PACKET_45_0_2);
-  cmpl(edx, 1023);
-  jcc(Assembler::below, L_2TAG_PACKET_44_0_2);
-  movsd(xmm1, Address(rsp, 16));
-  movl(eax, 17208);
-  xorpd(xmm3, xmm3);
-  pinsrw(xmm3, eax, 3);
-  movdqu(xmm4, xmm3);
-  addsd(xmm3, xmm1);
-  subsd(xmm4, xmm3);
-  addsd(xmm1, xmm4);
-  pextrw(eax, xmm1, 3);
-  andl(eax, 32752);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_44_0_2);
-  movdl(eax, xmm3);
-  andl(eax, 1);
-  jcc(Assembler::equal, L_2TAG_PACKET_44_0_2);
-
-  bind(L_2TAG_PACKET_46_0_2);
-  movsd(xmm0, Address(rsp, 8));
-  testl(ecx, INT_MIN);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_47_0_2);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_45_0_2);
-  movsd(xmm1, Address(rsp, 16));
-  movdl(eax, xmm1);
-  testl(eax, 1);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_46_0_2);
-
-  bind(L_2TAG_PACKET_44_0_2);
-  testl(ecx, INT_MIN);
-  jcc(Assembler::equal, L_2TAG_PACKET_26_0_2);
-  xorpd(xmm0, xmm0);
-
-  bind(L_2TAG_PACKET_47_0_2);
-  movl(eax, 16368);
-  xorpd(xmm1, xmm1);
-  pinsrw(xmm1, eax, 3);
-  divsd(xmm1, xmm0);
-  movdqu(xmm0, xmm1);
-  movl(edx, 27);
-  jmp(L_2TAG_PACKET_21_0_2);
-
-  bind(L_2TAG_PACKET_14_0_2);
-  movsd(xmm2, Address(rsp, 8));
-  movsd(xmm6, Address(rsp, 16));
-  pextrw(eax, xmm2, 3);
-  pextrw(edx, xmm6, 3);
-  movl(ecx, 32752);
-  andl(ecx, edx);
-  cmpl(ecx, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_48_0_2);
-  andl(eax, 32752);
-  subl(eax, 16368);
-  xorl(edx, eax);
-  testl(edx, 32768);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_49_0_2);
-
-  bind(L_2TAG_PACKET_50_0_2);
-  movl(eax, 32736);
-  pinsrw(xmm0, eax, 3);
-  shrl(rsi, 16);
-  orl(eax, rsi);
-  pinsrw(xmm1, eax, 3);
-  movl(rsi, Address(rsp, 24));
-  mulsd(xmm0, xmm1);
-
-  bind(L_2TAG_PACKET_17_0_2);
-  movl(edx, 24);
-
-  bind(L_2TAG_PACKET_21_0_2);
-  movsd(Address(rsp, 0), xmm0);
-  fld_d(Address(rsp, 0));
-  jmp(L_2TAG_PACKET_6_0_2);
-
-  bind(L_2TAG_PACKET_49_0_2);
-  movl(eax, 16);
-  pinsrw(xmm0, eax, 3);
-  mulsd(xmm0, xmm0);
-  testl(rsi, INT_MIN);
-  jcc(Assembler::equal, L_2TAG_PACKET_51_0_2);
-  movsd(xmm2, Address(tmp, 12560));
-  xorpd(xmm0, xmm2);
-
-  bind(L_2TAG_PACKET_51_0_2);
-  movl(rsi, Address(rsp, 24));
-  movl(edx, 25);
-  jmp(L_2TAG_PACKET_21_0_2);
-
-  bind(L_2TAG_PACKET_16_0_2);
-  pextrw(ecx, xmm5, 3);
-  pextrw(edx, xmm4, 3);
-  movl(eax, -1);
-  andl(ecx, 32752);
-  subl(ecx, 16368);
-  andl(edx, 32752);
-  addl(edx, ecx);
-  movl(ecx, -31);
-  sarl(edx, 4);
-  subl(ecx, edx);
-  jcc(Assembler::lessEqual, L_2TAG_PACKET_52_0_2);
-  cmpl(ecx, 20);
-  jcc(Assembler::above, L_2TAG_PACKET_53_0_2);
-  shll(eax);
-
-  bind(L_2TAG_PACKET_52_0_2);
-  movdl(xmm0, eax);
-  psllq(xmm0, 32);
-  pand(xmm0, xmm5);
-  subsd(xmm5, xmm0);
-  addsd(xmm5, xmm1);
-  mulsd(xmm0, xmm4);
-  mulsd(xmm5, xmm4);
-  addsd(xmm0, xmm5);
-
-  bind(L_2TAG_PACKET_53_0_2);
-  movl(edx, 25);
-  jmp(L_2TAG_PACKET_21_0_2);
-
-  bind(L_2TAG_PACKET_2_0_2);
-  movzwl(ecx, Address(rsp, 22));
-  movl(edx, INT_MIN);
-  movdl(xmm1, edx);
-  xorpd(xmm7, xmm7);
-  paddd(xmm0, xmm4);
-  psllq(xmm5, 32);
-  movdl(edx, xmm0);
-  psllq(xmm0, 29);
-  paddq(xmm1, xmm3);
-  pand(xmm5, xmm1);
-  andl(ecx, 32752);
-  cmpl(ecx, 16560);
-  jcc(Assembler::below, L_2TAG_PACKET_3_0_2);
-  pand(xmm0, xmm6);
-  subsd(xmm3, xmm5);
-  addl(eax, 16351);
-  shrl(eax, 4);
-  subl(eax, 1022);
-  cvtsi2sdl(xmm7, eax);
-  mulpd(xmm5, xmm0);
-  movsd(xmm4, Address(tmp, 0));
-  mulsd(xmm3, xmm0);
-  movsd(xmm6, Address(tmp, 0));
-  subsd(xmm5, xmm2);
-  movsd(xmm1, Address(tmp, 8));
-  pshufd(xmm2, xmm3, 68);
-  unpcklpd(xmm5, xmm3);
-  addsd(xmm3, xmm5);
-  movsd(xmm0, Address(tmp, 8));
-  andl(edx, 16760832);
-  shrl(edx, 10);
-  addpd(xmm7, Address(tmp, edx, Address::times_1, -3616));
-  mulsd(xmm4, xmm5);
-  mulsd(xmm0, xmm5);
-  mulsd(xmm6, xmm2);
-  mulsd(xmm1, xmm2);
-  movdqu(xmm2, xmm5);
-  mulsd(xmm4, xmm5);
-  addsd(xmm5, xmm0);
-  movdqu(xmm0, xmm7);
-  addsd(xmm2, xmm3);
-  addsd(xmm7, xmm5);
-  mulsd(xmm6, xmm2);
-  subsd(xmm0, xmm7);
-  movdqu(xmm2, xmm7);
-  addsd(xmm7, xmm4);
-  addsd(xmm0, xmm5);
-  subsd(xmm2, xmm7);
-  addsd(xmm4, xmm2);
-  pshufd(xmm2, xmm5, 238);
-  movdqu(xmm5, xmm7);
-  addsd(xmm7, xmm2);
-  addsd(xmm4, xmm0);
-  movdqu(xmm0, Address(tmp, 8272));
-  subsd(xmm5, xmm7);
-  addsd(xmm6, xmm4);
-  movdqu(xmm4, xmm7);
-  addsd(xmm5, xmm2);
-  addsd(xmm7, xmm1);
-  movdqu(xmm2, Address(tmp, 8336));
-  subsd(xmm4, xmm7);
-  addsd(xmm6, xmm5);
-  addsd(xmm4, xmm1);
-  pshufd(xmm5, xmm7, 238);
-  movdqu(xmm1, xmm7);
-  addsd(xmm7, xmm5);
-  subsd(xmm1, xmm7);
-  addsd(xmm1, xmm5);
-  movdqu(xmm5, Address(tmp, 8352));
-  pshufd(xmm3, xmm3, 68);
-  addsd(xmm6, xmm4);
-  addsd(xmm6, xmm1);
-  movdqu(xmm1, Address(tmp, 8304));
-  mulpd(xmm0, xmm3);
-  mulpd(xmm2, xmm3);
-  pshufd(xmm4, xmm3, 68);
-  mulpd(xmm3, xmm3);
-  addpd(xmm0, xmm1);
-  addpd(xmm5, xmm2);
-  mulsd(xmm4, xmm3);
-  movsd(xmm2, Address(tmp, 16));
-  mulpd(xmm3, xmm3);
-  movsd(xmm1, Address(rsp, 16));
-  movzwl(ecx, Address(rsp, 22));
-  mulpd(xmm0, xmm4);
-  pextrw(eax, xmm7, 3);
-  mulpd(xmm5, xmm4);
-  mulpd(xmm0, xmm3);
-  movsd(xmm4, Address(tmp, 8376));
-  pand(xmm2, xmm7);
-  addsd(xmm5, xmm6);
-  subsd(xmm7, xmm2);
-  addpd(xmm5, xmm0);
-  andl(eax, 32752);
-  subl(eax, 16368);
-  andl(ecx, 32752);
-  cmpl(ecx, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_48_0_2);
-  addl(ecx, eax);
-  cmpl(ecx, 16576);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_54_0_2);
-  pshufd(xmm0, xmm5, 238);
-  pand(xmm4, xmm1);
-  movdqu(xmm3, xmm1);
-  addsd(xmm5, xmm0);
-  subsd(xmm1, xmm4);
-  xorpd(xmm6, xmm6);
-  movl(edx, 17080);
-  pinsrw(xmm6, edx, 3);
-  addsd(xmm7, xmm5);
-  mulsd(xmm4, xmm2);
-  mulsd(xmm1, xmm2);
-  movdqu(xmm5, xmm6);
-  mulsd(xmm3, xmm7);
-  addsd(xmm6, xmm4);
-  addsd(xmm1, xmm3);
-  movdqu(xmm7, Address(tmp, 12480));
-  movdl(edx, xmm6);
-  subsd(xmm6, xmm5);
-  movdqu(xmm3, Address(tmp, 12496));
-  movsd(xmm2, Address(tmp, 12512));
-  subsd(xmm4, xmm6);
-  movl(ecx, edx);
-  andl(edx, 255);
-  addl(edx, edx);
-  movdqu(xmm5, Address(tmp, edx, Address::times_8, 8384));
-  addsd(xmm4, xmm1);
-  pextrw(edx, xmm6, 3);
-  shrl(ecx, 8);
-  movl(eax, ecx);
-  shrl(ecx, 1);
-  subl(eax, ecx);
-  shll(ecx, 20);
-  movdl(xmm6, ecx);
-  pshufd(xmm0, xmm4, 68);
-  pshufd(xmm1, xmm4, 68);
-  mulpd(xmm0, xmm0);
-  mulpd(xmm7, xmm1);
-  pshufd(xmm6, xmm6, 17);
-  mulsd(xmm2, xmm4);
-  andl(edx, 32767);
-  cmpl(edx, 16529);
-  jcc(Assembler::above, L_2TAG_PACKET_14_0_2);
-  mulsd(xmm0, xmm0);
-  paddd(xmm5, xmm6);
-  addpd(xmm3, xmm7);
-  mulsd(xmm2, xmm5);
-  pshufd(xmm6, xmm5, 238);
-  mulpd(xmm0, xmm3);
-  addsd(xmm2, xmm6);
-  pshufd(xmm3, xmm0, 238);
-  addl(eax, 1023);
-  shll(eax, 20);
-  orl(eax, rsi);
-  movdl(xmm4, eax);
-  mulsd(xmm0, xmm5);
-  mulsd(xmm3, xmm5);
-  addsd(xmm0, xmm2);
-  psllq(xmm4, 32);
-  addsd(xmm0, xmm3);
-  movdqu(xmm1, xmm0);
-  addsd(xmm0, xmm5);
-  movl(rsi, Address(rsp, 24));
-  mulsd(xmm0, xmm4);
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_16_0_2);
-  cmpl(eax, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_17_0_2);
-
-  bind(L_2TAG_PACKET_55_0_2);
-  movsd(Address(rsp, 0), xmm0);
-  fld_d(Address(rsp, 0));
-  jmp(L_2TAG_PACKET_6_0_2);
-
-  bind(L_2TAG_PACKET_48_0_2);
-  movl(rsi, Address(rsp, 24));
-
-  bind(L_2TAG_PACKET_56_0_2);
-  movsd(xmm0, Address(rsp, 8));
-  movsd(xmm1, Address(rsp, 16));
-  addsd(xmm1, xmm1);
-  xorpd(xmm2, xmm2);
-  movl(eax, 49136);
-  pinsrw(xmm2, eax, 3);
-  addsd(xmm2, xmm0);
-  pextrw(eax, xmm2, 3);
-  cmpl(eax, 0);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_57_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 32760);
-  pinsrw(xmm0, eax, 3);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_57_0_2);
-  movdl(edx, xmm1);
-  movdqu(xmm3, xmm1);
-  psrlq(xmm3, 20);
-  movdl(ecx, xmm3);
-  orl(ecx, edx);
-  jcc(Assembler::equal, L_2TAG_PACKET_58_0_2);
-  addsd(xmm1, xmm1);
-  movdqu(xmm0, xmm1);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_58_0_2);
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32752);
-  pextrw(edx, xmm1, 3);
-  xorpd(xmm0, xmm0);
-  subl(eax, 16368);
-  xorl(eax, edx);
-  testl(eax, 32768);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_18_0_2);
-  movl(edx, 32752);
-  pinsrw(xmm0, edx, 3);
-  jmp(L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_54_0_2);
-  pextrw(eax, xmm1, 3);
-  pextrw(ecx, xmm2, 3);
-  xorl(eax, ecx);
-  testl(eax, 32768);
-  jcc(Assembler::equal, L_2TAG_PACKET_50_0_2);
-  jmp(L_2TAG_PACKET_49_0_2);
-
-  bind(L_2TAG_PACKET_6_0_2);
-  movl(tmp, Address(rsp, 64));
-
-}
-
-/******************************************************************************/
-//                     ALGORITHM DESCRIPTION - SIN()
-//                     ---------------------
-//
-//     1. RANGE REDUCTION
-//
-//     We perform an initial range reduction from X to r with
-//
-//          X =~= N * pi/32 + r
-//
-//     so that |r| <= pi/64 + epsilon. We restrict inputs to those
-//     where |N| <= 932560. Beyond this, the range reduction is
-//     insufficiently accurate. For extremely small inputs,
-//     denormalization can occur internally, impacting performance.
-//     This means that the main path is actually only taken for
-//     2^-252 <= |X| < 90112.
-//
-//     To avoid branches, we perform the range reduction to full
-//     accuracy each time.
-//
-//          X - N * (P_1 + P_2 + P_3)
-//
-//     where P_1 and P_2 are 32-bit numbers (so multiplication by N
-//     is exact) and P_3 is a 53-bit number. Together, these
-//     approximate pi well enough for all cases in the restricted
-//     range.
-//
-//     The main reduction sequence is:
-//
-//             y = 32/pi * x
-//             N = integer(y)
-//     (computed by adding and subtracting off SHIFTER)
-//
-//             m_1 = N * P_1
-//             m_2 = N * P_2
-//             r_1 = x - m_1
-//             r = r_1 - m_2
-//     (this r can be used for most of the calculation)
-//
-//             c_1 = r_1 - r
-//             m_3 = N * P_3
-//             c_2 = c_1 - m_2
-//             c = c_2 - m_3
-//
-//     2. MAIN ALGORITHM
-//
-//     The algorithm uses a table lookup based on B = M * pi / 32
-//     where M = N mod 64. The stored values are:
-//       sigma             closest power of 2 to cos(B)
-//       C_hl              53-bit cos(B) - sigma
-//       S_hi + S_lo       2 * 53-bit sin(B)
-//
-//     The computation is organized as follows:
-//
-//          sin(B + r + c) = [sin(B) + sigma * r] +
-//                           r * (cos(B) - sigma) +
-//                           sin(B) * [cos(r + c) - 1] +
-//                           cos(B) * [sin(r + c) - r]
-//
-//     which is approximately:
-//
-//          [S_hi + sigma * r] +
-//          C_hl * r +
-//          S_lo + S_hi * [(cos(r) - 1) - r * c] +
-//          (C_hl + sigma) * [(sin(r) - r) + c]
-//
-//     and this is what is actually computed. We separate this sum
-//     into four parts:
-//
-//          hi + med + pols + corr
-//
-//     where
-//
-//          hi       = S_hi + sigma r
-//          med      = C_hl * r
-//          pols     = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r)
-//          corr     = S_lo + c * ((C_hl + sigma) - S_hi * r)
-//
-//     3. POLYNOMIAL
-//
-//     The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) *
-//     (sin(r) - r) can be rearranged freely, since it is quite
-//     small, so we exploit parallelism to the fullest.
-//
-//          psc4       =   SC_4 * r_1
-//          msc4       =   psc4 * r
-//          r2         =   r * r
-//          msc2       =   SC_2 * r2
-//          r4         =   r2 * r2
-//          psc3       =   SC_3 + msc4
-//          psc1       =   SC_1 + msc2
-//          msc3       =   r4 * psc3
-//          sincospols =   psc1 + msc3
-//          pols       =   sincospols *
-//                         <S_hi * r^2 | (C_hl + sigma) * r^3>
-//
-//     4. CORRECTION TERM
-//
-//     This is where the "c" component of the range reduction is
-//     taken into account; recall that just "r" is used for most of
-//     the calculation.
-//
-//          -c   = m_3 - c_2
-//          -d   = S_hi * r - (C_hl + sigma)
-//          corr = -c * -d + S_lo
-//
-//     5. COMPENSATED SUMMATIONS
-//
-//     The two successive compensated summations add up the high
-//     and medium parts, leaving just the low parts to add up at
-//     the end.
-//
-//          rs        =  sigma * r
-//          res_int   =  S_hi + rs
-//          k_0       =  S_hi - res_int
-//          k_2       =  k_0 + rs
-//          med       =  C_hl * r
-//          res_hi    =  res_int + med
-//          k_1       =  res_int - res_hi
-//          k_3       =  k_1 + med
-//
-//     6. FINAL SUMMATION
-//
-//     We now add up all the small parts:
-//
-//          res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3
-//
-//     Now the overall result is just:
-//
-//          res_hi + res_lo
-//
-//     7. SMALL ARGUMENTS
-//
-//     If |x| < SNN (SNN meaning the smallest normal number), we
-//     simply perform 0.1111111 cdots 1111 * x. For SNN <= |x|, we
-//     do 2^-55 * (2^55 * x - x).
-//
-// Special cases:
-//  sin(NaN) = quiet NaN, and raise invalid exception
-//  sin(INF) = NaN and raise invalid exception
-//  sin(+/-0) = +/-0
-//
-/******************************************************************************/
-
-ALIGNED_(8) juint _zero_none[] =
-{
-    0x00000000UL, 0x00000000UL, 0x00000000UL, 0xbff00000UL
-};
-
-ALIGNED_(4) juint __4onpi_d[] =
-{
-    0x6dc9c883UL, 0x3ff45f30UL
-};
-
-ALIGNED_(4) juint _TWO_32H[] =
-{
-    0x00000000UL, 0x41f80000UL
-};
-
-ALIGNED_(4) juint _pi04_3d[] =
-{
-    0x54442d00UL, 0x3fe921fbUL, 0x98cc5180UL, 0x3ce84698UL, 0xcbb5bf6cUL,
-    0xb9dfc8f8UL
-};
-
-ALIGNED_(4) juint _pi04_5d[] =
-{
-    0x54400000UL, 0x3fe921fbUL, 0x1a600000UL, 0x3dc0b461UL, 0x2e000000UL,
-    0x3b93198aUL, 0x25200000UL, 0x396b839aUL, 0x533e63a0UL, 0x37027044UL
-};
-
-ALIGNED_(4) juint _SCALE[] =
-{
-    0x00000000UL, 0x32600000UL
-};
-
-ALIGNED_(4) juint _zeros[] =
-{
-    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x80000000UL
-};
-
-ALIGNED_(4) juint _pi04_2d[] =
-{
-    0x54400000UL, 0x3fe921fbUL, 0x1a626331UL, 0x3dc0b461UL
-};
-
-ALIGNED_(4) juint _TWO_12H[] =
-{
-    0x00000000UL, 0x40b80000UL
-};
-
-ALIGNED_(2) jushort __4onpi_31l[] =
-{
-    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x836e, 0xa2f9,
-    0x40d8, 0x0000, 0x0000, 0x0000, 0x2a50, 0x9c88, 0x40b7, 0x0000, 0x0000, 0x0000,
-    0xabe8, 0xfe13, 0x4099, 0x0000, 0x0000, 0x0000, 0x6ee0, 0xfa9a, 0x4079, 0x0000,
-    0x0000, 0x0000, 0x9580, 0xdb62, 0x4058, 0x0000, 0x0000, 0x0000, 0x1c82, 0xc9e2,
-    0x403d, 0x0000, 0x0000, 0x0000, 0xb1c0, 0xff28, 0x4019, 0x0000, 0x0000, 0x0000,
-    0xef14, 0xaf7a, 0x3ffe, 0x0000, 0x0000, 0x0000, 0x48dc, 0xc36e, 0x3fdf, 0x0000,
-    0x0000, 0x0000, 0x3740, 0xe909, 0x3fbe, 0x0000, 0x0000, 0x0000, 0x924a, 0xb801,
-    0x3fa2, 0x0000, 0x0000, 0x0000, 0x3a32, 0xdd41, 0x3f83, 0x0000, 0x0000, 0x0000,
-    0x8778, 0x873f, 0x3f62, 0x0000, 0x0000, 0x0000, 0x1298, 0xb1cb, 0x3f44, 0x0000,
-    0x0000, 0x0000, 0xa208, 0x9cfb, 0x3f26, 0x0000, 0x0000, 0x0000, 0xbaec, 0xd7d4,
-    0x3f06, 0x0000, 0x0000, 0x0000, 0xd338, 0x8909, 0x3ee7, 0x0000, 0x0000, 0x0000,
-    0x68b8, 0xe04d, 0x3ec7, 0x0000, 0x0000, 0x0000, 0x4e64, 0xdf90, 0x3eaa, 0x0000,
-    0x0000, 0x0000, 0xc1a8, 0xeb1c, 0x3e89, 0x0000, 0x0000, 0x0000, 0x2720, 0xce7d,
-    0x3e6a, 0x0000, 0x0000, 0x0000, 0x77b8, 0x8bf1, 0x3e4b, 0x0000, 0x0000, 0x0000,
-    0xec7e, 0xe4a0, 0x3e2e, 0x0000, 0x0000, 0x0000, 0xffbc, 0xf12f, 0x3e0f, 0x0000,
-    0x0000, 0x0000, 0xfdc0, 0xb301, 0x3deb, 0x0000, 0x0000, 0x0000, 0xc5ac, 0x9788,
-    0x3dd1, 0x0000, 0x0000, 0x0000, 0x47da, 0x829b, 0x3db2, 0x0000, 0x0000, 0x0000,
-    0xd9e4, 0xa6cf, 0x3d93, 0x0000, 0x0000, 0x0000, 0x36e8, 0xf961, 0x3d73, 0x0000,
-    0x0000, 0x0000, 0xf668, 0xf463, 0x3d54, 0x0000, 0x0000, 0x0000, 0x5168, 0xf2ff,
-    0x3d35, 0x0000, 0x0000, 0x0000, 0x758e, 0xea4f, 0x3d17, 0x0000, 0x0000, 0x0000,
-    0xf17a, 0xebe5, 0x3cf8, 0x0000, 0x0000, 0x0000, 0x9cfa, 0x9e83, 0x3cd9, 0x0000,
-    0x0000, 0x0000, 0xa4ba, 0xe294, 0x3cba, 0x0000, 0x0000, 0x0000, 0xd7ec, 0x9afe,
-    0x3c9a, 0x0000, 0x0000, 0x0000, 0xae80, 0x8fc6, 0x3c79, 0x0000, 0x0000, 0x0000,
-    0x3304, 0x8560, 0x3c5c, 0x0000, 0x0000, 0x0000, 0x6d70, 0xdf8f, 0x3c3b, 0x0000,
-    0x0000, 0x0000, 0x3ef0, 0xafc3, 0x3c1e, 0x0000, 0x0000, 0x0000, 0xd0d8, 0x826b,
-    0x3bfe, 0x0000, 0x0000, 0x0000, 0x1c80, 0xed4f, 0x3bdd, 0x0000, 0x0000, 0x0000,
-    0x730c, 0xb0af, 0x3bc1, 0x0000, 0x0000, 0x0000, 0x6660, 0xc219, 0x3ba2, 0x0000,
-    0x0000, 0x0000, 0x940c, 0xabe2, 0x3b83, 0x0000, 0x0000, 0x0000, 0xdffc, 0x8408,
-    0x3b64, 0x0000, 0x0000, 0x0000, 0x6b98, 0xc402, 0x3b45, 0x0000, 0x0000, 0x0000,
-    0x1818, 0x9cc4, 0x3b26, 0x0000, 0x0000, 0x0000, 0x5390, 0xaab6, 0x3b05, 0x0000,
-    0x0000, 0x0000, 0xb070, 0xd464, 0x3ae9, 0x0000, 0x0000, 0x0000, 0x231a, 0x9ef0,
-    0x3aca, 0x0000, 0x0000, 0x0000, 0x0670, 0xd1f1, 0x3aaa, 0x0000, 0x0000, 0x0000,
-    0x7738, 0xd9f3, 0x3a8a, 0x0000, 0x0000, 0x0000, 0xa834, 0x8092, 0x3a6c, 0x0000,
-    0x0000, 0x0000, 0xb45c, 0xce23, 0x3a4d, 0x0000, 0x0000, 0x0000, 0x36e8, 0xb0e5,
-    0x3a2d, 0x0000, 0x0000, 0x0000, 0xd156, 0xaf44, 0x3a10, 0x0000, 0x0000, 0x0000,
-    0x9f52, 0x8c82, 0x39f1, 0x0000, 0x0000, 0x0000, 0x829c, 0xff83, 0x39d1, 0x0000,
-    0x0000, 0x0000, 0x7d06, 0xefc6, 0x39b3, 0x0000, 0x0000, 0x0000, 0x93e0, 0xb0b7,
-    0x3992, 0x0000, 0x0000, 0x0000, 0xedde, 0xc193, 0x3975, 0x0000, 0x0000, 0x0000,
-    0xbbc0, 0xcf49, 0x3952, 0x0000, 0x0000, 0x0000, 0xbdf0, 0xd63c, 0x3937, 0x0000,
-    0x0000, 0x0000, 0x1f34, 0x9f3a, 0x3918, 0x0000, 0x0000, 0x0000, 0x3f8e, 0xe579,
-    0x38f9, 0x0000, 0x0000, 0x0000, 0x90c8, 0xc3f8, 0x38d9, 0x0000, 0x0000, 0x0000,
-    0x48c0, 0xf8f8, 0x38b7, 0x0000, 0x0000, 0x0000, 0xed56, 0xafa6, 0x389c, 0x0000,
-    0x0000, 0x0000, 0x8218, 0xb969, 0x387d, 0x0000, 0x0000, 0x0000, 0x1852, 0xec57,
-    0x385e, 0x0000, 0x0000, 0x0000, 0x670c, 0xd674, 0x383e, 0x0000, 0x0000, 0x0000,
-    0xad40, 0xc2c4, 0x3820, 0x0000, 0x0000, 0x0000, 0x2e80, 0xa696, 0x3801, 0x0000,
-    0x0000, 0x0000, 0xd800, 0xc467, 0x37dc, 0x0000, 0x0000, 0x0000, 0x3c72, 0xc5ae,
-    0x37c3, 0x0000, 0x0000, 0x0000, 0xb006, 0xac69, 0x37a4, 0x0000, 0x0000, 0x0000,
-    0x34a0, 0x8cdf, 0x3782, 0x0000, 0x0000, 0x0000, 0x9ed2, 0xd25e, 0x3766, 0x0000,
-    0x0000, 0x0000, 0x6fec, 0xaaaa, 0x3747, 0x0000, 0x0000, 0x0000, 0x6040, 0xfb5c,
-    0x3726, 0x0000, 0x0000, 0x0000, 0x764c, 0xa3fc, 0x3708, 0x0000, 0x0000, 0x0000,
-    0xb254, 0x954e, 0x36e9, 0x0000, 0x0000, 0x0000, 0x3e1c, 0xf5dc, 0x36ca, 0x0000,
-    0x0000, 0x0000, 0x7b06, 0xc635, 0x36ac, 0x0000, 0x0000, 0x0000, 0xa8ba, 0xd738,
-    0x368d, 0x0000, 0x0000, 0x0000, 0x06cc, 0xb24e, 0x366d, 0x0000, 0x0000, 0x0000,
-    0x7108, 0xac76, 0x364f, 0x0000, 0x0000, 0x0000, 0x2324, 0xa7cb, 0x3630, 0x0000,
-    0x0000, 0x0000, 0xac40, 0xef15, 0x360f, 0x0000, 0x0000, 0x0000, 0xae46, 0xd516,
-    0x35f2, 0x0000, 0x0000, 0x0000, 0x615e, 0xe003, 0x35d3, 0x0000, 0x0000, 0x0000,
-    0x0cf0, 0xefe7, 0x35b1, 0x0000, 0x0000, 0x0000, 0xfb50, 0xf98c, 0x3595, 0x0000,
-    0x0000, 0x0000, 0x0abc, 0xf333, 0x3575, 0x0000, 0x0000, 0x0000, 0xdd60, 0xca3f,
-    0x3555, 0x0000, 0x0000, 0x0000, 0x7eb6, 0xd87f, 0x3538, 0x0000, 0x0000, 0x0000,
-    0x44f4, 0xb291, 0x3519, 0x0000, 0x0000, 0x0000, 0xff80, 0xc982, 0x34f6, 0x0000,
-    0x0000, 0x0000, 0x9de0, 0xd9b8, 0x34db, 0x0000, 0x0000, 0x0000, 0xcd42, 0x9366,
-    0x34bc, 0x0000, 0x0000, 0x0000, 0xbef0, 0xfaee, 0x349d, 0x0000, 0x0000, 0x0000,
-    0xdac4, 0xb6f1, 0x347d, 0x0000, 0x0000, 0x0000, 0xf140, 0x94de, 0x345d, 0x0000,
-    0x0000, 0x0000, 0xa218, 0x8b4b, 0x343e, 0x0000, 0x0000, 0x0000, 0x6380, 0xa135,
-    0x341e, 0x0000, 0x0000, 0x0000, 0xb184, 0x8cb2, 0x3402, 0x0000, 0x0000, 0x0000,
-    0x196e, 0xdc61, 0x33e3, 0x0000, 0x0000, 0x0000, 0x0c00, 0xde05, 0x33c4, 0x0000,
-    0x0000, 0x0000, 0xef9a, 0xbd38, 0x33a5, 0x0000, 0x0000, 0x0000, 0xc1a0, 0xdf00,
-    0x3385, 0x0000, 0x0000, 0x0000, 0x1090, 0x9973, 0x3365, 0x0000, 0x0000, 0x0000,
-    0x4882, 0x8301, 0x3348, 0x0000, 0x0000, 0x0000, 0x7abe, 0xadc7, 0x3329, 0x0000,
-    0x0000, 0x0000, 0x7cba, 0xec2b, 0x330a, 0x0000, 0x0000, 0x0000, 0xa520, 0x8f21,
-    0x32e9, 0x0000, 0x0000, 0x0000, 0x710c, 0x8d36, 0x32cc, 0x0000, 0x0000, 0x0000,
-    0x5212, 0xc6ed, 0x32ad, 0x0000, 0x0000, 0x0000, 0x7308, 0xfd76, 0x328d, 0x0000,
-    0x0000, 0x0000, 0x5014, 0xd548, 0x326f, 0x0000, 0x0000, 0x0000, 0xd3f2, 0xb499,
-    0x3250, 0x0000, 0x0000, 0x0000, 0x7f74, 0xa606, 0x3230, 0x0000, 0x0000, 0x0000,
-    0xf0a8, 0xd720, 0x3212, 0x0000, 0x0000, 0x0000, 0x185c, 0xe20f, 0x31f2, 0x0000,
-    0x0000, 0x0000, 0xa5a8, 0x8738, 0x31d4, 0x0000, 0x0000, 0x0000, 0xdd74, 0xcafb,
-    0x31b4, 0x0000, 0x0000, 0x0000, 0x98b6, 0xbd8e, 0x3196, 0x0000, 0x0000, 0x0000,
-    0xe9de, 0x977f, 0x3177, 0x0000, 0x0000, 0x0000, 0x67c0, 0x818d, 0x3158, 0x0000,
-    0x0000, 0x0000, 0xe52a, 0x9322, 0x3139, 0x0000, 0x0000, 0x0000, 0xe568, 0x9b6c,
-    0x3119, 0x0000, 0x0000, 0x0000, 0x2358, 0xaa0a, 0x30fa, 0x0000, 0x0000, 0x0000,
-    0xe480, 0xe13b, 0x30d9, 0x0000, 0x0000, 0x0000, 0x3024, 0x90a1, 0x30bd, 0x0000,
-    0x0000, 0x0000, 0x9620, 0xda30, 0x309d, 0x0000, 0x0000, 0x0000, 0x898a, 0xb388,
-    0x307f, 0x0000, 0x0000, 0x0000, 0xb24c, 0xc891, 0x3060, 0x0000, 0x0000, 0x0000,
-    0x8056, 0xf98b, 0x3041, 0x0000, 0x0000, 0x0000, 0x72a4, 0xa1ea, 0x3021, 0x0000,
-    0x0000, 0x0000, 0x6af8, 0x9488, 0x3001, 0x0000, 0x0000, 0x0000, 0xe00c, 0xdfcb,
-    0x2fe4, 0x0000, 0x0000, 0x0000, 0xeeec, 0xc941, 0x2fc4, 0x0000, 0x0000, 0x0000,
-    0x53e0, 0xe70f, 0x2fa4, 0x0000, 0x0000, 0x0000, 0x8f60, 0x9c07, 0x2f85, 0x0000,
-    0x0000, 0x0000, 0xb328, 0xc3e7, 0x2f68, 0x0000, 0x0000, 0x0000, 0x9404, 0xf8c7,
-    0x2f48, 0x0000, 0x0000, 0x0000, 0x38e0, 0xc99f, 0x2f29, 0x0000, 0x0000, 0x0000,
-    0x9778, 0xd984, 0x2f09, 0x0000, 0x0000, 0x0000, 0xe700, 0xd142, 0x2eea, 0x0000,
-    0x0000, 0x0000, 0xd904, 0x9443, 0x2ecd, 0x0000, 0x0000, 0x0000, 0xd4ba, 0xae7e,
-    0x2eae, 0x0000, 0x0000, 0x0000, 0x8e5e, 0x8524, 0x2e8f, 0x0000, 0x0000, 0x0000,
-    0xb550, 0xc9ed, 0x2e6e, 0x0000, 0x0000, 0x0000, 0x53b8, 0x8648, 0x2e51, 0x0000,
-    0x0000, 0x0000, 0xdae4, 0x87f9, 0x2e32, 0x0000, 0x0000, 0x0000, 0x2942, 0xd966,
-    0x2e13, 0x0000, 0x0000, 0x0000, 0x4f28, 0xcf3c, 0x2df3, 0x0000, 0x0000, 0x0000,
-    0xfa40, 0xc4ef, 0x2dd1, 0x0000, 0x0000, 0x0000, 0x4424, 0xbca7, 0x2db5, 0x0000,
-    0x0000, 0x0000, 0x2e62, 0xcdc5, 0x2d97, 0x0000, 0x0000, 0x0000, 0xed88, 0x996b,
-    0x2d78, 0x0000, 0x0000, 0x0000, 0x7c30, 0xd97d, 0x2d56, 0x0000, 0x0000, 0x0000,
-    0xed26, 0xbf6e, 0x2d3a, 0x0000, 0x0000, 0x0000, 0x2918, 0x921b, 0x2d1a, 0x0000,
-    0x0000, 0x0000, 0x4e24, 0xe84e, 0x2cfb, 0x0000, 0x0000, 0x0000, 0x6dc0, 0x92ec,
-    0x2cdd, 0x0000, 0x0000, 0x0000, 0x4f2c, 0xacf8, 0x2cbd, 0x0000, 0x0000, 0x0000,
-    0xc634, 0xf094, 0x2c9e, 0x0000, 0x0000, 0x0000, 0xdc70, 0xe5d3, 0x2c7e, 0x0000,
-    0x0000, 0x0000, 0x2180, 0xa600, 0x2c5b, 0x0000, 0x0000, 0x0000, 0x8480, 0xd680,
-    0x2c3c, 0x0000, 0x0000, 0x0000, 0x8b24, 0xd63b, 0x2c22, 0x0000, 0x0000, 0x0000,
-    0x02e0, 0xaa47, 0x2c00, 0x0000, 0x0000, 0x0000, 0x9ad0, 0xee84, 0x2be3, 0x0000,
-    0x0000, 0x0000, 0xf7dc, 0xf699, 0x2bc6, 0x0000, 0x0000, 0x0000, 0xddde, 0xe490,
-    0x2ba7, 0x0000, 0x0000, 0x0000, 0x34a0, 0xb4fd, 0x2b85, 0x0000, 0x0000, 0x0000,
-    0x91b4, 0x8ef6, 0x2b68, 0x0000, 0x0000, 0x0000, 0xa3e0, 0xa2a7, 0x2b47, 0x0000,
-    0x0000, 0x0000, 0xcce4, 0x82b3, 0x2b2a, 0x0000, 0x0000, 0x0000, 0xe4be, 0x8207,
-    0x2b0c, 0x0000, 0x0000, 0x0000, 0x1d92, 0xab43, 0x2aed, 0x0000, 0x0000, 0x0000,
-    0xe818, 0xf9f6, 0x2acd, 0x0000, 0x0000, 0x0000, 0xff12, 0xba80, 0x2aaf, 0x0000,
-    0x0000, 0x0000, 0x5254, 0x8529, 0x2a90, 0x0000, 0x0000, 0x0000, 0x1b88, 0xe032,
-    0x2a71, 0x0000, 0x0000, 0x0000, 0x3248, 0xd86d, 0x2a50, 0x0000, 0x0000, 0x0000,
-    0x3140, 0xc9d5, 0x2a2e, 0x0000, 0x0000, 0x0000, 0x14e6, 0xbd47, 0x2a14, 0x0000,
-    0x0000, 0x0000, 0x5c10, 0xe544, 0x29f4, 0x0000, 0x0000, 0x0000, 0x9f50, 0x90b6,
-    0x29d4, 0x0000, 0x0000, 0x0000, 0x9850, 0xab55, 0x29b6, 0x0000, 0x0000, 0x0000,
-    0x2750, 0x9d07, 0x2998, 0x0000, 0x0000, 0x0000, 0x6700, 0x8bbb, 0x2973, 0x0000,
-    0x0000, 0x0000, 0x5dba, 0xed31, 0x295a, 0x0000, 0x0000, 0x0000, 0x61dc, 0x85fe,
-    0x293a, 0x0000, 0x0000, 0x0000, 0x9ba2, 0xd6b4, 0x291c, 0x0000, 0x0000, 0x0000,
-    0x2d30, 0xe3a5, 0x28fb, 0x0000, 0x0000, 0x0000, 0x6630, 0xb566, 0x28dd, 0x0000,
-    0x0000, 0x0000, 0x5ad4, 0xa829, 0x28bf, 0x0000, 0x0000, 0x0000, 0x89d8, 0xe290,
-    0x28a0, 0x0000, 0x0000, 0x0000, 0x3916, 0xc428, 0x2881, 0x0000, 0x0000, 0x0000,
-    0x0490, 0xbea4, 0x2860, 0x0000, 0x0000, 0x0000, 0xee06, 0x80ee, 0x2843, 0x0000,
-    0x0000, 0x0000, 0xfc00, 0xf327, 0x2820, 0x0000, 0x0000, 0x0000, 0xea40, 0xa871,
-    0x2800, 0x0000, 0x0000, 0x0000, 0x63d8, 0x9c26, 0x27e4, 0x0000, 0x0000, 0x0000,
-    0x07ba, 0xc0c9, 0x27c7, 0x0000, 0x0000, 0x0000, 0x3fa2, 0x9797, 0x27a8, 0x0000,
-    0x0000, 0x0000, 0x21c6, 0xfeca, 0x2789, 0x0000, 0x0000, 0x0000, 0xde40, 0x860d,
-    0x2768, 0x0000, 0x0000, 0x0000, 0x9cc8, 0x98ce, 0x2749, 0x0000, 0x0000, 0x0000,
-    0x3778, 0xa31c, 0x272a, 0x0000, 0x0000, 0x0000, 0xe778, 0xf6e2, 0x270b, 0x0000,
-    0x0000, 0x0000, 0x59b8, 0xf841, 0x26ed, 0x0000, 0x0000, 0x0000, 0x02e0, 0xad04,
-    0x26cd, 0x0000, 0x0000, 0x0000, 0x5a92, 0x9380, 0x26b0, 0x0000, 0x0000, 0x0000,
-    0xc740, 0x8886, 0x268d, 0x0000, 0x0000, 0x0000, 0x0680, 0xfaf8, 0x266c, 0x0000,
-    0x0000, 0x0000, 0xfb60, 0x897f, 0x2653, 0x0000, 0x0000, 0x0000, 0x8760, 0xf903,
-    0x2634, 0x0000, 0x0000, 0x0000, 0xad2a, 0xc2c8, 0x2615, 0x0000, 0x0000, 0x0000,
-    0x2d86, 0x8aef, 0x25f6, 0x0000, 0x0000, 0x0000, 0x1ef4, 0xe627, 0x25d6, 0x0000,
-    0x0000, 0x0000, 0x09e4, 0x8020, 0x25b7, 0x0000, 0x0000, 0x0000, 0x7548, 0xd227,
-    0x2598, 0x0000, 0x0000, 0x0000, 0x75dc, 0xfb5b, 0x2579, 0x0000, 0x0000, 0x0000,
-    0xea84, 0xc8b6, 0x255a, 0x0000, 0x0000, 0x0000, 0xe4d0, 0x8145, 0x253b, 0x0000,
-    0x0000, 0x0000, 0x3640, 0x9768, 0x251c, 0x0000, 0x0000, 0x0000, 0x246a, 0xccec,
-    0x24fe, 0x0000, 0x0000, 0x0000, 0x51d0, 0xa075, 0x24dd, 0x0000, 0x0000, 0x0000,
-    0x4638, 0xa385, 0x24bf, 0x0000, 0x0000, 0x0000, 0xd788, 0xd776, 0x24a1, 0x0000,
-    0x0000, 0x0000, 0x1370, 0x8997, 0x2482, 0x0000, 0x0000, 0x0000, 0x1e88, 0x9b67,
-    0x2462, 0x0000, 0x0000, 0x0000, 0x6c08, 0xd975, 0x2444, 0x0000, 0x0000, 0x0000,
-    0xfdb0, 0xcfc0, 0x2422, 0x0000, 0x0000, 0x0000, 0x3100, 0xc026, 0x2406, 0x0000,
-    0x0000, 0x0000, 0xc5b4, 0xae64, 0x23e6, 0x0000, 0x0000, 0x0000, 0x2280, 0xf687,
-    0x23c3, 0x0000, 0x0000, 0x0000, 0x2de0, 0x9006, 0x23a9, 0x0000, 0x0000, 0x0000,
-    0x24bc, 0xf631, 0x238a, 0x0000, 0x0000, 0x0000, 0xb8d4, 0xa975, 0x236b, 0x0000,
-    0x0000, 0x0000, 0xd9a4, 0xb949, 0x234b, 0x0000, 0x0000, 0x0000, 0xb54e, 0xbd39,
-    0x232d, 0x0000, 0x0000, 0x0000, 0x4aac, 0x9a52, 0x230e, 0x0000, 0x0000, 0x0000,
-    0xbbbc, 0xd085, 0x22ef, 0x0000, 0x0000, 0x0000, 0xdf18, 0xc633, 0x22cf, 0x0000,
-    0x0000, 0x0000, 0x16d0, 0xeca5, 0x22af, 0x0000, 0x0000, 0x0000, 0xf2a0, 0xdf6f,
-    0x228e, 0x0000, 0x0000, 0x0000, 0x8c44, 0xe86b, 0x2272, 0x0000, 0x0000, 0x0000,
-    0x35c0, 0xbbf4, 0x2253, 0x0000, 0x0000, 0x0000, 0x0c40, 0xdafb, 0x2230, 0x0000,
-    0x0000, 0x0000, 0x92dc, 0x9935, 0x2216, 0x0000, 0x0000, 0x0000, 0x0ca0, 0xbda6,
-    0x21f3, 0x0000, 0x0000, 0x0000, 0x5958, 0xa6fd, 0x21d6, 0x0000, 0x0000, 0x0000,
-    0xa3dc, 0x9d7f, 0x21b9, 0x0000, 0x0000, 0x0000, 0x79dc, 0xfcb5, 0x2199, 0x0000,
-    0x0000, 0x0000, 0xf264, 0xcebb, 0x217b, 0x0000, 0x0000, 0x0000, 0x0abe, 0x8308,
-    0x215c, 0x0000, 0x0000, 0x0000, 0x30ae, 0xb463, 0x213d, 0x0000, 0x0000, 0x0000,
-    0x6228, 0xb040, 0x211c, 0x0000, 0x0000, 0x0000, 0xc9b2, 0xf43b, 0x20ff, 0x0000,
-    0x0000, 0x0000, 0x3d8e, 0xa4b3, 0x20e0, 0x0000, 0x0000, 0x0000, 0x84e6, 0x8dab,
-    0x20c1, 0x0000, 0x0000, 0x0000, 0xa124, 0x9b74, 0x20a1, 0x0000, 0x0000, 0x0000,
-    0xc276, 0xd497, 0x2083, 0x0000, 0x0000, 0x0000, 0x6354, 0xa466, 0x2063, 0x0000,
-    0x0000, 0x0000, 0x8654, 0xaf0a, 0x2044, 0x0000, 0x0000, 0x0000, 0x1d20, 0xfa5c,
-    0x2024, 0x0000, 0x0000, 0x0000, 0xbcd0, 0xf3f0, 0x2004, 0x0000, 0x0000, 0x0000,
-    0xedf0, 0xf0b6, 0x1fe7, 0x0000, 0x0000, 0x0000, 0x45bc, 0x9182, 0x1fc9, 0x0000,
-    0x0000, 0x0000, 0xe254, 0xdc85, 0x1faa, 0x0000, 0x0000, 0x0000, 0xb898, 0xe9b1,
-    0x1f8a, 0x0000, 0x0000, 0x0000, 0x0ebe, 0xe6f0, 0x1f6c, 0x0000, 0x0000, 0x0000,
-    0xa9b8, 0xf584, 0x1f4c, 0x0000, 0x0000, 0x0000, 0x12e8, 0xdf6b, 0x1f2e, 0x0000,
-    0x0000, 0x0000, 0x9f9e, 0xcd55, 0x1f0f, 0x0000, 0x0000, 0x0000, 0x05a0, 0xec3a,
-    0x1eef, 0x0000, 0x0000, 0x0000, 0xd8e0, 0x96f8, 0x1ed1, 0x0000, 0x0000, 0x0000,
-    0x3bd4, 0xccc6, 0x1eb1, 0x0000, 0x0000, 0x0000, 0x4910, 0xb87b, 0x1e93, 0x0000,
-    0x0000, 0x0000, 0xbefc, 0xd40b, 0x1e73, 0x0000, 0x0000, 0x0000, 0x317e, 0xa406,
-    0x1e55, 0x0000, 0x0000, 0x0000, 0x6bb2, 0xc2b2, 0x1e36, 0x0000, 0x0000, 0x0000,
-    0xb87e, 0xbb78, 0x1e17, 0x0000, 0x0000, 0x0000, 0xa03c, 0xdbbd, 0x1df7, 0x0000,
-    0x0000, 0x0000, 0x5b6c, 0xe3c8, 0x1dd9, 0x0000, 0x0000, 0x0000, 0x8968, 0xca8e,
-    0x1dba, 0x0000, 0x0000, 0x0000, 0xc024, 0xe6ab, 0x1d9a, 0x0000, 0x0000, 0x0000,
-    0x4110, 0xd4eb, 0x1d7a, 0x0000, 0x0000, 0x0000, 0xa168, 0xbdb5, 0x1d5d, 0x0000,
-    0x0000, 0x0000, 0x012e, 0xa5fa, 0x1d3e, 0x0000, 0x0000, 0x0000, 0x6838, 0x9c1f,
-    0x1d1e, 0x0000, 0x0000, 0x0000, 0xa158, 0xaa76, 0x1d00, 0x0000, 0x0000, 0x0000,
-    0x090a, 0xbd95, 0x1ce1, 0x0000, 0x0000, 0x0000, 0xf73e, 0x8b6d, 0x1cc2, 0x0000,
-    0x0000, 0x0000, 0x5fda, 0xbcbf, 0x1ca3, 0x0000, 0x0000, 0x0000, 0xdbe8, 0xb89f,
-    0x1c84, 0x0000, 0x0000, 0x0000, 0x6e4c, 0x96c7, 0x1c64, 0x0000, 0x0000, 0x0000,
-    0x19c2, 0xf2a4, 0x1c46, 0x0000, 0x0000, 0x0000, 0xb800, 0xf855, 0x1c1e, 0x0000,
-    0x0000, 0x0000, 0x87fc, 0x85ff, 0x1c08, 0x0000, 0x0000, 0x0000, 0x1418, 0x839f,
-    0x1be9, 0x0000, 0x0000, 0x0000, 0x6186, 0xd9d8, 0x1bca, 0x0000, 0x0000, 0x0000,
-    0xf500, 0xabaa, 0x1ba6, 0x0000, 0x0000, 0x0000, 0x7b36, 0xdafe, 0x1b8c, 0x0000,
-    0x0000, 0x0000, 0xf394, 0xe6d8, 0x1b6c, 0x0000, 0x0000, 0x0000, 0x6efc, 0x9e55,
-    0x1b4e, 0x0000, 0x0000, 0x0000, 0x5e10, 0xc523, 0x1b2e, 0x0000, 0x0000, 0x0000,
-    0x8210, 0xb6f9, 0x1b0d, 0x0000, 0x0000, 0x0000, 0x9ab0, 0x96e3, 0x1af1, 0x0000,
-    0x0000, 0x0000, 0x3864, 0x92e7, 0x1ad1, 0x0000, 0x0000, 0x0000, 0x9878, 0xdc65,
-    0x1ab1, 0x0000, 0x0000, 0x0000, 0xfa20, 0xd6cb, 0x1a94, 0x0000, 0x0000, 0x0000,
-    0x6c00, 0xa4e4, 0x1a70, 0x0000, 0x0000, 0x0000, 0xab40, 0xb41b, 0x1a53, 0x0000,
-    0x0000, 0x0000, 0x43a4, 0x8ede, 0x1a37, 0x0000, 0x0000, 0x0000, 0x22e0, 0x9314,
-    0x1a15, 0x0000, 0x0000, 0x0000, 0x6170, 0xb949, 0x19f8, 0x0000, 0x0000, 0x0000,
-    0x6b00, 0xe056, 0x19d8, 0x0000, 0x0000, 0x0000, 0x9ba8, 0xa94c, 0x19b9, 0x0000,
-    0x0000, 0x0000, 0xfaa0, 0xaa16, 0x199b, 0x0000, 0x0000, 0x0000, 0x899a, 0xf627,
-    0x197d, 0x0000, 0x0000, 0x0000, 0x9f20, 0xfb70, 0x195d, 0x0000, 0x0000, 0x0000,
-    0xa4b8, 0xc176, 0x193e, 0x0000, 0x0000, 0x0000, 0xb21c, 0x85c3, 0x1920, 0x0000,
-    0x0000, 0x0000, 0x50d2, 0x9b19, 0x1901, 0x0000, 0x0000, 0x0000, 0xd4b0, 0xb708,
-    0x18e0, 0x0000, 0x0000, 0x0000, 0xfb88, 0xf510, 0x18c1, 0x0000, 0x0000, 0x0000,
-    0x31ec, 0xdc8d, 0x18a3, 0x0000, 0x0000, 0x0000, 0x3c00, 0xbff9, 0x1885, 0x0000,
-    0x0000, 0x0000, 0x5020, 0xc30b, 0x1862, 0x0000, 0x0000, 0x0000, 0xd4f0, 0xda0c,
-    0x1844, 0x0000, 0x0000, 0x0000, 0x20d2, 0x99a5, 0x1828, 0x0000, 0x0000, 0x0000,
-    0x852e, 0xd159, 0x1809, 0x0000, 0x0000, 0x0000, 0x7cd8, 0x97a1, 0x17e9, 0x0000,
-    0x0000, 0x0000, 0x423a, 0x997b, 0x17cb, 0x0000, 0x0000, 0x0000, 0xc1c0, 0xbe7d,
-    0x17a8, 0x0000, 0x0000, 0x0000, 0xe8bc, 0xdcdd, 0x178d, 0x0000, 0x0000, 0x0000,
-    0x8b28, 0xae06, 0x176e, 0x0000, 0x0000, 0x0000, 0x102e, 0xb8d4, 0x174f, 0x0000,
-    0x0000, 0x0000, 0xaa00, 0xaa5c, 0x172f, 0x0000, 0x0000, 0x0000, 0x51f0, 0x9fc0,
-    0x170e, 0x0000, 0x0000, 0x0000, 0xf858, 0xe181, 0x16f2, 0x0000, 0x0000, 0x0000,
-    0x91a8, 0x8162, 0x16d3, 0x0000, 0x0000, 0x0000, 0x5f40, 0xcb6f, 0x16b1, 0x0000,
-    0x0000, 0x0000, 0xbb50, 0xe55f, 0x1693, 0x0000, 0x0000, 0x0000, 0xacd2, 0xd895,
-    0x1676, 0x0000, 0x0000, 0x0000, 0xef30, 0x97bf, 0x1654, 0x0000, 0x0000, 0x0000,
-    0xf700, 0xb3d7, 0x1633, 0x0000, 0x0000, 0x0000, 0x3454, 0xa7b5, 0x1619, 0x0000,
-    0x0000, 0x0000, 0x6b00, 0xa929, 0x15f6, 0x0000, 0x0000, 0x0000, 0x9f04, 0x89f7,
-    0x15db, 0x0000, 0x0000, 0x0000, 0xad78, 0xd985, 0x15bc, 0x0000, 0x0000, 0x0000,
-    0xa46a, 0xae3f, 0x159d, 0x0000, 0x0000, 0x0000, 0x63a0, 0xd0da, 0x157c, 0x0000,
-    0x0000, 0x0000, 0x5e90, 0x817d, 0x155e, 0x0000, 0x0000, 0x0000, 0x1494, 0xb13f,
-    0x1540, 0x0000, 0x0000, 0x0000, 0x0090, 0x9c40, 0x1521, 0x0000, 0x0000, 0x0000,
-    0xdd70, 0xcc86, 0x1500, 0x0000, 0x0000, 0x0000, 0x64f8, 0xdb6f, 0x14e1, 0x0000,
-    0x0000, 0x0000, 0xe22c, 0xac17, 0x14c3, 0x0000, 0x0000, 0x0000, 0x60e0, 0xa9ad,
-    0x14a3, 0x0000, 0x0000, 0x0000, 0x4640, 0xd658, 0x1481, 0x0000, 0x0000, 0x0000,
-    0x6490, 0xa181, 0x1467, 0x0000, 0x0000, 0x0000, 0x1df4, 0xaaa2, 0x1447, 0x0000,
-    0x0000, 0x0000, 0xb94a, 0x8f61, 0x1429, 0x0000, 0x0000, 0x0000, 0x5198, 0x9d83,
-    0x1409, 0x0000, 0x0000, 0x0000, 0x0f7a, 0xa818, 0x13eb, 0x0000, 0x0000, 0x0000,
-    0xc45e, 0xc06c, 0x13cc, 0x0000, 0x0000, 0x0000, 0x4ec0, 0xfa29, 0x13a8, 0x0000,
-    0x0000, 0x0000, 0x6418, 0x8cad, 0x138c, 0x0000, 0x0000, 0x0000, 0xbcc8, 0xe7d1,
-    0x136f, 0x0000, 0x0000, 0x0000, 0xc934, 0xf9b0, 0x134f, 0x0000, 0x0000, 0x0000,
-    0x6ce0, 0x98df, 0x1331, 0x0000, 0x0000, 0x0000, 0x3516, 0xe5e9, 0x1312, 0x0000,
-    0x0000, 0x0000, 0xc6c0, 0xef8b, 0x12ef, 0x0000, 0x0000, 0x0000, 0xaf02, 0x913d,
-    0x12d4, 0x0000, 0x0000, 0x0000, 0xd230, 0xe1d5, 0x12b5, 0x0000, 0x0000, 0x0000,
-    0xfba8, 0xc232, 0x1295, 0x0000, 0x0000, 0x0000, 0x7ba4, 0xabeb, 0x1277, 0x0000,
-    0x0000, 0x0000, 0x6e5c, 0xc692, 0x1258, 0x0000, 0x0000, 0x0000, 0x76a2, 0x9756,
-    0x1239, 0x0000, 0x0000, 0x0000, 0xe180, 0xe423, 0x1214, 0x0000, 0x0000, 0x0000,
-    0x8c3c, 0x90f8, 0x11fb, 0x0000, 0x0000, 0x0000, 0x9f3c, 0x9fd2, 0x11dc, 0x0000,
-    0x0000, 0x0000, 0x53e0, 0xb73e, 0x11bd, 0x0000, 0x0000, 0x0000, 0x45be, 0x88d6,
-    0x119e, 0x0000, 0x0000, 0x0000, 0x111a, 0x8bc0, 0x117f, 0x0000, 0x0000, 0x0000,
-    0xe26a, 0xd7ff, 0x1160, 0x0000, 0x0000, 0x0000, 0xfb60, 0xdd8d, 0x113f, 0x0000,
-    0x0000, 0x0000, 0x9370, 0xc108, 0x1120, 0x0000, 0x0000, 0x0000, 0x9654, 0x8baf,
-    0x1103, 0x0000, 0x0000, 0x0000, 0xd6ec, 0xd6b9, 0x10e4, 0x0000, 0x0000, 0x0000,
-    0x23e4, 0xd7b7, 0x10c4, 0x0000, 0x0000, 0x0000, 0x1aa6, 0xa847, 0x10a6, 0x0000,
-    0x0000, 0x0000, 0xbee6, 0x9fef, 0x1087, 0x0000, 0x0000, 0x0000, 0x26d0, 0xa6eb,
-    0x1066, 0x0000, 0x0000, 0x0000, 0x5b86, 0xa880, 0x1049, 0x0000, 0x0000, 0x0000,
-    0x125c, 0xd971, 0x1029, 0x0000, 0x0000, 0x0000, 0x1f78, 0x9d18, 0x100a, 0x0000,
-    0x0000, 0x0000, 0x0e84, 0xb15b, 0x0feb, 0x0000, 0x0000, 0x0000, 0xd0c0, 0xc150,
-    0x0fcc, 0x0000, 0x0000, 0x0000, 0xa330, 0xc40c, 0x0fad, 0x0000, 0x0000, 0x0000,
-    0x5202, 0xfc2c, 0x0f8f, 0x0000, 0x0000, 0x0000, 0x3f7c, 0xecf5, 0x0f6f, 0x0000,
-    0x0000, 0x0000, 0xef44, 0xfdfd, 0x0f50, 0x0000, 0x0000, 0x0000, 0x3f6c, 0xab1b,
-    0x0f31, 0x0000, 0x0000, 0x0000, 0xf658, 0x89ec, 0x0f11, 0x0000, 0x0000, 0x0000,
-    0xbfc8, 0x9ba8, 0x0ef4, 0x0000, 0x0000, 0x0000, 0x3d40, 0xbe21, 0x0ed5, 0x0000,
-    0x0000, 0x0000, 0xbbc4, 0xc70d, 0x0eb6, 0x0000, 0x0000, 0x0000, 0x5158, 0xdb16,
-    0x0e96, 0x0000, 0x0000, 0x0000, 0xb5a8, 0xa8d8, 0x0e78, 0x0000, 0x0000, 0x0000,
-    0xcccc, 0xb40e, 0x0e58, 0x0000, 0x0000, 0x0000, 0x448c, 0xcb62, 0x0e3a, 0x0000,
-    0x0000, 0x0000, 0xf12a, 0x8aed, 0x0e1b, 0x0000, 0x0000, 0x0000, 0x79d0, 0xc59c,
-    0x0dfb, 0x0000, 0x0000, 0x0000, 0x06b4, 0xcdc9, 0x0ddd, 0x0000, 0x0000, 0x0000,
-    0xae70, 0xa979, 0x0dbe, 0x0000, 0x0000, 0x0000, 0x317c, 0xa8fb, 0x0d9e, 0x0000,
-    0x0000, 0x0000, 0x5fe0, 0x8a50, 0x0d7d, 0x0000, 0x0000, 0x0000, 0x70b6, 0xfdfa,
-    0x0d61, 0x0000, 0x0000, 0x0000, 0x1640, 0x9dc7, 0x0d41, 0x0000, 0x0000, 0x0000,
-    0x9a9c, 0xdc50, 0x0d23, 0x0000, 0x0000, 0x0000, 0x4fcc, 0x9a9b, 0x0d04, 0x0000,
-    0x0000, 0x0000, 0x7e48, 0x8f77, 0x0ce5, 0x0000, 0x0000, 0x0000, 0x84e4, 0xd4b9,
-    0x0cc6, 0x0000, 0x0000, 0x0000, 0x84e0, 0xbd10, 0x0ca6, 0x0000, 0x0000, 0x0000,
-    0x1b0a, 0xc8d9, 0x0c88, 0x0000, 0x0000, 0x0000, 0x6a48, 0xfc81, 0x0c68, 0x0000,
-    0x0000, 0x0000, 0x070a, 0xbef6, 0x0c4a, 0x0000, 0x0000, 0x0000, 0x8a70, 0xf096,
-    0x0c2b, 0x0000, 0x0000, 0x0000, 0xecc2, 0xc994, 0x0c0c, 0x0000, 0x0000, 0x0000,
-    0x1540, 0x9537, 0x0bea, 0x0000, 0x0000, 0x0000, 0x1b02, 0xab5b, 0x0bce, 0x0000,
-    0x0000, 0x0000, 0x5dc0, 0xb0c8, 0x0bad, 0x0000, 0x0000, 0x0000, 0xc928, 0xe034,
-    0x0b8f, 0x0000, 0x0000, 0x0000, 0x2d12, 0xb4b0, 0x0b71, 0x0000, 0x0000, 0x0000,
-    0x8fc2, 0xbb94, 0x0b52, 0x0000, 0x0000, 0x0000, 0xe236, 0xe22f, 0x0b33, 0x0000,
-    0x0000, 0x0000, 0xb97c, 0xbe9e, 0x0b13, 0x0000, 0x0000, 0x0000, 0xe1a6, 0xe16d,
-    0x0af5, 0x0000, 0x0000, 0x0000, 0xd330, 0xbaf0, 0x0ad6, 0x0000, 0x0000, 0x0000,
-    0xc0bc, 0xbbd0, 0x0ab7, 0x0000, 0x0000, 0x0000, 0x8e66, 0xdd9b, 0x0a98, 0x0000,
-    0x0000, 0x0000, 0xc95c, 0xf799, 0x0a79, 0x0000, 0x0000, 0x0000, 0xdac0, 0xbe4c,
-    0x0a55, 0x0000, 0x0000, 0x0000, 0xafc0, 0xc378, 0x0a37, 0x0000, 0x0000, 0x0000,
-    0xa880, 0xe341, 0x0a19, 0x0000, 0x0000, 0x0000, 0xc242, 0x81f6, 0x09fd, 0x0000,
-    0x0000, 0x0000, 0x7470, 0xc777, 0x09de, 0x0000, 0x0000, 0x0000, 0x62bc, 0xb684,
-    0x09be, 0x0000, 0x0000, 0x0000, 0x43ac, 0x8c58, 0x099f, 0x0000, 0x0000, 0x0000,
-    0xcc3c, 0xf9ac, 0x0981, 0x0000, 0x0000, 0x0000, 0x1526, 0xb670, 0x0962, 0x0000,
-    0x0000, 0x0000, 0xc9fe, 0xdf50, 0x0943, 0x0000, 0x0000, 0x0000, 0x6ae6, 0xc065,
-    0x0924, 0x0000, 0x0000, 0x0000, 0xb114, 0xcf29, 0x0905, 0x0000, 0x0000, 0x0000,
-    0xd388, 0x922a, 0x08e4, 0x0000, 0x0000, 0x0000, 0xcf54, 0xb926, 0x08c7, 0x0000,
-    0x0000, 0x0000, 0x3826, 0xe855, 0x08a8, 0x0000, 0x0000, 0x0000, 0xe7c8, 0x829b,
-    0x0888, 0x0000, 0x0000, 0x0000, 0x546c, 0xa903, 0x086a, 0x0000, 0x0000, 0x0000,
-    0x8768, 0x99cc, 0x0849, 0x0000, 0x0000, 0x0000, 0x00ac, 0xf529, 0x082b, 0x0000,
-    0x0000, 0x0000, 0x2658, 0x9f0b, 0x080c, 0x0000, 0x0000, 0x0000, 0xfe5c, 0x9e21,
-    0x07ee, 0x0000, 0x0000, 0x0000, 0x6da2, 0x9910, 0x07cf, 0x0000, 0x0000, 0x0000,
-    0x9220, 0xf9b3, 0x07b0, 0x0000, 0x0000, 0x0000, 0x3d90, 0xa541, 0x0791, 0x0000,
-    0x0000, 0x0000, 0x6e4c, 0xe7cc, 0x0771, 0x0000, 0x0000, 0x0000, 0xa8fa, 0xe80a,
-    0x0753, 0x0000, 0x0000, 0x0000, 0x4e14, 0xc3a7, 0x0734, 0x0000, 0x0000, 0x0000,
-    0xf7e0, 0xbad9, 0x0712, 0x0000, 0x0000, 0x0000, 0xfea0, 0xeff2, 0x06f5, 0x0000,
-    0x0000, 0x0000, 0xcef6, 0xbd48, 0x06d7, 0x0000, 0x0000, 0x0000, 0x7544, 0xf559,
-    0x06b7, 0x0000, 0x0000, 0x0000, 0x2388, 0xf655, 0x0698, 0x0000, 0x0000, 0x0000,
-    0xe900, 0xad56, 0x0676, 0x0000, 0x0000, 0x0000, 0x2cc0, 0x8437, 0x0659, 0x0000,
-    0x0000, 0x0000, 0x3068, 0xc544, 0x063b, 0x0000, 0x0000, 0x0000, 0xdc70, 0xe73c,
-    0x061b, 0x0000, 0x0000, 0x0000, 0xee50, 0x9d49, 0x05fc, 0x0000, 0x0000, 0x0000,
-    0x93d2, 0x81f6, 0x05df, 0x0000, 0x0000, 0x0000, 0x941c, 0xadff, 0x05bf, 0x0000,
-    0x0000, 0x0000, 0x2ce2, 0x8e45, 0x05a1, 0x0000, 0x0000, 0x0000, 0x4a60, 0x95fd,
-    0x0581, 0x0000, 0x0000, 0x0000, 0x79f8, 0xb83a, 0x0563, 0x0000, 0x0000, 0x0000,
-    0xcb58, 0xa1f5, 0x0543, 0x0000, 0x0000, 0x0000, 0x2a3a, 0xdc36, 0x0525, 0x0000,
-    0x0000, 0x0000, 0x14ee, 0x890e, 0x0506, 0x0000, 0x0000, 0x0000, 0x8f20, 0xc432,
-    0x04e3, 0x0000, 0x0000, 0x0000, 0x8440, 0xb21d, 0x04c6, 0x0000, 0x0000, 0x0000,
-    0x5430, 0xf698, 0x04a7, 0x0000, 0x0000, 0x0000, 0x04ae, 0x8b20, 0x048a, 0x0000,
-    0x0000, 0x0000, 0x04d0, 0xe872, 0x046b, 0x0000, 0x0000, 0x0000, 0xc78e, 0x8893,
-    0x044c, 0x0000, 0x0000, 0x0000, 0x0f78, 0x9895, 0x042b, 0x0000, 0x0000, 0x0000,
-    0x11d4, 0xdf2e, 0x040d, 0x0000, 0x0000, 0x0000, 0xe84c, 0x89d5, 0x03ef, 0x0000,
-    0x0000, 0x0000, 0xf7be, 0x8a67, 0x03d0, 0x0000, 0x0000, 0x0000, 0x95d0, 0xc906,
-    0x03b1, 0x0000, 0x0000, 0x0000, 0x64ce, 0xd96c, 0x0392, 0x0000, 0x0000, 0x0000,
-    0x97ba, 0xa16f, 0x0373, 0x0000, 0x0000, 0x0000, 0x463c, 0xc51a, 0x0354, 0x0000,
-    0x0000, 0x0000, 0xef0a, 0xe93e, 0x0335, 0x0000, 0x0000, 0x0000, 0x526a, 0xa466,
-    0x0316, 0x0000, 0x0000, 0x0000, 0x4140, 0xa94d, 0x02f5, 0x0000, 0x0000, 0x0000,
-    0xb4ec, 0xce68, 0x02d8, 0x0000, 0x0000, 0x0000, 0x4fa2, 0x8490, 0x02b9, 0x0000,
-    0x0000, 0x0000, 0x4e60, 0xca98, 0x0298, 0x0000, 0x0000, 0x0000, 0x08dc, 0xe09c,
-    0x027a, 0x0000, 0x0000, 0x0000, 0x2b90, 0xc7e3, 0x025c, 0x0000, 0x0000, 0x0000,
-    0x5a7c, 0xf8ef, 0x023c, 0x0000, 0x0000, 0x0000, 0x5022, 0x9d58, 0x021e, 0x0000,
-    0x0000, 0x0000, 0x553a, 0xe242, 0x01ff, 0x0000, 0x0000, 0x0000, 0x7e6e, 0xb54d,
-    0x01e0, 0x0000, 0x0000, 0x0000, 0xd2d4, 0xa88c, 0x01c1, 0x0000, 0x0000, 0x0000,
-    0x75b6, 0xfe6d, 0x01a2, 0x0000, 0x0000, 0x0000, 0x3bb2, 0xf04c, 0x0183, 0x0000,
-    0x0000, 0x0000, 0xc2d0, 0xc046, 0x0163, 0x0000, 0x0000, 0x0000, 0x250c, 0xf9d6,
-    0x0145, 0x0000, 0x0000, 0x0000, 0xb7b4, 0x8a0d, 0x0126, 0x0000, 0x0000, 0x0000,
-    0x1a72, 0xe4f5, 0x0107, 0x0000, 0x0000, 0x0000, 0x825c, 0xa9b8, 0x00e8, 0x0000,
-    0x0000, 0x0000, 0x6c90, 0xc9ad, 0x00c6, 0x0000, 0x0000, 0x0000, 0x4d00, 0xd1bb,
-    0x00aa, 0x0000, 0x0000, 0x0000, 0xa4a0, 0xee01, 0x0087, 0x0000, 0x0000, 0x0000,
-    0x89a8, 0xbe9f, 0x006b, 0x0000, 0x0000, 0x0000, 0x038e, 0xc80c, 0x004d, 0x0000,
-    0x0000, 0x0000, 0xfe26, 0x8384, 0x002e, 0x0000, 0x0000, 0x0000, 0xcd90, 0xca57,
-    0x000e, 0x0000
-};
-
-void MacroAssembler::libm_reduce_pi04l(Register eax, Register ecx, Register edx, Register ebx, Register esi, Register edi, Register ebp, Register esp) {
-  Label B1_1, B1_2, B1_3, B1_4, B1_5, B1_6, B1_7, B1_8, B1_9, B1_10, B1_11, B1_12;
-  Label B1_13, B1_14, B1_15;
-
-  assert_different_registers(ebx, eax, ecx, edx, esi, edi, ebp, esp);
-
-  address zero_none = (address)_zero_none;
-  address _4onpi_d = (address)__4onpi_d;
-  address TWO_32H = (address)_TWO_32H;
-  address pi04_3d = (address)_pi04_3d;
-  address pi04_5d = (address)_pi04_5d;
-  address SCALE = (address)_SCALE;
-  address zeros = (address)_zeros;
-  address pi04_2d = (address)_pi04_2d;
-  address TWO_12H = (address)_TWO_12H;
-  address _4onpi_31l = (address)__4onpi_31l;
-
-  bind(B1_1);
-  push(ebp);
-  movl(ebp, esp);
-  andl(esp, -16);
-  push(esi);
-  push(edi);
-  push(ebx);
-  subl(esp, 20);
-  movzwl(ebx, Address(ebp, 16));
-  andl(ebx, 32767);
-  movl(eax, Address(ebp, 20));
-  cmpl(ebx, 16413);
-  movl(esi, Address(ebp, 24));
-  movl(Address(esp, 4), eax);
-  jcc(Assembler::greaterEqual, B1_8);
-
-  bind(B1_2);
-  fld_x(Address(ebp, 8));
-  fld_d(ExternalAddress(_4onpi_d));    //0x6dc9c883UL, 0x3ff45f30UL
-  fmul(1);
-  fstp_x(Address(esp, 8));
-  movzwl(ecx, Address(esp, 16));
-  negl(ecx);
-  addl(ecx, 30);
-  movl(eax, Address(esp, 12));
-  shrl(eax);
-  cmpl(Address(esp, 4), 0);
-  jcc(Assembler::notEqual, B1_4);
-
-  bind(B1_3);
-  lea(ecx, Address(eax, 1));
-  andl(ecx, -2);
-  jmp(B1_5);
-
-  bind(B1_4);
-  movl(ecx, eax);
-  addl(eax, Address(esp, 4));
-  movl(edx, eax);
-  andl(edx, 1);
-  addl(ecx, edx);
-
-  bind(B1_5);
-  fld_d(ExternalAddress(TWO_32H));    //0x00000000UL, 0x41f80000UL
-  cmpl(ebx, 16400);
-  movl(Address(esp, 0), ecx);
-  fild_s(Address(esp, 0));
-  jcc(Assembler::greaterEqual, B1_7);
-
-  bind(B1_6);
-  fld_d(ExternalAddress(pi04_3d));    //0x54442d00UL, 0x3fe921fbUL
-  fmul(1);
-  fsubp(3);
-  fxch(1);
-  fmul(2);
-  fld_s(2);
-  fadd(1);
-  fsubrp(1);
-  fld_s(0);
-  fxch(1);
-  fsuba(3);
-  fld_d(ExternalAddress(8 + pi04_3d));    //0x98cc5180UL, 0x3ce84698UL
-  fmul(3);
-  fsuba(2);
-  fxch(1);
-  fsub(2);
-  fsubrp(1);
-  faddp(3);
-  fld_d(ExternalAddress(16 + pi04_3d));    //0xcbb5bf6cUL, 0xb9dfc8f8UL
-  fmulp(2);
-  fld_s(1);
-  fsubr(1);
-  fsuba(1);
-  fxch(2);
-  fsubp(1);
-  faddp(2);
-  fxch(1);
-  jmp(B1_15);
-
-  bind(B1_7);
-  fld_d(ExternalAddress(pi04_5d));    //0x54400000UL, 0x3fe921fbUL
-  fmul(1);
-  fsubp(3);
-  fxch(1);
-  fmul(2);
-  fld_s(2);
-  fadd(1);
-  fsubrp(1);
-  fld_s(0);
-  fxch(1);
-  fsuba(3);
-  fld_d(ExternalAddress(8 + pi04_5d));    //0x1a600000UL, 0x3dc0b461UL
-  fmul(3);
-  fsuba(2);
-  fxch(1);
-  fsub(2);
-  fsubrp(1);
-  faddp(3);
-  fld_d(ExternalAddress(16 + pi04_5d));    //0x2e000000UL, 0x3b93198aUL
-  fmul(2);
-  fld_s(0);
-  fsubr(2);
-  fsuba(2);
-  fxch(1);
-  fsubp(2);
-  fxch(1);
-  faddp(3);
-  fld_d(ExternalAddress(24 + pi04_5d));    //0x25200000UL, 0x396b839aUL
-  fmul(2);
-  fld_s(0);
-  fsubr(2);
-  fsuba(2);
-  fxch(1);
-  fsubp(2);
-  fxch(1);
-  faddp(3);
-  fld_d(ExternalAddress(32 + pi04_5d));    //0x533e63a0UL, 0x37027044UL
-  fmulp(2);
-  fld_s(1);
-  fsubr(1);
-  fsuba(1);
-  fxch(2);
-  fsubp(1);
-  faddp(2);
-  fxch(1);
-  jmp(B1_15);
-
-  bind(B1_8);
-  fld_x(Address(ebp, 8));
-  addl(ebx, -16417);
-  fmul_d(as_Address(ExternalAddress(SCALE)));    //0x00000000UL, 0x32600000UL
-  movl(eax, -2078209981);
-  imull(ebx);
-  addl(edx, ebx);
-  movl(ecx, ebx);
-  sarl(edx, 4);
-  sarl(ecx, 31);
-  subl(edx, ecx);
-  movl(eax, edx);
-  shll(eax, 5);
-  fstp_x(Address(ebp, 8));
-  fld_x(Address(ebp, 8));
-  subl(eax, edx);
-  movl(Address(ebp, 8), 0);
-  subl(ebx, eax);
-  fld_x(Address(ebp, 8));
-  cmpl(ebx, 17);
-  fsuba(1);
-  jcc(Assembler::less, B1_10);
-
-  bind(B1_9);
-  lea(eax, Address(noreg, edx, Address::times_8));
-  lea(ecx, Address(eax, edx, Address::times_4));
-  incl(edx);
-  fld_x(Address(_4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
-  fmul(2);
-  fld_x(Address(12 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
-  fmul(2);
-  fld_s(0);
-  fadd(2);
-  fsuba(2);
-  fxch(1);
-  faddp(2);
-  fld_s(1);
-  fadd(1);
-  fstp_x(Address(esp, 8));
-  andl(Address(esp, 8), -16777216);
-  fld_x(Address(esp, 8));
-  fsubp(1);
-  jmp(B1_11);
-
-  bind(B1_10);
-  fld_d(ExternalAddress(zeros));    //0x00000000UL, 0x00000000UL
-  fld_s(0);
-
-  bind(B1_11);
-  fld_s(0);
-  lea(eax, Address(noreg, edx, Address::times_8));
-  fld_s(3);
-  lea(edx, Address(eax, edx, Address::times_4));
-  fld_x(Address(_4onpi_31l, RelocationHolder::none).plus_disp(edx, Address::times_1));
-  fmul(6);
-  movl(Address(esp, 0), edx);
-  fadda(2);
-  fxch(2);
-  fsuba(3);
-  fxch(2);
-  faddp(3);
-  fxch(2);
-  faddp(3);
-  fld_x(Address(12 + _4onpi_31l, RelocationHolder::none).plus_disp(edx, Address::times_1));
-  fmula(2);
-  fld_s(2);
-  fadd(2);
-  fld_s(0);
-  fxch(1);
-  fsubra(3);
-  fxch(3);
-  fchs();
-  faddp(4);
-  fxch(3);
-  faddp(4);
-  fxch(2);
-  fadd(3);
-  fxch(2);
-  fmul(5);
-  fadda(2);
-  fld_s(4);
-  fld_x(Address(24 + _4onpi_31l, RelocationHolder::none).plus_disp(edx, Address::times_1));
-  fmula(1);
-  fxch(1);
-  fadda(4);
-  fxch(4);
-  fstp_x(Address(esp, 8));
-  movzwl(ebx, Address(esp, 16));
-  andl(ebx, 32767);
-  cmpl(ebx, 16415);
-  jcc(Assembler::greaterEqual, B1_13);
-
-  bind(B1_12);
-  negl(ebx);
-  addl(ebx, 30);
-  movl(ecx, ebx);
-  movl(eax, Address(esp, 12));
-  shrl(eax);
-  shll(eax);
-  movl(Address(esp, 12), eax);
-  movl(Address(esp, 8), 0);
-  shrl(eax);
-  jmp(B1_14);
-
-  bind(B1_13);
-  negl(ebx);
-  addl(ebx, 30);
-  movl(ecx, ebx);
-  movl(edx, Address(esp, 8));
-  shrl(edx);
-  shll(edx);
-  negl(ecx);
-  movl(eax, Address(esp, 12));
-  shll(eax);
-  movl(ecx, ebx);
-  movl(Address(esp, 8), edx);
-  shrl(edx);
-  orl(eax, edx);
-
-  bind(B1_14);
-  fld_x(Address(esp, 8));
-  addl(eax, Address(esp, 4));
-  fsubp(3);
-  fmul(6);
-  fld_s(4);
-  movl(edx, eax);
-  andl(edx, 1);
-  fadd(3);
-  movl(ecx, Address(esp, 0));
-  fsuba(3);
-  fxch(3);
-  faddp(5);
-  fld_s(1);
-  fxch(3);
-  fadd_d(Address(zero_none, RelocationHolder::none).plus_disp(edx, Address::times_8));
-  fadda(3);
-  fsub(3);
-  faddp(2);
-  fxch(1);
-  faddp(4);
-  fld_s(2);
-  fadd(2);
-  fsuba(2);
-  fxch(3);
-  faddp(2);
-  fxch(1);
-  faddp(3);
-  fld_s(0);
-  fadd(2);
-  fsuba(2);
-  fxch(1);
-  faddp(2);
-  fxch(1);
-  faddp(2);
-  fld_s(2);
-  fld_x(Address(36 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
-  fmula(1);
-  fld_s(1);
-  fadd(3);
-  fsuba(3);
-  fxch(2);
-  faddp(3);
-  fxch(2);
-  faddp(3);
-  fxch(1);
-  fmul(4);
-  fld_s(0);
-  fadd(2);
-  fsuba(2);
-  fxch(1);
-  faddp(2);
-  fxch(1);
-  faddp(2);
-  fld_s(2);
-  fld_x(Address(48 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
-  fmula(1);
-  fld_s(1);
-  fadd(3);
-  fsuba(3);
-  fxch(2);
-  faddp(3);
-  fxch(2);
-  faddp(3);
-  fld_s(3);
-  fxch(2);
-  fmul(5);
-  fld_x(Address(60 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
-  fmula(3);
-  fxch(3);
-  faddp(1);
-  fld_s(0);
-  fadd(2);
-  fsuba(2);
-  fxch(1);
-  faddp(2);
-  fxch(1);
-  faddp(3);
-  fld_s(3);
-  fxch(2);
-  fmul(5);
-  fld_x(Address(72 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
-  fmula(3);
-  fxch(3);
-  faddp(1);
-  fld_s(0);
-  fadd(2);
-  fsuba(2);
-  fxch(1);
-  faddp(2);
-  fxch(1);
-  faddp(3);
-  fxch(1);
-  fmulp(4);
-  fld_x(Address(84 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
-  fmulp(3);
-  fxch(2);
-  faddp(3);
-  fld_s(2);
-  fadd(2);
-  fld_d(ExternalAddress(TWO_32H));    //0x00000000UL, 0x41f80000UL
-  fmul(1);
-  fadda(1);
-  fsubp(1);
-  fsuba(2);
-  fxch(3);
-  faddp(2);
-  faddp(1);
-  fld_d(ExternalAddress(pi04_2d));    //0x54400000UL, 0x3fe921fbUL
-  fld_s(0);
-  fmul(2);
-  fxch(2);
-  fadd(3);
-  fxch(1);
-  fmulp(3);
-  fmul_d(as_Address(ExternalAddress(8 + pi04_2d)));    //0x1a626331UL, 0x3dc0b461UL
-  faddp(1);
-
-  bind(B1_15);
-  fld_d(ExternalAddress(TWO_12H));    //0x00000000UL, 0x40b80000UL
-  fld_s(2);
-  fadd(2);
-  fmula(1);
-  fstp_x(Address(esp, 8));
-  fld_x(Address(esp, 8));
-  fadd(1);
-  fsubrp(1);
-  fst_d(Address(esi, 0));
-  fsubp(2);
-  faddp(1);
-  fstp_d(Address(esi, 8));
-  addl(esp, 20);
-  pop(ebx);
-  pop(edi);
-  pop(esi);
-  movl(esp, ebp);
-  pop(ebp);
-  ret(0);
-}
-
-ALIGNED_(16) juint _L_2il0floatpacket_0[] =
-{
-    0xffffffffUL, 0x7fffffffUL, 0x00000000UL, 0x00000000UL
-};
-
-ALIGNED_(16) juint _Pi4Inv[] =
-{
-    0x6dc9c883UL, 0x3ff45f30UL
-};
-
-ALIGNED_(16) juint _Pi4x3[] =
-{
-    0x54443000UL, 0xbfe921fbUL, 0x3b39a000UL, 0x3d373dcbUL, 0xe0e68948UL,
-    0xba845c06UL
-};
-
-ALIGNED_(16) juint _Pi4x4[] =
-{
-    0x54400000UL, 0xbfe921fbUL, 0x1a600000UL, 0xbdc0b461UL, 0x2e000000UL,
-    0xbb93198aUL, 0x252049c1UL, 0xb96b839aUL
-};
-
-ALIGNED_(16) jushort _SP[] =
-{
-    0xaaab, 0xaaaa, 0xaaaa, 0xaaaa, 0xbffc, 0x0000, 0x8887, 0x8888, 0x8888, 0x8888,
-    0x3ff8, 0x0000, 0xc527, 0x0d00, 0x00d0, 0xd00d, 0xbff2, 0x0000, 0x45f6, 0xb616,
-    0x1d2a, 0xb8ef, 0x3fec, 0x0000, 0x825b, 0x3997, 0x2b3f, 0xd732, 0xbfe5, 0x0000,
-    0xbf33, 0x8bb4, 0x2fda, 0xb092, 0x3fde, 0x0000, 0x44a6, 0xed1a, 0x29ef, 0xd73e,
-    0xbfd6, 0x0000, 0x8610, 0x307f, 0x62a1, 0xc921, 0x3fce, 0x0000
-};
-
-ALIGNED_(16) jushort _CP[] =
-{
-    0x0000, 0x0000, 0x0000, 0x8000, 0xbffe, 0x0000, 0xaaa5, 0xaaaa, 0xaaaa, 0xaaaa,
-    0x3ffa, 0x0000, 0x9c2f, 0x0b60, 0x60b6, 0xb60b, 0xbff5, 0x0000, 0xf024, 0x0cac,
-    0x00d0, 0xd00d, 0x3fef, 0x0000, 0x03fe, 0x3f65, 0x7dbb, 0x93f2, 0xbfe9, 0x0000,
-    0xd84d, 0xadee, 0xc698, 0x8f76, 0x3fe2, 0x0000, 0xdaba, 0xfe79, 0xea36, 0xc9c9,
-    0xbfda, 0x0000, 0x3ac6, 0x0ba0, 0x07ce, 0xd585, 0x3fd2, 0x0000
-};
-
-ALIGNED_(16) juint _ones[] =
-{
-    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xbff00000UL
-};
-
-void MacroAssembler::libm_sincos_huge(XMMRegister xmm0, XMMRegister xmm1, Register eax, Register ecx, Register edx, Register ebx, Register esi, Register edi, Register ebp, Register esp) {
-  Label B1_1, B1_2, B1_3, B1_4, B1_5, B1_6, B1_7, B1_8, B1_9, B1_10, B1_11, B1_12;
-  Label B1_13, B1_14, B1_15, B1_16, B1_17, B1_18, B1_19, B1_20, B1_21, B1_22, B1_23;
-  Label B1_24, B1_25, B1_26, B1_27, B1_28, B1_29, B1_30, B1_31, B1_32, B1_33, B1_34;
-  Label B1_35, B1_36, B1_37, B1_38, B1_39, B1_40, B1_41, B1_42, B1_43, B1_44, B1_45, B1_46;
-
-  assert_different_registers(ebx, eax, ecx, edx, esi, edi, ebp, esp);
-
-  address L_2il0floatpacket_0 = (address)_L_2il0floatpacket_0;
-  address Pi4Inv = (address)_Pi4Inv;
-  address Pi4x3 = (address)_Pi4x3;
-  address Pi4x4 = (address)_Pi4x4;
-  address ones = (address)_ones;
-  address CP = (address)_CP;
-  address SP = (address)_SP;
-
-  bind(B1_1);
-  push(ebp);
-  movl(ebp, esp);
-  andl(esp, -64);
-  push(esi);
-  push(edi);
-  push(ebx);
-  subl(esp, 52);
-  movl(eax, Address(ebp, 16));
-  movl(edx, Address(ebp, 20));
-  movl(Address(esp, 32), eax);
-  movl(Address(esp, 36), edx);
-
-  bind(B1_2);
-  fnstcw(Address(esp, 30));
-
-  bind(B1_3);
-  movsd(xmm1, Address(ebp, 8));
-  movl(esi, Address(ebp, 12));
-  movl(eax, esi);
-  andl(eax, 2147483647);
-  andps(xmm1, ExternalAddress(L_2il0floatpacket_0));    //0xffffffffUL, 0x7fffffffUL, 0x00000000UL, 0x00000000UL
-  shrl(esi, 31);
-  movl(Address(esp, 40), eax);
-  cmpl(eax, 1104150528);
-  movsd(Address(ebp, 8), xmm1);
-  jcc(Assembler::aboveEqual, B1_11);
-
-  bind(B1_4);
-  movsd(xmm0, ExternalAddress(Pi4Inv));    //0x6dc9c883UL, 0x3ff45f30UL
-  mulsd(xmm0, xmm1);
-  movzwl(edx, Address(esp, 30));
-  movl(eax, edx);
-  andl(eax, 768);
-  movsd(Address(esp, 0), xmm0);
-  cmpl(eax, 768);
-  jcc(Assembler::equal, B1_42);
-
-  bind(B1_5);
-  orl(edx, -64768);
-  movw(Address(esp, 28), edx);
-
-  bind(B1_6);
-  fldcw(Address(esp, 28));
-
-  bind(B1_7);
-  movsd(xmm1, Address(ebp, 8));
-  movl(ebx, 1);
-
-  bind(B1_8);
-  movl(Address(esp, 12), ebx);
-  movl(ebx, Address(esp, 4));
-  movl(eax, ebx);
-  movl(Address(esp, 8), esi);
-  movl(esi, ebx);
-  shrl(esi, 20);
-  andl(eax, 1048575);
-  movl(ecx, esi);
-  orl(eax, 1048576);
-  negl(ecx);
-  movl(edx, eax);
-  addl(ecx, 19);
-  addl(esi, 13);
-  movl(Address(esp, 24), ecx);
-  shrl(edx);
-  movl(ecx, esi);
-  shll(eax);
-  movl(ecx, Address(esp, 24));
-  movl(esi, Address(esp, 0));
-  shrl(esi);
-  orl(eax, esi);
-  cmpl(ebx, 1094713344);
-  movsd(Address(esp, 16), xmm1);
-  fld_d(Address(esp, 16));
-  cmov32(Assembler::below, eax, edx);
-  movl(esi, Address(esp, 8));
-  lea(edx, Address(eax, 1));
-  movl(ebx, edx);
-  andl(ebx, -2);
-  movl(Address(esp, 16), ebx);
-  fild_s(Address(esp, 16));
-  movl(ebx, Address(esp, 12));
-  cmpl(Address(esp, 40), 1094713344);
-  jcc(Assembler::aboveEqual, B1_10);
-
-  bind(B1_9);
-  fld_d(ExternalAddress(Pi4x3));    //0x54443000UL, 0xbfe921fbUL
-  fmul(1);
-  faddp(2);
-  fld_d(ExternalAddress(8 + Pi4x3));    //0x3b39a000UL, 0x3d373dcbUL
-  fmul(1);
-  faddp(2);
-  fld_d(ExternalAddress(16 + Pi4x3));    //0xe0e68948UL, 0xba845c06UL
-  fmulp(1);
-  faddp(1);
-  jmp(B1_17);
-
-  bind(B1_10);
-  fld_d(ExternalAddress(Pi4x4));    //0x54400000UL, 0xbfe921fbUL
-  fmul(1);
-  faddp(2);
-  fld_d(ExternalAddress(8 + Pi4x4));    //0x1a600000UL, 0xbdc0b461UL
-  fmul(1);
-  faddp(2);
-  fld_d(ExternalAddress(16 + Pi4x4));    //0x2e000000UL, 0xbb93198aUL
-  fmul(1);
-  faddp(2);
-  fld_d(ExternalAddress(24 + Pi4x4));    //0x252049c1UL, 0xb96b839aUL
-  fmulp(1);
-  faddp(1);
-  jmp(B1_17);
-
-  bind(B1_11);
-  movzwl(edx, Address(esp, 30));
-  movl(eax, edx);
-  andl(eax, 768);
-  cmpl(eax, 768);
-  jcc(Assembler::equal, B1_43);
-  bind(B1_12);
-  orl(edx, -64768);
-  movw(Address(esp, 28), edx);
-
-  bind(B1_13);
-  fldcw(Address(esp, 28));
-
-  bind(B1_14);
-  movsd(xmm1, Address(ebp, 8));
-  movl(ebx, 1);
-
-  bind(B1_15);
-  movsd(Address(esp, 16), xmm1);
-  fld_d(Address(esp, 16));
-  addl(esp, -32);
-  lea(eax, Address(esp, 32));
-  fstp_x(Address(esp, 0));
-  movl(Address(esp, 12), 0);
-  movl(Address(esp, 16), eax);
-  call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_reduce_pi04l())));
-
-  bind(B1_46);
-  addl(esp, 32);
-
-  bind(B1_16);
-  fld_d(Address(esp, 0));
-  lea(edx, Address(eax, 1));
-  fld_d(Address(esp, 8));
-  faddp(1);
-
-  bind(B1_17);
-  movl(ecx, edx);
-  addl(eax, 3);
-  shrl(ecx, 2);
-  andl(ecx, 1);
-  shrl(eax, 2);
-  xorl(esi, ecx);
-  movl(ecx, Address(esp, 36));
-  andl(eax, 1);
-  andl(ecx, 3);
-  cmpl(ecx, 3);
-  jcc(Assembler::notEqual, B1_25);
-
-  bind(B1_18);
-  fld_x(ExternalAddress(84 + SP));    //0x8610, 0x307f, 0x62
-  fld_s(1);
-  fmul((2));
-  testb(edx, 2);
-  fmula((1));
-  fld_x(ExternalAddress(72 + SP));    //0x44a6, 0xed1a, 0x29
-  faddp(2);
-  fmula(1);
-  fld_x(ExternalAddress(60 + SP));    //0xbf33, 0x8bb4, 0x2f
-  faddp(2);
-  fmula(1);
-  fld_x(ExternalAddress(48 + SP));    //0x825b, 0x3997, 0x2b
-  faddp(2);
-  fmula(1);
-  fld_x(ExternalAddress(36 + SP));    //0x45f6, 0xb616, 0x1d
-  faddp(2);
-  fmula(1);
-  fld_x(ExternalAddress(24 + SP));    //0xc527, 0x0d00, 0x00
-  faddp(2);
-  fmula(1);
-  fld_x(ExternalAddress(12 + SP));    //0x8887, 0x8888, 0x88
-  faddp(2);
-  fmula(1);
-  fld_x(ExternalAddress(SP));    //0xaaab, 0xaaaa, 0xaa
-  faddp(2);
-  fmula(1);
-  fld_x(ExternalAddress(84 + CP));    //0x3ac6, 0x0ba0, 0x07
-  fmul(1);
-  fld_x(ExternalAddress(72 + CP));    //0xdaba, 0xfe79, 0xea
-  faddp(1);
-  fmul(1);
-  fld_x(ExternalAddress(62 + CP));    //0xd84d, 0xadee, 0xc6
-  faddp(1);
-  fmul(1);
-  fld_x(ExternalAddress(48 + CP));    //0x03fe, 0x3f65, 0x7d
-  faddp(1);
-  fmul(1);
-  fld_x(ExternalAddress(36 + CP));    //0xf024, 0x0cac, 0x00
-  faddp(1);
-  fmul(1);
-  fld_x(ExternalAddress(24 + CP));    //0x9c2f, 0x0b60, 0x60
-  faddp(1);
-  fmul(1);
-  fld_x(ExternalAddress(12 + CP));    //0xaaa5, 0xaaaa, 0xaa
-  faddp(1);
-  fmul(1);
-  fld_x(ExternalAddress(CP));    //0x0000, 0x0000, 0x00
-  faddp(1);
-  fmulp(1);
-  fld_d(Address(ones, RelocationHolder::none).plus_disp(esi, Address::times_8));
-  fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
-  jcc(Assembler::equal, B1_22);
-
-  bind(B1_19);
-  fmulp(4);
-  testl(ebx, ebx);
-  fxch(2);
-  fmul(3);
-  movl(eax, Address(esp, 2));
-  faddp(3);
-  fxch(2);
-  fstp_d(Address(eax, 0));
-  fmula(1);
-  faddp(1);
-  fstp_d(Address(eax, 8));
-  jcc(Assembler::equal, B1_21);
-
-  bind(B1_20);
-  fldcw(Address(esp, 30));
-
-  bind(B1_21);
-  addl(esp, 52);
-  pop(ebx);
-  pop(edi);
-  pop(esi);
-  movl(esp, ebp);
-  pop(ebp);
-  ret(0);
-
-  bind(B1_22);
-  fxch(1);
-  fmulp(4);
-  testl(ebx, ebx);
-  fxch(2);
-  fmul(3);
-  movl(eax, Address(esp, 32));
-  faddp(3);
-  fxch(2);
-  fstp_d(Address(eax, 8));
-  fmula(1);
-  faddp(1);
-  fstp_d(Address(eax, 0));
-  jcc(Assembler::equal, B1_24);
-
-  bind(B1_23);
-  fldcw(Address(esp, 30));
-
-  bind(B1_24);
-  addl(esp, 52);
-  pop(ebx);
-  pop(edi);
-  pop(esi);
-  movl(esp, ebp);
-  pop(ebp);
-  ret(0);
-
-  bind(B1_25);
-  testb(Address(esp, 36), 2);
-  jcc(Assembler::equal, B1_33);
-
-  bind(B1_26);
-  fld_s(0);
-  testb(edx, 2);
-  fmul(1);
-  fld_s(0);
-  fmul(1);
-  jcc(Assembler::equal, B1_30);
-
-  bind(B1_27);
-  fstp_d(2);
-  fld_x(ExternalAddress(84 + CP));    //0x3ac6, 0x0ba0, 0x07
-  testl(ebx, ebx);
-  fmul(2);
-  fld_x(ExternalAddress(72 + CP));    //0xdaba, 0xfe79, 0xea
-  fmul(3);
-  fld_x(ExternalAddress(60 + CP));    //0xd84d, 0xadee, 0xc6
-  movl(eax, Address(rsp, 32));
-  faddp(2);
-  fxch(1);
-  fmul(3);
-  fld_x(ExternalAddress(48 + CP));    //0x03fe, 0x3f65, 0x7d
-  faddp(2);
-  fxch(1);
-  fmul(3);
-  fld_x(ExternalAddress(36 + CP));    //0xf024, 0x0cac, 0x00
-  faddp(2);
-  fxch(1);
-  fmul(3);
-  fld_x(ExternalAddress(24 + CP));    //0x9c2f, 0x0b60, 0x60
-  faddp(2);
-  fxch(1);
-  fmul(3);
-  fld_x(ExternalAddress(12 + CP));    //0xaaa5, 0xaaaa, 0xaa
-  faddp(2);
-  fxch(1);
-  fmulp(3);
-  fld_x(ExternalAddress(CP));    //0x0000, 0x0000, 0x00
-  faddp(1);
-  fmulp(1);
-  faddp(1);
-  fld_d(Address(ones, RelocationHolder::none).plus_disp(rsi, Address::times_8));
-  fmula(1);
-  faddp(1);
-  fstp_d(Address(eax, 8));
-  jcc(Assembler::equal, B1_29);
-
-  bind(B1_28);
-  fldcw(Address(esp, 30));
-
-  bind(B1_29);
-  addl(esp, 52);
-  pop(ebx);
-  pop(edi);
-  pop(esi);
-  movl(esp, ebp);
-  pop(ebp);
-  ret(0);
-
-  bind(B1_30);
-  fld_x(ExternalAddress(84 + SP));    //0x8610, 0x307f, 0x62
-  testl(ebx, ebx);
-  fmul(1);
-  fld_x(ExternalAddress(72 + SP));    //0x44a6, 0xed1a, 0x29
-  fmul(2);
-  fld_x(ExternalAddress(60 + SP));    //0xbf33, 0x8bb4, 0x2f
-  movl(eax, Address(rsp, 32));
-  faddp(2);
-  fxch(1);
-  fmul(2);
-  fld_x(ExternalAddress(48 + SP));    //0x825b, 0x3997, 0x2b
-  faddp(2);
-  fxch(1);
-  fmul(2);
-  fld_x(ExternalAddress(36 + SP));    //0x45f6, 0xb616, 0x1d
-  faddp(2);
-  fxch(1);
-  fmul(2);
-  fld_x(ExternalAddress(24 + SP));    //0xc527, 0x0d00, 0x00
-  faddp(2);
-  fxch(1);
-  fmul(2);
-  fld_x(ExternalAddress(12 + SP));    //0x8887, 0x8888, 0x88
-  faddp(2);
-  fxch(1);
-  fmulp(2);
-  fld_x(ExternalAddress(SP));    //0xaaab, 0xaaaa, 0xaa
-  faddp(1);
-  fmulp(2);
-  faddp(1);
-  fld_d(Address(ones, RelocationHolder::none).plus_disp(rsi, Address::times_8));
-  fmulp(2);
-  fmul(1);
-  faddp(1);
-  fstp_d(Address(eax, 8));
-  jcc(Assembler::equal, B1_32);
-
-  bind(B1_31);
-  fldcw(Address(esp, 30));
-
-  bind(B1_32);
-  addl(esp, 52);
-  pop(ebx);
-  pop(edi);
-  pop(esi);
-  movl(esp, ebp);
-  pop(ebp);
-  ret(0);
-
-  bind(B1_33);
-  testb(Address(esp, 36), 1);
-  jcc(Assembler::equal, B1_41);
-
-  bind(B1_34);
-  fld_s(0);
-  testb(edx, 2);
-  fmul(1);
-  fld_s(0);
-  fmul(1);
-  jcc(Assembler::equal, B1_38);
-
-  bind(B1_35);
-  fld_x(ExternalAddress(84 + SP));    //0x8610, 0x307f, 0x62
-  testl(ebx, ebx);
-  fmul(1);
-  fld_x(ExternalAddress(72 + SP));    //0x44a6, 0xed1a, 0x29
-  fmul(2);
-  fld_x(ExternalAddress(60 + SP));    //0xbf33, 0x8bb4, 0x2f
-  faddp(2);
-  fxch(1);
-  fmul(2);
-  fld_x(ExternalAddress(48 + SP));    //0x825b, 0x3997, 0x2b
-  faddp(2);
-  fxch(1);
-  fmul(2);
-  fld_x(ExternalAddress(36 + SP));    //0x45f6, 0xb616, 0x1d
-  faddp(2);
-  fxch(1);
-  fmul(2);
-  fld_x(ExternalAddress(24 + SP));    //0xc527, 0x0d00, 0x00
-  faddp(2);
-  fxch(1);
-  fmul(2);
-  fld_x(ExternalAddress(12 + SP));    //0x8887, 0x8888, 0x88
-  faddp(2);
-  fxch(1);
-  fmulp(2);
-  fld_x(ExternalAddress(SP));    //0xaaab, 0xaaaa, 0xaa
-  faddp(1);
-  fmulp(2);
-  faddp(1);
-  fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
-  fmulp(2);
-  fmul(1);
-  movl(eax, Address(esp, 32));
-  faddp(1);
-  fstp_d(Address(eax, 0));
-  jcc(Assembler::equal, B1_37);
-
-  bind(B1_36);
-  fldcw(Address(esp, 30));
-
-  bind(B1_37);
-  addl(esp, 52);
-  pop(ebx);
-  pop(edi);
-  pop(esi);
-  movl(esp, ebp);
-  pop(ebp);
-  ret(0);
-
-  bind(B1_38);
-  fstp_d(2);
-  fld_x(ExternalAddress(84 + CP));    //0x3ac6, 0x0ba0, 0x07
-  testl(ebx, ebx);
-  fmul(2);
-  fld_x(ExternalAddress(72 + CP));    //0xdaba, 0xfe79, 0xea
-  fmul(3);
-  fld_x(ExternalAddress(60 + CP));    //0xd84d, 0xadee, 0xc6
-  faddp(2);
-  fxch(1);
-  fmul(3);
-  fld_x(ExternalAddress(48 + CP));    //0x03fe, 0x3f65, 0x7d
-  faddp(2);
-  fxch(1);
-  fmul(3);
-  fld_x(ExternalAddress(36 + CP));    //0xf024, 0x0cac, 0x00
-  faddp(2);
-  fxch(1);
-  fmul(3);
-  fld_x(ExternalAddress(24 + CP));    //0x9c2f, 0x0b60, 0x60
-  faddp(2);
-  fxch(1);
-  fmul(3);
-  fld_x(ExternalAddress(12 + CP));    //0xaaa5, 0xaaaa, 0xaa
-  faddp(2);
-  fxch(1);
-  fmulp(3);
-  fld_x(ExternalAddress(CP));    //0x0000, 0x0000, 0x00
-  faddp(1);
-  fmulp(1);
-  faddp(1);
-  fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
-  fmula(1);
-  movl(eax, Address(esp, 32));
-  faddp(1);
-  fstp_d(Address(eax, 0));
-  jcc(Assembler::equal, B1_40);
-
-  bind(B1_39);
-  fldcw(Address(esp, 30));
-  bind(B1_40);
-  addl(esp, 52);
-  pop(ebx);
-  pop(edi);
-  pop(esi);
-  movl(esp, ebp);
-  pop(ebp);
-  ret(0);
-  bind(B1_41);
-  fstp_d(0);
-  addl(esp, 52);
-  pop(ebx);
-  pop(edi);
-  pop(esi);
-  movl(esp, ebp);
-  pop(ebp);
-  ret(0);
-  bind(B1_42);
-  xorl(ebx, ebx);
-  jmp(B1_8);
-  bind(B1_43);
-  xorl(ebx, ebx);
-  jmp(B1_15);
-}
-
-ALIGNED_(16) juint _static_const_table_sin[] =
-{
-    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL, 0xbf73b92eUL,
-    0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
-    0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL,
-    0xc0000000UL, 0xbc626d19UL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL,
-    0xbfa60beaUL, 0x2ed59f06UL, 0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL,
-    0x00000000UL, 0x3ff00000UL, 0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL,
-    0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL, 0x00000000UL, 0x3ff00000UL,
-    0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL, 0x20000000UL,
-    0x3c5e0d89UL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL, 0xbfc59267UL,
-    0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
-    0x3ff00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL,
-    0x20000000UL, 0x3c68076aUL, 0x00000000UL, 0x3ff00000UL, 0x99fcef32UL,
-    0x3fca8279UL, 0x667f3bcdUL, 0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL,
-    0x00000000UL, 0x3fe00000UL, 0x94247758UL, 0x3fc133ccUL, 0x6b151741UL,
-    0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL, 0x00000000UL, 0x3fe00000UL,
-    0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL, 0xe0000000UL,
-    0x3c39f630UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL, 0xbf9d4a2cUL,
-    0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
-    0x3fe00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0x3fed906bUL,
-    0x20000000UL, 0x3c7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x76acf82dUL,
-    0x3fa4a031UL, 0x56c62ddaUL, 0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL,
-    0x00000000UL, 0x3fd00000UL, 0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL,
-    0x3fef6297UL, 0x20000000UL, 0x3c756217UL, 0x00000000UL, 0x3fd00000UL,
-    0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL, 0x3fefd88dUL, 0x40000000UL,
-    0xbc887df6UL, 0x00000000UL, 0x3fc00000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0x3fefd88dUL,
-    0x40000000UL, 0xbc887df6UL, 0x00000000UL, 0xbfc00000UL, 0x0e5967d5UL,
-    0x3fac1d1fUL, 0xcff75cb0UL, 0x3fef6297UL, 0x20000000UL, 0x3c756217UL,
-    0x00000000UL, 0xbfd00000UL, 0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL,
-    0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL, 0x00000000UL, 0xbfd00000UL,
-    0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL, 0x3fed906bUL, 0x20000000UL,
-    0x3c7457e6UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL, 0x3f9d4a2cUL,
-    0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
-    0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL,
-    0xe0000000UL, 0x3c39f630UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL,
-    0xbfc133ccUL, 0x6b151741UL, 0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL,
-    0x00000000UL, 0xbfe00000UL, 0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL,
-    0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL, 0x00000000UL, 0xbfe00000UL,
-    0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL, 0x20000000UL,
-    0x3c68076aUL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL, 0x3fc59267UL,
-    0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
-    0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL,
-    0x20000000UL, 0x3c5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL,
-    0x3fb37ca1UL, 0xa6aea963UL, 0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL,
-    0x00000000UL, 0xbff00000UL, 0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL,
-    0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL, 0x00000000UL, 0xbff00000UL,
-    0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL, 0xc0000000UL,
-    0xbc626d19UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL, 0x3f73b92eUL,
-    0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
-    0xbff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL,
-    0x3f73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
-    0x00000000UL, 0xbff00000UL, 0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL,
-    0xbfc8f8b8UL, 0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0xbff00000UL,
-    0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL,
-    0x3c75d28dUL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL, 0x3fb37ca1UL,
-    0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL, 0x3c672cedUL, 0x00000000UL,
-    0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0xbfde2b5dUL,
-    0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL,
-    0x3fc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
-    0x00000000UL, 0xbff00000UL, 0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL,
-    0xbfe44cf3UL, 0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0xbff00000UL,
-    0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL,
-    0x3c8bdd34UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL, 0xbfc133ccUL,
-    0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL, 0x3c82c5e1UL, 0x00000000UL,
-    0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0xbfea9b66UL,
-    0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL,
-    0x3f9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
-    0x00000000UL, 0xbfe00000UL, 0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL,
-    0xbfed906bUL, 0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0xbfe00000UL,
-    0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL,
-    0xbc8760b1UL, 0x00000000UL, 0xbfd00000UL, 0x0e5967d5UL, 0x3fac1d1fUL,
-    0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL, 0xbc756217UL, 0x00000000UL,
-    0xbfd00000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0xbfefd88dUL,
-    0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0xbfc00000UL, 0x00000000UL,
-    0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x00000000UL, 0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL,
-    0xbfefd88dUL, 0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0x3fc00000UL,
-    0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL,
-    0xbc756217UL, 0x00000000UL, 0x3fd00000UL, 0x76acf82dUL, 0x3fa4a031UL,
-    0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL, 0xbc8760b1UL, 0x00000000UL,
-    0x3fd00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0xbfed906bUL,
-    0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL,
-    0xbf9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
-    0x00000000UL, 0x3fe00000UL, 0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL,
-    0xbfea9b66UL, 0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0x3fe00000UL,
-    0x94247758UL, 0x3fc133ccUL, 0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL,
-    0x3c82c5e1UL, 0x00000000UL, 0x3fe00000UL, 0x99fcef32UL, 0x3fca8279UL,
-    0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL, 0x3c8bdd34UL, 0x00000000UL,
-    0x3fe00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0xbfe44cf3UL,
-    0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL,
-    0xbfc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
-    0x00000000UL, 0x3ff00000UL, 0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL,
-    0xbfde2b5dUL, 0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0x3ff00000UL,
-    0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL,
-    0x3c672cedUL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL, 0xbfa60beaUL,
-    0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL, 0x3c75d28dUL, 0x00000000UL,
-    0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0xbfc8f8b8UL,
-    0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL,
-    0xbf73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
-    0x00000000UL, 0x3ff00000UL, 0x55555555UL, 0xbfc55555UL, 0x00000000UL,
-    0xbfe00000UL, 0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL,
-    0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL, 0xa556c734UL,
-    0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL, 0x1a600000UL, 0x3d90b461UL,
-    0x1a600000UL, 0x3d90b461UL, 0x54400000UL, 0x3fb921fbUL, 0x00000000UL,
-    0x00000000UL, 0x2e037073UL, 0x3b63198aUL, 0x00000000UL, 0x00000000UL,
-    0x6dc9c883UL, 0x40245f30UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-    0x43380000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x43600000UL,
-    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x3c800000UL, 0x00000000UL,
-    0x00000000UL, 0xffffffffUL, 0x3fefffffUL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x80000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-    0x80000000UL, 0x00000000UL, 0x80000000UL, 0x00000000UL, 0x3fe00000UL,
-    0x00000000UL, 0x3fe00000UL
-};
-
-void MacroAssembler::fast_sin(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ebx, Register edx) {
-
-  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
-  Label L_2TAG_PACKET_4_0_2, start;
-  assert_different_registers(eax, ebx, edx);
-  address static_const_table_sin = (address)_static_const_table_sin;
-
-  bind(start);
-  subl(rsp, 120);
-  movl(Address(rsp, 56), ebx);
-  lea(ebx, ExternalAddress(static_const_table_sin));
-  movsd(xmm0, Address(rsp, 128));
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32767);
-  subl(eax, 12336);
-  cmpl(eax, 4293);
-  jcc(Assembler::above, L_2TAG_PACKET_0_0_2);
-  movsd(xmm1, Address(ebx, 2160));
-  mulsd(xmm1, xmm0);
-  movsd(xmm5, Address(ebx, 2272));
-  movdqu(xmm4, Address(ebx, 2256));
-  pand(xmm4, xmm0);
-  por(xmm5, xmm4);
-  movsd(xmm3, Address(ebx, 2128));
-  movdqu(xmm2, Address(ebx, 2112));
-  addpd(xmm1, xmm5);
-  cvttsd2sil(edx, xmm1);
-  cvtsi2sdl(xmm1, edx);
-  mulsd(xmm3, xmm1);
-  unpcklpd(xmm1, xmm1);
-  addl(edx, 1865216);
-  movdqu(xmm4, xmm0);
-  andl(edx, 63);
-  movdqu(xmm5, Address(ebx, 2096));
-  lea(eax, Address(ebx, 0));
-  shll(edx, 5);
-  addl(eax, edx);
-  mulpd(xmm2, xmm1);
-  subsd(xmm0, xmm3);
-  mulsd(xmm1, Address(ebx, 2144));
-  subsd(xmm4, xmm3);
-  movsd(xmm7, Address(eax, 8));
-  unpcklpd(xmm0, xmm0);
-  movapd(xmm3, xmm4);
-  subsd(xmm4, xmm2);
-  mulpd(xmm5, xmm0);
-  subpd(xmm0, xmm2);
-  movdqu(xmm6, Address(ebx, 2064));
-  mulsd(xmm7, xmm4);
-  subsd(xmm3, xmm4);
-  mulpd(xmm5, xmm0);
-  mulpd(xmm0, xmm0);
-  subsd(xmm3, xmm2);
-  movdqu(xmm2, Address(eax, 0));
-  subsd(xmm1, xmm3);
-  movsd(xmm3, Address(eax, 24));
-  addsd(xmm2, xmm3);
-  subsd(xmm7, xmm2);
-  mulsd(xmm2, xmm4);
-  mulpd(xmm6, xmm0);
-  mulsd(xmm3, xmm4);
-  mulpd(xmm2, xmm0);
-  mulpd(xmm0, xmm0);
-  addpd(xmm5, Address(ebx, 2080));
-  mulsd(xmm4, Address(eax, 0));
-  addpd(xmm6, Address(ebx, 2048));
-  mulpd(xmm5, xmm0);
-  movapd(xmm0, xmm3);
-  addsd(xmm3, Address(eax, 8));
-  mulpd(xmm1, xmm7);
-  movapd(xmm7, xmm4);
-  addsd(xmm4, xmm3);
-  addpd(xmm6, xmm5);
-  movsd(xmm5, Address(eax, 8));
-  subsd(xmm5, xmm3);
-  subsd(xmm3, xmm4);
-  addsd(xmm1, Address(eax, 16));
-  mulpd(xmm6, xmm2);
-  addsd(xmm5, xmm0);
-  addsd(xmm3, xmm7);
-  addsd(xmm1, xmm5);
-  addsd(xmm1, xmm3);
-  addsd(xmm1, xmm6);
-  unpckhpd(xmm6, xmm6);
-  addsd(xmm1, xmm6);
-  addsd(xmm4, xmm1);
-  movsd(Address(rsp, 0), xmm4);
-  fld_d(Address(rsp, 0));
-  jmp(L_2TAG_PACKET_1_0_2);
-
-  bind(L_2TAG_PACKET_0_0_2);
-  jcc(Assembler::greater, L_2TAG_PACKET_2_0_2);
-  shrl(eax, 4);
-  cmpl(eax, 268434685);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_3_0_2);
-  movsd(Address(rsp, 0), xmm0);
-  fld_d(Address(rsp, 0));
-  jmp(L_2TAG_PACKET_1_0_2);
-
-  bind(L_2TAG_PACKET_3_0_2);
-  movsd(xmm3, Address(ebx, 2192));
-  mulsd(xmm3, xmm0);
-  subsd(xmm3, xmm0);
-  mulsd(xmm3, Address(ebx, 2208));
-  movsd(Address(rsp, 0), xmm0);
-  fld_d(Address(rsp, 0));
-  jmp(L_2TAG_PACKET_1_0_2);
-
-  bind(L_2TAG_PACKET_2_0_2);
-  movl(eax, Address(rsp, 132));
-  andl(eax, 2146435072);
-  cmpl(eax, 2146435072);
-  jcc(Assembler::equal, L_2TAG_PACKET_4_0_2);
-  subl(rsp, 32);
-  movsd(Address(rsp, 0), xmm0);
-  lea(eax, Address(rsp, 40));
-  movl(Address(rsp, 8), eax);
-  movl(eax, 2);
-  movl(Address(rsp, 12), eax);
-  call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_sin_cos_huge())));
-  addl(rsp, 32);
-  fld_d(Address(rsp, 16));
-  jmp(L_2TAG_PACKET_1_0_2);
-  bind(L_2TAG_PACKET_4_0_2);
-  fld_d(Address(rsp, 128));
-  fmul_d(Address(ebx, 2240));
-  bind(L_2TAG_PACKET_1_0_2);
-  movl(ebx, Address(rsp, 56));
-}
-
-/******************************************************************************/
-//                     ALGORITHM DESCRIPTION - COS()
-//                     ---------------------
-//
-//     1. RANGE REDUCTION
-//
-//     We perform an initial range reduction from X to r with
-//
-//          X =~= N * pi/32 + r
-//
-//     so that |r| <= pi/64 + epsilon. We restrict inputs to those
-//     where |N| <= 932560. Beyond this, the range reduction is
-//     insufficiently accurate. For extremely small inputs,
-//     denormalization can occur internally, impacting performance.
-//     This means that the main path is actually only taken for
-//     2^-252 <= |X| < 90112.
-//
-//     To avoid branches, we perform the range reduction to full
-//     accuracy each time.
-//
-//          X - N * (P_1 + P_2 + P_3)
-//
-//     where P_1 and P_2 are 32-bit numbers (so multiplication by N
-//     is exact) and P_3 is a 53-bit number. Together, these
-//     approximate pi well enough for all cases in the restricted
-//     range.
-//
-//     The main reduction sequence is:
-//
-//             y = 32/pi * x
-//             N = integer(y)
-//     (computed by adding and subtracting off SHIFTER)
-//
-//             m_1 = N * P_1
-//             m_2 = N * P_2
-//             r_1 = x - m_1
-//             r = r_1 - m_2
-//     (this r can be used for most of the calculation)
-//
-//             c_1 = r_1 - r
-//             m_3 = N * P_3
-//             c_2 = c_1 - m_2
-//             c = c_2 - m_3
-//
-//     2. MAIN ALGORITHM
-//
-//     The algorithm uses a table lookup based on B = M * pi / 32
-//     where M = N mod 64. The stored values are:
-//       sigma             closest power of 2 to cos(B)
-//       C_hl              53-bit cos(B) - sigma
-//       S_hi + S_lo       2 * 53-bit sin(B)
-//
-//     The computation is organized as follows:
-//
-//          sin(B + r + c) = [sin(B) + sigma * r] +
-//                           r * (cos(B) - sigma) +
-//                           sin(B) * [cos(r + c) - 1] +
-//                           cos(B) * [sin(r + c) - r]
-//
-//     which is approximately:
-//
-//          [S_hi + sigma * r] +
-//          C_hl * r +
-//          S_lo + S_hi * [(cos(r) - 1) - r * c] +
-//          (C_hl + sigma) * [(sin(r) - r) + c]
-//
-//     and this is what is actually computed. We separate this sum
-//     into four parts:
-//
-//          hi + med + pols + corr
-//
-//     where
-//
-//          hi       = S_hi + sigma r
-//          med      = C_hl * r
-//          pols     = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r)
-//          corr     = S_lo + c * ((C_hl + sigma) - S_hi * r)
-//
-//     3. POLYNOMIAL
-//
-//     The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) *
-//     (sin(r) - r) can be rearranged freely, since it is quite
-//     small, so we exploit parallelism to the fullest.
-//
-//          psc4       =   SC_4 * r_1
-//          msc4       =   psc4 * r
-//          r2         =   r * r
-//          msc2       =   SC_2 * r2
-//          r4         =   r2 * r2
-//          psc3       =   SC_3 + msc4
-//          psc1       =   SC_1 + msc2
-//          msc3       =   r4 * psc3
-//          sincospols =   psc1 + msc3
-//          pols       =   sincospols *
-//                         <S_hi * r^2 | (C_hl + sigma) * r^3>
-//
-//     4. CORRECTION TERM
-//
-//     This is where the "c" component of the range reduction is
-//     taken into account; recall that just "r" is used for most of
-//     the calculation.
-//
-//          -c   = m_3 - c_2
-//          -d   = S_hi * r - (C_hl + sigma)
-//          corr = -c * -d + S_lo
-//
-//     5. COMPENSATED SUMMATIONS
-//
-//     The two successive compensated summations add up the high
-//     and medium parts, leaving just the low parts to add up at
-//     the end.
-//
-//          rs        =  sigma * r
-//          res_int   =  S_hi + rs
-//          k_0       =  S_hi - res_int
-//          k_2       =  k_0 + rs
-//          med       =  C_hl * r
-//          res_hi    =  res_int + med
-//          k_1       =  res_int - res_hi
-//          k_3       =  k_1 + med
-//
-//     6. FINAL SUMMATION
-//
-//     We now add up all the small parts:
-//
-//          res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3
-//
-//     Now the overall result is just:
-//
-//          res_hi + res_lo
-//
-//     7. SMALL ARGUMENTS
-//
-//     Inputs with |X| < 2^-252 are treated specially as
-//     1 - |x|.
-//
-// Special cases:
-//  cos(NaN) = quiet NaN, and raise invalid exception
-//  cos(INF) = NaN and raise invalid exception
-//  cos(0) = 1
-//
-/******************************************************************************/
-
-ALIGNED_(16) juint _static_const_table_cos[] =
-{
-    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL, 0xbf73b92eUL,
-    0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
-    0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL,
-    0xc0000000UL, 0xbc626d19UL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL,
-    0xbfa60beaUL, 0x2ed59f06UL, 0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL,
-    0x00000000UL, 0x3ff00000UL, 0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL,
-    0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL, 0x00000000UL, 0x3ff00000UL,
-    0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL, 0x20000000UL,
-    0x3c5e0d89UL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL, 0xbfc59267UL,
-    0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
-    0x3ff00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL,
-    0x20000000UL, 0x3c68076aUL, 0x00000000UL, 0x3ff00000UL, 0x99fcef32UL,
-    0x3fca8279UL, 0x667f3bcdUL, 0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL,
-    0x00000000UL, 0x3fe00000UL, 0x94247758UL, 0x3fc133ccUL, 0x6b151741UL,
-    0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL, 0x00000000UL, 0x3fe00000UL,
-    0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL, 0xe0000000UL,
-    0x3c39f630UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL, 0xbf9d4a2cUL,
-    0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
-    0x3fe00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0x3fed906bUL,
-    0x20000000UL, 0x3c7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x76acf82dUL,
-    0x3fa4a031UL, 0x56c62ddaUL, 0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL,
-    0x00000000UL, 0x3fd00000UL, 0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL,
-    0x3fef6297UL, 0x20000000UL, 0x3c756217UL, 0x00000000UL, 0x3fd00000UL,
-    0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL, 0x3fefd88dUL, 0x40000000UL,
-    0xbc887df6UL, 0x00000000UL, 0x3fc00000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0x3fefd88dUL,
-    0x40000000UL, 0xbc887df6UL, 0x00000000UL, 0xbfc00000UL, 0x0e5967d5UL,
-    0x3fac1d1fUL, 0xcff75cb0UL, 0x3fef6297UL, 0x20000000UL, 0x3c756217UL,
-    0x00000000UL, 0xbfd00000UL, 0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL,
-    0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL, 0x00000000UL, 0xbfd00000UL,
-    0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL, 0x3fed906bUL, 0x20000000UL,
-    0x3c7457e6UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL, 0x3f9d4a2cUL,
-    0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
-    0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL,
-    0xe0000000UL, 0x3c39f630UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL,
-    0xbfc133ccUL, 0x6b151741UL, 0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL,
-    0x00000000UL, 0xbfe00000UL, 0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL,
-    0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL, 0x00000000UL, 0xbfe00000UL,
-    0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL, 0x20000000UL,
-    0x3c68076aUL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL, 0x3fc59267UL,
-    0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
-    0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL,
-    0x20000000UL, 0x3c5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL,
-    0x3fb37ca1UL, 0xa6aea963UL, 0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL,
-    0x00000000UL, 0xbff00000UL, 0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL,
-    0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL, 0x00000000UL, 0xbff00000UL,
-    0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL, 0xc0000000UL,
-    0xbc626d19UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL, 0x3f73b92eUL,
-    0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
-    0xbff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL,
-    0x3f73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
-    0x00000000UL, 0xbff00000UL, 0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL,
-    0xbfc8f8b8UL, 0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0xbff00000UL,
-    0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL,
-    0x3c75d28dUL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL, 0x3fb37ca1UL,
-    0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL, 0x3c672cedUL, 0x00000000UL,
-    0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0xbfde2b5dUL,
-    0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL,
-    0x3fc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
-    0x00000000UL, 0xbff00000UL, 0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL,
-    0xbfe44cf3UL, 0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0xbff00000UL,
-    0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL,
-    0x3c8bdd34UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL, 0xbfc133ccUL,
-    0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL, 0x3c82c5e1UL, 0x00000000UL,
-    0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0xbfea9b66UL,
-    0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL,
-    0x3f9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
-    0x00000000UL, 0xbfe00000UL, 0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL,
-    0xbfed906bUL, 0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0xbfe00000UL,
-    0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL,
-    0xbc8760b1UL, 0x00000000UL, 0xbfd00000UL, 0x0e5967d5UL, 0x3fac1d1fUL,
-    0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL, 0xbc756217UL, 0x00000000UL,
-    0xbfd00000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0xbfefd88dUL,
-    0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0xbfc00000UL, 0x00000000UL,
-    0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x00000000UL, 0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL,
-    0xbfefd88dUL, 0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0x3fc00000UL,
-    0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL,
-    0xbc756217UL, 0x00000000UL, 0x3fd00000UL, 0x76acf82dUL, 0x3fa4a031UL,
-    0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL, 0xbc8760b1UL, 0x00000000UL,
-    0x3fd00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0xbfed906bUL,
-    0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL,
-    0xbf9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
-    0x00000000UL, 0x3fe00000UL, 0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL,
-    0xbfea9b66UL, 0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0x3fe00000UL,
-    0x94247758UL, 0x3fc133ccUL, 0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL,
-    0x3c82c5e1UL, 0x00000000UL, 0x3fe00000UL, 0x99fcef32UL, 0x3fca8279UL,
-    0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL, 0x3c8bdd34UL, 0x00000000UL,
-    0x3fe00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0xbfe44cf3UL,
-    0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL,
-    0xbfc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
-    0x00000000UL, 0x3ff00000UL, 0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL,
-    0xbfde2b5dUL, 0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0x3ff00000UL,
-    0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL,
-    0x3c672cedUL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL, 0xbfa60beaUL,
-    0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL, 0x3c75d28dUL, 0x00000000UL,
-    0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0xbfc8f8b8UL,
-    0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL,
-    0xbf73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
-    0x00000000UL, 0x3ff00000UL, 0x55555555UL, 0xbfc55555UL, 0x00000000UL,
-    0xbfe00000UL, 0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL,
-    0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL, 0xa556c734UL,
-    0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL, 0x1a600000UL, 0x3d90b461UL,
-    0x1a600000UL, 0x3d90b461UL, 0x54400000UL, 0x3fb921fbUL, 0x00000000UL,
-    0x00000000UL, 0x2e037073UL, 0x3b63198aUL, 0x00000000UL, 0x00000000UL,
-    0x6dc9c883UL, 0x40245f30UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-    0x43380000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x3ff00000UL,
-    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x80000000UL, 0x00000000UL,
-    0x00000000UL, 0x00000000UL, 0x80000000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
-};
-
-//registers,
-// input: (rbp + 8)
-// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
-//          rax, rdx, rcx, rbx (tmp)
-
-// Code generated by Intel C compiler for LIBM library
-
-void MacroAssembler::fast_cos(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
-  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
-  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
-  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
-  Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
-
-  assert_different_registers(tmp, eax, ecx, edx);
-
-  address static_const_table_cos = (address)_static_const_table_cos;
-
-  bind(start);
-  subl(rsp, 120);
-  movl(Address(rsp, 56), tmp);
-  lea(tmp, ExternalAddress(static_const_table_cos));
-  movsd(xmm0, Address(rsp, 128));
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32767);
-  subl(eax, 12336);
-  cmpl(eax, 4293);
-  jcc(Assembler::above, L_2TAG_PACKET_0_0_2);
-  movsd(xmm1, Address(tmp, 2160));
-  mulsd(xmm1, xmm0);
-  movdqu(xmm5, Address(tmp, 2240));
-  movsd(xmm4, Address(tmp, 2224));
-  pand(xmm4, xmm0);
-  por(xmm5, xmm4);
-  movsd(xmm3, Address(tmp, 2128));
-  movdqu(xmm2, Address(tmp, 2112));
-  addpd(xmm1, xmm5);
-  cvttsd2sil(edx, xmm1);
-  cvtsi2sdl(xmm1, edx);
-  mulsd(xmm3, xmm1);
-  unpcklpd(xmm1, xmm1);
-  addl(edx, 1865232);
-  movdqu(xmm4, xmm0);
-  andl(edx, 63);
-  movdqu(xmm5, Address(tmp, 2096));
-  lea(eax, Address(tmp, 0));
-  shll(edx, 5);
-  addl(eax, edx);
-  mulpd(xmm2, xmm1);
-  subsd(xmm0, xmm3);
-  mulsd(xmm1, Address(tmp, 2144));
-  subsd(xmm4, xmm3);
-  movsd(xmm7, Address(eax, 8));
-  unpcklpd(xmm0, xmm0);
-  movapd(xmm3, xmm4);
-  subsd(xmm4, xmm2);
-  mulpd(xmm5, xmm0);
-  subpd(xmm0, xmm2);
-  movdqu(xmm6, Address(tmp, 2064));
-  mulsd(xmm7, xmm4);
-  subsd(xmm3, xmm4);
-  mulpd(xmm5, xmm0);
-  mulpd(xmm0, xmm0);
-  subsd(xmm3, xmm2);
-  movdqu(xmm2, Address(eax, 0));
-  subsd(xmm1, xmm3);
-  movsd(xmm3, Address(eax, 24));
-  addsd(xmm2, xmm3);
-  subsd(xmm7, xmm2);
-  mulsd(xmm2, xmm4);
-  mulpd(xmm6, xmm0);
-  mulsd(xmm3, xmm4);
-  mulpd(xmm2, xmm0);
-  mulpd(xmm0, xmm0);
-  addpd(xmm5, Address(tmp, 2080));
-  mulsd(xmm4, Address(eax, 0));
-  addpd(xmm6, Address(tmp, 2048));
-  mulpd(xmm5, xmm0);
-  movapd(xmm0, xmm3);
-  addsd(xmm3, Address(eax, 8));
-  mulpd(xmm1, xmm7);
-  movapd(xmm7, xmm4);
-  addsd(xmm4, xmm3);
-  addpd(xmm6, xmm5);
-  movsd(xmm5, Address(eax, 8));
-  subsd(xmm5, xmm3);
-  subsd(xmm3, xmm4);
-  addsd(xmm1, Address(eax, 16));
-  mulpd(xmm6, xmm2);
-  addsd(xmm5, xmm0);
-  addsd(xmm3, xmm7);
-  addsd(xmm1, xmm5);
-  addsd(xmm1, xmm3);
-  addsd(xmm1, xmm6);
-  unpckhpd(xmm6, xmm6);
-  addsd(xmm1, xmm6);
-  addsd(xmm4, xmm1);
-  movsd(Address(rsp, 0), xmm4);
-  fld_d(Address(rsp, 0));
-  jmp(L_2TAG_PACKET_1_0_2);
-
-  bind(L_2TAG_PACKET_0_0_2);
-  jcc(Assembler::greater, L_2TAG_PACKET_2_0_2);
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32767);
-  pinsrw(xmm0, eax, 3);
-  movsd(xmm1, Address(tmp, 2192));
-  subsd(xmm1, xmm0);
-  movsd(Address(rsp, 0), xmm1);
-  fld_d(Address(rsp, 0));
-  jmp(L_2TAG_PACKET_1_0_2);
-
-  bind(L_2TAG_PACKET_2_0_2);
-  movl(eax, Address(rsp, 132));
-  andl(eax, 2146435072);
-  cmpl(eax, 2146435072);
-  jcc(Assembler::equal, L_2TAG_PACKET_3_0_2);
-  subl(rsp, 32);
-  movsd(Address(rsp, 0), xmm0);
-  lea(eax, Address(rsp, 40));
-  movl(Address(rsp, 8), eax);
-  movl(eax, 1);
-  movl(Address(rsp, 12), eax);
-  call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_sin_cos_huge())));
-  addl(rsp, 32);
-  fld_d(Address(rsp, 8));
-  jmp(L_2TAG_PACKET_1_0_2);
-
-  bind(L_2TAG_PACKET_3_0_2);
-  fld_d(Address(rsp, 128));
-  fmul_d(Address(tmp, 2208));
-
-  bind(L_2TAG_PACKET_1_0_2);
-  movl(tmp, Address(rsp, 56));
-}
-
--- a/hotspot/src/cpu/x86/vm/macroAssembler_libm_x86_64.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3945 +0,0 @@
-/*
- * Copyright (c) 2015, Intel Corporation.
- * Intel Math Library (LIBM) Source Code
- *
- * 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.
- *
- */
-
-#include "precompiled.hpp"
-#include "asm/assembler.hpp"
-#include "asm/assembler.inline.hpp"
-#include "macroAssembler_x86.hpp"
-
-#ifdef _MSC_VER
-#define ALIGNED_(x) __declspec(align(x))
-#else
-#define ALIGNED_(x) __attribute__ ((aligned(x)))
-#endif
-
-// The 64 bit code is at most SSE2 compliant
-
-/******************************************************************************/
-//                     ALGORITHM DESCRIPTION - EXP()
-//                     ---------------------
-//
-// Description:
-//  Let K = 64 (table size).
-//        x    x/log(2)     n
-//       e  = 2          = 2 * T[j] * (1 + P(y))
-//  where
-//       x = m*log(2)/K + y,    y in [-log(2)/K..log(2)/K]
-//       m = n*K + j,           m,n,j - signed integer, j in [-K/2..K/2]
-//                  j/K
-//       values of 2   are tabulated as T[j] = T_hi[j] ( 1 + T_lo[j]).
-//
-//       P(y) is a minimax polynomial approximation of exp(x)-1
-//       on small interval [-log(2)/K..log(2)/K] (were calculated by Maple V).
-//
-//  To avoid problems with arithmetic overflow and underflow,
-//            n                        n1  n2
-//  value of 2  is safely computed as 2 * 2 where n1 in [-BIAS/2..BIAS/2]
-//  where BIAS is a value of exponent bias.
-//
-// Special cases:
-//  exp(NaN) = NaN
-//  exp(+INF) = +INF
-//  exp(-INF) = 0
-//  exp(x) = 1 for subnormals
-//  for finite argument, only exp(0)=1 is exact
-//  For IEEE double
-//    if x >  709.782712893383973096 then exp(x) overflow
-//    if x < -745.133219101941108420 then exp(x) underflow
-//
-/******************************************************************************/
-
-ALIGNED_(16) juint _cv[] =
-{
-    0x652b82feUL, 0x40571547UL, 0x652b82feUL, 0x40571547UL, 0xfefa0000UL,
-    0x3f862e42UL, 0xfefa0000UL, 0x3f862e42UL, 0xbc9e3b3aUL, 0x3d1cf79aUL,
-    0xbc9e3b3aUL, 0x3d1cf79aUL, 0xfffffffeUL, 0x3fdfffffUL, 0xfffffffeUL,
-    0x3fdfffffUL, 0xe3289860UL, 0x3f56c15cUL, 0x555b9e25UL, 0x3fa55555UL,
-    0xc090cf0fUL, 0x3f811115UL, 0x55548ba1UL, 0x3fc55555UL
-};
-
-ALIGNED_(16) juint _shifter[] =
-{
-    0x00000000UL, 0x43380000UL, 0x00000000UL, 0x43380000UL
-};
-
-ALIGNED_(16) juint _mmask[] =
-{
-    0xffffffc0UL, 0x00000000UL, 0xffffffc0UL, 0x00000000UL
-};
-
-ALIGNED_(16) juint _bias[] =
-{
-    0x0000ffc0UL, 0x00000000UL, 0x0000ffc0UL, 0x00000000UL
-};
-
-ALIGNED_(16) juint _Tbl_addr[] =
-{
-    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x0e03754dUL,
-    0x3cad7bbfUL, 0x3e778060UL, 0x00002c9aUL, 0x3567f613UL, 0x3c8cd252UL,
-    0xd3158574UL, 0x000059b0UL, 0x61e6c861UL, 0x3c60f74eUL, 0x18759bc8UL,
-    0x00008745UL, 0x5d837b6cUL, 0x3c979aa6UL, 0x6cf9890fUL, 0x0000b558UL,
-    0x702f9cd1UL, 0x3c3ebe3dUL, 0x32d3d1a2UL, 0x0000e3ecUL, 0x1e63bcd8UL,
-    0x3ca3516eUL, 0xd0125b50UL, 0x00011301UL, 0x26f0387bUL, 0x3ca4c554UL,
-    0xaea92ddfUL, 0x0001429aUL, 0x62523fb6UL, 0x3ca95153UL, 0x3c7d517aUL,
-    0x000172b8UL, 0x3f1353bfUL, 0x3c8b898cUL, 0xeb6fcb75UL, 0x0001a35bUL,
-    0x3e3a2f5fUL, 0x3c9aecf7UL, 0x3168b9aaUL, 0x0001d487UL, 0x44a6c38dUL,
-    0x3c8a6f41UL, 0x88628cd6UL, 0x0002063bUL, 0xe3a8a894UL, 0x3c968efdUL,
-    0x6e756238UL, 0x0002387aUL, 0x981fe7f2UL, 0x3c80472bUL, 0x65e27cddUL,
-    0x00026b45UL, 0x6d09ab31UL, 0x3c82f7e1UL, 0xf51fdee1UL, 0x00029e9dUL,
-    0x720c0ab3UL, 0x3c8b3782UL, 0xa6e4030bUL, 0x0002d285UL, 0x4db0abb6UL,
-    0x3c834d75UL, 0x0a31b715UL, 0x000306feUL, 0x5dd3f84aUL, 0x3c8fdd39UL,
-    0xb26416ffUL, 0x00033c08UL, 0xcc187d29UL, 0x3ca12f8cUL, 0x373aa9caUL,
-    0x000371a7UL, 0x738b5e8bUL, 0x3ca7d229UL, 0x34e59ff6UL, 0x0003a7dbUL,
-    0xa72a4c6dUL, 0x3c859f48UL, 0x4c123422UL, 0x0003dea6UL, 0x259d9205UL,
-    0x3ca8b846UL, 0x21f72e29UL, 0x0004160aUL, 0x60c2ac12UL, 0x3c4363edUL,
-    0x6061892dUL, 0x00044e08UL, 0xdaa10379UL, 0x3c6ecce1UL, 0xb5c13cd0UL,
-    0x000486a2UL, 0xbb7aafb0UL, 0x3c7690ceUL, 0xd5362a27UL, 0x0004bfdaUL,
-    0x9b282a09UL, 0x3ca083ccUL, 0x769d2ca6UL, 0x0004f9b2UL, 0xc1aae707UL,
-    0x3ca509b0UL, 0x569d4f81UL, 0x0005342bUL, 0x18fdd78eUL, 0x3c933505UL,
-    0x36b527daUL, 0x00056f47UL, 0xe21c5409UL, 0x3c9063e1UL, 0xdd485429UL,
-    0x0005ab07UL, 0x2b64c035UL, 0x3c9432e6UL, 0x15ad2148UL, 0x0005e76fUL,
-    0x99f08c0aUL, 0x3ca01284UL, 0xb03a5584UL, 0x0006247eUL, 0x0073dc06UL,
-    0x3c99f087UL, 0x82552224UL, 0x00066238UL, 0x0da05571UL, 0x3c998d4dUL,
-    0x667f3bccUL, 0x0006a09eUL, 0x86ce4786UL, 0x3ca52bb9UL, 0x3c651a2eUL,
-    0x0006dfb2UL, 0x206f0dabUL, 0x3ca32092UL, 0xe8ec5f73UL, 0x00071f75UL,
-    0x8e17a7a6UL, 0x3ca06122UL, 0x564267c8UL, 0x00075febUL, 0x461e9f86UL,
-    0x3ca244acUL, 0x73eb0186UL, 0x0007a114UL, 0xabd66c55UL, 0x3c65ebe1UL,
-    0x36cf4e62UL, 0x0007e2f3UL, 0xbbff67d0UL, 0x3c96fe9fUL, 0x994cce12UL,
-    0x00082589UL, 0x14c801dfUL, 0x3c951f14UL, 0x9b4492ecUL, 0x000868d9UL,
-    0xc1f0eab4UL, 0x3c8db72fUL, 0x422aa0dbUL, 0x0008ace5UL, 0x59f35f44UL,
-    0x3c7bf683UL, 0x99157736UL, 0x0008f1aeUL, 0x9c06283cUL, 0x3ca360baUL,
-    0xb0cdc5e4UL, 0x00093737UL, 0x20f962aaUL, 0x3c95e8d1UL, 0x9fde4e4fUL,
-    0x00097d82UL, 0x2b91ce27UL, 0x3c71affcUL, 0x82a3f090UL, 0x0009c491UL,
-    0x589a2ebdUL, 0x3c9b6d34UL, 0x7b5de564UL, 0x000a0c66UL, 0x9ab89880UL,
-    0x3c95277cUL, 0xb23e255cUL, 0x000a5503UL, 0x6e735ab3UL, 0x3c846984UL,
-    0x5579fdbfUL, 0x000a9e6bUL, 0x92cb3387UL, 0x3c8c1a77UL, 0x995ad3adUL,
-    0x000ae89fUL, 0xdc2d1d96UL, 0x3ca22466UL, 0xb84f15faUL, 0x000b33a2UL,
-    0xb19505aeUL, 0x3ca1112eUL, 0xf2fb5e46UL, 0x000b7f76UL, 0x0a5fddcdUL,
-    0x3c74ffd7UL, 0x904bc1d2UL, 0x000bcc1eUL, 0x30af0cb3UL, 0x3c736eaeUL,
-    0xdd85529cUL, 0x000c199bUL, 0xd10959acUL, 0x3c84e08fUL, 0x2e57d14bUL,
-    0x000c67f1UL, 0x6c921968UL, 0x3c676b2cUL, 0xdcef9069UL, 0x000cb720UL,
-    0x36df99b3UL, 0x3c937009UL, 0x4a07897bUL, 0x000d072dUL, 0xa63d07a7UL,
-    0x3c74a385UL, 0xdcfba487UL, 0x000d5818UL, 0xd5c192acUL, 0x3c8e5a50UL,
-    0x03db3285UL, 0x000da9e6UL, 0x1c4a9792UL, 0x3c98bb73UL, 0x337b9b5eUL,
-    0x000dfc97UL, 0x603a88d3UL, 0x3c74b604UL, 0xe78b3ff6UL, 0x000e502eUL,
-    0x92094926UL, 0x3c916f27UL, 0xa2a490d9UL, 0x000ea4afUL, 0x41aa2008UL,
-    0x3c8ec3bcUL, 0xee615a27UL, 0x000efa1bUL, 0x31d185eeUL, 0x3c8a64a9UL,
-    0x5b6e4540UL, 0x000f5076UL, 0x4d91cd9dUL, 0x3c77893bUL, 0x819e90d8UL,
-    0x000fa7c1UL
-};
-
-ALIGNED_(16) juint _ALLONES[] =
-{
-    0xffffffffUL, 0xffffffffUL, 0xffffffffUL, 0xffffffffUL
-};
-
-ALIGNED_(16) juint _ebias[] =
-{
-    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x3ff00000UL
-};
-
-ALIGNED_(4) juint _XMAX[] =
-{
-    0xffffffffUL, 0x7fefffffUL
-};
-
-ALIGNED_(4) juint _XMIN[] =
-{
-    0x00000000UL, 0x00100000UL
-};
-
-ALIGNED_(4) juint _INF[] =
-{
-    0x00000000UL, 0x7ff00000UL
-};
-
-ALIGNED_(4) juint _ZERO[] =
-{
-    0x00000000UL, 0x00000000UL
-};
-
-ALIGNED_(4) juint _ONE_val[] =
-{
-    0x00000000UL, 0x3ff00000UL
-};
-
-
-// Registers:
-// input: xmm0
-// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
-//          rax, rdx, rcx, tmp - r11
-
-// Code generated by Intel C compiler for LIBM library
-
-void MacroAssembler::fast_exp(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
-  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
-  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
-  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
-  Label L_2TAG_PACKET_12_0_2, B1_3, B1_5, start;
-
-  assert_different_registers(tmp, eax, ecx, edx);
-  jmp(start);
-  address cv = (address)_cv;
-  address Shifter = (address)_shifter;
-  address mmask = (address)_mmask;
-  address bias = (address)_bias;
-  address Tbl_addr = (address)_Tbl_addr;
-  address ALLONES = (address)_ALLONES;
-  address ebias = (address)_ebias;
-  address XMAX = (address)_XMAX;
-  address XMIN = (address)_XMIN;
-  address INF = (address)_INF;
-  address ZERO = (address)_ZERO;
-  address ONE_val = (address)_ONE_val;
-
-  bind(start);
-  subq(rsp, 24);
-  movsd(Address(rsp, 8), xmm0);
-  unpcklpd(xmm0, xmm0);
-  movdqu(xmm1, ExternalAddress(cv));       // 0x652b82feUL, 0x40571547UL, 0x652b82feUL, 0x40571547UL
-  movdqu(xmm6, ExternalAddress(Shifter));  // 0x00000000UL, 0x43380000UL, 0x00000000UL, 0x43380000UL
-  movdqu(xmm2, ExternalAddress(16+cv));    // 0xfefa0000UL, 0x3f862e42UL, 0xfefa0000UL, 0x3f862e42UL
-  movdqu(xmm3, ExternalAddress(32+cv));    // 0xbc9e3b3aUL, 0x3d1cf79aUL, 0xbc9e3b3aUL, 0x3d1cf79aUL
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32767);
-  movl(edx, 16527);
-  subl(edx, eax);
-  subl(eax, 15504);
-  orl(edx, eax);
-  cmpl(edx, INT_MIN);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
-  mulpd(xmm1, xmm0);
-  addpd(xmm1, xmm6);
-  movapd(xmm7, xmm1);
-  subpd(xmm1, xmm6);
-  mulpd(xmm2, xmm1);
-  movdqu(xmm4, ExternalAddress(64+cv));    // 0xe3289860UL, 0x3f56c15cUL, 0x555b9e25UL, 0x3fa55555UL
-  mulpd(xmm3, xmm1);
-  movdqu(xmm5, ExternalAddress(80+cv));    // 0xc090cf0fUL, 0x3f811115UL, 0x55548ba1UL, 0x3fc55555UL
-  subpd(xmm0, xmm2);
-  movdl(eax, xmm7);
-  movl(ecx, eax);
-  andl(ecx, 63);
-  shll(ecx, 4);
-  sarl(eax, 6);
-  movl(edx, eax);
-  movdqu(xmm6, ExternalAddress(mmask));    // 0xffffffc0UL, 0x00000000UL, 0xffffffc0UL, 0x00000000UL
-  pand(xmm7, xmm6);
-  movdqu(xmm6, ExternalAddress(bias));     // 0x0000ffc0UL, 0x00000000UL, 0x0000ffc0UL, 0x00000000UL
-  paddq(xmm7, xmm6);
-  psllq(xmm7, 46);
-  subpd(xmm0, xmm3);
-  lea(tmp, ExternalAddress(Tbl_addr));
-  movdqu(xmm2, Address(ecx,tmp));
-  mulpd(xmm4, xmm0);
-  movapd(xmm6, xmm0);
-  movapd(xmm1, xmm0);
-  mulpd(xmm6, xmm6);
-  mulpd(xmm0, xmm6);
-  addpd(xmm5, xmm4);
-  mulsd(xmm0, xmm6);
-  mulpd(xmm6, ExternalAddress(48+cv));     // 0xfffffffeUL, 0x3fdfffffUL, 0xfffffffeUL, 0x3fdfffffUL
-  addsd(xmm1, xmm2);
-  unpckhpd(xmm2, xmm2);
-  mulpd(xmm0, xmm5);
-  addsd(xmm1, xmm0);
-  por(xmm2, xmm7);
-  unpckhpd(xmm0, xmm0);
-  addsd(xmm0, xmm1);
-  addsd(xmm0, xmm6);
-  addl(edx, 894);
-  cmpl(edx, 1916);
-  jcc (Assembler::above, L_2TAG_PACKET_1_0_2);
-  mulsd(xmm0, xmm2);
-  addsd(xmm0, xmm2);
-  jmp (B1_5);
-
-  bind(L_2TAG_PACKET_1_0_2);
-  xorpd(xmm3, xmm3);
-  movdqu(xmm4, ExternalAddress(ALLONES));  // 0xffffffffUL, 0xffffffffUL, 0xffffffffUL, 0xffffffffUL
-  movl(edx, -1022);
-  subl(edx, eax);
-  movdl(xmm5, edx);
-  psllq(xmm4, xmm5);
-  movl(ecx, eax);
-  sarl(eax, 1);
-  pinsrw(xmm3, eax, 3);
-  movdqu(xmm6, ExternalAddress(ebias));    // 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x3ff00000UL
-  psllq(xmm3, 4);
-  psubd(xmm2, xmm3);
-  mulsd(xmm0, xmm2);
-  cmpl(edx, 52);
-  jcc(Assembler::greater, L_2TAG_PACKET_2_0_2);
-  pand(xmm4, xmm2);
-  paddd(xmm3, xmm6);
-  subsd(xmm2, xmm4);
-  addsd(xmm0, xmm2);
-  cmpl(ecx, 1023);
-  jcc(Assembler::greaterEqual, L_2TAG_PACKET_3_0_2);
-  pextrw(ecx, xmm0, 3);
-  andl(ecx, 32768);
-  orl(edx, ecx);
-  cmpl(edx, 0);
-  jcc(Assembler::equal, L_2TAG_PACKET_4_0_2);
-  movapd(xmm6, xmm0);
-  addsd(xmm0, xmm4);
-  mulsd(xmm0, xmm3);
-  pextrw(ecx, xmm0, 3);
-  andl(ecx, 32752);
-  cmpl(ecx, 0);
-  jcc(Assembler::equal, L_2TAG_PACKET_5_0_2);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_5_0_2);
-  mulsd(xmm6, xmm3);
-  mulsd(xmm4, xmm3);
-  movdqu(xmm0, xmm6);
-  pxor(xmm6, xmm4);
-  psrad(xmm6, 31);
-  pshufd(xmm6, xmm6, 85);
-  psllq(xmm0, 1);
-  psrlq(xmm0, 1);
-  pxor(xmm0, xmm6);
-  psrlq(xmm6, 63);
-  paddq(xmm0, xmm6);
-  paddq(xmm0, xmm4);
-  movl(Address(rsp,0), 15);
-  jmp(L_2TAG_PACKET_6_0_2);
-
-  bind(L_2TAG_PACKET_4_0_2);
-  addsd(xmm0, xmm4);
-  mulsd(xmm0, xmm3);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_3_0_2);
-  addsd(xmm0, xmm4);
-  mulsd(xmm0, xmm3);
-  pextrw(ecx, xmm0, 3);
-  andl(ecx, 32752);
-  cmpl(ecx, 32752);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_7_0_2);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_2_0_2);
-  paddd(xmm3, xmm6);
-  addpd(xmm0, xmm2);
-  mulsd(xmm0, xmm3);
-  movl(Address(rsp,0), 15);
-  jmp(L_2TAG_PACKET_6_0_2);
-
-  bind(L_2TAG_PACKET_8_0_2);
-  cmpl(eax, 2146435072);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_9_0_2);
-  movl(eax, Address(rsp,12));
-  cmpl(eax, INT_MIN);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_10_0_2);
-  movsd(xmm0, ExternalAddress(XMAX));      // 0xffffffffUL, 0x7fefffffUL
-  mulsd(xmm0, xmm0);
-
-  bind(L_2TAG_PACKET_7_0_2);
-  movl(Address(rsp,0), 14);
-  jmp(L_2TAG_PACKET_6_0_2);
-
-  bind(L_2TAG_PACKET_10_0_2);
-  movsd(xmm0, ExternalAddress(XMIN));      // 0x00000000UL, 0x00100000UL
-  mulsd(xmm0, xmm0);
-  movl(Address(rsp,0), 15);
-  jmp(L_2TAG_PACKET_6_0_2);
-
-  bind(L_2TAG_PACKET_9_0_2);
-  movl(edx, Address(rsp,8));
-  cmpl(eax, 2146435072);
-  jcc(Assembler::above, L_2TAG_PACKET_11_0_2);
-  cmpl(edx, 0);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_11_0_2);
-  movl(eax, Address(rsp,12));
-  cmpl(eax, 2146435072);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_12_0_2);
-  movsd(xmm0, ExternalAddress(INF));       // 0x00000000UL, 0x7ff00000UL
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_12_0_2);
-  movsd(xmm0, ExternalAddress(ZERO));      // 0x00000000UL, 0x00000000UL
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_11_0_2);
-  movsd(xmm0, Address(rsp, 8));
-  addsd(xmm0, xmm0);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_0_0_2);
-  movl(eax, Address(rsp, 12));
-  andl(eax, 2147483647);
-  cmpl(eax, 1083179008);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_8_0_2);
-  movsd(Address(rsp, 8), xmm0);
-  addsd(xmm0, ExternalAddress(ONE_val));   // 0x00000000UL, 0x3ff00000UL
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_6_0_2);
-  movq(Address(rsp, 16), xmm0);
-
-  bind(B1_3);
-  movq(xmm0, Address(rsp, 16));
-
-  bind(B1_5);
-  addq(rsp, 24);
-}
-
-/******************************************************************************/
-//                     ALGORITHM DESCRIPTION - LOG()
-//                     ---------------------
-//
-//    x=2^k * mx, mx in [1,2)
-//
-//    Get B~1/mx based on the output of rcpss instruction (B0)
-//    B = int((B0*2^7+0.5))/2^7
-//
-//    Reduced argument: r=B*mx-1.0 (computed accurately in high and low parts)
-//
-//    Result:  k*log(2) - log(B) + p(r) if |x-1| >= small value (2^-6)  and
-//             p(r) is a degree 7 polynomial
-//             -log(B) read from data table (high, low parts)
-//             Result is formed from high and low parts
-//
-// Special cases:
-//  log(NaN) = quiet NaN, and raise invalid exception
-//  log(+INF) = that INF
-//  log(0) = -INF with divide-by-zero exception raised
-//  log(1) = +0
-//  log(x) = NaN with invalid exception raised if x < -0, including -INF
-//
-/******************************************************************************/
-
-ALIGNED_(16) juint _L_tbl[] =
-{
-  0xfefa3800UL, 0x3fe62e42UL, 0x93c76730UL, 0x3d2ef357UL, 0xaa241800UL,
-  0x3fe5ee82UL, 0x0cda46beUL, 0x3d220238UL, 0x5c364800UL, 0x3fe5af40UL,
-  0xac10c9fbUL, 0x3d2dfa63UL, 0x26bb8c00UL, 0x3fe5707aUL, 0xff3303ddUL,
-  0x3d09980bUL, 0x26867800UL, 0x3fe5322eUL, 0x5d257531UL, 0x3d05ccc4UL,
-  0x835a5000UL, 0x3fe4f45aUL, 0x6d93b8fbUL, 0xbd2e6c51UL, 0x6f970c00UL,
-  0x3fe4b6fdUL, 0xed4c541cUL, 0x3cef7115UL, 0x27e8a400UL, 0x3fe47a15UL,
-  0xf94d60aaUL, 0xbd22cb6aUL, 0xf2f92400UL, 0x3fe43d9fUL, 0x481051f7UL,
-  0xbcfd984fUL, 0x2125cc00UL, 0x3fe4019cUL, 0x30f0c74cUL, 0xbd26ce79UL,
-  0x0c36c000UL, 0x3fe3c608UL, 0x7cfe13c2UL, 0xbd02b736UL, 0x17197800UL,
-  0x3fe38ae2UL, 0xbb5569a4UL, 0xbd218b7aUL, 0xad9d8c00UL, 0x3fe35028UL,
-  0x9527e6acUL, 0x3d10b83fUL, 0x44340800UL, 0x3fe315daUL, 0xc5a0ed9cUL,
-  0xbd274e93UL, 0x57b0e000UL, 0x3fe2dbf5UL, 0x07b9dc11UL, 0xbd17a6e5UL,
-  0x6d0ec000UL, 0x3fe2a278UL, 0xe797882dUL, 0x3d206d2bUL, 0x1134dc00UL,
-  0x3fe26962UL, 0x05226250UL, 0xbd0b61f1UL, 0xd8bebc00UL, 0x3fe230b0UL,
-  0x6e48667bUL, 0x3d12fc06UL, 0x5fc61800UL, 0x3fe1f863UL, 0xc9fe81d3UL,
-  0xbd2a7242UL, 0x49ae6000UL, 0x3fe1c078UL, 0xed70e667UL, 0x3cccacdeUL,
-  0x40f23c00UL, 0x3fe188eeUL, 0xf8ab4650UL, 0x3d14cc4eUL, 0xf6f29800UL,
-  0x3fe151c3UL, 0xa293ae49UL, 0xbd2edd97UL, 0x23c75c00UL, 0x3fe11af8UL,
-  0xbb9ddcb2UL, 0xbd258647UL, 0x8611cc00UL, 0x3fe0e489UL, 0x07801742UL,
-  0x3d1c2998UL, 0xe2d05400UL, 0x3fe0ae76UL, 0x887e7e27UL, 0x3d1f486bUL,
-  0x0533c400UL, 0x3fe078bfUL, 0x41edf5fdUL, 0x3d268122UL, 0xbe760400UL,
-  0x3fe04360UL, 0xe79539e0UL, 0xbd04c45fUL, 0xe5b20800UL, 0x3fe00e5aUL,
-  0xb1727b1cUL, 0xbd053ba3UL, 0xaf7a4800UL, 0x3fdfb358UL, 0x3c164935UL,
-  0x3d0085faUL, 0xee031800UL, 0x3fdf4aa7UL, 0x6f014a8bUL, 0x3d12cde5UL,
-  0x56b41000UL, 0x3fdee2a1UL, 0x5a470251UL, 0x3d2f27f4UL, 0xc3ddb000UL,
-  0x3fde7b42UL, 0x5372bd08UL, 0xbd246550UL, 0x1a272800UL, 0x3fde148aUL,
-  0x07322938UL, 0xbd1326b2UL, 0x484c9800UL, 0x3fddae75UL, 0x60dc616aUL,
-  0xbd1ea42dUL, 0x46def800UL, 0x3fdd4902UL, 0xe9a767a8UL, 0x3d235bafUL,
-  0x18064800UL, 0x3fdce42fUL, 0x3ec7a6b0UL, 0xbd0797c3UL, 0xc7455800UL,
-  0x3fdc7ff9UL, 0xc15249aeUL, 0xbd29b6ddUL, 0x693fa000UL, 0x3fdc1c60UL,
-  0x7fe8e180UL, 0x3d2cec80UL, 0x1b80e000UL, 0x3fdbb961UL, 0xf40a666dUL,
-  0x3d27d85bUL, 0x04462800UL, 0x3fdb56faUL, 0x2d841995UL, 0x3d109525UL,
-  0x5248d000UL, 0x3fdaf529UL, 0x52774458UL, 0xbd217cc5UL, 0x3c8ad800UL,
-  0x3fda93edUL, 0xbea77a5dUL, 0x3d1e36f2UL, 0x0224f800UL, 0x3fda3344UL,
-  0x7f9d79f5UL, 0x3d23c645UL, 0xea15f000UL, 0x3fd9d32bUL, 0x10d0c0b0UL,
-  0xbd26279eUL, 0x43135800UL, 0x3fd973a3UL, 0xa502d9f0UL, 0xbd152313UL,
-  0x635bf800UL, 0x3fd914a8UL, 0x2ee6307dUL, 0xbd1766b5UL, 0xa88b3000UL,
-  0x3fd8b639UL, 0xe5e70470UL, 0xbd205ae1UL, 0x776dc800UL, 0x3fd85855UL,
-  0x3333778aUL, 0x3d2fd56fUL, 0x3bd81800UL, 0x3fd7fafaUL, 0xc812566aUL,
-  0xbd272090UL, 0x687cf800UL, 0x3fd79e26UL, 0x2efd1778UL, 0x3d29ec7dUL,
-  0x76c67800UL, 0x3fd741d8UL, 0x49dc60b3UL, 0x3d2d8b09UL, 0xe6af1800UL,
-  0x3fd6e60eUL, 0x7c222d87UL, 0x3d172165UL, 0x3e9c6800UL, 0x3fd68ac8UL,
-  0x2756eba0UL, 0x3d20a0d3UL, 0x0b3ab000UL, 0x3fd63003UL, 0xe731ae00UL,
-  0xbd2db623UL, 0xdf596000UL, 0x3fd5d5bdUL, 0x08a465dcUL, 0xbd0a0b2aUL,
-  0x53c8d000UL, 0x3fd57bf7UL, 0xee5d40efUL, 0x3d1fadedUL, 0x0738a000UL,
-  0x3fd522aeUL, 0x8164c759UL, 0x3d2ebe70UL, 0x9e173000UL, 0x3fd4c9e0UL,
-  0x1b0ad8a4UL, 0xbd2e2089UL, 0xc271c800UL, 0x3fd4718dUL, 0x0967d675UL,
-  0xbd2f27ceUL, 0x23d5e800UL, 0x3fd419b4UL, 0xec90e09dUL, 0x3d08e436UL,
-  0x77333000UL, 0x3fd3c252UL, 0xb606bd5cUL, 0x3d183b54UL, 0x76be1000UL,
-  0x3fd36b67UL, 0xb0f177c8UL, 0x3d116ecdUL, 0xe1d36000UL, 0x3fd314f1UL,
-  0xd3213cb8UL, 0xbd28e27aUL, 0x7cdc9000UL, 0x3fd2bef0UL, 0x4a5004f4UL,
-  0x3d2a9cfaUL, 0x1134d800UL, 0x3fd26962UL, 0xdf5bb3b6UL, 0x3d2c93c1UL,
-  0x6d0eb800UL, 0x3fd21445UL, 0xba46baeaUL, 0x3d0a87deUL, 0x635a6800UL,
-  0x3fd1bf99UL, 0x5147bdb7UL, 0x3d2ca6edUL, 0xcbacf800UL, 0x3fd16b5cUL,
-  0xf7a51681UL, 0x3d2b9acdUL, 0x8227e800UL, 0x3fd1178eUL, 0x63a5f01cUL,
-  0xbd2c210eUL, 0x67616000UL, 0x3fd0c42dUL, 0x163ceae9UL, 0x3d27188bUL,
-  0x604d5800UL, 0x3fd07138UL, 0x16ed4e91UL, 0x3cf89cdbUL, 0x5626c800UL,
-  0x3fd01eaeUL, 0x1485e94aUL, 0xbd16f08cUL, 0x6cb3b000UL, 0x3fcf991cUL,
-  0xca0cdf30UL, 0x3d1bcbecUL, 0xe4dd0000UL, 0x3fcef5adUL, 0x65bb8e11UL,
-  0xbcca2115UL, 0xffe71000UL, 0x3fce530eUL, 0x6041f430UL, 0x3cc21227UL,
-  0xb0d49000UL, 0x3fcdb13dUL, 0xf715b035UL, 0xbd2aff2aUL, 0xf2656000UL,
-  0x3fcd1037UL, 0x75b6f6e4UL, 0xbd084a7eUL, 0xc6f01000UL, 0x3fcc6ffbUL,
-  0xc5962bd2UL, 0xbcf1ec72UL, 0x383be000UL, 0x3fcbd087UL, 0x595412b6UL,
-  0xbd2d4bc4UL, 0x575bd000UL, 0x3fcb31d8UL, 0x4eace1aaUL, 0xbd0c358dUL,
-  0x3c8ae000UL, 0x3fca93edUL, 0x50562169UL, 0xbd287243UL, 0x07089000UL,
-  0x3fc9f6c4UL, 0x6865817aUL, 0x3d29904dUL, 0xdcf70000UL, 0x3fc95a5aUL,
-  0x58a0ff6fUL, 0x3d07f228UL, 0xeb390000UL, 0x3fc8beafUL, 0xaae92cd1UL,
-  0xbd073d54UL, 0x6551a000UL, 0x3fc823c1UL, 0x9a631e83UL, 0x3d1e0ddbUL,
-  0x85445000UL, 0x3fc7898dUL, 0x70914305UL, 0xbd1c6610UL, 0x8b757000UL,
-  0x3fc6f012UL, 0xe59c21e1UL, 0xbd25118dUL, 0xbe8c1000UL, 0x3fc6574eUL,
-  0x2c3c2e78UL, 0x3d19cf8bUL, 0x6b544000UL, 0x3fc5bf40UL, 0xeb68981cUL,
-  0xbd127023UL, 0xe4a1b000UL, 0x3fc527e5UL, 0xe5697dc7UL, 0x3d2633e8UL,
-  0x8333b000UL, 0x3fc4913dUL, 0x54fdb678UL, 0x3d258379UL, 0xa5993000UL,
-  0x3fc3fb45UL, 0x7e6a354dUL, 0xbd2cd1d8UL, 0xb0159000UL, 0x3fc365fcUL,
-  0x234b7289UL, 0x3cc62fa8UL, 0x0c868000UL, 0x3fc2d161UL, 0xcb81b4a1UL,
-  0x3d039d6cUL, 0x2a49c000UL, 0x3fc23d71UL, 0x8fd3df5cUL, 0x3d100d23UL,
-  0x7e23f000UL, 0x3fc1aa2bUL, 0x44389934UL, 0x3d2ca78eUL, 0x8227e000UL,
-  0x3fc1178eUL, 0xce2d07f2UL, 0x3d21ef78UL, 0xb59e4000UL, 0x3fc08598UL,
-  0x7009902cUL, 0xbd27e5ddUL, 0x39dbe000UL, 0x3fbfe891UL, 0x4fa10afdUL,
-  0xbd2534d6UL, 0x830a2000UL, 0x3fbec739UL, 0xafe645e0UL, 0xbd2dc068UL,
-  0x63844000UL, 0x3fbda727UL, 0x1fa71733UL, 0x3d1a8940UL, 0x01bc4000UL,
-  0x3fbc8858UL, 0xc65aacd3UL, 0x3d2646d1UL, 0x8dad6000UL, 0x3fbb6ac8UL,
-  0x2bf768e5UL, 0xbd139080UL, 0x40b1c000UL, 0x3fba4e76UL, 0xb94407c8UL,
-  0xbd0e42b6UL, 0x5d594000UL, 0x3fb9335eUL, 0x3abd47daUL, 0x3d23115cUL,
-  0x2f40e000UL, 0x3fb8197eUL, 0xf96ffdf7UL, 0x3d0f80dcUL, 0x0aeac000UL,
-  0x3fb700d3UL, 0xa99ded32UL, 0x3cec1e8dUL, 0x4d97a000UL, 0x3fb5e95aUL,
-  0x3c5d1d1eUL, 0xbd2c6906UL, 0x5d208000UL, 0x3fb4d311UL, 0x82f4e1efUL,
-  0xbcf53a25UL, 0xa7d1e000UL, 0x3fb3bdf5UL, 0xa5db4ed7UL, 0x3d2cc85eUL,
-  0xa4472000UL, 0x3fb2aa04UL, 0xae9c697dUL, 0xbd20b6e8UL, 0xd1466000UL,
-  0x3fb1973bUL, 0x560d9e9bUL, 0xbd25325dUL, 0xb59e4000UL, 0x3fb08598UL,
-  0x7009902cUL, 0xbd17e5ddUL, 0xc006c000UL, 0x3faeea31UL, 0x4fc93b7bUL,
-  0xbd0e113eUL, 0xcdddc000UL, 0x3faccb73UL, 0x47d82807UL, 0xbd1a68f2UL,
-  0xd0fb0000UL, 0x3faaaef2UL, 0x353bb42eUL, 0x3d20fc1aUL, 0x149fc000UL,
-  0x3fa894aaUL, 0xd05a267dUL, 0xbd197995UL, 0xf2d4c000UL, 0x3fa67c94UL,
-  0xec19afa2UL, 0xbd029efbUL, 0xd42e0000UL, 0x3fa466aeUL, 0x75bdfd28UL,
-  0xbd2c1673UL, 0x2f8d0000UL, 0x3fa252f3UL, 0xe021b67bUL, 0x3d283e9aUL,
-  0x89e74000UL, 0x3fa0415dUL, 0x5cf1d753UL, 0x3d0111c0UL, 0xec148000UL,
-  0x3f9c63d2UL, 0x3f9eb2f3UL, 0x3d2578c6UL, 0x28c90000UL, 0x3f984925UL,
-  0x325a0c34UL, 0xbd2aa0baUL, 0x25980000UL, 0x3f9432a9UL, 0x928637feUL,
-  0x3d098139UL, 0x58938000UL, 0x3f902056UL, 0x06e2f7d2UL, 0xbd23dc5bUL,
-  0xa3890000UL, 0x3f882448UL, 0xda74f640UL, 0xbd275577UL, 0x75890000UL,
-  0x3f801015UL, 0x999d2be8UL, 0xbd10c76bUL, 0x59580000UL, 0x3f700805UL,
-  0xcb31c67bUL, 0x3d2166afUL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-  0x80000000UL
-};
-
-ALIGNED_(16) juint _log2[] =
-{
-  0xfefa3800UL, 0x3fa62e42UL, 0x93c76730UL, 0x3ceef357UL
-};
-
-ALIGNED_(16) juint _coeff[] =
-{
-  0x92492492UL, 0x3fc24924UL, 0x00000000UL, 0xbfd00000UL, 0x3d6fb175UL,
-  0xbfc5555eUL, 0x55555555UL, 0x3fd55555UL, 0x9999999aUL, 0x3fc99999UL,
-  0x00000000UL, 0xbfe00000UL
-};
-
-//registers,
-// input: xmm0
-// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
-//          rax, rdx, rcx, r8, r11
-
-void MacroAssembler::fast_log(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp1, Register tmp2) {
-  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
-  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
-  Label L_2TAG_PACKET_8_0_2;
-  Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
-
-  assert_different_registers(tmp1, tmp2, eax, ecx, edx);
-  jmp(start);
-  address L_tbl = (address)_L_tbl;
-  address log2 = (address)_log2;
-  address coeff = (address)_coeff;
-
-  bind(start);
-  subq(rsp, 24);
-  movsd(Address(rsp, 0), xmm0);
-  mov64(rax, 0x3ff0000000000000);
-  movdq(xmm2, rax);
-  mov64(rdx, 0x77f0000000000000);
-  movdq(xmm3, rdx);
-  movl(ecx, 32768);
-  movdl(xmm4, rcx);
-  mov64(tmp1, 0xffffe00000000000);
-  movdq(xmm5, tmp1);
-  movdqu(xmm1, xmm0);
-  pextrw(eax, xmm0, 3);
-  por(xmm0, xmm2);
-  movl(ecx, 16352);
-  psrlq(xmm0, 27);
-  lea(tmp2, ExternalAddress(L_tbl));
-  psrld(xmm0, 2);
-  rcpps(xmm0, xmm0);
-  psllq(xmm1, 12);
-  pshufd(xmm6, xmm5, 228);
-  psrlq(xmm1, 12);
-  subl(eax, 16);
-  cmpl(eax, 32736);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
-
-  bind(L_2TAG_PACKET_1_0_2);
-  paddd(xmm0, xmm4);
-  por(xmm1, xmm3);
-  movdl(edx, xmm0);
-  psllq(xmm0, 29);
-  pand(xmm5, xmm1);
-  pand(xmm0, xmm6);
-  subsd(xmm1, xmm5);
-  mulpd(xmm5, xmm0);
-  andl(eax, 32752);
-  subl(eax, ecx);
-  cvtsi2sdl(xmm7, eax);
-  mulsd(xmm1, xmm0);
-  movq(xmm6, ExternalAddress(log2));       // 0xfefa3800UL, 0x3fa62e42UL
-  movdqu(xmm3, ExternalAddress(coeff));    // 0x92492492UL, 0x3fc24924UL, 0x00000000UL, 0xbfd00000UL
-  subsd(xmm5, xmm2);
-  andl(edx, 16711680);
-  shrl(edx, 12);
-  movdqu(xmm0, Address(tmp2, edx));
-  movdqu(xmm4, ExternalAddress(16 + coeff)); // 0x3d6fb175UL, 0xbfc5555eUL, 0x55555555UL, 0x3fd55555UL
-  addsd(xmm1, xmm5);
-  movdqu(xmm2, ExternalAddress(32 + coeff)); // 0x9999999aUL, 0x3fc99999UL, 0x00000000UL, 0xbfe00000UL
-  mulsd(xmm6, xmm7);
-  if (VM_Version::supports_sse3()) {
-    movddup(xmm5, xmm1);
-  } else {
-    movdqu(xmm5, xmm1);
-    movlhps(xmm5, xmm5);
-  }
-  mulsd(xmm7, ExternalAddress(8 + log2));    // 0x93c76730UL, 0x3ceef357UL
-  mulsd(xmm3, xmm1);
-  addsd(xmm0, xmm6);
-  mulpd(xmm4, xmm5);
-  mulpd(xmm5, xmm5);
-  if (VM_Version::supports_sse3()) {
-    movddup(xmm6, xmm0);
-  } else {
-    movdqu(xmm6, xmm0);
-    movlhps(xmm6, xmm6);
-  }
-  addsd(xmm0, xmm1);
-  addpd(xmm4, xmm2);
-  mulpd(xmm3, xmm5);
-  subsd(xmm6, xmm0);
-  mulsd(xmm4, xmm1);
-  pshufd(xmm2, xmm0, 238);
-  addsd(xmm1, xmm6);
-  mulsd(xmm5, xmm5);
-  addsd(xmm7, xmm2);
-  addpd(xmm4, xmm3);
-  addsd(xmm1, xmm7);
-  mulpd(xmm4, xmm5);
-  addsd(xmm1, xmm4);
-  pshufd(xmm5, xmm4, 238);
-  addsd(xmm1, xmm5);
-  addsd(xmm0, xmm1);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_0_0_2);
-  movq(xmm0, Address(rsp, 0));
-  movq(xmm1, Address(rsp, 0));
-  addl(eax, 16);
-  cmpl(eax, 32768);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_2_0_2);
-  cmpl(eax, 16);
-  jcc(Assembler::below, L_2TAG_PACKET_3_0_2);
-
-  bind(L_2TAG_PACKET_4_0_2);
-  addsd(xmm0, xmm0);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_5_0_2);
-  jcc(Assembler::above, L_2TAG_PACKET_4_0_2);
-  cmpl(edx, 0);
-  jcc(Assembler::above, L_2TAG_PACKET_4_0_2);
-  jmp(L_2TAG_PACKET_6_0_2);
-
-  bind(L_2TAG_PACKET_3_0_2);
-  xorpd(xmm1, xmm1);
-  addsd(xmm1, xmm0);
-  movdl(edx, xmm1);
-  psrlq(xmm1, 32);
-  movdl(ecx, xmm1);
-  orl(edx, ecx);
-  cmpl(edx, 0);
-  jcc(Assembler::equal, L_2TAG_PACKET_7_0_2);
-  xorpd(xmm1, xmm1);
-  movl(eax, 18416);
-  pinsrw(xmm1, eax, 3);
-  mulsd(xmm0, xmm1);
-  movdqu(xmm1, xmm0);
-  pextrw(eax, xmm0, 3);
-  por(xmm0, xmm2);
-  psrlq(xmm0, 27);
-  movl(ecx, 18416);
-  psrld(xmm0, 2);
-  rcpps(xmm0, xmm0);
-  psllq(xmm1, 12);
-  pshufd(xmm6, xmm5, 228);
-  psrlq(xmm1, 12);
-  jmp(L_2TAG_PACKET_1_0_2);
-
-  bind(L_2TAG_PACKET_2_0_2);
-  movdl(edx, xmm1);
-  psrlq(xmm1, 32);
-  movdl(ecx, xmm1);
-  addl(ecx, ecx);
-  cmpl(ecx, -2097152);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_5_0_2);
-  orl(edx, ecx);
-  cmpl(edx, 0);
-  jcc(Assembler::equal, L_2TAG_PACKET_7_0_2);
-
-  bind(L_2TAG_PACKET_6_0_2);
-  xorpd(xmm1, xmm1);
-  xorpd(xmm0, xmm0);
-  movl(eax, 32752);
-  pinsrw(xmm1, eax, 3);
-  mulsd(xmm0, xmm1);
-  movl(Address(rsp, 16), 3);
-  jmp(L_2TAG_PACKET_8_0_2);
-  bind(L_2TAG_PACKET_7_0_2);
-  xorpd(xmm1, xmm1);
-  xorpd(xmm0, xmm0);
-  movl(eax, 49136);
-  pinsrw(xmm0, eax, 3);
-  divsd(xmm0, xmm1);
-  movl(Address(rsp, 16), 2);
-
-  bind(L_2TAG_PACKET_8_0_2);
-  movq(Address(rsp, 8), xmm0);
-
-  bind(B1_3);
-  movq(xmm0, Address(rsp, 8));
-
-  bind(B1_5);
-  addq(rsp, 24);
-}
-
-/******************************************************************************/
-//                     ALGORITHM DESCRIPTION  - POW()
-//                     ---------------------
-//
-//    Let x=2^k * mx, mx in [1,2)
-//
-//    log2(x) calculation:
-//
-//    Get B~1/mx based on the output of rcpps instruction (B0)
-//    B = int((B0*LH*2^9+0.5))/2^9
-//    LH is a short approximation for log2(e)
-//
-//    Reduced argument, scaled by LH:
-//                r=B*mx-LH (computed accurately in high and low parts)
-//
-//    log2(x) result:  k - log2(B) + p(r)
-//             p(r) is a degree 8 polynomial
-//             -log2(B) read from data table (high, low parts)
-//             log2(x) is formed from high and low parts
-//    For |x| in [1-1/32, 1+1/16), a slower but more accurate computation
-//    based om the same table design is performed.
-//
-//   Main path is taken if | floor(log2(|log2(|x|)|) + floor(log2|y|) | < 8,
-//   to filter out all potential OF/UF cases.
-//   exp2(y*log2(x)) is computed using an 8-bit index table and a degree 5
-//   polynomial
-//
-// Special cases:
-//  pow(-0,y) = -INF and raises the divide-by-zero exception for y an odd
-//  integer < 0.
-//  pow(-0,y) = +INF and raises the divide-by-zero exception for y < 0 and
-//  not an odd integer.
-//  pow(-0,y) = -0 for y an odd integer > 0.
-//  pow(-0,y) = +0 for y > 0 and not an odd integer.
-//  pow(-1,-INF) = NaN.
-//  pow(+1,y) = NaN for any y, even a NaN.
-//  pow(x,-0) = 1 for any x, even a NaN.
-//  pow(x,y) = a NaN and raises the invalid exception for finite x < 0 and
-//  finite non-integer y.
-//  pow(x,-INF) = +INF for |x|<1.
-//  pow(x,-INF) = +0 for |x|>1.
-//  pow(x,+INF) = +0 for |x|<1.
-//  pow(x,+INF) = +INF for |x|>1.
-//  pow(-INF,y) = -0 for y an odd integer < 0.
-//  pow(-INF,y) = +0 for y < 0 and not an odd integer.
-//  pow(-INF,y) = -INF for y an odd integer > 0.
-//  pow(-INF,y) = +INF for y > 0 and not an odd integer.
-//  pow(+INF,y) = +0 for y <0.
-//  pow(+INF,y) = +INF for y >0.
-//
-/******************************************************************************/
-
-ALIGNED_(16) juint _HIGHSIGMASK[] =
-{
-  0x00000000UL, 0xfffff800UL, 0x00000000UL, 0xfffff800UL
-};
-
-ALIGNED_(16) juint _LOG2_E[] =
-{
-  0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
-};
-
-ALIGNED_(16) juint _HIGHMASK_Y[] =
-{
-  0x00000000UL, 0xfffffff8UL, 0x00000000UL, 0xffffffffUL
-};
-
-ALIGNED_(16) juint _T_exp[] =
-{
-  0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x3b700000UL, 0xfa5abcbfUL,
-  0x3ff00b1aUL, 0xa7609f71UL, 0xbc84f6b2UL, 0xa9fb3335UL, 0x3ff0163dUL,
-  0x9ab8cdb7UL, 0x3c9b6129UL, 0x143b0281UL, 0x3ff02168UL, 0x0fc54eb6UL,
-  0xbc82bf31UL, 0x3e778061UL, 0x3ff02c9aUL, 0x535b085dUL, 0xbc719083UL,
-  0x2e11bbccUL, 0x3ff037d4UL, 0xeeade11aUL, 0x3c656811UL, 0xe86e7f85UL,
-  0x3ff04315UL, 0x1977c96eUL, 0xbc90a31cUL, 0x72f654b1UL, 0x3ff04e5fUL,
-  0x3aa0d08cUL, 0x3c84c379UL, 0xd3158574UL, 0x3ff059b0UL, 0xa475b465UL,
-  0x3c8d73e2UL, 0x0e3c1f89UL, 0x3ff0650aUL, 0x5799c397UL, 0xbc95cb7bUL,
-  0x29ddf6deUL, 0x3ff0706bUL, 0xe2b13c27UL, 0xbc8c91dfUL, 0x2b72a836UL,
-  0x3ff07bd4UL, 0x54458700UL, 0x3c832334UL, 0x18759bc8UL, 0x3ff08745UL,
-  0x4bb284ffUL, 0x3c6186beUL, 0xf66607e0UL, 0x3ff092bdUL, 0x800a3fd1UL,
-  0xbc968063UL, 0xcac6f383UL, 0x3ff09e3eUL, 0x18316136UL, 0x3c914878UL,
-  0x9b1f3919UL, 0x3ff0a9c7UL, 0x873d1d38UL, 0x3c85d16cUL, 0x6cf9890fUL,
-  0x3ff0b558UL, 0x4adc610bUL, 0x3c98a62eUL, 0x45e46c85UL, 0x3ff0c0f1UL,
-  0x06d21cefUL, 0x3c94f989UL, 0x2b7247f7UL, 0x3ff0cc92UL, 0x16e24f71UL,
-  0x3c901edcUL, 0x23395decUL, 0x3ff0d83bUL, 0xe43f316aUL, 0xbc9bc14dUL,
-  0x32d3d1a2UL, 0x3ff0e3ecUL, 0x27c57b52UL, 0x3c403a17UL, 0x5fdfa9c5UL,
-  0x3ff0efa5UL, 0xbc54021bUL, 0xbc949db9UL, 0xaffed31bUL, 0x3ff0fb66UL,
-  0xc44ebd7bUL, 0xbc6b9bedUL, 0x28d7233eUL, 0x3ff10730UL, 0x1692fdd5UL,
-  0x3c8d46ebUL, 0xd0125b51UL, 0x3ff11301UL, 0x39449b3aUL, 0xbc96c510UL,
-  0xab5e2ab6UL, 0x3ff11edbUL, 0xf703fb72UL, 0xbc9ca454UL, 0xc06c31ccUL,
-  0x3ff12abdUL, 0xb36ca5c7UL, 0xbc51b514UL, 0x14f204abUL, 0x3ff136a8UL,
-  0xba48dcf0UL, 0xbc67108fUL, 0xaea92de0UL, 0x3ff1429aUL, 0x9af1369eUL,
-  0xbc932fbfUL, 0x934f312eUL, 0x3ff14e95UL, 0x39bf44abUL, 0xbc8b91e8UL,
-  0xc8a58e51UL, 0x3ff15a98UL, 0xb9eeab0aUL, 0x3c82406aUL, 0x5471c3c2UL,
-  0x3ff166a4UL, 0x82ea1a32UL, 0x3c58f23bUL, 0x3c7d517bUL, 0x3ff172b8UL,
-  0xb9d78a76UL, 0xbc819041UL, 0x8695bbc0UL, 0x3ff17ed4UL, 0xe2ac5a64UL,
-  0x3c709e3fUL, 0x388c8deaUL, 0x3ff18af9UL, 0xd1970f6cUL, 0xbc911023UL,
-  0x58375d2fUL, 0x3ff19726UL, 0x85f17e08UL, 0x3c94aaddUL, 0xeb6fcb75UL,
-  0x3ff1a35bUL, 0x7b4968e4UL, 0x3c8e5b4cUL, 0xf8138a1cUL, 0x3ff1af99UL,
-  0xa4b69280UL, 0x3c97bf85UL, 0x84045cd4UL, 0x3ff1bbe0UL, 0x352ef607UL,
-  0xbc995386UL, 0x95281c6bUL, 0x3ff1c82fUL, 0x8010f8c9UL, 0x3c900977UL,
-  0x3168b9aaUL, 0x3ff1d487UL, 0x00a2643cUL, 0x3c9e016eUL, 0x5eb44027UL,
-  0x3ff1e0e7UL, 0x088cb6deUL, 0xbc96fdd8UL, 0x22fcd91dUL, 0x3ff1ed50UL,
-  0x027bb78cUL, 0xbc91df98UL, 0x8438ce4dUL, 0x3ff1f9c1UL, 0xa097af5cUL,
-  0xbc9bf524UL, 0x88628cd6UL, 0x3ff2063bUL, 0x814a8495UL, 0x3c8dc775UL,
-  0x3578a819UL, 0x3ff212beUL, 0x2cfcaac9UL, 0x3c93592dUL, 0x917ddc96UL,
-  0x3ff21f49UL, 0x9494a5eeUL, 0x3c82a97eUL, 0xa27912d1UL, 0x3ff22bddUL,
-  0x5577d69fUL, 0x3c8d34fbUL, 0x6e756238UL, 0x3ff2387aUL, 0xb6c70573UL,
-  0x3c99b07eUL, 0xfb82140aUL, 0x3ff2451fUL, 0x911ca996UL, 0x3c8acfccUL,
-  0x4fb2a63fUL, 0x3ff251ceUL, 0xbef4f4a4UL, 0x3c8ac155UL, 0x711ece75UL,
-  0x3ff25e85UL, 0x4ac31b2cUL, 0x3c93e1a2UL, 0x65e27cddUL, 0x3ff26b45UL,
-  0x9940e9d9UL, 0x3c82bd33UL, 0x341ddf29UL, 0x3ff2780eUL, 0x05f9e76cUL,
-  0x3c9e067cUL, 0xe1f56381UL, 0x3ff284dfUL, 0x8c3f0d7eUL, 0xbc9a4c3aUL,
-  0x7591bb70UL, 0x3ff291baUL, 0x28401cbdUL, 0xbc82cc72UL, 0xf51fdee1UL,
-  0x3ff29e9dUL, 0xafad1255UL, 0x3c8612e8UL, 0x66d10f13UL, 0x3ff2ab8aUL,
-  0x191690a7UL, 0xbc995743UL, 0xd0dad990UL, 0x3ff2b87fUL, 0xd6381aa4UL,
-  0xbc410adcUL, 0x39771b2fUL, 0x3ff2c57eUL, 0xa6eb5124UL, 0xbc950145UL,
-  0xa6e4030bUL, 0x3ff2d285UL, 0x54db41d5UL, 0x3c900247UL, 0x1f641589UL,
-  0x3ff2df96UL, 0xfbbce198UL, 0x3c9d16cfUL, 0xa93e2f56UL, 0x3ff2ecafUL,
-  0x45d52383UL, 0x3c71ca0fUL, 0x4abd886bUL, 0x3ff2f9d2UL, 0x532bda93UL,
-  0xbc653c55UL, 0x0a31b715UL, 0x3ff306feUL, 0xd23182e4UL, 0x3c86f46aUL,
-  0xedeeb2fdUL, 0x3ff31432UL, 0xf3f3fcd1UL, 0x3c8959a3UL, 0xfc4cd831UL,
-  0x3ff32170UL, 0x8e18047cUL, 0x3c8a9ce7UL, 0x3ba8ea32UL, 0x3ff32eb8UL,
-  0x3cb4f318UL, 0xbc9c45e8UL, 0xb26416ffUL, 0x3ff33c08UL, 0x843659a6UL,
-  0x3c932721UL, 0x66e3fa2dUL, 0x3ff34962UL, 0x930881a4UL, 0xbc835a75UL,
-  0x5f929ff1UL, 0x3ff356c5UL, 0x5c4e4628UL, 0xbc8b5ceeUL, 0xa2de883bUL,
-  0x3ff36431UL, 0xa06cb85eUL, 0xbc8c3144UL, 0x373aa9cbUL, 0x3ff371a7UL,
-  0xbf42eae2UL, 0xbc963aeaUL, 0x231e754aUL, 0x3ff37f26UL, 0x9eceb23cUL,
-  0xbc99f5caUL, 0x6d05d866UL, 0x3ff38caeUL, 0x3c9904bdUL, 0xbc9e958dUL,
-  0x1b7140efUL, 0x3ff39a40UL, 0xfc8e2934UL, 0xbc99a9a5UL, 0x34e59ff7UL,
-  0x3ff3a7dbUL, 0xd661f5e3UL, 0xbc75e436UL, 0xbfec6cf4UL, 0x3ff3b57fUL,
-  0xe26fff18UL, 0x3c954c66UL, 0xc313a8e5UL, 0x3ff3c32dUL, 0x375d29c3UL,
-  0xbc9efff8UL, 0x44ede173UL, 0x3ff3d0e5UL, 0x8c284c71UL, 0x3c7fe8d0UL,
-  0x4c123422UL, 0x3ff3dea6UL, 0x11f09ebcUL, 0x3c8ada09UL, 0xdf1c5175UL,
-  0x3ff3ec70UL, 0x7b8c9bcaUL, 0xbc8af663UL, 0x04ac801cUL, 0x3ff3fa45UL,
-  0xf956f9f3UL, 0xbc97d023UL, 0xc367a024UL, 0x3ff40822UL, 0xb6f4d048UL,
-  0x3c8bddf8UL, 0x21f72e2aUL, 0x3ff4160aUL, 0x1c309278UL, 0xbc5ef369UL,
-  0x2709468aUL, 0x3ff423fbUL, 0xc0b314ddUL, 0xbc98462dUL, 0xd950a897UL,
-  0x3ff431f5UL, 0xe35f7999UL, 0xbc81c7ddUL, 0x3f84b9d4UL, 0x3ff43ffaUL,
-  0x9704c003UL, 0x3c8880beUL, 0x6061892dUL, 0x3ff44e08UL, 0x04ef80d0UL,
-  0x3c489b7aUL, 0x42a7d232UL, 0x3ff45c20UL, 0x82fb1f8eUL, 0xbc686419UL,
-  0xed1d0057UL, 0x3ff46a41UL, 0xd1648a76UL, 0x3c9c944bUL, 0x668b3237UL,
-  0x3ff4786dUL, 0xed445733UL, 0xbc9c20f0UL, 0xb5c13cd0UL, 0x3ff486a2UL,
-  0xb69062f0UL, 0x3c73c1a3UL, 0xe192aed2UL, 0x3ff494e1UL, 0x5e499ea0UL,
-  0xbc83b289UL, 0xf0d7d3deUL, 0x3ff4a32aUL, 0xf3d1be56UL, 0x3c99cb62UL,
-  0xea6db7d7UL, 0x3ff4b17dUL, 0x7f2897f0UL, 0xbc8125b8UL, 0xd5362a27UL,
-  0x3ff4bfdaUL, 0xafec42e2UL, 0x3c7d4397UL, 0xb817c114UL, 0x3ff4ce41UL,
-  0x690abd5dUL, 0x3c905e29UL, 0x99fddd0dUL, 0x3ff4dcb2UL, 0xbc6a7833UL,
-  0x3c98ecdbUL, 0x81d8abffUL, 0x3ff4eb2dUL, 0x2e5d7a52UL, 0xbc95257dUL,
-  0x769d2ca7UL, 0x3ff4f9b2UL, 0xd25957e3UL, 0xbc94b309UL, 0x7f4531eeUL,
-  0x3ff50841UL, 0x49b7465fUL, 0x3c7a249bUL, 0xa2cf6642UL, 0x3ff516daUL,
-  0x69bd93efUL, 0xbc8f7685UL, 0xe83f4eefUL, 0x3ff5257dUL, 0x43efef71UL,
-  0xbc7c998dUL, 0x569d4f82UL, 0x3ff5342bUL, 0x1db13cadUL, 0xbc807abeUL,
-  0xf4f6ad27UL, 0x3ff542e2UL, 0x192d5f7eUL, 0x3c87926dUL, 0xca5d920fUL,
-  0x3ff551a4UL, 0xefede59bUL, 0xbc8d689cUL, 0xdde910d2UL, 0x3ff56070UL,
-  0x168eebf0UL, 0xbc90fb6eUL, 0x36b527daUL, 0x3ff56f47UL, 0x011d93adUL,
-  0x3c99bb2cUL, 0xdbe2c4cfUL, 0x3ff57e27UL, 0x8a57b9c4UL, 0xbc90b98cUL,
-  0xd497c7fdUL, 0x3ff58d12UL, 0x5b9a1de8UL, 0x3c8295e1UL, 0x27ff07ccUL,
-  0x3ff59c08UL, 0xe467e60fUL, 0xbc97e2ceUL, 0xdd485429UL, 0x3ff5ab07UL,
-  0x054647adUL, 0x3c96324cUL, 0xfba87a03UL, 0x3ff5ba11UL, 0x4c233e1aUL,
-  0xbc9b77a1UL, 0x8a5946b7UL, 0x3ff5c926UL, 0x816986a2UL, 0x3c3c4b1bUL,
-  0x90998b93UL, 0x3ff5d845UL, 0xa8b45643UL, 0xbc9cd6a7UL, 0x15ad2148UL,
-  0x3ff5e76fUL, 0x3080e65eUL, 0x3c9ba6f9UL, 0x20dceb71UL, 0x3ff5f6a3UL,
-  0xe3cdcf92UL, 0xbc89eaddUL, 0xb976dc09UL, 0x3ff605e1UL, 0x9b56de47UL,
-  0xbc93e242UL, 0xe6cdf6f4UL, 0x3ff6152aUL, 0x4ab84c27UL, 0x3c9e4b3eUL,
-  0xb03a5585UL, 0x3ff6247eUL, 0x7e40b497UL, 0xbc9383c1UL, 0x1d1929fdUL,
-  0x3ff633ddUL, 0xbeb964e5UL, 0x3c984710UL, 0x34ccc320UL, 0x3ff64346UL,
-  0x759d8933UL, 0xbc8c483cUL, 0xfebc8fb7UL, 0x3ff652b9UL, 0xc9a73e09UL,
-  0xbc9ae3d5UL, 0x82552225UL, 0x3ff66238UL, 0x87591c34UL, 0xbc9bb609UL,
-  0xc70833f6UL, 0x3ff671c1UL, 0x586c6134UL, 0xbc8e8732UL, 0xd44ca973UL,
-  0x3ff68155UL, 0x44f73e65UL, 0x3c6038aeUL, 0xb19e9538UL, 0x3ff690f4UL,
-  0x9aeb445dUL, 0x3c8804bdUL, 0x667f3bcdUL, 0x3ff6a09eUL, 0x13b26456UL,
-  0xbc9bdd34UL, 0xfa75173eUL, 0x3ff6b052UL, 0x2c9a9d0eUL, 0x3c7a38f5UL,
-  0x750bdabfUL, 0x3ff6c012UL, 0x67ff0b0dUL, 0xbc728956UL, 0xddd47645UL,
-  0x3ff6cfdcUL, 0xb6f17309UL, 0x3c9c7aa9UL, 0x3c651a2fUL, 0x3ff6dfb2UL,
-  0x683c88abUL, 0xbc6bbe3aUL, 0x98593ae5UL, 0x3ff6ef92UL, 0x9e1ac8b2UL,
-  0xbc90b974UL, 0xf9519484UL, 0x3ff6ff7dUL, 0x25860ef6UL, 0xbc883c0fUL,
-  0x66f42e87UL, 0x3ff70f74UL, 0xd45aa65fUL, 0x3c59d644UL, 0xe8ec5f74UL,
-  0x3ff71f75UL, 0x86887a99UL, 0xbc816e47UL, 0x86ead08aUL, 0x3ff72f82UL,
-  0x2cd62c72UL, 0xbc920aa0UL, 0x48a58174UL, 0x3ff73f9aUL, 0x6c65d53cUL,
-  0xbc90a8d9UL, 0x35d7cbfdUL, 0x3ff74fbdUL, 0x618a6e1cUL, 0x3c9047fdUL,
-  0x564267c9UL, 0x3ff75febUL, 0x57316dd3UL, 0xbc902459UL, 0xb1ab6e09UL,
-  0x3ff77024UL, 0x169147f8UL, 0x3c9b7877UL, 0x4fde5d3fUL, 0x3ff78069UL,
-  0x0a02162dUL, 0x3c9866b8UL, 0x38ac1cf6UL, 0x3ff790b9UL, 0x62aadd3eUL,
-  0x3c9349a8UL, 0x73eb0187UL, 0x3ff7a114UL, 0xee04992fUL, 0xbc841577UL,
-  0x0976cfdbUL, 0x3ff7b17bUL, 0x8468dc88UL, 0xbc9bebb5UL, 0x0130c132UL,
-  0x3ff7c1edUL, 0xd1164dd6UL, 0x3c9f124cUL, 0x62ff86f0UL, 0x3ff7d26aUL,
-  0xfb72b8b4UL, 0x3c91bddbUL, 0x36cf4e62UL, 0x3ff7e2f3UL, 0xba15797eUL,
-  0x3c705d02UL, 0x8491c491UL, 0x3ff7f387UL, 0xcf9311aeUL, 0xbc807f11UL,
-  0x543e1a12UL, 0x3ff80427UL, 0x626d972bUL, 0xbc927c86UL, 0xadd106d9UL,
-  0x3ff814d2UL, 0x0d151d4dUL, 0x3c946437UL, 0x994cce13UL, 0x3ff82589UL,
-  0xd41532d8UL, 0xbc9d4c1dUL, 0x1eb941f7UL, 0x3ff8364cUL, 0x31df2bd5UL,
-  0x3c999b9aUL, 0x4623c7adUL, 0x3ff8471aUL, 0xa341cdfbUL, 0xbc88d684UL,
-  0x179f5b21UL, 0x3ff857f4UL, 0xf8b216d0UL, 0xbc5ba748UL, 0x9b4492edUL,
-  0x3ff868d9UL, 0x9bd4f6baUL, 0xbc9fc6f8UL, 0xd931a436UL, 0x3ff879caUL,
-  0xd2db47bdUL, 0x3c85d2d7UL, 0xd98a6699UL, 0x3ff88ac7UL, 0xf37cb53aUL,
-  0x3c9994c2UL, 0xa478580fUL, 0x3ff89bd0UL, 0x4475202aUL, 0x3c9d5395UL,
-  0x422aa0dbUL, 0x3ff8ace5UL, 0x56864b27UL, 0x3c96e9f1UL, 0xbad61778UL,
-  0x3ff8be05UL, 0xfc43446eUL, 0x3c9ecb5eUL, 0x16b5448cUL, 0x3ff8cf32UL,
-  0x32e9e3aaUL, 0xbc70d55eUL, 0x5e0866d9UL, 0x3ff8e06aUL, 0x6fc9b2e6UL,
-  0xbc97114aUL, 0x99157736UL, 0x3ff8f1aeUL, 0xa2e3976cUL, 0x3c85cc13UL,
-  0xd0282c8aUL, 0x3ff902feUL, 0x85fe3fd2UL, 0x3c9592caUL, 0x0b91ffc6UL,
-  0x3ff9145bUL, 0x2e582524UL, 0xbc9dd679UL, 0x53aa2fe2UL, 0x3ff925c3UL,
-  0xa639db7fUL, 0xbc83455fUL, 0xb0cdc5e5UL, 0x3ff93737UL, 0x81b57ebcUL,
-  0xbc675fc7UL, 0x2b5f98e5UL, 0x3ff948b8UL, 0x797d2d99UL, 0xbc8dc3d6UL,
-  0xcbc8520fUL, 0x3ff95a44UL, 0x96a5f039UL, 0xbc764b7cUL, 0x9a7670b3UL,
-  0x3ff96bddUL, 0x7f19c896UL, 0xbc5ba596UL, 0x9fde4e50UL, 0x3ff97d82UL,
-  0x7c1b85d1UL, 0xbc9d185bUL, 0xe47a22a2UL, 0x3ff98f33UL, 0xa24c78ecUL,
-  0x3c7cabdaUL, 0x70ca07baUL, 0x3ff9a0f1UL, 0x91cee632UL, 0xbc9173bdUL,
-  0x4d53fe0dUL, 0x3ff9b2bbUL, 0x4df6d518UL, 0xbc9dd84eUL, 0x82a3f090UL,
-  0x3ff9c491UL, 0xb071f2beUL, 0x3c7c7c46UL, 0x194bb8d5UL, 0x3ff9d674UL,
-  0xa3dd8233UL, 0xbc9516beUL, 0x19e32323UL, 0x3ff9e863UL, 0x78e64c6eUL,
-  0x3c7824caUL, 0x8d07f29eUL, 0x3ff9fa5eUL, 0xaaf1faceUL, 0xbc84a9ceUL,
-  0x7b5de565UL, 0x3ffa0c66UL, 0x5d1cd533UL, 0xbc935949UL, 0xed8eb8bbUL,
-  0x3ffa1e7aUL, 0xee8be70eUL, 0x3c9c6618UL, 0xec4a2d33UL, 0x3ffa309bUL,
-  0x7ddc36abUL, 0x3c96305cUL, 0x80460ad8UL, 0x3ffa42c9UL, 0x589fb120UL,
-  0xbc9aa780UL, 0xb23e255dUL, 0x3ffa5503UL, 0xdb8d41e1UL, 0xbc9d2f6eUL,
-  0x8af46052UL, 0x3ffa674aUL, 0x30670366UL, 0x3c650f56UL, 0x1330b358UL,
-  0x3ffa799eUL, 0xcac563c7UL, 0x3c9bcb7eUL, 0x53c12e59UL, 0x3ffa8bfeUL,
-  0xb2ba15a9UL, 0xbc94f867UL, 0x5579fdbfUL, 0x3ffa9e6bUL, 0x0ef7fd31UL,
-  0x3c90fac9UL, 0x21356ebaUL, 0x3ffab0e5UL, 0xdae94545UL, 0x3c889c31UL,
-  0xbfd3f37aUL, 0x3ffac36bUL, 0xcae76cd0UL, 0xbc8f9234UL, 0x3a3c2774UL,
-  0x3ffad5ffUL, 0xb6b1b8e5UL, 0x3c97ef3bUL, 0x995ad3adUL, 0x3ffae89fUL,
-  0x345dcc81UL, 0x3c97a1cdUL, 0xe622f2ffUL, 0x3ffafb4cUL, 0x0f315ecdUL,
-  0xbc94b2fcUL, 0x298db666UL, 0x3ffb0e07UL, 0x4c80e425UL, 0xbc9bdef5UL,
-  0x6c9a8952UL, 0x3ffb20ceUL, 0x4a0756ccUL, 0x3c94dd02UL, 0xb84f15fbUL,
-  0x3ffb33a2UL, 0x3084d708UL, 0xbc62805eUL, 0x15b749b1UL, 0x3ffb4684UL,
-  0xe9df7c90UL, 0xbc7f763dUL, 0x8de5593aUL, 0x3ffb5972UL, 0xbbba6de3UL,
-  0xbc9c71dfUL, 0x29f1c52aUL, 0x3ffb6c6eUL, 0x52883f6eUL, 0x3c92a8f3UL,
-  0xf2fb5e47UL, 0x3ffb7f76UL, 0x7e54ac3bUL, 0xbc75584fUL, 0xf22749e4UL,
-  0x3ffb928cUL, 0x54cb65c6UL, 0xbc9b7216UL, 0x30a1064aUL, 0x3ffba5b0UL,
-  0x0e54292eUL, 0xbc9efcd3UL, 0xb79a6f1fUL, 0x3ffbb8e0UL, 0xc9696205UL,
-  0xbc3f52d1UL, 0x904bc1d2UL, 0x3ffbcc1eUL, 0x7a2d9e84UL, 0x3c823dd0UL,
-  0xc3f3a207UL, 0x3ffbdf69UL, 0x60ea5b53UL, 0xbc3c2623UL, 0x5bd71e09UL,
-  0x3ffbf2c2UL, 0x3f6b9c73UL, 0xbc9efdcaUL, 0x6141b33dUL, 0x3ffc0628UL,
-  0xa1fbca34UL, 0xbc8d8a5aUL, 0xdd85529cUL, 0x3ffc199bUL, 0x895048ddUL,
-  0x3c811065UL, 0xd9fa652cUL, 0x3ffc2d1cUL, 0x17c8a5d7UL, 0xbc96e516UL,
-  0x5fffd07aUL, 0x3ffc40abUL, 0xe083c60aUL, 0x3c9b4537UL, 0x78fafb22UL,
-  0x3ffc5447UL, 0x2493b5afUL, 0x3c912f07UL, 0x2e57d14bUL, 0x3ffc67f1UL,
-  0xff483cadUL, 0x3c92884dUL, 0x8988c933UL, 0x3ffc7ba8UL, 0xbe255559UL,
-  0xbc8e76bbUL, 0x9406e7b5UL, 0x3ffc8f6dUL, 0x48805c44UL, 0x3c71acbcUL,
-  0x5751c4dbUL, 0x3ffca340UL, 0xd10d08f5UL, 0xbc87f2beUL, 0xdcef9069UL,
-  0x3ffcb720UL, 0xd1e949dbUL, 0x3c7503cbUL, 0x2e6d1675UL, 0x3ffccb0fUL,
-  0x86009092UL, 0xbc7d220fUL, 0x555dc3faUL, 0x3ffcdf0bUL, 0x53829d72UL,
-  0xbc8dd83bUL, 0x5b5bab74UL, 0x3ffcf315UL, 0xb86dff57UL, 0xbc9a08e9UL,
-  0x4a07897cUL, 0x3ffd072dUL, 0x43797a9cUL, 0xbc9cbc37UL, 0x2b08c968UL,
-  0x3ffd1b53UL, 0x219a36eeUL, 0x3c955636UL, 0x080d89f2UL, 0x3ffd2f87UL,
-  0x719d8578UL, 0xbc9d487bUL, 0xeacaa1d6UL, 0x3ffd43c8UL, 0xbf5a1614UL,
-  0x3c93db53UL, 0xdcfba487UL, 0x3ffd5818UL, 0xd75b3707UL, 0x3c82ed02UL,
-  0xe862e6d3UL, 0x3ffd6c76UL, 0x4a8165a0UL, 0x3c5fe87aUL, 0x16c98398UL,
-  0x3ffd80e3UL, 0x8beddfe8UL, 0xbc911ec1UL, 0x71ff6075UL, 0x3ffd955dUL,
-  0xbb9af6beUL, 0x3c9a052dUL, 0x03db3285UL, 0x3ffda9e6UL, 0x696db532UL,
-  0x3c9c2300UL, 0xd63a8315UL, 0x3ffdbe7cUL, 0x926b8be4UL, 0xbc9b76f1UL,
-  0xf301b460UL, 0x3ffdd321UL, 0x78f018c3UL, 0x3c92da57UL, 0x641c0658UL,
-  0x3ffde7d5UL, 0x8e79ba8fUL, 0xbc9ca552UL, 0x337b9b5fUL, 0x3ffdfc97UL,
-  0x4f184b5cUL, 0xbc91a5cdUL, 0x6b197d17UL, 0x3ffe1167UL, 0xbd5c7f44UL,
-  0xbc72b529UL, 0x14f5a129UL, 0x3ffe2646UL, 0x817a1496UL, 0xbc97b627UL,
-  0x3b16ee12UL, 0x3ffe3b33UL, 0x31fdc68bUL, 0xbc99f4a4UL, 0xe78b3ff6UL,
-  0x3ffe502eUL, 0x80a9cc8fUL, 0x3c839e89UL, 0x24676d76UL, 0x3ffe6539UL,
-  0x7522b735UL, 0xbc863ff8UL, 0xfbc74c83UL, 0x3ffe7a51UL, 0xca0c8de2UL,
-  0x3c92d522UL, 0x77cdb740UL, 0x3ffe8f79UL, 0x80b054b1UL, 0xbc910894UL,
-  0xa2a490daUL, 0x3ffea4afUL, 0x179c2893UL, 0xbc9e9c23UL, 0x867cca6eUL,
-  0x3ffeb9f4UL, 0x2293e4f2UL, 0x3c94832fUL, 0x2d8e67f1UL, 0x3ffecf48UL,
-  0xb411ad8cUL, 0xbc9c93f3UL, 0xa2188510UL, 0x3ffee4aaUL, 0xa487568dUL,
-  0x3c91c68dUL, 0xee615a27UL, 0x3ffefa1bUL, 0x86a4b6b0UL, 0x3c9dc7f4UL,
-  0x1cb6412aUL, 0x3fff0f9cUL, 0x65181d45UL, 0xbc932200UL, 0x376bba97UL,
-  0x3fff252bUL, 0xbf0d8e43UL, 0x3c93a1a5UL, 0x48dd7274UL, 0x3fff3ac9UL,
-  0x3ed837deUL, 0xbc795a5aUL, 0x5b6e4540UL, 0x3fff5076UL, 0x2dd8a18bUL,
-  0x3c99d3e1UL, 0x798844f8UL, 0x3fff6632UL, 0x3539343eUL, 0x3c9fa37bUL,
-  0xad9cbe14UL, 0x3fff7bfdUL, 0xd006350aUL, 0xbc9dbb12UL, 0x02243c89UL,
-  0x3fff91d8UL, 0xa779f689UL, 0xbc612ea8UL, 0x819e90d8UL, 0x3fffa7c1UL,
-  0xf3a5931eUL, 0x3c874853UL, 0x3692d514UL, 0x3fffbdbaUL, 0x15098eb6UL,
-  0xbc796773UL, 0x2b8f71f1UL, 0x3fffd3c2UL, 0x966579e7UL, 0x3c62eb74UL,
-  0x6b2a23d9UL, 0x3fffe9d9UL, 0x7442fde3UL, 0x3c74a603UL
-};
-
-ALIGNED_(16) juint _e_coeff[] =
-{
-  0xe78a6731UL, 0x3f55d87fUL, 0xd704a0c0UL, 0x3fac6b08UL, 0x6fba4e77UL,
-  0x3f83b2abUL, 0xff82c58fUL, 0x3fcebfbdUL, 0xfefa39efUL, 0x3fe62e42UL,
-  0x00000000UL, 0x00000000UL
-};
-
-ALIGNED_(16) juint _coeff_h[] =
-{
-  0x00000000UL, 0xbfd61a00UL, 0x00000000UL, 0xbf5dabe1UL
-};
-
-ALIGNED_(16) juint _HIGHMASK_LOG_X[] =
-{
-  0xf8000000UL, 0xffffffffUL, 0x00000000UL, 0xfffff800UL
-};
-
-ALIGNED_(8) juint _HALFMASK[] =
-{
-  0xf8000000UL, 0xffffffffUL, 0xf8000000UL, 0xffffffffUL
-};
-
-ALIGNED_(16) juint _coeff_pow[] =
-{
-  0x6dc96112UL, 0xbf836578UL, 0xee241472UL, 0xbf9b0301UL, 0x9f95985aUL,
-  0xbfb528dbUL, 0xb3841d2aUL, 0xbfd619b6UL, 0x518775e3UL, 0x3f9004f2UL,
-  0xac8349bbUL, 0x3fa76c9bUL, 0x486ececcUL, 0x3fc4635eUL, 0x161bb241UL,
-  0xbf5dabe1UL, 0x9f95985aUL, 0xbfb528dbUL, 0xf8b5787dUL, 0x3ef2531eUL,
-  0x486ececbUL, 0x3fc4635eUL, 0x412055ccUL, 0xbdd61bb2UL
-};
-
-ALIGNED_(16) juint _L_tbl_pow[] =
-{
-  0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x20000000UL,
-  0x3feff00aUL, 0x96621f95UL, 0x3e5b1856UL, 0xe0000000UL, 0x3fefe019UL,
-  0xe5916f9eUL, 0xbe325278UL, 0x00000000UL, 0x3fefd02fUL, 0x859a1062UL,
-  0x3e595fb7UL, 0xc0000000UL, 0x3fefc049UL, 0xb245f18fUL, 0xbe529c38UL,
-  0xe0000000UL, 0x3fefb069UL, 0xad2880a7UL, 0xbe501230UL, 0x60000000UL,
-  0x3fefa08fUL, 0xc8e72420UL, 0x3e597bd1UL, 0x80000000UL, 0x3fef90baUL,
-  0xc30c4500UL, 0xbe5d6c75UL, 0xe0000000UL, 0x3fef80eaUL, 0x02c63f43UL,
-  0x3e2e1318UL, 0xc0000000UL, 0x3fef7120UL, 0xb3d4ccccUL, 0xbe44c52aUL,
-  0x00000000UL, 0x3fef615cUL, 0xdbd91397UL, 0xbe4e7d6cUL, 0xa0000000UL,
-  0x3fef519cUL, 0x65c5cd68UL, 0xbe522dc8UL, 0xa0000000UL, 0x3fef41e2UL,
-  0x46d1306cUL, 0xbe5a840eUL, 0xe0000000UL, 0x3fef322dUL, 0xd2980e94UL,
-  0x3e5071afUL, 0xa0000000UL, 0x3fef227eUL, 0x773abadeUL, 0xbe5891e5UL,
-  0xa0000000UL, 0x3fef12d4UL, 0xdc6bf46bUL, 0xbe5cccbeUL, 0xe0000000UL,
-  0x3fef032fUL, 0xbc7247faUL, 0xbe2bab83UL, 0x80000000UL, 0x3feef390UL,
-  0xbcaa1e46UL, 0xbe53bb3bUL, 0x60000000UL, 0x3feee3f6UL, 0x5f6c682dUL,
-  0xbe54c619UL, 0x80000000UL, 0x3feed461UL, 0x5141e368UL, 0xbe4b6d86UL,
-  0xe0000000UL, 0x3feec4d1UL, 0xec678f76UL, 0xbe369af6UL, 0x80000000UL,
-  0x3feeb547UL, 0x41301f55UL, 0xbe2d4312UL, 0x60000000UL, 0x3feea5c2UL,
-  0x676da6bdUL, 0xbe4d8dd0UL, 0x60000000UL, 0x3fee9642UL, 0x57a891c4UL,
-  0x3e51f991UL, 0xa0000000UL, 0x3fee86c7UL, 0xe4eb491eUL, 0x3e579bf9UL,
-  0x20000000UL, 0x3fee7752UL, 0xfddc4a2cUL, 0xbe3356e6UL, 0xc0000000UL,
-  0x3fee67e1UL, 0xd75b5bf1UL, 0xbe449531UL, 0x80000000UL, 0x3fee5876UL,
-  0xbd423b8eUL, 0x3df54fe4UL, 0x60000000UL, 0x3fee4910UL, 0x330e51b9UL,
-  0x3e54289cUL, 0x80000000UL, 0x3fee39afUL, 0x8651a95fUL, 0xbe55aad6UL,
-  0xa0000000UL, 0x3fee2a53UL, 0x5e98c708UL, 0xbe2fc4a9UL, 0xe0000000UL,
-  0x3fee1afcUL, 0x0989328dUL, 0x3e23958cUL, 0x40000000UL, 0x3fee0babUL,
-  0xee642abdUL, 0xbe425dd8UL, 0xa0000000UL, 0x3fedfc5eUL, 0xc394d236UL,
-  0x3e526362UL, 0x20000000UL, 0x3feded17UL, 0xe104aa8eUL, 0x3e4ce247UL,
-  0xc0000000UL, 0x3fedddd4UL, 0x265a9be4UL, 0xbe5bb77aUL, 0x40000000UL,
-  0x3fedce97UL, 0x0ecac52fUL, 0x3e4a7cb1UL, 0xe0000000UL, 0x3fedbf5eUL,
-  0x124cb3b8UL, 0x3e257024UL, 0x80000000UL, 0x3fedb02bUL, 0xe6d4febeUL,
-  0xbe2033eeUL, 0x20000000UL, 0x3feda0fdUL, 0x39cca00eUL, 0xbe3ddabcUL,
-  0xc0000000UL, 0x3fed91d3UL, 0xef8a552aUL, 0xbe543390UL, 0x40000000UL,
-  0x3fed82afUL, 0xb8e85204UL, 0x3e513850UL, 0xe0000000UL, 0x3fed738fUL,
-  0x3d59fe08UL, 0xbe5db728UL, 0x40000000UL, 0x3fed6475UL, 0x3aa7ead1UL,
-  0x3e58804bUL, 0xc0000000UL, 0x3fed555fUL, 0xf8a35ba9UL, 0xbe5298b0UL,
-  0x00000000UL, 0x3fed464fUL, 0x9a88dd15UL, 0x3e5a8cdbUL, 0x40000000UL,
-  0x3fed3743UL, 0xb0b0a190UL, 0x3e598635UL, 0x80000000UL, 0x3fed283cUL,
-  0xe2113295UL, 0xbe5c1119UL, 0x80000000UL, 0x3fed193aUL, 0xafbf1728UL,
-  0xbe492e9cUL, 0x60000000UL, 0x3fed0a3dUL, 0xe4a4ccf3UL, 0x3e19b90eUL,
-  0x20000000UL, 0x3fecfb45UL, 0xba3cbeb8UL, 0x3e406b50UL, 0xc0000000UL,
-  0x3fecec51UL, 0x110f7dddUL, 0x3e0d6806UL, 0x40000000UL, 0x3fecdd63UL,
-  0x7dd7d508UL, 0xbe5a8943UL, 0x80000000UL, 0x3fecce79UL, 0x9b60f271UL,
-  0xbe50676aUL, 0x80000000UL, 0x3fecbf94UL, 0x0b9ad660UL, 0x3e59174fUL,
-  0x60000000UL, 0x3fecb0b4UL, 0x00823d9cUL, 0x3e5bbf72UL, 0x20000000UL,
-  0x3feca1d9UL, 0x38a6ec89UL, 0xbe4d38f9UL, 0x80000000UL, 0x3fec9302UL,
-  0x3a0b7d8eUL, 0x3e53dbfdUL, 0xc0000000UL, 0x3fec8430UL, 0xc6826b34UL,
-  0xbe27c5c9UL, 0xc0000000UL, 0x3fec7563UL, 0x0c706381UL, 0xbe593653UL,
-  0x60000000UL, 0x3fec669bUL, 0x7df34ec7UL, 0x3e461ab5UL, 0xe0000000UL,
-  0x3fec57d7UL, 0x40e5e7e8UL, 0xbe5c3daeUL, 0x00000000UL, 0x3fec4919UL,
-  0x5602770fUL, 0xbe55219dUL, 0xc0000000UL, 0x3fec3a5eUL, 0xec7911ebUL,
-  0x3e5a5d25UL, 0x60000000UL, 0x3fec2ba9UL, 0xb39ea225UL, 0xbe53c00bUL,
-  0x80000000UL, 0x3fec1cf8UL, 0x967a212eUL, 0x3e5a8ddfUL, 0x60000000UL,
-  0x3fec0e4cUL, 0x580798bdUL, 0x3e5f53abUL, 0x00000000UL, 0x3febffa5UL,
-  0xb8282df6UL, 0xbe46b874UL, 0x20000000UL, 0x3febf102UL, 0xe33a6729UL,
-  0x3e54963fUL, 0x00000000UL, 0x3febe264UL, 0x3b53e88aUL, 0xbe3adce1UL,
-  0x60000000UL, 0x3febd3caUL, 0xc2585084UL, 0x3e5cde9fUL, 0x80000000UL,
-  0x3febc535UL, 0xa335c5eeUL, 0xbe39fd9cUL, 0x20000000UL, 0x3febb6a5UL,
-  0x7325b04dUL, 0x3e42ba15UL, 0x60000000UL, 0x3feba819UL, 0x1564540fUL,
-  0x3e3a9f35UL, 0x40000000UL, 0x3feb9992UL, 0x83fff592UL, 0xbe5465ceUL,
-  0xa0000000UL, 0x3feb8b0fUL, 0xb9da63d3UL, 0xbe4b1a0aUL, 0x80000000UL,
-  0x3feb7c91UL, 0x6d6f1ea4UL, 0x3e557657UL, 0x00000000UL, 0x3feb6e18UL,
-  0x5e80a1bfUL, 0x3e4ddbb6UL, 0x00000000UL, 0x3feb5fa3UL, 0x1c9eacb5UL,
-  0x3e592877UL, 0xa0000000UL, 0x3feb5132UL, 0x6d40beb3UL, 0xbe51858cUL,
-  0xa0000000UL, 0x3feb42c6UL, 0xd740c67bUL, 0x3e427ad2UL, 0x40000000UL,
-  0x3feb345fUL, 0xa3e0cceeUL, 0xbe5c2fc4UL, 0x40000000UL, 0x3feb25fcUL,
-  0x8e752b50UL, 0xbe3da3c2UL, 0xc0000000UL, 0x3feb179dUL, 0xa892e7deUL,
-  0x3e1fb481UL, 0xc0000000UL, 0x3feb0943UL, 0x21ed71e9UL, 0xbe365206UL,
-  0x20000000UL, 0x3feafaeeUL, 0x0e1380a3UL, 0x3e5c5b7bUL, 0x20000000UL,
-  0x3feaec9dUL, 0x3c3d640eUL, 0xbe5dbbd0UL, 0x60000000UL, 0x3feade50UL,
-  0x8f97a715UL, 0x3e3a8ec5UL, 0x20000000UL, 0x3fead008UL, 0x23ab2839UL,
-  0x3e2fe98aUL, 0x40000000UL, 0x3feac1c4UL, 0xf4bbd50fUL, 0x3e54d8f6UL,
-  0xe0000000UL, 0x3feab384UL, 0x14757c4dUL, 0xbe48774cUL, 0xc0000000UL,
-  0x3feaa549UL, 0x7c7b0eeaUL, 0x3e5b51bbUL, 0x20000000UL, 0x3fea9713UL,
-  0xf56f7013UL, 0x3e386200UL, 0xe0000000UL, 0x3fea88e0UL, 0xbe428ebeUL,
-  0xbe514af5UL, 0xe0000000UL, 0x3fea7ab2UL, 0x8d0e4496UL, 0x3e4f9165UL,
-  0x60000000UL, 0x3fea6c89UL, 0xdbacc5d5UL, 0xbe5c063bUL, 0x20000000UL,
-  0x3fea5e64UL, 0x3f19d970UL, 0xbe5a0c8cUL, 0x20000000UL, 0x3fea5043UL,
-  0x09ea3e6bUL, 0x3e5065dcUL, 0x80000000UL, 0x3fea4226UL, 0x78df246cUL,
-  0x3e5e05f6UL, 0x40000000UL, 0x3fea340eUL, 0x4057d4a0UL, 0x3e431b2bUL,
-  0x40000000UL, 0x3fea25faUL, 0x82867bb5UL, 0x3e4b76beUL, 0xa0000000UL,
-  0x3fea17eaUL, 0x9436f40aUL, 0xbe5aad39UL, 0x20000000UL, 0x3fea09dfUL,
-  0x4b5253b3UL, 0x3e46380bUL, 0x00000000UL, 0x3fe9fbd8UL, 0x8fc52466UL,
-  0xbe386f9bUL, 0x20000000UL, 0x3fe9edd5UL, 0x22d3f344UL, 0xbe538347UL,
-  0x60000000UL, 0x3fe9dfd6UL, 0x1ac33522UL, 0x3e5dbc53UL, 0x00000000UL,
-  0x3fe9d1dcUL, 0xeabdff1dUL, 0x3e40fc0cUL, 0xe0000000UL, 0x3fe9c3e5UL,
-  0xafd30e73UL, 0xbe585e63UL, 0xe0000000UL, 0x3fe9b5f3UL, 0xa52f226aUL,
-  0xbe43e8f9UL, 0x20000000UL, 0x3fe9a806UL, 0xecb8698dUL, 0xbe515b36UL,
-  0x80000000UL, 0x3fe99a1cUL, 0xf2b4e89dUL, 0x3e48b62bUL, 0x20000000UL,
-  0x3fe98c37UL, 0x7c9a88fbUL, 0x3e44414cUL, 0x00000000UL, 0x3fe97e56UL,
-  0xda015741UL, 0xbe5d13baUL, 0xe0000000UL, 0x3fe97078UL, 0x5fdace06UL,
-  0x3e51b947UL, 0x00000000UL, 0x3fe962a0UL, 0x956ca094UL, 0x3e518785UL,
-  0x40000000UL, 0x3fe954cbUL, 0x01164c1dUL, 0x3e5d5b57UL, 0xc0000000UL,
-  0x3fe946faUL, 0xe63b3767UL, 0xbe4f84e7UL, 0x40000000UL, 0x3fe9392eUL,
-  0xe57cc2a9UL, 0x3e34eda3UL, 0xe0000000UL, 0x3fe92b65UL, 0x8c75b544UL,
-  0x3e5766a0UL, 0xc0000000UL, 0x3fe91da1UL, 0x37d1d087UL, 0xbe5e2ab1UL,
-  0x80000000UL, 0x3fe90fe1UL, 0xa953dc20UL, 0x3e5fa1f3UL, 0x80000000UL,
-  0x3fe90225UL, 0xdbd3f369UL, 0x3e47d6dbUL, 0xa0000000UL, 0x3fe8f46dUL,
-  0x1c9be989UL, 0xbe5e2b0aUL, 0xa0000000UL, 0x3fe8e6b9UL, 0x3c93d76aUL,
-  0x3e5c8618UL, 0xe0000000UL, 0x3fe8d909UL, 0x2182fc9aUL, 0xbe41aa9eUL,
-  0x20000000UL, 0x3fe8cb5eUL, 0xe6b3539dUL, 0xbe530d19UL, 0x60000000UL,
-  0x3fe8bdb6UL, 0x49e58cc3UL, 0xbe3bb374UL, 0xa0000000UL, 0x3fe8b012UL,
-  0xa7cfeb8fUL, 0x3e56c412UL, 0x00000000UL, 0x3fe8a273UL, 0x8d52bc19UL,
-  0x3e1429b8UL, 0x60000000UL, 0x3fe894d7UL, 0x4dc32c6cUL, 0xbe48604cUL,
-  0xc0000000UL, 0x3fe8873fUL, 0x0c868e56UL, 0xbe564ee5UL, 0x00000000UL,
-  0x3fe879acUL, 0x56aee828UL, 0x3e5e2fd8UL, 0x60000000UL, 0x3fe86c1cUL,
-  0x7ceab8ecUL, 0x3e493365UL, 0xc0000000UL, 0x3fe85e90UL, 0x78d4dadcUL,
-  0xbe4f7f25UL, 0x00000000UL, 0x3fe85109UL, 0x0ccd8280UL, 0x3e31e7a2UL,
-  0x40000000UL, 0x3fe84385UL, 0x34ba4e15UL, 0x3e328077UL, 0x80000000UL,
-  0x3fe83605UL, 0xa670975aUL, 0xbe53eee5UL, 0xa0000000UL, 0x3fe82889UL,
-  0xf61b77b2UL, 0xbe43a20aUL, 0xa0000000UL, 0x3fe81b11UL, 0x13e6643bUL,
-  0x3e5e5fe5UL, 0xc0000000UL, 0x3fe80d9dUL, 0x82cc94e8UL, 0xbe5ff1f9UL,
-  0xa0000000UL, 0x3fe8002dUL, 0x8a0c9c5dUL, 0xbe42b0e7UL, 0x60000000UL,
-  0x3fe7f2c1UL, 0x22a16f01UL, 0x3e5d9ea0UL, 0x20000000UL, 0x3fe7e559UL,
-  0xc38cd451UL, 0x3e506963UL, 0xc0000000UL, 0x3fe7d7f4UL, 0x9902bc71UL,
-  0x3e4503d7UL, 0x40000000UL, 0x3fe7ca94UL, 0xdef2a3c0UL, 0x3e3d98edUL,
-  0xa0000000UL, 0x3fe7bd37UL, 0xed49abb0UL, 0x3e24c1ffUL, 0xe0000000UL,
-  0x3fe7afdeUL, 0xe3b0be70UL, 0xbe40c467UL, 0x00000000UL, 0x3fe7a28aUL,
-  0xaf9f193cUL, 0xbe5dff6cUL, 0xe0000000UL, 0x3fe79538UL, 0xb74cf6b6UL,
-  0xbe258ed0UL, 0xa0000000UL, 0x3fe787ebUL, 0x1d9127c7UL, 0x3e345fb0UL,
-  0x40000000UL, 0x3fe77aa2UL, 0x1028c21dUL, 0xbe4619bdUL, 0xa0000000UL,
-  0x3fe76d5cUL, 0x7cb0b5e4UL, 0x3e40f1a2UL, 0xe0000000UL, 0x3fe7601aUL,
-  0x2b1bc4adUL, 0xbe32e8bbUL, 0xe0000000UL, 0x3fe752dcUL, 0x6839f64eUL,
-  0x3e41f57bUL, 0xc0000000UL, 0x3fe745a2UL, 0xc4121f7eUL, 0xbe52c40aUL,
-  0x60000000UL, 0x3fe7386cUL, 0xd6852d72UL, 0xbe5c4e6bUL, 0xc0000000UL,
-  0x3fe72b39UL, 0x91d690f7UL, 0xbe57f88fUL, 0xe0000000UL, 0x3fe71e0aUL,
-  0x627a2159UL, 0xbe4425d5UL, 0xc0000000UL, 0x3fe710dfUL, 0x50a54033UL,
-  0x3e422b7eUL, 0x60000000UL, 0x3fe703b8UL, 0x3b0b5f91UL, 0x3e5d3857UL,
-  0xe0000000UL, 0x3fe6f694UL, 0x84d628a2UL, 0xbe51f090UL, 0x00000000UL,
-  0x3fe6e975UL, 0x306d8894UL, 0xbe414d83UL, 0xe0000000UL, 0x3fe6dc58UL,
-  0x30bf24aaUL, 0xbe4650caUL, 0x80000000UL, 0x3fe6cf40UL, 0xd4628d69UL,
-  0xbe5db007UL, 0xc0000000UL, 0x3fe6c22bUL, 0xa2aae57bUL, 0xbe31d279UL,
-  0xc0000000UL, 0x3fe6b51aUL, 0x860edf7eUL, 0xbe2d4c4aUL, 0x80000000UL,
-  0x3fe6a80dUL, 0xf3559341UL, 0xbe5f7e98UL, 0xe0000000UL, 0x3fe69b03UL,
-  0xa885899eUL, 0xbe5c2011UL, 0xe0000000UL, 0x3fe68dfdUL, 0x2bdc6d37UL,
-  0x3e224a82UL, 0xa0000000UL, 0x3fe680fbUL, 0xc12ad1b9UL, 0xbe40cf56UL,
-  0x00000000UL, 0x3fe673fdUL, 0x1bcdf659UL, 0xbdf52f2dUL, 0x00000000UL,
-  0x3fe66702UL, 0x5df10408UL, 0x3e5663e0UL, 0xc0000000UL, 0x3fe65a0aUL,
-  0xa4070568UL, 0xbe40b12fUL, 0x00000000UL, 0x3fe64d17UL, 0x71c54c47UL,
-  0x3e5f5e8bUL, 0x00000000UL, 0x3fe64027UL, 0xbd4b7e83UL, 0x3e42ead6UL,
-  0xa0000000UL, 0x3fe6333aUL, 0x61598bd2UL, 0xbe4c48d4UL, 0xc0000000UL,
-  0x3fe62651UL, 0x6f538d61UL, 0x3e548401UL, 0xa0000000UL, 0x3fe6196cUL,
-  0x14344120UL, 0xbe529af6UL, 0x00000000UL, 0x3fe60c8bUL, 0x5982c587UL,
-  0xbe3e1e4fUL, 0x00000000UL, 0x3fe5ffadUL, 0xfe51d4eaUL, 0xbe4c897aUL,
-  0x80000000UL, 0x3fe5f2d2UL, 0xfd46ebe1UL, 0x3e552e00UL, 0xa0000000UL,
-  0x3fe5e5fbUL, 0xa4695699UL, 0x3e5ed471UL, 0x60000000UL, 0x3fe5d928UL,
-  0x80d118aeUL, 0x3e456b61UL, 0xa0000000UL, 0x3fe5cc58UL, 0x304c330bUL,
-  0x3e54dc29UL, 0x80000000UL, 0x3fe5bf8cUL, 0x0af2dedfUL, 0xbe3aa9bdUL,
-  0xe0000000UL, 0x3fe5b2c3UL, 0x15fc9258UL, 0xbe479a37UL, 0xc0000000UL,
-  0x3fe5a5feUL, 0x9292c7eaUL, 0x3e188650UL, 0x20000000UL, 0x3fe5993dUL,
-  0x33b4d380UL, 0x3e5d6d93UL, 0x20000000UL, 0x3fe58c7fUL, 0x02fd16c7UL,
-  0x3e2fe961UL, 0xa0000000UL, 0x3fe57fc4UL, 0x4a05edb6UL, 0xbe4d55b4UL,
-  0xa0000000UL, 0x3fe5730dUL, 0x3d443abbUL, 0xbe5e6954UL, 0x00000000UL,
-  0x3fe5665aUL, 0x024acfeaUL, 0x3e50e61bUL, 0x00000000UL, 0x3fe559aaUL,
-  0xcc9edd09UL, 0xbe325403UL, 0x60000000UL, 0x3fe54cfdUL, 0x1fe26950UL,
-  0x3e5d500eUL, 0x60000000UL, 0x3fe54054UL, 0x6c5ae164UL, 0xbe4a79b4UL,
-  0xc0000000UL, 0x3fe533aeUL, 0x154b0287UL, 0xbe401571UL, 0xa0000000UL,
-  0x3fe5270cUL, 0x0673f401UL, 0xbe56e56bUL, 0xe0000000UL, 0x3fe51a6dUL,
-  0x751b639cUL, 0x3e235269UL, 0xa0000000UL, 0x3fe50dd2UL, 0x7c7b2bedUL,
-  0x3ddec887UL, 0xc0000000UL, 0x3fe5013aUL, 0xafab4e17UL, 0x3e5e7575UL,
-  0x60000000UL, 0x3fe4f4a6UL, 0x2e308668UL, 0x3e59aed6UL, 0x80000000UL,
-  0x3fe4e815UL, 0xf33e2a76UL, 0xbe51f184UL, 0xe0000000UL, 0x3fe4db87UL,
-  0x839f3e3eUL, 0x3e57db01UL, 0xc0000000UL, 0x3fe4cefdUL, 0xa9eda7bbUL,
-  0x3e535e0fUL, 0x00000000UL, 0x3fe4c277UL, 0x2a8f66a5UL, 0x3e5ce451UL,
-  0xc0000000UL, 0x3fe4b5f3UL, 0x05192456UL, 0xbe4e8518UL, 0xc0000000UL,
-  0x3fe4a973UL, 0x4aa7cd1dUL, 0x3e46784aUL, 0x40000000UL, 0x3fe49cf7UL,
-  0x8e23025eUL, 0xbe5749f2UL, 0x00000000UL, 0x3fe4907eUL, 0x18d30215UL,
-  0x3e360f39UL, 0x20000000UL, 0x3fe48408UL, 0x63dcf2f3UL, 0x3e5e00feUL,
-  0xc0000000UL, 0x3fe47795UL, 0x46182d09UL, 0xbe5173d9UL, 0xa0000000UL,
-  0x3fe46b26UL, 0x8f0e62aaUL, 0xbe48f281UL, 0xe0000000UL, 0x3fe45ebaUL,
-  0x5775c40cUL, 0xbe56aad4UL, 0x60000000UL, 0x3fe45252UL, 0x0fe25f69UL,
-  0x3e48bd71UL, 0x40000000UL, 0x3fe445edUL, 0xe9989ec5UL, 0x3e590d97UL,
-  0x80000000UL, 0x3fe4398bUL, 0xb3d9ffe3UL, 0x3e479dbcUL, 0x20000000UL,
-  0x3fe42d2dUL, 0x388e4d2eUL, 0xbe5eed80UL, 0xe0000000UL, 0x3fe420d1UL,
-  0x6f797c18UL, 0x3e554b4cUL, 0x20000000UL, 0x3fe4147aUL, 0x31048bb4UL,
-  0xbe5b1112UL, 0x80000000UL, 0x3fe40825UL, 0x2efba4f9UL, 0x3e48ebc7UL,
-  0x40000000UL, 0x3fe3fbd4UL, 0x50201119UL, 0x3e40b701UL, 0x40000000UL,
-  0x3fe3ef86UL, 0x0a4db32cUL, 0x3e551de8UL, 0xa0000000UL, 0x3fe3e33bUL,
-  0x0c9c148bUL, 0xbe50c1f6UL, 0x20000000UL, 0x3fe3d6f4UL, 0xc9129447UL,
-  0x3e533fa0UL, 0x00000000UL, 0x3fe3cab0UL, 0xaae5b5a0UL, 0xbe22b68eUL,
-  0x20000000UL, 0x3fe3be6fUL, 0x02305e8aUL, 0xbe54fc08UL, 0x60000000UL,
-  0x3fe3b231UL, 0x7f908258UL, 0x3e57dc05UL, 0x00000000UL, 0x3fe3a5f7UL,
-  0x1a09af78UL, 0x3e08038bUL, 0xe0000000UL, 0x3fe399bfUL, 0x490643c1UL,
-  0xbe5dbe42UL, 0xe0000000UL, 0x3fe38d8bUL, 0x5e8ad724UL, 0xbe3c2b72UL,
-  0x20000000UL, 0x3fe3815bUL, 0xc67196b6UL, 0x3e1713cfUL, 0xa0000000UL,
-  0x3fe3752dUL, 0x6182e429UL, 0xbe3ec14cUL, 0x40000000UL, 0x3fe36903UL,
-  0xab6eb1aeUL, 0x3e5a2cc5UL, 0x40000000UL, 0x3fe35cdcUL, 0xfe5dc064UL,
-  0xbe5c5878UL, 0x40000000UL, 0x3fe350b8UL, 0x0ba6b9e4UL, 0x3e51619bUL,
-  0x80000000UL, 0x3fe34497UL, 0x857761aaUL, 0x3e5fff53UL, 0x00000000UL,
-  0x3fe3387aUL, 0xf872d68cUL, 0x3e484f4dUL, 0xa0000000UL, 0x3fe32c5fUL,
-  0x087e97c2UL, 0x3e52842eUL, 0x80000000UL, 0x3fe32048UL, 0x73d6d0c0UL,
-  0xbe503edfUL, 0x80000000UL, 0x3fe31434UL, 0x0c1456a1UL, 0xbe5f72adUL,
-  0xa0000000UL, 0x3fe30823UL, 0x83a1a4d5UL, 0xbe5e65ccUL, 0xe0000000UL,
-  0x3fe2fc15UL, 0x855a7390UL, 0xbe506438UL, 0x40000000UL, 0x3fe2f00bUL,
-  0xa2898287UL, 0x3e3d22a2UL, 0xe0000000UL, 0x3fe2e403UL, 0x8b56f66fUL,
-  0xbe5aa5fdUL, 0x80000000UL, 0x3fe2d7ffUL, 0x52db119aUL, 0x3e3a2e3dUL,
-  0x60000000UL, 0x3fe2cbfeUL, 0xe2ddd4c0UL, 0xbe586469UL, 0x40000000UL,
-  0x3fe2c000UL, 0x6b01bf10UL, 0x3e352b9dUL, 0x40000000UL, 0x3fe2b405UL,
-  0xb07a1cdfUL, 0x3e5c5cdaUL, 0x80000000UL, 0x3fe2a80dUL, 0xc7b5f868UL,
-  0xbe5668b3UL, 0xc0000000UL, 0x3fe29c18UL, 0x185edf62UL, 0xbe563d66UL,
-  0x00000000UL, 0x3fe29027UL, 0xf729e1ccUL, 0x3e59a9a0UL, 0x80000000UL,
-  0x3fe28438UL, 0x6433c727UL, 0xbe43cc89UL, 0x00000000UL, 0x3fe2784dUL,
-  0x41782631UL, 0xbe30750cUL, 0xa0000000UL, 0x3fe26c64UL, 0x914911b7UL,
-  0xbe58290eUL, 0x40000000UL, 0x3fe2607fUL, 0x3dcc73e1UL, 0xbe4269cdUL,
-  0x00000000UL, 0x3fe2549dUL, 0x2751bf70UL, 0xbe5a6998UL, 0xc0000000UL,
-  0x3fe248bdUL, 0x4248b9fbUL, 0xbe4ddb00UL, 0x80000000UL, 0x3fe23ce1UL,
-  0xf35cf82fUL, 0x3e561b71UL, 0x60000000UL, 0x3fe23108UL, 0x8e481a2dUL,
-  0x3e518fb9UL, 0x60000000UL, 0x3fe22532UL, 0x5ab96edcUL, 0xbe5fafc5UL,
-  0x40000000UL, 0x3fe2195fUL, 0x80943911UL, 0xbe07f819UL, 0x40000000UL,
-  0x3fe20d8fUL, 0x386f2d6cUL, 0xbe54ba8bUL, 0x40000000UL, 0x3fe201c2UL,
-  0xf29664acUL, 0xbe5eb815UL, 0x20000000UL, 0x3fe1f5f8UL, 0x64f03390UL,
-  0x3e5e320cUL, 0x20000000UL, 0x3fe1ea31UL, 0x747ff696UL, 0x3e5ef0a5UL,
-  0x40000000UL, 0x3fe1de6dUL, 0x3e9ceb51UL, 0xbe5f8d27UL, 0x20000000UL,
-  0x3fe1d2acUL, 0x4ae0b55eUL, 0x3e5faa21UL, 0x20000000UL, 0x3fe1c6eeUL,
-  0x28569a5eUL, 0x3e598a4fUL, 0x20000000UL, 0x3fe1bb33UL, 0x54b33e07UL,
-  0x3e46130aUL, 0x20000000UL, 0x3fe1af7bUL, 0x024f1078UL, 0xbe4dbf93UL,
-  0x00000000UL, 0x3fe1a3c6UL, 0xb0783bfaUL, 0x3e419248UL, 0xe0000000UL,
-  0x3fe19813UL, 0x2f02b836UL, 0x3e4e02b7UL, 0xc0000000UL, 0x3fe18c64UL,
-  0x28dec9d4UL, 0x3e09064fUL, 0x80000000UL, 0x3fe180b8UL, 0x45cbf406UL,
-  0x3e5b1f46UL, 0x40000000UL, 0x3fe1750fUL, 0x03d9964cUL, 0x3e5b0a79UL,
-  0x00000000UL, 0x3fe16969UL, 0x8b5b882bUL, 0xbe238086UL, 0xa0000000UL,
-  0x3fe15dc5UL, 0x73bad6f8UL, 0xbdf1fca4UL, 0x20000000UL, 0x3fe15225UL,
-  0x5385769cUL, 0x3e5e8d76UL, 0xa0000000UL, 0x3fe14687UL, 0x1676dc6bUL,
-  0x3e571d08UL, 0x20000000UL, 0x3fe13aedUL, 0xa8c41c7fUL, 0xbe598a25UL,
-  0x60000000UL, 0x3fe12f55UL, 0xc4e1aaf0UL, 0x3e435277UL, 0xa0000000UL,
-  0x3fe123c0UL, 0x403638e1UL, 0xbe21aa7cUL, 0xc0000000UL, 0x3fe1182eUL,
-  0x557a092bUL, 0xbdd0116bUL, 0xc0000000UL, 0x3fe10c9fUL, 0x7d779f66UL,
-  0x3e4a61baUL, 0xc0000000UL, 0x3fe10113UL, 0x2b09c645UL, 0xbe5d586eUL,
-  0x20000000UL, 0x3fe0ea04UL, 0xea2cad46UL, 0x3e5aa97cUL, 0x20000000UL,
-  0x3fe0d300UL, 0x23190e54UL, 0x3e50f1a7UL, 0xa0000000UL, 0x3fe0bc07UL,
-  0x1379a5a6UL, 0xbe51619dUL, 0x60000000UL, 0x3fe0a51aUL, 0x926a3d4aUL,
-  0x3e5cf019UL, 0xa0000000UL, 0x3fe08e38UL, 0xa8c24358UL, 0x3e35241eUL,
-  0x20000000UL, 0x3fe07762UL, 0x24317e7aUL, 0x3e512cfaUL, 0x00000000UL,
-  0x3fe06097UL, 0xfd9cf274UL, 0xbe55bef3UL, 0x00000000UL, 0x3fe049d7UL,
-  0x3689b49dUL, 0xbe36d26dUL, 0x40000000UL, 0x3fe03322UL, 0xf72ef6c4UL,
-  0xbe54cd08UL, 0xa0000000UL, 0x3fe01c78UL, 0x23702d2dUL, 0xbe5900bfUL,
-  0x00000000UL, 0x3fe005daUL, 0x3f59c14cUL, 0x3e57d80bUL, 0x40000000UL,
-  0x3fdfde8dUL, 0xad67766dUL, 0xbe57fad4UL, 0x40000000UL, 0x3fdfb17cUL,
-  0x644f4ae7UL, 0x3e1ee43bUL, 0x40000000UL, 0x3fdf8481UL, 0x903234d2UL,
-  0x3e501a86UL, 0x40000000UL, 0x3fdf579cUL, 0xafe9e509UL, 0xbe267c3eUL,
-  0x00000000UL, 0x3fdf2acdUL, 0xb7dfda0bUL, 0xbe48149bUL, 0x40000000UL,
-  0x3fdefe13UL, 0x3b94305eUL, 0x3e5f4ea7UL, 0x80000000UL, 0x3fded16fUL,
-  0x5d95da61UL, 0xbe55c198UL, 0x00000000UL, 0x3fdea4e1UL, 0x406960c9UL,
-  0xbdd99a19UL, 0x00000000UL, 0x3fde7868UL, 0xd22f3539UL, 0x3e470c78UL,
-  0x80000000UL, 0x3fde4c04UL, 0x83eec535UL, 0xbe3e1232UL, 0x40000000UL,
-  0x3fde1fb6UL, 0x3dfbffcbUL, 0xbe4b7d71UL, 0x40000000UL, 0x3fddf37dUL,
-  0x7e1be4e0UL, 0xbe5b8f8fUL, 0x40000000UL, 0x3fddc759UL, 0x46dae887UL,
-  0xbe350458UL, 0x80000000UL, 0x3fdd9b4aUL, 0xed6ecc49UL, 0xbe5f0045UL,
-  0x80000000UL, 0x3fdd6f50UL, 0x2e9e883cUL, 0x3e2915daUL, 0x80000000UL,
-  0x3fdd436bUL, 0xf0bccb32UL, 0x3e4a68c9UL, 0x80000000UL, 0x3fdd179bUL,
-  0x9bbfc779UL, 0xbe54a26aUL, 0x00000000UL, 0x3fdcebe0UL, 0x7cea33abUL,
-  0x3e43c6b7UL, 0x40000000UL, 0x3fdcc039UL, 0xe740fd06UL, 0x3e5526c2UL,
-  0x40000000UL, 0x3fdc94a7UL, 0x9eadeb1aUL, 0xbe396d8dUL, 0xc0000000UL,
-  0x3fdc6929UL, 0xf0a8f95aUL, 0xbe5c0ab2UL, 0x80000000UL, 0x3fdc3dc0UL,
-  0x6ee2693bUL, 0x3e0992e6UL, 0xc0000000UL, 0x3fdc126bUL, 0x5ac6b581UL,
-  0xbe2834b6UL, 0x40000000UL, 0x3fdbe72bUL, 0x8cc226ffUL, 0x3e3596a6UL,
-  0x00000000UL, 0x3fdbbbffUL, 0xf92a74bbUL, 0x3e3c5813UL, 0x00000000UL,
-  0x3fdb90e7UL, 0x479664c0UL, 0xbe50d644UL, 0x00000000UL, 0x3fdb65e3UL,
-  0x5004975bUL, 0xbe55258fUL, 0x00000000UL, 0x3fdb3af3UL, 0xe4b23194UL,
-  0xbe588407UL, 0xc0000000UL, 0x3fdb1016UL, 0xe65d4d0aUL, 0x3e527c26UL,
-  0x80000000UL, 0x3fdae54eUL, 0x814fddd6UL, 0x3e5962a2UL, 0x40000000UL,
-  0x3fdaba9aUL, 0xe19d0913UL, 0xbe562f4eUL, 0x80000000UL, 0x3fda8ff9UL,
-  0x43cfd006UL, 0xbe4cfdebUL, 0x40000000UL, 0x3fda656cUL, 0x686f0a4eUL,
-  0x3e5e47a8UL, 0xc0000000UL, 0x3fda3af2UL, 0x7200d410UL, 0x3e5e1199UL,
-  0xc0000000UL, 0x3fda108cUL, 0xabd2266eUL, 0x3e5ee4d1UL, 0x40000000UL,
-  0x3fd9e63aUL, 0x396f8f2cUL, 0x3e4dbffbUL, 0x00000000UL, 0x3fd9bbfbUL,
-  0xe32b25ddUL, 0x3e5c3a54UL, 0x40000000UL, 0x3fd991cfUL, 0x431e4035UL,
-  0xbe457925UL, 0x80000000UL, 0x3fd967b6UL, 0x7bed3dd3UL, 0x3e40c61dUL,
-  0x00000000UL, 0x3fd93db1UL, 0xd7449365UL, 0x3e306419UL, 0x80000000UL,
-  0x3fd913beUL, 0x1746e791UL, 0x3e56fcfcUL, 0x40000000UL, 0x3fd8e9dfUL,
-  0xf3a9028bUL, 0xbe5041b9UL, 0xc0000000UL, 0x3fd8c012UL, 0x56840c50UL,
-  0xbe26e20aUL, 0x40000000UL, 0x3fd89659UL, 0x19763102UL, 0xbe51f466UL,
-  0x80000000UL, 0x3fd86cb2UL, 0x7032de7cUL, 0xbe4d298aUL, 0x80000000UL,
-  0x3fd8431eUL, 0xdeb39fabUL, 0xbe4361ebUL, 0x40000000UL, 0x3fd8199dUL,
-  0x5d01cbe0UL, 0xbe5425b3UL, 0x80000000UL, 0x3fd7f02eUL, 0x3ce99aa9UL,
-  0x3e146fa8UL, 0x80000000UL, 0x3fd7c6d2UL, 0xd1a262b9UL, 0xbe5a1a69UL,
-  0xc0000000UL, 0x3fd79d88UL, 0x8606c236UL, 0x3e423a08UL, 0x80000000UL,
-  0x3fd77451UL, 0x8fd1e1b7UL, 0x3e5a6a63UL, 0xc0000000UL, 0x3fd74b2cUL,
-  0xe491456aUL, 0x3e42c1caUL, 0x40000000UL, 0x3fd7221aUL, 0x4499a6d7UL,
-  0x3e36a69aUL, 0x00000000UL, 0x3fd6f91aUL, 0x5237df94UL, 0xbe0f8f02UL,
-  0x00000000UL, 0x3fd6d02cUL, 0xb6482c6eUL, 0xbe5abcf7UL, 0x00000000UL,
-  0x3fd6a750UL, 0x1919fd61UL, 0xbe57ade2UL, 0x00000000UL, 0x3fd67e86UL,
-  0xaa7a994dUL, 0xbe3f3fbdUL, 0x00000000UL, 0x3fd655ceUL, 0x67db014cUL,
-  0x3e33c550UL, 0x00000000UL, 0x3fd62d28UL, 0xa82856b7UL, 0xbe1409d1UL,
-  0xc0000000UL, 0x3fd60493UL, 0x1e6a300dUL, 0x3e55d899UL, 0x80000000UL,
-  0x3fd5dc11UL, 0x1222bd5cUL, 0xbe35bfc0UL, 0xc0000000UL, 0x3fd5b3a0UL,
-  0x6e8dc2d3UL, 0x3e5d4d79UL, 0x00000000UL, 0x3fd58b42UL, 0xe0e4ace6UL,
-  0xbe517303UL, 0x80000000UL, 0x3fd562f4UL, 0xb306e0a8UL, 0x3e5edf0fUL,
-  0xc0000000UL, 0x3fd53ab8UL, 0x6574bc54UL, 0x3e5ee859UL, 0x80000000UL,
-  0x3fd5128eUL, 0xea902207UL, 0x3e5f6188UL, 0xc0000000UL, 0x3fd4ea75UL,
-  0x9f911d79UL, 0x3e511735UL, 0x80000000UL, 0x3fd4c26eUL, 0xf9c77397UL,
-  0xbe5b1643UL, 0x40000000UL, 0x3fd49a78UL, 0x15fc9258UL, 0x3e479a37UL,
-  0x80000000UL, 0x3fd47293UL, 0xd5a04dd9UL, 0xbe426e56UL, 0xc0000000UL,
-  0x3fd44abfUL, 0xe04042f5UL, 0x3e56f7c6UL, 0x40000000UL, 0x3fd422fdUL,
-  0x1d8bf2c8UL, 0x3e5d8810UL, 0x00000000UL, 0x3fd3fb4cUL, 0x88a8ddeeUL,
-  0xbe311454UL, 0xc0000000UL, 0x3fd3d3abUL, 0x3e3b5e47UL, 0xbe5d1b72UL,
-  0x40000000UL, 0x3fd3ac1cUL, 0xc2ab5d59UL, 0x3e31b02bUL, 0xc0000000UL,
-  0x3fd3849dUL, 0xd4e34b9eUL, 0x3e51cb2fUL, 0x40000000UL, 0x3fd35d30UL,
-  0x177204fbUL, 0xbe2b8cd7UL, 0x80000000UL, 0x3fd335d3UL, 0xfcd38c82UL,
-  0xbe4356e1UL, 0x80000000UL, 0x3fd30e87UL, 0x64f54accUL, 0xbe4e6224UL,
-  0x00000000UL, 0x3fd2e74cUL, 0xaa7975d9UL, 0x3e5dc0feUL, 0x80000000UL,
-  0x3fd2c021UL, 0x516dab3fUL, 0xbe50ffa3UL, 0x40000000UL, 0x3fd29907UL,
-  0x2bfb7313UL, 0x3e5674a2UL, 0xc0000000UL, 0x3fd271fdUL, 0x0549fc99UL,
-  0x3e385d29UL, 0xc0000000UL, 0x3fd24b04UL, 0x55b63073UL, 0xbe500c6dUL,
-  0x00000000UL, 0x3fd2241cUL, 0x3f91953aUL, 0x3e389977UL, 0xc0000000UL,
-  0x3fd1fd43UL, 0xa1543f71UL, 0xbe3487abUL, 0xc0000000UL, 0x3fd1d67bUL,
-  0x4ec8867cUL, 0x3df6a2dcUL, 0x00000000UL, 0x3fd1afc4UL, 0x4328e3bbUL,
-  0x3e41d9c0UL, 0x80000000UL, 0x3fd1891cUL, 0x2e1cda84UL, 0x3e3bdd87UL,
-  0x40000000UL, 0x3fd16285UL, 0x4b5331aeUL, 0xbe53128eUL, 0x00000000UL,
-  0x3fd13bfeUL, 0xb9aec164UL, 0xbe52ac98UL, 0xc0000000UL, 0x3fd11586UL,
-  0xd91e1316UL, 0xbe350630UL, 0x80000000UL, 0x3fd0ef1fUL, 0x7cacc12cUL,
-  0x3e3f5219UL, 0x40000000UL, 0x3fd0c8c8UL, 0xbce277b7UL, 0x3e3d30c0UL,
-  0x00000000UL, 0x3fd0a281UL, 0x2a63447dUL, 0xbe541377UL, 0x80000000UL,
-  0x3fd07c49UL, 0xfac483b5UL, 0xbe5772ecUL, 0xc0000000UL, 0x3fd05621UL,
-  0x36b8a570UL, 0xbe4fd4bdUL, 0xc0000000UL, 0x3fd03009UL, 0xbae505f7UL,
-  0xbe450388UL, 0x80000000UL, 0x3fd00a01UL, 0x3e35aeadUL, 0xbe5430fcUL,
-  0x80000000UL, 0x3fcfc811UL, 0x707475acUL, 0x3e38806eUL, 0x80000000UL,
-  0x3fcf7c3fUL, 0xc91817fcUL, 0xbe40cceaUL, 0x80000000UL, 0x3fcf308cUL,
-  0xae05d5e9UL, 0xbe4919b8UL, 0x80000000UL, 0x3fcee4f8UL, 0xae6cc9e6UL,
-  0xbe530b94UL, 0x00000000UL, 0x3fce9983UL, 0x1efe3e8eUL, 0x3e57747eUL,
-  0x00000000UL, 0x3fce4e2dUL, 0xda78d9bfUL, 0xbe59a608UL, 0x00000000UL,
-  0x3fce02f5UL, 0x8abe2c2eUL, 0x3e4a35adUL, 0x00000000UL, 0x3fcdb7dcUL,
-  0x1495450dUL, 0xbe0872ccUL, 0x80000000UL, 0x3fcd6ce1UL, 0x86ee0ba0UL,
-  0xbe4f59a0UL, 0x00000000UL, 0x3fcd2205UL, 0xe81ca888UL, 0x3e5402c3UL,
-  0x00000000UL, 0x3fccd747UL, 0x3b4424b9UL, 0x3e5dfdc3UL, 0x80000000UL,
-  0x3fcc8ca7UL, 0xd305b56cUL, 0x3e202da6UL, 0x00000000UL, 0x3fcc4226UL,
-  0x399a6910UL, 0xbe482a1cUL, 0x80000000UL, 0x3fcbf7c2UL, 0x747f7938UL,
-  0xbe587372UL, 0x80000000UL, 0x3fcbad7cUL, 0x6fc246a0UL, 0x3e50d83dUL,
-  0x00000000UL, 0x3fcb6355UL, 0xee9e9be5UL, 0xbe5c35bdUL, 0x80000000UL,
-  0x3fcb194aUL, 0x8416c0bcUL, 0x3e546d4fUL, 0x00000000UL, 0x3fcacf5eUL,
-  0x49f7f08fUL, 0x3e56da76UL, 0x00000000UL, 0x3fca858fUL, 0x5dc30de2UL,
-  0x3e5f390cUL, 0x00000000UL, 0x3fca3bdeUL, 0x950583b6UL, 0xbe5e4169UL,
-  0x80000000UL, 0x3fc9f249UL, 0x33631553UL, 0x3e52aeb1UL, 0x00000000UL,
-  0x3fc9a8d3UL, 0xde8795a6UL, 0xbe59a504UL, 0x00000000UL, 0x3fc95f79UL,
-  0x076bf41eUL, 0x3e5122feUL, 0x80000000UL, 0x3fc9163cUL, 0x2914c8e7UL,
-  0x3e3dd064UL, 0x00000000UL, 0x3fc8cd1dUL, 0x3a30eca3UL, 0xbe21b4aaUL,
-  0x80000000UL, 0x3fc8841aUL, 0xb2a96650UL, 0xbe575444UL, 0x80000000UL,
-  0x3fc83b34UL, 0x2376c0cbUL, 0xbe2a74c7UL, 0x80000000UL, 0x3fc7f26bUL,
-  0xd8a0b653UL, 0xbe5181b6UL, 0x00000000UL, 0x3fc7a9bfUL, 0x32257882UL,
-  0xbe4a78b4UL, 0x00000000UL, 0x3fc7612fUL, 0x1eee8bd9UL, 0xbe1bfe9dUL,
-  0x80000000UL, 0x3fc718bbUL, 0x0c603cc4UL, 0x3e36fdc9UL, 0x80000000UL,
-  0x3fc6d064UL, 0x3728b8cfUL, 0xbe1e542eUL, 0x80000000UL, 0x3fc68829UL,
-  0xc79a4067UL, 0x3e5c380fUL, 0x00000000UL, 0x3fc6400bUL, 0xf69eac69UL,
-  0x3e550a84UL, 0x80000000UL, 0x3fc5f808UL, 0xb7a780a4UL, 0x3e5d9224UL,
-  0x80000000UL, 0x3fc5b022UL, 0xad9dfb1eUL, 0xbe55242fUL, 0x00000000UL,
-  0x3fc56858UL, 0x659b18beUL, 0xbe4bfda3UL, 0x80000000UL, 0x3fc520a9UL,
-  0x66ee3631UL, 0xbe57d769UL, 0x80000000UL, 0x3fc4d916UL, 0x1ec62819UL,
-  0x3e2427f7UL, 0x80000000UL, 0x3fc4919fUL, 0xdec25369UL, 0xbe435431UL,
-  0x00000000UL, 0x3fc44a44UL, 0xa8acfc4bUL, 0xbe3c62e8UL, 0x00000000UL,
-  0x3fc40304UL, 0xcf1d3eabUL, 0xbdfba29fUL, 0x80000000UL, 0x3fc3bbdfUL,
-  0x79aba3eaUL, 0xbdf1b7c8UL, 0x80000000UL, 0x3fc374d6UL, 0xb8d186daUL,
-  0xbe5130cfUL, 0x80000000UL, 0x3fc32de8UL, 0x9d74f152UL, 0x3e2285b6UL,
-  0x00000000UL, 0x3fc2e716UL, 0x50ae7ca9UL, 0xbe503920UL, 0x80000000UL,
-  0x3fc2a05eUL, 0x6caed92eUL, 0xbe533924UL, 0x00000000UL, 0x3fc259c2UL,
-  0x9cb5034eUL, 0xbe510e31UL, 0x80000000UL, 0x3fc21340UL, 0x12c4d378UL,
-  0xbe540b43UL, 0x80000000UL, 0x3fc1ccd9UL, 0xcc418706UL, 0x3e59887aUL,
-  0x00000000UL, 0x3fc1868eUL, 0x921f4106UL, 0xbe528e67UL, 0x80000000UL,
-  0x3fc1405cUL, 0x3969441eUL, 0x3e5d8051UL, 0x00000000UL, 0x3fc0fa46UL,
-  0xd941ef5bUL, 0x3e5f9079UL, 0x80000000UL, 0x3fc0b44aUL, 0x5a3e81b2UL,
-  0xbe567691UL, 0x00000000UL, 0x3fc06e69UL, 0x9d66afe7UL, 0xbe4d43fbUL,
-  0x00000000UL, 0x3fc028a2UL, 0x0a92a162UL, 0xbe52f394UL, 0x00000000UL,
-  0x3fbfc5eaUL, 0x209897e5UL, 0x3e529e37UL, 0x00000000UL, 0x3fbf3ac5UL,
-  0x8458bd7bUL, 0x3e582831UL, 0x00000000UL, 0x3fbeafd5UL, 0xb8d8b4b8UL,
-  0xbe486b4aUL, 0x00000000UL, 0x3fbe2518UL, 0xe0a3b7b6UL, 0x3e5bafd2UL,
-  0x00000000UL, 0x3fbd9a90UL, 0x2bf2710eUL, 0x3e383b2bUL, 0x00000000UL,
-  0x3fbd103cUL, 0x73eb6ab7UL, 0xbe56d78dUL, 0x00000000UL, 0x3fbc861bUL,
-  0x32ceaff5UL, 0xbe32dc5aUL, 0x00000000UL, 0x3fbbfc2eUL, 0xbee04cb7UL,
-  0xbe4a71a4UL, 0x00000000UL, 0x3fbb7274UL, 0x35ae9577UL, 0x3e38142fUL,
-  0x00000000UL, 0x3fbae8eeUL, 0xcbaddab4UL, 0xbe5490f0UL, 0x00000000UL,
-  0x3fba5f9aUL, 0x95ce1114UL, 0x3e597c71UL, 0x00000000UL, 0x3fb9d67aUL,
-  0x6d7c0f78UL, 0x3e3abc2dUL, 0x00000000UL, 0x3fb94d8dUL, 0x2841a782UL,
-  0xbe566cbcUL, 0x00000000UL, 0x3fb8c4d2UL, 0x6ed429c6UL, 0xbe3cfff9UL,
-  0x00000000UL, 0x3fb83c4aUL, 0xe4a49fbbUL, 0xbe552964UL, 0x00000000UL,
-  0x3fb7b3f4UL, 0x2193d81eUL, 0xbe42fa72UL, 0x00000000UL, 0x3fb72bd0UL,
-  0xdd70c122UL, 0x3e527a8cUL, 0x00000000UL, 0x3fb6a3dfUL, 0x03108a54UL,
-  0xbe450393UL, 0x00000000UL, 0x3fb61c1fUL, 0x30ff7954UL, 0x3e565840UL,
-  0x00000000UL, 0x3fb59492UL, 0xdedd460cUL, 0xbe5422b5UL, 0x00000000UL,
-  0x3fb50d36UL, 0x950f9f45UL, 0xbe5313f6UL, 0x00000000UL, 0x3fb4860bUL,
-  0x582cdcb1UL, 0x3e506d39UL, 0x00000000UL, 0x3fb3ff12UL, 0x7216d3a6UL,
-  0x3e4aa719UL, 0x00000000UL, 0x3fb3784aUL, 0x57a423fdUL, 0x3e5a9b9fUL,
-  0x00000000UL, 0x3fb2f1b4UL, 0x7a138b41UL, 0xbe50b418UL, 0x00000000UL,
-  0x3fb26b4eUL, 0x2fbfd7eaUL, 0x3e23a53eUL, 0x00000000UL, 0x3fb1e519UL,
-  0x18913ccbUL, 0x3e465fc1UL, 0x00000000UL, 0x3fb15f15UL, 0x7ea24e21UL,
-  0x3e042843UL, 0x00000000UL, 0x3fb0d941UL, 0x7c6d9c77UL, 0x3e59f61eUL,
-  0x00000000UL, 0x3fb0539eUL, 0x114efd44UL, 0x3e4ccab7UL, 0x00000000UL,
-  0x3faf9c56UL, 0x1777f657UL, 0x3e552f65UL, 0x00000000UL, 0x3fae91d2UL,
-  0xc317b86aUL, 0xbe5a61e0UL, 0x00000000UL, 0x3fad87acUL, 0xb7664efbUL,
-  0xbe41f64eUL, 0x00000000UL, 0x3fac7de6UL, 0x5d3d03a9UL, 0x3e0807a0UL,
-  0x00000000UL, 0x3fab7480UL, 0x743c38ebUL, 0xbe3726e1UL, 0x00000000UL,
-  0x3faa6b78UL, 0x06a253f1UL, 0x3e5ad636UL, 0x00000000UL, 0x3fa962d0UL,
-  0xa35f541bUL, 0x3e5a187aUL, 0x00000000UL, 0x3fa85a88UL, 0x4b86e446UL,
-  0xbe508150UL, 0x00000000UL, 0x3fa7529cUL, 0x2589cacfUL, 0x3e52938aUL,
-  0x00000000UL, 0x3fa64b10UL, 0xaf6b11f2UL, 0xbe3454cdUL, 0x00000000UL,
-  0x3fa543e2UL, 0x97506fefUL, 0xbe5fdec5UL, 0x00000000UL, 0x3fa43d10UL,
-  0xe75f7dd9UL, 0xbe388dd3UL, 0x00000000UL, 0x3fa3369cUL, 0xa4139632UL,
-  0xbdea5177UL, 0x00000000UL, 0x3fa23086UL, 0x352d6f1eUL, 0xbe565ad6UL,
-  0x00000000UL, 0x3fa12accUL, 0x77449eb7UL, 0xbe50d5c7UL, 0x00000000UL,
-  0x3fa0256eUL, 0x7478da78UL, 0x3e404724UL, 0x00000000UL, 0x3f9e40dcUL,
-  0xf59cef7fUL, 0xbe539d0aUL, 0x00000000UL, 0x3f9c3790UL, 0x1511d43cUL,
-  0x3e53c2c8UL, 0x00000000UL, 0x3f9a2f00UL, 0x9b8bff3cUL, 0xbe43b3e1UL,
-  0x00000000UL, 0x3f982724UL, 0xad1e22a5UL, 0x3e46f0bdUL, 0x00000000UL,
-  0x3f962000UL, 0x130d9356UL, 0x3e475ba0UL, 0x00000000UL, 0x3f941994UL,
-  0x8f86f883UL, 0xbe513d0bUL, 0x00000000UL, 0x3f9213dcUL, 0x914d0dc8UL,
-  0xbe534335UL, 0x00000000UL, 0x3f900ed8UL, 0x2d73e5e7UL, 0xbe22ba75UL,
-  0x00000000UL, 0x3f8c1510UL, 0xc5b7d70eUL, 0x3e599c5dUL, 0x00000000UL,
-  0x3f880de0UL, 0x8a27857eUL, 0xbe3d28c8UL, 0x00000000UL, 0x3f840810UL,
-  0xda767328UL, 0x3e531b3dUL, 0x00000000UL, 0x3f8003b0UL, 0x77bacaf3UL,
-  0xbe5f04e3UL, 0x00000000UL, 0x3f780150UL, 0xdf4b0720UL, 0x3e5a8bffUL,
-  0x00000000UL, 0x3f6ffc40UL, 0x34c48e71UL, 0xbe3fcd99UL, 0x00000000UL,
-  0x3f5ff6c0UL, 0x1ad218afUL, 0xbe4c78a7UL, 0x00000000UL, 0x00000000UL,
-  0x00000000UL, 0x80000000UL
-};
-
-ALIGNED_(8) juint _log2_pow[] =
-{
-  0xfefa39efUL, 0x3fe62e42UL, 0xfefa39efUL, 0xbfe62e42UL
-};
-
-//registers,
-// input: xmm0, xmm1
-// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
-//          rax, rdx, rcx, r8, r11
-
-// Code generated by Intel C compiler for LIBM library
-
-void MacroAssembler::fast_pow(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp1, Register tmp2, Register tmp3, Register tmp4) {
-  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
-  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
-  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
-  Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, L_2TAG_PACKET_14_0_2, L_2TAG_PACKET_15_0_2;
-  Label L_2TAG_PACKET_16_0_2, L_2TAG_PACKET_17_0_2, L_2TAG_PACKET_18_0_2, L_2TAG_PACKET_19_0_2;
-  Label L_2TAG_PACKET_20_0_2, L_2TAG_PACKET_21_0_2, L_2TAG_PACKET_22_0_2, L_2TAG_PACKET_23_0_2;
-  Label L_2TAG_PACKET_24_0_2, L_2TAG_PACKET_25_0_2, L_2TAG_PACKET_26_0_2, L_2TAG_PACKET_27_0_2;
-  Label L_2TAG_PACKET_28_0_2, L_2TAG_PACKET_29_0_2, L_2TAG_PACKET_30_0_2, L_2TAG_PACKET_31_0_2;
-  Label L_2TAG_PACKET_32_0_2, L_2TAG_PACKET_33_0_2, L_2TAG_PACKET_34_0_2, L_2TAG_PACKET_35_0_2;
-  Label L_2TAG_PACKET_36_0_2, L_2TAG_PACKET_37_0_2, L_2TAG_PACKET_38_0_2, L_2TAG_PACKET_39_0_2;
-  Label L_2TAG_PACKET_40_0_2, L_2TAG_PACKET_41_0_2, L_2TAG_PACKET_42_0_2, L_2TAG_PACKET_43_0_2;
-  Label L_2TAG_PACKET_44_0_2, L_2TAG_PACKET_45_0_2, L_2TAG_PACKET_46_0_2, L_2TAG_PACKET_47_0_2;
-  Label L_2TAG_PACKET_48_0_2, L_2TAG_PACKET_49_0_2, L_2TAG_PACKET_50_0_2, L_2TAG_PACKET_51_0_2;
-  Label L_2TAG_PACKET_52_0_2, L_2TAG_PACKET_53_0_2, L_2TAG_PACKET_54_0_2, L_2TAG_PACKET_55_0_2;
-  Label L_2TAG_PACKET_56_0_2;
-  Label B1_2, B1_3, B1_5, start;
-
-  assert_different_registers(tmp1, tmp2, eax, ecx, edx);
-  jmp(start);
-  address HIGHSIGMASK = (address)_HIGHSIGMASK;
-  address LOG2_E = (address)_LOG2_E;
-  address coeff = (address)_coeff_pow;
-  address L_tbl = (address)_L_tbl_pow;
-  address HIGHMASK_Y = (address)_HIGHMASK_Y;
-  address T_exp = (address)_T_exp;
-  address e_coeff = (address)_e_coeff;
-  address coeff_h = (address)_coeff_h;
-  address HIGHMASK_LOG_X = (address)_HIGHMASK_LOG_X;
-  address HALFMASK = (address)_HALFMASK;
-  address log2 = (address)_log2_pow;
-
-
-  bind(start);
-  subq(rsp, 40);
-  movsd(Address(rsp, 8), xmm0);
-  movsd(Address(rsp, 16), xmm1);
-
-  bind(B1_2);
-  pextrw(eax, xmm0, 3);
-  xorpd(xmm2, xmm2);
-  mov64(tmp2, 0x3ff0000000000000);
-  movdq(xmm2, tmp2);
-  movl(tmp1, 1069088768);
-  movdq(xmm7, tmp1);
-  xorpd(xmm1, xmm1);
-  mov64(tmp3, 0x77f0000000000000);
-  movdq(xmm1, tmp3);
-  movdqu(xmm3, xmm0);
-  movl(edx, 32752);
-  andl(edx, eax);
-  subl(edx, 16368);
-  movl(ecx, edx);
-  sarl(edx, 31);
-  addl(ecx, edx);
-  xorl(ecx, edx);
-  por(xmm0, xmm2);
-  movdqu(xmm6, ExternalAddress(HIGHSIGMASK));    //0x00000000UL, 0xfffff800UL, 0x00000000UL, 0xfffff800UL
-  psrlq(xmm0, 27);
-  movq(xmm2, ExternalAddress(LOG2_E));    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
-  psrld(xmm0, 2);
-  addl(ecx, 16);
-  bsrl(ecx, ecx);
-  rcpps(xmm0, xmm0);
-  psllq(xmm3, 12);
-  movl(tmp4, 8192);
-  movdq(xmm4, tmp4);
-  psrlq(xmm3, 12);
-  subl(eax, 16);
-  cmpl(eax, 32736);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
-  movl(tmp1, 0);
-
-  bind(L_2TAG_PACKET_1_0_2);
-  mulss(xmm0, xmm7);
-  movl(edx, -1);
-  subl(ecx, 4);
-  shll(edx);
-  shlq(edx, 32);
-  movdq(xmm5, edx);
-  por(xmm3, xmm1);
-  subl(eax, 16351);
-  cmpl(eax, 1);
-  jcc(Assembler::belowEqual, L_2TAG_PACKET_2_0_2);
-  paddd(xmm0, xmm4);
-  pand(xmm5, xmm3);
-  movdl(edx, xmm0);
-  psllq(xmm0, 29);
-
-  bind(L_2TAG_PACKET_3_0_2);
-  subsd(xmm3, xmm5);
-  pand(xmm0, xmm6);
-  subl(eax, 1);
-  sarl(eax, 4);
-  cvtsi2sdl(xmm7, eax);
-  mulpd(xmm5, xmm0);
-
-  bind(L_2TAG_PACKET_4_0_2);
-  mulsd(xmm3, xmm0);
-  movdqu(xmm1, ExternalAddress(coeff));    //0x6dc96112UL, 0xbf836578UL, 0xee241472UL, 0xbf9b0301UL
-  lea(tmp4, ExternalAddress(L_tbl));
-  subsd(xmm5, xmm2);
-  movdqu(xmm4, ExternalAddress(16 + coeff));    //0x9f95985aUL, 0xbfb528dbUL, 0xb3841d2aUL, 0xbfd619b6UL
-  movl(ecx, eax);
-  sarl(eax, 31);
-  addl(ecx, eax);
-  xorl(eax, ecx);
-  addl(eax, 1);
-  bsrl(eax, eax);
-  unpcklpd(xmm5, xmm3);
-  movdqu(xmm6, ExternalAddress(32 + coeff));    //0x518775e3UL, 0x3f9004f2UL, 0xac8349bbUL, 0x3fa76c9bUL
-  addsd(xmm3, xmm5);
-  andl(edx, 16760832);
-  shrl(edx, 10);
-  addpd(xmm5, Address(tmp4, edx, Address::times_1, -3648));
-  movdqu(xmm0, ExternalAddress(48 + coeff));    //0x486ececcUL, 0x3fc4635eUL, 0x161bb241UL, 0xbf5dabe1UL
-  pshufd(xmm2, xmm3, 68);
-  mulsd(xmm3, xmm3);
-  mulpd(xmm1, xmm2);
-  mulpd(xmm4, xmm2);
-  addsd(xmm5, xmm7);
-  mulsd(xmm2, xmm3);
-  addpd(xmm6, xmm1);
-  mulsd(xmm3, xmm3);
-  addpd(xmm0, xmm4);
-  movq(xmm1, Address(rsp, 16));
-  movw(ecx, Address(rsp, 22));
-  pshufd(xmm7, xmm5, 238);
-  movq(xmm4, ExternalAddress(HIGHMASK_Y));    //0x00000000UL, 0xfffffff8UL, 0x00000000UL, 0xffffffffUL
-  mulpd(xmm6, xmm2);
-  pshufd(xmm3, xmm3, 68);
-  mulpd(xmm0, xmm2);
-  shll(eax, 4);
-  subl(eax, 15872);
-  andl(ecx, 32752);
-  addl(eax, ecx);
-  mulpd(xmm3, xmm6);
-  cmpl(eax, 624);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_5_0_2);
-  xorpd(xmm6, xmm6);
-  movl(edx, 17080);
-  pinsrw(xmm6, edx, 3);
-  movdqu(xmm2, xmm1);
-  pand(xmm4, xmm1);
-  subsd(xmm1, xmm4);
-  mulsd(xmm4, xmm5);
-  addsd(xmm0, xmm7);
-  mulsd(xmm1, xmm5);
-  movdqu(xmm7, xmm6);
-  addsd(xmm6, xmm4);
-  lea(tmp4, ExternalAddress(T_exp));
-  addpd(xmm3, xmm0);
-  movdl(edx, xmm6);
-  subsd(xmm6, xmm7);
-  pshufd(xmm0, xmm3, 238);
-  subsd(xmm4, xmm6);
-  addsd(xmm0, xmm3);
-  movl(ecx, edx);
-  andl(edx, 255);
-  addl(edx, edx);
-  movdqu(xmm5, Address(tmp4, edx, Address::times_8, 0));
-  addsd(xmm4, xmm1);
-  mulsd(xmm2, xmm0);
-  movdqu(xmm7, ExternalAddress(e_coeff));    //0xe78a6731UL, 0x3f55d87fUL, 0xd704a0c0UL, 0x3fac6b08UL
-  movdqu(xmm3, ExternalAddress(16 + e_coeff));    //0x6fba4e77UL, 0x3f83b2abUL, 0xff82c58fUL, 0x3fcebfbdUL
-  shll(ecx, 12);
-  xorl(ecx, tmp1);
-  andl(rcx, -1048576);
-  movdq(xmm6, rcx);
-  addsd(xmm2, xmm4);
-  mov64(tmp2, 0x3fe62e42fefa39ef);
-  movdq(xmm1, tmp2);
-  pshufd(xmm0, xmm2, 68);
-  pshufd(xmm4, xmm2, 68);
-  mulsd(xmm1, xmm2);
-  pshufd(xmm6, xmm6, 17);
-  mulpd(xmm0, xmm0);
-  mulpd(xmm7, xmm4);
-  paddd(xmm5, xmm6);
-  mulsd(xmm1, xmm5);
-  pshufd(xmm6, xmm5, 238);
-  mulsd(xmm0, xmm0);
-  addpd(xmm3, xmm7);
-  addsd(xmm1, xmm6);
-  mulpd(xmm0, xmm3);
-  pshufd(xmm3, xmm0, 238);
-  mulsd(xmm0, xmm5);
-  mulsd(xmm3, xmm5);
-  addsd(xmm0, xmm1);
-  addsd(xmm0, xmm3);
-  addsd(xmm0, xmm5);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_0_0_2);
-  addl(eax, 16);
-  movl(edx, 32752);
-  andl(edx, eax);
-  cmpl(edx, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_6_0_2);
-  testl(eax, 32768);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_7_0_2);
-
-  bind(L_2TAG_PACKET_8_0_2);
-  movq(xmm0, Address(rsp, 8));
-  movq(xmm3, Address(rsp, 8));
-  movdl(edx, xmm3);
-  psrlq(xmm3, 32);
-  movdl(ecx, xmm3);
-  orl(edx, ecx);
-  cmpl(edx, 0);
-  jcc(Assembler::equal, L_2TAG_PACKET_9_0_2);
-  xorpd(xmm3, xmm3);
-  movl(eax, 18416);
-  pinsrw(xmm3, eax, 3);
-  mulsd(xmm0, xmm3);
-  xorpd(xmm2, xmm2);
-  movl(eax, 16368);
-  pinsrw(xmm2, eax, 3);
-  movdqu(xmm3, xmm0);
-  pextrw(eax, xmm0, 3);
-  por(xmm0, xmm2);
-  movl(ecx, 18416);
-  psrlq(xmm0, 27);
-  movq(xmm2, ExternalAddress(LOG2_E));    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
-  psrld(xmm0, 2);
-  rcpps(xmm0, xmm0);
-  psllq(xmm3, 12);
-  movdqu(xmm6, ExternalAddress(HIGHSIGMASK));    //0x00000000UL, 0xfffff800UL, 0x00000000UL, 0xfffff800UL
-  psrlq(xmm3, 12);
-  mulss(xmm0, xmm7);
-  movl(edx, -1024);
-  movdl(xmm5, edx);
-  por(xmm3, xmm1);
-  paddd(xmm0, xmm4);
-  psllq(xmm5, 32);
-  movdl(edx, xmm0);
-  psllq(xmm0, 29);
-  pand(xmm5, xmm3);
-  movl(tmp1, 0);
-  pand(xmm0, xmm6);
-  subsd(xmm3, xmm5);
-  andl(eax, 32752);
-  subl(eax, 18416);
-  sarl(eax, 4);
-  cvtsi2sdl(xmm7, eax);
-  mulpd(xmm5, xmm0);
-  jmp(L_2TAG_PACKET_4_0_2);
-
-  bind(L_2TAG_PACKET_10_0_2);
-  movq(xmm0, Address(rsp, 8));
-  movq(xmm3, Address(rsp, 8));
-  movdl(edx, xmm3);
-  psrlq(xmm3, 32);
-  movdl(ecx, xmm3);
-  orl(edx, ecx);
-  cmpl(edx, 0);
-  jcc(Assembler::equal, L_2TAG_PACKET_9_0_2);
-  xorpd(xmm3, xmm3);
-  movl(eax, 18416);
-  pinsrw(xmm3, eax, 3);
-  mulsd(xmm0, xmm3);
-  xorpd(xmm2, xmm2);
-  movl(eax, 16368);
-  pinsrw(xmm2, eax, 3);
-  movdqu(xmm3, xmm0);
-  pextrw(eax, xmm0, 3);
-  por(xmm0, xmm2);
-  movl(ecx, 18416);
-  psrlq(xmm0, 27);
-  movq(xmm2, ExternalAddress(LOG2_E));    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
-  psrld(xmm0, 2);
-  rcpps(xmm0, xmm0);
-  psllq(xmm3, 12);
-  movdqu(xmm6, ExternalAddress(HIGHSIGMASK));    //0x00000000UL, 0xfffff800UL, 0x00000000UL, 0xfffff800UL
-  psrlq(xmm3, 12);
-  mulss(xmm0, xmm7);
-  movl(edx, -1024);
-  movdl(xmm5, edx);
-  por(xmm3, xmm1);
-  paddd(xmm0, xmm4);
-  psllq(xmm5, 32);
-  movdl(edx, xmm0);
-  psllq(xmm0, 29);
-  pand(xmm5, xmm3);
-  movl(tmp1, INT_MIN);
-  pand(xmm0, xmm6);
-  subsd(xmm3, xmm5);
-  andl(eax, 32752);
-  subl(eax, 18416);
-  sarl(eax, 4);
-  cvtsi2sdl(xmm7, eax);
-  mulpd(xmm5, xmm0);
-  jmp(L_2TAG_PACKET_4_0_2);
-
-  bind(L_2TAG_PACKET_5_0_2);
-  cmpl(eax, 0);
-  jcc(Assembler::less, L_2TAG_PACKET_11_0_2);
-  cmpl(eax, 752);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_12_0_2);
-  addsd(xmm0, xmm7);
-  movq(xmm2, ExternalAddress(HALFMASK));    //0xf8000000UL, 0xffffffffUL, 0xf8000000UL, 0xffffffffUL
-  addpd(xmm3, xmm0);
-  xorpd(xmm6, xmm6);
-  movl(eax, 17080);
-  pinsrw(xmm6, eax, 3);
-  pshufd(xmm0, xmm3, 238);
-  addsd(xmm0, xmm3);
-  movdqu(xmm3, xmm5);
-  addsd(xmm5, xmm0);
-  movdqu(xmm4, xmm2);
-  subsd(xmm3, xmm5);
-  movdqu(xmm7, xmm5);
-  pand(xmm5, xmm2);
-  movdqu(xmm2, xmm1);
-  pand(xmm4, xmm1);
-  subsd(xmm7, xmm5);
-  addsd(xmm0, xmm3);
-  subsd(xmm1, xmm4);
-  mulsd(xmm4, xmm5);
-  addsd(xmm0, xmm7);
-  mulsd(xmm2, xmm0);
-  movdqu(xmm7, xmm6);
-  mulsd(xmm1, xmm5);
-  addsd(xmm6, xmm4);
-  movdl(eax, xmm6);
-  subsd(xmm6, xmm7);
-  lea(tmp4, ExternalAddress(T_exp));
-  addsd(xmm2, xmm1);
-  movdqu(xmm7, ExternalAddress(e_coeff));    //0xe78a6731UL, 0x3f55d87fUL, 0xd704a0c0UL, 0x3fac6b08UL
-  movdqu(xmm3, ExternalAddress(16 + e_coeff));    //0x6fba4e77UL, 0x3f83b2abUL, 0xff82c58fUL, 0x3fcebfbdUL
-  subsd(xmm4, xmm6);
-  pextrw(edx, xmm6, 3);
-  movl(ecx, eax);
-  andl(eax, 255);
-  addl(eax, eax);
-  movdqu(xmm5, Address(tmp4, rax, Address::times_8, 0));
-  addsd(xmm2, xmm4);
-  sarl(ecx, 8);
-  movl(eax, ecx);
-  sarl(ecx, 1);
-  subl(eax, ecx);
-  shll(ecx, 20);
-  xorl(ecx, tmp1);
-  movdl(xmm6, ecx);
-  movq(xmm1, ExternalAddress(32 + e_coeff));    //0xfefa39efUL, 0x3fe62e42UL, 0x00000000UL, 0x00000000UL
-  andl(edx, 32767);
-  cmpl(edx, 16529);
-  jcc(Assembler::above, L_2TAG_PACKET_12_0_2);
-  pshufd(xmm0, xmm2, 68);
-  pshufd(xmm4, xmm2, 68);
-  mulpd(xmm0, xmm0);
-  mulpd(xmm7, xmm4);
-  pshufd(xmm6, xmm6, 17);
-  mulsd(xmm1, xmm2);
-  mulsd(xmm0, xmm0);
-  paddd(xmm5, xmm6);
-  addpd(xmm3, xmm7);
-  mulsd(xmm1, xmm5);
-  pshufd(xmm6, xmm5, 238);
-  mulpd(xmm0, xmm3);
-  addsd(xmm1, xmm6);
-  pshufd(xmm3, xmm0, 238);
-  mulsd(xmm0, xmm5);
-  mulsd(xmm3, xmm5);
-  shll(eax, 4);
-  xorpd(xmm4, xmm4);
-  addl(eax, 16368);
-  pinsrw(xmm4, eax, 3);
-  addsd(xmm0, xmm1);
-  addsd(xmm0, xmm3);
-  movdqu(xmm1, xmm0);
-  addsd(xmm0, xmm5);
-  mulsd(xmm0, xmm4);
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_13_0_2);
-  cmpl(eax, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_14_0_2);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_6_0_2);
-  movq(xmm1, Address(rsp, 16));
-  movq(xmm0, Address(rsp, 8));
-  movdqu(xmm2, xmm0);
-  movdl(eax, xmm2);
-  psrlq(xmm2, 20);
-  movdl(edx, xmm2);
-  orl(eax, edx);
-  jcc(Assembler::equal, L_2TAG_PACKET_15_0_2);
-  movdl(eax, xmm1);
-  psrlq(xmm1, 32);
-  movdl(edx, xmm1);
-  movl(ecx, edx);
-  addl(edx, edx);
-  orl(eax, edx);
-  jcc(Assembler::equal, L_2TAG_PACKET_16_0_2);
-  addsd(xmm0, xmm0);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_16_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 16368);
-  pinsrw(xmm0, eax, 3);
-  movl(Address(rsp, 0), 29);
-  jmp(L_2TAG_PACKET_17_0_2);
-
-  bind(L_2TAG_PACKET_18_0_2);
-  movq(xmm0, Address(rsp, 16));
-  addpd(xmm0, xmm0);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_15_0_2);
-  movdl(eax, xmm1);
-  movdqu(xmm2, xmm1);
-  psrlq(xmm1, 32);
-  movdl(edx, xmm1);
-  movl(ecx, edx);
-  addl(edx, edx);
-  orl(eax, edx);
-  jcc(Assembler::equal, L_2TAG_PACKET_19_0_2);
-  pextrw(eax, xmm2, 3);
-  andl(eax, 32752);
-  cmpl(eax, 32752);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_20_0_2);
-  movdl(eax, xmm2);
-  psrlq(xmm2, 20);
-  movdl(edx, xmm2);
-  orl(eax, edx);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_20_0_2);
-  pextrw(eax, xmm0, 3);
-  testl(eax, 32768);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_21_0_2);
-  testl(ecx, INT_MIN);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_22_0_2);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_23_0_2);
-  movq(xmm1, Address(rsp, 16));
-  movdl(eax, xmm1);
-  testl(eax, 1);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_24_0_2);
-  testl(eax, 2);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_25_0_2);
-  jmp(L_2TAG_PACKET_24_0_2);
-
-  bind(L_2TAG_PACKET_21_0_2);
-  shrl(ecx, 20);
-  andl(ecx, 2047);
-  cmpl(ecx, 1075);
-  jcc(Assembler::above, L_2TAG_PACKET_24_0_2);
-  jcc(Assembler::equal, L_2TAG_PACKET_26_0_2);
-  cmpl(ecx, 1074);
-  jcc(Assembler::above, L_2TAG_PACKET_23_0_2);
-  cmpl(ecx, 1023);
-  jcc(Assembler::below, L_2TAG_PACKET_24_0_2);
-  movq(xmm1, Address(rsp, 16));
-  movl(eax, 17208);
-  xorpd(xmm3, xmm3);
-  pinsrw(xmm3, eax, 3);
-  movdqu(xmm4, xmm3);
-  addsd(xmm3, xmm1);
-  subsd(xmm4, xmm3);
-  addsd(xmm1, xmm4);
-  pextrw(eax, xmm1, 3);
-  andl(eax, 32752);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_24_0_2);
-  movdl(eax, xmm3);
-  andl(eax, 1);
-  jcc(Assembler::equal, L_2TAG_PACKET_24_0_2);
-
-  bind(L_2TAG_PACKET_25_0_2);
-  movq(xmm1, Address(rsp, 16));
-  pextrw(eax, xmm1, 3);
-  andl(eax, 32768);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_27_0_2);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_27_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 32768);
-  pinsrw(xmm0, eax, 3);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_24_0_2);
-  movq(xmm1, Address(rsp, 16));
-  pextrw(eax, xmm1, 3);
-  andl(eax, 32768);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_22_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 32752);
-  pinsrw(xmm0, eax, 3);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_26_0_2);
-  movq(xmm1, Address(rsp, 16));
-  movdl(eax, xmm1);
-  andl(eax, 1);
-  jcc(Assembler::equal, L_2TAG_PACKET_24_0_2);
-  jmp(L_2TAG_PACKET_25_0_2);
-
-  bind(L_2TAG_PACKET_28_0_2);
-  movdl(eax, xmm1);
-  psrlq(xmm1, 20);
-  movdl(edx, xmm1);
-  orl(eax, edx);
-  jcc(Assembler::equal, L_2TAG_PACKET_29_0_2);
-  movq(xmm0, Address(rsp, 16));
-  addsd(xmm0, xmm0);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_29_0_2);
-  movq(xmm0, Address(rsp, 8));
-  pextrw(eax, xmm0, 3);
-  cmpl(eax, 49136);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_30_0_2);
-  movdl(ecx, xmm0);
-  psrlq(xmm0, 20);
-  movdl(edx, xmm0);
-  orl(ecx, edx);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_30_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 32760);
-  pinsrw(xmm0, eax, 3);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_30_0_2);
-  movq(xmm1, Address(rsp, 16));
-  andl(eax, 32752);
-  subl(eax, 16368);
-  pextrw(edx, xmm1, 3);
-  xorpd(xmm0, xmm0);
-  xorl(eax, edx);
-  andl(eax, 32768);
-  jcc(Assembler::equal, L_2TAG_PACKET_31_0_2);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_31_0_2);
-  movl(ecx, 32752);
-  pinsrw(xmm0, ecx, 3);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_32_0_2);
-  movdl(eax, xmm1);
-  cmpl(edx, 17184);
-  jcc(Assembler::above, L_2TAG_PACKET_33_0_2);
-  testl(eax, 1);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_34_0_2);
-  testl(eax, 2);
-  jcc(Assembler::equal, L_2TAG_PACKET_35_0_2);
-  jmp(L_2TAG_PACKET_36_0_2);
-
-  bind(L_2TAG_PACKET_33_0_2);
-  testl(eax, 1);
-  jcc(Assembler::equal, L_2TAG_PACKET_35_0_2);
-  jmp(L_2TAG_PACKET_36_0_2);
-
-  bind(L_2TAG_PACKET_7_0_2);
-  movq(xmm2, Address(rsp, 8));
-  movdl(eax, xmm2);
-  psrlq(xmm2, 31);
-  movdl(ecx, xmm2);
-  orl(eax, ecx);
-  jcc(Assembler::equal, L_2TAG_PACKET_9_0_2);
-  movq(xmm1, Address(rsp, 16));
-  pextrw(edx, xmm1, 3);
-  movdl(eax, xmm1);
-  movdqu(xmm2, xmm1);
-  psrlq(xmm2, 32);
-  movdl(ecx, xmm2);
-  addl(ecx, ecx);
-  orl(ecx, eax);
-  jcc(Assembler::equal, L_2TAG_PACKET_37_0_2);
-  andl(edx, 32752);
-  cmpl(edx, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_28_0_2);
-  cmpl(edx, 17200);
-  jcc(Assembler::above, L_2TAG_PACKET_35_0_2);
-  cmpl(edx, 17184);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_32_0_2);
-  cmpl(edx, 16368);
-  jcc(Assembler::below, L_2TAG_PACKET_34_0_2);
-  movl(eax, 17208);
-  xorpd(xmm2, xmm2);
-  pinsrw(xmm2, eax, 3);
-  movdqu(xmm4, xmm2);
-  addsd(xmm2, xmm1);
-  subsd(xmm4, xmm2);
-  addsd(xmm1, xmm4);
-  pextrw(eax, xmm1, 3);
-  andl(eax, 32767);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_34_0_2);
-  movdl(eax, xmm2);
-  andl(eax, 1);
-  jcc(Assembler::equal, L_2TAG_PACKET_35_0_2);
-
-  bind(L_2TAG_PACKET_36_0_2);
-  xorpd(xmm1, xmm1);
-  movl(edx, 30704);
-  pinsrw(xmm1, edx, 3);
-  movq(xmm2, ExternalAddress(LOG2_E));    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
-  movq(xmm4, Address(rsp, 8));
-  pextrw(eax, xmm4, 3);
-  movl(edx, 8192);
-  movdl(xmm4, edx);
-  andl(eax, 32767);
-  subl(eax, 16);
-  jcc(Assembler::less, L_2TAG_PACKET_10_0_2);
-  movl(edx, eax);
-  andl(edx, 32752);
-  subl(edx, 16368);
-  movl(ecx, edx);
-  sarl(edx, 31);
-  addl(ecx, edx);
-  xorl(ecx, edx);
-  addl(ecx, 16);
-  bsrl(ecx, ecx);
-  movl(tmp1, INT_MIN);
-  jmp(L_2TAG_PACKET_1_0_2);
-
-  bind(L_2TAG_PACKET_34_0_2);
-  xorpd(xmm1, xmm1);
-  movl(eax, 32752);
-  pinsrw(xmm1, eax, 3);
-  xorpd(xmm0, xmm0);
-  mulsd(xmm0, xmm1);
-  movl(Address(rsp, 0), 28);
-  jmp(L_2TAG_PACKET_17_0_2);
-
-  bind(L_2TAG_PACKET_35_0_2);
-  xorpd(xmm1, xmm1);
-  movl(edx, 30704);
-  pinsrw(xmm1, edx, 3);
-  movq(xmm2, ExternalAddress(LOG2_E));    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
-  movq(xmm4, Address(rsp, 8));
-  pextrw(eax, xmm4, 3);
-  movl(edx, 8192);
-  movdl(xmm4, edx);
-  andl(eax, 32767);
-  subl(eax, 16);
-  jcc(Assembler::less, L_2TAG_PACKET_8_0_2);
-  movl(edx, eax);
-  andl(edx, 32752);
-  subl(edx, 16368);
-  movl(ecx, edx);
-  sarl(edx, 31);
-  addl(ecx, edx);
-  xorl(ecx, edx);
-  addl(ecx, 16);
-  bsrl(ecx, ecx);
-  movl(tmp1, 0);
-  jmp(L_2TAG_PACKET_1_0_2);
-
-  bind(L_2TAG_PACKET_19_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 16368);
-  pinsrw(xmm0, eax, 3);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_22_0_2);
-  xorpd(xmm0, xmm0);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_11_0_2);
-  addl(eax, 384);
-  cmpl(eax, 0);
-  jcc(Assembler::less, L_2TAG_PACKET_38_0_2);
-  mulsd(xmm5, xmm1);
-  addsd(xmm0, xmm7);
-  shrl(tmp1, 31);
-  addpd(xmm3, xmm0);
-  pshufd(xmm0, xmm3, 238);
-  addsd(xmm3, xmm0);
-  lea(tmp4, ExternalAddress(log2));    //0xfefa39efUL, 0x3fe62e42UL, 0xfefa39efUL, 0xbfe62e42UL
-  movq(xmm4, Address(tmp4, tmp1, Address::times_8, 0));
-  mulsd(xmm1, xmm3);
-  xorpd(xmm0, xmm0);
-  movl(eax, 16368);
-  shll(tmp1, 15);
-  orl(eax, tmp1);
-  pinsrw(xmm0, eax, 3);
-  addsd(xmm5, xmm1);
-  mulsd(xmm5, xmm4);
-  addsd(xmm0, xmm5);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_38_0_2);
-
-  bind(L_2TAG_PACKET_37_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 16368);
-  pinsrw(xmm0, eax, 3);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_39_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 16368);
-  pinsrw(xmm0, eax, 3);
-  movl(Address(rsp, 0), 26);
-  jmp(L_2TAG_PACKET_17_0_2);
-
-  bind(L_2TAG_PACKET_9_0_2);
-  movq(xmm1, Address(rsp, 16));
-  movdqu(xmm2, xmm1);
-  pextrw(eax, xmm1, 3);
-  andl(eax, 32752);
-  cmpl(eax, 32752);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_40_0_2);
-  movdl(eax, xmm2);
-  psrlq(xmm2, 20);
-  movdl(edx, xmm2);
-  orl(eax, edx);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_18_0_2);
-
-  bind(L_2TAG_PACKET_40_0_2);
-  movdl(eax, xmm1);
-  psrlq(xmm1, 32);
-  movdl(edx, xmm1);
-  movl(ecx, edx);
-  addl(edx, edx);
-  orl(eax, edx);
-  jcc(Assembler::equal, L_2TAG_PACKET_39_0_2);
-  shrl(edx, 21);
-  cmpl(edx, 1075);
-  jcc(Assembler::above, L_2TAG_PACKET_41_0_2);
-  jcc(Assembler::equal, L_2TAG_PACKET_42_0_2);
-  cmpl(edx, 1023);
-  jcc(Assembler::below, L_2TAG_PACKET_41_0_2);
-  movq(xmm1, Address(rsp, 16));
-  movl(eax, 17208);
-  xorpd(xmm3, xmm3);
-  pinsrw(xmm3, eax, 3);
-  movdqu(xmm4, xmm3);
-  addsd(xmm3, xmm1);
-  subsd(xmm4, xmm3);
-  addsd(xmm1, xmm4);
-  pextrw(eax, xmm1, 3);
-  andl(eax, 32752);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_41_0_2);
-  movdl(eax, xmm3);
-  andl(eax, 1);
-  jcc(Assembler::equal, L_2TAG_PACKET_41_0_2);
-
-  bind(L_2TAG_PACKET_43_0_2);
-  movq(xmm0, Address(rsp, 8));
-  testl(ecx, INT_MIN);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_44_0_2);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_42_0_2);
-  movq(xmm1, Address(rsp, 16));
-  movdl(eax, xmm1);
-  testl(eax, 1);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_43_0_2);
-
-  bind(L_2TAG_PACKET_41_0_2);
-  testl(ecx, INT_MIN);
-  jcc(Assembler::equal, L_2TAG_PACKET_22_0_2);
-  xorpd(xmm0, xmm0);
-
-  bind(L_2TAG_PACKET_44_0_2);
-  movl(eax, 16368);
-  xorpd(xmm1, xmm1);
-  pinsrw(xmm1, eax, 3);
-  divsd(xmm1, xmm0);
-  movdqu(xmm0, xmm1);
-  movl(Address(rsp, 0), 27);
-  jmp(L_2TAG_PACKET_17_0_2);
-
-  bind(L_2TAG_PACKET_12_0_2);
-  movq(xmm2, Address(rsp, 8));
-  movq(xmm6, Address(rsp, 16));
-  pextrw(eax, xmm2, 3);
-  pextrw(edx, xmm6, 3);
-  movl(ecx, 32752);
-  andl(ecx, edx);
-  cmpl(ecx, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_45_0_2);
-  andl(eax, 32752);
-  subl(eax, 16368);
-  xorl(edx, eax);
-  testl(edx, 32768);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_46_0_2);
-
-  bind(L_2TAG_PACKET_47_0_2);
-  movl(eax, 32736);
-  pinsrw(xmm0, eax, 3);
-  shrl(tmp1, 16);
-  orl(eax, tmp1);
-  pinsrw(xmm1, eax, 3);
-  mulsd(xmm0, xmm1);
-
-  bind(L_2TAG_PACKET_14_0_2);
-  movl(Address(rsp, 0), 24);
-  jmp(L_2TAG_PACKET_17_0_2);
-
-  bind(L_2TAG_PACKET_46_0_2);
-  movl(eax, 16);
-  pinsrw(xmm0, eax, 3);
-  mulsd(xmm0, xmm0);
-  testl(tmp1, INT_MIN);
-  jcc(Assembler::equal, L_2TAG_PACKET_48_0_2);
-  mov64(tmp2, 0x8000000000000000);
-  movdq(xmm2, tmp2);
-  xorpd(xmm0, xmm2);
-
-  bind(L_2TAG_PACKET_48_0_2);
-  movl(Address(rsp, 0), 25);
-  jmp(L_2TAG_PACKET_17_0_2);
-
-  bind(L_2TAG_PACKET_13_0_2);
-  pextrw(ecx, xmm5, 3);
-  pextrw(edx, xmm4, 3);
-  movl(eax, -1);
-  andl(ecx, 32752);
-  subl(ecx, 16368);
-  andl(edx, 32752);
-  addl(edx, ecx);
-  movl(ecx, -31);
-  sarl(edx, 4);
-  subl(ecx, edx);
-  jcc(Assembler::lessEqual, L_2TAG_PACKET_49_0_2);
-  cmpl(ecx, 20);
-  jcc(Assembler::above, L_2TAG_PACKET_50_0_2);
-  shll(eax);
-
-  bind(L_2TAG_PACKET_49_0_2);
-  movdl(xmm0, eax);
-  psllq(xmm0, 32);
-  pand(xmm0, xmm5);
-  subsd(xmm5, xmm0);
-  addsd(xmm5, xmm1);
-  mulsd(xmm0, xmm4);
-  mulsd(xmm5, xmm4);
-  addsd(xmm0, xmm5);
-
-  bind(L_2TAG_PACKET_50_0_2);
-  jmp(L_2TAG_PACKET_48_0_2);
-
-  bind(L_2TAG_PACKET_2_0_2);
-  movw(ecx, Address(rsp, 22));
-  movl(edx, INT_MIN);
-  movdl(xmm1, rdx);
-  xorpd(xmm7, xmm7);
-  paddd(xmm0, xmm4);
-  movdl(edx, xmm0);
-  psllq(xmm0, 29);
-  paddq(xmm1, xmm3);
-  pand(xmm5, xmm1);
-  andl(ecx, 32752);
-  cmpl(ecx, 16560);
-  jcc(Assembler::less, L_2TAG_PACKET_3_0_2);
-  pand(xmm0, xmm6);
-  subsd(xmm3, xmm5);
-  addl(eax, 16351);
-  shrl(eax, 4);
-  subl(eax, 1022);
-  cvtsi2sdl(xmm7, eax);
-  mulpd(xmm5, xmm0);
-  lea(r11, ExternalAddress(L_tbl));
-  movq(xmm4, ExternalAddress(coeff_h));    //0x00000000UL, 0xbfd61a00UL, 0x00000000UL, 0xbf5dabe1UL
-  mulsd(xmm3, xmm0);
-  movq(xmm6, ExternalAddress(coeff_h));    //0x00000000UL, 0xbfd61a00UL, 0x00000000UL, 0xbf5dabe1UL
-  subsd(xmm5, xmm2);
-  movq(xmm1, ExternalAddress(8 + coeff_h));    //0x00000000UL, 0xbf5dabe1UL
-  pshufd(xmm2, xmm3, 68);
-  unpcklpd(xmm5, xmm3);
-  addsd(xmm3, xmm5);
-  movq(xmm0, ExternalAddress(8 + coeff_h));    //0x00000000UL, 0xbf5dabe1UL
-  andl(edx, 16760832);
-  shrl(edx, 10);
-  addpd(xmm7, Address(tmp4, edx, Address::times_1, -3648));
-  mulsd(xmm4, xmm5);
-  mulsd(xmm0, xmm5);
-  mulsd(xmm6, xmm2);
-  mulsd(xmm1, xmm2);
-  movdqu(xmm2, xmm5);
-  mulsd(xmm4, xmm5);
-  addsd(xmm5, xmm0);
-  movdqu(xmm0, xmm7);
-  addsd(xmm2, xmm3);
-  addsd(xmm7, xmm5);
-  mulsd(xmm6, xmm2);
-  subsd(xmm0, xmm7);
-  movdqu(xmm2, xmm7);
-  addsd(xmm7, xmm4);
-  addsd(xmm0, xmm5);
-  subsd(xmm2, xmm7);
-  addsd(xmm4, xmm2);
-  pshufd(xmm2, xmm5, 238);
-  movdqu(xmm5, xmm7);
-  addsd(xmm7, xmm2);
-  addsd(xmm4, xmm0);
-  movdqu(xmm0, ExternalAddress(coeff));    //0x6dc96112UL, 0xbf836578UL, 0xee241472UL, 0xbf9b0301UL
-  subsd(xmm5, xmm7);
-  addsd(xmm6, xmm4);
-  movdqu(xmm4, xmm7);
-  addsd(xmm5, xmm2);
-  addsd(xmm7, xmm1);
-  movdqu(xmm2, ExternalAddress(64 + coeff));    //0x486ececcUL, 0x3fc4635eUL, 0x161bb241UL, 0xbf5dabe1UL
-  subsd(xmm4, xmm7);
-  addsd(xmm6, xmm5);
-  addsd(xmm4, xmm1);
-  pshufd(xmm5, xmm7, 238);
-  movapd(xmm1, xmm7);
-  addsd(xmm7, xmm5);
-  subsd(xmm1, xmm7);
-  addsd(xmm1, xmm5);
-  movdqu(xmm5, ExternalAddress(80 + coeff));    //0x9f95985aUL, 0xbfb528dbUL, 0xf8b5787dUL, 0x3ef2531eUL
-  pshufd(xmm3, xmm3, 68);
-  addsd(xmm6, xmm4);
-  addsd(xmm6, xmm1);
-  movdqu(xmm1, ExternalAddress(32 + coeff));    //0x9f95985aUL, 0xbfb528dbUL, 0xb3841d2aUL, 0xbfd619b6UL
-  mulpd(xmm0, xmm3);
-  mulpd(xmm2, xmm3);
-  pshufd(xmm4, xmm3, 68);
-  mulpd(xmm3, xmm3);
-  addpd(xmm0, xmm1);
-  addpd(xmm5, xmm2);
-  mulsd(xmm4, xmm3);
-  movq(xmm2, ExternalAddress(HIGHMASK_LOG_X));    //0xf8000000UL, 0xffffffffUL, 0x00000000UL, 0xfffff800UL
-  mulpd(xmm3, xmm3);
-  movq(xmm1, Address(rsp, 16));
-  movw(ecx, Address(rsp, 22));
-  mulpd(xmm0, xmm4);
-  pextrw(eax, xmm7, 3);
-  mulpd(xmm5, xmm4);
-  mulpd(xmm0, xmm3);
-  movq(xmm4, ExternalAddress(8 + HIGHMASK_Y));    //0x00000000UL, 0xffffffffUL
-  pand(xmm2, xmm7);
-  addsd(xmm5, xmm6);
-  subsd(xmm7, xmm2);
-  addpd(xmm5, xmm0);
-  andl(eax, 32752);
-  subl(eax, 16368);
-  andl(ecx, 32752);
-  cmpl(ecx, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_45_0_2);
-  addl(ecx, eax);
-  cmpl(ecx, 16576);
-  jcc(Assembler::aboveEqual, L_2TAG_PACKET_51_0_2);
-  pshufd(xmm0, xmm5, 238);
-  pand(xmm4, xmm1);
-  movdqu(xmm3, xmm1);
-  addsd(xmm5, xmm0);
-  subsd(xmm1, xmm4);
-  xorpd(xmm6, xmm6);
-  movl(edx, 17080);
-  pinsrw(xmm6, edx, 3);
-  addsd(xmm7, xmm5);
-  mulsd(xmm4, xmm2);
-  mulsd(xmm1, xmm2);
-  movdqu(xmm5, xmm6);
-  mulsd(xmm3, xmm7);
-  addsd(xmm6, xmm4);
-  addsd(xmm1, xmm3);
-  movdqu(xmm7, ExternalAddress(e_coeff));    //0xe78a6731UL, 0x3f55d87fUL, 0xd704a0c0UL, 0x3fac6b08UL
-  movdl(edx, xmm6);
-  subsd(xmm6, xmm5);
-  lea(tmp4, ExternalAddress(T_exp));
-  movdqu(xmm3, ExternalAddress(16 + e_coeff));    //0x6fba4e77UL, 0x3f83b2abUL, 0xff82c58fUL, 0x3fcebfbdUL
-  movq(xmm2, ExternalAddress(32 + e_coeff));    //0xfefa39efUL, 0x3fe62e42UL, 0x00000000UL, 0x00000000UL
-  subsd(xmm4, xmm6);
-  movl(ecx, edx);
-  andl(edx, 255);
-  addl(edx, edx);
-  movdqu(xmm5, Address(tmp4, edx, Address::times_8, 0));
-  addsd(xmm4, xmm1);
-  pextrw(edx, xmm6, 3);
-  shrl(ecx, 8);
-  movl(eax, ecx);
-  shrl(ecx, 1);
-  subl(eax, ecx);
-  shll(ecx, 20);
-  movdl(xmm6, ecx);
-  pshufd(xmm0, xmm4, 68);
-  pshufd(xmm1, xmm4, 68);
-  mulpd(xmm0, xmm0);
-  mulpd(xmm7, xmm1);
-  pshufd(xmm6, xmm6, 17);
-  mulsd(xmm2, xmm4);
-  andl(edx, 32767);
-  cmpl(edx, 16529);
-  jcc(Assembler::above, L_2TAG_PACKET_12_0_2);
-  mulsd(xmm0, xmm0);
-  paddd(xmm5, xmm6);
-  addpd(xmm3, xmm7);
-  mulsd(xmm2, xmm5);
-  pshufd(xmm6, xmm5, 238);
-  mulpd(xmm0, xmm3);
-  addsd(xmm2, xmm6);
-  pshufd(xmm3, xmm0, 238);
-  addl(eax, 1023);
-  shll(eax, 20);
-  orl(eax, tmp1);
-  movdl(xmm4, eax);
-  mulsd(xmm0, xmm5);
-  mulsd(xmm3, xmm5);
-  addsd(xmm0, xmm2);
-  psllq(xmm4, 32);
-  addsd(xmm0, xmm3);
-  movdqu(xmm1, xmm0);
-  addsd(xmm0, xmm5);
-  mulsd(xmm0, xmm4);
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_13_0_2);
-  cmpl(eax, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_14_0_2);
-
-  bind(L_2TAG_PACKET_52_0_2);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_45_0_2);
-  movq(xmm0, Address(rsp, 8));
-  xorpd(xmm2, xmm2);
-  movl(eax, 49136);
-  pinsrw(xmm2, eax, 3);
-  addsd(xmm2, xmm0);
-  pextrw(eax, xmm2, 3);
-  cmpl(eax, 0);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_53_0_2);
-  xorpd(xmm0, xmm0);
-  movl(eax, 32760);
-  pinsrw(xmm0, eax, 3);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_53_0_2);
-  movq(xmm1, Address(rsp, 16));
-  movdl(edx, xmm1);
-  movdqu(xmm3, xmm1);
-  psrlq(xmm3, 20);
-  movdl(ecx, xmm3);
-  orl(ecx, edx);
-  jcc(Assembler::equal, L_2TAG_PACKET_54_0_2);
-  addsd(xmm1, xmm1);
-  movdqu(xmm0, xmm1);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_51_0_2);
-  pextrw(eax, xmm1, 3);
-  pextrw(ecx, xmm2, 3);
-  xorl(eax, ecx);
-  testl(eax, 32768);
-  jcc(Assembler::equal, L_2TAG_PACKET_47_0_2);
-  jmp(L_2TAG_PACKET_46_0_2);
-
-  bind(L_2TAG_PACKET_54_0_2);
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32752);
-  pextrw(edx, xmm1, 3);
-  xorpd(xmm0, xmm0);
-  subl(eax, 16368);
-  xorl(eax, edx);
-  testl(eax, 32768);
-  jcc(Assembler::equal, L_2TAG_PACKET_55_0_2);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_55_0_2);
-  movl(edx, 32752);
-  pinsrw(xmm0, edx, 3);
-  jmp(B1_5);
-
-  bind(L_2TAG_PACKET_17_0_2);
-  movq(Address(rsp, 24), xmm0);
-
-  bind(B1_3);
-  movq(xmm0, Address(rsp, 24));
-
-  bind(L_2TAG_PACKET_56_0_2);
-
-  bind(B1_5);
-  addq(rsp, 40);
-}
-
-/******************************************************************************/
-//                     ALGORITHM DESCRIPTION - SIN()
-//                     ---------------------
-//
-//     1. RANGE REDUCTION
-//
-//     We perform an initial range reduction from X to r with
-//
-//          X =~= N * pi/32 + r
-//
-//     so that |r| <= pi/64 + epsilon. We restrict inputs to those
-//     where |N| <= 932560. Beyond this, the range reduction is
-//     insufficiently accurate. For extremely small inputs,
-//     denormalization can occur internally, impacting performance.
-//     This means that the main path is actually only taken for
-//     2^-252 <= |X| < 90112.
-//
-//     To avoid branches, we perform the range reduction to full
-//     accuracy each time.
-//
-//          X - N * (P_1 + P_2 + P_3)
-//
-//     where P_1 and P_2 are 32-bit numbers (so multiplication by N
-//     is exact) and P_3 is a 53-bit number. Together, these
-//     approximate pi well enough for all cases in the restricted
-//     range.
-//
-//     The main reduction sequence is:
-//
-//             y = 32/pi * x
-//             N = integer(y)
-//     (computed by adding and subtracting off SHIFTER)
-//
-//             m_1 = N * P_1
-//             m_2 = N * P_2
-//             r_1 = x - m_1
-//             r = r_1 - m_2
-//     (this r can be used for most of the calculation)
-//
-//             c_1 = r_1 - r
-//             m_3 = N * P_3
-//             c_2 = c_1 - m_2
-//             c = c_2 - m_3
-//
-//     2. MAIN ALGORITHM
-//
-//     The algorithm uses a table lookup based on B = M * pi / 32
-//     where M = N mod 64. The stored values are:
-//       sigma             closest power of 2 to cos(B)
-//       C_hl              53-bit cos(B) - sigma
-//       S_hi + S_lo       2 * 53-bit sin(B)
-//
-//     The computation is organized as follows:
-//
-//          sin(B + r + c) = [sin(B) + sigma * r] +
-//                           r * (cos(B) - sigma) +
-//                           sin(B) * [cos(r + c) - 1] +
-//                           cos(B) * [sin(r + c) - r]
-//
-//     which is approximately:
-//
-//          [S_hi + sigma * r] +
-//          C_hl * r +
-//          S_lo + S_hi * [(cos(r) - 1) - r * c] +
-//          (C_hl + sigma) * [(sin(r) - r) + c]
-//
-//     and this is what is actually computed. We separate this sum
-//     into four parts:
-//
-//          hi + med + pols + corr
-//
-//     where
-//
-//          hi       = S_hi + sigma r
-//          med      = C_hl * r
-//          pols     = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r)
-//          corr     = S_lo + c * ((C_hl + sigma) - S_hi * r)
-//
-//     3. POLYNOMIAL
-//
-//     The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) *
-//     (sin(r) - r) can be rearranged freely, since it is quite
-//     small, so we exploit parallelism to the fullest.
-//
-//          psc4       =   SC_4 * r_1
-//          msc4       =   psc4 * r
-//          r2         =   r * r
-//          msc2       =   SC_2 * r2
-//          r4         =   r2 * r2
-//          psc3       =   SC_3 + msc4
-//          psc1       =   SC_1 + msc2
-//          msc3       =   r4 * psc3
-//          sincospols =   psc1 + msc3
-//          pols       =   sincospols *
-//                         <S_hi * r^2 | (C_hl + sigma) * r^3>
-//
-//     4. CORRECTION TERM
-//
-//     This is where the "c" component of the range reduction is
-//     taken into account; recall that just "r" is used for most of
-//     the calculation.
-//
-//          -c   = m_3 - c_2
-//          -d   = S_hi * r - (C_hl + sigma)
-//          corr = -c * -d + S_lo
-//
-//     5. COMPENSATED SUMMATIONS
-//
-//     The two successive compensated summations add up the high
-//     and medium parts, leaving just the low parts to add up at
-//     the end.
-//
-//          rs        =  sigma * r
-//          res_int   =  S_hi + rs
-//          k_0       =  S_hi - res_int
-//          k_2       =  k_0 + rs
-//          med       =  C_hl * r
-//          res_hi    =  res_int + med
-//          k_1       =  res_int - res_hi
-//          k_3       =  k_1 + med
-//
-//     6. FINAL SUMMATION
-//
-//     We now add up all the small parts:
-//
-//          res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3
-//
-//     Now the overall result is just:
-//
-//          res_hi + res_lo
-//
-//     7. SMALL ARGUMENTS
-//
-//     If |x| < SNN (SNN meaning the smallest normal number), we
-//     simply perform 0.1111111 cdots 1111 * x. For SNN <= |x|, we
-//     do 2^-55 * (2^55 * x - x).
-//
-// Special cases:
-//  sin(NaN) = quiet NaN, and raise invalid exception
-//  sin(INF) = NaN and raise invalid exception
-//  sin(+/-0) = +/-0
-//
-/******************************************************************************/
-
-ALIGNED_(16) juint _ONEHALF[] =
-{
-    0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
-};
-
-ALIGNED_(16) juint _P_2[] =
-{
-    0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
-};
-
-ALIGNED_(16) juint _SC_4[] =
-{
-    0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL
-};
-
-ALIGNED_(16) juint _Ctable[] =
-{
-    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL, 0xbf73b92eUL,
-    0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
-    0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL,
-    0xc0000000UL, 0xbc626d19UL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL,
-    0xbfa60beaUL, 0x2ed59f06UL, 0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL,
-    0x00000000UL, 0x3ff00000UL, 0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL,
-    0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL, 0x00000000UL, 0x3ff00000UL,
-    0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL, 0x20000000UL,
-    0x3c5e0d89UL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL, 0xbfc59267UL,
-    0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
-    0x3ff00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL,
-    0x20000000UL, 0x3c68076aUL, 0x00000000UL, 0x3ff00000UL, 0x99fcef32UL,
-    0x3fca8279UL, 0x667f3bcdUL, 0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL,
-    0x00000000UL, 0x3fe00000UL, 0x94247758UL, 0x3fc133ccUL, 0x6b151741UL,
-    0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL, 0x00000000UL, 0x3fe00000UL,
-    0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL, 0xe0000000UL,
-    0x3c39f630UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL, 0xbf9d4a2cUL,
-    0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
-    0x3fe00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0x3fed906bUL,
-    0x20000000UL, 0x3c7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x76acf82dUL,
-    0x3fa4a031UL, 0x56c62ddaUL, 0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL,
-    0x00000000UL, 0x3fd00000UL, 0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL,
-    0x3fef6297UL, 0x20000000UL, 0x3c756217UL, 0x00000000UL, 0x3fd00000UL,
-    0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL, 0x3fefd88dUL, 0x40000000UL,
-    0xbc887df6UL, 0x00000000UL, 0x3fc00000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0x3fefd88dUL,
-    0x40000000UL, 0xbc887df6UL, 0x00000000UL, 0xbfc00000UL, 0x0e5967d5UL,
-    0x3fac1d1fUL, 0xcff75cb0UL, 0x3fef6297UL, 0x20000000UL, 0x3c756217UL,
-    0x00000000UL, 0xbfd00000UL, 0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL,
-    0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL, 0x00000000UL, 0xbfd00000UL,
-    0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL, 0x3fed906bUL, 0x20000000UL,
-    0x3c7457e6UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL, 0x3f9d4a2cUL,
-    0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
-    0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL,
-    0xe0000000UL, 0x3c39f630UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL,
-    0xbfc133ccUL, 0x6b151741UL, 0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL,
-    0x00000000UL, 0xbfe00000UL, 0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL,
-    0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL, 0x00000000UL, 0xbfe00000UL,
-    0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL, 0x20000000UL,
-    0x3c68076aUL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL, 0x3fc59267UL,
-    0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
-    0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL,
-    0x20000000UL, 0x3c5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL,
-    0x3fb37ca1UL, 0xa6aea963UL, 0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL,
-    0x00000000UL, 0xbff00000UL, 0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL,
-    0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL, 0x00000000UL, 0xbff00000UL,
-    0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL, 0xc0000000UL,
-    0xbc626d19UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL, 0x3f73b92eUL,
-    0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
-    0xbff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL,
-    0x3f73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
-    0x00000000UL, 0xbff00000UL, 0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL,
-    0xbfc8f8b8UL, 0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0xbff00000UL,
-    0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL,
-    0x3c75d28dUL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL, 0x3fb37ca1UL,
-    0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL, 0x3c672cedUL, 0x00000000UL,
-    0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0xbfde2b5dUL,
-    0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL,
-    0x3fc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
-    0x00000000UL, 0xbff00000UL, 0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL,
-    0xbfe44cf3UL, 0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0xbff00000UL,
-    0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL,
-    0x3c8bdd34UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL, 0xbfc133ccUL,
-    0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL, 0x3c82c5e1UL, 0x00000000UL,
-    0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0xbfea9b66UL,
-    0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL,
-    0x3f9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
-    0x00000000UL, 0xbfe00000UL, 0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL,
-    0xbfed906bUL, 0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0xbfe00000UL,
-    0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL,
-    0xbc8760b1UL, 0x00000000UL, 0xbfd00000UL, 0x0e5967d5UL, 0x3fac1d1fUL,
-    0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL, 0xbc756217UL, 0x00000000UL,
-    0xbfd00000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0xbfefd88dUL,
-    0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0xbfc00000UL, 0x00000000UL,
-    0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x00000000UL, 0x00000000UL,
-    0x00000000UL, 0x00000000UL, 0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL,
-    0xbfefd88dUL, 0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0x3fc00000UL,
-    0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL,
-    0xbc756217UL, 0x00000000UL, 0x3fd00000UL, 0x76acf82dUL, 0x3fa4a031UL,
-    0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL, 0xbc8760b1UL, 0x00000000UL,
-    0x3fd00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0xbfed906bUL,
-    0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL,
-    0xbf9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
-    0x00000000UL, 0x3fe00000UL, 0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL,
-    0xbfea9b66UL, 0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0x3fe00000UL,
-    0x94247758UL, 0x3fc133ccUL, 0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL,
-    0x3c82c5e1UL, 0x00000000UL, 0x3fe00000UL, 0x99fcef32UL, 0x3fca8279UL,
-    0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL, 0x3c8bdd34UL, 0x00000000UL,
-    0x3fe00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0xbfe44cf3UL,
-    0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL,
-    0xbfc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
-    0x00000000UL, 0x3ff00000UL, 0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL,
-    0xbfde2b5dUL, 0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0x3ff00000UL,
-    0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL,
-    0x3c672cedUL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL, 0xbfa60beaUL,
-    0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL, 0x3c75d28dUL, 0x00000000UL,
-    0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0xbfc8f8b8UL,
-    0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL,
-    0xbf73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
-    0x00000000UL, 0x3ff00000UL
-};
-
-ALIGNED_(16) juint _SC_2[] =
-{
-    0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
-};
-
-ALIGNED_(16) juint _SC_3[] =
-{
-    0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
-};
-
-ALIGNED_(16) juint _SC_1[] =
-{
-    0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
-};
-
-ALIGNED_(16) juint _PI_INV_TABLE[] =
-{
-    0x00000000UL, 0x00000000UL, 0xa2f9836eUL, 0x4e441529UL, 0xfc2757d1UL,
-    0xf534ddc0UL, 0xdb629599UL, 0x3c439041UL, 0xfe5163abUL, 0xdebbc561UL,
-    0xb7246e3aUL, 0x424dd2e0UL, 0x06492eeaUL, 0x09d1921cUL, 0xfe1deb1cUL,
-    0xb129a73eUL, 0xe88235f5UL, 0x2ebb4484UL, 0xe99c7026UL, 0xb45f7e41UL,
-    0x3991d639UL, 0x835339f4UL, 0x9c845f8bUL, 0xbdf9283bUL, 0x1ff897ffUL,
-    0xde05980fUL, 0xef2f118bUL, 0x5a0a6d1fUL, 0x6d367ecfUL, 0x27cb09b7UL,
-    0x4f463f66UL, 0x9e5fea2dUL, 0x7527bac7UL, 0xebe5f17bUL, 0x3d0739f7UL,
-    0x8a5292eaUL, 0x6bfb5fb1UL, 0x1f8d5d08UL, 0x56033046UL, 0xfc7b6babUL,
-    0xf0cfbc21UL
-};
-
-ALIGNED_(8) juint _PI_4[] =
-{
-    0x40000000UL, 0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
-};
-
-ALIGNED_(8) juint _PI32INV[] =
-{
-    0x6dc9c883UL, 0x40245f30UL
-};
-
-ALIGNED_(8) juint _SHIFTER[] =
-{
-    0x00000000UL, 0x43380000UL
-};
-
-ALIGNED_(8) juint _SIGN_MASK[] =
-{
-    0x00000000UL, 0x80000000UL
-};
-
-ALIGNED_(8) juint _P_3[] =
-{
-    0x2e037073UL, 0x3b63198aUL
-};
-
-ALIGNED_(8) juint _ALL_ONES[] =
-{
-    0xffffffffUL, 0x3fefffffUL
-};
-
-ALIGNED_(8) juint _TWO_POW_55[] =
-{
-    0x00000000UL, 0x43600000UL
-};
-
-ALIGNED_(8) juint _TWO_POW_M55[] =
-{
-    0x00000000UL, 0x3c800000ULL
-};
-
-ALIGNED_(8) juint _P_1[] =
-{
-    0x54400000UL, 0x3fb921fbUL
-};
-
-ALIGNED_(8) juint _NEG_ZERO[] =
-{
-    0x00000000UL, 0x80000000UL
-};
-
-void MacroAssembler::fast_sin(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ebx, Register ecx, Register edx, Register tmp1, Register tmp2, Register tmp3, Register tmp4) {
-  Label L_2TAG_PACKET_0_0_1, L_2TAG_PACKET_1_0_1, L_2TAG_PACKET_2_0_1, L_2TAG_PACKET_3_0_1;
-  Label L_2TAG_PACKET_4_0_1, L_2TAG_PACKET_5_0_1, L_2TAG_PACKET_6_0_1, L_2TAG_PACKET_7_0_1;
-  Label L_2TAG_PACKET_8_0_1, L_2TAG_PACKET_9_0_1, L_2TAG_PACKET_10_0_1, L_2TAG_PACKET_11_0_1;
-  Label L_2TAG_PACKET_13_0_1, L_2TAG_PACKET_14_0_1;
-  Label L_2TAG_PACKET_12_0_1, B1_1, B1_2, B1_4, start;
-
-  assert_different_registers(tmp1, tmp2, tmp3, tmp4, eax, ebx, ecx, edx);
-  address ONEHALF = (address)_ONEHALF;
-  address P_2 = (address)_P_2;
-  address SC_4 = (address)_SC_4;
-  address Ctable = (address)_Ctable;
-  address SC_2 = (address)_SC_2;
-  address SC_3 = (address)_SC_3;
-  address SC_1 = (address)_SC_1;
-  address PI_INV_TABLE = (address)_PI_INV_TABLE;
-  address PI_4 = (address)_PI_4;
-  address PI32INV = (address)_PI32INV;
-  address SHIFTER = (address)_SHIFTER;
-  address SIGN_MASK = (address)_SIGN_MASK;
-  address P_3 = (address)_P_3;
-  address ALL_ONES = (address)_ALL_ONES;
-  address TWO_POW_55 = (address)_TWO_POW_55;
-  address TWO_POW_M55 = (address)_TWO_POW_M55;
-  address P_1 = (address)_P_1;
-  address NEG_ZERO = (address)_NEG_ZERO;
-
-  bind(start);
-  push(rbx);
-  subq(rsp, 16);
-  movsd(Address(rsp, 8), xmm0);
-  movl(eax, Address(rsp, 12));
-  movq(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x40245f30UL
-  movq(xmm2, ExternalAddress(SHIFTER));    //0x00000000UL, 0x43380000UL
-  andl(eax, 2147418112);
-  subl(eax, 808452096);
-  cmpl(eax, 281346048);
-  jcc(Assembler::above, L_2TAG_PACKET_0_0_1);
-  mulsd(xmm1, xmm0);
-  movdqu(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
-  movq(xmm4, ExternalAddress(SIGN_MASK));    //0x00000000UL, 0x80000000UL
-  pand(xmm4, xmm0);
-  por(xmm5, xmm4);
-  addpd(xmm1, xmm5);
-  cvttsd2sil(edx, xmm1);
-  cvtsi2sdl(xmm1, edx);
-  movdqu(xmm6, ExternalAddress(P_2));    //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
-  mov64(r8, 0x3fb921fb54400000);
-  movdq(xmm3, r8);
-  movdqu(xmm5, ExternalAddress(SC_4));    //0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL
-  pshufd(xmm4, xmm0, 68);
-  mulsd(xmm3, xmm1);
-  movddup(xmm1, xmm1);
-  andl(edx, 63);
-  shll(edx, 5);
-  lea(rax, ExternalAddress(Ctable));
-  addq(rax, rdx);
-  mulpd(xmm6, xmm1);
-  mulsd(xmm1, ExternalAddress(P_3));    //0x2e037073UL, 0x3b63198aUL
-  subsd(xmm4, xmm3);
-  movq(xmm7, Address(rax, 8));
-  subsd(xmm0, xmm3);
-  movddup(xmm3, xmm4);
-  subsd(xmm4, xmm6);
-  pshufd(xmm0, xmm0, 68);
-  movdqu(xmm2, Address(rax, 0));
-  mulpd(xmm5, xmm0);
-  subpd(xmm0, xmm6);
-  mulsd(xmm7, xmm4);
-  subsd(xmm3, xmm4);
-  mulpd(xmm5, xmm0);
-  mulpd(xmm0, xmm0);
-  subsd(xmm3, xmm6);
-  movdqu(xmm6, ExternalAddress(SC_2));    //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
-  subsd(xmm1, xmm3);
-  movq(xmm3, Address(rax, 24));
-  addsd(xmm2, xmm3);
-  subsd(xmm7, xmm2);
-  mulsd(xmm2, xmm4);
-  mulpd(xmm6, xmm0);
-  mulsd(xmm3, xmm4);
-  mulpd(xmm2, xmm0);
-  mulpd(xmm0, xmm0);
-  addpd(xmm5, ExternalAddress(SC_3));    //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
-  mulsd(xmm4, Address(rax, 0));
-  addpd(xmm6, ExternalAddress(SC_1));    //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
-  mulpd(xmm5, xmm0);
-  movdqu(xmm0, xmm3);
-  addsd(xmm3, Address(rax, 8));
-  mulpd(xmm1, xmm7);
-  movdqu(xmm7, xmm4);
-  addsd(xmm4, xmm3);
-  addpd(xmm6, xmm5);
-  movq(xmm5, Address(rax, 8));
-  subsd(xmm5, xmm3);
-  subsd(xmm3, xmm4);
-  addsd(xmm1, Address(rax, 16));
-  mulpd(xmm6, xmm2);
-  addsd(xmm5, xmm0);
-  addsd(xmm3, xmm7);
-  addsd(xmm1, xmm5);
-  addsd(xmm1, xmm3);
-  addsd(xmm1, xmm6);
-  unpckhpd(xmm6, xmm6);
-  movdqu(xmm0, xmm4);
-  addsd(xmm1, xmm6);
-  addsd(xmm0, xmm1);
-  jmp(B1_4);
-
-  bind(L_2TAG_PACKET_0_0_1);
-  jcc(Assembler::greater, L_2TAG_PACKET_1_0_1);
-  shrl(eax, 20);
-  cmpl(eax, 3325);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_2_0_1);
-  mulsd(xmm0, ExternalAddress(ALL_ONES));    //0xffffffffUL, 0x3fefffffUL
-  jmp(B1_4);
-
-  bind(L_2TAG_PACKET_2_0_1);
-  movq(xmm3, ExternalAddress(TWO_POW_55));    //0x00000000UL, 0x43600000UL
-  mulsd(xmm3, xmm0);
-  subsd(xmm3, xmm0);
-  mulsd(xmm3, ExternalAddress(TWO_POW_M55));    //0x00000000UL, 0x3c800000UL
-  jmp(B1_4);
-
-  bind(L_2TAG_PACKET_1_0_1);
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32752);
-  cmpl(eax, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_3_0_1);
-  pextrw(ecx, xmm0, 3);
-  andl(ecx, 32752);
-  subl(ecx, 16224);
-  shrl(ecx, 7);
-  andl(ecx, 65532);
-  lea(r11, ExternalAddress(PI_INV_TABLE));
-  addq(rcx, r11);
-  movdq(rax, xmm0);
-  movl(r10, Address(rcx, 20));
-  movl(r8, Address(rcx, 24));
-  movl(edx, eax);
-  shrq(rax, 21);
-  orl(eax, INT_MIN);
-  shrl(eax, 11);
-  movl(r9, r10);
-  imulq(r10, rdx);
-  imulq(r9, rax);
-  imulq(r8, rax);
-  movl(rsi, Address(rcx, 16));
-  movl(rdi, Address(rcx, 12));
-  movl(r11, r10);
-  shrq(r10, 32);
-  addq(r9, r10);
-  addq(r11, r8);
-  movl(r8, r11);
-  shrq(r11, 32);
-  addq(r9, r11);
-  movl(r10, rsi);
-  imulq(rsi, rdx);
-  imulq(r10, rax);
-  movl(r11, rdi);
-  imulq(rdi, rdx);
-  movl(ebx, rsi);
-  shrq(rsi, 32);
-  addq(r9, rbx);
-  movl(ebx, r9);
-  shrq(r9, 32);
-  addq(r10, rsi);
-  addq(r10, r9);
-  shlq(rbx, 32);
-  orq(r8, rbx);
-  imulq(r11, rax);
-  movl(r9, Address(rcx, 8));
-  movl(rsi, Address(rcx, 4));
-  movl(ebx, rdi);
-  shrq(rdi, 32);
-  addq(r10, rbx);
-  movl(ebx, r10);
-  shrq(r10, 32);
-  addq(r11, rdi);
-  addq(r11, r10);
-  movq(rdi, r9);
-  imulq(r9, rdx);
-  imulq(rdi, rax);
-  movl(r10, r9);
-  shrq(r9, 32);
-  addq(r11, r10);
-  movl(r10, r11);
-  shrq(r11, 32);
-  addq(rdi, r9);
-  addq(rdi, r11);
-  movq(r9, rsi);
-  imulq(rsi, rdx);
-  imulq(r9, rax);
-  shlq(r10, 32);
-  orq(r10, rbx);
-  movl(eax, Address(rcx, 0));
-  movl(r11, rsi);
-  shrq(rsi, 32);
-  addq(rdi, r11);
-  movl(r11, rdi);
-  shrq(rdi, 32);
-  addq(r9, rsi);
-  addq(r9, rdi);
-  imulq(rdx, rax);
-  pextrw(ebx, xmm0, 3);
-  lea(rdi, ExternalAddress(PI_INV_TABLE));
-  subq(rcx, rdi);
-  addl(ecx, ecx);
-  addl(ecx, ecx);
-  addl(ecx, ecx);
-  addl(ecx, 19);
-  movl(rsi, 32768);
-  andl(rsi, ebx);
-  shrl(ebx, 4);
-  andl(ebx, 2047);
-  subl(ebx, 1023);
-  subl(ecx, ebx);
-  addq(r9, rdx);
-  movl(edx, ecx);
-  addl(edx, 32);
-  cmpl(ecx, 1);
-  jcc(Assembler::less, L_2TAG_PACKET_4_0_1);
-  negl(ecx);
-  addl(ecx, 29);
-  shll(r9);
-  movl(rdi, r9);
-  andl(r9, 536870911);
-  testl(r9, 268435456);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_5_0_1);
-  shrl(r9);
-  movl(ebx, 0);
-  shlq(r9, 32);
-  orq(r9, r11);
-
-  bind(L_2TAG_PACKET_6_0_1);
-
-  bind(L_2TAG_PACKET_7_0_1);
-
-  cmpq(r9, 0);
-  jcc(Assembler::equal, L_2TAG_PACKET_8_0_1);
-
-  bind(L_2TAG_PACKET_9_0_1);
-  bsrq(r11, r9);
-  movl(ecx, 29);
-  subl(ecx, r11);
-  jcc(Assembler::lessEqual, L_2TAG_PACKET_10_0_1);
-  shlq(r9);
-  movq(rax, r10);
-  shlq(r10);
-  addl(edx, ecx);
-  negl(ecx);
-  addl(ecx, 64);
-  shrq(rax);
-  shrq(r8);
-  orq(r9, rax);
-  orq(r10, r8);
-
-  bind(L_2TAG_PACKET_11_0_1);
-  cvtsi2sdq(xmm0, r9);
-  shrq(r10, 1);
-  cvtsi2sdq(xmm3, r10);
-  xorpd(xmm4, xmm4);
-  shll(edx, 4);
-  negl(edx);
-  addl(edx, 16368);
-  orl(edx, rsi);
-  xorl(edx, ebx);
-  pinsrw(xmm4, edx, 3);
-  movq(xmm2, ExternalAddress(PI_4));    //0x40000000UL, 0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
-  movq(xmm6, ExternalAddress(8 + PI_4));    //0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
-  xorpd(xmm5, xmm5);
-  subl(edx, 1008);
-  pinsrw(xmm5, edx, 3);
-  mulsd(xmm0, xmm4);
-  shll(rsi, 16);
-  sarl(rsi, 31);
-  mulsd(xmm3, xmm5);
-  movdqu(xmm1, xmm0);
-  mulsd(xmm0, xmm2);
-  shrl(rdi, 29);
-  addsd(xmm1, xmm3);
-  mulsd(xmm3, xmm2);
-  addl(rdi, rsi);
-  xorl(rdi, rsi);
-  mulsd(xmm6, xmm1);
-  movl(eax, rdi);
-  addsd(xmm6, xmm3);
-  movdqu(xmm2, xmm0);
-  addsd(xmm0, xmm6);
-  subsd(xmm2, xmm0);
-  addsd(xmm6, xmm2);
-
-  bind(L_2TAG_PACKET_12_0_1);
-  movq(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x40245f30UL
-  mulsd(xmm1, xmm0);
-  movq(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
-  movq(xmm4, ExternalAddress(SIGN_MASK));    //0x00000000UL, 0x80000000UL
-  pand(xmm4, xmm0);
-  por(xmm5, xmm4);
-  addpd(xmm1, xmm5);
-  cvttsd2sil(edx, xmm1);
-  cvtsi2sdl(xmm1, edx);
-  movq(xmm3, ExternalAddress(P_1));    //0x54400000UL, 0x3fb921fbUL
-  movdqu(xmm2, ExternalAddress(P_2));    //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
-  mulsd(xmm3, xmm1);
-  unpcklpd(xmm1, xmm1);
-  shll(eax, 3);
-  addl(edx, 1865216);
-  movdqu(xmm4, xmm0);
-  addl(edx, eax);
-  andl(edx, 63);
-  movdqu(xmm5, ExternalAddress(SC_4));    //0x54400000UL, 0x3fb921fbUL
-  lea(rax, ExternalAddress(Ctable));
-  shll(edx, 5);
-  addq(rax, rdx);
-  mulpd(xmm2, xmm1);
-  subsd(xmm0, xmm3);
-  mulsd(xmm1, ExternalAddress(P_3));    //0x2e037073UL, 0x3b63198aUL
-  subsd(xmm4, xmm3);
-  movq(xmm7, Address(rax, 8));
-  unpcklpd(xmm0, xmm0);
-  movdqu(xmm3, xmm4);
-  subsd(xmm4, xmm2);
-  mulpd(xmm5, xmm0);
-  subpd(xmm0, xmm2);
-  mulsd(xmm7, xmm4);
-  subsd(xmm3, xmm4);
-  mulpd(xmm5, xmm0);
-  mulpd(xmm0, xmm0);
-  subsd(xmm3, xmm2);
-  movdqu(xmm2, Address(rax, 0));
-  subsd(xmm1, xmm3);
-  movq(xmm3, Address(rax, 24));
-  addsd(xmm2, xmm3);
-  subsd(xmm7, xmm2);
-  subsd(xmm1, xmm6);
-  movdqu(xmm6, ExternalAddress(SC_2));    //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
-  mulsd(xmm2, xmm4);
-  mulpd(xmm6, xmm0);
-  mulsd(xmm3, xmm4);
-  mulpd(xmm2, xmm0);
-  mulpd(xmm0, xmm0);
-  addpd(xmm5, ExternalAddress(SC_3));    //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
-  mulsd(xmm4, Address(rax, 0));
-  addpd(xmm6, ExternalAddress(SC_1));    //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
-  mulpd(xmm5, xmm0);
-  movdqu(xmm0, xmm3);
-  addsd(xmm3, Address(rax, 8));
-  mulpd(xmm1, xmm7);
-  movdqu(xmm7, xmm4);
-  addsd(xmm4, xmm3);
-  addpd(xmm6, xmm5);
-  movq(xmm5, Address(rax, 8));
-  subsd(xmm5, xmm3);
-  subsd(xmm3, xmm4);
-  addsd(xmm1, Address(rax, 16));
-  mulpd(xmm6, xmm2);
-  addsd(xmm5, xmm0);
-  addsd(xmm3, xmm7);
-  addsd(xmm1, xmm5);
-  addsd(xmm1, xmm3);
-  addsd(xmm1, xmm6);
-  unpckhpd(xmm6, xmm6);
-  movdqu(xmm0, xmm4);
-  addsd(xmm1, xmm6);
-  addsd(xmm0, xmm1);
-  jmp(B1_4);
-
-  bind(L_2TAG_PACKET_8_0_1);
-  addl(edx, 64);
-  movq(r9, r10);
-  movq(r10, r8);
-  movl(r8, 0);
-  cmpq(r9, 0);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_9_0_1);
-  addl(edx, 64);
-  movq(r9, r10);
-  movq(r10, r8);
-  cmpq(r9, 0);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_9_0_1);
-  xorpd(xmm0, xmm0);
-  xorpd(xmm6, xmm6);
-  jmp(L_2TAG_PACKET_12_0_1);
-
-  bind(L_2TAG_PACKET_10_0_1);
-  jcc(Assembler::equal, L_2TAG_PACKET_11_0_1);
-  negl(ecx);
-  shrq(r10);
-  movq(rax, r9);
-  shrq(r9);
-  subl(edx, ecx);
-  negl(ecx);
-  addl(ecx, 64);
-  shlq(rax);
-  orq(r10, rax);
-  jmp(L_2TAG_PACKET_11_0_1);
-
-  bind(L_2TAG_PACKET_4_0_1);
-  negl(ecx);
-  shlq(r9, 32);
-  orq(r9, r11);
-  shlq(r9);
-  movq(rdi, r9);
-  testl(r9, INT_MIN);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_13_0_1);
-  shrl(r9);
-  movl(ebx, 0);
-  shrq(rdi, 3);
-  jmp(L_2TAG_PACKET_7_0_1);
-
-  bind(L_2TAG_PACKET_5_0_1);
-  shrl(r9);
-  movl(ebx, 536870912);
-  shrl(ebx);
-  shlq(r9, 32);
-  orq(r9, r11);
-  shlq(rbx, 32);
-  addl(rdi, 536870912);
-  movl(rcx, 0);
-  movl(r11, 0);
-  subq(rcx, r8);
-  sbbq(r11, r10);
-  sbbq(rbx, r9);
-  movq(r8, rcx);
-  movq(r10, r11);
-  movq(r9, rbx);
-  movl(ebx, 32768);
-  jmp(L_2TAG_PACKET_6_0_1);
-
-  bind(L_2TAG_PACKET_13_0_1);
-  shrl(r9);
-  mov64(rbx, 0x100000000);
-  shrq(rbx);
-  movl(rcx, 0);
-  movl(r11, 0);
-  subq(rcx, r8);
-  sbbq(r11, r10);
-  sbbq(rbx, r9);
-  movq(r8, rcx);
-  movq(r10, r11);
-  movq(r9, rbx);
-  movl(ebx, 32768);
-  shrq(rdi, 3);
-  addl(rdi, 536870912);
-  jmp(L_2TAG_PACKET_7_0_1);
-
-  bind(L_2TAG_PACKET_3_0_1);
-  movq(xmm0, Address(rsp, 8));
-  mulsd(xmm0, ExternalAddress(NEG_ZERO));    //0x00000000UL, 0x80000000UL
-  movq(Address(rsp, 0), xmm0);
-
-  bind(L_2TAG_PACKET_14_0_1);
-
-  bind(B1_4);
-  addq(rsp, 16);
-  pop(rbx);
-}
-
-/******************************************************************************/
-//                     ALGORITHM DESCRIPTION - COS()
-//                     ---------------------
-//
-//     1. RANGE REDUCTION
-//
-//     We perform an initial range reduction from X to r with
-//
-//          X =~= N * pi/32 + r
-//
-//     so that |r| <= pi/64 + epsilon. We restrict inputs to those
-//     where |N| <= 932560. Beyond this, the range reduction is
-//     insufficiently accurate. For extremely small inputs,
-//     denormalization can occur internally, impacting performance.
-//     This means that the main path is actually only taken for
-//     2^-252 <= |X| < 90112.
-//
-//     To avoid branches, we perform the range reduction to full
-//     accuracy each time.
-//
-//          X - N * (P_1 + P_2 + P_3)
-//
-//     where P_1 and P_2 are 32-bit numbers (so multiplication by N
-//     is exact) and P_3 is a 53-bit number. Together, these
-//     approximate pi well enough for all cases in the restricted
-//     range.
-//
-//     The main reduction sequence is:
-//
-//             y = 32/pi * x
-//             N = integer(y)
-//     (computed by adding and subtracting off SHIFTER)
-//
-//             m_1 = N * P_1
-//             m_2 = N * P_2
-//             r_1 = x - m_1
-//             r = r_1 - m_2
-//     (this r can be used for most of the calculation)
-//
-//             c_1 = r_1 - r
-//             m_3 = N * P_3
-//             c_2 = c_1 - m_2
-//             c = c_2 - m_3
-//
-//     2. MAIN ALGORITHM
-//
-//     The algorithm uses a table lookup based on B = M * pi / 32
-//     where M = N mod 64. The stored values are:
-//       sigma             closest power of 2 to cos(B)
-//       C_hl              53-bit cos(B) - sigma
-//       S_hi + S_lo       2 * 53-bit sin(B)
-//
-//     The computation is organized as follows:
-//
-//          sin(B + r + c) = [sin(B) + sigma * r] +
-//                           r * (cos(B) - sigma) +
-//                           sin(B) * [cos(r + c) - 1] +
-//                           cos(B) * [sin(r + c) - r]
-//
-//     which is approximately:
-//
-//          [S_hi + sigma * r] +
-//          C_hl * r +
-//          S_lo + S_hi * [(cos(r) - 1) - r * c] +
-//          (C_hl + sigma) * [(sin(r) - r) + c]
-//
-//     and this is what is actually computed. We separate this sum
-//     into four parts:
-//
-//          hi + med + pols + corr
-//
-//     where
-//
-//          hi       = S_hi + sigma r
-//          med      = C_hl * r
-//          pols     = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r)
-//          corr     = S_lo + c * ((C_hl + sigma) - S_hi * r)
-//
-//     3. POLYNOMIAL
-//
-//     The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) *
-//     (sin(r) - r) can be rearranged freely, since it is quite
-//     small, so we exploit parallelism to the fullest.
-//
-//          psc4       =   SC_4 * r_1
-//          msc4       =   psc4 * r
-//          r2         =   r * r
-//          msc2       =   SC_2 * r2
-//          r4         =   r2 * r2
-//          psc3       =   SC_3 + msc4
-//          psc1       =   SC_1 + msc2
-//          msc3       =   r4 * psc3
-//          sincospols =   psc1 + msc3
-//          pols       =   sincospols *
-//                         <S_hi * r^2 | (C_hl + sigma) * r^3>
-//
-//     4. CORRECTION TERM
-//
-//     This is where the "c" component of the range reduction is
-//     taken into account; recall that just "r" is used for most of
-//     the calculation.
-//
-//          -c   = m_3 - c_2
-//          -d   = S_hi * r - (C_hl + sigma)
-//          corr = -c * -d + S_lo
-//
-//     5. COMPENSATED SUMMATIONS
-//
-//     The two successive compensated summations add up the high
-//     and medium parts, leaving just the low parts to add up at
-//     the end.
-//
-//          rs        =  sigma * r
-//          res_int   =  S_hi + rs
-//          k_0       =  S_hi - res_int
-//          k_2       =  k_0 + rs
-//          med       =  C_hl * r
-//          res_hi    =  res_int + med
-//          k_1       =  res_int - res_hi
-//          k_3       =  k_1 + med
-//
-//     6. FINAL SUMMATION
-//
-//     We now add up all the small parts:
-//
-//          res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3
-//
-//     Now the overall result is just:
-//
-//          res_hi + res_lo
-//
-//     7. SMALL ARGUMENTS
-//
-//     Inputs with |X| < 2^-252 are treated specially as
-//     1 - |x|.
-//
-// Special cases:
-//  cos(NaN) = quiet NaN, and raise invalid exception
-//  cos(INF) = NaN and raise invalid exception
-//  cos(0) = 1
-//
-/******************************************************************************/
-
-ALIGNED_(8) juint _ONE[] =
-{
-    0x00000000UL, 0x3ff00000UL
-};
-
-void MacroAssembler::fast_cos(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register r8, Register r9, Register r10, Register r11) {
-  Label L_2TAG_PACKET_0_0_1, L_2TAG_PACKET_1_0_1, L_2TAG_PACKET_2_0_1, L_2TAG_PACKET_3_0_1;
-  Label L_2TAG_PACKET_4_0_1, L_2TAG_PACKET_5_0_1, L_2TAG_PACKET_6_0_1, L_2TAG_PACKET_7_0_1;
-  Label L_2TAG_PACKET_8_0_1, L_2TAG_PACKET_9_0_1, L_2TAG_PACKET_10_0_1, L_2TAG_PACKET_11_0_1;
-  Label L_2TAG_PACKET_12_0_1, L_2TAG_PACKET_13_0_1, B1_2, B1_3, B1_4, B1_5, start;
-
-  assert_different_registers(r8, r9, r10, r11, eax, ecx, edx);
-
-  address ONEHALF = (address)_ONEHALF;
-  address P_2 = (address)_P_2;
-  address SC_4 = (address)_SC_4;
-  address Ctable = (address)_Ctable;
-  address SC_2 = (address)_SC_2;
-  address SC_3 = (address)_SC_3;
-  address SC_1 = (address)_SC_1;
-  address PI_INV_TABLE = (address)_PI_INV_TABLE;
-  address PI_4 = (address)_PI_4;
-  address PI32INV = (address)_PI32INV;
-  address SIGN_MASK = (address)_SIGN_MASK;
-  address P_1 = (address)_P_1;
-  address P_3 = (address)_P_3;
-  address ONE = (address)_ONE;
-  address NEG_ZERO = (address)_NEG_ZERO;
-
-  bind(start);
-  push(rbx);
-  subq(rsp, 16);
-  movsd(Address(rsp, 8), xmm0);
-
-  bind(B1_2);
-  movl(eax, Address(rsp, 12));
-  movq(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x40245f30UL
-  andl(eax, 2147418112);
-  subl(eax, 808452096);
-  cmpl(eax, 281346048);
-  jcc(Assembler::above, L_2TAG_PACKET_0_0_1);
-  mulsd(xmm1, xmm0);
-  movdqu(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
-  movq(xmm4, ExternalAddress(SIGN_MASK));    //0x00000000UL, 0x80000000UL
-  pand(xmm4, xmm0);
-  por(xmm5, xmm4);
-  addpd(xmm1, xmm5);
-  cvttsd2sil(edx, xmm1);
-  cvtsi2sdl(xmm1, edx);
-  movdqu(xmm2, ExternalAddress(P_2));    //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
-  movq(xmm3, ExternalAddress(P_1));    //0x54400000UL, 0x3fb921fbUL
-  mulsd(xmm3, xmm1);
-  unpcklpd(xmm1, xmm1);
-  addq(rdx, 1865232);
-  movdqu(xmm4, xmm0);
-  andq(rdx, 63);
-  movdqu(xmm5, ExternalAddress(SC_4));    //0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL
-  lea(rax, ExternalAddress(Ctable));
-  shlq(rdx, 5);
-  addq(rax, rdx);
-  mulpd(xmm2, xmm1);
-  subsd(xmm0, xmm3);
-  mulsd(xmm1, ExternalAddress(P_3));    //0x2e037073UL, 0x3b63198aUL
-  subsd(xmm4, xmm3);
-  movq(xmm7, Address(rax, 8));
-  unpcklpd(xmm0, xmm0);
-  movdqu(xmm3, xmm4);
-  subsd(xmm4, xmm2);
-  mulpd(xmm5, xmm0);
-  subpd(xmm0, xmm2);
-  movdqu(xmm6, ExternalAddress(SC_2));    //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
-  mulsd(xmm7, xmm4);
-  subsd(xmm3, xmm4);
-  mulpd(xmm5, xmm0);
-  mulpd(xmm0, xmm0);
-  subsd(xmm3, xmm2);
-  movdqu(xmm2, Address(rax, 0));
-  subsd(xmm1, xmm3);
-  movq(xmm3, Address(rax, 24));
-  addsd(xmm2, xmm3);
-  subsd(xmm7, xmm2);
-  mulsd(xmm2, xmm4);
-  mulpd(xmm6, xmm0);
-  mulsd(xmm3, xmm4);
-  mulpd(xmm2, xmm0);
-  mulpd(xmm0, xmm0);
-  addpd(xmm5, ExternalAddress(SC_3));    //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
-  mulsd(xmm4, Address(rax, 0));
-  addpd(xmm6, ExternalAddress(SC_1));    //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
-  mulpd(xmm5, xmm0);
-  movdqu(xmm0, xmm3);
-  addsd(xmm3, Address(rax, 8));
-  mulpd(xmm1, xmm7);
-  movdqu(xmm7, xmm4);
-  addsd(xmm4, xmm3);
-  addpd(xmm6, xmm5);
-  movq(xmm5, Address(rax, 8));
-  subsd(xmm5, xmm3);
-  subsd(xmm3, xmm4);
-  addsd(xmm1, Address(rax, 16));
-  mulpd(xmm6, xmm2);
-  addsd(xmm0, xmm5);
-  addsd(xmm3, xmm7);
-  addsd(xmm0, xmm1);
-  addsd(xmm0, xmm3);
-  addsd(xmm0, xmm6);
-  unpckhpd(xmm6, xmm6);
-  addsd(xmm0, xmm6);
-  addsd(xmm0, xmm4);
-  jmp(B1_4);
-
-  bind(L_2TAG_PACKET_0_0_1);
-  jcc(Assembler::greater, L_2TAG_PACKET_1_0_1);
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32767);
-  pinsrw(xmm0, eax, 3);
-  movq(xmm1, ExternalAddress(ONE));    //0x00000000UL, 0x3ff00000UL
-  subsd(xmm1, xmm0);
-  movdqu(xmm0, xmm1);
-  jmp(B1_4);
-
-  bind(L_2TAG_PACKET_1_0_1);
-  pextrw(eax, xmm0, 3);
-  andl(eax, 32752);
-  cmpl(eax, 32752);
-  jcc(Assembler::equal, L_2TAG_PACKET_2_0_1);
-  pextrw(ecx, xmm0, 3);
-  andl(ecx, 32752);
-  subl(ecx, 16224);
-  shrl(ecx, 7);
-  andl(ecx, 65532);
-  lea(r11, ExternalAddress(PI_INV_TABLE));
-  addq(rcx, r11);
-  movdq(rax, xmm0);
-  movl(r10, Address(rcx, 20));
-  movl(r8, Address(rcx, 24));
-  movl(edx, eax);
-  shrq(rax, 21);
-  orl(eax, INT_MIN);
-  shrl(eax, 11);
-  movl(r9, r10);
-  imulq(r10, rdx);
-  imulq(r9, rax);
-  imulq(r8, rax);
-  movl(rsi, Address(rcx, 16));
-  movl(rdi, Address(rcx, 12));
-  movl(r11, r10);
-  shrq(r10, 32);
-  addq(r9, r10);
-  addq(r11, r8);
-  movl(r8, r11);
-  shrq(r11, 32);
-  addq(r9, r11);
-  movl(r10, rsi);
-  imulq(rsi, rdx);
-  imulq(r10, rax);
-  movl(r11, rdi);
-  imulq(rdi, rdx);
-  movl(rbx, rsi);
-  shrq(rsi, 32);
-  addq(r9, rbx);
-  movl(rbx, r9);
-  shrq(r9, 32);
-  addq(r10, rsi);
-  addq(r10, r9);
-  shlq(rbx, 32);
-  orq(r8, rbx);
-  imulq(r11, rax);
-  movl(r9, Address(rcx, 8));
-  movl(rsi, Address(rcx, 4));
-  movl(rbx, rdi);
-  shrq(rdi, 32);
-  addq(r10, rbx);
-  movl(rbx, r10);
-  shrq(r10, 32);
-  addq(r11, rdi);
-  addq(r11, r10);
-  movq(rdi, r9);
-  imulq(r9, rdx);
-  imulq(rdi, rax);
-  movl(r10, r9);
-  shrq(r9, 32);
-  addq(r11, r10);
-  movl(r10, r11);
-  shrq(r11, 32);
-  addq(rdi, r9);
-  addq(rdi, r11);
-  movq(r9, rsi);
-  imulq(rsi, rdx);
-  imulq(r9, rax);
-  shlq(r10, 32);
-  orq(r10, rbx);
-  movl(eax, Address(rcx, 0));
-  movl(r11, rsi);
-  shrq(rsi, 32);
-  addq(rdi, r11);
-  movl(r11, rdi);
-  shrq(rdi, 32);
-  addq(r9, rsi);
-  addq(r9, rdi);
-  imulq(rdx, rax);
-  pextrw(rbx, xmm0, 3);
-  lea(rdi, ExternalAddress(PI_INV_TABLE));
-  subq(rcx, rdi);
-  addl(ecx, ecx);
-  addl(ecx, ecx);
-  addl(ecx, ecx);
-  addl(ecx, 19);
-  movl(rsi, 32768);
-  andl(rsi, rbx);
-  shrl(rbx, 4);
-  andl(rbx, 2047);
-  subl(rbx, 1023);
-  subl(ecx, rbx);
-  addq(r9, rdx);
-  movl(edx, ecx);
-  addl(edx, 32);
-  cmpl(ecx, 1);
-  jcc(Assembler::less, L_2TAG_PACKET_3_0_1);
-  negl(ecx);
-  addl(ecx, 29);
-  shll(r9);
-  movl(rdi, r9);
-  andl(r9, 536870911);
-  testl(r9, 268435456);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_4_0_1);
-  shrl(r9);
-  movl(rbx, 0);
-  shlq(r9, 32);
-  orq(r9, r11);
-
-  bind(L_2TAG_PACKET_5_0_1);
-
-  bind(L_2TAG_PACKET_6_0_1);
-  cmpq(r9, 0);
-  jcc(Assembler::equal, L_2TAG_PACKET_7_0_1);
-
-  bind(L_2TAG_PACKET_8_0_1);
-  bsrq(r11, r9);
-  movl(ecx, 29);
-  subl(ecx, r11);
-  jcc(Assembler::lessEqual, L_2TAG_PACKET_9_0_1);
-  shlq(r9);
-  movq(rax, r10);
-  shlq(r10);
-  addl(edx, ecx);
-  negl(ecx);
-  addl(ecx, 64);
-  shrq(rax);
-  shrq(r8);
-  orq(r9, rax);
-  orq(r10, r8);
-
-  bind(L_2TAG_PACKET_10_0_1);
-  cvtsi2sdq(xmm0, r9);
-  shrq(r10, 1);
-  cvtsi2sdq(xmm3, r10);
-  xorpd(xmm4, xmm4);
-  shll(edx, 4);
-  negl(edx);
-  addl(edx, 16368);
-  orl(edx, rsi);
-  xorl(edx, rbx);
-  pinsrw(xmm4, edx, 3);
-  movq(xmm2, ExternalAddress(PI_4));    //0x40000000UL, 0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
-  movq(xmm6, ExternalAddress(8 + PI_4));    //0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
-  xorpd(xmm5, xmm5);
-  subl(edx, 1008);
-  pinsrw(xmm5, edx, 3);
-  mulsd(xmm0, xmm4);
-  shll(rsi, 16);
-  sarl(rsi, 31);
-  mulsd(xmm3, xmm5);
-  movdqu(xmm1, xmm0);
-  mulsd(xmm0, xmm2);
-  shrl(rdi, 29);
-  addsd(xmm1, xmm3);
-  mulsd(xmm3, xmm2);
-  addl(rdi, rsi);
-  xorl(rdi, rsi);
-  mulsd(xmm6, xmm1);
-  movl(eax, rdi);
-  addsd(xmm6, xmm3);
-  movdqu(xmm2, xmm0);
-  addsd(xmm0, xmm6);
-  subsd(xmm2, xmm0);
-  addsd(xmm6, xmm2);
-
-  bind(L_2TAG_PACKET_11_0_1);
-  movq(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x40245f30UL
-  mulsd(xmm1, xmm0);
-  movq(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
-  movq(xmm4, ExternalAddress(SIGN_MASK));    //0x00000000UL, 0x80000000UL
-  pand(xmm4, xmm0);
-  por(xmm5, xmm4);
-  addpd(xmm1, xmm5);
-  cvttsd2siq(rdx, xmm1);
-  cvtsi2sdq(xmm1, rdx);
-  movq(xmm3, ExternalAddress(P_1));    //0x54400000UL, 0x3fb921fbUL
-  movdqu(xmm2, ExternalAddress(P_2));    //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
-  mulsd(xmm3, xmm1);
-  unpcklpd(xmm1, xmm1);
-  shll(eax, 3);
-  addl(edx, 1865232);
-  movdqu(xmm4, xmm0);
-  addl(edx, eax);
-  andl(edx, 63);
-  movdqu(xmm5, ExternalAddress(SC_4));    //0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL
-  lea(rax, ExternalAddress(Ctable));
-  shll(edx, 5);
-  addq(rax, rdx);
-  mulpd(xmm2, xmm1);
-  subsd(xmm0, xmm3);
-  mulsd(xmm1, ExternalAddress(P_3));    //0x2e037073UL, 0x3b63198aUL
-  subsd(xmm4, xmm3);
-  movq(xmm7, Address(rax, 8));
-  unpcklpd(xmm0, xmm0);
-  movdqu(xmm3, xmm4);
-  subsd(xmm4, xmm2);
-  mulpd(xmm5, xmm0);
-  subpd(xmm0, xmm2);
-  mulsd(xmm7, xmm4);
-  subsd(xmm3, xmm4);
-  mulpd(xmm5, xmm0);
-  mulpd(xmm0, xmm0);
-  subsd(xmm3, xmm2);
-  movdqu(xmm2, Address(rax, 0));
-  subsd(xmm1, xmm3);
-  movq(xmm3, Address(rax, 24));
-  addsd(xmm2, xmm3);
-  subsd(xmm7, xmm2);
-  subsd(xmm1, xmm6);
-  movdqu(xmm6, ExternalAddress(SC_2));    //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
-  mulsd(xmm2, xmm4);
-  mulpd(xmm6, xmm0);
-  mulsd(xmm3, xmm4);
-  mulpd(xmm2, xmm0);
-  mulpd(xmm0, xmm0);
-  addpd(xmm5, ExternalAddress(SC_3));    //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
-  mulsd(xmm4, Address(rax, 0));
-  addpd(xmm6, ExternalAddress(SC_1));    //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
-  mulpd(xmm5, xmm0);
-  movdqu(xmm0, xmm3);
-  addsd(xmm3, Address(rax, 8));
-  mulpd(xmm1, xmm7);
-  movdqu(xmm7, xmm4);
-  addsd(xmm4, xmm3);
-  addpd(xmm6, xmm5);
-  movq(xmm5, Address(rax, 8));
-  subsd(xmm5, xmm3);
-  subsd(xmm3, xmm4);
-  addsd(xmm1, Address(rax, 16));
-  mulpd(xmm6, xmm2);
-  addsd(xmm5, xmm0);
-  addsd(xmm3, xmm7);
-  addsd(xmm1, xmm5);
-  addsd(xmm1, xmm3);
-  addsd(xmm1, xmm6);
-  unpckhpd(xmm6, xmm6);
-  movdqu(xmm0, xmm4);
-  addsd(xmm1, xmm6);
-  addsd(xmm0, xmm1);
-  jmp(B1_4);
-
-  bind(L_2TAG_PACKET_7_0_1);
-  addl(edx, 64);
-  movq(r9, r10);
-  movq(r10, r8);
-  movl(r8, 0);
-  cmpq(r9, 0);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_8_0_1);
-  addl(edx, 64);
-  movq(r9, r10);
-  movq(r10, r8);
-  cmpq(r9, 0);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_8_0_1);
-  xorpd(xmm0, xmm0);
-  xorpd(xmm6, xmm6);
-  jmp(L_2TAG_PACKET_11_0_1);
-
-  bind(L_2TAG_PACKET_9_0_1);
-  jcc(Assembler::equal, L_2TAG_PACKET_10_0_1);
-  negl(ecx);
-  shrq(r10);
-  movq(rax, r9);
-  shrq(r9);
-  subl(edx, ecx);
-  negl(ecx);
-  addl(ecx, 64);
-  shlq(rax);
-  orq(r10, rax);
-  jmp(L_2TAG_PACKET_10_0_1);
-  bind(L_2TAG_PACKET_3_0_1);
-  negl(ecx);
-  shlq(r9, 32);
-  orq(r9, r11);
-  shlq(r9);
-  movq(rdi, r9);
-  testl(r9, INT_MIN);
-  jcc(Assembler::notEqual, L_2TAG_PACKET_12_0_1);
-  shrl(r9);
-  movl(rbx, 0);
-  shrq(rdi, 3);
-  jmp(L_2TAG_PACKET_6_0_1);
-
-  bind(L_2TAG_PACKET_4_0_1);
-  shrl(r9);
-  movl(rbx, 536870912);
-  shrl(rbx);
-  shlq(r9, 32);
-  orq(r9, r11);
-  shlq(rbx, 32);
-  addl(rdi, 536870912);
-  movl(rcx, 0);
-  movl(r11, 0);
-  subq(rcx, r8);
-  sbbq(r11, r10);
-  sbbq(rbx, r9);
-  movq(r8, rcx);
-  movq(r10, r11);
-  movq(r9, rbx);
-  movl(rbx, 32768);
-  jmp(L_2TAG_PACKET_5_0_1);
-
-  bind(L_2TAG_PACKET_12_0_1);
-  shrl(r9);
-  mov64(rbx, 0x100000000);
-  shrq(rbx);
-  movl(rcx, 0);
-  movl(r11, 0);
-  subq(rcx, r8);
-  sbbq(r11, r10);
-  sbbq(rbx, r9);
-  movq(r8, rcx);
-  movq(r10, r11);
-  movq(r9, rbx);
-  movl(rbx, 32768);
-  shrq(rdi, 3);
-  addl(rdi, 536870912);
-  jmp(L_2TAG_PACKET_6_0_1);
-
-  bind(L_2TAG_PACKET_2_0_1);
-  movsd(xmm0, Address(rsp, 8));
-  mulsd(xmm0, ExternalAddress(NEG_ZERO));    //0x00000000UL, 0x80000000UL
-  movq(Address(rsp, 0), xmm0);
-
-  bind(L_2TAG_PACKET_13_0_1);
-
-  bind(B1_4);
-  addq(rsp, 16);
-  pop(rbx);
-}
--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -3399,6 +3399,18 @@
   }
 }
 
+void MacroAssembler::setvectmask(Register dst, Register src) {
+  Assembler::movl(dst, 1);
+  Assembler::shlxl(dst, dst, src);
+  Assembler::decl(dst);
+  Assembler::kmovdl(k1, dst);
+  Assembler::movl(dst, src);
+}
+
+void MacroAssembler::restorevectmask() {
+  Assembler::knotwl(k1, k0);
+}
+
 void MacroAssembler::movdbl(XMMRegister dst, AddressLiteral src) {
   if (reachable(src)) {
     if (UseXmmLoadAndClearUpper) {
@@ -6693,6 +6705,14 @@
 #endif // _LP64
 }
 
+void MacroAssembler::load_mirror(Register mirror, Register method) {
+  // get mirror
+  const int mirror_offset = in_bytes(Klass::java_mirror_offset());
+  movptr(mirror, Address(method, Method::const_offset()));
+  movptr(mirror, Address(mirror, ConstMethod::constants_offset()));
+  movptr(mirror, Address(mirror, ConstantPool::pool_holder_offset_in_bytes()));
+  movptr(mirror, Address(mirror, mirror_offset));
+}
 
 void MacroAssembler::load_klass(Register dst, Register src) {
 #ifdef _LP64
--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -156,6 +156,10 @@
   void incrementq(Register reg, int value = 1);
   void incrementq(Address dst, int value = 1);
 
+  // special instructions for EVEX
+  void setvectmask(Register dst, Register src);
+  void restorevectmask();
+
   // Support optimal SSE move instructions.
   void movflt(XMMRegister dst, XMMRegister src) {
     if (UseXmmRegToRegMoveAll) { movaps(dst, src); return; }
@@ -319,6 +323,8 @@
   void movbool(Address dst, Register src);
   void testbool(Register dst);
 
+  void load_mirror(Register mirror, Register method);
+
   // oop manipulations
   void load_klass(Register dst, Register src);
   void store_klass(Register dst, Register src);
@@ -928,6 +934,10 @@
                 XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7,
                 Register rax, Register rcx, Register rdx, Register tmp1, Register tmp2);
 
+  void fast_log10(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3,
+                  XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7,
+                  Register rax, Register rcx, Register rdx, Register r11);
+
   void fast_pow(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4,
                 XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register rax, Register rcx,
                 Register rdx, Register tmp1, Register tmp2, Register tmp3, Register tmp4);
@@ -941,11 +951,19 @@
                 XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7,
                 Register rax, Register rcx, Register rdx, Register tmp1,
                 Register tmp2, Register tmp3, Register tmp4);
+  void fast_tan(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3,
+                XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7,
+                Register rax, Register rcx, Register rdx, Register tmp1,
+                Register tmp2, Register tmp3, Register tmp4);
 #else
   void fast_log(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3,
                 XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7,
                 Register rax, Register rcx, Register rdx, Register tmp1);
 
+  void fast_log10(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3,
+                XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7,
+                Register rax, Register rcx, Register rdx, Register tmp);
+
   void fast_pow(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4,
                 XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register rax, Register rcx,
                 Register rdx, Register tmp);
@@ -964,6 +982,14 @@
 
   void libm_reduce_pi04l(Register eax, Register ecx, Register edx, Register ebx,
                          Register esi, Register edi, Register ebp, Register esp);
+
+  void libm_tancot_huge(XMMRegister xmm0, XMMRegister xmm1, Register eax, Register ecx,
+                        Register edx, Register ebx, Register esi, Register edi,
+                        Register ebp, Register esp);
+
+  void fast_tan(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3,
+                XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7,
+                Register rax, Register rcx, Register rdx, Register tmp);
 #endif
 
   void increase_precision();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86_cos.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,889 @@
+/*
+* Copyright (c) 2016, Intel Corporation.
+* Intel Math Library (LIBM) Source Code
+*
+* 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.
+*
+*/
+
+#include "precompiled.hpp"
+#include "asm/assembler.hpp"
+#include "asm/assembler.inline.hpp"
+#include "runtime/stubRoutines.hpp"
+#include "macroAssembler_x86.hpp"
+
+#ifdef _MSC_VER
+#define ALIGNED_(x) __declspec(align(x))
+#else
+#define ALIGNED_(x) __attribute__ ((aligned(x)))
+#endif
+
+/******************************************************************************/
+//                     ALGORITHM DESCRIPTION - COS()
+//                     ---------------------
+//
+//     1. RANGE REDUCTION
+//
+//     We perform an initial range reduction from X to r with
+//
+//          X =~= N * pi/32 + r
+//
+//     so that |r| <= pi/64 + epsilon. We restrict inputs to those
+//     where |N| <= 932560. Beyond this, the range reduction is
+//     insufficiently accurate. For extremely small inputs,
+//     denormalization can occur internally, impacting performance.
+//     This means that the main path is actually only taken for
+//     2^-252 <= |X| < 90112.
+//
+//     To avoid branches, we perform the range reduction to full
+//     accuracy each time.
+//
+//          X - N * (P_1 + P_2 + P_3)
+//
+//     where P_1 and P_2 are 32-bit numbers (so multiplication by N
+//     is exact) and P_3 is a 53-bit number. Together, these
+//     approximate pi well enough for all cases in the restricted
+//     range.
+//
+//     The main reduction sequence is:
+//
+//             y = 32/pi * x
+//             N = integer(y)
+//     (computed by adding and subtracting off SHIFTER)
+//
+//             m_1 = N * P_1
+//             m_2 = N * P_2
+//             r_1 = x - m_1
+//             r = r_1 - m_2
+//     (this r can be used for most of the calculation)
+//
+//             c_1 = r_1 - r
+//             m_3 = N * P_3
+//             c_2 = c_1 - m_2
+//             c = c_2 - m_3
+//
+//     2. MAIN ALGORITHM
+//
+//     The algorithm uses a table lookup based on B = M * pi / 32
+//     where M = N mod 64. The stored values are:
+//       sigma             closest power of 2 to cos(B)
+//       C_hl              53-bit cos(B) - sigma
+//       S_hi + S_lo       2 * 53-bit sin(B)
+//
+//     The computation is organized as follows:
+//
+//          sin(B + r + c) = [sin(B) + sigma * r] +
+//                           r * (cos(B) - sigma) +
+//                           sin(B) * [cos(r + c) - 1] +
+//                           cos(B) * [sin(r + c) - r]
+//
+//     which is approximately:
+//
+//          [S_hi + sigma * r] +
+//          C_hl * r +
+//          S_lo + S_hi * [(cos(r) - 1) - r * c] +
+//          (C_hl + sigma) * [(sin(r) - r) + c]
+//
+//     and this is what is actually computed. We separate this sum
+//     into four parts:
+//
+//          hi + med + pols + corr
+//
+//     where
+//
+//          hi       = S_hi + sigma r
+//          med      = C_hl * r
+//          pols     = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r)
+//          corr     = S_lo + c * ((C_hl + sigma) - S_hi * r)
+//
+//     3. POLYNOMIAL
+//
+//     The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) *
+//     (sin(r) - r) can be rearranged freely, since it is quite
+//     small, so we exploit parallelism to the fullest.
+//
+//          psc4       =   SC_4 * r_1
+//          msc4       =   psc4 * r
+//          r2         =   r * r
+//          msc2       =   SC_2 * r2
+//          r4         =   r2 * r2
+//          psc3       =   SC_3 + msc4
+//          psc1       =   SC_1 + msc2
+//          msc3       =   r4 * psc3
+//          sincospols =   psc1 + msc3
+//          pols       =   sincospols *
+//                         <S_hi * r^2 | (C_hl + sigma) * r^3>
+//
+//     4. CORRECTION TERM
+//
+//     This is where the "c" component of the range reduction is
+//     taken into account; recall that just "r" is used for most of
+//     the calculation.
+//
+//          -c   = m_3 - c_2
+//          -d   = S_hi * r - (C_hl + sigma)
+//          corr = -c * -d + S_lo
+//
+//     5. COMPENSATED SUMMATIONS
+//
+//     The two successive compensated summations add up the high
+//     and medium parts, leaving just the low parts to add up at
+//     the end.
+//
+//          rs        =  sigma * r
+//          res_int   =  S_hi + rs
+//          k_0       =  S_hi - res_int
+//          k_2       =  k_0 + rs
+//          med       =  C_hl * r
+//          res_hi    =  res_int + med
+//          k_1       =  res_int - res_hi
+//          k_3       =  k_1 + med
+//
+//     6. FINAL SUMMATION
+//
+//     We now add up all the small parts:
+//
+//          res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3
+//
+//     Now the overall result is just:
+//
+//          res_hi + res_lo
+//
+//     7. SMALL ARGUMENTS
+//
+//     Inputs with |X| < 2^-252 are treated specially as
+//     1 - |x|.
+//
+// Special cases:
+//  cos(NaN) = quiet NaN, and raise invalid exception
+//  cos(INF) = NaN and raise invalid exception
+//  cos(0) = 1
+//
+/******************************************************************************/
+
+#ifdef _LP64
+// The 64 bit code is at most SSE2 compliant
+ALIGNED_(8) juint _ONE[] =
+{
+    0x00000000UL, 0x3ff00000UL
+};
+void MacroAssembler::fast_cos(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register r8, Register r9, Register r10, Register r11) {
+
+  Label L_2TAG_PACKET_0_0_1, L_2TAG_PACKET_1_0_1, L_2TAG_PACKET_2_0_1, L_2TAG_PACKET_3_0_1;
+  Label L_2TAG_PACKET_4_0_1, L_2TAG_PACKET_5_0_1, L_2TAG_PACKET_6_0_1, L_2TAG_PACKET_7_0_1;
+  Label L_2TAG_PACKET_8_0_1, L_2TAG_PACKET_9_0_1, L_2TAG_PACKET_10_0_1, L_2TAG_PACKET_11_0_1;
+  Label L_2TAG_PACKET_12_0_1, L_2TAG_PACKET_13_0_1, B1_2, B1_3, B1_4, B1_5, start;
+
+  assert_different_registers(r8, r9, r10, r11, eax, ecx, edx);
+
+  address ONEHALF = StubRoutines::x86::_ONEHALF_addr();
+  address P_2 = StubRoutines::x86::_P_2_addr();
+  address SC_4 = StubRoutines::x86::_SC_4_addr();
+  address Ctable = StubRoutines::x86::_Ctable_addr();
+  address SC_2 = StubRoutines::x86::_SC_2_addr();
+  address SC_3 = StubRoutines::x86::_SC_3_addr();
+  address SC_1 = StubRoutines::x86::_SC_1_addr();
+  address PI_INV_TABLE = StubRoutines::x86::_PI_INV_TABLE_addr();
+  address PI_4 = (address)StubRoutines::x86::_PI_4_addr();
+  address PI32INV = (address)StubRoutines::x86::_PI32INV_addr();
+  address SIGN_MASK = (address)StubRoutines::x86::_SIGN_MASK_addr();
+  address P_1 = (address)StubRoutines::x86::_P_1_addr();
+  address P_3 = (address)StubRoutines::x86::_P_3_addr();
+  address ONE = (address)_ONE;
+  address NEG_ZERO = (address)StubRoutines::x86::_NEG_ZERO_addr();
+
+  bind(start);
+  push(rbx);
+  subq(rsp, 16);
+  movsd(Address(rsp, 8), xmm0);
+
+  bind(B1_2);
+  movl(eax, Address(rsp, 12));
+  movq(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x40245f30UL
+  andl(eax, 2147418112);
+  subl(eax, 808452096);
+  cmpl(eax, 281346048);
+  jcc(Assembler::above, L_2TAG_PACKET_0_0_1);
+  mulsd(xmm1, xmm0);
+  movdqu(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
+  movq(xmm4, ExternalAddress(SIGN_MASK));    //0x00000000UL, 0x80000000UL
+  pand(xmm4, xmm0);
+  por(xmm5, xmm4);
+  addpd(xmm1, xmm5);
+  cvttsd2sil(edx, xmm1);
+  cvtsi2sdl(xmm1, edx);
+  movdqu(xmm2, ExternalAddress(P_2));    //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
+  movq(xmm3, ExternalAddress(P_1));    //0x54400000UL, 0x3fb921fbUL
+  mulsd(xmm3, xmm1);
+  unpcklpd(xmm1, xmm1);
+  addq(rdx, 1865232);
+  movdqu(xmm4, xmm0);
+  andq(rdx, 63);
+  movdqu(xmm5, ExternalAddress(SC_4));    //0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL
+  lea(rax, ExternalAddress(Ctable));
+  shlq(rdx, 5);
+  addq(rax, rdx);
+  mulpd(xmm2, xmm1);
+  subsd(xmm0, xmm3);
+  mulsd(xmm1, ExternalAddress(P_3));    //0x2e037073UL, 0x3b63198aUL
+  subsd(xmm4, xmm3);
+  movq(xmm7, Address(rax, 8));
+  unpcklpd(xmm0, xmm0);
+  movdqu(xmm3, xmm4);
+  subsd(xmm4, xmm2);
+  mulpd(xmm5, xmm0);
+  subpd(xmm0, xmm2);
+  movdqu(xmm6, ExternalAddress(SC_2));    //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
+  mulsd(xmm7, xmm4);
+  subsd(xmm3, xmm4);
+  mulpd(xmm5, xmm0);
+  mulpd(xmm0, xmm0);
+  subsd(xmm3, xmm2);
+  movdqu(xmm2, Address(rax, 0));
+  subsd(xmm1, xmm3);
+  movq(xmm3, Address(rax, 24));
+  addsd(xmm2, xmm3);
+  subsd(xmm7, xmm2);
+  mulsd(xmm2, xmm4);
+  mulpd(xmm6, xmm0);
+  mulsd(xmm3, xmm4);
+  mulpd(xmm2, xmm0);
+  mulpd(xmm0, xmm0);
+  addpd(xmm5, ExternalAddress(SC_3));    //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
+  mulsd(xmm4, Address(rax, 0));
+  addpd(xmm6, ExternalAddress(SC_1));    //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
+  mulpd(xmm5, xmm0);
+  movdqu(xmm0, xmm3);
+  addsd(xmm3, Address(rax, 8));
+  mulpd(xmm1, xmm7);
+  movdqu(xmm7, xmm4);
+  addsd(xmm4, xmm3);
+  addpd(xmm6, xmm5);
+  movq(xmm5, Address(rax, 8));
+  subsd(xmm5, xmm3);
+  subsd(xmm3, xmm4);
+  addsd(xmm1, Address(rax, 16));
+  mulpd(xmm6, xmm2);
+  addsd(xmm0, xmm5);
+  addsd(xmm3, xmm7);
+  addsd(xmm0, xmm1);
+  addsd(xmm0, xmm3);
+  addsd(xmm0, xmm6);
+  unpckhpd(xmm6, xmm6);
+  addsd(xmm0, xmm6);
+  addsd(xmm0, xmm4);
+  jmp(B1_4);
+
+  bind(L_2TAG_PACKET_0_0_1);
+  jcc(Assembler::greater, L_2TAG_PACKET_1_0_1);
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32767);
+  pinsrw(xmm0, eax, 3);
+  movq(xmm1, ExternalAddress(ONE));    //0x00000000UL, 0x3ff00000UL
+  subsd(xmm1, xmm0);
+  movdqu(xmm0, xmm1);
+  jmp(B1_4);
+
+  bind(L_2TAG_PACKET_1_0_1);
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32752);
+  cmpl(eax, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_2_0_1);
+  pextrw(ecx, xmm0, 3);
+  andl(ecx, 32752);
+  subl(ecx, 16224);
+  shrl(ecx, 7);
+  andl(ecx, 65532);
+  lea(r11, ExternalAddress(PI_INV_TABLE));
+  addq(rcx, r11);
+  movdq(rax, xmm0);
+  movl(r10, Address(rcx, 20));
+  movl(r8, Address(rcx, 24));
+  movl(edx, eax);
+  shrq(rax, 21);
+  orl(eax, INT_MIN);
+  shrl(eax, 11);
+  movl(r9, r10);
+  imulq(r10, rdx);
+  imulq(r9, rax);
+  imulq(r8, rax);
+  movl(rsi, Address(rcx, 16));
+  movl(rdi, Address(rcx, 12));
+  movl(r11, r10);
+  shrq(r10, 32);
+  addq(r9, r10);
+  addq(r11, r8);
+  movl(r8, r11);
+  shrq(r11, 32);
+  addq(r9, r11);
+  movl(r10, rsi);
+  imulq(rsi, rdx);
+  imulq(r10, rax);
+  movl(r11, rdi);
+  imulq(rdi, rdx);
+  movl(rbx, rsi);
+  shrq(rsi, 32);
+  addq(r9, rbx);
+  movl(rbx, r9);
+  shrq(r9, 32);
+  addq(r10, rsi);
+  addq(r10, r9);
+  shlq(rbx, 32);
+  orq(r8, rbx);
+  imulq(r11, rax);
+  movl(r9, Address(rcx, 8));
+  movl(rsi, Address(rcx, 4));
+  movl(rbx, rdi);
+  shrq(rdi, 32);
+  addq(r10, rbx);
+  movl(rbx, r10);
+  shrq(r10, 32);
+  addq(r11, rdi);
+  addq(r11, r10);
+  movq(rdi, r9);
+  imulq(r9, rdx);
+  imulq(rdi, rax);
+  movl(r10, r9);
+  shrq(r9, 32);
+  addq(r11, r10);
+  movl(r10, r11);
+  shrq(r11, 32);
+  addq(rdi, r9);
+  addq(rdi, r11);
+  movq(r9, rsi);
+  imulq(rsi, rdx);
+  imulq(r9, rax);
+  shlq(r10, 32);
+  orq(r10, rbx);
+  movl(eax, Address(rcx, 0));
+  movl(r11, rsi);
+  shrq(rsi, 32);
+  addq(rdi, r11);
+  movl(r11, rdi);
+  shrq(rdi, 32);
+  addq(r9, rsi);
+  addq(r9, rdi);
+  imulq(rdx, rax);
+  pextrw(rbx, xmm0, 3);
+  lea(rdi, ExternalAddress(PI_INV_TABLE));
+  subq(rcx, rdi);
+  addl(ecx, ecx);
+  addl(ecx, ecx);
+  addl(ecx, ecx);
+  addl(ecx, 19);
+  movl(rsi, 32768);
+  andl(rsi, rbx);
+  shrl(rbx, 4);
+  andl(rbx, 2047);
+  subl(rbx, 1023);
+  subl(ecx, rbx);
+  addq(r9, rdx);
+  movl(edx, ecx);
+  addl(edx, 32);
+  cmpl(ecx, 1);
+  jcc(Assembler::less, L_2TAG_PACKET_3_0_1);
+  negl(ecx);
+  addl(ecx, 29);
+  shll(r9);
+  movl(rdi, r9);
+  andl(r9, 536870911);
+  testl(r9, 268435456);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_4_0_1);
+  shrl(r9);
+  movl(rbx, 0);
+  shlq(r9, 32);
+  orq(r9, r11);
+
+  bind(L_2TAG_PACKET_5_0_1);
+
+  bind(L_2TAG_PACKET_6_0_1);
+  cmpq(r9, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_7_0_1);
+
+  bind(L_2TAG_PACKET_8_0_1);
+  bsrq(r11, r9);
+  movl(ecx, 29);
+  subl(ecx, r11);
+  jcc(Assembler::lessEqual, L_2TAG_PACKET_9_0_1);
+  shlq(r9);
+  movq(rax, r10);
+  shlq(r10);
+  addl(edx, ecx);
+  negl(ecx);
+  addl(ecx, 64);
+  shrq(rax);
+  shrq(r8);
+  orq(r9, rax);
+  orq(r10, r8);
+
+  bind(L_2TAG_PACKET_10_0_1);
+  cvtsi2sdq(xmm0, r9);
+  shrq(r10, 1);
+  cvtsi2sdq(xmm3, r10);
+  xorpd(xmm4, xmm4);
+  shll(edx, 4);
+  negl(edx);
+  addl(edx, 16368);
+  orl(edx, rsi);
+  xorl(edx, rbx);
+  pinsrw(xmm4, edx, 3);
+  movq(xmm2, ExternalAddress(PI_4));    //0x40000000UL, 0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
+  movq(xmm6, ExternalAddress(8 + PI_4));    //0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
+  xorpd(xmm5, xmm5);
+  subl(edx, 1008);
+  pinsrw(xmm5, edx, 3);
+  mulsd(xmm0, xmm4);
+  shll(rsi, 16);
+  sarl(rsi, 31);
+  mulsd(xmm3, xmm5);
+  movdqu(xmm1, xmm0);
+  mulsd(xmm0, xmm2);
+  shrl(rdi, 29);
+  addsd(xmm1, xmm3);
+  mulsd(xmm3, xmm2);
+  addl(rdi, rsi);
+  xorl(rdi, rsi);
+  mulsd(xmm6, xmm1);
+  movl(eax, rdi);
+  addsd(xmm6, xmm3);
+  movdqu(xmm2, xmm0);
+  addsd(xmm0, xmm6);
+  subsd(xmm2, xmm0);
+  addsd(xmm6, xmm2);
+
+  bind(L_2TAG_PACKET_11_0_1);
+  movq(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x40245f30UL
+  mulsd(xmm1, xmm0);
+  movq(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
+  movq(xmm4, ExternalAddress(SIGN_MASK));    //0x00000000UL, 0x80000000UL
+  pand(xmm4, xmm0);
+  por(xmm5, xmm4);
+  addpd(xmm1, xmm5);
+  cvttsd2siq(rdx, xmm1);
+  cvtsi2sdq(xmm1, rdx);
+  movq(xmm3, ExternalAddress(P_1));    //0x54400000UL, 0x3fb921fbUL
+  movdqu(xmm2, ExternalAddress(P_2));    //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
+  mulsd(xmm3, xmm1);
+  unpcklpd(xmm1, xmm1);
+  shll(eax, 3);
+  addl(edx, 1865232);
+  movdqu(xmm4, xmm0);
+  addl(edx, eax);
+  andl(edx, 63);
+  movdqu(xmm5, ExternalAddress(SC_4));    //0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL
+  lea(rax, ExternalAddress(Ctable));
+  shll(edx, 5);
+  addq(rax, rdx);
+  mulpd(xmm2, xmm1);
+  subsd(xmm0, xmm3);
+  mulsd(xmm1, ExternalAddress(P_3));    //0x2e037073UL, 0x3b63198aUL
+  subsd(xmm4, xmm3);
+  movq(xmm7, Address(rax, 8));
+  unpcklpd(xmm0, xmm0);
+  movdqu(xmm3, xmm4);
+  subsd(xmm4, xmm2);
+  mulpd(xmm5, xmm0);
+  subpd(xmm0, xmm2);
+  mulsd(xmm7, xmm4);
+  subsd(xmm3, xmm4);
+  mulpd(xmm5, xmm0);
+  mulpd(xmm0, xmm0);
+  subsd(xmm3, xmm2);
+  movdqu(xmm2, Address(rax, 0));
+  subsd(xmm1, xmm3);
+  movq(xmm3, Address(rax, 24));
+  addsd(xmm2, xmm3);
+  subsd(xmm7, xmm2);
+  subsd(xmm1, xmm6);
+  movdqu(xmm6, ExternalAddress(SC_2));    //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
+  mulsd(xmm2, xmm4);
+  mulpd(xmm6, xmm0);
+  mulsd(xmm3, xmm4);
+  mulpd(xmm2, xmm0);
+  mulpd(xmm0, xmm0);
+  addpd(xmm5, ExternalAddress(SC_3));    //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
+  mulsd(xmm4, Address(rax, 0));
+  addpd(xmm6, ExternalAddress(SC_1));    //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
+  mulpd(xmm5, xmm0);
+  movdqu(xmm0, xmm3);
+  addsd(xmm3, Address(rax, 8));
+  mulpd(xmm1, xmm7);
+  movdqu(xmm7, xmm4);
+  addsd(xmm4, xmm3);
+  addpd(xmm6, xmm5);
+  movq(xmm5, Address(rax, 8));
+  subsd(xmm5, xmm3);
+  subsd(xmm3, xmm4);
+  addsd(xmm1, Address(rax, 16));
+  mulpd(xmm6, xmm2);
+  addsd(xmm5, xmm0);
+  addsd(xmm3, xmm7);
+  addsd(xmm1, xmm5);
+  addsd(xmm1, xmm3);
+  addsd(xmm1, xmm6);
+  unpckhpd(xmm6, xmm6);
+  movdqu(xmm0, xmm4);
+  addsd(xmm1, xmm6);
+  addsd(xmm0, xmm1);
+  jmp(B1_4);
+
+  bind(L_2TAG_PACKET_7_0_1);
+  addl(edx, 64);
+  movq(r9, r10);
+  movq(r10, r8);
+  movl(r8, 0);
+  cmpq(r9, 0);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_8_0_1);
+  addl(edx, 64);
+  movq(r9, r10);
+  movq(r10, r8);
+  cmpq(r9, 0);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_8_0_1);
+  xorpd(xmm0, xmm0);
+  xorpd(xmm6, xmm6);
+  jmp(L_2TAG_PACKET_11_0_1);
+
+  bind(L_2TAG_PACKET_9_0_1);
+  jcc(Assembler::equal, L_2TAG_PACKET_10_0_1);
+  negl(ecx);
+  shrq(r10);
+  movq(rax, r9);
+  shrq(r9);
+  subl(edx, ecx);
+  negl(ecx);
+  addl(ecx, 64);
+  shlq(rax);
+  orq(r10, rax);
+  jmp(L_2TAG_PACKET_10_0_1);
+  bind(L_2TAG_PACKET_3_0_1);
+  negl(ecx);
+  shlq(r9, 32);
+  orq(r9, r11);
+  shlq(r9);
+  movq(rdi, r9);
+  testl(r9, INT_MIN);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_12_0_1);
+  shrl(r9);
+  movl(rbx, 0);
+  shrq(rdi, 3);
+  jmp(L_2TAG_PACKET_6_0_1);
+
+  bind(L_2TAG_PACKET_4_0_1);
+  shrl(r9);
+  movl(rbx, 536870912);
+  shrl(rbx);
+  shlq(r9, 32);
+  orq(r9, r11);
+  shlq(rbx, 32);
+  addl(rdi, 536870912);
+  movl(rcx, 0);
+  movl(r11, 0);
+  subq(rcx, r8);
+  sbbq(r11, r10);
+  sbbq(rbx, r9);
+  movq(r8, rcx);
+  movq(r10, r11);
+  movq(r9, rbx);
+  movl(rbx, 32768);
+  jmp(L_2TAG_PACKET_5_0_1);
+
+  bind(L_2TAG_PACKET_12_0_1);
+  shrl(r9);
+  mov64(rbx, 0x100000000);
+  shrq(rbx);
+  movl(rcx, 0);
+  movl(r11, 0);
+  subq(rcx, r8);
+  sbbq(r11, r10);
+  sbbq(rbx, r9);
+  movq(r8, rcx);
+  movq(r10, r11);
+  movq(r9, rbx);
+  movl(rbx, 32768);
+  shrq(rdi, 3);
+  addl(rdi, 536870912);
+  jmp(L_2TAG_PACKET_6_0_1);
+
+  bind(L_2TAG_PACKET_2_0_1);
+  movsd(xmm0, Address(rsp, 8));
+  mulsd(xmm0, ExternalAddress(NEG_ZERO));    //0x00000000UL, 0x80000000UL
+  movq(Address(rsp, 0), xmm0);
+
+  bind(L_2TAG_PACKET_13_0_1);
+
+  bind(B1_4);
+  addq(rsp, 16);
+  pop(rbx);
+}
+#else
+// The 32 bit code is at most SSE2 compliant
+
+ALIGNED_(16) juint _static_const_table_cos[] =
+{
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL, 0xbf73b92eUL,
+    0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
+    0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL,
+    0xc0000000UL, 0xbc626d19UL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL,
+    0xbfa60beaUL, 0x2ed59f06UL, 0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL,
+    0x00000000UL, 0x3ff00000UL, 0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL,
+    0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL, 0x00000000UL, 0x3ff00000UL,
+    0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL, 0x20000000UL,
+    0x3c5e0d89UL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL, 0xbfc59267UL,
+    0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
+    0x3ff00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL,
+    0x20000000UL, 0x3c68076aUL, 0x00000000UL, 0x3ff00000UL, 0x99fcef32UL,
+    0x3fca8279UL, 0x667f3bcdUL, 0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL,
+    0x00000000UL, 0x3fe00000UL, 0x94247758UL, 0x3fc133ccUL, 0x6b151741UL,
+    0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL, 0x00000000UL, 0x3fe00000UL,
+    0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL, 0xe0000000UL,
+    0x3c39f630UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL, 0xbf9d4a2cUL,
+    0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
+    0x3fe00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0x3fed906bUL,
+    0x20000000UL, 0x3c7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x76acf82dUL,
+    0x3fa4a031UL, 0x56c62ddaUL, 0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL,
+    0x00000000UL, 0x3fd00000UL, 0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL,
+    0x3fef6297UL, 0x20000000UL, 0x3c756217UL, 0x00000000UL, 0x3fd00000UL,
+    0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL, 0x3fefd88dUL, 0x40000000UL,
+    0xbc887df6UL, 0x00000000UL, 0x3fc00000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0x3fefd88dUL,
+    0x40000000UL, 0xbc887df6UL, 0x00000000UL, 0xbfc00000UL, 0x0e5967d5UL,
+    0x3fac1d1fUL, 0xcff75cb0UL, 0x3fef6297UL, 0x20000000UL, 0x3c756217UL,
+    0x00000000UL, 0xbfd00000UL, 0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL,
+    0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL, 0x00000000UL, 0xbfd00000UL,
+    0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL, 0x3fed906bUL, 0x20000000UL,
+    0x3c7457e6UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL, 0x3f9d4a2cUL,
+    0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
+    0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL,
+    0xe0000000UL, 0x3c39f630UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL,
+    0xbfc133ccUL, 0x6b151741UL, 0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL,
+    0x00000000UL, 0xbfe00000UL, 0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL,
+    0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL, 0x00000000UL, 0xbfe00000UL,
+    0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL, 0x20000000UL,
+    0x3c68076aUL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL, 0x3fc59267UL,
+    0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
+    0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL,
+    0x20000000UL, 0x3c5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL,
+    0x3fb37ca1UL, 0xa6aea963UL, 0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL,
+    0x00000000UL, 0xbff00000UL, 0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL,
+    0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL, 0x00000000UL, 0xbff00000UL,
+    0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL, 0xc0000000UL,
+    0xbc626d19UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL, 0x3f73b92eUL,
+    0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
+    0xbff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL,
+    0x3f73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
+    0x00000000UL, 0xbff00000UL, 0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL,
+    0xbfc8f8b8UL, 0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0xbff00000UL,
+    0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL,
+    0x3c75d28dUL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL, 0x3fb37ca1UL,
+    0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL, 0x3c672cedUL, 0x00000000UL,
+    0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0xbfde2b5dUL,
+    0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL,
+    0x3fc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
+    0x00000000UL, 0xbff00000UL, 0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL,
+    0xbfe44cf3UL, 0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0xbff00000UL,
+    0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL,
+    0x3c8bdd34UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL, 0xbfc133ccUL,
+    0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL, 0x3c82c5e1UL, 0x00000000UL,
+    0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0xbfea9b66UL,
+    0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL,
+    0x3f9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
+    0x00000000UL, 0xbfe00000UL, 0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL,
+    0xbfed906bUL, 0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0xbfe00000UL,
+    0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL,
+    0xbc8760b1UL, 0x00000000UL, 0xbfd00000UL, 0x0e5967d5UL, 0x3fac1d1fUL,
+    0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL, 0xbc756217UL, 0x00000000UL,
+    0xbfd00000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0xbfefd88dUL,
+    0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0xbfc00000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL,
+    0xbfefd88dUL, 0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0x3fc00000UL,
+    0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL,
+    0xbc756217UL, 0x00000000UL, 0x3fd00000UL, 0x76acf82dUL, 0x3fa4a031UL,
+    0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL, 0xbc8760b1UL, 0x00000000UL,
+    0x3fd00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0xbfed906bUL,
+    0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL,
+    0xbf9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
+    0x00000000UL, 0x3fe00000UL, 0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL,
+    0xbfea9b66UL, 0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0x3fe00000UL,
+    0x94247758UL, 0x3fc133ccUL, 0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL,
+    0x3c82c5e1UL, 0x00000000UL, 0x3fe00000UL, 0x99fcef32UL, 0x3fca8279UL,
+    0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL, 0x3c8bdd34UL, 0x00000000UL,
+    0x3fe00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0xbfe44cf3UL,
+    0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL,
+    0xbfc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
+    0x00000000UL, 0x3ff00000UL, 0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL,
+    0xbfde2b5dUL, 0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0x3ff00000UL,
+    0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL,
+    0x3c672cedUL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL, 0xbfa60beaUL,
+    0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL, 0x3c75d28dUL, 0x00000000UL,
+    0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0xbfc8f8b8UL,
+    0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL,
+    0xbf73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
+    0x00000000UL, 0x3ff00000UL, 0x55555555UL, 0xbfc55555UL, 0x00000000UL,
+    0xbfe00000UL, 0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL,
+    0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL, 0xa556c734UL,
+    0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL, 0x1a600000UL, 0x3d90b461UL,
+    0x1a600000UL, 0x3d90b461UL, 0x54400000UL, 0x3fb921fbUL, 0x00000000UL,
+    0x00000000UL, 0x2e037073UL, 0x3b63198aUL, 0x00000000UL, 0x00000000UL,
+    0x6dc9c883UL, 0x40245f30UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x43380000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x3ff00000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x80000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x80000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
+};
+//registers,
+// input: (rbp + 8)
+// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
+//          rax, rdx, rcx, rbx (tmp)
+
+// Code generated by Intel C compiler for LIBM library
+
+void MacroAssembler::fast_cos(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
+  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
+  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
+  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
+  Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
+
+  assert_different_registers(tmp, eax, ecx, edx);
+
+  address static_const_table_cos = (address)_static_const_table_cos;
+
+  bind(start);
+  subl(rsp, 120);
+  movl(Address(rsp, 56), tmp);
+  lea(tmp, ExternalAddress(static_const_table_cos));
+  movsd(xmm0, Address(rsp, 128));
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32767);
+  subl(eax, 12336);
+  cmpl(eax, 4293);
+  jcc(Assembler::above, L_2TAG_PACKET_0_0_2);
+  movsd(xmm1, Address(tmp, 2160));
+  mulsd(xmm1, xmm0);
+  movdqu(xmm5, Address(tmp, 2240));
+  movsd(xmm4, Address(tmp, 2224));
+  pand(xmm4, xmm0);
+  por(xmm5, xmm4);
+  movsd(xmm3, Address(tmp, 2128));
+  movdqu(xmm2, Address(tmp, 2112));
+  addpd(xmm1, xmm5);
+  cvttsd2sil(edx, xmm1);
+  cvtsi2sdl(xmm1, edx);
+  mulsd(xmm3, xmm1);
+  unpcklpd(xmm1, xmm1);
+  addl(edx, 1865232);
+  movdqu(xmm4, xmm0);
+  andl(edx, 63);
+  movdqu(xmm5, Address(tmp, 2096));
+  lea(eax, Address(tmp, 0));
+  shll(edx, 5);
+  addl(eax, edx);
+  mulpd(xmm2, xmm1);
+  subsd(xmm0, xmm3);
+  mulsd(xmm1, Address(tmp, 2144));
+  subsd(xmm4, xmm3);
+  movsd(xmm7, Address(eax, 8));
+  unpcklpd(xmm0, xmm0);
+  movapd(xmm3, xmm4);
+  subsd(xmm4, xmm2);
+  mulpd(xmm5, xmm0);
+  subpd(xmm0, xmm2);
+  movdqu(xmm6, Address(tmp, 2064));
+  mulsd(xmm7, xmm4);
+  subsd(xmm3, xmm4);
+  mulpd(xmm5, xmm0);
+  mulpd(xmm0, xmm0);
+  subsd(xmm3, xmm2);
+  movdqu(xmm2, Address(eax, 0));
+  subsd(xmm1, xmm3);
+  movsd(xmm3, Address(eax, 24));
+  addsd(xmm2, xmm3);
+  subsd(xmm7, xmm2);
+  mulsd(xmm2, xmm4);
+  mulpd(xmm6, xmm0);
+  mulsd(xmm3, xmm4);
+  mulpd(xmm2, xmm0);
+  mulpd(xmm0, xmm0);
+  addpd(xmm5, Address(tmp, 2080));
+  mulsd(xmm4, Address(eax, 0));
+  addpd(xmm6, Address(tmp, 2048));
+  mulpd(xmm5, xmm0);
+  movapd(xmm0, xmm3);
+  addsd(xmm3, Address(eax, 8));
+  mulpd(xmm1, xmm7);
+  movapd(xmm7, xmm4);
+  addsd(xmm4, xmm3);
+  addpd(xmm6, xmm5);
+  movsd(xmm5, Address(eax, 8));
+  subsd(xmm5, xmm3);
+  subsd(xmm3, xmm4);
+  addsd(xmm1, Address(eax, 16));
+  mulpd(xmm6, xmm2);
+  addsd(xmm5, xmm0);
+  addsd(xmm3, xmm7);
+  addsd(xmm1, xmm5);
+  addsd(xmm1, xmm3);
+  addsd(xmm1, xmm6);
+  unpckhpd(xmm6, xmm6);
+  addsd(xmm1, xmm6);
+  addsd(xmm4, xmm1);
+  movsd(Address(rsp, 0), xmm4);
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_0_0_2);
+  jcc(Assembler::greater, L_2TAG_PACKET_2_0_2);
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32767);
+  pinsrw(xmm0, eax, 3);
+  movsd(xmm1, Address(tmp, 2192));
+  subsd(xmm1, xmm0);
+  movsd(Address(rsp, 0), xmm1);
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_2_0_2);
+  movl(eax, Address(rsp, 132));
+  andl(eax, 2146435072);
+  cmpl(eax, 2146435072);
+  jcc(Assembler::equal, L_2TAG_PACKET_3_0_2);
+  subl(rsp, 32);
+  movsd(Address(rsp, 0), xmm0);
+  lea(eax, Address(rsp, 40));
+  movl(Address(rsp, 8), eax);
+  movl(eax, 1);
+  movl(Address(rsp, 12), eax);
+  call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_sin_cos_huge())));
+  addl(rsp, 32);
+  fld_d(Address(rsp, 8));
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_3_0_2);
+  fld_d(Address(rsp, 128));
+  fmul_d(Address(tmp, 2208));
+
+  bind(L_2TAG_PACKET_1_0_2);
+  movl(tmp, Address(rsp, 56));
+}
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86_exp.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,674 @@
+/*
+* Copyright (c) 2016, Intel Corporation.
+* Intel Math Library (LIBM) Source Code
+*
+* 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.
+*
+*/
+
+#include "precompiled.hpp"
+#include "asm/assembler.hpp"
+#include "asm/assembler.inline.hpp"
+#include "runtime/stubRoutines.hpp"
+#include "macroAssembler_x86.hpp"
+
+#ifdef _MSC_VER
+#define ALIGNED_(x) __declspec(align(x))
+#else
+#define ALIGNED_(x) __attribute__ ((aligned(x)))
+#endif
+
+/******************************************************************************/
+//                     ALGORITHM DESCRIPTION - EXP()
+//                     ---------------------
+//
+// Description:
+//  Let K = 64 (table size).
+//        x    x/log(2)     n
+//       e  = 2          = 2 * T[j] * (1 + P(y))
+//  where
+//       x = m*log(2)/K + y,    y in [-log(2)/K..log(2)/K]
+//       m = n*K + j,           m,n,j - signed integer, j in [-K/2..K/2]
+//                  j/K
+//       values of 2   are tabulated as T[j] = T_hi[j] ( 1 + T_lo[j]).
+//
+//       P(y) is a minimax polynomial approximation of exp(x)-1
+//       on small interval [-log(2)/K..log(2)/K] (were calculated by Maple V).
+//
+//  To avoid problems with arithmetic overflow and underflow,
+//            n                        n1  n2
+//  value of 2  is safely computed as 2 * 2 where n1 in [-BIAS/2..BIAS/2]
+//  where BIAS is a value of exponent bias.
+//
+// Special cases:
+//  exp(NaN) = NaN
+//  exp(+INF) = +INF
+//  exp(-INF) = 0
+//  exp(x) = 1 for subnormals
+//  for finite argument, only exp(0)=1 is exact
+//  For IEEE double
+//    if x >  709.782712893383973096 then exp(x) overflow
+//    if x < -745.133219101941108420 then exp(x) underflow
+//
+/******************************************************************************/
+
+#ifdef _LP64
+// The 64 bit code is at most SSE2 compliant
+ALIGNED_(16) juint _cv[] =
+{
+    0x652b82feUL, 0x40571547UL, 0x652b82feUL, 0x40571547UL, 0xfefa0000UL,
+    0x3f862e42UL, 0xfefa0000UL, 0x3f862e42UL, 0xbc9e3b3aUL, 0x3d1cf79aUL,
+    0xbc9e3b3aUL, 0x3d1cf79aUL, 0xfffffffeUL, 0x3fdfffffUL, 0xfffffffeUL,
+    0x3fdfffffUL, 0xe3289860UL, 0x3f56c15cUL, 0x555b9e25UL, 0x3fa55555UL,
+    0xc090cf0fUL, 0x3f811115UL, 0x55548ba1UL, 0x3fc55555UL
+};
+
+ALIGNED_(16) juint _shifter[] =
+{
+    0x00000000UL, 0x43380000UL, 0x00000000UL, 0x43380000UL
+};
+
+ALIGNED_(16) juint _mmask[] =
+{
+    0xffffffc0UL, 0x00000000UL, 0xffffffc0UL, 0x00000000UL
+};
+
+ALIGNED_(16) juint _bias[] =
+{
+    0x0000ffc0UL, 0x00000000UL, 0x0000ffc0UL, 0x00000000UL
+};
+
+ALIGNED_(16) juint _Tbl_addr[] =
+{
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x0e03754dUL,
+    0x3cad7bbfUL, 0x3e778060UL, 0x00002c9aUL, 0x3567f613UL, 0x3c8cd252UL,
+    0xd3158574UL, 0x000059b0UL, 0x61e6c861UL, 0x3c60f74eUL, 0x18759bc8UL,
+    0x00008745UL, 0x5d837b6cUL, 0x3c979aa6UL, 0x6cf9890fUL, 0x0000b558UL,
+    0x702f9cd1UL, 0x3c3ebe3dUL, 0x32d3d1a2UL, 0x0000e3ecUL, 0x1e63bcd8UL,
+    0x3ca3516eUL, 0xd0125b50UL, 0x00011301UL, 0x26f0387bUL, 0x3ca4c554UL,
+    0xaea92ddfUL, 0x0001429aUL, 0x62523fb6UL, 0x3ca95153UL, 0x3c7d517aUL,
+    0x000172b8UL, 0x3f1353bfUL, 0x3c8b898cUL, 0xeb6fcb75UL, 0x0001a35bUL,
+    0x3e3a2f5fUL, 0x3c9aecf7UL, 0x3168b9aaUL, 0x0001d487UL, 0x44a6c38dUL,
+    0x3c8a6f41UL, 0x88628cd6UL, 0x0002063bUL, 0xe3a8a894UL, 0x3c968efdUL,
+    0x6e756238UL, 0x0002387aUL, 0x981fe7f2UL, 0x3c80472bUL, 0x65e27cddUL,
+    0x00026b45UL, 0x6d09ab31UL, 0x3c82f7e1UL, 0xf51fdee1UL, 0x00029e9dUL,
+    0x720c0ab3UL, 0x3c8b3782UL, 0xa6e4030bUL, 0x0002d285UL, 0x4db0abb6UL,
+    0x3c834d75UL, 0x0a31b715UL, 0x000306feUL, 0x5dd3f84aUL, 0x3c8fdd39UL,
+    0xb26416ffUL, 0x00033c08UL, 0xcc187d29UL, 0x3ca12f8cUL, 0x373aa9caUL,
+    0x000371a7UL, 0x738b5e8bUL, 0x3ca7d229UL, 0x34e59ff6UL, 0x0003a7dbUL,
+    0xa72a4c6dUL, 0x3c859f48UL, 0x4c123422UL, 0x0003dea6UL, 0x259d9205UL,
+    0x3ca8b846UL, 0x21f72e29UL, 0x0004160aUL, 0x60c2ac12UL, 0x3c4363edUL,
+    0x6061892dUL, 0x00044e08UL, 0xdaa10379UL, 0x3c6ecce1UL, 0xb5c13cd0UL,
+    0x000486a2UL, 0xbb7aafb0UL, 0x3c7690ceUL, 0xd5362a27UL, 0x0004bfdaUL,
+    0x9b282a09UL, 0x3ca083ccUL, 0x769d2ca6UL, 0x0004f9b2UL, 0xc1aae707UL,
+    0x3ca509b0UL, 0x569d4f81UL, 0x0005342bUL, 0x18fdd78eUL, 0x3c933505UL,
+    0x36b527daUL, 0x00056f47UL, 0xe21c5409UL, 0x3c9063e1UL, 0xdd485429UL,
+    0x0005ab07UL, 0x2b64c035UL, 0x3c9432e6UL, 0x15ad2148UL, 0x0005e76fUL,
+    0x99f08c0aUL, 0x3ca01284UL, 0xb03a5584UL, 0x0006247eUL, 0x0073dc06UL,
+    0x3c99f087UL, 0x82552224UL, 0x00066238UL, 0x0da05571UL, 0x3c998d4dUL,
+    0x667f3bccUL, 0x0006a09eUL, 0x86ce4786UL, 0x3ca52bb9UL, 0x3c651a2eUL,
+    0x0006dfb2UL, 0x206f0dabUL, 0x3ca32092UL, 0xe8ec5f73UL, 0x00071f75UL,
+    0x8e17a7a6UL, 0x3ca06122UL, 0x564267c8UL, 0x00075febUL, 0x461e9f86UL,
+    0x3ca244acUL, 0x73eb0186UL, 0x0007a114UL, 0xabd66c55UL, 0x3c65ebe1UL,
+    0x36cf4e62UL, 0x0007e2f3UL, 0xbbff67d0UL, 0x3c96fe9fUL, 0x994cce12UL,
+    0x00082589UL, 0x14c801dfUL, 0x3c951f14UL, 0x9b4492ecUL, 0x000868d9UL,
+    0xc1f0eab4UL, 0x3c8db72fUL, 0x422aa0dbUL, 0x0008ace5UL, 0x59f35f44UL,
+    0x3c7bf683UL, 0x99157736UL, 0x0008f1aeUL, 0x9c06283cUL, 0x3ca360baUL,
+    0xb0cdc5e4UL, 0x00093737UL, 0x20f962aaUL, 0x3c95e8d1UL, 0x9fde4e4fUL,
+    0x00097d82UL, 0x2b91ce27UL, 0x3c71affcUL, 0x82a3f090UL, 0x0009c491UL,
+    0x589a2ebdUL, 0x3c9b6d34UL, 0x7b5de564UL, 0x000a0c66UL, 0x9ab89880UL,
+    0x3c95277cUL, 0xb23e255cUL, 0x000a5503UL, 0x6e735ab3UL, 0x3c846984UL,
+    0x5579fdbfUL, 0x000a9e6bUL, 0x92cb3387UL, 0x3c8c1a77UL, 0x995ad3adUL,
+    0x000ae89fUL, 0xdc2d1d96UL, 0x3ca22466UL, 0xb84f15faUL, 0x000b33a2UL,
+    0xb19505aeUL, 0x3ca1112eUL, 0xf2fb5e46UL, 0x000b7f76UL, 0x0a5fddcdUL,
+    0x3c74ffd7UL, 0x904bc1d2UL, 0x000bcc1eUL, 0x30af0cb3UL, 0x3c736eaeUL,
+    0xdd85529cUL, 0x000c199bUL, 0xd10959acUL, 0x3c84e08fUL, 0x2e57d14bUL,
+    0x000c67f1UL, 0x6c921968UL, 0x3c676b2cUL, 0xdcef9069UL, 0x000cb720UL,
+    0x36df99b3UL, 0x3c937009UL, 0x4a07897bUL, 0x000d072dUL, 0xa63d07a7UL,
+    0x3c74a385UL, 0xdcfba487UL, 0x000d5818UL, 0xd5c192acUL, 0x3c8e5a50UL,
+    0x03db3285UL, 0x000da9e6UL, 0x1c4a9792UL, 0x3c98bb73UL, 0x337b9b5eUL,
+    0x000dfc97UL, 0x603a88d3UL, 0x3c74b604UL, 0xe78b3ff6UL, 0x000e502eUL,
+    0x92094926UL, 0x3c916f27UL, 0xa2a490d9UL, 0x000ea4afUL, 0x41aa2008UL,
+    0x3c8ec3bcUL, 0xee615a27UL, 0x000efa1bUL, 0x31d185eeUL, 0x3c8a64a9UL,
+    0x5b6e4540UL, 0x000f5076UL, 0x4d91cd9dUL, 0x3c77893bUL, 0x819e90d8UL,
+    0x000fa7c1UL
+};
+
+ALIGNED_(16) juint _ALLONES[] =
+{
+    0xffffffffUL, 0xffffffffUL, 0xffffffffUL, 0xffffffffUL
+};
+
+ALIGNED_(16) juint _ebias[] =
+{
+    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x3ff00000UL
+};
+
+ALIGNED_(4) juint _XMAX[] =
+{
+    0xffffffffUL, 0x7fefffffUL
+};
+
+ALIGNED_(4) juint _XMIN[] =
+{
+    0x00000000UL, 0x00100000UL
+};
+
+ALIGNED_(4) juint _INF[] =
+{
+    0x00000000UL, 0x7ff00000UL
+};
+
+ALIGNED_(4) juint _ZERO[] =
+{
+    0x00000000UL, 0x00000000UL
+};
+
+ALIGNED_(4) juint _ONE_val[] =
+{
+    0x00000000UL, 0x3ff00000UL
+};
+
+
+// Registers:
+// input: xmm0
+// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
+//          rax, rdx, rcx, tmp - r11
+
+// Code generated by Intel C compiler for LIBM library
+
+void MacroAssembler::fast_exp(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
+  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
+  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
+  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
+  Label L_2TAG_PACKET_12_0_2, B1_3, B1_5, start;
+
+  assert_different_registers(tmp, eax, ecx, edx);
+  jmp(start);
+  address cv = (address)_cv;
+  address Shifter = (address)_shifter;
+  address mmask = (address)_mmask;
+  address bias = (address)_bias;
+  address Tbl_addr = (address)_Tbl_addr;
+  address ALLONES = (address)_ALLONES;
+  address ebias = (address)_ebias;
+  address XMAX = (address)_XMAX;
+  address XMIN = (address)_XMIN;
+  address INF = (address)_INF;
+  address ZERO = (address)_ZERO;
+  address ONE_val = (address)_ONE_val;
+
+  bind(start);
+  subq(rsp, 24);
+  movsd(Address(rsp, 8), xmm0);
+  unpcklpd(xmm0, xmm0);
+  movdqu(xmm1, ExternalAddress(cv));       // 0x652b82feUL, 0x40571547UL, 0x652b82feUL, 0x40571547UL
+  movdqu(xmm6, ExternalAddress(Shifter));  // 0x00000000UL, 0x43380000UL, 0x00000000UL, 0x43380000UL
+  movdqu(xmm2, ExternalAddress(16 + cv));    // 0xfefa0000UL, 0x3f862e42UL, 0xfefa0000UL, 0x3f862e42UL
+  movdqu(xmm3, ExternalAddress(32 + cv));    // 0xbc9e3b3aUL, 0x3d1cf79aUL, 0xbc9e3b3aUL, 0x3d1cf79aUL
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32767);
+  movl(edx, 16527);
+  subl(edx, eax);
+  subl(eax, 15504);
+  orl(edx, eax);
+  cmpl(edx, INT_MIN);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
+  mulpd(xmm1, xmm0);
+  addpd(xmm1, xmm6);
+  movapd(xmm7, xmm1);
+  subpd(xmm1, xmm6);
+  mulpd(xmm2, xmm1);
+  movdqu(xmm4, ExternalAddress(64 + cv));    // 0xe3289860UL, 0x3f56c15cUL, 0x555b9e25UL, 0x3fa55555UL
+  mulpd(xmm3, xmm1);
+  movdqu(xmm5, ExternalAddress(80 + cv));    // 0xc090cf0fUL, 0x3f811115UL, 0x55548ba1UL, 0x3fc55555UL
+  subpd(xmm0, xmm2);
+  movdl(eax, xmm7);
+  movl(ecx, eax);
+  andl(ecx, 63);
+  shll(ecx, 4);
+  sarl(eax, 6);
+  movl(edx, eax);
+  movdqu(xmm6, ExternalAddress(mmask));    // 0xffffffc0UL, 0x00000000UL, 0xffffffc0UL, 0x00000000UL
+  pand(xmm7, xmm6);
+  movdqu(xmm6, ExternalAddress(bias));     // 0x0000ffc0UL, 0x00000000UL, 0x0000ffc0UL, 0x00000000UL
+  paddq(xmm7, xmm6);
+  psllq(xmm7, 46);
+  subpd(xmm0, xmm3);
+  lea(tmp, ExternalAddress(Tbl_addr));
+  movdqu(xmm2, Address(ecx, tmp));
+  mulpd(xmm4, xmm0);
+  movapd(xmm6, xmm0);
+  movapd(xmm1, xmm0);
+  mulpd(xmm6, xmm6);
+  mulpd(xmm0, xmm6);
+  addpd(xmm5, xmm4);
+  mulsd(xmm0, xmm6);
+  mulpd(xmm6, ExternalAddress(48 + cv));     // 0xfffffffeUL, 0x3fdfffffUL, 0xfffffffeUL, 0x3fdfffffUL
+  addsd(xmm1, xmm2);
+  unpckhpd(xmm2, xmm2);
+  mulpd(xmm0, xmm5);
+  addsd(xmm1, xmm0);
+  por(xmm2, xmm7);
+  unpckhpd(xmm0, xmm0);
+  addsd(xmm0, xmm1);
+  addsd(xmm0, xmm6);
+  addl(edx, 894);
+  cmpl(edx, 1916);
+  jcc(Assembler::above, L_2TAG_PACKET_1_0_2);
+  mulsd(xmm0, xmm2);
+  addsd(xmm0, xmm2);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_1_0_2);
+  xorpd(xmm3, xmm3);
+  movdqu(xmm4, ExternalAddress(ALLONES));  // 0xffffffffUL, 0xffffffffUL, 0xffffffffUL, 0xffffffffUL
+  movl(edx, -1022);
+  subl(edx, eax);
+  movdl(xmm5, edx);
+  psllq(xmm4, xmm5);
+  movl(ecx, eax);
+  sarl(eax, 1);
+  pinsrw(xmm3, eax, 3);
+  movdqu(xmm6, ExternalAddress(ebias));    // 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x3ff00000UL
+  psllq(xmm3, 4);
+  psubd(xmm2, xmm3);
+  mulsd(xmm0, xmm2);
+  cmpl(edx, 52);
+  jcc(Assembler::greater, L_2TAG_PACKET_2_0_2);
+  pand(xmm4, xmm2);
+  paddd(xmm3, xmm6);
+  subsd(xmm2, xmm4);
+  addsd(xmm0, xmm2);
+  cmpl(ecx, 1023);
+  jcc(Assembler::greaterEqual, L_2TAG_PACKET_3_0_2);
+  pextrw(ecx, xmm0, 3);
+  andl(ecx, 32768);
+  orl(edx, ecx);
+  cmpl(edx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_4_0_2);
+  movapd(xmm6, xmm0);
+  addsd(xmm0, xmm4);
+  mulsd(xmm0, xmm3);
+  pextrw(ecx, xmm0, 3);
+  andl(ecx, 32752);
+  cmpl(ecx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_5_0_2);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_5_0_2);
+  mulsd(xmm6, xmm3);
+  mulsd(xmm4, xmm3);
+  movdqu(xmm0, xmm6);
+  pxor(xmm6, xmm4);
+  psrad(xmm6, 31);
+  pshufd(xmm6, xmm6, 85);
+  psllq(xmm0, 1);
+  psrlq(xmm0, 1);
+  pxor(xmm0, xmm6);
+  psrlq(xmm6, 63);
+  paddq(xmm0, xmm6);
+  paddq(xmm0, xmm4);
+  movl(Address(rsp, 0), 15);
+  jmp(L_2TAG_PACKET_6_0_2);
+
+  bind(L_2TAG_PACKET_4_0_2);
+  addsd(xmm0, xmm4);
+  mulsd(xmm0, xmm3);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_3_0_2);
+  addsd(xmm0, xmm4);
+  mulsd(xmm0, xmm3);
+  pextrw(ecx, xmm0, 3);
+  andl(ecx, 32752);
+  cmpl(ecx, 32752);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_7_0_2);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_2_0_2);
+  paddd(xmm3, xmm6);
+  addpd(xmm0, xmm2);
+  mulsd(xmm0, xmm3);
+  movl(Address(rsp, 0), 15);
+  jmp(L_2TAG_PACKET_6_0_2);
+
+  bind(L_2TAG_PACKET_8_0_2);
+  cmpl(eax, 2146435072);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_9_0_2);
+  movl(eax, Address(rsp, 12));
+  cmpl(eax, INT_MIN);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_10_0_2);
+  movsd(xmm0, ExternalAddress(XMAX));      // 0xffffffffUL, 0x7fefffffUL
+  mulsd(xmm0, xmm0);
+
+  bind(L_2TAG_PACKET_7_0_2);
+  movl(Address(rsp, 0), 14);
+  jmp(L_2TAG_PACKET_6_0_2);
+
+  bind(L_2TAG_PACKET_10_0_2);
+  movsd(xmm0, ExternalAddress(XMIN));      // 0x00000000UL, 0x00100000UL
+  mulsd(xmm0, xmm0);
+  movl(Address(rsp, 0), 15);
+  jmp(L_2TAG_PACKET_6_0_2);
+
+  bind(L_2TAG_PACKET_9_0_2);
+  movl(edx, Address(rsp, 8));
+  cmpl(eax, 2146435072);
+  jcc(Assembler::above, L_2TAG_PACKET_11_0_2);
+  cmpl(edx, 0);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_11_0_2);
+  movl(eax, Address(rsp, 12));
+  cmpl(eax, 2146435072);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_12_0_2);
+  movsd(xmm0, ExternalAddress(INF));       // 0x00000000UL, 0x7ff00000UL
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_12_0_2);
+  movsd(xmm0, ExternalAddress(ZERO));      // 0x00000000UL, 0x00000000UL
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_11_0_2);
+  movsd(xmm0, Address(rsp, 8));
+  addsd(xmm0, xmm0);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_0_0_2);
+  movl(eax, Address(rsp, 12));
+  andl(eax, 2147483647);
+  cmpl(eax, 1083179008);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_8_0_2);
+  movsd(Address(rsp, 8), xmm0);
+  addsd(xmm0, ExternalAddress(ONE_val));   // 0x00000000UL, 0x3ff00000UL
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_6_0_2);
+  movq(Address(rsp, 16), xmm0);
+
+  bind(B1_3);
+  movq(xmm0, Address(rsp, 16));
+
+  bind(B1_5);
+  addq(rsp, 24);
+}
+#else
+// The 32 bit code is at most SSE2 compliant
+ALIGNED_(16) juint _static_const_table[] =
+{
+    0x00000000UL, 0xfff00000UL, 0x00000000UL, 0xfff00000UL, 0xffffffc0UL,
+    0x00000000UL, 0xffffffc0UL, 0x00000000UL, 0x0000ffc0UL, 0x00000000UL,
+    0x0000ffc0UL, 0x00000000UL, 0x00000000UL, 0x43380000UL, 0x00000000UL,
+    0x43380000UL, 0x652b82feUL, 0x40571547UL, 0x652b82feUL, 0x40571547UL,
+    0xfefa0000UL, 0x3f862e42UL, 0xfefa0000UL, 0x3f862e42UL, 0xbc9e3b3aUL,
+    0x3d1cf79aUL, 0xbc9e3b3aUL, 0x3d1cf79aUL, 0xfffffffeUL, 0x3fdfffffUL,
+    0xfffffffeUL, 0x3fdfffffUL, 0xe3289860UL, 0x3f56c15cUL, 0x555b9e25UL,
+    0x3fa55555UL, 0xc090cf0fUL, 0x3f811115UL, 0x55548ba1UL, 0x3fc55555UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x0e03754dUL,
+    0x3cad7bbfUL, 0x3e778060UL, 0x00002c9aUL, 0x3567f613UL, 0x3c8cd252UL,
+    0xd3158574UL, 0x000059b0UL, 0x61e6c861UL, 0x3c60f74eUL, 0x18759bc8UL,
+    0x00008745UL, 0x5d837b6cUL, 0x3c979aa6UL, 0x6cf9890fUL, 0x0000b558UL,
+    0x702f9cd1UL, 0x3c3ebe3dUL, 0x32d3d1a2UL, 0x0000e3ecUL, 0x1e63bcd8UL,
+    0x3ca3516eUL, 0xd0125b50UL, 0x00011301UL, 0x26f0387bUL, 0x3ca4c554UL,
+    0xaea92ddfUL, 0x0001429aUL, 0x62523fb6UL, 0x3ca95153UL, 0x3c7d517aUL,
+    0x000172b8UL, 0x3f1353bfUL, 0x3c8b898cUL, 0xeb6fcb75UL, 0x0001a35bUL,
+    0x3e3a2f5fUL, 0x3c9aecf7UL, 0x3168b9aaUL, 0x0001d487UL, 0x44a6c38dUL,
+    0x3c8a6f41UL, 0x88628cd6UL, 0x0002063bUL, 0xe3a8a894UL, 0x3c968efdUL,
+    0x6e756238UL, 0x0002387aUL, 0x981fe7f2UL, 0x3c80472bUL, 0x65e27cddUL,
+    0x00026b45UL, 0x6d09ab31UL, 0x3c82f7e1UL, 0xf51fdee1UL, 0x00029e9dUL,
+    0x720c0ab3UL, 0x3c8b3782UL, 0xa6e4030bUL, 0x0002d285UL, 0x4db0abb6UL,
+    0x3c834d75UL, 0x0a31b715UL, 0x000306feUL, 0x5dd3f84aUL, 0x3c8fdd39UL,
+    0xb26416ffUL, 0x00033c08UL, 0xcc187d29UL, 0x3ca12f8cUL, 0x373aa9caUL,
+    0x000371a7UL, 0x738b5e8bUL, 0x3ca7d229UL, 0x34e59ff6UL, 0x0003a7dbUL,
+    0xa72a4c6dUL, 0x3c859f48UL, 0x4c123422UL, 0x0003dea6UL, 0x259d9205UL,
+    0x3ca8b846UL, 0x21f72e29UL, 0x0004160aUL, 0x60c2ac12UL, 0x3c4363edUL,
+    0x6061892dUL, 0x00044e08UL, 0xdaa10379UL, 0x3c6ecce1UL, 0xb5c13cd0UL,
+    0x000486a2UL, 0xbb7aafb0UL, 0x3c7690ceUL, 0xd5362a27UL, 0x0004bfdaUL,
+    0x9b282a09UL, 0x3ca083ccUL, 0x769d2ca6UL, 0x0004f9b2UL, 0xc1aae707UL,
+    0x3ca509b0UL, 0x569d4f81UL, 0x0005342bUL, 0x18fdd78eUL, 0x3c933505UL,
+    0x36b527daUL, 0x00056f47UL, 0xe21c5409UL, 0x3c9063e1UL, 0xdd485429UL,
+    0x0005ab07UL, 0x2b64c035UL, 0x3c9432e6UL, 0x15ad2148UL, 0x0005e76fUL,
+    0x99f08c0aUL, 0x3ca01284UL, 0xb03a5584UL, 0x0006247eUL, 0x0073dc06UL,
+    0x3c99f087UL, 0x82552224UL, 0x00066238UL, 0x0da05571UL, 0x3c998d4dUL,
+    0x667f3bccUL, 0x0006a09eUL, 0x86ce4786UL, 0x3ca52bb9UL, 0x3c651a2eUL,
+    0x0006dfb2UL, 0x206f0dabUL, 0x3ca32092UL, 0xe8ec5f73UL, 0x00071f75UL,
+    0x8e17a7a6UL, 0x3ca06122UL, 0x564267c8UL, 0x00075febUL, 0x461e9f86UL,
+    0x3ca244acUL, 0x73eb0186UL, 0x0007a114UL, 0xabd66c55UL, 0x3c65ebe1UL,
+    0x36cf4e62UL, 0x0007e2f3UL, 0xbbff67d0UL, 0x3c96fe9fUL, 0x994cce12UL,
+    0x00082589UL, 0x14c801dfUL, 0x3c951f14UL, 0x9b4492ecUL, 0x000868d9UL,
+    0xc1f0eab4UL, 0x3c8db72fUL, 0x422aa0dbUL, 0x0008ace5UL, 0x59f35f44UL,
+    0x3c7bf683UL, 0x99157736UL, 0x0008f1aeUL, 0x9c06283cUL, 0x3ca360baUL,
+    0xb0cdc5e4UL, 0x00093737UL, 0x20f962aaUL, 0x3c95e8d1UL, 0x9fde4e4fUL,
+    0x00097d82UL, 0x2b91ce27UL, 0x3c71affcUL, 0x82a3f090UL, 0x0009c491UL,
+    0x589a2ebdUL, 0x3c9b6d34UL, 0x7b5de564UL, 0x000a0c66UL, 0x9ab89880UL,
+    0x3c95277cUL, 0xb23e255cUL, 0x000a5503UL, 0x6e735ab3UL, 0x3c846984UL,
+    0x5579fdbfUL, 0x000a9e6bUL, 0x92cb3387UL, 0x3c8c1a77UL, 0x995ad3adUL,
+    0x000ae89fUL, 0xdc2d1d96UL, 0x3ca22466UL, 0xb84f15faUL, 0x000b33a2UL,
+    0xb19505aeUL, 0x3ca1112eUL, 0xf2fb5e46UL, 0x000b7f76UL, 0x0a5fddcdUL,
+    0x3c74ffd7UL, 0x904bc1d2UL, 0x000bcc1eUL, 0x30af0cb3UL, 0x3c736eaeUL,
+    0xdd85529cUL, 0x000c199bUL, 0xd10959acUL, 0x3c84e08fUL, 0x2e57d14bUL,
+    0x000c67f1UL, 0x6c921968UL, 0x3c676b2cUL, 0xdcef9069UL, 0x000cb720UL,
+    0x36df99b3UL, 0x3c937009UL, 0x4a07897bUL, 0x000d072dUL, 0xa63d07a7UL,
+    0x3c74a385UL, 0xdcfba487UL, 0x000d5818UL, 0xd5c192acUL, 0x3c8e5a50UL,
+    0x03db3285UL, 0x000da9e6UL, 0x1c4a9792UL, 0x3c98bb73UL, 0x337b9b5eUL,
+    0x000dfc97UL, 0x603a88d3UL, 0x3c74b604UL, 0xe78b3ff6UL, 0x000e502eUL,
+    0x92094926UL, 0x3c916f27UL, 0xa2a490d9UL, 0x000ea4afUL, 0x41aa2008UL,
+    0x3c8ec3bcUL, 0xee615a27UL, 0x000efa1bUL, 0x31d185eeUL, 0x3c8a64a9UL,
+    0x5b6e4540UL, 0x000f5076UL, 0x4d91cd9dUL, 0x3c77893bUL, 0x819e90d8UL,
+    0x000fa7c1UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x7ff00000UL,
+    0x00000000UL, 0x00000000UL, 0xffffffffUL, 0x7fefffffUL, 0x00000000UL,
+    0x00100000UL
+};
+
+//registers,
+// input: (rbp + 8)
+// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
+//          rax, rdx, rcx, rbx (tmp)
+
+// Code generated by Intel C compiler for LIBM library
+
+void MacroAssembler::fast_exp(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
+  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
+  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
+  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
+  Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
+
+  assert_different_registers(tmp, eax, ecx, edx);
+  jmp(start);
+  address static_const_table = (address)_static_const_table;
+
+  bind(start);
+  subl(rsp, 120);
+  movl(Address(rsp, 64), tmp);
+  lea(tmp, ExternalAddress(static_const_table));
+  movdqu(xmm0, Address(rsp, 128));
+  unpcklpd(xmm0, xmm0);
+  movdqu(xmm1, Address(tmp, 64));          // 0x652b82feUL, 0x40571547UL, 0x652b82feUL, 0x40571547UL
+  movdqu(xmm6, Address(tmp, 48));          // 0x00000000UL, 0x43380000UL, 0x00000000UL, 0x43380000UL
+  movdqu(xmm2, Address(tmp, 80));          // 0xfefa0000UL, 0x3f862e42UL, 0xfefa0000UL, 0x3f862e42UL
+  movdqu(xmm3, Address(tmp, 96));          // 0xbc9e3b3aUL, 0x3d1cf79aUL, 0xbc9e3b3aUL, 0x3d1cf79aUL
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32767);
+  movl(edx, 16527);
+  subl(edx, eax);
+  subl(eax, 15504);
+  orl(edx, eax);
+  cmpl(edx, INT_MIN);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
+  mulpd(xmm1, xmm0);
+  addpd(xmm1, xmm6);
+  movapd(xmm7, xmm1);
+  subpd(xmm1, xmm6);
+  mulpd(xmm2, xmm1);
+  movdqu(xmm4, Address(tmp, 128));         // 0xe3289860UL, 0x3f56c15cUL, 0x555b9e25UL, 0x3fa55555UL
+  mulpd(xmm3, xmm1);
+  movdqu(xmm5, Address(tmp, 144));         // 0xc090cf0fUL, 0x3f811115UL, 0x55548ba1UL, 0x3fc55555UL
+  subpd(xmm0, xmm2);
+  movdl(eax, xmm7);
+  movl(ecx, eax);
+  andl(ecx, 63);
+  shll(ecx, 4);
+  sarl(eax, 6);
+  movl(edx, eax);
+  movdqu(xmm6, Address(tmp, 16));          // 0xffffffc0UL, 0x00000000UL, 0xffffffc0UL, 0x00000000UL
+  pand(xmm7, xmm6);
+  movdqu(xmm6, Address(tmp, 32));          // 0x0000ffc0UL, 0x00000000UL, 0x0000ffc0UL, 0x00000000UL
+  paddq(xmm7, xmm6);
+  psllq(xmm7, 46);
+  subpd(xmm0, xmm3);
+  movdqu(xmm2, Address(tmp, ecx, Address::times_1, 160));
+  mulpd(xmm4, xmm0);
+  movapd(xmm6, xmm0);
+  movapd(xmm1, xmm0);
+  mulpd(xmm6, xmm6);
+  mulpd(xmm0, xmm6);
+  addpd(xmm5, xmm4);
+  mulsd(xmm0, xmm6);
+  mulpd(xmm6, Address(tmp, 112));          // 0xfffffffeUL, 0x3fdfffffUL, 0xfffffffeUL, 0x3fdfffffUL
+  addsd(xmm1, xmm2);
+  unpckhpd(xmm2, xmm2);
+  mulpd(xmm0, xmm5);
+  addsd(xmm1, xmm0);
+  por(xmm2, xmm7);
+  unpckhpd(xmm0, xmm0);
+  addsd(xmm0, xmm1);
+  addsd(xmm0, xmm6);
+  addl(edx, 894);
+  cmpl(edx, 1916);
+  jcc(Assembler::above, L_2TAG_PACKET_1_0_2);
+  mulsd(xmm0, xmm2);
+  addsd(xmm0, xmm2);
+  jmp(L_2TAG_PACKET_2_0_2);
+
+  bind(L_2TAG_PACKET_1_0_2);
+  fnstcw(Address(rsp, 24));
+  movzwl(edx, Address(rsp, 24));
+  orl(edx, 768);
+  movw(Address(rsp, 28), edx);
+  fldcw(Address(rsp, 28));
+  movl(edx, eax);
+  sarl(eax, 1);
+  subl(edx, eax);
+  movdqu(xmm6, Address(tmp, 0));           // 0x00000000UL, 0xfff00000UL, 0x00000000UL, 0xfff00000UL
+  pandn(xmm6, xmm2);
+  addl(eax, 1023);
+  movdl(xmm3, eax);
+  psllq(xmm3, 52);
+  por(xmm6, xmm3);
+  addl(edx, 1023);
+  movdl(xmm4, edx);
+  psllq(xmm4, 52);
+  movsd(Address(rsp, 8), xmm0);
+  fld_d(Address(rsp, 8));
+  movsd(Address(rsp, 16), xmm6);
+  fld_d(Address(rsp, 16));
+  fmula(1);
+  faddp(1);
+  movsd(Address(rsp, 8), xmm4);
+  fld_d(Address(rsp, 8));
+  fmulp(1);
+  fstp_d(Address(rsp, 8));
+  movsd(xmm0, Address(rsp, 8));
+  fldcw(Address(rsp, 24));
+  pextrw(ecx, xmm0, 3);
+  andl(ecx, 32752);
+  cmpl(ecx, 32752);
+  jcc(Assembler::greaterEqual, L_2TAG_PACKET_3_0_2);
+  cmpl(ecx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_4_0_2);
+  jmp(L_2TAG_PACKET_2_0_2);
+  cmpl(ecx, INT_MIN);
+  jcc(Assembler::less, L_2TAG_PACKET_3_0_2);
+  cmpl(ecx, -1064950997);
+  jcc(Assembler::less, L_2TAG_PACKET_2_0_2);
+  jcc(Assembler::greater, L_2TAG_PACKET_4_0_2);
+  movl(edx, Address(rsp, 128));
+  cmpl(edx, -17155601);
+  jcc(Assembler::less, L_2TAG_PACKET_2_0_2);
+  jmp(L_2TAG_PACKET_4_0_2);
+
+  bind(L_2TAG_PACKET_3_0_2);
+  movl(edx, 14);
+  jmp(L_2TAG_PACKET_5_0_2);
+
+  bind(L_2TAG_PACKET_4_0_2);
+  movl(edx, 15);
+
+  bind(L_2TAG_PACKET_5_0_2);
+  movsd(Address(rsp, 0), xmm0);
+  movsd(xmm0, Address(rsp, 128));
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_6_0_2);
+
+  bind(L_2TAG_PACKET_7_0_2);
+  cmpl(eax, 2146435072);
+  jcc(Assembler::greaterEqual, L_2TAG_PACKET_8_0_2);
+  movl(eax, Address(rsp, 132));
+  cmpl(eax, INT_MIN);
+  jcc(Assembler::greaterEqual, L_2TAG_PACKET_9_0_2);
+  movsd(xmm0, Address(tmp, 1208));         // 0xffffffffUL, 0x7fefffffUL
+  mulsd(xmm0, xmm0);
+  movl(edx, 14);
+  jmp(L_2TAG_PACKET_5_0_2);
+
+  bind(L_2TAG_PACKET_9_0_2);
+  movsd(xmm0, Address(tmp, 1216));
+  mulsd(xmm0, xmm0);
+  movl(edx, 15);
+  jmp(L_2TAG_PACKET_5_0_2);
+
+  bind(L_2TAG_PACKET_8_0_2);
+  movl(edx, Address(rsp, 128));
+  cmpl(eax, 2146435072);
+  jcc(Assembler::above, L_2TAG_PACKET_10_0_2);
+  cmpl(edx, 0);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_10_0_2);
+  movl(eax, Address(rsp, 132));
+  cmpl(eax, 2146435072);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_11_0_2);
+  movsd(xmm0, Address(tmp, 1192));         // 0x00000000UL, 0x7ff00000UL
+  jmp(L_2TAG_PACKET_2_0_2);
+
+  bind(L_2TAG_PACKET_11_0_2);
+  movsd(xmm0, Address(tmp, 1200));         // 0x00000000UL, 0x00000000UL
+  jmp(L_2TAG_PACKET_2_0_2);
+
+  bind(L_2TAG_PACKET_10_0_2);
+  movsd(xmm0, Address(rsp, 128));
+  addsd(xmm0, xmm0);
+  jmp(L_2TAG_PACKET_2_0_2);
+
+  bind(L_2TAG_PACKET_0_0_2);
+  movl(eax, Address(rsp, 132));
+  andl(eax, 2147483647);
+  cmpl(eax, 1083179008);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_7_0_2);
+  movsd(xmm0, Address(rsp, 128));
+  addsd(xmm0, Address(tmp, 1184));         // 0x00000000UL, 0x3ff00000UL
+  jmp(L_2TAG_PACKET_2_0_2);
+
+  bind(L_2TAG_PACKET_2_0_2);
+  movsd(Address(rsp, 48), xmm0);
+  fld_d(Address(rsp, 48));
+
+  bind(L_2TAG_PACKET_6_0_2);
+  movl(tmp, Address(rsp, 64));
+}
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86_log.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,655 @@
+/*
+* Copyright (c) 2016, Intel Corporation.
+* Intel Math Library (LIBM) Source Code
+*
+* 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.
+*
+*/
+
+#include "precompiled.hpp"
+#include "asm/assembler.hpp"
+#include "asm/assembler.inline.hpp"
+#include "macroAssembler_x86.hpp"
+
+#ifdef _MSC_VER
+#define ALIGNED_(x) __declspec(align(x))
+#else
+#define ALIGNED_(x) __attribute__ ((aligned(x)))
+#endif
+
+/******************************************************************************/
+//                     ALGORITHM DESCRIPTION - LOG()
+//                     ---------------------
+//
+//    x=2^k * mx, mx in [1,2)
+//
+//    Get B~1/mx based on the output of rcpss instruction (B0)
+//    B = int((B0*2^7+0.5))/2^7
+//
+//    Reduced argument: r=B*mx-1.0 (computed accurately in high and low parts)
+//
+//    Result:  k*log(2) - log(B) + p(r) if |x-1| >= small value (2^-6)  and
+//             p(r) is a degree 7 polynomial
+//             -log(B) read from data table (high, low parts)
+//             Result is formed from high and low parts
+//
+// Special cases:
+//  log(NaN) = quiet NaN, and raise invalid exception
+//  log(+INF) = that INF
+//  log(0) = -INF with divide-by-zero exception raised
+//  log(1) = +0
+//  log(x) = NaN with invalid exception raised if x < -0, including -INF
+//
+/******************************************************************************/
+
+#ifdef _LP64
+// The 64 bit code is at most SSE2 compliant
+ALIGNED_(16) juint _L_tbl[] =
+{
+    0xfefa3800UL, 0x3fe62e42UL, 0x93c76730UL, 0x3d2ef357UL, 0xaa241800UL,
+    0x3fe5ee82UL, 0x0cda46beUL, 0x3d220238UL, 0x5c364800UL, 0x3fe5af40UL,
+    0xac10c9fbUL, 0x3d2dfa63UL, 0x26bb8c00UL, 0x3fe5707aUL, 0xff3303ddUL,
+    0x3d09980bUL, 0x26867800UL, 0x3fe5322eUL, 0x5d257531UL, 0x3d05ccc4UL,
+    0x835a5000UL, 0x3fe4f45aUL, 0x6d93b8fbUL, 0xbd2e6c51UL, 0x6f970c00UL,
+    0x3fe4b6fdUL, 0xed4c541cUL, 0x3cef7115UL, 0x27e8a400UL, 0x3fe47a15UL,
+    0xf94d60aaUL, 0xbd22cb6aUL, 0xf2f92400UL, 0x3fe43d9fUL, 0x481051f7UL,
+    0xbcfd984fUL, 0x2125cc00UL, 0x3fe4019cUL, 0x30f0c74cUL, 0xbd26ce79UL,
+    0x0c36c000UL, 0x3fe3c608UL, 0x7cfe13c2UL, 0xbd02b736UL, 0x17197800UL,
+    0x3fe38ae2UL, 0xbb5569a4UL, 0xbd218b7aUL, 0xad9d8c00UL, 0x3fe35028UL,
+    0x9527e6acUL, 0x3d10b83fUL, 0x44340800UL, 0x3fe315daUL, 0xc5a0ed9cUL,
+    0xbd274e93UL, 0x57b0e000UL, 0x3fe2dbf5UL, 0x07b9dc11UL, 0xbd17a6e5UL,
+    0x6d0ec000UL, 0x3fe2a278UL, 0xe797882dUL, 0x3d206d2bUL, 0x1134dc00UL,
+    0x3fe26962UL, 0x05226250UL, 0xbd0b61f1UL, 0xd8bebc00UL, 0x3fe230b0UL,
+    0x6e48667bUL, 0x3d12fc06UL, 0x5fc61800UL, 0x3fe1f863UL, 0xc9fe81d3UL,
+    0xbd2a7242UL, 0x49ae6000UL, 0x3fe1c078UL, 0xed70e667UL, 0x3cccacdeUL,
+    0x40f23c00UL, 0x3fe188eeUL, 0xf8ab4650UL, 0x3d14cc4eUL, 0xf6f29800UL,
+    0x3fe151c3UL, 0xa293ae49UL, 0xbd2edd97UL, 0x23c75c00UL, 0x3fe11af8UL,
+    0xbb9ddcb2UL, 0xbd258647UL, 0x8611cc00UL, 0x3fe0e489UL, 0x07801742UL,
+    0x3d1c2998UL, 0xe2d05400UL, 0x3fe0ae76UL, 0x887e7e27UL, 0x3d1f486bUL,
+    0x0533c400UL, 0x3fe078bfUL, 0x41edf5fdUL, 0x3d268122UL, 0xbe760400UL,
+    0x3fe04360UL, 0xe79539e0UL, 0xbd04c45fUL, 0xe5b20800UL, 0x3fe00e5aUL,
+    0xb1727b1cUL, 0xbd053ba3UL, 0xaf7a4800UL, 0x3fdfb358UL, 0x3c164935UL,
+    0x3d0085faUL, 0xee031800UL, 0x3fdf4aa7UL, 0x6f014a8bUL, 0x3d12cde5UL,
+    0x56b41000UL, 0x3fdee2a1UL, 0x5a470251UL, 0x3d2f27f4UL, 0xc3ddb000UL,
+    0x3fde7b42UL, 0x5372bd08UL, 0xbd246550UL, 0x1a272800UL, 0x3fde148aUL,
+    0x07322938UL, 0xbd1326b2UL, 0x484c9800UL, 0x3fddae75UL, 0x60dc616aUL,
+    0xbd1ea42dUL, 0x46def800UL, 0x3fdd4902UL, 0xe9a767a8UL, 0x3d235bafUL,
+    0x18064800UL, 0x3fdce42fUL, 0x3ec7a6b0UL, 0xbd0797c3UL, 0xc7455800UL,
+    0x3fdc7ff9UL, 0xc15249aeUL, 0xbd29b6ddUL, 0x693fa000UL, 0x3fdc1c60UL,
+    0x7fe8e180UL, 0x3d2cec80UL, 0x1b80e000UL, 0x3fdbb961UL, 0xf40a666dUL,
+    0x3d27d85bUL, 0x04462800UL, 0x3fdb56faUL, 0x2d841995UL, 0x3d109525UL,
+    0x5248d000UL, 0x3fdaf529UL, 0x52774458UL, 0xbd217cc5UL, 0x3c8ad800UL,
+    0x3fda93edUL, 0xbea77a5dUL, 0x3d1e36f2UL, 0x0224f800UL, 0x3fda3344UL,
+    0x7f9d79f5UL, 0x3d23c645UL, 0xea15f000UL, 0x3fd9d32bUL, 0x10d0c0b0UL,
+    0xbd26279eUL, 0x43135800UL, 0x3fd973a3UL, 0xa502d9f0UL, 0xbd152313UL,
+    0x635bf800UL, 0x3fd914a8UL, 0x2ee6307dUL, 0xbd1766b5UL, 0xa88b3000UL,
+    0x3fd8b639UL, 0xe5e70470UL, 0xbd205ae1UL, 0x776dc800UL, 0x3fd85855UL,
+    0x3333778aUL, 0x3d2fd56fUL, 0x3bd81800UL, 0x3fd7fafaUL, 0xc812566aUL,
+    0xbd272090UL, 0x687cf800UL, 0x3fd79e26UL, 0x2efd1778UL, 0x3d29ec7dUL,
+    0x76c67800UL, 0x3fd741d8UL, 0x49dc60b3UL, 0x3d2d8b09UL, 0xe6af1800UL,
+    0x3fd6e60eUL, 0x7c222d87UL, 0x3d172165UL, 0x3e9c6800UL, 0x3fd68ac8UL,
+    0x2756eba0UL, 0x3d20a0d3UL, 0x0b3ab000UL, 0x3fd63003UL, 0xe731ae00UL,
+    0xbd2db623UL, 0xdf596000UL, 0x3fd5d5bdUL, 0x08a465dcUL, 0xbd0a0b2aUL,
+    0x53c8d000UL, 0x3fd57bf7UL, 0xee5d40efUL, 0x3d1fadedUL, 0x0738a000UL,
+    0x3fd522aeUL, 0x8164c759UL, 0x3d2ebe70UL, 0x9e173000UL, 0x3fd4c9e0UL,
+    0x1b0ad8a4UL, 0xbd2e2089UL, 0xc271c800UL, 0x3fd4718dUL, 0x0967d675UL,
+    0xbd2f27ceUL, 0x23d5e800UL, 0x3fd419b4UL, 0xec90e09dUL, 0x3d08e436UL,
+    0x77333000UL, 0x3fd3c252UL, 0xb606bd5cUL, 0x3d183b54UL, 0x76be1000UL,
+    0x3fd36b67UL, 0xb0f177c8UL, 0x3d116ecdUL, 0xe1d36000UL, 0x3fd314f1UL,
+    0xd3213cb8UL, 0xbd28e27aUL, 0x7cdc9000UL, 0x3fd2bef0UL, 0x4a5004f4UL,
+    0x3d2a9cfaUL, 0x1134d800UL, 0x3fd26962UL, 0xdf5bb3b6UL, 0x3d2c93c1UL,
+    0x6d0eb800UL, 0x3fd21445UL, 0xba46baeaUL, 0x3d0a87deUL, 0x635a6800UL,
+    0x3fd1bf99UL, 0x5147bdb7UL, 0x3d2ca6edUL, 0xcbacf800UL, 0x3fd16b5cUL,
+    0xf7a51681UL, 0x3d2b9acdUL, 0x8227e800UL, 0x3fd1178eUL, 0x63a5f01cUL,
+    0xbd2c210eUL, 0x67616000UL, 0x3fd0c42dUL, 0x163ceae9UL, 0x3d27188bUL,
+    0x604d5800UL, 0x3fd07138UL, 0x16ed4e91UL, 0x3cf89cdbUL, 0x5626c800UL,
+    0x3fd01eaeUL, 0x1485e94aUL, 0xbd16f08cUL, 0x6cb3b000UL, 0x3fcf991cUL,
+    0xca0cdf30UL, 0x3d1bcbecUL, 0xe4dd0000UL, 0x3fcef5adUL, 0x65bb8e11UL,
+    0xbcca2115UL, 0xffe71000UL, 0x3fce530eUL, 0x6041f430UL, 0x3cc21227UL,
+    0xb0d49000UL, 0x3fcdb13dUL, 0xf715b035UL, 0xbd2aff2aUL, 0xf2656000UL,
+    0x3fcd1037UL, 0x75b6f6e4UL, 0xbd084a7eUL, 0xc6f01000UL, 0x3fcc6ffbUL,
+    0xc5962bd2UL, 0xbcf1ec72UL, 0x383be000UL, 0x3fcbd087UL, 0x595412b6UL,
+    0xbd2d4bc4UL, 0x575bd000UL, 0x3fcb31d8UL, 0x4eace1aaUL, 0xbd0c358dUL,
+    0x3c8ae000UL, 0x3fca93edUL, 0x50562169UL, 0xbd287243UL, 0x07089000UL,
+    0x3fc9f6c4UL, 0x6865817aUL, 0x3d29904dUL, 0xdcf70000UL, 0x3fc95a5aUL,
+    0x58a0ff6fUL, 0x3d07f228UL, 0xeb390000UL, 0x3fc8beafUL, 0xaae92cd1UL,
+    0xbd073d54UL, 0x6551a000UL, 0x3fc823c1UL, 0x9a631e83UL, 0x3d1e0ddbUL,
+    0x85445000UL, 0x3fc7898dUL, 0x70914305UL, 0xbd1c6610UL, 0x8b757000UL,
+    0x3fc6f012UL, 0xe59c21e1UL, 0xbd25118dUL, 0xbe8c1000UL, 0x3fc6574eUL,
+    0x2c3c2e78UL, 0x3d19cf8bUL, 0x6b544000UL, 0x3fc5bf40UL, 0xeb68981cUL,
+    0xbd127023UL, 0xe4a1b000UL, 0x3fc527e5UL, 0xe5697dc7UL, 0x3d2633e8UL,
+    0x8333b000UL, 0x3fc4913dUL, 0x54fdb678UL, 0x3d258379UL, 0xa5993000UL,
+    0x3fc3fb45UL, 0x7e6a354dUL, 0xbd2cd1d8UL, 0xb0159000UL, 0x3fc365fcUL,
+    0x234b7289UL, 0x3cc62fa8UL, 0x0c868000UL, 0x3fc2d161UL, 0xcb81b4a1UL,
+    0x3d039d6cUL, 0x2a49c000UL, 0x3fc23d71UL, 0x8fd3df5cUL, 0x3d100d23UL,
+    0x7e23f000UL, 0x3fc1aa2bUL, 0x44389934UL, 0x3d2ca78eUL, 0x8227e000UL,
+    0x3fc1178eUL, 0xce2d07f2UL, 0x3d21ef78UL, 0xb59e4000UL, 0x3fc08598UL,
+    0x7009902cUL, 0xbd27e5ddUL, 0x39dbe000UL, 0x3fbfe891UL, 0x4fa10afdUL,
+    0xbd2534d6UL, 0x830a2000UL, 0x3fbec739UL, 0xafe645e0UL, 0xbd2dc068UL,
+    0x63844000UL, 0x3fbda727UL, 0x1fa71733UL, 0x3d1a8940UL, 0x01bc4000UL,
+    0x3fbc8858UL, 0xc65aacd3UL, 0x3d2646d1UL, 0x8dad6000UL, 0x3fbb6ac8UL,
+    0x2bf768e5UL, 0xbd139080UL, 0x40b1c000UL, 0x3fba4e76UL, 0xb94407c8UL,
+    0xbd0e42b6UL, 0x5d594000UL, 0x3fb9335eUL, 0x3abd47daUL, 0x3d23115cUL,
+    0x2f40e000UL, 0x3fb8197eUL, 0xf96ffdf7UL, 0x3d0f80dcUL, 0x0aeac000UL,
+    0x3fb700d3UL, 0xa99ded32UL, 0x3cec1e8dUL, 0x4d97a000UL, 0x3fb5e95aUL,
+    0x3c5d1d1eUL, 0xbd2c6906UL, 0x5d208000UL, 0x3fb4d311UL, 0x82f4e1efUL,
+    0xbcf53a25UL, 0xa7d1e000UL, 0x3fb3bdf5UL, 0xa5db4ed7UL, 0x3d2cc85eUL,
+    0xa4472000UL, 0x3fb2aa04UL, 0xae9c697dUL, 0xbd20b6e8UL, 0xd1466000UL,
+    0x3fb1973bUL, 0x560d9e9bUL, 0xbd25325dUL, 0xb59e4000UL, 0x3fb08598UL,
+    0x7009902cUL, 0xbd17e5ddUL, 0xc006c000UL, 0x3faeea31UL, 0x4fc93b7bUL,
+    0xbd0e113eUL, 0xcdddc000UL, 0x3faccb73UL, 0x47d82807UL, 0xbd1a68f2UL,
+    0xd0fb0000UL, 0x3faaaef2UL, 0x353bb42eUL, 0x3d20fc1aUL, 0x149fc000UL,
+    0x3fa894aaUL, 0xd05a267dUL, 0xbd197995UL, 0xf2d4c000UL, 0x3fa67c94UL,
+    0xec19afa2UL, 0xbd029efbUL, 0xd42e0000UL, 0x3fa466aeUL, 0x75bdfd28UL,
+    0xbd2c1673UL, 0x2f8d0000UL, 0x3fa252f3UL, 0xe021b67bUL, 0x3d283e9aUL,
+    0x89e74000UL, 0x3fa0415dUL, 0x5cf1d753UL, 0x3d0111c0UL, 0xec148000UL,
+    0x3f9c63d2UL, 0x3f9eb2f3UL, 0x3d2578c6UL, 0x28c90000UL, 0x3f984925UL,
+    0x325a0c34UL, 0xbd2aa0baUL, 0x25980000UL, 0x3f9432a9UL, 0x928637feUL,
+    0x3d098139UL, 0x58938000UL, 0x3f902056UL, 0x06e2f7d2UL, 0xbd23dc5bUL,
+    0xa3890000UL, 0x3f882448UL, 0xda74f640UL, 0xbd275577UL, 0x75890000UL,
+    0x3f801015UL, 0x999d2be8UL, 0xbd10c76bUL, 0x59580000UL, 0x3f700805UL,
+    0xcb31c67bUL, 0x3d2166afUL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x80000000UL
+};
+
+ALIGNED_(16) juint _log2[] =
+{
+    0xfefa3800UL, 0x3fa62e42UL, 0x93c76730UL, 0x3ceef357UL
+};
+
+ALIGNED_(16) juint _coeff[] =
+{
+    0x92492492UL, 0x3fc24924UL, 0x00000000UL, 0xbfd00000UL, 0x3d6fb175UL,
+    0xbfc5555eUL, 0x55555555UL, 0x3fd55555UL, 0x9999999aUL, 0x3fc99999UL,
+    0x00000000UL, 0xbfe00000UL
+};
+
+//registers,
+// input: xmm0
+// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
+//          rax, rdx, rcx, r8, r11
+
+void MacroAssembler::fast_log(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp1, Register tmp2) {
+  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
+  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
+  Label L_2TAG_PACKET_8_0_2;
+  Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
+
+  assert_different_registers(tmp1, tmp2, eax, ecx, edx);
+  jmp(start);
+  address L_tbl = (address)_L_tbl;
+  address log2 = (address)_log2;
+  address coeff = (address)_coeff;
+
+  bind(start);
+  subq(rsp, 24);
+  movsd(Address(rsp, 0), xmm0);
+  mov64(rax, 0x3ff0000000000000);
+  movdq(xmm2, rax);
+  mov64(rdx, 0x77f0000000000000);
+  movdq(xmm3, rdx);
+  movl(ecx, 32768);
+  movdl(xmm4, rcx);
+  mov64(tmp1, 0xffffe00000000000);
+  movdq(xmm5, tmp1);
+  movdqu(xmm1, xmm0);
+  pextrw(eax, xmm0, 3);
+  por(xmm0, xmm2);
+  movl(ecx, 16352);
+  psrlq(xmm0, 27);
+  lea(tmp2, ExternalAddress(L_tbl));
+  psrld(xmm0, 2);
+  rcpps(xmm0, xmm0);
+  psllq(xmm1, 12);
+  pshufd(xmm6, xmm5, 228);
+  psrlq(xmm1, 12);
+  subl(eax, 16);
+  cmpl(eax, 32736);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
+
+  bind(L_2TAG_PACKET_1_0_2);
+  paddd(xmm0, xmm4);
+  por(xmm1, xmm3);
+  movdl(edx, xmm0);
+  psllq(xmm0, 29);
+  pand(xmm5, xmm1);
+  pand(xmm0, xmm6);
+  subsd(xmm1, xmm5);
+  mulpd(xmm5, xmm0);
+  andl(eax, 32752);
+  subl(eax, ecx);
+  cvtsi2sdl(xmm7, eax);
+  mulsd(xmm1, xmm0);
+  movq(xmm6, ExternalAddress(log2));       // 0xfefa3800UL, 0x3fa62e42UL
+  movdqu(xmm3, ExternalAddress(coeff));    // 0x92492492UL, 0x3fc24924UL, 0x00000000UL, 0xbfd00000UL
+  subsd(xmm5, xmm2);
+  andl(edx, 16711680);
+  shrl(edx, 12);
+  movdqu(xmm0, Address(tmp2, edx));
+  movdqu(xmm4, ExternalAddress(16 + coeff)); // 0x3d6fb175UL, 0xbfc5555eUL, 0x55555555UL, 0x3fd55555UL
+  addsd(xmm1, xmm5);
+  movdqu(xmm2, ExternalAddress(32 + coeff)); // 0x9999999aUL, 0x3fc99999UL, 0x00000000UL, 0xbfe00000UL
+  mulsd(xmm6, xmm7);
+  if (VM_Version::supports_sse3()) {
+    movddup(xmm5, xmm1);
+  }
+  else {
+    movdqu(xmm5, xmm1);
+    movlhps(xmm5, xmm5);
+  }
+  mulsd(xmm7, ExternalAddress(8 + log2));    // 0x93c76730UL, 0x3ceef357UL
+  mulsd(xmm3, xmm1);
+  addsd(xmm0, xmm6);
+  mulpd(xmm4, xmm5);
+  mulpd(xmm5, xmm5);
+  if (VM_Version::supports_sse3()) {
+    movddup(xmm6, xmm0);
+  }
+  else {
+    movdqu(xmm6, xmm0);
+    movlhps(xmm6, xmm6);
+  }
+  addsd(xmm0, xmm1);
+  addpd(xmm4, xmm2);
+  mulpd(xmm3, xmm5);
+  subsd(xmm6, xmm0);
+  mulsd(xmm4, xmm1);
+  pshufd(xmm2, xmm0, 238);
+  addsd(xmm1, xmm6);
+  mulsd(xmm5, xmm5);
+  addsd(xmm7, xmm2);
+  addpd(xmm4, xmm3);
+  addsd(xmm1, xmm7);
+  mulpd(xmm4, xmm5);
+  addsd(xmm1, xmm4);
+  pshufd(xmm5, xmm4, 238);
+  addsd(xmm1, xmm5);
+  addsd(xmm0, xmm1);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_0_0_2);
+  movq(xmm0, Address(rsp, 0));
+  movq(xmm1, Address(rsp, 0));
+  addl(eax, 16);
+  cmpl(eax, 32768);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_2_0_2);
+  cmpl(eax, 16);
+  jcc(Assembler::below, L_2TAG_PACKET_3_0_2);
+
+  bind(L_2TAG_PACKET_4_0_2);
+  addsd(xmm0, xmm0);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_5_0_2);
+  jcc(Assembler::above, L_2TAG_PACKET_4_0_2);
+  cmpl(edx, 0);
+  jcc(Assembler::above, L_2TAG_PACKET_4_0_2);
+  jmp(L_2TAG_PACKET_6_0_2);
+
+  bind(L_2TAG_PACKET_3_0_2);
+  xorpd(xmm1, xmm1);
+  addsd(xmm1, xmm0);
+  movdl(edx, xmm1);
+  psrlq(xmm1, 32);
+  movdl(ecx, xmm1);
+  orl(edx, ecx);
+  cmpl(edx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_7_0_2);
+  xorpd(xmm1, xmm1);
+  movl(eax, 18416);
+  pinsrw(xmm1, eax, 3);
+  mulsd(xmm0, xmm1);
+  movdqu(xmm1, xmm0);
+  pextrw(eax, xmm0, 3);
+  por(xmm0, xmm2);
+  psrlq(xmm0, 27);
+  movl(ecx, 18416);
+  psrld(xmm0, 2);
+  rcpps(xmm0, xmm0);
+  psllq(xmm1, 12);
+  pshufd(xmm6, xmm5, 228);
+  psrlq(xmm1, 12);
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_2_0_2);
+  movdl(edx, xmm1);
+  psrlq(xmm1, 32);
+  movdl(ecx, xmm1);
+  addl(ecx, ecx);
+  cmpl(ecx, -2097152);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_5_0_2);
+  orl(edx, ecx);
+  cmpl(edx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_7_0_2);
+
+  bind(L_2TAG_PACKET_6_0_2);
+  xorpd(xmm1, xmm1);
+  xorpd(xmm0, xmm0);
+  movl(eax, 32752);
+  pinsrw(xmm1, eax, 3);
+  mulsd(xmm0, xmm1);
+  movl(Address(rsp, 16), 3);
+  jmp(L_2TAG_PACKET_8_0_2);
+  bind(L_2TAG_PACKET_7_0_2);
+  xorpd(xmm1, xmm1);
+  xorpd(xmm0, xmm0);
+  movl(eax, 49136);
+  pinsrw(xmm0, eax, 3);
+  divsd(xmm0, xmm1);
+  movl(Address(rsp, 16), 2);
+
+  bind(L_2TAG_PACKET_8_0_2);
+  movq(Address(rsp, 8), xmm0);
+
+  bind(B1_3);
+  movq(xmm0, Address(rsp, 8));
+
+  bind(B1_5);
+  addq(rsp, 24);
+}
+#else
+// The 32 bit code is at most SSE2 compliant
+ALIGNED_(16) juint _static_const_table_log[] =
+{
+    0xfefa3800UL, 0x3fe62e42UL, 0x93c76730UL, 0x3d2ef357UL, 0xaa241800UL,
+    0x3fe5ee82UL, 0x0cda46beUL, 0x3d220238UL, 0x5c364800UL, 0x3fe5af40UL,
+    0xac10c9fbUL, 0x3d2dfa63UL, 0x26bb8c00UL, 0x3fe5707aUL, 0xff3303ddUL,
+    0x3d09980bUL, 0x26867800UL, 0x3fe5322eUL, 0x5d257531UL, 0x3d05ccc4UL,
+    0x835a5000UL, 0x3fe4f45aUL, 0x6d93b8fbUL, 0xbd2e6c51UL, 0x6f970c00UL,
+    0x3fe4b6fdUL, 0xed4c541cUL, 0x3cef7115UL, 0x27e8a400UL, 0x3fe47a15UL,
+    0xf94d60aaUL, 0xbd22cb6aUL, 0xf2f92400UL, 0x3fe43d9fUL, 0x481051f7UL,
+    0xbcfd984fUL, 0x2125cc00UL, 0x3fe4019cUL, 0x30f0c74cUL, 0xbd26ce79UL,
+    0x0c36c000UL, 0x3fe3c608UL, 0x7cfe13c2UL, 0xbd02b736UL, 0x17197800UL,
+    0x3fe38ae2UL, 0xbb5569a4UL, 0xbd218b7aUL, 0xad9d8c00UL, 0x3fe35028UL,
+    0x9527e6acUL, 0x3d10b83fUL, 0x44340800UL, 0x3fe315daUL, 0xc5a0ed9cUL,
+    0xbd274e93UL, 0x57b0e000UL, 0x3fe2dbf5UL, 0x07b9dc11UL, 0xbd17a6e5UL,
+    0x6d0ec000UL, 0x3fe2a278UL, 0xe797882dUL, 0x3d206d2bUL, 0x1134dc00UL,
+    0x3fe26962UL, 0x05226250UL, 0xbd0b61f1UL, 0xd8bebc00UL, 0x3fe230b0UL,
+    0x6e48667bUL, 0x3d12fc06UL, 0x5fc61800UL, 0x3fe1f863UL, 0xc9fe81d3UL,
+    0xbd2a7242UL, 0x49ae6000UL, 0x3fe1c078UL, 0xed70e667UL, 0x3cccacdeUL,
+    0x40f23c00UL, 0x3fe188eeUL, 0xf8ab4650UL, 0x3d14cc4eUL, 0xf6f29800UL,
+    0x3fe151c3UL, 0xa293ae49UL, 0xbd2edd97UL, 0x23c75c00UL, 0x3fe11af8UL,
+    0xbb9ddcb2UL, 0xbd258647UL, 0x8611cc00UL, 0x3fe0e489UL, 0x07801742UL,
+    0x3d1c2998UL, 0xe2d05400UL, 0x3fe0ae76UL, 0x887e7e27UL, 0x3d1f486bUL,
+    0x0533c400UL, 0x3fe078bfUL, 0x41edf5fdUL, 0x3d268122UL, 0xbe760400UL,
+    0x3fe04360UL, 0xe79539e0UL, 0xbd04c45fUL, 0xe5b20800UL, 0x3fe00e5aUL,
+    0xb1727b1cUL, 0xbd053ba3UL, 0xaf7a4800UL, 0x3fdfb358UL, 0x3c164935UL,
+    0x3d0085faUL, 0xee031800UL, 0x3fdf4aa7UL, 0x6f014a8bUL, 0x3d12cde5UL,
+    0x56b41000UL, 0x3fdee2a1UL, 0x5a470251UL, 0x3d2f27f4UL, 0xc3ddb000UL,
+    0x3fde7b42UL, 0x5372bd08UL, 0xbd246550UL, 0x1a272800UL, 0x3fde148aUL,
+    0x07322938UL, 0xbd1326b2UL, 0x484c9800UL, 0x3fddae75UL, 0x60dc616aUL,
+    0xbd1ea42dUL, 0x46def800UL, 0x3fdd4902UL, 0xe9a767a8UL, 0x3d235bafUL,
+    0x18064800UL, 0x3fdce42fUL, 0x3ec7a6b0UL, 0xbd0797c3UL, 0xc7455800UL,
+    0x3fdc7ff9UL, 0xc15249aeUL, 0xbd29b6ddUL, 0x693fa000UL, 0x3fdc1c60UL,
+    0x7fe8e180UL, 0x3d2cec80UL, 0x1b80e000UL, 0x3fdbb961UL, 0xf40a666dUL,
+    0x3d27d85bUL, 0x04462800UL, 0x3fdb56faUL, 0x2d841995UL, 0x3d109525UL,
+    0x5248d000UL, 0x3fdaf529UL, 0x52774458UL, 0xbd217cc5UL, 0x3c8ad800UL,
+    0x3fda93edUL, 0xbea77a5dUL, 0x3d1e36f2UL, 0x0224f800UL, 0x3fda3344UL,
+    0x7f9d79f5UL, 0x3d23c645UL, 0xea15f000UL, 0x3fd9d32bUL, 0x10d0c0b0UL,
+    0xbd26279eUL, 0x43135800UL, 0x3fd973a3UL, 0xa502d9f0UL, 0xbd152313UL,
+    0x635bf800UL, 0x3fd914a8UL, 0x2ee6307dUL, 0xbd1766b5UL, 0xa88b3000UL,
+    0x3fd8b639UL, 0xe5e70470UL, 0xbd205ae1UL, 0x776dc800UL, 0x3fd85855UL,
+    0x3333778aUL, 0x3d2fd56fUL, 0x3bd81800UL, 0x3fd7fafaUL, 0xc812566aUL,
+    0xbd272090UL, 0x687cf800UL, 0x3fd79e26UL, 0x2efd1778UL, 0x3d29ec7dUL,
+    0x76c67800UL, 0x3fd741d8UL, 0x49dc60b3UL, 0x3d2d8b09UL, 0xe6af1800UL,
+    0x3fd6e60eUL, 0x7c222d87UL, 0x3d172165UL, 0x3e9c6800UL, 0x3fd68ac8UL,
+    0x2756eba0UL, 0x3d20a0d3UL, 0x0b3ab000UL, 0x3fd63003UL, 0xe731ae00UL,
+    0xbd2db623UL, 0xdf596000UL, 0x3fd5d5bdUL, 0x08a465dcUL, 0xbd0a0b2aUL,
+    0x53c8d000UL, 0x3fd57bf7UL, 0xee5d40efUL, 0x3d1fadedUL, 0x0738a000UL,
+    0x3fd522aeUL, 0x8164c759UL, 0x3d2ebe70UL, 0x9e173000UL, 0x3fd4c9e0UL,
+    0x1b0ad8a4UL, 0xbd2e2089UL, 0xc271c800UL, 0x3fd4718dUL, 0x0967d675UL,
+    0xbd2f27ceUL, 0x23d5e800UL, 0x3fd419b4UL, 0xec90e09dUL, 0x3d08e436UL,
+    0x77333000UL, 0x3fd3c252UL, 0xb606bd5cUL, 0x3d183b54UL, 0x76be1000UL,
+    0x3fd36b67UL, 0xb0f177c8UL, 0x3d116ecdUL, 0xe1d36000UL, 0x3fd314f1UL,
+    0xd3213cb8UL, 0xbd28e27aUL, 0x7cdc9000UL, 0x3fd2bef0UL, 0x4a5004f4UL,
+    0x3d2a9cfaUL, 0x1134d800UL, 0x3fd26962UL, 0xdf5bb3b6UL, 0x3d2c93c1UL,
+    0x6d0eb800UL, 0x3fd21445UL, 0xba46baeaUL, 0x3d0a87deUL, 0x635a6800UL,
+    0x3fd1bf99UL, 0x5147bdb7UL, 0x3d2ca6edUL, 0xcbacf800UL, 0x3fd16b5cUL,
+    0xf7a51681UL, 0x3d2b9acdUL, 0x8227e800UL, 0x3fd1178eUL, 0x63a5f01cUL,
+    0xbd2c210eUL, 0x67616000UL, 0x3fd0c42dUL, 0x163ceae9UL, 0x3d27188bUL,
+    0x604d5800UL, 0x3fd07138UL, 0x16ed4e91UL, 0x3cf89cdbUL, 0x5626c800UL,
+    0x3fd01eaeUL, 0x1485e94aUL, 0xbd16f08cUL, 0x6cb3b000UL, 0x3fcf991cUL,
+    0xca0cdf30UL, 0x3d1bcbecUL, 0xe4dd0000UL, 0x3fcef5adUL, 0x65bb8e11UL,
+    0xbcca2115UL, 0xffe71000UL, 0x3fce530eUL, 0x6041f430UL, 0x3cc21227UL,
+    0xb0d49000UL, 0x3fcdb13dUL, 0xf715b035UL, 0xbd2aff2aUL, 0xf2656000UL,
+    0x3fcd1037UL, 0x75b6f6e4UL, 0xbd084a7eUL, 0xc6f01000UL, 0x3fcc6ffbUL,
+    0xc5962bd2UL, 0xbcf1ec72UL, 0x383be000UL, 0x3fcbd087UL, 0x595412b6UL,
+    0xbd2d4bc4UL, 0x575bd000UL, 0x3fcb31d8UL, 0x4eace1aaUL, 0xbd0c358dUL,
+    0x3c8ae000UL, 0x3fca93edUL, 0x50562169UL, 0xbd287243UL, 0x07089000UL,
+    0x3fc9f6c4UL, 0x6865817aUL, 0x3d29904dUL, 0xdcf70000UL, 0x3fc95a5aUL,
+    0x58a0ff6fUL, 0x3d07f228UL, 0xeb390000UL, 0x3fc8beafUL, 0xaae92cd1UL,
+    0xbd073d54UL, 0x6551a000UL, 0x3fc823c1UL, 0x9a631e83UL, 0x3d1e0ddbUL,
+    0x85445000UL, 0x3fc7898dUL, 0x70914305UL, 0xbd1c6610UL, 0x8b757000UL,
+    0x3fc6f012UL, 0xe59c21e1UL, 0xbd25118dUL, 0xbe8c1000UL, 0x3fc6574eUL,
+    0x2c3c2e78UL, 0x3d19cf8bUL, 0x6b544000UL, 0x3fc5bf40UL, 0xeb68981cUL,
+    0xbd127023UL, 0xe4a1b000UL, 0x3fc527e5UL, 0xe5697dc7UL, 0x3d2633e8UL,
+    0x8333b000UL, 0x3fc4913dUL, 0x54fdb678UL, 0x3d258379UL, 0xa5993000UL,
+    0x3fc3fb45UL, 0x7e6a354dUL, 0xbd2cd1d8UL, 0xb0159000UL, 0x3fc365fcUL,
+    0x234b7289UL, 0x3cc62fa8UL, 0x0c868000UL, 0x3fc2d161UL, 0xcb81b4a1UL,
+    0x3d039d6cUL, 0x2a49c000UL, 0x3fc23d71UL, 0x8fd3df5cUL, 0x3d100d23UL,
+    0x7e23f000UL, 0x3fc1aa2bUL, 0x44389934UL, 0x3d2ca78eUL, 0x8227e000UL,
+    0x3fc1178eUL, 0xce2d07f2UL, 0x3d21ef78UL, 0xb59e4000UL, 0x3fc08598UL,
+    0x7009902cUL, 0xbd27e5ddUL, 0x39dbe000UL, 0x3fbfe891UL, 0x4fa10afdUL,
+    0xbd2534d6UL, 0x830a2000UL, 0x3fbec739UL, 0xafe645e0UL, 0xbd2dc068UL,
+    0x63844000UL, 0x3fbda727UL, 0x1fa71733UL, 0x3d1a8940UL, 0x01bc4000UL,
+    0x3fbc8858UL, 0xc65aacd3UL, 0x3d2646d1UL, 0x8dad6000UL, 0x3fbb6ac8UL,
+    0x2bf768e5UL, 0xbd139080UL, 0x40b1c000UL, 0x3fba4e76UL, 0xb94407c8UL,
+    0xbd0e42b6UL, 0x5d594000UL, 0x3fb9335eUL, 0x3abd47daUL, 0x3d23115cUL,
+    0x2f40e000UL, 0x3fb8197eUL, 0xf96ffdf7UL, 0x3d0f80dcUL, 0x0aeac000UL,
+    0x3fb700d3UL, 0xa99ded32UL, 0x3cec1e8dUL, 0x4d97a000UL, 0x3fb5e95aUL,
+    0x3c5d1d1eUL, 0xbd2c6906UL, 0x5d208000UL, 0x3fb4d311UL, 0x82f4e1efUL,
+    0xbcf53a25UL, 0xa7d1e000UL, 0x3fb3bdf5UL, 0xa5db4ed7UL, 0x3d2cc85eUL,
+    0xa4472000UL, 0x3fb2aa04UL, 0xae9c697dUL, 0xbd20b6e8UL, 0xd1466000UL,
+    0x3fb1973bUL, 0x560d9e9bUL, 0xbd25325dUL, 0xb59e4000UL, 0x3fb08598UL,
+    0x7009902cUL, 0xbd17e5ddUL, 0xc006c000UL, 0x3faeea31UL, 0x4fc93b7bUL,
+    0xbd0e113eUL, 0xcdddc000UL, 0x3faccb73UL, 0x47d82807UL, 0xbd1a68f2UL,
+    0xd0fb0000UL, 0x3faaaef2UL, 0x353bb42eUL, 0x3d20fc1aUL, 0x149fc000UL,
+    0x3fa894aaUL, 0xd05a267dUL, 0xbd197995UL, 0xf2d4c000UL, 0x3fa67c94UL,
+    0xec19afa2UL, 0xbd029efbUL, 0xd42e0000UL, 0x3fa466aeUL, 0x75bdfd28UL,
+    0xbd2c1673UL, 0x2f8d0000UL, 0x3fa252f3UL, 0xe021b67bUL, 0x3d283e9aUL,
+    0x89e74000UL, 0x3fa0415dUL, 0x5cf1d753UL, 0x3d0111c0UL, 0xec148000UL,
+    0x3f9c63d2UL, 0x3f9eb2f3UL, 0x3d2578c6UL, 0x28c90000UL, 0x3f984925UL,
+    0x325a0c34UL, 0xbd2aa0baUL, 0x25980000UL, 0x3f9432a9UL, 0x928637feUL,
+    0x3d098139UL, 0x58938000UL, 0x3f902056UL, 0x06e2f7d2UL, 0xbd23dc5bUL,
+    0xa3890000UL, 0x3f882448UL, 0xda74f640UL, 0xbd275577UL, 0x75890000UL,
+    0x3f801015UL, 0x999d2be8UL, 0xbd10c76bUL, 0x59580000UL, 0x3f700805UL,
+    0xcb31c67bUL, 0x3d2166afUL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x80000000UL, 0xfefa3800UL, 0x3fa62e42UL, 0x93c76730UL, 0x3ceef357UL,
+    0x92492492UL, 0x3fc24924UL, 0x00000000UL, 0xbfd00000UL, 0x3d6fb175UL,
+    0xbfc5555eUL, 0x55555555UL, 0x3fd55555UL, 0x9999999aUL, 0x3fc99999UL,
+    0x00000000UL, 0xbfe00000UL, 0x00000000UL, 0xffffe000UL, 0x00000000UL,
+    0xffffe000UL
+};
+//registers,
+// input: xmm0
+// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
+//          rax, rdx, rcx, rbx (tmp)
+
+void MacroAssembler::fast_log(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
+  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
+  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
+  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2;
+  Label L_2TAG_PACKET_10_0_2, start;
+
+  assert_different_registers(tmp, eax, ecx, edx);
+  jmp(start);
+  address static_const_table = (address)_static_const_table_log;
+
+  bind(start);
+  subl(rsp, 104);
+  movl(Address(rsp, 40), tmp);
+  lea(tmp, ExternalAddress(static_const_table));
+  xorpd(xmm2, xmm2);
+  movl(eax, 16368);
+  pinsrw(xmm2, eax, 3);
+  xorpd(xmm3, xmm3);
+  movl(edx, 30704);
+  pinsrw(xmm3, edx, 3);
+  movsd(xmm0, Address(rsp, 112));
+  movapd(xmm1, xmm0);
+  movl(ecx, 32768);
+  movdl(xmm4, ecx);
+  movsd(xmm5, Address(tmp, 2128));         // 0x00000000UL, 0xffffe000UL
+  pextrw(eax, xmm0, 3);
+  por(xmm0, xmm2);
+  psllq(xmm0, 5);
+  movl(ecx, 16352);
+  psrlq(xmm0, 34);
+  rcpss(xmm0, xmm0);
+  psllq(xmm1, 12);
+  pshufd(xmm6, xmm5, 228);
+  psrlq(xmm1, 12);
+  subl(eax, 16);
+  cmpl(eax, 32736);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
+
+  bind(L_2TAG_PACKET_1_0_2);
+  paddd(xmm0, xmm4);
+  por(xmm1, xmm3);
+  movdl(edx, xmm0);
+  psllq(xmm0, 29);
+  pand(xmm5, xmm1);
+  pand(xmm0, xmm6);
+  subsd(xmm1, xmm5);
+  mulpd(xmm5, xmm0);
+  andl(eax, 32752);
+  subl(eax, ecx);
+  cvtsi2sdl(xmm7, eax);
+  mulsd(xmm1, xmm0);
+  movsd(xmm6, Address(tmp, 2064));         // 0xfefa3800UL, 0x3fa62e42UL
+  movdqu(xmm3, Address(tmp, 2080));        // 0x92492492UL, 0x3fc24924UL, 0x00000000UL, 0xbfd00000UL
+  subsd(xmm5, xmm2);
+  andl(edx, 16711680);
+  shrl(edx, 12);
+  movdqu(xmm0, Address(tmp, edx));
+  movdqu(xmm4, Address(tmp, 2096));        // 0x3d6fb175UL, 0xbfc5555eUL, 0x55555555UL, 0x3fd55555UL
+  addsd(xmm1, xmm5);
+  movdqu(xmm2, Address(tmp, 2112));        // 0x9999999aUL, 0x3fc99999UL, 0x00000000UL, 0xbfe00000UL
+  mulsd(xmm6, xmm7);
+  pshufd(xmm5, xmm1, 68);
+  mulsd(xmm7, Address(tmp, 2072));         // 0x93c76730UL, 0x3ceef357UL, 0x92492492UL, 0x3fc24924UL
+  mulsd(xmm3, xmm1);
+  addsd(xmm0, xmm6);
+  mulpd(xmm4, xmm5);
+  mulpd(xmm5, xmm5);
+  pshufd(xmm6, xmm0, 228);
+  addsd(xmm0, xmm1);
+  addpd(xmm4, xmm2);
+  mulpd(xmm3, xmm5);
+  subsd(xmm6, xmm0);
+  mulsd(xmm4, xmm1);
+  pshufd(xmm2, xmm0, 238);
+  addsd(xmm1, xmm6);
+  mulsd(xmm5, xmm5);
+  addsd(xmm7, xmm2);
+  addpd(xmm4, xmm3);
+  addsd(xmm1, xmm7);
+  mulpd(xmm4, xmm5);
+  addsd(xmm1, xmm4);
+  pshufd(xmm5, xmm4, 238);
+  addsd(xmm1, xmm5);
+  addsd(xmm0, xmm1);
+  jmp(L_2TAG_PACKET_2_0_2);
+
+  bind(L_2TAG_PACKET_0_0_2);
+  movsd(xmm0, Address(rsp, 112));
+  movdqu(xmm1, xmm0);
+  addl(eax, 16);
+  cmpl(eax, 32768);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_3_0_2);
+  cmpl(eax, 16);
+  jcc(Assembler::below, L_2TAG_PACKET_4_0_2);
+
+  bind(L_2TAG_PACKET_5_0_2);
+  addsd(xmm0, xmm0);
+  jmp(L_2TAG_PACKET_2_0_2);
+
+  bind(L_2TAG_PACKET_6_0_2);
+  jcc(Assembler::above, L_2TAG_PACKET_5_0_2);
+  cmpl(edx, 0);
+  jcc(Assembler::above, L_2TAG_PACKET_5_0_2);
+  jmp(L_2TAG_PACKET_7_0_2);
+
+  bind(L_2TAG_PACKET_3_0_2);
+  movdl(edx, xmm1);
+  psrlq(xmm1, 32);
+  movdl(ecx, xmm1);
+  addl(ecx, ecx);
+  cmpl(ecx, -2097152);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_6_0_2);
+  orl(edx, ecx);
+  cmpl(edx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_8_0_2);
+
+  bind(L_2TAG_PACKET_7_0_2);
+  xorpd(xmm1, xmm1);
+  xorpd(xmm0, xmm0);
+  movl(eax, 32752);
+  pinsrw(xmm1, eax, 3);
+  movl(edx, 3);
+  mulsd(xmm0, xmm1);
+
+  bind(L_2TAG_PACKET_9_0_2);
+  movsd(Address(rsp, 0), xmm0);
+  movsd(xmm0, Address(rsp, 112));
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_10_0_2);
+
+  bind(L_2TAG_PACKET_8_0_2);
+  xorpd(xmm1, xmm1);
+  xorpd(xmm0, xmm0);
+  movl(eax, 49136);
+  pinsrw(xmm0, eax, 3);
+  divsd(xmm0, xmm1);
+  movl(edx, 2);
+  jmp(L_2TAG_PACKET_9_0_2);
+
+  bind(L_2TAG_PACKET_4_0_2);
+  movdl(edx, xmm1);
+  psrlq(xmm1, 32);
+  movdl(ecx, xmm1);
+  orl(edx, ecx);
+  cmpl(edx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_8_0_2);
+  xorpd(xmm1, xmm1);
+  movl(eax, 18416);
+  pinsrw(xmm1, eax, 3);
+  mulsd(xmm0, xmm1);
+  movapd(xmm1, xmm0);
+  pextrw(eax, xmm0, 3);
+  por(xmm0, xmm2);
+  psllq(xmm0, 5);
+  movl(ecx, 18416);
+  psrlq(xmm0, 34);
+  rcpss(xmm0, xmm0);
+  psllq(xmm1, 12);
+  pshufd(xmm6, xmm5, 228);
+  psrlq(xmm1, 12);
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_2_0_2);
+  movsd(Address(rsp, 24), xmm0);
+  fld_d(Address(rsp, 24));
+
+  bind(L_2TAG_PACKET_10_0_2);
+  movl(tmp, Address(rsp, 40));
+}
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86_log10.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,687 @@
+/*
+* Copyright (c) 2016, Intel Corporation.
+* Intel Math Library (LIBM) Source Code
+*
+* 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.
+*
+*/
+
+#include "precompiled.hpp"
+#include "asm/assembler.hpp"
+#include "asm/assembler.inline.hpp"
+#include "runtime/stubRoutines.hpp"
+#include "macroAssembler_x86.hpp"
+
+#ifdef _MSC_VER
+#define ALIGNED_(x) __declspec(align(x))
+#else
+#define ALIGNED_(x) __attribute__ ((aligned(x)))
+#endif
+
+/******************************************************************************/
+//                     ALGORITHM DESCRIPTION - LOG10()
+//                     ---------------------
+//
+//    Let x=2^k * mx, mx in [1,2)
+//
+//    Get B~1/mx based on the output of rcpss instruction (B0)
+//    B = int((B0*LH*2^7+0.5))/2^7
+//    LH is a short approximation for log10(e)
+//
+//    Reduced argument: r=B*mx-LH (computed accurately in high and low parts)
+//
+//    Result:  k*log10(2) - log(B) + p(r)
+//             p(r) is a degree 7 polynomial
+//             -log(B) read from data table (high, low parts)
+//             Result is formed from high and low parts
+//
+// Special cases:
+//  log10(0) = -INF with divide-by-zero exception raised
+//  log10(1) = +0
+//  log10(x) = NaN with invalid exception raised if x < -0, including -INF
+//  log10(+INF) = +INF
+//
+/******************************************************************************/
+
+#ifdef _LP64
+// The 64 bit code is at most SSE2 compliant
+ALIGNED_(16) juint _HIGHSIGMASK_log10[] =
+{
+    0xf8000000UL, 0xffffffffUL, 0x00000000UL, 0xffffe000UL
+};
+
+ALIGNED_(16) juint _LOG10_E[] =
+{
+    0x00000000UL, 0x3fdbc000UL, 0xbf2e4108UL, 0x3f5a7a6cUL
+};
+
+ALIGNED_(16) juint _L_tbl_log10[] =
+{
+    0x509f7800UL, 0x3fd34413UL, 0x1f12b358UL, 0x3d1fef31UL, 0x80333400UL,
+    0x3fd32418UL, 0xc671d9d0UL, 0xbcf542bfUL, 0x51195000UL, 0x3fd30442UL,
+    0x78a4b0c3UL, 0x3d18216aUL, 0x6fc79400UL, 0x3fd2e490UL, 0x80fa389dUL,
+    0xbc902869UL, 0x89d04000UL, 0x3fd2c502UL, 0x75c2f564UL, 0x3d040754UL,
+    0x4ddd1c00UL, 0x3fd2a598UL, 0xd219b2c3UL, 0xbcfa1d84UL, 0x6baa7c00UL,
+    0x3fd28651UL, 0xfd9abec1UL, 0x3d1be6d3UL, 0x94028800UL, 0x3fd2672dUL,
+    0xe289a455UL, 0xbd1ede5eUL, 0x78b86400UL, 0x3fd2482cUL, 0x6734d179UL,
+    0x3d1fe79bUL, 0xcca3c800UL, 0x3fd2294dUL, 0x981a40b8UL, 0xbced34eaUL,
+    0x439c5000UL, 0x3fd20a91UL, 0xcc392737UL, 0xbd1a9cc3UL, 0x92752c00UL,
+    0x3fd1ebf6UL, 0x03c9afe7UL, 0x3d1e98f8UL, 0x6ef8dc00UL, 0x3fd1cd7dUL,
+    0x71dae7f4UL, 0x3d08a86cUL, 0x8fe4dc00UL, 0x3fd1af25UL, 0xee9185a1UL,
+    0xbcff3412UL, 0xace59400UL, 0x3fd190eeUL, 0xc2cab353UL, 0x3cf17ed9UL,
+    0x7e925000UL, 0x3fd172d8UL, 0x6952c1b2UL, 0x3cf1521cUL, 0xbe694400UL,
+    0x3fd154e2UL, 0xcacb79caUL, 0xbd0bdc78UL, 0x26cbac00UL, 0x3fd1370dUL,
+    0xf71f4de1UL, 0xbd01f8beUL, 0x72fa0800UL, 0x3fd11957UL, 0x55bf910bUL,
+    0x3c946e2bUL, 0x5f106000UL, 0x3fd0fbc1UL, 0x39e639c1UL, 0x3d14a84bUL,
+    0xa802a800UL, 0x3fd0de4aUL, 0xd3f31d5dUL, 0xbd178385UL, 0x0b992000UL,
+    0x3fd0c0f3UL, 0x3843106fUL, 0xbd1f602fUL, 0x486ce800UL, 0x3fd0a3baUL,
+    0x8819497cUL, 0x3cef987aUL, 0x1de49400UL, 0x3fd086a0UL, 0x1caa0467UL,
+    0x3d0faec7UL, 0x4c30cc00UL, 0x3fd069a4UL, 0xa4424372UL, 0xbd1618fcUL,
+    0x94490000UL, 0x3fd04cc6UL, 0x946517d2UL, 0xbd18384bUL, 0xb7e84000UL,
+    0x3fd03006UL, 0xe0109c37UL, 0xbd19a6acUL, 0x798a0c00UL, 0x3fd01364UL,
+    0x5121e864UL, 0xbd164cf7UL, 0x38ce8000UL, 0x3fcfedbfUL, 0x46214d1aUL,
+    0xbcbbc402UL, 0xc8e62000UL, 0x3fcfb4efUL, 0xdab93203UL, 0x3d1e0176UL,
+    0x2cb02800UL, 0x3fcf7c5aUL, 0x2a2ea8e4UL, 0xbcfec86aUL, 0xeeeaa000UL,
+    0x3fcf43fdUL, 0xc18e49a4UL, 0x3cf110a8UL, 0x9bb6e800UL, 0x3fcf0bdaUL,
+    0x923cc9c0UL, 0xbd15ce99UL, 0xc093f000UL, 0x3fced3efUL, 0x4d4b51e9UL,
+    0x3d1a04c7UL, 0xec58f800UL, 0x3fce9c3cUL, 0x163cad59UL, 0x3cac8260UL,
+    0x9a907000UL, 0x3fce2d7dUL, 0x3fa93646UL, 0x3ce4a1c0UL, 0x37311000UL,
+    0x3fcdbf99UL, 0x32abd1fdUL, 0x3d07ea9dUL, 0x6744b800UL, 0x3fcd528cUL,
+    0x4dcbdfd4UL, 0xbd1b08e2UL, 0xe36de800UL, 0x3fcce653UL, 0x0b7b7f7fUL,
+    0xbd1b8f03UL, 0x77506800UL, 0x3fcc7aecUL, 0xa821c9fbUL, 0x3d13c163UL,
+    0x00ff8800UL, 0x3fcc1053UL, 0x536bca76UL, 0xbd074ee5UL, 0x70719800UL,
+    0x3fcba684UL, 0xd7da9b6bUL, 0xbd1fbf16UL, 0xc6f8d800UL, 0x3fcb3d7dUL,
+    0xe2220bb3UL, 0x3d1a295dUL, 0x16c15800UL, 0x3fcad53cUL, 0xe724911eUL,
+    0xbcf55822UL, 0x82533800UL, 0x3fca6dbcUL, 0x6d982371UL, 0x3cac567cUL,
+    0x3c19e800UL, 0x3fca06fcUL, 0x84d17d80UL, 0x3d1da204UL, 0x85ef8000UL,
+    0x3fc9a0f8UL, 0x54466a6aUL, 0xbd002204UL, 0xb0ac2000UL, 0x3fc93baeUL,
+    0xd601fd65UL, 0x3d18840cUL, 0x1bb9b000UL, 0x3fc8d71cUL, 0x7bf58766UL,
+    0xbd14f897UL, 0x34aae800UL, 0x3fc8733eUL, 0x3af6ac24UL, 0xbd0f5c45UL,
+    0x76d68000UL, 0x3fc81012UL, 0x4303e1a1UL, 0xbd1f9a80UL, 0x6af57800UL,
+    0x3fc7ad96UL, 0x43fbcb46UL, 0x3cf4c33eUL, 0xa6c51000UL, 0x3fc74bc7UL,
+    0x70f0eac5UL, 0xbd192e3bUL, 0xccab9800UL, 0x3fc6eaa3UL, 0xc0093dfeUL,
+    0xbd0faf15UL, 0x8b60b800UL, 0x3fc68a28UL, 0xde78d5fdUL, 0xbc9ea4eeUL,
+    0x9d987000UL, 0x3fc62a53UL, 0x962bea6eUL, 0xbd194084UL, 0xc9b0e800UL,
+    0x3fc5cb22UL, 0x888dd999UL, 0x3d1fe201UL, 0xe1634800UL, 0x3fc56c93UL,
+    0x16ada7adUL, 0x3d1b1188UL, 0xc176c000UL, 0x3fc50ea4UL, 0x4159b5b5UL,
+    0xbcf09c08UL, 0x51766000UL, 0x3fc4b153UL, 0x84393d23UL, 0xbcf6a89cUL,
+    0x83695000UL, 0x3fc4549dUL, 0x9f0b8bbbUL, 0x3d1c4b8cUL, 0x538d5800UL,
+    0x3fc3f881UL, 0xf49df747UL, 0x3cf89b99UL, 0xc8138000UL, 0x3fc39cfcUL,
+    0xd503b834UL, 0xbd13b99fUL, 0xf0df0800UL, 0x3fc3420dUL, 0xf011b386UL,
+    0xbd05d8beUL, 0xe7466800UL, 0x3fc2e7b2UL, 0xf39c7bc2UL, 0xbd1bb94eUL,
+    0xcdd62800UL, 0x3fc28de9UL, 0x05e6d69bUL, 0xbd10ed05UL, 0xd015d800UL,
+    0x3fc234b0UL, 0xe29b6c9dUL, 0xbd1ff967UL, 0x224ea800UL, 0x3fc1dc06UL,
+    0x727711fcUL, 0xbcffb30dUL, 0x01540000UL, 0x3fc183e8UL, 0x39786c5aUL,
+    0x3cc23f57UL, 0xb24d9800UL, 0x3fc12c54UL, 0xc905a342UL, 0x3d003a1dUL,
+    0x82835800UL, 0x3fc0d54aUL, 0x9b9920c0UL, 0x3d03b25aUL, 0xc72ac000UL,
+    0x3fc07ec7UL, 0x46f26a24UL, 0x3cf0fa41UL, 0xdd35d800UL, 0x3fc028caUL,
+    0x41d9d6dcUL, 0x3d034a65UL, 0x52474000UL, 0x3fbfa6a4UL, 0x44f66449UL,
+    0x3d19cad3UL, 0x2da3d000UL, 0x3fbefcb8UL, 0x67832999UL, 0x3d18400fUL,
+    0x32a10000UL, 0x3fbe53ceUL, 0x9c0e3b1aUL, 0xbcff62fdUL, 0x556b7000UL,
+    0x3fbdabe3UL, 0x02976913UL, 0xbcf8243bUL, 0x97e88000UL, 0x3fbd04f4UL,
+    0xec793797UL, 0x3d1c0578UL, 0x09647000UL, 0x3fbc5effUL, 0x05fc0565UL,
+    0xbd1d799eUL, 0xc6426000UL, 0x3fbbb9ffUL, 0x4625f5edUL, 0x3d1f5723UL,
+    0xf7afd000UL, 0x3fbb15f3UL, 0xdd5aae61UL, 0xbd1a7e1eUL, 0xd358b000UL,
+    0x3fba72d8UL, 0x3314e4d3UL, 0x3d17bc91UL, 0x9b1f5000UL, 0x3fb9d0abUL,
+    0x9a4d514bUL, 0x3cf18c9bUL, 0x9cd4e000UL, 0x3fb92f69UL, 0x7e4496abUL,
+    0x3cf1f96dUL, 0x31f4f000UL, 0x3fb88f10UL, 0xf56479e7UL, 0x3d165818UL,
+    0xbf628000UL, 0x3fb7ef9cUL, 0x26bf486dUL, 0xbd1113a6UL, 0xb526b000UL,
+    0x3fb7510cUL, 0x1a1c3384UL, 0x3ca9898dUL, 0x8e31e000UL, 0x3fb6b35dUL,
+    0xb3875361UL, 0xbd0661acUL, 0xd01de000UL, 0x3fb6168cUL, 0x2a7cacfaUL,
+    0xbd1bdf10UL, 0x0af23000UL, 0x3fb57a98UL, 0xff868816UL, 0x3cf046d0UL,
+    0xd8ea0000UL, 0x3fb4df7cUL, 0x1515fbe7UL, 0xbd1fd529UL, 0xde3b2000UL,
+    0x3fb44538UL, 0x6e59a132UL, 0x3d1faeeeUL, 0xc8df9000UL, 0x3fb3abc9UL,
+    0xf1322361UL, 0xbd198807UL, 0x505f1000UL, 0x3fb3132dUL, 0x0888e6abUL,
+    0x3d1e5380UL, 0x359bd000UL, 0x3fb27b61UL, 0xdfbcbb22UL, 0xbcfe2724UL,
+    0x429ee000UL, 0x3fb1e463UL, 0x6eb4c58cUL, 0xbcfe4dd6UL, 0x4a673000UL,
+    0x3fb14e31UL, 0x4ce1ac9bUL, 0x3d1ba691UL, 0x28b96000UL, 0x3fb0b8c9UL,
+    0x8c7813b8UL, 0xbd0b3872UL, 0xc1f08000UL, 0x3fb02428UL, 0xc2bc8c2cUL,
+    0x3cb5ea6bUL, 0x05a1a000UL, 0x3faf209cUL, 0x72e8f18eUL, 0xbce8df84UL,
+    0xc0b5e000UL, 0x3fadfa6dUL, 0x9fdef436UL, 0x3d087364UL, 0xaf416000UL,
+    0x3facd5c2UL, 0x1068c3a9UL, 0x3d0827e7UL, 0xdb356000UL, 0x3fabb296UL,
+    0x120a34d3UL, 0x3d101a9fUL, 0x5dfea000UL, 0x3faa90e6UL, 0xdaded264UL,
+    0xbd14c392UL, 0x6034c000UL, 0x3fa970adUL, 0x1c9d06a9UL, 0xbd1b705eUL,
+    0x194c6000UL, 0x3fa851e8UL, 0x83996ad9UL, 0xbd0117bcUL, 0xcf4ac000UL,
+    0x3fa73492UL, 0xb1a94a62UL, 0xbca5ea42UL, 0xd67b4000UL, 0x3fa618a9UL,
+    0x75aed8caUL, 0xbd07119bUL, 0x9126c000UL, 0x3fa4fe29UL, 0x5291d533UL,
+    0x3d12658fUL, 0x6f4d4000UL, 0x3fa3e50eUL, 0xcd2c5cd9UL, 0x3d1d5c70UL,
+    0xee608000UL, 0x3fa2cd54UL, 0xd1008489UL, 0x3d1a4802UL, 0x9900e000UL,
+    0x3fa1b6f9UL, 0x54fb5598UL, 0xbd16593fUL, 0x06bb6000UL, 0x3fa0a1f9UL,
+    0x64ef57b4UL, 0xbd17636bUL, 0xb7940000UL, 0x3f9f1c9fUL, 0xee6a4737UL,
+    0x3cb5d479UL, 0x91aa0000UL, 0x3f9cf7f5UL, 0x3a16373cUL, 0x3d087114UL,
+    0x156b8000UL, 0x3f9ad5edUL, 0x836c554aUL, 0x3c6900b0UL, 0xd4764000UL,
+    0x3f98b67fUL, 0xed12f17bUL, 0xbcffc974UL, 0x77dec000UL, 0x3f9699a7UL,
+    0x232ce7eaUL, 0x3d1e35bbUL, 0xbfbf4000UL, 0x3f947f5dUL, 0xd84ffa6eUL,
+    0x3d0e0a49UL, 0x82c7c000UL, 0x3f92679cUL, 0x8d170e90UL, 0xbd14d9f2UL,
+    0xadd20000UL, 0x3f90525dUL, 0x86d9f88eUL, 0x3cdeb986UL, 0x86f10000UL,
+    0x3f8c7f36UL, 0xb9e0a517UL, 0x3ce29faaUL, 0xb75c8000UL, 0x3f885e9eUL,
+    0x542568cbUL, 0xbd1f7bdbUL, 0x46b30000UL, 0x3f8442e8UL, 0xb954e7d9UL,
+    0x3d1e5287UL, 0xb7e60000UL, 0x3f802c07UL, 0x22da0b17UL, 0xbd19fb27UL,
+    0x6c8b0000UL, 0x3f7833e3UL, 0x821271efUL, 0xbd190f96UL, 0x29910000UL,
+    0x3f701936UL, 0xbc3491a5UL, 0xbd1bcf45UL, 0x354a0000UL, 0x3f600fe3UL,
+    0xc0ff520aUL, 0xbd19d71cUL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL
+};
+
+ALIGNED_(16) juint _log2_log10[] =
+{
+    0x509f7800UL, 0x3f934413UL, 0x1f12b358UL, 0x3cdfef31UL
+};
+
+ALIGNED_(16) juint _coeff_log10[] =
+{
+    0xc1a5f12eUL, 0x40358874UL, 0x64d4ef0dUL, 0xc0089309UL, 0x385593b1UL,
+    0xc025c917UL, 0xdc963467UL, 0x3ffc6a02UL, 0x7f9d3aa1UL, 0x4016ab9fUL,
+    0xdc77b115UL, 0xbff27af2UL
+};
+
+// Registers:
+// input: xmm0
+// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
+//          rax, rdx, rcx, tmp - r11
+
+// Code generated by Intel C compiler for LIBM library
+
+void MacroAssembler::fast_log10(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register r11) {
+  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
+  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
+  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, B1_2, B1_3, B1_4, B1_5, start;
+
+  assert_different_registers(r11, eax, ecx, edx);
+
+  address HIGHSIGMASK = (address)_HIGHSIGMASK_log10;
+  address LOG10_E = (address)_LOG10_E;
+  address L_tbl = (address)_L_tbl_log10;
+  address log2 = (address)_log2_log10;
+  address coeff = (address)_coeff_log10;
+
+  bind(start);
+  subq(rsp, 24);
+  movsd(Address(rsp, 0), xmm0);
+
+  bind(B1_2);
+  xorpd(xmm2, xmm2);
+  movl(eax, 16368);
+  pinsrw(xmm2, eax, 3);
+  movl(ecx, 1054736384);
+  movdl(xmm7, ecx);
+  xorpd(xmm3, xmm3);
+  movl(edx, 30704);
+  pinsrw(xmm3, edx, 3);
+  movdqu(xmm1, xmm0);
+  movl(edx, 32768);
+  movdl(xmm4, edx);
+  movdqu(xmm5, ExternalAddress(HIGHSIGMASK));    //0xf8000000UL, 0xffffffffUL, 0x00000000UL, 0xffffe000UL
+  pextrw(eax, xmm0, 3);
+  por(xmm0, xmm2);
+  movl(ecx, 16352);
+  psrlq(xmm0, 27);
+  movdqu(xmm2, ExternalAddress(LOG10_E));    //0x00000000UL, 0x3fdbc000UL, 0xbf2e4108UL, 0x3f5a7a6cUL
+  psrld(xmm0, 2);
+  rcpps(xmm0, xmm0);
+  psllq(xmm1, 12);
+  pshufd(xmm6, xmm5, 78);
+  psrlq(xmm1, 12);
+  subl(eax, 16);
+  cmpl(eax, 32736);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
+
+  bind(L_2TAG_PACKET_1_0_2);
+  mulss(xmm0, xmm7);
+  por(xmm1, xmm3);
+  lea(r11, ExternalAddress(L_tbl));
+  andpd(xmm5, xmm1);
+  paddd(xmm0, xmm4);
+  subsd(xmm1, xmm5);
+  movdl(edx, xmm0);
+  psllq(xmm0, 29);
+  andpd(xmm0, xmm6);
+  andl(eax, 32752);
+  subl(eax, ecx);
+  cvtsi2sdl(xmm7, eax);
+  mulpd(xmm5, xmm0);
+  mulsd(xmm1, xmm0);
+  movq(xmm6, ExternalAddress(log2));    //0x509f7800UL, 0x3f934413UL, 0x1f12b358UL, 0x3cdfef31UL
+  movdqu(xmm3, ExternalAddress(coeff));    //0xc1a5f12eUL, 0x40358874UL, 0x64d4ef0dUL, 0xc0089309UL
+  subsd(xmm5, xmm2);
+  andl(edx, 16711680);
+  shrl(edx, 12);
+  movdqu(xmm0, Address(r11, rdx, Address::times_1, -1504));
+  movdqu(xmm4, ExternalAddress(16 + coeff));    //0x385593b1UL, 0xc025c917UL, 0xdc963467UL, 0x3ffc6a02UL
+  addsd(xmm1, xmm5);
+  movdqu(xmm2, ExternalAddress(32 + coeff));    //0x7f9d3aa1UL, 0x4016ab9fUL, 0xdc77b115UL, 0xbff27af2UL
+  mulsd(xmm6, xmm7);
+  pshufd(xmm5, xmm1, 68);
+  mulsd(xmm7, ExternalAddress(8 + log2));    //0x1f12b358UL, 0x3cdfef31UL
+  mulsd(xmm3, xmm1);
+  addsd(xmm0, xmm6);
+  mulpd(xmm4, xmm5);
+  movq(xmm6, ExternalAddress(8 + LOG10_E));    //0xbf2e4108UL, 0x3f5a7a6cUL
+  mulpd(xmm5, xmm5);
+  addpd(xmm4, xmm2);
+  mulpd(xmm3, xmm5);
+  pshufd(xmm2, xmm0, 228);
+  addsd(xmm0, xmm1);
+  mulsd(xmm4, xmm1);
+  subsd(xmm2, xmm0);
+  mulsd(xmm6, xmm1);
+  addsd(xmm1, xmm2);
+  pshufd(xmm2, xmm0, 238);
+  mulsd(xmm5, xmm5);
+  addsd(xmm7, xmm2);
+  addsd(xmm1, xmm6);
+  addpd(xmm4, xmm3);
+  addsd(xmm1, xmm7);
+  mulpd(xmm4, xmm5);
+  addsd(xmm1, xmm4);
+  pshufd(xmm5, xmm4, 238);
+  addsd(xmm1, xmm5);
+  addsd(xmm0, xmm1);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_0_0_2);
+  movq(xmm0, Address(rsp, 0));
+  movq(xmm1, Address(rsp, 0));
+  addl(eax, 16);
+  cmpl(eax, 32768);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_2_0_2);
+  cmpl(eax, 16);
+  jcc(Assembler::below, L_2TAG_PACKET_3_0_2);
+
+  bind(L_2TAG_PACKET_4_0_2);
+  addsd(xmm0, xmm0);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_5_0_2);
+  jcc(Assembler::above, L_2TAG_PACKET_4_0_2);
+  cmpl(edx, 0);
+  jcc(Assembler::above, L_2TAG_PACKET_4_0_2);
+  jmp(L_2TAG_PACKET_6_0_2);
+
+  bind(L_2TAG_PACKET_3_0_2);
+  xorpd(xmm1, xmm1);
+  addsd(xmm1, xmm0);
+  movdl(edx, xmm1);
+  psrlq(xmm1, 32);
+  movdl(ecx, xmm1);
+  orl(edx, ecx);
+  cmpl(edx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_7_0_2);
+  xorpd(xmm1, xmm1);
+  movl(eax, 18416);
+  pinsrw(xmm1, eax, 3);
+  mulsd(xmm0, xmm1);
+  xorpd(xmm2, xmm2);
+  movl(eax, 16368);
+  pinsrw(xmm2, eax, 3);
+  movdqu(xmm1, xmm0);
+  pextrw(eax, xmm0, 3);
+  por(xmm0, xmm2);
+  movl(ecx, 18416);
+  psrlq(xmm0, 27);
+  movdqu(xmm2, ExternalAddress(LOG10_E));    //0x00000000UL, 0x3fdbc000UL, 0xbf2e4108UL, 0x3f5a7a6cUL
+  psrld(xmm0, 2);
+  rcpps(xmm0, xmm0);
+  psllq(xmm1, 12);
+  pshufd(xmm6, xmm5, 78);
+  psrlq(xmm1, 12);
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_2_0_2);
+  movdl(edx, xmm1);
+  psrlq(xmm1, 32);
+  movdl(ecx, xmm1);
+  addl(ecx, ecx);
+  cmpl(ecx, -2097152);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_5_0_2);
+  orl(edx, ecx);
+  cmpl(edx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_7_0_2);
+
+  bind(L_2TAG_PACKET_6_0_2);
+  xorpd(xmm1, xmm1);
+  xorpd(xmm0, xmm0);
+  movl(eax, 32752);
+  pinsrw(xmm1, eax, 3);
+  mulsd(xmm0, xmm1);
+  movl(Address(rsp, 16), 9);
+  jmp(L_2TAG_PACKET_8_0_2);
+
+  bind(L_2TAG_PACKET_7_0_2);
+  xorpd(xmm1, xmm1);
+  xorpd(xmm0, xmm0);
+  movl(eax, 49136);
+  pinsrw(xmm0, eax, 3);
+  divsd(xmm0, xmm1);
+  movl(Address(rsp, 16), 8);
+
+  bind(L_2TAG_PACKET_8_0_2);
+  movq(Address(rsp, 8), xmm0);
+
+  bind(B1_3);
+  movq(xmm0, Address(rsp, 8));
+
+  bind(L_2TAG_PACKET_9_0_2);
+
+  bind(B1_5);
+  addq(rsp, 24);
+
+}
+#else
+// The 32 bit code is at most SSE2 compliant
+ALIGNED_(16) juint _static_const_table_log10[] =
+{
+    0x509f7800UL, 0x3fd34413UL, 0x1f12b358UL, 0x3d1fef31UL, 0x80333400UL,
+    0x3fd32418UL, 0xc671d9d0UL, 0xbcf542bfUL, 0x51195000UL, 0x3fd30442UL,
+    0x78a4b0c3UL, 0x3d18216aUL, 0x6fc79400UL, 0x3fd2e490UL, 0x80fa389dUL,
+    0xbc902869UL, 0x89d04000UL, 0x3fd2c502UL, 0x75c2f564UL, 0x3d040754UL,
+    0x4ddd1c00UL, 0x3fd2a598UL, 0xd219b2c3UL, 0xbcfa1d84UL, 0x6baa7c00UL,
+    0x3fd28651UL, 0xfd9abec1UL, 0x3d1be6d3UL, 0x94028800UL, 0x3fd2672dUL,
+    0xe289a455UL, 0xbd1ede5eUL, 0x78b86400UL, 0x3fd2482cUL, 0x6734d179UL,
+    0x3d1fe79bUL, 0xcca3c800UL, 0x3fd2294dUL, 0x981a40b8UL, 0xbced34eaUL,
+    0x439c5000UL, 0x3fd20a91UL, 0xcc392737UL, 0xbd1a9cc3UL, 0x92752c00UL,
+    0x3fd1ebf6UL, 0x03c9afe7UL, 0x3d1e98f8UL, 0x6ef8dc00UL, 0x3fd1cd7dUL,
+    0x71dae7f4UL, 0x3d08a86cUL, 0x8fe4dc00UL, 0x3fd1af25UL, 0xee9185a1UL,
+    0xbcff3412UL, 0xace59400UL, 0x3fd190eeUL, 0xc2cab353UL, 0x3cf17ed9UL,
+    0x7e925000UL, 0x3fd172d8UL, 0x6952c1b2UL, 0x3cf1521cUL, 0xbe694400UL,
+    0x3fd154e2UL, 0xcacb79caUL, 0xbd0bdc78UL, 0x26cbac00UL, 0x3fd1370dUL,
+    0xf71f4de1UL, 0xbd01f8beUL, 0x72fa0800UL, 0x3fd11957UL, 0x55bf910bUL,
+    0x3c946e2bUL, 0x5f106000UL, 0x3fd0fbc1UL, 0x39e639c1UL, 0x3d14a84bUL,
+    0xa802a800UL, 0x3fd0de4aUL, 0xd3f31d5dUL, 0xbd178385UL, 0x0b992000UL,
+    0x3fd0c0f3UL, 0x3843106fUL, 0xbd1f602fUL, 0x486ce800UL, 0x3fd0a3baUL,
+    0x8819497cUL, 0x3cef987aUL, 0x1de49400UL, 0x3fd086a0UL, 0x1caa0467UL,
+    0x3d0faec7UL, 0x4c30cc00UL, 0x3fd069a4UL, 0xa4424372UL, 0xbd1618fcUL,
+    0x94490000UL, 0x3fd04cc6UL, 0x946517d2UL, 0xbd18384bUL, 0xb7e84000UL,
+    0x3fd03006UL, 0xe0109c37UL, 0xbd19a6acUL, 0x798a0c00UL, 0x3fd01364UL,
+    0x5121e864UL, 0xbd164cf7UL, 0x38ce8000UL, 0x3fcfedbfUL, 0x46214d1aUL,
+    0xbcbbc402UL, 0xc8e62000UL, 0x3fcfb4efUL, 0xdab93203UL, 0x3d1e0176UL,
+    0x2cb02800UL, 0x3fcf7c5aUL, 0x2a2ea8e4UL, 0xbcfec86aUL, 0xeeeaa000UL,
+    0x3fcf43fdUL, 0xc18e49a4UL, 0x3cf110a8UL, 0x9bb6e800UL, 0x3fcf0bdaUL,
+    0x923cc9c0UL, 0xbd15ce99UL, 0xc093f000UL, 0x3fced3efUL, 0x4d4b51e9UL,
+    0x3d1a04c7UL, 0xec58f800UL, 0x3fce9c3cUL, 0x163cad59UL, 0x3cac8260UL,
+    0x9a907000UL, 0x3fce2d7dUL, 0x3fa93646UL, 0x3ce4a1c0UL, 0x37311000UL,
+    0x3fcdbf99UL, 0x32abd1fdUL, 0x3d07ea9dUL, 0x6744b800UL, 0x3fcd528cUL,
+    0x4dcbdfd4UL, 0xbd1b08e2UL, 0xe36de800UL, 0x3fcce653UL, 0x0b7b7f7fUL,
+    0xbd1b8f03UL, 0x77506800UL, 0x3fcc7aecUL, 0xa821c9fbUL, 0x3d13c163UL,
+    0x00ff8800UL, 0x3fcc1053UL, 0x536bca76UL, 0xbd074ee5UL, 0x70719800UL,
+    0x3fcba684UL, 0xd7da9b6bUL, 0xbd1fbf16UL, 0xc6f8d800UL, 0x3fcb3d7dUL,
+    0xe2220bb3UL, 0x3d1a295dUL, 0x16c15800UL, 0x3fcad53cUL, 0xe724911eUL,
+    0xbcf55822UL, 0x82533800UL, 0x3fca6dbcUL, 0x6d982371UL, 0x3cac567cUL,
+    0x3c19e800UL, 0x3fca06fcUL, 0x84d17d80UL, 0x3d1da204UL, 0x85ef8000UL,
+    0x3fc9a0f8UL, 0x54466a6aUL, 0xbd002204UL, 0xb0ac2000UL, 0x3fc93baeUL,
+    0xd601fd65UL, 0x3d18840cUL, 0x1bb9b000UL, 0x3fc8d71cUL, 0x7bf58766UL,
+    0xbd14f897UL, 0x34aae800UL, 0x3fc8733eUL, 0x3af6ac24UL, 0xbd0f5c45UL,
+    0x76d68000UL, 0x3fc81012UL, 0x4303e1a1UL, 0xbd1f9a80UL, 0x6af57800UL,
+    0x3fc7ad96UL, 0x43fbcb46UL, 0x3cf4c33eUL, 0xa6c51000UL, 0x3fc74bc7UL,
+    0x70f0eac5UL, 0xbd192e3bUL, 0xccab9800UL, 0x3fc6eaa3UL, 0xc0093dfeUL,
+    0xbd0faf15UL, 0x8b60b800UL, 0x3fc68a28UL, 0xde78d5fdUL, 0xbc9ea4eeUL,
+    0x9d987000UL, 0x3fc62a53UL, 0x962bea6eUL, 0xbd194084UL, 0xc9b0e800UL,
+    0x3fc5cb22UL, 0x888dd999UL, 0x3d1fe201UL, 0xe1634800UL, 0x3fc56c93UL,
+    0x16ada7adUL, 0x3d1b1188UL, 0xc176c000UL, 0x3fc50ea4UL, 0x4159b5b5UL,
+    0xbcf09c08UL, 0x51766000UL, 0x3fc4b153UL, 0x84393d23UL, 0xbcf6a89cUL,
+    0x83695000UL, 0x3fc4549dUL, 0x9f0b8bbbUL, 0x3d1c4b8cUL, 0x538d5800UL,
+    0x3fc3f881UL, 0xf49df747UL, 0x3cf89b99UL, 0xc8138000UL, 0x3fc39cfcUL,
+    0xd503b834UL, 0xbd13b99fUL, 0xf0df0800UL, 0x3fc3420dUL, 0xf011b386UL,
+    0xbd05d8beUL, 0xe7466800UL, 0x3fc2e7b2UL, 0xf39c7bc2UL, 0xbd1bb94eUL,
+    0xcdd62800UL, 0x3fc28de9UL, 0x05e6d69bUL, 0xbd10ed05UL, 0xd015d800UL,
+    0x3fc234b0UL, 0xe29b6c9dUL, 0xbd1ff967UL, 0x224ea800UL, 0x3fc1dc06UL,
+    0x727711fcUL, 0xbcffb30dUL, 0x01540000UL, 0x3fc183e8UL, 0x39786c5aUL,
+    0x3cc23f57UL, 0xb24d9800UL, 0x3fc12c54UL, 0xc905a342UL, 0x3d003a1dUL,
+    0x82835800UL, 0x3fc0d54aUL, 0x9b9920c0UL, 0x3d03b25aUL, 0xc72ac000UL,
+    0x3fc07ec7UL, 0x46f26a24UL, 0x3cf0fa41UL, 0xdd35d800UL, 0x3fc028caUL,
+    0x41d9d6dcUL, 0x3d034a65UL, 0x52474000UL, 0x3fbfa6a4UL, 0x44f66449UL,
+    0x3d19cad3UL, 0x2da3d000UL, 0x3fbefcb8UL, 0x67832999UL, 0x3d18400fUL,
+    0x32a10000UL, 0x3fbe53ceUL, 0x9c0e3b1aUL, 0xbcff62fdUL, 0x556b7000UL,
+    0x3fbdabe3UL, 0x02976913UL, 0xbcf8243bUL, 0x97e88000UL, 0x3fbd04f4UL,
+    0xec793797UL, 0x3d1c0578UL, 0x09647000UL, 0x3fbc5effUL, 0x05fc0565UL,
+    0xbd1d799eUL, 0xc6426000UL, 0x3fbbb9ffUL, 0x4625f5edUL, 0x3d1f5723UL,
+    0xf7afd000UL, 0x3fbb15f3UL, 0xdd5aae61UL, 0xbd1a7e1eUL, 0xd358b000UL,
+    0x3fba72d8UL, 0x3314e4d3UL, 0x3d17bc91UL, 0x9b1f5000UL, 0x3fb9d0abUL,
+    0x9a4d514bUL, 0x3cf18c9bUL, 0x9cd4e000UL, 0x3fb92f69UL, 0x7e4496abUL,
+    0x3cf1f96dUL, 0x31f4f000UL, 0x3fb88f10UL, 0xf56479e7UL, 0x3d165818UL,
+    0xbf628000UL, 0x3fb7ef9cUL, 0x26bf486dUL, 0xbd1113a6UL, 0xb526b000UL,
+    0x3fb7510cUL, 0x1a1c3384UL, 0x3ca9898dUL, 0x8e31e000UL, 0x3fb6b35dUL,
+    0xb3875361UL, 0xbd0661acUL, 0xd01de000UL, 0x3fb6168cUL, 0x2a7cacfaUL,
+    0xbd1bdf10UL, 0x0af23000UL, 0x3fb57a98UL, 0xff868816UL, 0x3cf046d0UL,
+    0xd8ea0000UL, 0x3fb4df7cUL, 0x1515fbe7UL, 0xbd1fd529UL, 0xde3b2000UL,
+    0x3fb44538UL, 0x6e59a132UL, 0x3d1faeeeUL, 0xc8df9000UL, 0x3fb3abc9UL,
+    0xf1322361UL, 0xbd198807UL, 0x505f1000UL, 0x3fb3132dUL, 0x0888e6abUL,
+    0x3d1e5380UL, 0x359bd000UL, 0x3fb27b61UL, 0xdfbcbb22UL, 0xbcfe2724UL,
+    0x429ee000UL, 0x3fb1e463UL, 0x6eb4c58cUL, 0xbcfe4dd6UL, 0x4a673000UL,
+    0x3fb14e31UL, 0x4ce1ac9bUL, 0x3d1ba691UL, 0x28b96000UL, 0x3fb0b8c9UL,
+    0x8c7813b8UL, 0xbd0b3872UL, 0xc1f08000UL, 0x3fb02428UL, 0xc2bc8c2cUL,
+    0x3cb5ea6bUL, 0x05a1a000UL, 0x3faf209cUL, 0x72e8f18eUL, 0xbce8df84UL,
+    0xc0b5e000UL, 0x3fadfa6dUL, 0x9fdef436UL, 0x3d087364UL, 0xaf416000UL,
+    0x3facd5c2UL, 0x1068c3a9UL, 0x3d0827e7UL, 0xdb356000UL, 0x3fabb296UL,
+    0x120a34d3UL, 0x3d101a9fUL, 0x5dfea000UL, 0x3faa90e6UL, 0xdaded264UL,
+    0xbd14c392UL, 0x6034c000UL, 0x3fa970adUL, 0x1c9d06a9UL, 0xbd1b705eUL,
+    0x194c6000UL, 0x3fa851e8UL, 0x83996ad9UL, 0xbd0117bcUL, 0xcf4ac000UL,
+    0x3fa73492UL, 0xb1a94a62UL, 0xbca5ea42UL, 0xd67b4000UL, 0x3fa618a9UL,
+    0x75aed8caUL, 0xbd07119bUL, 0x9126c000UL, 0x3fa4fe29UL, 0x5291d533UL,
+    0x3d12658fUL, 0x6f4d4000UL, 0x3fa3e50eUL, 0xcd2c5cd9UL, 0x3d1d5c70UL,
+    0xee608000UL, 0x3fa2cd54UL, 0xd1008489UL, 0x3d1a4802UL, 0x9900e000UL,
+    0x3fa1b6f9UL, 0x54fb5598UL, 0xbd16593fUL, 0x06bb6000UL, 0x3fa0a1f9UL,
+    0x64ef57b4UL, 0xbd17636bUL, 0xb7940000UL, 0x3f9f1c9fUL, 0xee6a4737UL,
+    0x3cb5d479UL, 0x91aa0000UL, 0x3f9cf7f5UL, 0x3a16373cUL, 0x3d087114UL,
+    0x156b8000UL, 0x3f9ad5edUL, 0x836c554aUL, 0x3c6900b0UL, 0xd4764000UL,
+    0x3f98b67fUL, 0xed12f17bUL, 0xbcffc974UL, 0x77dec000UL, 0x3f9699a7UL,
+    0x232ce7eaUL, 0x3d1e35bbUL, 0xbfbf4000UL, 0x3f947f5dUL, 0xd84ffa6eUL,
+    0x3d0e0a49UL, 0x82c7c000UL, 0x3f92679cUL, 0x8d170e90UL, 0xbd14d9f2UL,
+    0xadd20000UL, 0x3f90525dUL, 0x86d9f88eUL, 0x3cdeb986UL, 0x86f10000UL,
+    0x3f8c7f36UL, 0xb9e0a517UL, 0x3ce29faaUL, 0xb75c8000UL, 0x3f885e9eUL,
+    0x542568cbUL, 0xbd1f7bdbUL, 0x46b30000UL, 0x3f8442e8UL, 0xb954e7d9UL,
+    0x3d1e5287UL, 0xb7e60000UL, 0x3f802c07UL, 0x22da0b17UL, 0xbd19fb27UL,
+    0x6c8b0000UL, 0x3f7833e3UL, 0x821271efUL, 0xbd190f96UL, 0x29910000UL,
+    0x3f701936UL, 0xbc3491a5UL, 0xbd1bcf45UL, 0x354a0000UL, 0x3f600fe3UL,
+    0xc0ff520aUL, 0xbd19d71cUL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x509f7800UL, 0x3f934413UL, 0x1f12b358UL, 0x3cdfef31UL,
+    0xc1a5f12eUL, 0x40358874UL, 0x64d4ef0dUL, 0xc0089309UL, 0x385593b1UL,
+    0xc025c917UL, 0xdc963467UL, 0x3ffc6a02UL, 0x7f9d3aa1UL, 0x4016ab9fUL,
+    0xdc77b115UL, 0xbff27af2UL, 0xf8000000UL, 0xffffffffUL, 0x00000000UL,
+    0xffffe000UL, 0x00000000UL, 0x3fdbc000UL, 0xbf2e4108UL, 0x3f5a7a6cUL
+};
+//registers,
+// input: xmm0
+// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
+//          rax, rdx, rcx, rbx (tmp)
+
+void MacroAssembler::fast_log10(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
+
+  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
+  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
+  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, start;
+
+  assert_different_registers(tmp, eax, ecx, edx);
+
+  address static_const_table_log10 = (address)_static_const_table_log10;
+
+  bind(start);
+  subl(rsp, 104);
+  movl(Address(rsp, 40), tmp);
+  lea(tmp, ExternalAddress(static_const_table_log10));
+  xorpd(xmm2, xmm2);
+  movl(eax, 16368);
+  pinsrw(xmm2, eax, 3);
+  movl(ecx, 1054736384);
+  movdl(xmm7, ecx);
+  xorpd(xmm3, xmm3);
+  movl(edx, 30704);
+  pinsrw(xmm3, edx, 3);
+  movsd(xmm0, Address(rsp, 112));
+  movdqu(xmm1, xmm0);
+  movl(edx, 32768);
+  movdl(xmm4, edx);
+  movdqu(xmm5, Address(tmp, 2128));    //0x3ffc6a02UL, 0x7f9d3aa1UL, 0x4016ab9fUL, 0xdc77b115UL
+  pextrw(eax, xmm0, 3);
+  por(xmm0, xmm2);
+  movl(ecx, 16352);
+  psllq(xmm0, 5);
+  movsd(xmm2, Address(tmp, 2144));    //0xbff27af2UL, 0xf8000000UL, 0xffffffffUL, 0x00000000UL
+  psrlq(xmm0, 34);
+  rcpss(xmm0, xmm0);
+  psllq(xmm1, 12);
+  pshufd(xmm6, xmm5, 78);
+  psrlq(xmm1, 12);
+  subl(eax, 16);
+  cmpl(eax, 32736);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
+
+  bind(L_2TAG_PACKET_1_0_2);
+  mulss(xmm0, xmm7);
+  por(xmm1, xmm3);
+  andpd(xmm5, xmm1);
+  paddd(xmm0, xmm4);
+  subsd(xmm1, xmm5);
+  movdl(edx, xmm0);
+  psllq(xmm0, 29);
+  andpd(xmm0, xmm6);
+  andl(eax, 32752);
+  subl(eax, ecx);
+  cvtsi2sdl(xmm7, eax);
+  mulpd(xmm5, xmm0);
+  mulsd(xmm1, xmm0);
+  movsd(xmm6, Address(tmp, 2064));    //0xbd19d71cUL, 0x00000000UL, 0x00000000UL, 0x00000000UL
+  movdqu(xmm3, Address(tmp, 2080));    //0x00000000UL, 0x509f7800UL, 0x3f934413UL, 0x1f12b358UL
+  subsd(xmm5, xmm2);
+  andl(edx, 16711680);
+  shrl(edx, 12);
+  movdqu(xmm0, Address(tmp, edx, Address::times_1, -1504));
+  movdqu(xmm4, Address(tmp, 2096));    //0x3cdfef31UL, 0xc1a5f12eUL, 0x40358874UL, 0x64d4ef0dUL
+  addsd(xmm1, xmm5);
+  movdqu(xmm2, Address(tmp, 2112));    //0xc0089309UL, 0x385593b1UL, 0xc025c917UL, 0xdc963467UL
+  mulsd(xmm6, xmm7);
+  pshufd(xmm5, xmm1, 68);
+  mulsd(xmm7, Address(tmp, 2072));    //0x00000000UL, 0x00000000UL, 0x00000000UL, 0x509f7800UL
+  mulsd(xmm3, xmm1);
+  addsd(xmm0, xmm6);
+  mulpd(xmm4, xmm5);
+  movsd(xmm6, Address(tmp, 2152));    //0xffffffffUL, 0x00000000UL, 0xffffe000UL, 0x00000000UL
+  mulpd(xmm5, xmm5);
+  addpd(xmm4, xmm2);
+  mulpd(xmm3, xmm5);
+  pshufd(xmm2, xmm0, 228);
+  addsd(xmm0, xmm1);
+  mulsd(xmm4, xmm1);
+  subsd(xmm2, xmm0);
+  mulsd(xmm6, xmm1);
+  addsd(xmm1, xmm2);
+  pshufd(xmm2, xmm0, 238);
+  mulsd(xmm5, xmm5);
+  addsd(xmm7, xmm2);
+  addsd(xmm1, xmm6);
+  addpd(xmm4, xmm3);
+  addsd(xmm1, xmm7);
+  mulpd(xmm4, xmm5);
+  addsd(xmm1, xmm4);
+  pshufd(xmm5, xmm4, 238);
+  addsd(xmm1, xmm5);
+  addsd(xmm0, xmm1);
+  jmp(L_2TAG_PACKET_2_0_2);
+
+  bind(L_2TAG_PACKET_0_0_2);
+  movsd(xmm0, Address(rsp, 112));    //0xbcfa1d84UL, 0x6baa7c00UL, 0x3fd28651UL, 0xfd9abec1UL
+  movdqu(xmm1, xmm0);
+  addl(eax, 16);
+  cmpl(eax, 32768);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_3_0_2);
+  cmpl(eax, 16);
+  jcc(Assembler::below, L_2TAG_PACKET_4_0_2);
+
+  bind(L_2TAG_PACKET_5_0_2);
+  addsd(xmm0, xmm0);
+  jmp(L_2TAG_PACKET_2_0_2);
+
+  bind(L_2TAG_PACKET_6_0_2);
+  jcc(Assembler::above, L_2TAG_PACKET_5_0_2);
+  cmpl(edx, 0);
+  jcc(Assembler::above, L_2TAG_PACKET_5_0_2);
+  jmp(L_2TAG_PACKET_7_0_2);
+
+  bind(L_2TAG_PACKET_3_0_2);
+  movdl(edx, xmm1);
+  psrlq(xmm1, 32);
+  movdl(ecx, xmm1);
+  addl(ecx, ecx);
+  cmpl(ecx, -2097152);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_6_0_2);
+  orl(edx, ecx);
+  cmpl(edx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_8_0_2);
+
+  bind(L_2TAG_PACKET_7_0_2);
+  xorpd(xmm1, xmm1);
+  xorpd(xmm0, xmm0);
+  movl(eax, 32752);
+  pinsrw(xmm1, eax, 3);
+  movl(edx, 9);
+  mulsd(xmm0, xmm1);
+
+  bind(L_2TAG_PACKET_9_0_2);
+  movsd(Address(rsp, 0), xmm0);
+  movsd(xmm0, Address(rsp, 112));    //0xbcfa1d84UL, 0x6baa7c00UL, 0x3fd28651UL, 0xfd9abec1UL
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_10_0_2);
+
+  bind(L_2TAG_PACKET_8_0_2);
+  xorpd(xmm1, xmm1);
+  xorpd(xmm0, xmm0);
+  movl(eax, 49136);
+  pinsrw(xmm0, eax, 3);
+  divsd(xmm0, xmm1);
+  movl(edx, 8);
+  jmp(L_2TAG_PACKET_9_0_2);
+
+  bind(L_2TAG_PACKET_4_0_2);
+  movdl(edx, xmm1);
+  psrlq(xmm1, 32);
+  movdl(ecx, xmm1);
+  orl(edx, ecx);
+  cmpl(edx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_8_0_2);
+  xorpd(xmm1, xmm1);
+  movl(eax, 18416);
+  pinsrw(xmm1, eax, 3);
+  mulsd(xmm0, xmm1);
+  xorpd(xmm2, xmm2);
+  movl(eax, 16368);
+  pinsrw(xmm2, eax, 3);
+  movdqu(xmm1, xmm0);
+  pextrw(eax, xmm0, 3);
+  por(xmm0, xmm2);
+  movl(ecx, 18416);
+  psllq(xmm0, 5);
+  movsd(xmm2, Address(tmp, 2144));    //0xbff27af2UL, 0xf8000000UL, 0xffffffffUL, 0x00000000UL
+  psrlq(xmm0, 34);
+  rcpss(xmm0, xmm0);
+  psllq(xmm1, 12);
+  pshufd(xmm6, xmm5, 78);
+  psrlq(xmm1, 12);
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_2_0_2);
+  movsd(Address(rsp, 24), xmm0);
+  fld_d(Address(rsp, 24));
+
+  bind(L_2TAG_PACKET_10_0_2);
+  movl(tmp, Address(rsp, 40));
+
+}
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86_pow.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,3592 @@
+/*
+* Copyright (c) 2016, Intel Corporation.
+* Intel Math Library (LIBM) Source Code
+*
+* 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.
+*
+*/
+
+#include "precompiled.hpp"
+#include "asm/assembler.hpp"
+#include "asm/assembler.inline.hpp"
+#include "runtime/stubRoutines.hpp"
+#include "macroAssembler_x86.hpp"
+
+#ifdef _MSC_VER
+#define ALIGNED_(x) __declspec(align(x))
+#else
+#define ALIGNED_(x) __attribute__ ((aligned(x)))
+#endif
+
+/******************************************************************************/
+//                     ALGORITHM DESCRIPTION  - POW()
+//                     ---------------------
+//
+//    Let x=2^k * mx, mx in [1,2)
+//
+//    log2(x) calculation:
+//
+//    Get B~1/mx based on the output of rcpps instruction (B0)
+//    B = int((B0*LH*2^9+0.5))/2^9
+//    LH is a short approximation for log2(e)
+//
+//    Reduced argument, scaled by LH:
+//                r=B*mx-LH (computed accurately in high and low parts)
+//
+//    log2(x) result:  k - log2(B) + p(r)
+//             p(r) is a degree 8 polynomial
+//             -log2(B) read from data table (high, low parts)
+//             log2(x) is formed from high and low parts
+//    For |x| in [1-1/32, 1+1/16), a slower but more accurate computation
+//    based om the same table design is performed.
+//
+//   Main path is taken if | floor(log2(|log2(|x|)|) + floor(log2|y|) | < 8,
+//   to filter out all potential OF/UF cases.
+//   exp2(y*log2(x)) is computed using an 8-bit index table and a degree 5
+//   polynomial
+//
+// Special cases:
+//  pow(-0,y) = -INF and raises the divide-by-zero exception for y an odd
+//  integer < 0.
+//  pow(-0,y) = +INF and raises the divide-by-zero exception for y < 0 and
+//  not an odd integer.
+//  pow(-0,y) = -0 for y an odd integer > 0.
+//  pow(-0,y) = +0 for y > 0 and not an odd integer.
+//  pow(-1,-INF) = NaN.
+//  pow(+1,y) = NaN for any y, even a NaN.
+//  pow(x,-0) = 1 for any x, even a NaN.
+//  pow(x,y) = a NaN and raises the invalid exception for finite x < 0 and
+//  finite non-integer y.
+//  pow(x,-INF) = +INF for |x|<1.
+//  pow(x,-INF) = +0 for |x|>1.
+//  pow(x,+INF) = +0 for |x|<1.
+//  pow(x,+INF) = +INF for |x|>1.
+//  pow(-INF,y) = -0 for y an odd integer < 0.
+//  pow(-INF,y) = +0 for y < 0 and not an odd integer.
+//  pow(-INF,y) = -INF for y an odd integer > 0.
+//  pow(-INF,y) = +INF for y > 0 and not an odd integer.
+//  pow(+INF,y) = +0 for y <0.
+//  pow(+INF,y) = +INF for y >0.
+//
+/******************************************************************************/
+
+#ifdef _LP64
+// The 64 bit code is at most SSE2 compliant
+ALIGNED_(16) juint _HIGHSIGMASK[] =
+{
+    0x00000000UL, 0xfffff800UL, 0x00000000UL, 0xfffff800UL
+};
+
+ALIGNED_(16) juint _LOG2_E[] =
+{
+    0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
+};
+
+ALIGNED_(16) juint _HIGHMASK_Y[] =
+{
+    0x00000000UL, 0xfffffff8UL, 0x00000000UL, 0xffffffffUL
+};
+
+ALIGNED_(16) juint _T_exp[] =
+{
+    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x3b700000UL, 0xfa5abcbfUL,
+    0x3ff00b1aUL, 0xa7609f71UL, 0xbc84f6b2UL, 0xa9fb3335UL, 0x3ff0163dUL,
+    0x9ab8cdb7UL, 0x3c9b6129UL, 0x143b0281UL, 0x3ff02168UL, 0x0fc54eb6UL,
+    0xbc82bf31UL, 0x3e778061UL, 0x3ff02c9aUL, 0x535b085dUL, 0xbc719083UL,
+    0x2e11bbccUL, 0x3ff037d4UL, 0xeeade11aUL, 0x3c656811UL, 0xe86e7f85UL,
+    0x3ff04315UL, 0x1977c96eUL, 0xbc90a31cUL, 0x72f654b1UL, 0x3ff04e5fUL,
+    0x3aa0d08cUL, 0x3c84c379UL, 0xd3158574UL, 0x3ff059b0UL, 0xa475b465UL,
+    0x3c8d73e2UL, 0x0e3c1f89UL, 0x3ff0650aUL, 0x5799c397UL, 0xbc95cb7bUL,
+    0x29ddf6deUL, 0x3ff0706bUL, 0xe2b13c27UL, 0xbc8c91dfUL, 0x2b72a836UL,
+    0x3ff07bd4UL, 0x54458700UL, 0x3c832334UL, 0x18759bc8UL, 0x3ff08745UL,
+    0x4bb284ffUL, 0x3c6186beUL, 0xf66607e0UL, 0x3ff092bdUL, 0x800a3fd1UL,
+    0xbc968063UL, 0xcac6f383UL, 0x3ff09e3eUL, 0x18316136UL, 0x3c914878UL,
+    0x9b1f3919UL, 0x3ff0a9c7UL, 0x873d1d38UL, 0x3c85d16cUL, 0x6cf9890fUL,
+    0x3ff0b558UL, 0x4adc610bUL, 0x3c98a62eUL, 0x45e46c85UL, 0x3ff0c0f1UL,
+    0x06d21cefUL, 0x3c94f989UL, 0x2b7247f7UL, 0x3ff0cc92UL, 0x16e24f71UL,
+    0x3c901edcUL, 0x23395decUL, 0x3ff0d83bUL, 0xe43f316aUL, 0xbc9bc14dUL,
+    0x32d3d1a2UL, 0x3ff0e3ecUL, 0x27c57b52UL, 0x3c403a17UL, 0x5fdfa9c5UL,
+    0x3ff0efa5UL, 0xbc54021bUL, 0xbc949db9UL, 0xaffed31bUL, 0x3ff0fb66UL,
+    0xc44ebd7bUL, 0xbc6b9bedUL, 0x28d7233eUL, 0x3ff10730UL, 0x1692fdd5UL,
+    0x3c8d46ebUL, 0xd0125b51UL, 0x3ff11301UL, 0x39449b3aUL, 0xbc96c510UL,
+    0xab5e2ab6UL, 0x3ff11edbUL, 0xf703fb72UL, 0xbc9ca454UL, 0xc06c31ccUL,
+    0x3ff12abdUL, 0xb36ca5c7UL, 0xbc51b514UL, 0x14f204abUL, 0x3ff136a8UL,
+    0xba48dcf0UL, 0xbc67108fUL, 0xaea92de0UL, 0x3ff1429aUL, 0x9af1369eUL,
+    0xbc932fbfUL, 0x934f312eUL, 0x3ff14e95UL, 0x39bf44abUL, 0xbc8b91e8UL,
+    0xc8a58e51UL, 0x3ff15a98UL, 0xb9eeab0aUL, 0x3c82406aUL, 0x5471c3c2UL,
+    0x3ff166a4UL, 0x82ea1a32UL, 0x3c58f23bUL, 0x3c7d517bUL, 0x3ff172b8UL,
+    0xb9d78a76UL, 0xbc819041UL, 0x8695bbc0UL, 0x3ff17ed4UL, 0xe2ac5a64UL,
+    0x3c709e3fUL, 0x388c8deaUL, 0x3ff18af9UL, 0xd1970f6cUL, 0xbc911023UL,
+    0x58375d2fUL, 0x3ff19726UL, 0x85f17e08UL, 0x3c94aaddUL, 0xeb6fcb75UL,
+    0x3ff1a35bUL, 0x7b4968e4UL, 0x3c8e5b4cUL, 0xf8138a1cUL, 0x3ff1af99UL,
+    0xa4b69280UL, 0x3c97bf85UL, 0x84045cd4UL, 0x3ff1bbe0UL, 0x352ef607UL,
+    0xbc995386UL, 0x95281c6bUL, 0x3ff1c82fUL, 0x8010f8c9UL, 0x3c900977UL,
+    0x3168b9aaUL, 0x3ff1d487UL, 0x00a2643cUL, 0x3c9e016eUL, 0x5eb44027UL,
+    0x3ff1e0e7UL, 0x088cb6deUL, 0xbc96fdd8UL, 0x22fcd91dUL, 0x3ff1ed50UL,
+    0x027bb78cUL, 0xbc91df98UL, 0x8438ce4dUL, 0x3ff1f9c1UL, 0xa097af5cUL,
+    0xbc9bf524UL, 0x88628cd6UL, 0x3ff2063bUL, 0x814a8495UL, 0x3c8dc775UL,
+    0x3578a819UL, 0x3ff212beUL, 0x2cfcaac9UL, 0x3c93592dUL, 0x917ddc96UL,
+    0x3ff21f49UL, 0x9494a5eeUL, 0x3c82a97eUL, 0xa27912d1UL, 0x3ff22bddUL,
+    0x5577d69fUL, 0x3c8d34fbUL, 0x6e756238UL, 0x3ff2387aUL, 0xb6c70573UL,
+    0x3c99b07eUL, 0xfb82140aUL, 0x3ff2451fUL, 0x911ca996UL, 0x3c8acfccUL,
+    0x4fb2a63fUL, 0x3ff251ceUL, 0xbef4f4a4UL, 0x3c8ac155UL, 0x711ece75UL,
+    0x3ff25e85UL, 0x4ac31b2cUL, 0x3c93e1a2UL, 0x65e27cddUL, 0x3ff26b45UL,
+    0x9940e9d9UL, 0x3c82bd33UL, 0x341ddf29UL, 0x3ff2780eUL, 0x05f9e76cUL,
+    0x3c9e067cUL, 0xe1f56381UL, 0x3ff284dfUL, 0x8c3f0d7eUL, 0xbc9a4c3aUL,
+    0x7591bb70UL, 0x3ff291baUL, 0x28401cbdUL, 0xbc82cc72UL, 0xf51fdee1UL,
+    0x3ff29e9dUL, 0xafad1255UL, 0x3c8612e8UL, 0x66d10f13UL, 0x3ff2ab8aUL,
+    0x191690a7UL, 0xbc995743UL, 0xd0dad990UL, 0x3ff2b87fUL, 0xd6381aa4UL,
+    0xbc410adcUL, 0x39771b2fUL, 0x3ff2c57eUL, 0xa6eb5124UL, 0xbc950145UL,
+    0xa6e4030bUL, 0x3ff2d285UL, 0x54db41d5UL, 0x3c900247UL, 0x1f641589UL,
+    0x3ff2df96UL, 0xfbbce198UL, 0x3c9d16cfUL, 0xa93e2f56UL, 0x3ff2ecafUL,
+    0x45d52383UL, 0x3c71ca0fUL, 0x4abd886bUL, 0x3ff2f9d2UL, 0x532bda93UL,
+    0xbc653c55UL, 0x0a31b715UL, 0x3ff306feUL, 0xd23182e4UL, 0x3c86f46aUL,
+    0xedeeb2fdUL, 0x3ff31432UL, 0xf3f3fcd1UL, 0x3c8959a3UL, 0xfc4cd831UL,
+    0x3ff32170UL, 0x8e18047cUL, 0x3c8a9ce7UL, 0x3ba8ea32UL, 0x3ff32eb8UL,
+    0x3cb4f318UL, 0xbc9c45e8UL, 0xb26416ffUL, 0x3ff33c08UL, 0x843659a6UL,
+    0x3c932721UL, 0x66e3fa2dUL, 0x3ff34962UL, 0x930881a4UL, 0xbc835a75UL,
+    0x5f929ff1UL, 0x3ff356c5UL, 0x5c4e4628UL, 0xbc8b5ceeUL, 0xa2de883bUL,
+    0x3ff36431UL, 0xa06cb85eUL, 0xbc8c3144UL, 0x373aa9cbUL, 0x3ff371a7UL,
+    0xbf42eae2UL, 0xbc963aeaUL, 0x231e754aUL, 0x3ff37f26UL, 0x9eceb23cUL,
+    0xbc99f5caUL, 0x6d05d866UL, 0x3ff38caeUL, 0x3c9904bdUL, 0xbc9e958dUL,
+    0x1b7140efUL, 0x3ff39a40UL, 0xfc8e2934UL, 0xbc99a9a5UL, 0x34e59ff7UL,
+    0x3ff3a7dbUL, 0xd661f5e3UL, 0xbc75e436UL, 0xbfec6cf4UL, 0x3ff3b57fUL,
+    0xe26fff18UL, 0x3c954c66UL, 0xc313a8e5UL, 0x3ff3c32dUL, 0x375d29c3UL,
+    0xbc9efff8UL, 0x44ede173UL, 0x3ff3d0e5UL, 0x8c284c71UL, 0x3c7fe8d0UL,
+    0x4c123422UL, 0x3ff3dea6UL, 0x11f09ebcUL, 0x3c8ada09UL, 0xdf1c5175UL,
+    0x3ff3ec70UL, 0x7b8c9bcaUL, 0xbc8af663UL, 0x04ac801cUL, 0x3ff3fa45UL,
+    0xf956f9f3UL, 0xbc97d023UL, 0xc367a024UL, 0x3ff40822UL, 0xb6f4d048UL,
+    0x3c8bddf8UL, 0x21f72e2aUL, 0x3ff4160aUL, 0x1c309278UL, 0xbc5ef369UL,
+    0x2709468aUL, 0x3ff423fbUL, 0xc0b314ddUL, 0xbc98462dUL, 0xd950a897UL,
+    0x3ff431f5UL, 0xe35f7999UL, 0xbc81c7ddUL, 0x3f84b9d4UL, 0x3ff43ffaUL,
+    0x9704c003UL, 0x3c8880beUL, 0x6061892dUL, 0x3ff44e08UL, 0x04ef80d0UL,
+    0x3c489b7aUL, 0x42a7d232UL, 0x3ff45c20UL, 0x82fb1f8eUL, 0xbc686419UL,
+    0xed1d0057UL, 0x3ff46a41UL, 0xd1648a76UL, 0x3c9c944bUL, 0x668b3237UL,
+    0x3ff4786dUL, 0xed445733UL, 0xbc9c20f0UL, 0xb5c13cd0UL, 0x3ff486a2UL,
+    0xb69062f0UL, 0x3c73c1a3UL, 0xe192aed2UL, 0x3ff494e1UL, 0x5e499ea0UL,
+    0xbc83b289UL, 0xf0d7d3deUL, 0x3ff4a32aUL, 0xf3d1be56UL, 0x3c99cb62UL,
+    0xea6db7d7UL, 0x3ff4b17dUL, 0x7f2897f0UL, 0xbc8125b8UL, 0xd5362a27UL,
+    0x3ff4bfdaUL, 0xafec42e2UL, 0x3c7d4397UL, 0xb817c114UL, 0x3ff4ce41UL,
+    0x690abd5dUL, 0x3c905e29UL, 0x99fddd0dUL, 0x3ff4dcb2UL, 0xbc6a7833UL,
+    0x3c98ecdbUL, 0x81d8abffUL, 0x3ff4eb2dUL, 0x2e5d7a52UL, 0xbc95257dUL,
+    0x769d2ca7UL, 0x3ff4f9b2UL, 0xd25957e3UL, 0xbc94b309UL, 0x7f4531eeUL,
+    0x3ff50841UL, 0x49b7465fUL, 0x3c7a249bUL, 0xa2cf6642UL, 0x3ff516daUL,
+    0x69bd93efUL, 0xbc8f7685UL, 0xe83f4eefUL, 0x3ff5257dUL, 0x43efef71UL,
+    0xbc7c998dUL, 0x569d4f82UL, 0x3ff5342bUL, 0x1db13cadUL, 0xbc807abeUL,
+    0xf4f6ad27UL, 0x3ff542e2UL, 0x192d5f7eUL, 0x3c87926dUL, 0xca5d920fUL,
+    0x3ff551a4UL, 0xefede59bUL, 0xbc8d689cUL, 0xdde910d2UL, 0x3ff56070UL,
+    0x168eebf0UL, 0xbc90fb6eUL, 0x36b527daUL, 0x3ff56f47UL, 0x011d93adUL,
+    0x3c99bb2cUL, 0xdbe2c4cfUL, 0x3ff57e27UL, 0x8a57b9c4UL, 0xbc90b98cUL,
+    0xd497c7fdUL, 0x3ff58d12UL, 0x5b9a1de8UL, 0x3c8295e1UL, 0x27ff07ccUL,
+    0x3ff59c08UL, 0xe467e60fUL, 0xbc97e2ceUL, 0xdd485429UL, 0x3ff5ab07UL,
+    0x054647adUL, 0x3c96324cUL, 0xfba87a03UL, 0x3ff5ba11UL, 0x4c233e1aUL,
+    0xbc9b77a1UL, 0x8a5946b7UL, 0x3ff5c926UL, 0x816986a2UL, 0x3c3c4b1bUL,
+    0x90998b93UL, 0x3ff5d845UL, 0xa8b45643UL, 0xbc9cd6a7UL, 0x15ad2148UL,
+    0x3ff5e76fUL, 0x3080e65eUL, 0x3c9ba6f9UL, 0x20dceb71UL, 0x3ff5f6a3UL,
+    0xe3cdcf92UL, 0xbc89eaddUL, 0xb976dc09UL, 0x3ff605e1UL, 0x9b56de47UL,
+    0xbc93e242UL, 0xe6cdf6f4UL, 0x3ff6152aUL, 0x4ab84c27UL, 0x3c9e4b3eUL,
+    0xb03a5585UL, 0x3ff6247eUL, 0x7e40b497UL, 0xbc9383c1UL, 0x1d1929fdUL,
+    0x3ff633ddUL, 0xbeb964e5UL, 0x3c984710UL, 0x34ccc320UL, 0x3ff64346UL,
+    0x759d8933UL, 0xbc8c483cUL, 0xfebc8fb7UL, 0x3ff652b9UL, 0xc9a73e09UL,
+    0xbc9ae3d5UL, 0x82552225UL, 0x3ff66238UL, 0x87591c34UL, 0xbc9bb609UL,
+    0xc70833f6UL, 0x3ff671c1UL, 0x586c6134UL, 0xbc8e8732UL, 0xd44ca973UL,
+    0x3ff68155UL, 0x44f73e65UL, 0x3c6038aeUL, 0xb19e9538UL, 0x3ff690f4UL,
+    0x9aeb445dUL, 0x3c8804bdUL, 0x667f3bcdUL, 0x3ff6a09eUL, 0x13b26456UL,
+    0xbc9bdd34UL, 0xfa75173eUL, 0x3ff6b052UL, 0x2c9a9d0eUL, 0x3c7a38f5UL,
+    0x750bdabfUL, 0x3ff6c012UL, 0x67ff0b0dUL, 0xbc728956UL, 0xddd47645UL,
+    0x3ff6cfdcUL, 0xb6f17309UL, 0x3c9c7aa9UL, 0x3c651a2fUL, 0x3ff6dfb2UL,
+    0x683c88abUL, 0xbc6bbe3aUL, 0x98593ae5UL, 0x3ff6ef92UL, 0x9e1ac8b2UL,
+    0xbc90b974UL, 0xf9519484UL, 0x3ff6ff7dUL, 0x25860ef6UL, 0xbc883c0fUL,
+    0x66f42e87UL, 0x3ff70f74UL, 0xd45aa65fUL, 0x3c59d644UL, 0xe8ec5f74UL,
+    0x3ff71f75UL, 0x86887a99UL, 0xbc816e47UL, 0x86ead08aUL, 0x3ff72f82UL,
+    0x2cd62c72UL, 0xbc920aa0UL, 0x48a58174UL, 0x3ff73f9aUL, 0x6c65d53cUL,
+    0xbc90a8d9UL, 0x35d7cbfdUL, 0x3ff74fbdUL, 0x618a6e1cUL, 0x3c9047fdUL,
+    0x564267c9UL, 0x3ff75febUL, 0x57316dd3UL, 0xbc902459UL, 0xb1ab6e09UL,
+    0x3ff77024UL, 0x169147f8UL, 0x3c9b7877UL, 0x4fde5d3fUL, 0x3ff78069UL,
+    0x0a02162dUL, 0x3c9866b8UL, 0x38ac1cf6UL, 0x3ff790b9UL, 0x62aadd3eUL,
+    0x3c9349a8UL, 0x73eb0187UL, 0x3ff7a114UL, 0xee04992fUL, 0xbc841577UL,
+    0x0976cfdbUL, 0x3ff7b17bUL, 0x8468dc88UL, 0xbc9bebb5UL, 0x0130c132UL,
+    0x3ff7c1edUL, 0xd1164dd6UL, 0x3c9f124cUL, 0x62ff86f0UL, 0x3ff7d26aUL,
+    0xfb72b8b4UL, 0x3c91bddbUL, 0x36cf4e62UL, 0x3ff7e2f3UL, 0xba15797eUL,
+    0x3c705d02UL, 0x8491c491UL, 0x3ff7f387UL, 0xcf9311aeUL, 0xbc807f11UL,
+    0x543e1a12UL, 0x3ff80427UL, 0x626d972bUL, 0xbc927c86UL, 0xadd106d9UL,
+    0x3ff814d2UL, 0x0d151d4dUL, 0x3c946437UL, 0x994cce13UL, 0x3ff82589UL,
+    0xd41532d8UL, 0xbc9d4c1dUL, 0x1eb941f7UL, 0x3ff8364cUL, 0x31df2bd5UL,
+    0x3c999b9aUL, 0x4623c7adUL, 0x3ff8471aUL, 0xa341cdfbUL, 0xbc88d684UL,
+    0x179f5b21UL, 0x3ff857f4UL, 0xf8b216d0UL, 0xbc5ba748UL, 0x9b4492edUL,
+    0x3ff868d9UL, 0x9bd4f6baUL, 0xbc9fc6f8UL, 0xd931a436UL, 0x3ff879caUL,
+    0xd2db47bdUL, 0x3c85d2d7UL, 0xd98a6699UL, 0x3ff88ac7UL, 0xf37cb53aUL,
+    0x3c9994c2UL, 0xa478580fUL, 0x3ff89bd0UL, 0x4475202aUL, 0x3c9d5395UL,
+    0x422aa0dbUL, 0x3ff8ace5UL, 0x56864b27UL, 0x3c96e9f1UL, 0xbad61778UL,
+    0x3ff8be05UL, 0xfc43446eUL, 0x3c9ecb5eUL, 0x16b5448cUL, 0x3ff8cf32UL,
+    0x32e9e3aaUL, 0xbc70d55eUL, 0x5e0866d9UL, 0x3ff8e06aUL, 0x6fc9b2e6UL,
+    0xbc97114aUL, 0x99157736UL, 0x3ff8f1aeUL, 0xa2e3976cUL, 0x3c85cc13UL,
+    0xd0282c8aUL, 0x3ff902feUL, 0x85fe3fd2UL, 0x3c9592caUL, 0x0b91ffc6UL,
+    0x3ff9145bUL, 0x2e582524UL, 0xbc9dd679UL, 0x53aa2fe2UL, 0x3ff925c3UL,
+    0xa639db7fUL, 0xbc83455fUL, 0xb0cdc5e5UL, 0x3ff93737UL, 0x81b57ebcUL,
+    0xbc675fc7UL, 0x2b5f98e5UL, 0x3ff948b8UL, 0x797d2d99UL, 0xbc8dc3d6UL,
+    0xcbc8520fUL, 0x3ff95a44UL, 0x96a5f039UL, 0xbc764b7cUL, 0x9a7670b3UL,
+    0x3ff96bddUL, 0x7f19c896UL, 0xbc5ba596UL, 0x9fde4e50UL, 0x3ff97d82UL,
+    0x7c1b85d1UL, 0xbc9d185bUL, 0xe47a22a2UL, 0x3ff98f33UL, 0xa24c78ecUL,
+    0x3c7cabdaUL, 0x70ca07baUL, 0x3ff9a0f1UL, 0x91cee632UL, 0xbc9173bdUL,
+    0x4d53fe0dUL, 0x3ff9b2bbUL, 0x4df6d518UL, 0xbc9dd84eUL, 0x82a3f090UL,
+    0x3ff9c491UL, 0xb071f2beUL, 0x3c7c7c46UL, 0x194bb8d5UL, 0x3ff9d674UL,
+    0xa3dd8233UL, 0xbc9516beUL, 0x19e32323UL, 0x3ff9e863UL, 0x78e64c6eUL,
+    0x3c7824caUL, 0x8d07f29eUL, 0x3ff9fa5eUL, 0xaaf1faceUL, 0xbc84a9ceUL,
+    0x7b5de565UL, 0x3ffa0c66UL, 0x5d1cd533UL, 0xbc935949UL, 0xed8eb8bbUL,
+    0x3ffa1e7aUL, 0xee8be70eUL, 0x3c9c6618UL, 0xec4a2d33UL, 0x3ffa309bUL,
+    0x7ddc36abUL, 0x3c96305cUL, 0x80460ad8UL, 0x3ffa42c9UL, 0x589fb120UL,
+    0xbc9aa780UL, 0xb23e255dUL, 0x3ffa5503UL, 0xdb8d41e1UL, 0xbc9d2f6eUL,
+    0x8af46052UL, 0x3ffa674aUL, 0x30670366UL, 0x3c650f56UL, 0x1330b358UL,
+    0x3ffa799eUL, 0xcac563c7UL, 0x3c9bcb7eUL, 0x53c12e59UL, 0x3ffa8bfeUL,
+    0xb2ba15a9UL, 0xbc94f867UL, 0x5579fdbfUL, 0x3ffa9e6bUL, 0x0ef7fd31UL,
+    0x3c90fac9UL, 0x21356ebaUL, 0x3ffab0e5UL, 0xdae94545UL, 0x3c889c31UL,
+    0xbfd3f37aUL, 0x3ffac36bUL, 0xcae76cd0UL, 0xbc8f9234UL, 0x3a3c2774UL,
+    0x3ffad5ffUL, 0xb6b1b8e5UL, 0x3c97ef3bUL, 0x995ad3adUL, 0x3ffae89fUL,
+    0x345dcc81UL, 0x3c97a1cdUL, 0xe622f2ffUL, 0x3ffafb4cUL, 0x0f315ecdUL,
+    0xbc94b2fcUL, 0x298db666UL, 0x3ffb0e07UL, 0x4c80e425UL, 0xbc9bdef5UL,
+    0x6c9a8952UL, 0x3ffb20ceUL, 0x4a0756ccUL, 0x3c94dd02UL, 0xb84f15fbUL,
+    0x3ffb33a2UL, 0x3084d708UL, 0xbc62805eUL, 0x15b749b1UL, 0x3ffb4684UL,
+    0xe9df7c90UL, 0xbc7f763dUL, 0x8de5593aUL, 0x3ffb5972UL, 0xbbba6de3UL,
+    0xbc9c71dfUL, 0x29f1c52aUL, 0x3ffb6c6eUL, 0x52883f6eUL, 0x3c92a8f3UL,
+    0xf2fb5e47UL, 0x3ffb7f76UL, 0x7e54ac3bUL, 0xbc75584fUL, 0xf22749e4UL,
+    0x3ffb928cUL, 0x54cb65c6UL, 0xbc9b7216UL, 0x30a1064aUL, 0x3ffba5b0UL,
+    0x0e54292eUL, 0xbc9efcd3UL, 0xb79a6f1fUL, 0x3ffbb8e0UL, 0xc9696205UL,
+    0xbc3f52d1UL, 0x904bc1d2UL, 0x3ffbcc1eUL, 0x7a2d9e84UL, 0x3c823dd0UL,
+    0xc3f3a207UL, 0x3ffbdf69UL, 0x60ea5b53UL, 0xbc3c2623UL, 0x5bd71e09UL,
+    0x3ffbf2c2UL, 0x3f6b9c73UL, 0xbc9efdcaUL, 0x6141b33dUL, 0x3ffc0628UL,
+    0xa1fbca34UL, 0xbc8d8a5aUL, 0xdd85529cUL, 0x3ffc199bUL, 0x895048ddUL,
+    0x3c811065UL, 0xd9fa652cUL, 0x3ffc2d1cUL, 0x17c8a5d7UL, 0xbc96e516UL,
+    0x5fffd07aUL, 0x3ffc40abUL, 0xe083c60aUL, 0x3c9b4537UL, 0x78fafb22UL,
+    0x3ffc5447UL, 0x2493b5afUL, 0x3c912f07UL, 0x2e57d14bUL, 0x3ffc67f1UL,
+    0xff483cadUL, 0x3c92884dUL, 0x8988c933UL, 0x3ffc7ba8UL, 0xbe255559UL,
+    0xbc8e76bbUL, 0x9406e7b5UL, 0x3ffc8f6dUL, 0x48805c44UL, 0x3c71acbcUL,
+    0x5751c4dbUL, 0x3ffca340UL, 0xd10d08f5UL, 0xbc87f2beUL, 0xdcef9069UL,
+    0x3ffcb720UL, 0xd1e949dbUL, 0x3c7503cbUL, 0x2e6d1675UL, 0x3ffccb0fUL,
+    0x86009092UL, 0xbc7d220fUL, 0x555dc3faUL, 0x3ffcdf0bUL, 0x53829d72UL,
+    0xbc8dd83bUL, 0x5b5bab74UL, 0x3ffcf315UL, 0xb86dff57UL, 0xbc9a08e9UL,
+    0x4a07897cUL, 0x3ffd072dUL, 0x43797a9cUL, 0xbc9cbc37UL, 0x2b08c968UL,
+    0x3ffd1b53UL, 0x219a36eeUL, 0x3c955636UL, 0x080d89f2UL, 0x3ffd2f87UL,
+    0x719d8578UL, 0xbc9d487bUL, 0xeacaa1d6UL, 0x3ffd43c8UL, 0xbf5a1614UL,
+    0x3c93db53UL, 0xdcfba487UL, 0x3ffd5818UL, 0xd75b3707UL, 0x3c82ed02UL,
+    0xe862e6d3UL, 0x3ffd6c76UL, 0x4a8165a0UL, 0x3c5fe87aUL, 0x16c98398UL,
+    0x3ffd80e3UL, 0x8beddfe8UL, 0xbc911ec1UL, 0x71ff6075UL, 0x3ffd955dUL,
+    0xbb9af6beUL, 0x3c9a052dUL, 0x03db3285UL, 0x3ffda9e6UL, 0x696db532UL,
+    0x3c9c2300UL, 0xd63a8315UL, 0x3ffdbe7cUL, 0x926b8be4UL, 0xbc9b76f1UL,
+    0xf301b460UL, 0x3ffdd321UL, 0x78f018c3UL, 0x3c92da57UL, 0x641c0658UL,
+    0x3ffde7d5UL, 0x8e79ba8fUL, 0xbc9ca552UL, 0x337b9b5fUL, 0x3ffdfc97UL,
+    0x4f184b5cUL, 0xbc91a5cdUL, 0x6b197d17UL, 0x3ffe1167UL, 0xbd5c7f44UL,
+    0xbc72b529UL, 0x14f5a129UL, 0x3ffe2646UL, 0x817a1496UL, 0xbc97b627UL,
+    0x3b16ee12UL, 0x3ffe3b33UL, 0x31fdc68bUL, 0xbc99f4a4UL, 0xe78b3ff6UL,
+    0x3ffe502eUL, 0x80a9cc8fUL, 0x3c839e89UL, 0x24676d76UL, 0x3ffe6539UL,
+    0x7522b735UL, 0xbc863ff8UL, 0xfbc74c83UL, 0x3ffe7a51UL, 0xca0c8de2UL,
+    0x3c92d522UL, 0x77cdb740UL, 0x3ffe8f79UL, 0x80b054b1UL, 0xbc910894UL,
+    0xa2a490daUL, 0x3ffea4afUL, 0x179c2893UL, 0xbc9e9c23UL, 0x867cca6eUL,
+    0x3ffeb9f4UL, 0x2293e4f2UL, 0x3c94832fUL, 0x2d8e67f1UL, 0x3ffecf48UL,
+    0xb411ad8cUL, 0xbc9c93f3UL, 0xa2188510UL, 0x3ffee4aaUL, 0xa487568dUL,
+    0x3c91c68dUL, 0xee615a27UL, 0x3ffefa1bUL, 0x86a4b6b0UL, 0x3c9dc7f4UL,
+    0x1cb6412aUL, 0x3fff0f9cUL, 0x65181d45UL, 0xbc932200UL, 0x376bba97UL,
+    0x3fff252bUL, 0xbf0d8e43UL, 0x3c93a1a5UL, 0x48dd7274UL, 0x3fff3ac9UL,
+    0x3ed837deUL, 0xbc795a5aUL, 0x5b6e4540UL, 0x3fff5076UL, 0x2dd8a18bUL,
+    0x3c99d3e1UL, 0x798844f8UL, 0x3fff6632UL, 0x3539343eUL, 0x3c9fa37bUL,
+    0xad9cbe14UL, 0x3fff7bfdUL, 0xd006350aUL, 0xbc9dbb12UL, 0x02243c89UL,
+    0x3fff91d8UL, 0xa779f689UL, 0xbc612ea8UL, 0x819e90d8UL, 0x3fffa7c1UL,
+    0xf3a5931eUL, 0x3c874853UL, 0x3692d514UL, 0x3fffbdbaUL, 0x15098eb6UL,
+    0xbc796773UL, 0x2b8f71f1UL, 0x3fffd3c2UL, 0x966579e7UL, 0x3c62eb74UL,
+    0x6b2a23d9UL, 0x3fffe9d9UL, 0x7442fde3UL, 0x3c74a603UL
+};
+
+ALIGNED_(16) juint _e_coeff[] =
+{
+    0xe78a6731UL, 0x3f55d87fUL, 0xd704a0c0UL, 0x3fac6b08UL, 0x6fba4e77UL,
+    0x3f83b2abUL, 0xff82c58fUL, 0x3fcebfbdUL, 0xfefa39efUL, 0x3fe62e42UL,
+    0x00000000UL, 0x00000000UL
+};
+
+ALIGNED_(16) juint _coeff_h[] =
+{
+    0x00000000UL, 0xbfd61a00UL, 0x00000000UL, 0xbf5dabe1UL
+};
+
+ALIGNED_(16) juint _HIGHMASK_LOG_X[] =
+{
+    0xf8000000UL, 0xffffffffUL, 0x00000000UL, 0xfffff800UL
+};
+
+ALIGNED_(8) juint _HALFMASK[] =
+{
+    0xf8000000UL, 0xffffffffUL, 0xf8000000UL, 0xffffffffUL
+};
+
+ALIGNED_(16) juint _coeff_pow[] =
+{
+    0x6dc96112UL, 0xbf836578UL, 0xee241472UL, 0xbf9b0301UL, 0x9f95985aUL,
+    0xbfb528dbUL, 0xb3841d2aUL, 0xbfd619b6UL, 0x518775e3UL, 0x3f9004f2UL,
+    0xac8349bbUL, 0x3fa76c9bUL, 0x486ececcUL, 0x3fc4635eUL, 0x161bb241UL,
+    0xbf5dabe1UL, 0x9f95985aUL, 0xbfb528dbUL, 0xf8b5787dUL, 0x3ef2531eUL,
+    0x486ececbUL, 0x3fc4635eUL, 0x412055ccUL, 0xbdd61bb2UL
+};
+
+ALIGNED_(16) juint _L_tbl_pow[] =
+{
+    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x20000000UL,
+    0x3feff00aUL, 0x96621f95UL, 0x3e5b1856UL, 0xe0000000UL, 0x3fefe019UL,
+    0xe5916f9eUL, 0xbe325278UL, 0x00000000UL, 0x3fefd02fUL, 0x859a1062UL,
+    0x3e595fb7UL, 0xc0000000UL, 0x3fefc049UL, 0xb245f18fUL, 0xbe529c38UL,
+    0xe0000000UL, 0x3fefb069UL, 0xad2880a7UL, 0xbe501230UL, 0x60000000UL,
+    0x3fefa08fUL, 0xc8e72420UL, 0x3e597bd1UL, 0x80000000UL, 0x3fef90baUL,
+    0xc30c4500UL, 0xbe5d6c75UL, 0xe0000000UL, 0x3fef80eaUL, 0x02c63f43UL,
+    0x3e2e1318UL, 0xc0000000UL, 0x3fef7120UL, 0xb3d4ccccUL, 0xbe44c52aUL,
+    0x00000000UL, 0x3fef615cUL, 0xdbd91397UL, 0xbe4e7d6cUL, 0xa0000000UL,
+    0x3fef519cUL, 0x65c5cd68UL, 0xbe522dc8UL, 0xa0000000UL, 0x3fef41e2UL,
+    0x46d1306cUL, 0xbe5a840eUL, 0xe0000000UL, 0x3fef322dUL, 0xd2980e94UL,
+    0x3e5071afUL, 0xa0000000UL, 0x3fef227eUL, 0x773abadeUL, 0xbe5891e5UL,
+    0xa0000000UL, 0x3fef12d4UL, 0xdc6bf46bUL, 0xbe5cccbeUL, 0xe0000000UL,
+    0x3fef032fUL, 0xbc7247faUL, 0xbe2bab83UL, 0x80000000UL, 0x3feef390UL,
+    0xbcaa1e46UL, 0xbe53bb3bUL, 0x60000000UL, 0x3feee3f6UL, 0x5f6c682dUL,
+    0xbe54c619UL, 0x80000000UL, 0x3feed461UL, 0x5141e368UL, 0xbe4b6d86UL,
+    0xe0000000UL, 0x3feec4d1UL, 0xec678f76UL, 0xbe369af6UL, 0x80000000UL,
+    0x3feeb547UL, 0x41301f55UL, 0xbe2d4312UL, 0x60000000UL, 0x3feea5c2UL,
+    0x676da6bdUL, 0xbe4d8dd0UL, 0x60000000UL, 0x3fee9642UL, 0x57a891c4UL,
+    0x3e51f991UL, 0xa0000000UL, 0x3fee86c7UL, 0xe4eb491eUL, 0x3e579bf9UL,
+    0x20000000UL, 0x3fee7752UL, 0xfddc4a2cUL, 0xbe3356e6UL, 0xc0000000UL,
+    0x3fee67e1UL, 0xd75b5bf1UL, 0xbe449531UL, 0x80000000UL, 0x3fee5876UL,
+    0xbd423b8eUL, 0x3df54fe4UL, 0x60000000UL, 0x3fee4910UL, 0x330e51b9UL,
+    0x3e54289cUL, 0x80000000UL, 0x3fee39afUL, 0x8651a95fUL, 0xbe55aad6UL,
+    0xa0000000UL, 0x3fee2a53UL, 0x5e98c708UL, 0xbe2fc4a9UL, 0xe0000000UL,
+    0x3fee1afcUL, 0x0989328dUL, 0x3e23958cUL, 0x40000000UL, 0x3fee0babUL,
+    0xee642abdUL, 0xbe425dd8UL, 0xa0000000UL, 0x3fedfc5eUL, 0xc394d236UL,
+    0x3e526362UL, 0x20000000UL, 0x3feded17UL, 0xe104aa8eUL, 0x3e4ce247UL,
+    0xc0000000UL, 0x3fedddd4UL, 0x265a9be4UL, 0xbe5bb77aUL, 0x40000000UL,
+    0x3fedce97UL, 0x0ecac52fUL, 0x3e4a7cb1UL, 0xe0000000UL, 0x3fedbf5eUL,
+    0x124cb3b8UL, 0x3e257024UL, 0x80000000UL, 0x3fedb02bUL, 0xe6d4febeUL,
+    0xbe2033eeUL, 0x20000000UL, 0x3feda0fdUL, 0x39cca00eUL, 0xbe3ddabcUL,
+    0xc0000000UL, 0x3fed91d3UL, 0xef8a552aUL, 0xbe543390UL, 0x40000000UL,
+    0x3fed82afUL, 0xb8e85204UL, 0x3e513850UL, 0xe0000000UL, 0x3fed738fUL,
+    0x3d59fe08UL, 0xbe5db728UL, 0x40000000UL, 0x3fed6475UL, 0x3aa7ead1UL,
+    0x3e58804bUL, 0xc0000000UL, 0x3fed555fUL, 0xf8a35ba9UL, 0xbe5298b0UL,
+    0x00000000UL, 0x3fed464fUL, 0x9a88dd15UL, 0x3e5a8cdbUL, 0x40000000UL,
+    0x3fed3743UL, 0xb0b0a190UL, 0x3e598635UL, 0x80000000UL, 0x3fed283cUL,
+    0xe2113295UL, 0xbe5c1119UL, 0x80000000UL, 0x3fed193aUL, 0xafbf1728UL,
+    0xbe492e9cUL, 0x60000000UL, 0x3fed0a3dUL, 0xe4a4ccf3UL, 0x3e19b90eUL,
+    0x20000000UL, 0x3fecfb45UL, 0xba3cbeb8UL, 0x3e406b50UL, 0xc0000000UL,
+    0x3fecec51UL, 0x110f7dddUL, 0x3e0d6806UL, 0x40000000UL, 0x3fecdd63UL,
+    0x7dd7d508UL, 0xbe5a8943UL, 0x80000000UL, 0x3fecce79UL, 0x9b60f271UL,
+    0xbe50676aUL, 0x80000000UL, 0x3fecbf94UL, 0x0b9ad660UL, 0x3e59174fUL,
+    0x60000000UL, 0x3fecb0b4UL, 0x00823d9cUL, 0x3e5bbf72UL, 0x20000000UL,
+    0x3feca1d9UL, 0x38a6ec89UL, 0xbe4d38f9UL, 0x80000000UL, 0x3fec9302UL,
+    0x3a0b7d8eUL, 0x3e53dbfdUL, 0xc0000000UL, 0x3fec8430UL, 0xc6826b34UL,
+    0xbe27c5c9UL, 0xc0000000UL, 0x3fec7563UL, 0x0c706381UL, 0xbe593653UL,
+    0x60000000UL, 0x3fec669bUL, 0x7df34ec7UL, 0x3e461ab5UL, 0xe0000000UL,
+    0x3fec57d7UL, 0x40e5e7e8UL, 0xbe5c3daeUL, 0x00000000UL, 0x3fec4919UL,
+    0x5602770fUL, 0xbe55219dUL, 0xc0000000UL, 0x3fec3a5eUL, 0xec7911ebUL,
+    0x3e5a5d25UL, 0x60000000UL, 0x3fec2ba9UL, 0xb39ea225UL, 0xbe53c00bUL,
+    0x80000000UL, 0x3fec1cf8UL, 0x967a212eUL, 0x3e5a8ddfUL, 0x60000000UL,
+    0x3fec0e4cUL, 0x580798bdUL, 0x3e5f53abUL, 0x00000000UL, 0x3febffa5UL,
+    0xb8282df6UL, 0xbe46b874UL, 0x20000000UL, 0x3febf102UL, 0xe33a6729UL,
+    0x3e54963fUL, 0x00000000UL, 0x3febe264UL, 0x3b53e88aUL, 0xbe3adce1UL,
+    0x60000000UL, 0x3febd3caUL, 0xc2585084UL, 0x3e5cde9fUL, 0x80000000UL,
+    0x3febc535UL, 0xa335c5eeUL, 0xbe39fd9cUL, 0x20000000UL, 0x3febb6a5UL,
+    0x7325b04dUL, 0x3e42ba15UL, 0x60000000UL, 0x3feba819UL, 0x1564540fUL,
+    0x3e3a9f35UL, 0x40000000UL, 0x3feb9992UL, 0x83fff592UL, 0xbe5465ceUL,
+    0xa0000000UL, 0x3feb8b0fUL, 0xb9da63d3UL, 0xbe4b1a0aUL, 0x80000000UL,
+    0x3feb7c91UL, 0x6d6f1ea4UL, 0x3e557657UL, 0x00000000UL, 0x3feb6e18UL,
+    0x5e80a1bfUL, 0x3e4ddbb6UL, 0x00000000UL, 0x3feb5fa3UL, 0x1c9eacb5UL,
+    0x3e592877UL, 0xa0000000UL, 0x3feb5132UL, 0x6d40beb3UL, 0xbe51858cUL,
+    0xa0000000UL, 0x3feb42c6UL, 0xd740c67bUL, 0x3e427ad2UL, 0x40000000UL,
+    0x3feb345fUL, 0xa3e0cceeUL, 0xbe5c2fc4UL, 0x40000000UL, 0x3feb25fcUL,
+    0x8e752b50UL, 0xbe3da3c2UL, 0xc0000000UL, 0x3feb179dUL, 0xa892e7deUL,
+    0x3e1fb481UL, 0xc0000000UL, 0x3feb0943UL, 0x21ed71e9UL, 0xbe365206UL,
+    0x20000000UL, 0x3feafaeeUL, 0x0e1380a3UL, 0x3e5c5b7bUL, 0x20000000UL,
+    0x3feaec9dUL, 0x3c3d640eUL, 0xbe5dbbd0UL, 0x60000000UL, 0x3feade50UL,
+    0x8f97a715UL, 0x3e3a8ec5UL, 0x20000000UL, 0x3fead008UL, 0x23ab2839UL,
+    0x3e2fe98aUL, 0x40000000UL, 0x3feac1c4UL, 0xf4bbd50fUL, 0x3e54d8f6UL,
+    0xe0000000UL, 0x3feab384UL, 0x14757c4dUL, 0xbe48774cUL, 0xc0000000UL,
+    0x3feaa549UL, 0x7c7b0eeaUL, 0x3e5b51bbUL, 0x20000000UL, 0x3fea9713UL,
+    0xf56f7013UL, 0x3e386200UL, 0xe0000000UL, 0x3fea88e0UL, 0xbe428ebeUL,
+    0xbe514af5UL, 0xe0000000UL, 0x3fea7ab2UL, 0x8d0e4496UL, 0x3e4f9165UL,
+    0x60000000UL, 0x3fea6c89UL, 0xdbacc5d5UL, 0xbe5c063bUL, 0x20000000UL,
+    0x3fea5e64UL, 0x3f19d970UL, 0xbe5a0c8cUL, 0x20000000UL, 0x3fea5043UL,
+    0x09ea3e6bUL, 0x3e5065dcUL, 0x80000000UL, 0x3fea4226UL, 0x78df246cUL,
+    0x3e5e05f6UL, 0x40000000UL, 0x3fea340eUL, 0x4057d4a0UL, 0x3e431b2bUL,
+    0x40000000UL, 0x3fea25faUL, 0x82867bb5UL, 0x3e4b76beUL, 0xa0000000UL,
+    0x3fea17eaUL, 0x9436f40aUL, 0xbe5aad39UL, 0x20000000UL, 0x3fea09dfUL,
+    0x4b5253b3UL, 0x3e46380bUL, 0x00000000UL, 0x3fe9fbd8UL, 0x8fc52466UL,
+    0xbe386f9bUL, 0x20000000UL, 0x3fe9edd5UL, 0x22d3f344UL, 0xbe538347UL,
+    0x60000000UL, 0x3fe9dfd6UL, 0x1ac33522UL, 0x3e5dbc53UL, 0x00000000UL,
+    0x3fe9d1dcUL, 0xeabdff1dUL, 0x3e40fc0cUL, 0xe0000000UL, 0x3fe9c3e5UL,
+    0xafd30e73UL, 0xbe585e63UL, 0xe0000000UL, 0x3fe9b5f3UL, 0xa52f226aUL,
+    0xbe43e8f9UL, 0x20000000UL, 0x3fe9a806UL, 0xecb8698dUL, 0xbe515b36UL,
+    0x80000000UL, 0x3fe99a1cUL, 0xf2b4e89dUL, 0x3e48b62bUL, 0x20000000UL,
+    0x3fe98c37UL, 0x7c9a88fbUL, 0x3e44414cUL, 0x00000000UL, 0x3fe97e56UL,
+    0xda015741UL, 0xbe5d13baUL, 0xe0000000UL, 0x3fe97078UL, 0x5fdace06UL,
+    0x3e51b947UL, 0x00000000UL, 0x3fe962a0UL, 0x956ca094UL, 0x3e518785UL,
+    0x40000000UL, 0x3fe954cbUL, 0x01164c1dUL, 0x3e5d5b57UL, 0xc0000000UL,
+    0x3fe946faUL, 0xe63b3767UL, 0xbe4f84e7UL, 0x40000000UL, 0x3fe9392eUL,
+    0xe57cc2a9UL, 0x3e34eda3UL, 0xe0000000UL, 0x3fe92b65UL, 0x8c75b544UL,
+    0x3e5766a0UL, 0xc0000000UL, 0x3fe91da1UL, 0x37d1d087UL, 0xbe5e2ab1UL,
+    0x80000000UL, 0x3fe90fe1UL, 0xa953dc20UL, 0x3e5fa1f3UL, 0x80000000UL,
+    0x3fe90225UL, 0xdbd3f369UL, 0x3e47d6dbUL, 0xa0000000UL, 0x3fe8f46dUL,
+    0x1c9be989UL, 0xbe5e2b0aUL, 0xa0000000UL, 0x3fe8e6b9UL, 0x3c93d76aUL,
+    0x3e5c8618UL, 0xe0000000UL, 0x3fe8d909UL, 0x2182fc9aUL, 0xbe41aa9eUL,
+    0x20000000UL, 0x3fe8cb5eUL, 0xe6b3539dUL, 0xbe530d19UL, 0x60000000UL,
+    0x3fe8bdb6UL, 0x49e58cc3UL, 0xbe3bb374UL, 0xa0000000UL, 0x3fe8b012UL,
+    0xa7cfeb8fUL, 0x3e56c412UL, 0x00000000UL, 0x3fe8a273UL, 0x8d52bc19UL,
+    0x3e1429b8UL, 0x60000000UL, 0x3fe894d7UL, 0x4dc32c6cUL, 0xbe48604cUL,
+    0xc0000000UL, 0x3fe8873fUL, 0x0c868e56UL, 0xbe564ee5UL, 0x00000000UL,
+    0x3fe879acUL, 0x56aee828UL, 0x3e5e2fd8UL, 0x60000000UL, 0x3fe86c1cUL,
+    0x7ceab8ecUL, 0x3e493365UL, 0xc0000000UL, 0x3fe85e90UL, 0x78d4dadcUL,
+    0xbe4f7f25UL, 0x00000000UL, 0x3fe85109UL, 0x0ccd8280UL, 0x3e31e7a2UL,
+    0x40000000UL, 0x3fe84385UL, 0x34ba4e15UL, 0x3e328077UL, 0x80000000UL,
+    0x3fe83605UL, 0xa670975aUL, 0xbe53eee5UL, 0xa0000000UL, 0x3fe82889UL,
+    0xf61b77b2UL, 0xbe43a20aUL, 0xa0000000UL, 0x3fe81b11UL, 0x13e6643bUL,
+    0x3e5e5fe5UL, 0xc0000000UL, 0x3fe80d9dUL, 0x82cc94e8UL, 0xbe5ff1f9UL,
+    0xa0000000UL, 0x3fe8002dUL, 0x8a0c9c5dUL, 0xbe42b0e7UL, 0x60000000UL,
+    0x3fe7f2c1UL, 0x22a16f01UL, 0x3e5d9ea0UL, 0x20000000UL, 0x3fe7e559UL,
+    0xc38cd451UL, 0x3e506963UL, 0xc0000000UL, 0x3fe7d7f4UL, 0x9902bc71UL,
+    0x3e4503d7UL, 0x40000000UL, 0x3fe7ca94UL, 0xdef2a3c0UL, 0x3e3d98edUL,
+    0xa0000000UL, 0x3fe7bd37UL, 0xed49abb0UL, 0x3e24c1ffUL, 0xe0000000UL,
+    0x3fe7afdeUL, 0xe3b0be70UL, 0xbe40c467UL, 0x00000000UL, 0x3fe7a28aUL,
+    0xaf9f193cUL, 0xbe5dff6cUL, 0xe0000000UL, 0x3fe79538UL, 0xb74cf6b6UL,
+    0xbe258ed0UL, 0xa0000000UL, 0x3fe787ebUL, 0x1d9127c7UL, 0x3e345fb0UL,
+    0x40000000UL, 0x3fe77aa2UL, 0x1028c21dUL, 0xbe4619bdUL, 0xa0000000UL,
+    0x3fe76d5cUL, 0x7cb0b5e4UL, 0x3e40f1a2UL, 0xe0000000UL, 0x3fe7601aUL,
+    0x2b1bc4adUL, 0xbe32e8bbUL, 0xe0000000UL, 0x3fe752dcUL, 0x6839f64eUL,
+    0x3e41f57bUL, 0xc0000000UL, 0x3fe745a2UL, 0xc4121f7eUL, 0xbe52c40aUL,
+    0x60000000UL, 0x3fe7386cUL, 0xd6852d72UL, 0xbe5c4e6bUL, 0xc0000000UL,
+    0x3fe72b39UL, 0x91d690f7UL, 0xbe57f88fUL, 0xe0000000UL, 0x3fe71e0aUL,
+    0x627a2159UL, 0xbe4425d5UL, 0xc0000000UL, 0x3fe710dfUL, 0x50a54033UL,
+    0x3e422b7eUL, 0x60000000UL, 0x3fe703b8UL, 0x3b0b5f91UL, 0x3e5d3857UL,
+    0xe0000000UL, 0x3fe6f694UL, 0x84d628a2UL, 0xbe51f090UL, 0x00000000UL,
+    0x3fe6e975UL, 0x306d8894UL, 0xbe414d83UL, 0xe0000000UL, 0x3fe6dc58UL,
+    0x30bf24aaUL, 0xbe4650caUL, 0x80000000UL, 0x3fe6cf40UL, 0xd4628d69UL,
+    0xbe5db007UL, 0xc0000000UL, 0x3fe6c22bUL, 0xa2aae57bUL, 0xbe31d279UL,
+    0xc0000000UL, 0x3fe6b51aUL, 0x860edf7eUL, 0xbe2d4c4aUL, 0x80000000UL,
+    0x3fe6a80dUL, 0xf3559341UL, 0xbe5f7e98UL, 0xe0000000UL, 0x3fe69b03UL,
+    0xa885899eUL, 0xbe5c2011UL, 0xe0000000UL, 0x3fe68dfdUL, 0x2bdc6d37UL,
+    0x3e224a82UL, 0xa0000000UL, 0x3fe680fbUL, 0xc12ad1b9UL, 0xbe40cf56UL,
+    0x00000000UL, 0x3fe673fdUL, 0x1bcdf659UL, 0xbdf52f2dUL, 0x00000000UL,
+    0x3fe66702UL, 0x5df10408UL, 0x3e5663e0UL, 0xc0000000UL, 0x3fe65a0aUL,
+    0xa4070568UL, 0xbe40b12fUL, 0x00000000UL, 0x3fe64d17UL, 0x71c54c47UL,
+    0x3e5f5e8bUL, 0x00000000UL, 0x3fe64027UL, 0xbd4b7e83UL, 0x3e42ead6UL,
+    0xa0000000UL, 0x3fe6333aUL, 0x61598bd2UL, 0xbe4c48d4UL, 0xc0000000UL,
+    0x3fe62651UL, 0x6f538d61UL, 0x3e548401UL, 0xa0000000UL, 0x3fe6196cUL,
+    0x14344120UL, 0xbe529af6UL, 0x00000000UL, 0x3fe60c8bUL, 0x5982c587UL,
+    0xbe3e1e4fUL, 0x00000000UL, 0x3fe5ffadUL, 0xfe51d4eaUL, 0xbe4c897aUL,
+    0x80000000UL, 0x3fe5f2d2UL, 0xfd46ebe1UL, 0x3e552e00UL, 0xa0000000UL,
+    0x3fe5e5fbUL, 0xa4695699UL, 0x3e5ed471UL, 0x60000000UL, 0x3fe5d928UL,
+    0x80d118aeUL, 0x3e456b61UL, 0xa0000000UL, 0x3fe5cc58UL, 0x304c330bUL,
+    0x3e54dc29UL, 0x80000000UL, 0x3fe5bf8cUL, 0x0af2dedfUL, 0xbe3aa9bdUL,
+    0xe0000000UL, 0x3fe5b2c3UL, 0x15fc9258UL, 0xbe479a37UL, 0xc0000000UL,
+    0x3fe5a5feUL, 0x9292c7eaUL, 0x3e188650UL, 0x20000000UL, 0x3fe5993dUL,
+    0x33b4d380UL, 0x3e5d6d93UL, 0x20000000UL, 0x3fe58c7fUL, 0x02fd16c7UL,
+    0x3e2fe961UL, 0xa0000000UL, 0x3fe57fc4UL, 0x4a05edb6UL, 0xbe4d55b4UL,
+    0xa0000000UL, 0x3fe5730dUL, 0x3d443abbUL, 0xbe5e6954UL, 0x00000000UL,
+    0x3fe5665aUL, 0x024acfeaUL, 0x3e50e61bUL, 0x00000000UL, 0x3fe559aaUL,
+    0xcc9edd09UL, 0xbe325403UL, 0x60000000UL, 0x3fe54cfdUL, 0x1fe26950UL,
+    0x3e5d500eUL, 0x60000000UL, 0x3fe54054UL, 0x6c5ae164UL, 0xbe4a79b4UL,
+    0xc0000000UL, 0x3fe533aeUL, 0x154b0287UL, 0xbe401571UL, 0xa0000000UL,
+    0x3fe5270cUL, 0x0673f401UL, 0xbe56e56bUL, 0xe0000000UL, 0x3fe51a6dUL,
+    0x751b639cUL, 0x3e235269UL, 0xa0000000UL, 0x3fe50dd2UL, 0x7c7b2bedUL,
+    0x3ddec887UL, 0xc0000000UL, 0x3fe5013aUL, 0xafab4e17UL, 0x3e5e7575UL,
+    0x60000000UL, 0x3fe4f4a6UL, 0x2e308668UL, 0x3e59aed6UL, 0x80000000UL,
+    0x3fe4e815UL, 0xf33e2a76UL, 0xbe51f184UL, 0xe0000000UL, 0x3fe4db87UL,
+    0x839f3e3eUL, 0x3e57db01UL, 0xc0000000UL, 0x3fe4cefdUL, 0xa9eda7bbUL,
+    0x3e535e0fUL, 0x00000000UL, 0x3fe4c277UL, 0x2a8f66a5UL, 0x3e5ce451UL,
+    0xc0000000UL, 0x3fe4b5f3UL, 0x05192456UL, 0xbe4e8518UL, 0xc0000000UL,
+    0x3fe4a973UL, 0x4aa7cd1dUL, 0x3e46784aUL, 0x40000000UL, 0x3fe49cf7UL,
+    0x8e23025eUL, 0xbe5749f2UL, 0x00000000UL, 0x3fe4907eUL, 0x18d30215UL,
+    0x3e360f39UL, 0x20000000UL, 0x3fe48408UL, 0x63dcf2f3UL, 0x3e5e00feUL,
+    0xc0000000UL, 0x3fe47795UL, 0x46182d09UL, 0xbe5173d9UL, 0xa0000000UL,
+    0x3fe46b26UL, 0x8f0e62aaUL, 0xbe48f281UL, 0xe0000000UL, 0x3fe45ebaUL,
+    0x5775c40cUL, 0xbe56aad4UL, 0x60000000UL, 0x3fe45252UL, 0x0fe25f69UL,
+    0x3e48bd71UL, 0x40000000UL, 0x3fe445edUL, 0xe9989ec5UL, 0x3e590d97UL,
+    0x80000000UL, 0x3fe4398bUL, 0xb3d9ffe3UL, 0x3e479dbcUL, 0x20000000UL,
+    0x3fe42d2dUL, 0x388e4d2eUL, 0xbe5eed80UL, 0xe0000000UL, 0x3fe420d1UL,
+    0x6f797c18UL, 0x3e554b4cUL, 0x20000000UL, 0x3fe4147aUL, 0x31048bb4UL,
+    0xbe5b1112UL, 0x80000000UL, 0x3fe40825UL, 0x2efba4f9UL, 0x3e48ebc7UL,
+    0x40000000UL, 0x3fe3fbd4UL, 0x50201119UL, 0x3e40b701UL, 0x40000000UL,
+    0x3fe3ef86UL, 0x0a4db32cUL, 0x3e551de8UL, 0xa0000000UL, 0x3fe3e33bUL,
+    0x0c9c148bUL, 0xbe50c1f6UL, 0x20000000UL, 0x3fe3d6f4UL, 0xc9129447UL,
+    0x3e533fa0UL, 0x00000000UL, 0x3fe3cab0UL, 0xaae5b5a0UL, 0xbe22b68eUL,
+    0x20000000UL, 0x3fe3be6fUL, 0x02305e8aUL, 0xbe54fc08UL, 0x60000000UL,
+    0x3fe3b231UL, 0x7f908258UL, 0x3e57dc05UL, 0x00000000UL, 0x3fe3a5f7UL,
+    0x1a09af78UL, 0x3e08038bUL, 0xe0000000UL, 0x3fe399bfUL, 0x490643c1UL,
+    0xbe5dbe42UL, 0xe0000000UL, 0x3fe38d8bUL, 0x5e8ad724UL, 0xbe3c2b72UL,
+    0x20000000UL, 0x3fe3815bUL, 0xc67196b6UL, 0x3e1713cfUL, 0xa0000000UL,
+    0x3fe3752dUL, 0x6182e429UL, 0xbe3ec14cUL, 0x40000000UL, 0x3fe36903UL,
+    0xab6eb1aeUL, 0x3e5a2cc5UL, 0x40000000UL, 0x3fe35cdcUL, 0xfe5dc064UL,
+    0xbe5c5878UL, 0x40000000UL, 0x3fe350b8UL, 0x0ba6b9e4UL, 0x3e51619bUL,
+    0x80000000UL, 0x3fe34497UL, 0x857761aaUL, 0x3e5fff53UL, 0x00000000UL,
+    0x3fe3387aUL, 0xf872d68cUL, 0x3e484f4dUL, 0xa0000000UL, 0x3fe32c5fUL,
+    0x087e97c2UL, 0x3e52842eUL, 0x80000000UL, 0x3fe32048UL, 0x73d6d0c0UL,
+    0xbe503edfUL, 0x80000000UL, 0x3fe31434UL, 0x0c1456a1UL, 0xbe5f72adUL,
+    0xa0000000UL, 0x3fe30823UL, 0x83a1a4d5UL, 0xbe5e65ccUL, 0xe0000000UL,
+    0x3fe2fc15UL, 0x855a7390UL, 0xbe506438UL, 0x40000000UL, 0x3fe2f00bUL,
+    0xa2898287UL, 0x3e3d22a2UL, 0xe0000000UL, 0x3fe2e403UL, 0x8b56f66fUL,
+    0xbe5aa5fdUL, 0x80000000UL, 0x3fe2d7ffUL, 0x52db119aUL, 0x3e3a2e3dUL,
+    0x60000000UL, 0x3fe2cbfeUL, 0xe2ddd4c0UL, 0xbe586469UL, 0x40000000UL,
+    0x3fe2c000UL, 0x6b01bf10UL, 0x3e352b9dUL, 0x40000000UL, 0x3fe2b405UL,
+    0xb07a1cdfUL, 0x3e5c5cdaUL, 0x80000000UL, 0x3fe2a80dUL, 0xc7b5f868UL,
+    0xbe5668b3UL, 0xc0000000UL, 0x3fe29c18UL, 0x185edf62UL, 0xbe563d66UL,
+    0x00000000UL, 0x3fe29027UL, 0xf729e1ccUL, 0x3e59a9a0UL, 0x80000000UL,
+    0x3fe28438UL, 0x6433c727UL, 0xbe43cc89UL, 0x00000000UL, 0x3fe2784dUL,
+    0x41782631UL, 0xbe30750cUL, 0xa0000000UL, 0x3fe26c64UL, 0x914911b7UL,
+    0xbe58290eUL, 0x40000000UL, 0x3fe2607fUL, 0x3dcc73e1UL, 0xbe4269cdUL,
+    0x00000000UL, 0x3fe2549dUL, 0x2751bf70UL, 0xbe5a6998UL, 0xc0000000UL,
+    0x3fe248bdUL, 0x4248b9fbUL, 0xbe4ddb00UL, 0x80000000UL, 0x3fe23ce1UL,
+    0xf35cf82fUL, 0x3e561b71UL, 0x60000000UL, 0x3fe23108UL, 0x8e481a2dUL,
+    0x3e518fb9UL, 0x60000000UL, 0x3fe22532UL, 0x5ab96edcUL, 0xbe5fafc5UL,
+    0x40000000UL, 0x3fe2195fUL, 0x80943911UL, 0xbe07f819UL, 0x40000000UL,
+    0x3fe20d8fUL, 0x386f2d6cUL, 0xbe54ba8bUL, 0x40000000UL, 0x3fe201c2UL,
+    0xf29664acUL, 0xbe5eb815UL, 0x20000000UL, 0x3fe1f5f8UL, 0x64f03390UL,
+    0x3e5e320cUL, 0x20000000UL, 0x3fe1ea31UL, 0x747ff696UL, 0x3e5ef0a5UL,
+    0x40000000UL, 0x3fe1de6dUL, 0x3e9ceb51UL, 0xbe5f8d27UL, 0x20000000UL,
+    0x3fe1d2acUL, 0x4ae0b55eUL, 0x3e5faa21UL, 0x20000000UL, 0x3fe1c6eeUL,
+    0x28569a5eUL, 0x3e598a4fUL, 0x20000000UL, 0x3fe1bb33UL, 0x54b33e07UL,
+    0x3e46130aUL, 0x20000000UL, 0x3fe1af7bUL, 0x024f1078UL, 0xbe4dbf93UL,
+    0x00000000UL, 0x3fe1a3c6UL, 0xb0783bfaUL, 0x3e419248UL, 0xe0000000UL,
+    0x3fe19813UL, 0x2f02b836UL, 0x3e4e02b7UL, 0xc0000000UL, 0x3fe18c64UL,
+    0x28dec9d4UL, 0x3e09064fUL, 0x80000000UL, 0x3fe180b8UL, 0x45cbf406UL,
+    0x3e5b1f46UL, 0x40000000UL, 0x3fe1750fUL, 0x03d9964cUL, 0x3e5b0a79UL,
+    0x00000000UL, 0x3fe16969UL, 0x8b5b882bUL, 0xbe238086UL, 0xa0000000UL,
+    0x3fe15dc5UL, 0x73bad6f8UL, 0xbdf1fca4UL, 0x20000000UL, 0x3fe15225UL,
+    0x5385769cUL, 0x3e5e8d76UL, 0xa0000000UL, 0x3fe14687UL, 0x1676dc6bUL,
+    0x3e571d08UL, 0x20000000UL, 0x3fe13aedUL, 0xa8c41c7fUL, 0xbe598a25UL,
+    0x60000000UL, 0x3fe12f55UL, 0xc4e1aaf0UL, 0x3e435277UL, 0xa0000000UL,
+    0x3fe123c0UL, 0x403638e1UL, 0xbe21aa7cUL, 0xc0000000UL, 0x3fe1182eUL,
+    0x557a092bUL, 0xbdd0116bUL, 0xc0000000UL, 0x3fe10c9fUL, 0x7d779f66UL,
+    0x3e4a61baUL, 0xc0000000UL, 0x3fe10113UL, 0x2b09c645UL, 0xbe5d586eUL,
+    0x20000000UL, 0x3fe0ea04UL, 0xea2cad46UL, 0x3e5aa97cUL, 0x20000000UL,
+    0x3fe0d300UL, 0x23190e54UL, 0x3e50f1a7UL, 0xa0000000UL, 0x3fe0bc07UL,
+    0x1379a5a6UL, 0xbe51619dUL, 0x60000000UL, 0x3fe0a51aUL, 0x926a3d4aUL,
+    0x3e5cf019UL, 0xa0000000UL, 0x3fe08e38UL, 0xa8c24358UL, 0x3e35241eUL,
+    0x20000000UL, 0x3fe07762UL, 0x24317e7aUL, 0x3e512cfaUL, 0x00000000UL,
+    0x3fe06097UL, 0xfd9cf274UL, 0xbe55bef3UL, 0x00000000UL, 0x3fe049d7UL,
+    0x3689b49dUL, 0xbe36d26dUL, 0x40000000UL, 0x3fe03322UL, 0xf72ef6c4UL,
+    0xbe54cd08UL, 0xa0000000UL, 0x3fe01c78UL, 0x23702d2dUL, 0xbe5900bfUL,
+    0x00000000UL, 0x3fe005daUL, 0x3f59c14cUL, 0x3e57d80bUL, 0x40000000UL,
+    0x3fdfde8dUL, 0xad67766dUL, 0xbe57fad4UL, 0x40000000UL, 0x3fdfb17cUL,
+    0x644f4ae7UL, 0x3e1ee43bUL, 0x40000000UL, 0x3fdf8481UL, 0x903234d2UL,
+    0x3e501a86UL, 0x40000000UL, 0x3fdf579cUL, 0xafe9e509UL, 0xbe267c3eUL,
+    0x00000000UL, 0x3fdf2acdUL, 0xb7dfda0bUL, 0xbe48149bUL, 0x40000000UL,
+    0x3fdefe13UL, 0x3b94305eUL, 0x3e5f4ea7UL, 0x80000000UL, 0x3fded16fUL,
+    0x5d95da61UL, 0xbe55c198UL, 0x00000000UL, 0x3fdea4e1UL, 0x406960c9UL,
+    0xbdd99a19UL, 0x00000000UL, 0x3fde7868UL, 0xd22f3539UL, 0x3e470c78UL,
+    0x80000000UL, 0x3fde4c04UL, 0x83eec535UL, 0xbe3e1232UL, 0x40000000UL,
+    0x3fde1fb6UL, 0x3dfbffcbUL, 0xbe4b7d71UL, 0x40000000UL, 0x3fddf37dUL,
+    0x7e1be4e0UL, 0xbe5b8f8fUL, 0x40000000UL, 0x3fddc759UL, 0x46dae887UL,
+    0xbe350458UL, 0x80000000UL, 0x3fdd9b4aUL, 0xed6ecc49UL, 0xbe5f0045UL,
+    0x80000000UL, 0x3fdd6f50UL, 0x2e9e883cUL, 0x3e2915daUL, 0x80000000UL,
+    0x3fdd436bUL, 0xf0bccb32UL, 0x3e4a68c9UL, 0x80000000UL, 0x3fdd179bUL,
+    0x9bbfc779UL, 0xbe54a26aUL, 0x00000000UL, 0x3fdcebe0UL, 0x7cea33abUL,
+    0x3e43c6b7UL, 0x40000000UL, 0x3fdcc039UL, 0xe740fd06UL, 0x3e5526c2UL,
+    0x40000000UL, 0x3fdc94a7UL, 0x9eadeb1aUL, 0xbe396d8dUL, 0xc0000000UL,
+    0x3fdc6929UL, 0xf0a8f95aUL, 0xbe5c0ab2UL, 0x80000000UL, 0x3fdc3dc0UL,
+    0x6ee2693bUL, 0x3e0992e6UL, 0xc0000000UL, 0x3fdc126bUL, 0x5ac6b581UL,
+    0xbe2834b6UL, 0x40000000UL, 0x3fdbe72bUL, 0x8cc226ffUL, 0x3e3596a6UL,
+    0x00000000UL, 0x3fdbbbffUL, 0xf92a74bbUL, 0x3e3c5813UL, 0x00000000UL,
+    0x3fdb90e7UL, 0x479664c0UL, 0xbe50d644UL, 0x00000000UL, 0x3fdb65e3UL,
+    0x5004975bUL, 0xbe55258fUL, 0x00000000UL, 0x3fdb3af3UL, 0xe4b23194UL,
+    0xbe588407UL, 0xc0000000UL, 0x3fdb1016UL, 0xe65d4d0aUL, 0x3e527c26UL,
+    0x80000000UL, 0x3fdae54eUL, 0x814fddd6UL, 0x3e5962a2UL, 0x40000000UL,
+    0x3fdaba9aUL, 0xe19d0913UL, 0xbe562f4eUL, 0x80000000UL, 0x3fda8ff9UL,
+    0x43cfd006UL, 0xbe4cfdebUL, 0x40000000UL, 0x3fda656cUL, 0x686f0a4eUL,
+    0x3e5e47a8UL, 0xc0000000UL, 0x3fda3af2UL, 0x7200d410UL, 0x3e5e1199UL,
+    0xc0000000UL, 0x3fda108cUL, 0xabd2266eUL, 0x3e5ee4d1UL, 0x40000000UL,
+    0x3fd9e63aUL, 0x396f8f2cUL, 0x3e4dbffbUL, 0x00000000UL, 0x3fd9bbfbUL,
+    0xe32b25ddUL, 0x3e5c3a54UL, 0x40000000UL, 0x3fd991cfUL, 0x431e4035UL,
+    0xbe457925UL, 0x80000000UL, 0x3fd967b6UL, 0x7bed3dd3UL, 0x3e40c61dUL,
+    0x00000000UL, 0x3fd93db1UL, 0xd7449365UL, 0x3e306419UL, 0x80000000UL,
+    0x3fd913beUL, 0x1746e791UL, 0x3e56fcfcUL, 0x40000000UL, 0x3fd8e9dfUL,
+    0xf3a9028bUL, 0xbe5041b9UL, 0xc0000000UL, 0x3fd8c012UL, 0x56840c50UL,
+    0xbe26e20aUL, 0x40000000UL, 0x3fd89659UL, 0x19763102UL, 0xbe51f466UL,
+    0x80000000UL, 0x3fd86cb2UL, 0x7032de7cUL, 0xbe4d298aUL, 0x80000000UL,
+    0x3fd8431eUL, 0xdeb39fabUL, 0xbe4361ebUL, 0x40000000UL, 0x3fd8199dUL,
+    0x5d01cbe0UL, 0xbe5425b3UL, 0x80000000UL, 0x3fd7f02eUL, 0x3ce99aa9UL,
+    0x3e146fa8UL, 0x80000000UL, 0x3fd7c6d2UL, 0xd1a262b9UL, 0xbe5a1a69UL,
+    0xc0000000UL, 0x3fd79d88UL, 0x8606c236UL, 0x3e423a08UL, 0x80000000UL,
+    0x3fd77451UL, 0x8fd1e1b7UL, 0x3e5a6a63UL, 0xc0000000UL, 0x3fd74b2cUL,
+    0xe491456aUL, 0x3e42c1caUL, 0x40000000UL, 0x3fd7221aUL, 0x4499a6d7UL,
+    0x3e36a69aUL, 0x00000000UL, 0x3fd6f91aUL, 0x5237df94UL, 0xbe0f8f02UL,
+    0x00000000UL, 0x3fd6d02cUL, 0xb6482c6eUL, 0xbe5abcf7UL, 0x00000000UL,
+    0x3fd6a750UL, 0x1919fd61UL, 0xbe57ade2UL, 0x00000000UL, 0x3fd67e86UL,
+    0xaa7a994dUL, 0xbe3f3fbdUL, 0x00000000UL, 0x3fd655ceUL, 0x67db014cUL,
+    0x3e33c550UL, 0x00000000UL, 0x3fd62d28UL, 0xa82856b7UL, 0xbe1409d1UL,
+    0xc0000000UL, 0x3fd60493UL, 0x1e6a300dUL, 0x3e55d899UL, 0x80000000UL,
+    0x3fd5dc11UL, 0x1222bd5cUL, 0xbe35bfc0UL, 0xc0000000UL, 0x3fd5b3a0UL,
+    0x6e8dc2d3UL, 0x3e5d4d79UL, 0x00000000UL, 0x3fd58b42UL, 0xe0e4ace6UL,
+    0xbe517303UL, 0x80000000UL, 0x3fd562f4UL, 0xb306e0a8UL, 0x3e5edf0fUL,
+    0xc0000000UL, 0x3fd53ab8UL, 0x6574bc54UL, 0x3e5ee859UL, 0x80000000UL,
+    0x3fd5128eUL, 0xea902207UL, 0x3e5f6188UL, 0xc0000000UL, 0x3fd4ea75UL,
+    0x9f911d79UL, 0x3e511735UL, 0x80000000UL, 0x3fd4c26eUL, 0xf9c77397UL,
+    0xbe5b1643UL, 0x40000000UL, 0x3fd49a78UL, 0x15fc9258UL, 0x3e479a37UL,
+    0x80000000UL, 0x3fd47293UL, 0xd5a04dd9UL, 0xbe426e56UL, 0xc0000000UL,
+    0x3fd44abfUL, 0xe04042f5UL, 0x3e56f7c6UL, 0x40000000UL, 0x3fd422fdUL,
+    0x1d8bf2c8UL, 0x3e5d8810UL, 0x00000000UL, 0x3fd3fb4cUL, 0x88a8ddeeUL,
+    0xbe311454UL, 0xc0000000UL, 0x3fd3d3abUL, 0x3e3b5e47UL, 0xbe5d1b72UL,
+    0x40000000UL, 0x3fd3ac1cUL, 0xc2ab5d59UL, 0x3e31b02bUL, 0xc0000000UL,
+    0x3fd3849dUL, 0xd4e34b9eUL, 0x3e51cb2fUL, 0x40000000UL, 0x3fd35d30UL,
+    0x177204fbUL, 0xbe2b8cd7UL, 0x80000000UL, 0x3fd335d3UL, 0xfcd38c82UL,
+    0xbe4356e1UL, 0x80000000UL, 0x3fd30e87UL, 0x64f54accUL, 0xbe4e6224UL,
+    0x00000000UL, 0x3fd2e74cUL, 0xaa7975d9UL, 0x3e5dc0feUL, 0x80000000UL,
+    0x3fd2c021UL, 0x516dab3fUL, 0xbe50ffa3UL, 0x40000000UL, 0x3fd29907UL,
+    0x2bfb7313UL, 0x3e5674a2UL, 0xc0000000UL, 0x3fd271fdUL, 0x0549fc99UL,
+    0x3e385d29UL, 0xc0000000UL, 0x3fd24b04UL, 0x55b63073UL, 0xbe500c6dUL,
+    0x00000000UL, 0x3fd2241cUL, 0x3f91953aUL, 0x3e389977UL, 0xc0000000UL,
+    0x3fd1fd43UL, 0xa1543f71UL, 0xbe3487abUL, 0xc0000000UL, 0x3fd1d67bUL,
+    0x4ec8867cUL, 0x3df6a2dcUL, 0x00000000UL, 0x3fd1afc4UL, 0x4328e3bbUL,
+    0x3e41d9c0UL, 0x80000000UL, 0x3fd1891cUL, 0x2e1cda84UL, 0x3e3bdd87UL,
+    0x40000000UL, 0x3fd16285UL, 0x4b5331aeUL, 0xbe53128eUL, 0x00000000UL,
+    0x3fd13bfeUL, 0xb9aec164UL, 0xbe52ac98UL, 0xc0000000UL, 0x3fd11586UL,
+    0xd91e1316UL, 0xbe350630UL, 0x80000000UL, 0x3fd0ef1fUL, 0x7cacc12cUL,
+    0x3e3f5219UL, 0x40000000UL, 0x3fd0c8c8UL, 0xbce277b7UL, 0x3e3d30c0UL,
+    0x00000000UL, 0x3fd0a281UL, 0x2a63447dUL, 0xbe541377UL, 0x80000000UL,
+    0x3fd07c49UL, 0xfac483b5UL, 0xbe5772ecUL, 0xc0000000UL, 0x3fd05621UL,
+    0x36b8a570UL, 0xbe4fd4bdUL, 0xc0000000UL, 0x3fd03009UL, 0xbae505f7UL,
+    0xbe450388UL, 0x80000000UL, 0x3fd00a01UL, 0x3e35aeadUL, 0xbe5430fcUL,
+    0x80000000UL, 0x3fcfc811UL, 0x707475acUL, 0x3e38806eUL, 0x80000000UL,
+    0x3fcf7c3fUL, 0xc91817fcUL, 0xbe40cceaUL, 0x80000000UL, 0x3fcf308cUL,
+    0xae05d5e9UL, 0xbe4919b8UL, 0x80000000UL, 0x3fcee4f8UL, 0xae6cc9e6UL,
+    0xbe530b94UL, 0x00000000UL, 0x3fce9983UL, 0x1efe3e8eUL, 0x3e57747eUL,
+    0x00000000UL, 0x3fce4e2dUL, 0xda78d9bfUL, 0xbe59a608UL, 0x00000000UL,
+    0x3fce02f5UL, 0x8abe2c2eUL, 0x3e4a35adUL, 0x00000000UL, 0x3fcdb7dcUL,
+    0x1495450dUL, 0xbe0872ccUL, 0x80000000UL, 0x3fcd6ce1UL, 0x86ee0ba0UL,
+    0xbe4f59a0UL, 0x00000000UL, 0x3fcd2205UL, 0xe81ca888UL, 0x3e5402c3UL,
+    0x00000000UL, 0x3fccd747UL, 0x3b4424b9UL, 0x3e5dfdc3UL, 0x80000000UL,
+    0x3fcc8ca7UL, 0xd305b56cUL, 0x3e202da6UL, 0x00000000UL, 0x3fcc4226UL,
+    0x399a6910UL, 0xbe482a1cUL, 0x80000000UL, 0x3fcbf7c2UL, 0x747f7938UL,
+    0xbe587372UL, 0x80000000UL, 0x3fcbad7cUL, 0x6fc246a0UL, 0x3e50d83dUL,
+    0x00000000UL, 0x3fcb6355UL, 0xee9e9be5UL, 0xbe5c35bdUL, 0x80000000UL,
+    0x3fcb194aUL, 0x8416c0bcUL, 0x3e546d4fUL, 0x00000000UL, 0x3fcacf5eUL,
+    0x49f7f08fUL, 0x3e56da76UL, 0x00000000UL, 0x3fca858fUL, 0x5dc30de2UL,
+    0x3e5f390cUL, 0x00000000UL, 0x3fca3bdeUL, 0x950583b6UL, 0xbe5e4169UL,
+    0x80000000UL, 0x3fc9f249UL, 0x33631553UL, 0x3e52aeb1UL, 0x00000000UL,
+    0x3fc9a8d3UL, 0xde8795a6UL, 0xbe59a504UL, 0x00000000UL, 0x3fc95f79UL,
+    0x076bf41eUL, 0x3e5122feUL, 0x80000000UL, 0x3fc9163cUL, 0x2914c8e7UL,
+    0x3e3dd064UL, 0x00000000UL, 0x3fc8cd1dUL, 0x3a30eca3UL, 0xbe21b4aaUL,
+    0x80000000UL, 0x3fc8841aUL, 0xb2a96650UL, 0xbe575444UL, 0x80000000UL,
+    0x3fc83b34UL, 0x2376c0cbUL, 0xbe2a74c7UL, 0x80000000UL, 0x3fc7f26bUL,
+    0xd8a0b653UL, 0xbe5181b6UL, 0x00000000UL, 0x3fc7a9bfUL, 0x32257882UL,
+    0xbe4a78b4UL, 0x00000000UL, 0x3fc7612fUL, 0x1eee8bd9UL, 0xbe1bfe9dUL,
+    0x80000000UL, 0x3fc718bbUL, 0x0c603cc4UL, 0x3e36fdc9UL, 0x80000000UL,
+    0x3fc6d064UL, 0x3728b8cfUL, 0xbe1e542eUL, 0x80000000UL, 0x3fc68829UL,
+    0xc79a4067UL, 0x3e5c380fUL, 0x00000000UL, 0x3fc6400bUL, 0xf69eac69UL,
+    0x3e550a84UL, 0x80000000UL, 0x3fc5f808UL, 0xb7a780a4UL, 0x3e5d9224UL,
+    0x80000000UL, 0x3fc5b022UL, 0xad9dfb1eUL, 0xbe55242fUL, 0x00000000UL,
+    0x3fc56858UL, 0x659b18beUL, 0xbe4bfda3UL, 0x80000000UL, 0x3fc520a9UL,
+    0x66ee3631UL, 0xbe57d769UL, 0x80000000UL, 0x3fc4d916UL, 0x1ec62819UL,
+    0x3e2427f7UL, 0x80000000UL, 0x3fc4919fUL, 0xdec25369UL, 0xbe435431UL,
+    0x00000000UL, 0x3fc44a44UL, 0xa8acfc4bUL, 0xbe3c62e8UL, 0x00000000UL,
+    0x3fc40304UL, 0xcf1d3eabUL, 0xbdfba29fUL, 0x80000000UL, 0x3fc3bbdfUL,
+    0x79aba3eaUL, 0xbdf1b7c8UL, 0x80000000UL, 0x3fc374d6UL, 0xb8d186daUL,
+    0xbe5130cfUL, 0x80000000UL, 0x3fc32de8UL, 0x9d74f152UL, 0x3e2285b6UL,
+    0x00000000UL, 0x3fc2e716UL, 0x50ae7ca9UL, 0xbe503920UL, 0x80000000UL,
+    0x3fc2a05eUL, 0x6caed92eUL, 0xbe533924UL, 0x00000000UL, 0x3fc259c2UL,
+    0x9cb5034eUL, 0xbe510e31UL, 0x80000000UL, 0x3fc21340UL, 0x12c4d378UL,
+    0xbe540b43UL, 0x80000000UL, 0x3fc1ccd9UL, 0xcc418706UL, 0x3e59887aUL,
+    0x00000000UL, 0x3fc1868eUL, 0x921f4106UL, 0xbe528e67UL, 0x80000000UL,
+    0x3fc1405cUL, 0x3969441eUL, 0x3e5d8051UL, 0x00000000UL, 0x3fc0fa46UL,
+    0xd941ef5bUL, 0x3e5f9079UL, 0x80000000UL, 0x3fc0b44aUL, 0x5a3e81b2UL,
+    0xbe567691UL, 0x00000000UL, 0x3fc06e69UL, 0x9d66afe7UL, 0xbe4d43fbUL,
+    0x00000000UL, 0x3fc028a2UL, 0x0a92a162UL, 0xbe52f394UL, 0x00000000UL,
+    0x3fbfc5eaUL, 0x209897e5UL, 0x3e529e37UL, 0x00000000UL, 0x3fbf3ac5UL,
+    0x8458bd7bUL, 0x3e582831UL, 0x00000000UL, 0x3fbeafd5UL, 0xb8d8b4b8UL,
+    0xbe486b4aUL, 0x00000000UL, 0x3fbe2518UL, 0xe0a3b7b6UL, 0x3e5bafd2UL,
+    0x00000000UL, 0x3fbd9a90UL, 0x2bf2710eUL, 0x3e383b2bUL, 0x00000000UL,
+    0x3fbd103cUL, 0x73eb6ab7UL, 0xbe56d78dUL, 0x00000000UL, 0x3fbc861bUL,
+    0x32ceaff5UL, 0xbe32dc5aUL, 0x00000000UL, 0x3fbbfc2eUL, 0xbee04cb7UL,
+    0xbe4a71a4UL, 0x00000000UL, 0x3fbb7274UL, 0x35ae9577UL, 0x3e38142fUL,
+    0x00000000UL, 0x3fbae8eeUL, 0xcbaddab4UL, 0xbe5490f0UL, 0x00000000UL,
+    0x3fba5f9aUL, 0x95ce1114UL, 0x3e597c71UL, 0x00000000UL, 0x3fb9d67aUL,
+    0x6d7c0f78UL, 0x3e3abc2dUL, 0x00000000UL, 0x3fb94d8dUL, 0x2841a782UL,
+    0xbe566cbcUL, 0x00000000UL, 0x3fb8c4d2UL, 0x6ed429c6UL, 0xbe3cfff9UL,
+    0x00000000UL, 0x3fb83c4aUL, 0xe4a49fbbUL, 0xbe552964UL, 0x00000000UL,
+    0x3fb7b3f4UL, 0x2193d81eUL, 0xbe42fa72UL, 0x00000000UL, 0x3fb72bd0UL,
+    0xdd70c122UL, 0x3e527a8cUL, 0x00000000UL, 0x3fb6a3dfUL, 0x03108a54UL,
+    0xbe450393UL, 0x00000000UL, 0x3fb61c1fUL, 0x30ff7954UL, 0x3e565840UL,
+    0x00000000UL, 0x3fb59492UL, 0xdedd460cUL, 0xbe5422b5UL, 0x00000000UL,
+    0x3fb50d36UL, 0x950f9f45UL, 0xbe5313f6UL, 0x00000000UL, 0x3fb4860bUL,
+    0x582cdcb1UL, 0x3e506d39UL, 0x00000000UL, 0x3fb3ff12UL, 0x7216d3a6UL,
+    0x3e4aa719UL, 0x00000000UL, 0x3fb3784aUL, 0x57a423fdUL, 0x3e5a9b9fUL,
+    0x00000000UL, 0x3fb2f1b4UL, 0x7a138b41UL, 0xbe50b418UL, 0x00000000UL,
+    0x3fb26b4eUL, 0x2fbfd7eaUL, 0x3e23a53eUL, 0x00000000UL, 0x3fb1e519UL,
+    0x18913ccbUL, 0x3e465fc1UL, 0x00000000UL, 0x3fb15f15UL, 0x7ea24e21UL,
+    0x3e042843UL, 0x00000000UL, 0x3fb0d941UL, 0x7c6d9c77UL, 0x3e59f61eUL,
+    0x00000000UL, 0x3fb0539eUL, 0x114efd44UL, 0x3e4ccab7UL, 0x00000000UL,
+    0x3faf9c56UL, 0x1777f657UL, 0x3e552f65UL, 0x00000000UL, 0x3fae91d2UL,
+    0xc317b86aUL, 0xbe5a61e0UL, 0x00000000UL, 0x3fad87acUL, 0xb7664efbUL,
+    0xbe41f64eUL, 0x00000000UL, 0x3fac7de6UL, 0x5d3d03a9UL, 0x3e0807a0UL,
+    0x00000000UL, 0x3fab7480UL, 0x743c38ebUL, 0xbe3726e1UL, 0x00000000UL,
+    0x3faa6b78UL, 0x06a253f1UL, 0x3e5ad636UL, 0x00000000UL, 0x3fa962d0UL,
+    0xa35f541bUL, 0x3e5a187aUL, 0x00000000UL, 0x3fa85a88UL, 0x4b86e446UL,
+    0xbe508150UL, 0x00000000UL, 0x3fa7529cUL, 0x2589cacfUL, 0x3e52938aUL,
+    0x00000000UL, 0x3fa64b10UL, 0xaf6b11f2UL, 0xbe3454cdUL, 0x00000000UL,
+    0x3fa543e2UL, 0x97506fefUL, 0xbe5fdec5UL, 0x00000000UL, 0x3fa43d10UL,
+    0xe75f7dd9UL, 0xbe388dd3UL, 0x00000000UL, 0x3fa3369cUL, 0xa4139632UL,
+    0xbdea5177UL, 0x00000000UL, 0x3fa23086UL, 0x352d6f1eUL, 0xbe565ad6UL,
+    0x00000000UL, 0x3fa12accUL, 0x77449eb7UL, 0xbe50d5c7UL, 0x00000000UL,
+    0x3fa0256eUL, 0x7478da78UL, 0x3e404724UL, 0x00000000UL, 0x3f9e40dcUL,
+    0xf59cef7fUL, 0xbe539d0aUL, 0x00000000UL, 0x3f9c3790UL, 0x1511d43cUL,
+    0x3e53c2c8UL, 0x00000000UL, 0x3f9a2f00UL, 0x9b8bff3cUL, 0xbe43b3e1UL,
+    0x00000000UL, 0x3f982724UL, 0xad1e22a5UL, 0x3e46f0bdUL, 0x00000000UL,
+    0x3f962000UL, 0x130d9356UL, 0x3e475ba0UL, 0x00000000UL, 0x3f941994UL,
+    0x8f86f883UL, 0xbe513d0bUL, 0x00000000UL, 0x3f9213dcUL, 0x914d0dc8UL,
+    0xbe534335UL, 0x00000000UL, 0x3f900ed8UL, 0x2d73e5e7UL, 0xbe22ba75UL,
+    0x00000000UL, 0x3f8c1510UL, 0xc5b7d70eUL, 0x3e599c5dUL, 0x00000000UL,
+    0x3f880de0UL, 0x8a27857eUL, 0xbe3d28c8UL, 0x00000000UL, 0x3f840810UL,
+    0xda767328UL, 0x3e531b3dUL, 0x00000000UL, 0x3f8003b0UL, 0x77bacaf3UL,
+    0xbe5f04e3UL, 0x00000000UL, 0x3f780150UL, 0xdf4b0720UL, 0x3e5a8bffUL,
+    0x00000000UL, 0x3f6ffc40UL, 0x34c48e71UL, 0xbe3fcd99UL, 0x00000000UL,
+    0x3f5ff6c0UL, 0x1ad218afUL, 0xbe4c78a7UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x80000000UL
+};
+
+ALIGNED_(8) juint _log2_pow[] =
+{
+    0xfefa39efUL, 0x3fe62e42UL, 0xfefa39efUL, 0xbfe62e42UL
+};
+
+//registers,
+// input: xmm0, xmm1
+// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
+//          rax, rdx, rcx, r8, r11
+
+// Code generated by Intel C compiler for LIBM library
+
+void MacroAssembler::fast_pow(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp1, Register tmp2, Register tmp3, Register tmp4) {
+  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
+  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
+  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
+  Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, L_2TAG_PACKET_14_0_2, L_2TAG_PACKET_15_0_2;
+  Label L_2TAG_PACKET_16_0_2, L_2TAG_PACKET_17_0_2, L_2TAG_PACKET_18_0_2, L_2TAG_PACKET_19_0_2;
+  Label L_2TAG_PACKET_20_0_2, L_2TAG_PACKET_21_0_2, L_2TAG_PACKET_22_0_2, L_2TAG_PACKET_23_0_2;
+  Label L_2TAG_PACKET_24_0_2, L_2TAG_PACKET_25_0_2, L_2TAG_PACKET_26_0_2, L_2TAG_PACKET_27_0_2;
+  Label L_2TAG_PACKET_28_0_2, L_2TAG_PACKET_29_0_2, L_2TAG_PACKET_30_0_2, L_2TAG_PACKET_31_0_2;
+  Label L_2TAG_PACKET_32_0_2, L_2TAG_PACKET_33_0_2, L_2TAG_PACKET_34_0_2, L_2TAG_PACKET_35_0_2;
+  Label L_2TAG_PACKET_36_0_2, L_2TAG_PACKET_37_0_2, L_2TAG_PACKET_38_0_2, L_2TAG_PACKET_39_0_2;
+  Label L_2TAG_PACKET_40_0_2, L_2TAG_PACKET_41_0_2, L_2TAG_PACKET_42_0_2, L_2TAG_PACKET_43_0_2;
+  Label L_2TAG_PACKET_44_0_2, L_2TAG_PACKET_45_0_2, L_2TAG_PACKET_46_0_2, L_2TAG_PACKET_47_0_2;
+  Label L_2TAG_PACKET_48_0_2, L_2TAG_PACKET_49_0_2, L_2TAG_PACKET_50_0_2, L_2TAG_PACKET_51_0_2;
+  Label L_2TAG_PACKET_52_0_2, L_2TAG_PACKET_53_0_2, L_2TAG_PACKET_54_0_2, L_2TAG_PACKET_55_0_2;
+  Label L_2TAG_PACKET_56_0_2;
+  Label B1_2, B1_3, B1_5, start;
+
+  assert_different_registers(tmp1, tmp2, eax, ecx, edx);
+  jmp(start);
+  address HIGHSIGMASK = (address)_HIGHSIGMASK;
+  address LOG2_E = (address)_LOG2_E;
+  address coeff = (address)_coeff_pow;
+  address L_tbl = (address)_L_tbl_pow;
+  address HIGHMASK_Y = (address)_HIGHMASK_Y;
+  address T_exp = (address)_T_exp;
+  address e_coeff = (address)_e_coeff;
+  address coeff_h = (address)_coeff_h;
+  address HIGHMASK_LOG_X = (address)_HIGHMASK_LOG_X;
+  address HALFMASK = (address)_HALFMASK;
+  address log2 = (address)_log2_pow;
+
+
+  bind(start);
+  subq(rsp, 40);
+  movsd(Address(rsp, 8), xmm0);
+  movsd(Address(rsp, 16), xmm1);
+
+  bind(B1_2);
+  pextrw(eax, xmm0, 3);
+  xorpd(xmm2, xmm2);
+  mov64(tmp2, 0x3ff0000000000000);
+  movdq(xmm2, tmp2);
+  movl(tmp1, 1069088768);
+  movdq(xmm7, tmp1);
+  xorpd(xmm1, xmm1);
+  mov64(tmp3, 0x77f0000000000000);
+  movdq(xmm1, tmp3);
+  movdqu(xmm3, xmm0);
+  movl(edx, 32752);
+  andl(edx, eax);
+  subl(edx, 16368);
+  movl(ecx, edx);
+  sarl(edx, 31);
+  addl(ecx, edx);
+  xorl(ecx, edx);
+  por(xmm0, xmm2);
+  movdqu(xmm6, ExternalAddress(HIGHSIGMASK));    //0x00000000UL, 0xfffff800UL, 0x00000000UL, 0xfffff800UL
+  psrlq(xmm0, 27);
+  movq(xmm2, ExternalAddress(LOG2_E));    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
+  psrld(xmm0, 2);
+  addl(ecx, 16);
+  bsrl(ecx, ecx);
+  rcpps(xmm0, xmm0);
+  psllq(xmm3, 12);
+  movl(tmp4, 8192);
+  movdq(xmm4, tmp4);
+  psrlq(xmm3, 12);
+  subl(eax, 16);
+  cmpl(eax, 32736);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
+  movl(tmp1, 0);
+
+  bind(L_2TAG_PACKET_1_0_2);
+  mulss(xmm0, xmm7);
+  movl(edx, -1);
+  subl(ecx, 4);
+  shll(edx);
+  shlq(edx, 32);
+  movdq(xmm5, edx);
+  por(xmm3, xmm1);
+  subl(eax, 16351);
+  cmpl(eax, 1);
+  jcc(Assembler::belowEqual, L_2TAG_PACKET_2_0_2);
+  paddd(xmm0, xmm4);
+  pand(xmm5, xmm3);
+  movdl(edx, xmm0);
+  psllq(xmm0, 29);
+
+  bind(L_2TAG_PACKET_3_0_2);
+  subsd(xmm3, xmm5);
+  pand(xmm0, xmm6);
+  subl(eax, 1);
+  sarl(eax, 4);
+  cvtsi2sdl(xmm7, eax);
+  mulpd(xmm5, xmm0);
+
+  bind(L_2TAG_PACKET_4_0_2);
+  mulsd(xmm3, xmm0);
+  movdqu(xmm1, ExternalAddress(coeff));    //0x6dc96112UL, 0xbf836578UL, 0xee241472UL, 0xbf9b0301UL
+  lea(tmp4, ExternalAddress(L_tbl));
+  subsd(xmm5, xmm2);
+  movdqu(xmm4, ExternalAddress(16 + coeff));    //0x9f95985aUL, 0xbfb528dbUL, 0xb3841d2aUL, 0xbfd619b6UL
+  movl(ecx, eax);
+  sarl(eax, 31);
+  addl(ecx, eax);
+  xorl(eax, ecx);
+  addl(eax, 1);
+  bsrl(eax, eax);
+  unpcklpd(xmm5, xmm3);
+  movdqu(xmm6, ExternalAddress(32 + coeff));    //0x518775e3UL, 0x3f9004f2UL, 0xac8349bbUL, 0x3fa76c9bUL
+  addsd(xmm3, xmm5);
+  andl(edx, 16760832);
+  shrl(edx, 10);
+  addpd(xmm5, Address(tmp4, edx, Address::times_1, -3648));
+  movdqu(xmm0, ExternalAddress(48 + coeff));    //0x486ececcUL, 0x3fc4635eUL, 0x161bb241UL, 0xbf5dabe1UL
+  pshufd(xmm2, xmm3, 68);
+  mulsd(xmm3, xmm3);
+  mulpd(xmm1, xmm2);
+  mulpd(xmm4, xmm2);
+  addsd(xmm5, xmm7);
+  mulsd(xmm2, xmm3);
+  addpd(xmm6, xmm1);
+  mulsd(xmm3, xmm3);
+  addpd(xmm0, xmm4);
+  movq(xmm1, Address(rsp, 16));
+  movw(ecx, Address(rsp, 22));
+  pshufd(xmm7, xmm5, 238);
+  movq(xmm4, ExternalAddress(HIGHMASK_Y));    //0x00000000UL, 0xfffffff8UL, 0x00000000UL, 0xffffffffUL
+  mulpd(xmm6, xmm2);
+  pshufd(xmm3, xmm3, 68);
+  mulpd(xmm0, xmm2);
+  shll(eax, 4);
+  subl(eax, 15872);
+  andl(ecx, 32752);
+  addl(eax, ecx);
+  mulpd(xmm3, xmm6);
+  cmpl(eax, 624);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_5_0_2);
+  xorpd(xmm6, xmm6);
+  movl(edx, 17080);
+  pinsrw(xmm6, edx, 3);
+  movdqu(xmm2, xmm1);
+  pand(xmm4, xmm1);
+  subsd(xmm1, xmm4);
+  mulsd(xmm4, xmm5);
+  addsd(xmm0, xmm7);
+  mulsd(xmm1, xmm5);
+  movdqu(xmm7, xmm6);
+  addsd(xmm6, xmm4);
+  lea(tmp4, ExternalAddress(T_exp));
+  addpd(xmm3, xmm0);
+  movdl(edx, xmm6);
+  subsd(xmm6, xmm7);
+  pshufd(xmm0, xmm3, 238);
+  subsd(xmm4, xmm6);
+  addsd(xmm0, xmm3);
+  movl(ecx, edx);
+  andl(edx, 255);
+  addl(edx, edx);
+  movdqu(xmm5, Address(tmp4, edx, Address::times_8, 0));
+  addsd(xmm4, xmm1);
+  mulsd(xmm2, xmm0);
+  movdqu(xmm7, ExternalAddress(e_coeff));    //0xe78a6731UL, 0x3f55d87fUL, 0xd704a0c0UL, 0x3fac6b08UL
+  movdqu(xmm3, ExternalAddress(16 + e_coeff));    //0x6fba4e77UL, 0x3f83b2abUL, 0xff82c58fUL, 0x3fcebfbdUL
+  shll(ecx, 12);
+  xorl(ecx, tmp1);
+  andl(rcx, -1048576);
+  movdq(xmm6, rcx);
+  addsd(xmm2, xmm4);
+  mov64(tmp2, 0x3fe62e42fefa39ef);
+  movdq(xmm1, tmp2);
+  pshufd(xmm0, xmm2, 68);
+  pshufd(xmm4, xmm2, 68);
+  mulsd(xmm1, xmm2);
+  pshufd(xmm6, xmm6, 17);
+  mulpd(xmm0, xmm0);
+  mulpd(xmm7, xmm4);
+  paddd(xmm5, xmm6);
+  mulsd(xmm1, xmm5);
+  pshufd(xmm6, xmm5, 238);
+  mulsd(xmm0, xmm0);
+  addpd(xmm3, xmm7);
+  addsd(xmm1, xmm6);
+  mulpd(xmm0, xmm3);
+  pshufd(xmm3, xmm0, 238);
+  mulsd(xmm0, xmm5);
+  mulsd(xmm3, xmm5);
+  addsd(xmm0, xmm1);
+  addsd(xmm0, xmm3);
+  addsd(xmm0, xmm5);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_0_0_2);
+  addl(eax, 16);
+  movl(edx, 32752);
+  andl(edx, eax);
+  cmpl(edx, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_6_0_2);
+  testl(eax, 32768);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_7_0_2);
+
+  bind(L_2TAG_PACKET_8_0_2);
+  movq(xmm0, Address(rsp, 8));
+  movq(xmm3, Address(rsp, 8));
+  movdl(edx, xmm3);
+  psrlq(xmm3, 32);
+  movdl(ecx, xmm3);
+  orl(edx, ecx);
+  cmpl(edx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_9_0_2);
+  xorpd(xmm3, xmm3);
+  movl(eax, 18416);
+  pinsrw(xmm3, eax, 3);
+  mulsd(xmm0, xmm3);
+  xorpd(xmm2, xmm2);
+  movl(eax, 16368);
+  pinsrw(xmm2, eax, 3);
+  movdqu(xmm3, xmm0);
+  pextrw(eax, xmm0, 3);
+  por(xmm0, xmm2);
+  movl(ecx, 18416);
+  psrlq(xmm0, 27);
+  movq(xmm2, ExternalAddress(LOG2_E));    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
+  psrld(xmm0, 2);
+  rcpps(xmm0, xmm0);
+  psllq(xmm3, 12);
+  movdqu(xmm6, ExternalAddress(HIGHSIGMASK));    //0x00000000UL, 0xfffff800UL, 0x00000000UL, 0xfffff800UL
+  psrlq(xmm3, 12);
+  mulss(xmm0, xmm7);
+  movl(edx, -1024);
+  movdl(xmm5, edx);
+  por(xmm3, xmm1);
+  paddd(xmm0, xmm4);
+  psllq(xmm5, 32);
+  movdl(edx, xmm0);
+  psllq(xmm0, 29);
+  pand(xmm5, xmm3);
+  movl(tmp1, 0);
+  pand(xmm0, xmm6);
+  subsd(xmm3, xmm5);
+  andl(eax, 32752);
+  subl(eax, 18416);
+  sarl(eax, 4);
+  cvtsi2sdl(xmm7, eax);
+  mulpd(xmm5, xmm0);
+  jmp(L_2TAG_PACKET_4_0_2);
+
+  bind(L_2TAG_PACKET_10_0_2);
+  movq(xmm0, Address(rsp, 8));
+  movq(xmm3, Address(rsp, 8));
+  movdl(edx, xmm3);
+  psrlq(xmm3, 32);
+  movdl(ecx, xmm3);
+  orl(edx, ecx);
+  cmpl(edx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_9_0_2);
+  xorpd(xmm3, xmm3);
+  movl(eax, 18416);
+  pinsrw(xmm3, eax, 3);
+  mulsd(xmm0, xmm3);
+  xorpd(xmm2, xmm2);
+  movl(eax, 16368);
+  pinsrw(xmm2, eax, 3);
+  movdqu(xmm3, xmm0);
+  pextrw(eax, xmm0, 3);
+  por(xmm0, xmm2);
+  movl(ecx, 18416);
+  psrlq(xmm0, 27);
+  movq(xmm2, ExternalAddress(LOG2_E));    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
+  psrld(xmm0, 2);
+  rcpps(xmm0, xmm0);
+  psllq(xmm3, 12);
+  movdqu(xmm6, ExternalAddress(HIGHSIGMASK));    //0x00000000UL, 0xfffff800UL, 0x00000000UL, 0xfffff800UL
+  psrlq(xmm3, 12);
+  mulss(xmm0, xmm7);
+  movl(edx, -1024);
+  movdl(xmm5, edx);
+  por(xmm3, xmm1);
+  paddd(xmm0, xmm4);
+  psllq(xmm5, 32);
+  movdl(edx, xmm0);
+  psllq(xmm0, 29);
+  pand(xmm5, xmm3);
+  movl(tmp1, INT_MIN);
+  pand(xmm0, xmm6);
+  subsd(xmm3, xmm5);
+  andl(eax, 32752);
+  subl(eax, 18416);
+  sarl(eax, 4);
+  cvtsi2sdl(xmm7, eax);
+  mulpd(xmm5, xmm0);
+  jmp(L_2TAG_PACKET_4_0_2);
+
+  bind(L_2TAG_PACKET_5_0_2);
+  cmpl(eax, 0);
+  jcc(Assembler::less, L_2TAG_PACKET_11_0_2);
+  cmpl(eax, 752);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_12_0_2);
+  addsd(xmm0, xmm7);
+  movq(xmm2, ExternalAddress(HALFMASK));    //0xf8000000UL, 0xffffffffUL, 0xf8000000UL, 0xffffffffUL
+  addpd(xmm3, xmm0);
+  xorpd(xmm6, xmm6);
+  movl(eax, 17080);
+  pinsrw(xmm6, eax, 3);
+  pshufd(xmm0, xmm3, 238);
+  addsd(xmm0, xmm3);
+  movdqu(xmm3, xmm5);
+  addsd(xmm5, xmm0);
+  movdqu(xmm4, xmm2);
+  subsd(xmm3, xmm5);
+  movdqu(xmm7, xmm5);
+  pand(xmm5, xmm2);
+  movdqu(xmm2, xmm1);
+  pand(xmm4, xmm1);
+  subsd(xmm7, xmm5);
+  addsd(xmm0, xmm3);
+  subsd(xmm1, xmm4);
+  mulsd(xmm4, xmm5);
+  addsd(xmm0, xmm7);
+  mulsd(xmm2, xmm0);
+  movdqu(xmm7, xmm6);
+  mulsd(xmm1, xmm5);
+  addsd(xmm6, xmm4);
+  movdl(eax, xmm6);
+  subsd(xmm6, xmm7);
+  lea(tmp4, ExternalAddress(T_exp));
+  addsd(xmm2, xmm1);
+  movdqu(xmm7, ExternalAddress(e_coeff));    //0xe78a6731UL, 0x3f55d87fUL, 0xd704a0c0UL, 0x3fac6b08UL
+  movdqu(xmm3, ExternalAddress(16 + e_coeff));    //0x6fba4e77UL, 0x3f83b2abUL, 0xff82c58fUL, 0x3fcebfbdUL
+  subsd(xmm4, xmm6);
+  pextrw(edx, xmm6, 3);
+  movl(ecx, eax);
+  andl(eax, 255);
+  addl(eax, eax);
+  movdqu(xmm5, Address(tmp4, rax, Address::times_8, 0));
+  addsd(xmm2, xmm4);
+  sarl(ecx, 8);
+  movl(eax, ecx);
+  sarl(ecx, 1);
+  subl(eax, ecx);
+  shll(ecx, 20);
+  xorl(ecx, tmp1);
+  movdl(xmm6, ecx);
+  movq(xmm1, ExternalAddress(32 + e_coeff));    //0xfefa39efUL, 0x3fe62e42UL, 0x00000000UL, 0x00000000UL
+  andl(edx, 32767);
+  cmpl(edx, 16529);
+  jcc(Assembler::above, L_2TAG_PACKET_12_0_2);
+  pshufd(xmm0, xmm2, 68);
+  pshufd(xmm4, xmm2, 68);
+  mulpd(xmm0, xmm0);
+  mulpd(xmm7, xmm4);
+  pshufd(xmm6, xmm6, 17);
+  mulsd(xmm1, xmm2);
+  mulsd(xmm0, xmm0);
+  paddd(xmm5, xmm6);
+  addpd(xmm3, xmm7);
+  mulsd(xmm1, xmm5);
+  pshufd(xmm6, xmm5, 238);
+  mulpd(xmm0, xmm3);
+  addsd(xmm1, xmm6);
+  pshufd(xmm3, xmm0, 238);
+  mulsd(xmm0, xmm5);
+  mulsd(xmm3, xmm5);
+  shll(eax, 4);
+  xorpd(xmm4, xmm4);
+  addl(eax, 16368);
+  pinsrw(xmm4, eax, 3);
+  addsd(xmm0, xmm1);
+  addsd(xmm0, xmm3);
+  movdqu(xmm1, xmm0);
+  addsd(xmm0, xmm5);
+  mulsd(xmm0, xmm4);
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_13_0_2);
+  cmpl(eax, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_14_0_2);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_6_0_2);
+  movq(xmm1, Address(rsp, 16));
+  movq(xmm0, Address(rsp, 8));
+  movdqu(xmm2, xmm0);
+  movdl(eax, xmm2);
+  psrlq(xmm2, 20);
+  movdl(edx, xmm2);
+  orl(eax, edx);
+  jcc(Assembler::equal, L_2TAG_PACKET_15_0_2);
+  movdl(eax, xmm1);
+  psrlq(xmm1, 32);
+  movdl(edx, xmm1);
+  movl(ecx, edx);
+  addl(edx, edx);
+  orl(eax, edx);
+  jcc(Assembler::equal, L_2TAG_PACKET_16_0_2);
+  addsd(xmm0, xmm0);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_16_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 16368);
+  pinsrw(xmm0, eax, 3);
+  movl(Address(rsp, 0), 29);
+  jmp(L_2TAG_PACKET_17_0_2);
+
+  bind(L_2TAG_PACKET_18_0_2);
+  movq(xmm0, Address(rsp, 16));
+  addpd(xmm0, xmm0);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_15_0_2);
+  movdl(eax, xmm1);
+  movdqu(xmm2, xmm1);
+  psrlq(xmm1, 32);
+  movdl(edx, xmm1);
+  movl(ecx, edx);
+  addl(edx, edx);
+  orl(eax, edx);
+  jcc(Assembler::equal, L_2TAG_PACKET_19_0_2);
+  pextrw(eax, xmm2, 3);
+  andl(eax, 32752);
+  cmpl(eax, 32752);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_20_0_2);
+  movdl(eax, xmm2);
+  psrlq(xmm2, 20);
+  movdl(edx, xmm2);
+  orl(eax, edx);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_20_0_2);
+  pextrw(eax, xmm0, 3);
+  testl(eax, 32768);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_21_0_2);
+  testl(ecx, INT_MIN);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_22_0_2);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_23_0_2);
+  movq(xmm1, Address(rsp, 16));
+  movdl(eax, xmm1);
+  testl(eax, 1);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_24_0_2);
+  testl(eax, 2);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_25_0_2);
+  jmp(L_2TAG_PACKET_24_0_2);
+
+  bind(L_2TAG_PACKET_21_0_2);
+  shrl(ecx, 20);
+  andl(ecx, 2047);
+  cmpl(ecx, 1075);
+  jcc(Assembler::above, L_2TAG_PACKET_24_0_2);
+  jcc(Assembler::equal, L_2TAG_PACKET_26_0_2);
+  cmpl(ecx, 1074);
+  jcc(Assembler::above, L_2TAG_PACKET_23_0_2);
+  cmpl(ecx, 1023);
+  jcc(Assembler::below, L_2TAG_PACKET_24_0_2);
+  movq(xmm1, Address(rsp, 16));
+  movl(eax, 17208);
+  xorpd(xmm3, xmm3);
+  pinsrw(xmm3, eax, 3);
+  movdqu(xmm4, xmm3);
+  addsd(xmm3, xmm1);
+  subsd(xmm4, xmm3);
+  addsd(xmm1, xmm4);
+  pextrw(eax, xmm1, 3);
+  andl(eax, 32752);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_24_0_2);
+  movdl(eax, xmm3);
+  andl(eax, 1);
+  jcc(Assembler::equal, L_2TAG_PACKET_24_0_2);
+
+  bind(L_2TAG_PACKET_25_0_2);
+  movq(xmm1, Address(rsp, 16));
+  pextrw(eax, xmm1, 3);
+  andl(eax, 32768);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_27_0_2);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_27_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 32768);
+  pinsrw(xmm0, eax, 3);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_24_0_2);
+  movq(xmm1, Address(rsp, 16));
+  pextrw(eax, xmm1, 3);
+  andl(eax, 32768);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_22_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 32752);
+  pinsrw(xmm0, eax, 3);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_26_0_2);
+  movq(xmm1, Address(rsp, 16));
+  movdl(eax, xmm1);
+  andl(eax, 1);
+  jcc(Assembler::equal, L_2TAG_PACKET_24_0_2);
+  jmp(L_2TAG_PACKET_25_0_2);
+
+  bind(L_2TAG_PACKET_28_0_2);
+  movdl(eax, xmm1);
+  psrlq(xmm1, 20);
+  movdl(edx, xmm1);
+  orl(eax, edx);
+  jcc(Assembler::equal, L_2TAG_PACKET_29_0_2);
+  movq(xmm0, Address(rsp, 16));
+  addsd(xmm0, xmm0);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_29_0_2);
+  movq(xmm0, Address(rsp, 8));
+  pextrw(eax, xmm0, 3);
+  cmpl(eax, 49136);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_30_0_2);
+  movdl(ecx, xmm0);
+  psrlq(xmm0, 20);
+  movdl(edx, xmm0);
+  orl(ecx, edx);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_30_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 32760);
+  pinsrw(xmm0, eax, 3);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_30_0_2);
+  movq(xmm1, Address(rsp, 16));
+  andl(eax, 32752);
+  subl(eax, 16368);
+  pextrw(edx, xmm1, 3);
+  xorpd(xmm0, xmm0);
+  xorl(eax, edx);
+  andl(eax, 32768);
+  jcc(Assembler::equal, L_2TAG_PACKET_31_0_2);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_31_0_2);
+  movl(ecx, 32752);
+  pinsrw(xmm0, ecx, 3);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_32_0_2);
+  movdl(eax, xmm1);
+  cmpl(edx, 17184);
+  jcc(Assembler::above, L_2TAG_PACKET_33_0_2);
+  testl(eax, 1);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_34_0_2);
+  testl(eax, 2);
+  jcc(Assembler::equal, L_2TAG_PACKET_35_0_2);
+  jmp(L_2TAG_PACKET_36_0_2);
+
+  bind(L_2TAG_PACKET_33_0_2);
+  testl(eax, 1);
+  jcc(Assembler::equal, L_2TAG_PACKET_35_0_2);
+  jmp(L_2TAG_PACKET_36_0_2);
+
+  bind(L_2TAG_PACKET_7_0_2);
+  movq(xmm2, Address(rsp, 8));
+  movdl(eax, xmm2);
+  psrlq(xmm2, 31);
+  movdl(ecx, xmm2);
+  orl(eax, ecx);
+  jcc(Assembler::equal, L_2TAG_PACKET_9_0_2);
+  movq(xmm1, Address(rsp, 16));
+  pextrw(edx, xmm1, 3);
+  movdl(eax, xmm1);
+  movdqu(xmm2, xmm1);
+  psrlq(xmm2, 32);
+  movdl(ecx, xmm2);
+  addl(ecx, ecx);
+  orl(ecx, eax);
+  jcc(Assembler::equal, L_2TAG_PACKET_37_0_2);
+  andl(edx, 32752);
+  cmpl(edx, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_28_0_2);
+  cmpl(edx, 17200);
+  jcc(Assembler::above, L_2TAG_PACKET_35_0_2);
+  cmpl(edx, 17184);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_32_0_2);
+  cmpl(edx, 16368);
+  jcc(Assembler::below, L_2TAG_PACKET_34_0_2);
+  movl(eax, 17208);
+  xorpd(xmm2, xmm2);
+  pinsrw(xmm2, eax, 3);
+  movdqu(xmm4, xmm2);
+  addsd(xmm2, xmm1);
+  subsd(xmm4, xmm2);
+  addsd(xmm1, xmm4);
+  pextrw(eax, xmm1, 3);
+  andl(eax, 32767);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_34_0_2);
+  movdl(eax, xmm2);
+  andl(eax, 1);
+  jcc(Assembler::equal, L_2TAG_PACKET_35_0_2);
+
+  bind(L_2TAG_PACKET_36_0_2);
+  xorpd(xmm1, xmm1);
+  movl(edx, 30704);
+  pinsrw(xmm1, edx, 3);
+  movq(xmm2, ExternalAddress(LOG2_E));    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
+  movq(xmm4, Address(rsp, 8));
+  pextrw(eax, xmm4, 3);
+  movl(edx, 8192);
+  movdl(xmm4, edx);
+  andl(eax, 32767);
+  subl(eax, 16);
+  jcc(Assembler::less, L_2TAG_PACKET_10_0_2);
+  movl(edx, eax);
+  andl(edx, 32752);
+  subl(edx, 16368);
+  movl(ecx, edx);
+  sarl(edx, 31);
+  addl(ecx, edx);
+  xorl(ecx, edx);
+  addl(ecx, 16);
+  bsrl(ecx, ecx);
+  movl(tmp1, INT_MIN);
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_34_0_2);
+  xorpd(xmm1, xmm1);
+  movl(eax, 32752);
+  pinsrw(xmm1, eax, 3);
+  xorpd(xmm0, xmm0);
+  mulsd(xmm0, xmm1);
+  movl(Address(rsp, 0), 28);
+  jmp(L_2TAG_PACKET_17_0_2);
+
+  bind(L_2TAG_PACKET_35_0_2);
+  xorpd(xmm1, xmm1);
+  movl(edx, 30704);
+  pinsrw(xmm1, edx, 3);
+  movq(xmm2, ExternalAddress(LOG2_E));    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
+  movq(xmm4, Address(rsp, 8));
+  pextrw(eax, xmm4, 3);
+  movl(edx, 8192);
+  movdl(xmm4, edx);
+  andl(eax, 32767);
+  subl(eax, 16);
+  jcc(Assembler::less, L_2TAG_PACKET_8_0_2);
+  movl(edx, eax);
+  andl(edx, 32752);
+  subl(edx, 16368);
+  movl(ecx, edx);
+  sarl(edx, 31);
+  addl(ecx, edx);
+  xorl(ecx, edx);
+  addl(ecx, 16);
+  bsrl(ecx, ecx);
+  movl(tmp1, 0);
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_19_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 16368);
+  pinsrw(xmm0, eax, 3);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_22_0_2);
+  xorpd(xmm0, xmm0);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_11_0_2);
+  addl(eax, 384);
+  cmpl(eax, 0);
+  jcc(Assembler::less, L_2TAG_PACKET_38_0_2);
+  mulsd(xmm5, xmm1);
+  addsd(xmm0, xmm7);
+  shrl(tmp1, 31);
+  addpd(xmm3, xmm0);
+  pshufd(xmm0, xmm3, 238);
+  addsd(xmm3, xmm0);
+  lea(tmp4, ExternalAddress(log2));    //0xfefa39efUL, 0x3fe62e42UL, 0xfefa39efUL, 0xbfe62e42UL
+  movq(xmm4, Address(tmp4, tmp1, Address::times_8, 0));
+  mulsd(xmm1, xmm3);
+  xorpd(xmm0, xmm0);
+  movl(eax, 16368);
+  shll(tmp1, 15);
+  orl(eax, tmp1);
+  pinsrw(xmm0, eax, 3);
+  addsd(xmm5, xmm1);
+  mulsd(xmm5, xmm4);
+  addsd(xmm0, xmm5);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_38_0_2);
+
+  bind(L_2TAG_PACKET_37_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 16368);
+  pinsrw(xmm0, eax, 3);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_39_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 16368);
+  pinsrw(xmm0, eax, 3);
+  movl(Address(rsp, 0), 26);
+  jmp(L_2TAG_PACKET_17_0_2);
+
+  bind(L_2TAG_PACKET_9_0_2);
+  movq(xmm1, Address(rsp, 16));
+  movdqu(xmm2, xmm1);
+  pextrw(eax, xmm1, 3);
+  andl(eax, 32752);
+  cmpl(eax, 32752);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_40_0_2);
+  movdl(eax, xmm2);
+  psrlq(xmm2, 20);
+  movdl(edx, xmm2);
+  orl(eax, edx);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_40_0_2);
+  movdl(eax, xmm1);
+  psrlq(xmm1, 32);
+  movdl(edx, xmm1);
+  movl(ecx, edx);
+  addl(edx, edx);
+  orl(eax, edx);
+  jcc(Assembler::equal, L_2TAG_PACKET_39_0_2);
+  shrl(edx, 21);
+  cmpl(edx, 1075);
+  jcc(Assembler::above, L_2TAG_PACKET_41_0_2);
+  jcc(Assembler::equal, L_2TAG_PACKET_42_0_2);
+  cmpl(edx, 1023);
+  jcc(Assembler::below, L_2TAG_PACKET_41_0_2);
+  movq(xmm1, Address(rsp, 16));
+  movl(eax, 17208);
+  xorpd(xmm3, xmm3);
+  pinsrw(xmm3, eax, 3);
+  movdqu(xmm4, xmm3);
+  addsd(xmm3, xmm1);
+  subsd(xmm4, xmm3);
+  addsd(xmm1, xmm4);
+  pextrw(eax, xmm1, 3);
+  andl(eax, 32752);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_41_0_2);
+  movdl(eax, xmm3);
+  andl(eax, 1);
+  jcc(Assembler::equal, L_2TAG_PACKET_41_0_2);
+
+  bind(L_2TAG_PACKET_43_0_2);
+  movq(xmm0, Address(rsp, 8));
+  testl(ecx, INT_MIN);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_44_0_2);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_42_0_2);
+  movq(xmm1, Address(rsp, 16));
+  movdl(eax, xmm1);
+  testl(eax, 1);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_43_0_2);
+
+  bind(L_2TAG_PACKET_41_0_2);
+  testl(ecx, INT_MIN);
+  jcc(Assembler::equal, L_2TAG_PACKET_22_0_2);
+  xorpd(xmm0, xmm0);
+
+  bind(L_2TAG_PACKET_44_0_2);
+  movl(eax, 16368);
+  xorpd(xmm1, xmm1);
+  pinsrw(xmm1, eax, 3);
+  divsd(xmm1, xmm0);
+  movdqu(xmm0, xmm1);
+  movl(Address(rsp, 0), 27);
+  jmp(L_2TAG_PACKET_17_0_2);
+
+  bind(L_2TAG_PACKET_12_0_2);
+  movq(xmm2, Address(rsp, 8));
+  movq(xmm6, Address(rsp, 16));
+  pextrw(eax, xmm2, 3);
+  pextrw(edx, xmm6, 3);
+  movl(ecx, 32752);
+  andl(ecx, edx);
+  cmpl(ecx, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_45_0_2);
+  andl(eax, 32752);
+  subl(eax, 16368);
+  xorl(edx, eax);
+  testl(edx, 32768);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_46_0_2);
+
+  bind(L_2TAG_PACKET_47_0_2);
+  movl(eax, 32736);
+  pinsrw(xmm0, eax, 3);
+  shrl(tmp1, 16);
+  orl(eax, tmp1);
+  pinsrw(xmm1, eax, 3);
+  mulsd(xmm0, xmm1);
+
+  bind(L_2TAG_PACKET_14_0_2);
+  movl(Address(rsp, 0), 24);
+  jmp(L_2TAG_PACKET_17_0_2);
+
+  bind(L_2TAG_PACKET_46_0_2);
+  movl(eax, 16);
+  pinsrw(xmm0, eax, 3);
+  mulsd(xmm0, xmm0);
+  testl(tmp1, INT_MIN);
+  jcc(Assembler::equal, L_2TAG_PACKET_48_0_2);
+  mov64(tmp2, 0x8000000000000000);
+  movdq(xmm2, tmp2);
+  xorpd(xmm0, xmm2);
+
+  bind(L_2TAG_PACKET_48_0_2);
+  movl(Address(rsp, 0), 25);
+  jmp(L_2TAG_PACKET_17_0_2);
+
+  bind(L_2TAG_PACKET_13_0_2);
+  pextrw(ecx, xmm5, 3);
+  pextrw(edx, xmm4, 3);
+  movl(eax, -1);
+  andl(ecx, 32752);
+  subl(ecx, 16368);
+  andl(edx, 32752);
+  addl(edx, ecx);
+  movl(ecx, -31);
+  sarl(edx, 4);
+  subl(ecx, edx);
+  jcc(Assembler::lessEqual, L_2TAG_PACKET_49_0_2);
+  cmpl(ecx, 20);
+  jcc(Assembler::above, L_2TAG_PACKET_50_0_2);
+  shll(eax);
+
+  bind(L_2TAG_PACKET_49_0_2);
+  movdl(xmm0, eax);
+  psllq(xmm0, 32);
+  pand(xmm0, xmm5);
+  subsd(xmm5, xmm0);
+  addsd(xmm5, xmm1);
+  mulsd(xmm0, xmm4);
+  mulsd(xmm5, xmm4);
+  addsd(xmm0, xmm5);
+
+  bind(L_2TAG_PACKET_50_0_2);
+  jmp(L_2TAG_PACKET_48_0_2);
+
+  bind(L_2TAG_PACKET_2_0_2);
+  movw(ecx, Address(rsp, 22));
+  movl(edx, INT_MIN);
+  movdl(xmm1, rdx);
+  xorpd(xmm7, xmm7);
+  paddd(xmm0, xmm4);
+  movdl(edx, xmm0);
+  psllq(xmm0, 29);
+  paddq(xmm1, xmm3);
+  pand(xmm5, xmm1);
+  andl(ecx, 32752);
+  cmpl(ecx, 16560);
+  jcc(Assembler::less, L_2TAG_PACKET_3_0_2);
+  pand(xmm0, xmm6);
+  subsd(xmm3, xmm5);
+  addl(eax, 16351);
+  shrl(eax, 4);
+  subl(eax, 1022);
+  cvtsi2sdl(xmm7, eax);
+  mulpd(xmm5, xmm0);
+  lea(r11, ExternalAddress(L_tbl));
+  movq(xmm4, ExternalAddress(coeff_h));    //0x00000000UL, 0xbfd61a00UL, 0x00000000UL, 0xbf5dabe1UL
+  mulsd(xmm3, xmm0);
+  movq(xmm6, ExternalAddress(coeff_h));    //0x00000000UL, 0xbfd61a00UL, 0x00000000UL, 0xbf5dabe1UL
+  subsd(xmm5, xmm2);
+  movq(xmm1, ExternalAddress(8 + coeff_h));    //0x00000000UL, 0xbf5dabe1UL
+  pshufd(xmm2, xmm3, 68);
+  unpcklpd(xmm5, xmm3);
+  addsd(xmm3, xmm5);
+  movq(xmm0, ExternalAddress(8 + coeff_h));    //0x00000000UL, 0xbf5dabe1UL
+  andl(edx, 16760832);
+  shrl(edx, 10);
+  addpd(xmm7, Address(tmp4, edx, Address::times_1, -3648));
+  mulsd(xmm4, xmm5);
+  mulsd(xmm0, xmm5);
+  mulsd(xmm6, xmm2);
+  mulsd(xmm1, xmm2);
+  movdqu(xmm2, xmm5);
+  mulsd(xmm4, xmm5);
+  addsd(xmm5, xmm0);
+  movdqu(xmm0, xmm7);
+  addsd(xmm2, xmm3);
+  addsd(xmm7, xmm5);
+  mulsd(xmm6, xmm2);
+  subsd(xmm0, xmm7);
+  movdqu(xmm2, xmm7);
+  addsd(xmm7, xmm4);
+  addsd(xmm0, xmm5);
+  subsd(xmm2, xmm7);
+  addsd(xmm4, xmm2);
+  pshufd(xmm2, xmm5, 238);
+  movdqu(xmm5, xmm7);
+  addsd(xmm7, xmm2);
+  addsd(xmm4, xmm0);
+  movdqu(xmm0, ExternalAddress(coeff));    //0x6dc96112UL, 0xbf836578UL, 0xee241472UL, 0xbf9b0301UL
+  subsd(xmm5, xmm7);
+  addsd(xmm6, xmm4);
+  movdqu(xmm4, xmm7);
+  addsd(xmm5, xmm2);
+  addsd(xmm7, xmm1);
+  movdqu(xmm2, ExternalAddress(64 + coeff));    //0x486ececcUL, 0x3fc4635eUL, 0x161bb241UL, 0xbf5dabe1UL
+  subsd(xmm4, xmm7);
+  addsd(xmm6, xmm5);
+  addsd(xmm4, xmm1);
+  pshufd(xmm5, xmm7, 238);
+  movapd(xmm1, xmm7);
+  addsd(xmm7, xmm5);
+  subsd(xmm1, xmm7);
+  addsd(xmm1, xmm5);
+  movdqu(xmm5, ExternalAddress(80 + coeff));    //0x9f95985aUL, 0xbfb528dbUL, 0xf8b5787dUL, 0x3ef2531eUL
+  pshufd(xmm3, xmm3, 68);
+  addsd(xmm6, xmm4);
+  addsd(xmm6, xmm1);
+  movdqu(xmm1, ExternalAddress(32 + coeff));    //0x9f95985aUL, 0xbfb528dbUL, 0xb3841d2aUL, 0xbfd619b6UL
+  mulpd(xmm0, xmm3);
+  mulpd(xmm2, xmm3);
+  pshufd(xmm4, xmm3, 68);
+  mulpd(xmm3, xmm3);
+  addpd(xmm0, xmm1);
+  addpd(xmm5, xmm2);
+  mulsd(xmm4, xmm3);
+  movq(xmm2, ExternalAddress(HIGHMASK_LOG_X));    //0xf8000000UL, 0xffffffffUL, 0x00000000UL, 0xfffff800UL
+  mulpd(xmm3, xmm3);
+  movq(xmm1, Address(rsp, 16));
+  movw(ecx, Address(rsp, 22));
+  mulpd(xmm0, xmm4);
+  pextrw(eax, xmm7, 3);
+  mulpd(xmm5, xmm4);
+  mulpd(xmm0, xmm3);
+  movq(xmm4, ExternalAddress(8 + HIGHMASK_Y));    //0x00000000UL, 0xffffffffUL
+  pand(xmm2, xmm7);
+  addsd(xmm5, xmm6);
+  subsd(xmm7, xmm2);
+  addpd(xmm5, xmm0);
+  andl(eax, 32752);
+  subl(eax, 16368);
+  andl(ecx, 32752);
+  cmpl(ecx, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_45_0_2);
+  addl(ecx, eax);
+  cmpl(ecx, 16576);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_51_0_2);
+  pshufd(xmm0, xmm5, 238);
+  pand(xmm4, xmm1);
+  movdqu(xmm3, xmm1);
+  addsd(xmm5, xmm0);
+  subsd(xmm1, xmm4);
+  xorpd(xmm6, xmm6);
+  movl(edx, 17080);
+  pinsrw(xmm6, edx, 3);
+  addsd(xmm7, xmm5);
+  mulsd(xmm4, xmm2);
+  mulsd(xmm1, xmm2);
+  movdqu(xmm5, xmm6);
+  mulsd(xmm3, xmm7);
+  addsd(xmm6, xmm4);
+  addsd(xmm1, xmm3);
+  movdqu(xmm7, ExternalAddress(e_coeff));    //0xe78a6731UL, 0x3f55d87fUL, 0xd704a0c0UL, 0x3fac6b08UL
+  movdl(edx, xmm6);
+  subsd(xmm6, xmm5);
+  lea(tmp4, ExternalAddress(T_exp));
+  movdqu(xmm3, ExternalAddress(16 + e_coeff));    //0x6fba4e77UL, 0x3f83b2abUL, 0xff82c58fUL, 0x3fcebfbdUL
+  movq(xmm2, ExternalAddress(32 + e_coeff));    //0xfefa39efUL, 0x3fe62e42UL, 0x00000000UL, 0x00000000UL
+  subsd(xmm4, xmm6);
+  movl(ecx, edx);
+  andl(edx, 255);
+  addl(edx, edx);
+  movdqu(xmm5, Address(tmp4, edx, Address::times_8, 0));
+  addsd(xmm4, xmm1);
+  pextrw(edx, xmm6, 3);
+  shrl(ecx, 8);
+  movl(eax, ecx);
+  shrl(ecx, 1);
+  subl(eax, ecx);
+  shll(ecx, 20);
+  movdl(xmm6, ecx);
+  pshufd(xmm0, xmm4, 68);
+  pshufd(xmm1, xmm4, 68);
+  mulpd(xmm0, xmm0);
+  mulpd(xmm7, xmm1);
+  pshufd(xmm6, xmm6, 17);
+  mulsd(xmm2, xmm4);
+  andl(edx, 32767);
+  cmpl(edx, 16529);
+  jcc(Assembler::above, L_2TAG_PACKET_12_0_2);
+  mulsd(xmm0, xmm0);
+  paddd(xmm5, xmm6);
+  addpd(xmm3, xmm7);
+  mulsd(xmm2, xmm5);
+  pshufd(xmm6, xmm5, 238);
+  mulpd(xmm0, xmm3);
+  addsd(xmm2, xmm6);
+  pshufd(xmm3, xmm0, 238);
+  addl(eax, 1023);
+  shll(eax, 20);
+  orl(eax, tmp1);
+  movdl(xmm4, eax);
+  mulsd(xmm0, xmm5);
+  mulsd(xmm3, xmm5);
+  addsd(xmm0, xmm2);
+  psllq(xmm4, 32);
+  addsd(xmm0, xmm3);
+  movdqu(xmm1, xmm0);
+  addsd(xmm0, xmm5);
+  mulsd(xmm0, xmm4);
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_13_0_2);
+  cmpl(eax, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_14_0_2);
+
+  bind(L_2TAG_PACKET_52_0_2);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_45_0_2);
+  movq(xmm0, Address(rsp, 8));
+  xorpd(xmm2, xmm2);
+  movl(eax, 49136);
+  pinsrw(xmm2, eax, 3);
+  addsd(xmm2, xmm0);
+  pextrw(eax, xmm2, 3);
+  cmpl(eax, 0);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_53_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 32760);
+  pinsrw(xmm0, eax, 3);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_53_0_2);
+  movq(xmm1, Address(rsp, 16));
+  movdl(edx, xmm1);
+  movdqu(xmm3, xmm1);
+  psrlq(xmm3, 20);
+  movdl(ecx, xmm3);
+  orl(ecx, edx);
+  jcc(Assembler::equal, L_2TAG_PACKET_54_0_2);
+  addsd(xmm1, xmm1);
+  movdqu(xmm0, xmm1);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_51_0_2);
+  pextrw(eax, xmm1, 3);
+  pextrw(ecx, xmm2, 3);
+  xorl(eax, ecx);
+  testl(eax, 32768);
+  jcc(Assembler::equal, L_2TAG_PACKET_47_0_2);
+  jmp(L_2TAG_PACKET_46_0_2);
+
+  bind(L_2TAG_PACKET_54_0_2);
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32752);
+  pextrw(edx, xmm1, 3);
+  xorpd(xmm0, xmm0);
+  subl(eax, 16368);
+  xorl(eax, edx);
+  testl(eax, 32768);
+  jcc(Assembler::equal, L_2TAG_PACKET_55_0_2);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_55_0_2);
+  movl(edx, 32752);
+  pinsrw(xmm0, edx, 3);
+  jmp(B1_5);
+
+  bind(L_2TAG_PACKET_17_0_2);
+  movq(Address(rsp, 24), xmm0);
+
+  bind(B1_3);
+  movq(xmm0, Address(rsp, 24));
+
+  bind(L_2TAG_PACKET_56_0_2);
+
+  bind(B1_5);
+  addq(rsp, 40);
+}
+#else
+// The 32 bit code is at most SSE2 compliant
+ALIGNED_(16) juint _static_const_table_pow[] =
+{
+    0x00000000UL, 0xbfd61a00UL, 0x00000000UL, 0xbf5dabe1UL, 0xf8000000UL,
+    0xffffffffUL, 0x00000000UL, 0xfffff800UL, 0x00000000UL, 0x3ff00000UL,
+    0x00000000UL, 0x00000000UL, 0x20000000UL, 0x3feff00aUL, 0x96621f95UL,
+    0x3e5b1856UL, 0xe0000000UL, 0x3fefe019UL, 0xe5916f9eUL, 0xbe325278UL,
+    0x00000000UL, 0x3fefd02fUL, 0x859a1062UL, 0x3e595fb7UL, 0xc0000000UL,
+    0x3fefc049UL, 0xb245f18fUL, 0xbe529c38UL, 0xe0000000UL, 0x3fefb069UL,
+    0xad2880a7UL, 0xbe501230UL, 0x60000000UL, 0x3fefa08fUL, 0xc8e72420UL,
+    0x3e597bd1UL, 0x80000000UL, 0x3fef90baUL, 0xc30c4500UL, 0xbe5d6c75UL,
+    0xe0000000UL, 0x3fef80eaUL, 0x02c63f43UL, 0x3e2e1318UL, 0xc0000000UL,
+    0x3fef7120UL, 0xb3d4ccccUL, 0xbe44c52aUL, 0x00000000UL, 0x3fef615cUL,
+    0xdbd91397UL, 0xbe4e7d6cUL, 0xa0000000UL, 0x3fef519cUL, 0x65c5cd68UL,
+    0xbe522dc8UL, 0xa0000000UL, 0x3fef41e2UL, 0x46d1306cUL, 0xbe5a840eUL,
+    0xe0000000UL, 0x3fef322dUL, 0xd2980e94UL, 0x3e5071afUL, 0xa0000000UL,
+    0x3fef227eUL, 0x773abadeUL, 0xbe5891e5UL, 0xa0000000UL, 0x3fef12d4UL,
+    0xdc6bf46bUL, 0xbe5cccbeUL, 0xe0000000UL, 0x3fef032fUL, 0xbc7247faUL,
+    0xbe2bab83UL, 0x80000000UL, 0x3feef390UL, 0xbcaa1e46UL, 0xbe53bb3bUL,
+    0x60000000UL, 0x3feee3f6UL, 0x5f6c682dUL, 0xbe54c619UL, 0x80000000UL,
+    0x3feed461UL, 0x5141e368UL, 0xbe4b6d86UL, 0xe0000000UL, 0x3feec4d1UL,
+    0xec678f76UL, 0xbe369af6UL, 0x80000000UL, 0x3feeb547UL, 0x41301f55UL,
+    0xbe2d4312UL, 0x60000000UL, 0x3feea5c2UL, 0x676da6bdUL, 0xbe4d8dd0UL,
+    0x60000000UL, 0x3fee9642UL, 0x57a891c4UL, 0x3e51f991UL, 0xa0000000UL,
+    0x3fee86c7UL, 0xe4eb491eUL, 0x3e579bf9UL, 0x20000000UL, 0x3fee7752UL,
+    0xfddc4a2cUL, 0xbe3356e6UL, 0xc0000000UL, 0x3fee67e1UL, 0xd75b5bf1UL,
+    0xbe449531UL, 0x80000000UL, 0x3fee5876UL, 0xbd423b8eUL, 0x3df54fe4UL,
+    0x60000000UL, 0x3fee4910UL, 0x330e51b9UL, 0x3e54289cUL, 0x80000000UL,
+    0x3fee39afUL, 0x8651a95fUL, 0xbe55aad6UL, 0xa0000000UL, 0x3fee2a53UL,
+    0x5e98c708UL, 0xbe2fc4a9UL, 0xe0000000UL, 0x3fee1afcUL, 0x0989328dUL,
+    0x3e23958cUL, 0x40000000UL, 0x3fee0babUL, 0xee642abdUL, 0xbe425dd8UL,
+    0xa0000000UL, 0x3fedfc5eUL, 0xc394d236UL, 0x3e526362UL, 0x20000000UL,
+    0x3feded17UL, 0xe104aa8eUL, 0x3e4ce247UL, 0xc0000000UL, 0x3fedddd4UL,
+    0x265a9be4UL, 0xbe5bb77aUL, 0x40000000UL, 0x3fedce97UL, 0x0ecac52fUL,
+    0x3e4a7cb1UL, 0xe0000000UL, 0x3fedbf5eUL, 0x124cb3b8UL, 0x3e257024UL,
+    0x80000000UL, 0x3fedb02bUL, 0xe6d4febeUL, 0xbe2033eeUL, 0x20000000UL,
+    0x3feda0fdUL, 0x39cca00eUL, 0xbe3ddabcUL, 0xc0000000UL, 0x3fed91d3UL,
+    0xef8a552aUL, 0xbe543390UL, 0x40000000UL, 0x3fed82afUL, 0xb8e85204UL,
+    0x3e513850UL, 0xe0000000UL, 0x3fed738fUL, 0x3d59fe08UL, 0xbe5db728UL,
+    0x40000000UL, 0x3fed6475UL, 0x3aa7ead1UL, 0x3e58804bUL, 0xc0000000UL,
+    0x3fed555fUL, 0xf8a35ba9UL, 0xbe5298b0UL, 0x00000000UL, 0x3fed464fUL,
+    0x9a88dd15UL, 0x3e5a8cdbUL, 0x40000000UL, 0x3fed3743UL, 0xb0b0a190UL,
+    0x3e598635UL, 0x80000000UL, 0x3fed283cUL, 0xe2113295UL, 0xbe5c1119UL,
+    0x80000000UL, 0x3fed193aUL, 0xafbf1728UL, 0xbe492e9cUL, 0x60000000UL,
+    0x3fed0a3dUL, 0xe4a4ccf3UL, 0x3e19b90eUL, 0x20000000UL, 0x3fecfb45UL,
+    0xba3cbeb8UL, 0x3e406b50UL, 0xc0000000UL, 0x3fecec51UL, 0x110f7dddUL,
+    0x3e0d6806UL, 0x40000000UL, 0x3fecdd63UL, 0x7dd7d508UL, 0xbe5a8943UL,
+    0x80000000UL, 0x3fecce79UL, 0x9b60f271UL, 0xbe50676aUL, 0x80000000UL,
+    0x3fecbf94UL, 0x0b9ad660UL, 0x3e59174fUL, 0x60000000UL, 0x3fecb0b4UL,
+    0x00823d9cUL, 0x3e5bbf72UL, 0x20000000UL, 0x3feca1d9UL, 0x38a6ec89UL,
+    0xbe4d38f9UL, 0x80000000UL, 0x3fec9302UL, 0x3a0b7d8eUL, 0x3e53dbfdUL,
+    0xc0000000UL, 0x3fec8430UL, 0xc6826b34UL, 0xbe27c5c9UL, 0xc0000000UL,
+    0x3fec7563UL, 0x0c706381UL, 0xbe593653UL, 0x60000000UL, 0x3fec669bUL,
+    0x7df34ec7UL, 0x3e461ab5UL, 0xe0000000UL, 0x3fec57d7UL, 0x40e5e7e8UL,
+    0xbe5c3daeUL, 0x00000000UL, 0x3fec4919UL, 0x5602770fUL, 0xbe55219dUL,
+    0xc0000000UL, 0x3fec3a5eUL, 0xec7911ebUL, 0x3e5a5d25UL, 0x60000000UL,
+    0x3fec2ba9UL, 0xb39ea225UL, 0xbe53c00bUL, 0x80000000UL, 0x3fec1cf8UL,
+    0x967a212eUL, 0x3e5a8ddfUL, 0x60000000UL, 0x3fec0e4cUL, 0x580798bdUL,
+    0x3e5f53abUL, 0x00000000UL, 0x3febffa5UL, 0xb8282df6UL, 0xbe46b874UL,
+    0x20000000UL, 0x3febf102UL, 0xe33a6729UL, 0x3e54963fUL, 0x00000000UL,
+    0x3febe264UL, 0x3b53e88aUL, 0xbe3adce1UL, 0x60000000UL, 0x3febd3caUL,
+    0xc2585084UL, 0x3e5cde9fUL, 0x80000000UL, 0x3febc535UL, 0xa335c5eeUL,
+    0xbe39fd9cUL, 0x20000000UL, 0x3febb6a5UL, 0x7325b04dUL, 0x3e42ba15UL,
+    0x60000000UL, 0x3feba819UL, 0x1564540fUL, 0x3e3a9f35UL, 0x40000000UL,
+    0x3feb9992UL, 0x83fff592UL, 0xbe5465ceUL, 0xa0000000UL, 0x3feb8b0fUL,
+    0xb9da63d3UL, 0xbe4b1a0aUL, 0x80000000UL, 0x3feb7c91UL, 0x6d6f1ea4UL,
+    0x3e557657UL, 0x00000000UL, 0x3feb6e18UL, 0x5e80a1bfUL, 0x3e4ddbb6UL,
+    0x00000000UL, 0x3feb5fa3UL, 0x1c9eacb5UL, 0x3e592877UL, 0xa0000000UL,
+    0x3feb5132UL, 0x6d40beb3UL, 0xbe51858cUL, 0xa0000000UL, 0x3feb42c6UL,
+    0xd740c67bUL, 0x3e427ad2UL, 0x40000000UL, 0x3feb345fUL, 0xa3e0cceeUL,
+    0xbe5c2fc4UL, 0x40000000UL, 0x3feb25fcUL, 0x8e752b50UL, 0xbe3da3c2UL,
+    0xc0000000UL, 0x3feb179dUL, 0xa892e7deUL, 0x3e1fb481UL, 0xc0000000UL,
+    0x3feb0943UL, 0x21ed71e9UL, 0xbe365206UL, 0x20000000UL, 0x3feafaeeUL,
+    0x0e1380a3UL, 0x3e5c5b7bUL, 0x20000000UL, 0x3feaec9dUL, 0x3c3d640eUL,
+    0xbe5dbbd0UL, 0x60000000UL, 0x3feade50UL, 0x8f97a715UL, 0x3e3a8ec5UL,
+    0x20000000UL, 0x3fead008UL, 0x23ab2839UL, 0x3e2fe98aUL, 0x40000000UL,
+    0x3feac1c4UL, 0xf4bbd50fUL, 0x3e54d8f6UL, 0xe0000000UL, 0x3feab384UL,
+    0x14757c4dUL, 0xbe48774cUL, 0xc0000000UL, 0x3feaa549UL, 0x7c7b0eeaUL,
+    0x3e5b51bbUL, 0x20000000UL, 0x3fea9713UL, 0xf56f7013UL, 0x3e386200UL,
+    0xe0000000UL, 0x3fea88e0UL, 0xbe428ebeUL, 0xbe514af5UL, 0xe0000000UL,
+    0x3fea7ab2UL, 0x8d0e4496UL, 0x3e4f9165UL, 0x60000000UL, 0x3fea6c89UL,
+    0xdbacc5d5UL, 0xbe5c063bUL, 0x20000000UL, 0x3fea5e64UL, 0x3f19d970UL,
+    0xbe5a0c8cUL, 0x20000000UL, 0x3fea5043UL, 0x09ea3e6bUL, 0x3e5065dcUL,
+    0x80000000UL, 0x3fea4226UL, 0x78df246cUL, 0x3e5e05f6UL, 0x40000000UL,
+    0x3fea340eUL, 0x4057d4a0UL, 0x3e431b2bUL, 0x40000000UL, 0x3fea25faUL,
+    0x82867bb5UL, 0x3e4b76beUL, 0xa0000000UL, 0x3fea17eaUL, 0x9436f40aUL,
+    0xbe5aad39UL, 0x20000000UL, 0x3fea09dfUL, 0x4b5253b3UL, 0x3e46380bUL,
+    0x00000000UL, 0x3fe9fbd8UL, 0x8fc52466UL, 0xbe386f9bUL, 0x20000000UL,
+    0x3fe9edd5UL, 0x22d3f344UL, 0xbe538347UL, 0x60000000UL, 0x3fe9dfd6UL,
+    0x1ac33522UL, 0x3e5dbc53UL, 0x00000000UL, 0x3fe9d1dcUL, 0xeabdff1dUL,
+    0x3e40fc0cUL, 0xe0000000UL, 0x3fe9c3e5UL, 0xafd30e73UL, 0xbe585e63UL,
+    0xe0000000UL, 0x3fe9b5f3UL, 0xa52f226aUL, 0xbe43e8f9UL, 0x20000000UL,
+    0x3fe9a806UL, 0xecb8698dUL, 0xbe515b36UL, 0x80000000UL, 0x3fe99a1cUL,
+    0xf2b4e89dUL, 0x3e48b62bUL, 0x20000000UL, 0x3fe98c37UL, 0x7c9a88fbUL,
+    0x3e44414cUL, 0x00000000UL, 0x3fe97e56UL, 0xda015741UL, 0xbe5d13baUL,
+    0xe0000000UL, 0x3fe97078UL, 0x5fdace06UL, 0x3e51b947UL, 0x00000000UL,
+    0x3fe962a0UL, 0x956ca094UL, 0x3e518785UL, 0x40000000UL, 0x3fe954cbUL,
+    0x01164c1dUL, 0x3e5d5b57UL, 0xc0000000UL, 0x3fe946faUL, 0xe63b3767UL,
+    0xbe4f84e7UL, 0x40000000UL, 0x3fe9392eUL, 0xe57cc2a9UL, 0x3e34eda3UL,
+    0xe0000000UL, 0x3fe92b65UL, 0x8c75b544UL, 0x3e5766a0UL, 0xc0000000UL,
+    0x3fe91da1UL, 0x37d1d087UL, 0xbe5e2ab1UL, 0x80000000UL, 0x3fe90fe1UL,
+    0xa953dc20UL, 0x3e5fa1f3UL, 0x80000000UL, 0x3fe90225UL, 0xdbd3f369UL,
+    0x3e47d6dbUL, 0xa0000000UL, 0x3fe8f46dUL, 0x1c9be989UL, 0xbe5e2b0aUL,
+    0xa0000000UL, 0x3fe8e6b9UL, 0x3c93d76aUL, 0x3e5c8618UL, 0xe0000000UL,
+    0x3fe8d909UL, 0x2182fc9aUL, 0xbe41aa9eUL, 0x20000000UL, 0x3fe8cb5eUL,
+    0xe6b3539dUL, 0xbe530d19UL, 0x60000000UL, 0x3fe8bdb6UL, 0x49e58cc3UL,
+    0xbe3bb374UL, 0xa0000000UL, 0x3fe8b012UL, 0xa7cfeb8fUL, 0x3e56c412UL,
+    0x00000000UL, 0x3fe8a273UL, 0x8d52bc19UL, 0x3e1429b8UL, 0x60000000UL,
+    0x3fe894d7UL, 0x4dc32c6cUL, 0xbe48604cUL, 0xc0000000UL, 0x3fe8873fUL,
+    0x0c868e56UL, 0xbe564ee5UL, 0x00000000UL, 0x3fe879acUL, 0x56aee828UL,
+    0x3e5e2fd8UL, 0x60000000UL, 0x3fe86c1cUL, 0x7ceab8ecUL, 0x3e493365UL,
+    0xc0000000UL, 0x3fe85e90UL, 0x78d4dadcUL, 0xbe4f7f25UL, 0x00000000UL,
+    0x3fe85109UL, 0x0ccd8280UL, 0x3e31e7a2UL, 0x40000000UL, 0x3fe84385UL,
+    0x34ba4e15UL, 0x3e328077UL, 0x80000000UL, 0x3fe83605UL, 0xa670975aUL,
+    0xbe53eee5UL, 0xa0000000UL, 0x3fe82889UL, 0xf61b77b2UL, 0xbe43a20aUL,
+    0xa0000000UL, 0x3fe81b11UL, 0x13e6643bUL, 0x3e5e5fe5UL, 0xc0000000UL,
+    0x3fe80d9dUL, 0x82cc94e8UL, 0xbe5ff1f9UL, 0xa0000000UL, 0x3fe8002dUL,
+    0x8a0c9c5dUL, 0xbe42b0e7UL, 0x60000000UL, 0x3fe7f2c1UL, 0x22a16f01UL,
+    0x3e5d9ea0UL, 0x20000000UL, 0x3fe7e559UL, 0xc38cd451UL, 0x3e506963UL,
+    0xc0000000UL, 0x3fe7d7f4UL, 0x9902bc71UL, 0x3e4503d7UL, 0x40000000UL,
+    0x3fe7ca94UL, 0xdef2a3c0UL, 0x3e3d98edUL, 0xa0000000UL, 0x3fe7bd37UL,
+    0xed49abb0UL, 0x3e24c1ffUL, 0xe0000000UL, 0x3fe7afdeUL, 0xe3b0be70UL,
+    0xbe40c467UL, 0x00000000UL, 0x3fe7a28aUL, 0xaf9f193cUL, 0xbe5dff6cUL,
+    0xe0000000UL, 0x3fe79538UL, 0xb74cf6b6UL, 0xbe258ed0UL, 0xa0000000UL,
+    0x3fe787ebUL, 0x1d9127c7UL, 0x3e345fb0UL, 0x40000000UL, 0x3fe77aa2UL,
+    0x1028c21dUL, 0xbe4619bdUL, 0xa0000000UL, 0x3fe76d5cUL, 0x7cb0b5e4UL,
+    0x3e40f1a2UL, 0xe0000000UL, 0x3fe7601aUL, 0x2b1bc4adUL, 0xbe32e8bbUL,
+    0xe0000000UL, 0x3fe752dcUL, 0x6839f64eUL, 0x3e41f57bUL, 0xc0000000UL,
+    0x3fe745a2UL, 0xc4121f7eUL, 0xbe52c40aUL, 0x60000000UL, 0x3fe7386cUL,
+    0xd6852d72UL, 0xbe5c4e6bUL, 0xc0000000UL, 0x3fe72b39UL, 0x91d690f7UL,
+    0xbe57f88fUL, 0xe0000000UL, 0x3fe71e0aUL, 0x627a2159UL, 0xbe4425d5UL,
+    0xc0000000UL, 0x3fe710dfUL, 0x50a54033UL, 0x3e422b7eUL, 0x60000000UL,
+    0x3fe703b8UL, 0x3b0b5f91UL, 0x3e5d3857UL, 0xe0000000UL, 0x3fe6f694UL,
+    0x84d628a2UL, 0xbe51f090UL, 0x00000000UL, 0x3fe6e975UL, 0x306d8894UL,
+    0xbe414d83UL, 0xe0000000UL, 0x3fe6dc58UL, 0x30bf24aaUL, 0xbe4650caUL,
+    0x80000000UL, 0x3fe6cf40UL, 0xd4628d69UL, 0xbe5db007UL, 0xc0000000UL,
+    0x3fe6c22bUL, 0xa2aae57bUL, 0xbe31d279UL, 0xc0000000UL, 0x3fe6b51aUL,
+    0x860edf7eUL, 0xbe2d4c4aUL, 0x80000000UL, 0x3fe6a80dUL, 0xf3559341UL,
+    0xbe5f7e98UL, 0xe0000000UL, 0x3fe69b03UL, 0xa885899eUL, 0xbe5c2011UL,
+    0xe0000000UL, 0x3fe68dfdUL, 0x2bdc6d37UL, 0x3e224a82UL, 0xa0000000UL,
+    0x3fe680fbUL, 0xc12ad1b9UL, 0xbe40cf56UL, 0x00000000UL, 0x3fe673fdUL,
+    0x1bcdf659UL, 0xbdf52f2dUL, 0x00000000UL, 0x3fe66702UL, 0x5df10408UL,
+    0x3e5663e0UL, 0xc0000000UL, 0x3fe65a0aUL, 0xa4070568UL, 0xbe40b12fUL,
+    0x00000000UL, 0x3fe64d17UL, 0x71c54c47UL, 0x3e5f5e8bUL, 0x00000000UL,
+    0x3fe64027UL, 0xbd4b7e83UL, 0x3e42ead6UL, 0xa0000000UL, 0x3fe6333aUL,
+    0x61598bd2UL, 0xbe4c48d4UL, 0xc0000000UL, 0x3fe62651UL, 0x6f538d61UL,
+    0x3e548401UL, 0xa0000000UL, 0x3fe6196cUL, 0x14344120UL, 0xbe529af6UL,
+    0x00000000UL, 0x3fe60c8bUL, 0x5982c587UL, 0xbe3e1e4fUL, 0x00000000UL,
+    0x3fe5ffadUL, 0xfe51d4eaUL, 0xbe4c897aUL, 0x80000000UL, 0x3fe5f2d2UL,
+    0xfd46ebe1UL, 0x3e552e00UL, 0xa0000000UL, 0x3fe5e5fbUL, 0xa4695699UL,
+    0x3e5ed471UL, 0x60000000UL, 0x3fe5d928UL, 0x80d118aeUL, 0x3e456b61UL,
+    0xa0000000UL, 0x3fe5cc58UL, 0x304c330bUL, 0x3e54dc29UL, 0x80000000UL,
+    0x3fe5bf8cUL, 0x0af2dedfUL, 0xbe3aa9bdUL, 0xe0000000UL, 0x3fe5b2c3UL,
+    0x15fc9258UL, 0xbe479a37UL, 0xc0000000UL, 0x3fe5a5feUL, 0x9292c7eaUL,
+    0x3e188650UL, 0x20000000UL, 0x3fe5993dUL, 0x33b4d380UL, 0x3e5d6d93UL,
+    0x20000000UL, 0x3fe58c7fUL, 0x02fd16c7UL, 0x3e2fe961UL, 0xa0000000UL,
+    0x3fe57fc4UL, 0x4a05edb6UL, 0xbe4d55b4UL, 0xa0000000UL, 0x3fe5730dUL,
+    0x3d443abbUL, 0xbe5e6954UL, 0x00000000UL, 0x3fe5665aUL, 0x024acfeaUL,
+    0x3e50e61bUL, 0x00000000UL, 0x3fe559aaUL, 0xcc9edd09UL, 0xbe325403UL,
+    0x60000000UL, 0x3fe54cfdUL, 0x1fe26950UL, 0x3e5d500eUL, 0x60000000UL,
+    0x3fe54054UL, 0x6c5ae164UL, 0xbe4a79b4UL, 0xc0000000UL, 0x3fe533aeUL,
+    0x154b0287UL, 0xbe401571UL, 0xa0000000UL, 0x3fe5270cUL, 0x0673f401UL,
+    0xbe56e56bUL, 0xe0000000UL, 0x3fe51a6dUL, 0x751b639cUL, 0x3e235269UL,
+    0xa0000000UL, 0x3fe50dd2UL, 0x7c7b2bedUL, 0x3ddec887UL, 0xc0000000UL,
+    0x3fe5013aUL, 0xafab4e17UL, 0x3e5e7575UL, 0x60000000UL, 0x3fe4f4a6UL,
+    0x2e308668UL, 0x3e59aed6UL, 0x80000000UL, 0x3fe4e815UL, 0xf33e2a76UL,
+    0xbe51f184UL, 0xe0000000UL, 0x3fe4db87UL, 0x839f3e3eUL, 0x3e57db01UL,
+    0xc0000000UL, 0x3fe4cefdUL, 0xa9eda7bbUL, 0x3e535e0fUL, 0x00000000UL,
+    0x3fe4c277UL, 0x2a8f66a5UL, 0x3e5ce451UL, 0xc0000000UL, 0x3fe4b5f3UL,
+    0x05192456UL, 0xbe4e8518UL, 0xc0000000UL, 0x3fe4a973UL, 0x4aa7cd1dUL,
+    0x3e46784aUL, 0x40000000UL, 0x3fe49cf7UL, 0x8e23025eUL, 0xbe5749f2UL,
+    0x00000000UL, 0x3fe4907eUL, 0x18d30215UL, 0x3e360f39UL, 0x20000000UL,
+    0x3fe48408UL, 0x63dcf2f3UL, 0x3e5e00feUL, 0xc0000000UL, 0x3fe47795UL,
+    0x46182d09UL, 0xbe5173d9UL, 0xa0000000UL, 0x3fe46b26UL, 0x8f0e62aaUL,
+    0xbe48f281UL, 0xe0000000UL, 0x3fe45ebaUL, 0x5775c40cUL, 0xbe56aad4UL,
+    0x60000000UL, 0x3fe45252UL, 0x0fe25f69UL, 0x3e48bd71UL, 0x40000000UL,
+    0x3fe445edUL, 0xe9989ec5UL, 0x3e590d97UL, 0x80000000UL, 0x3fe4398bUL,
+    0xb3d9ffe3UL, 0x3e479dbcUL, 0x20000000UL, 0x3fe42d2dUL, 0x388e4d2eUL,
+    0xbe5eed80UL, 0xe0000000UL, 0x3fe420d1UL, 0x6f797c18UL, 0x3e554b4cUL,
+    0x20000000UL, 0x3fe4147aUL, 0x31048bb4UL, 0xbe5b1112UL, 0x80000000UL,
+    0x3fe40825UL, 0x2efba4f9UL, 0x3e48ebc7UL, 0x40000000UL, 0x3fe3fbd4UL,
+    0x50201119UL, 0x3e40b701UL, 0x40000000UL, 0x3fe3ef86UL, 0x0a4db32cUL,
+    0x3e551de8UL, 0xa0000000UL, 0x3fe3e33bUL, 0x0c9c148bUL, 0xbe50c1f6UL,
+    0x20000000UL, 0x3fe3d6f4UL, 0xc9129447UL, 0x3e533fa0UL, 0x00000000UL,
+    0x3fe3cab0UL, 0xaae5b5a0UL, 0xbe22b68eUL, 0x20000000UL, 0x3fe3be6fUL,
+    0x02305e8aUL, 0xbe54fc08UL, 0x60000000UL, 0x3fe3b231UL, 0x7f908258UL,
+    0x3e57dc05UL, 0x00000000UL, 0x3fe3a5f7UL, 0x1a09af78UL, 0x3e08038bUL,
+    0xe0000000UL, 0x3fe399bfUL, 0x490643c1UL, 0xbe5dbe42UL, 0xe0000000UL,
+    0x3fe38d8bUL, 0x5e8ad724UL, 0xbe3c2b72UL, 0x20000000UL, 0x3fe3815bUL,
+    0xc67196b6UL, 0x3e1713cfUL, 0xa0000000UL, 0x3fe3752dUL, 0x6182e429UL,
+    0xbe3ec14cUL, 0x40000000UL, 0x3fe36903UL, 0xab6eb1aeUL, 0x3e5a2cc5UL,
+    0x40000000UL, 0x3fe35cdcUL, 0xfe5dc064UL, 0xbe5c5878UL, 0x40000000UL,
+    0x3fe350b8UL, 0x0ba6b9e4UL, 0x3e51619bUL, 0x80000000UL, 0x3fe34497UL,
+    0x857761aaUL, 0x3e5fff53UL, 0x00000000UL, 0x3fe3387aUL, 0xf872d68cUL,
+    0x3e484f4dUL, 0xa0000000UL, 0x3fe32c5fUL, 0x087e97c2UL, 0x3e52842eUL,
+    0x80000000UL, 0x3fe32048UL, 0x73d6d0c0UL, 0xbe503edfUL, 0x80000000UL,
+    0x3fe31434UL, 0x0c1456a1UL, 0xbe5f72adUL, 0xa0000000UL, 0x3fe30823UL,
+    0x83a1a4d5UL, 0xbe5e65ccUL, 0xe0000000UL, 0x3fe2fc15UL, 0x855a7390UL,
+    0xbe506438UL, 0x40000000UL, 0x3fe2f00bUL, 0xa2898287UL, 0x3e3d22a2UL,
+    0xe0000000UL, 0x3fe2e403UL, 0x8b56f66fUL, 0xbe5aa5fdUL, 0x80000000UL,
+    0x3fe2d7ffUL, 0x52db119aUL, 0x3e3a2e3dUL, 0x60000000UL, 0x3fe2cbfeUL,
+    0xe2ddd4c0UL, 0xbe586469UL, 0x40000000UL, 0x3fe2c000UL, 0x6b01bf10UL,
+    0x3e352b9dUL, 0x40000000UL, 0x3fe2b405UL, 0xb07a1cdfUL, 0x3e5c5cdaUL,
+    0x80000000UL, 0x3fe2a80dUL, 0xc7b5f868UL, 0xbe5668b3UL, 0xc0000000UL,
+    0x3fe29c18UL, 0x185edf62UL, 0xbe563d66UL, 0x00000000UL, 0x3fe29027UL,
+    0xf729e1ccUL, 0x3e59a9a0UL, 0x80000000UL, 0x3fe28438UL, 0x6433c727UL,
+    0xbe43cc89UL, 0x00000000UL, 0x3fe2784dUL, 0x41782631UL, 0xbe30750cUL,
+    0xa0000000UL, 0x3fe26c64UL, 0x914911b7UL, 0xbe58290eUL, 0x40000000UL,
+    0x3fe2607fUL, 0x3dcc73e1UL, 0xbe4269cdUL, 0x00000000UL, 0x3fe2549dUL,
+    0x2751bf70UL, 0xbe5a6998UL, 0xc0000000UL, 0x3fe248bdUL, 0x4248b9fbUL,
+    0xbe4ddb00UL, 0x80000000UL, 0x3fe23ce1UL, 0xf35cf82fUL, 0x3e561b71UL,
+    0x60000000UL, 0x3fe23108UL, 0x8e481a2dUL, 0x3e518fb9UL, 0x60000000UL,
+    0x3fe22532UL, 0x5ab96edcUL, 0xbe5fafc5UL, 0x40000000UL, 0x3fe2195fUL,
+    0x80943911UL, 0xbe07f819UL, 0x40000000UL, 0x3fe20d8fUL, 0x386f2d6cUL,
+    0xbe54ba8bUL, 0x40000000UL, 0x3fe201c2UL, 0xf29664acUL, 0xbe5eb815UL,
+    0x20000000UL, 0x3fe1f5f8UL, 0x64f03390UL, 0x3e5e320cUL, 0x20000000UL,
+    0x3fe1ea31UL, 0x747ff696UL, 0x3e5ef0a5UL, 0x40000000UL, 0x3fe1de6dUL,
+    0x3e9ceb51UL, 0xbe5f8d27UL, 0x20000000UL, 0x3fe1d2acUL, 0x4ae0b55eUL,
+    0x3e5faa21UL, 0x20000000UL, 0x3fe1c6eeUL, 0x28569a5eUL, 0x3e598a4fUL,
+    0x20000000UL, 0x3fe1bb33UL, 0x54b33e07UL, 0x3e46130aUL, 0x20000000UL,
+    0x3fe1af7bUL, 0x024f1078UL, 0xbe4dbf93UL, 0x00000000UL, 0x3fe1a3c6UL,
+    0xb0783bfaUL, 0x3e419248UL, 0xe0000000UL, 0x3fe19813UL, 0x2f02b836UL,
+    0x3e4e02b7UL, 0xc0000000UL, 0x3fe18c64UL, 0x28dec9d4UL, 0x3e09064fUL,
+    0x80000000UL, 0x3fe180b8UL, 0x45cbf406UL, 0x3e5b1f46UL, 0x40000000UL,
+    0x3fe1750fUL, 0x03d9964cUL, 0x3e5b0a79UL, 0x00000000UL, 0x3fe16969UL,
+    0x8b5b882bUL, 0xbe238086UL, 0xa0000000UL, 0x3fe15dc5UL, 0x73bad6f8UL,
+    0xbdf1fca4UL, 0x20000000UL, 0x3fe15225UL, 0x5385769cUL, 0x3e5e8d76UL,
+    0xa0000000UL, 0x3fe14687UL, 0x1676dc6bUL, 0x3e571d08UL, 0x20000000UL,
+    0x3fe13aedUL, 0xa8c41c7fUL, 0xbe598a25UL, 0x60000000UL, 0x3fe12f55UL,
+    0xc4e1aaf0UL, 0x3e435277UL, 0xa0000000UL, 0x3fe123c0UL, 0x403638e1UL,
+    0xbe21aa7cUL, 0xc0000000UL, 0x3fe1182eUL, 0x557a092bUL, 0xbdd0116bUL,
+    0xc0000000UL, 0x3fe10c9fUL, 0x7d779f66UL, 0x3e4a61baUL, 0xc0000000UL,
+    0x3fe10113UL, 0x2b09c645UL, 0xbe5d586eUL, 0x20000000UL, 0x3fe0ea04UL,
+    0xea2cad46UL, 0x3e5aa97cUL, 0x20000000UL, 0x3fe0d300UL, 0x23190e54UL,
+    0x3e50f1a7UL, 0xa0000000UL, 0x3fe0bc07UL, 0x1379a5a6UL, 0xbe51619dUL,
+    0x60000000UL, 0x3fe0a51aUL, 0x926a3d4aUL, 0x3e5cf019UL, 0xa0000000UL,
+    0x3fe08e38UL, 0xa8c24358UL, 0x3e35241eUL, 0x20000000UL, 0x3fe07762UL,
+    0x24317e7aUL, 0x3e512cfaUL, 0x00000000UL, 0x3fe06097UL, 0xfd9cf274UL,
+    0xbe55bef3UL, 0x00000000UL, 0x3fe049d7UL, 0x3689b49dUL, 0xbe36d26dUL,
+    0x40000000UL, 0x3fe03322UL, 0xf72ef6c4UL, 0xbe54cd08UL, 0xa0000000UL,
+    0x3fe01c78UL, 0x23702d2dUL, 0xbe5900bfUL, 0x00000000UL, 0x3fe005daUL,
+    0x3f59c14cUL, 0x3e57d80bUL, 0x40000000UL, 0x3fdfde8dUL, 0xad67766dUL,
+    0xbe57fad4UL, 0x40000000UL, 0x3fdfb17cUL, 0x644f4ae7UL, 0x3e1ee43bUL,
+    0x40000000UL, 0x3fdf8481UL, 0x903234d2UL, 0x3e501a86UL, 0x40000000UL,
+    0x3fdf579cUL, 0xafe9e509UL, 0xbe267c3eUL, 0x00000000UL, 0x3fdf2acdUL,
+    0xb7dfda0bUL, 0xbe48149bUL, 0x40000000UL, 0x3fdefe13UL, 0x3b94305eUL,
+    0x3e5f4ea7UL, 0x80000000UL, 0x3fded16fUL, 0x5d95da61UL, 0xbe55c198UL,
+    0x00000000UL, 0x3fdea4e1UL, 0x406960c9UL, 0xbdd99a19UL, 0x00000000UL,
+    0x3fde7868UL, 0xd22f3539UL, 0x3e470c78UL, 0x80000000UL, 0x3fde4c04UL,
+    0x83eec535UL, 0xbe3e1232UL, 0x40000000UL, 0x3fde1fb6UL, 0x3dfbffcbUL,
+    0xbe4b7d71UL, 0x40000000UL, 0x3fddf37dUL, 0x7e1be4e0UL, 0xbe5b8f8fUL,
+    0x40000000UL, 0x3fddc759UL, 0x46dae887UL, 0xbe350458UL, 0x80000000UL,
+    0x3fdd9b4aUL, 0xed6ecc49UL, 0xbe5f0045UL, 0x80000000UL, 0x3fdd6f50UL,
+    0x2e9e883cUL, 0x3e2915daUL, 0x80000000UL, 0x3fdd436bUL, 0xf0bccb32UL,
+    0x3e4a68c9UL, 0x80000000UL, 0x3fdd179bUL, 0x9bbfc779UL, 0xbe54a26aUL,
+    0x00000000UL, 0x3fdcebe0UL, 0x7cea33abUL, 0x3e43c6b7UL, 0x40000000UL,
+    0x3fdcc039UL, 0xe740fd06UL, 0x3e5526c2UL, 0x40000000UL, 0x3fdc94a7UL,
+    0x9eadeb1aUL, 0xbe396d8dUL, 0xc0000000UL, 0x3fdc6929UL, 0xf0a8f95aUL,
+    0xbe5c0ab2UL, 0x80000000UL, 0x3fdc3dc0UL, 0x6ee2693bUL, 0x3e0992e6UL,
+    0xc0000000UL, 0x3fdc126bUL, 0x5ac6b581UL, 0xbe2834b6UL, 0x40000000UL,
+    0x3fdbe72bUL, 0x8cc226ffUL, 0x3e3596a6UL, 0x00000000UL, 0x3fdbbbffUL,
+    0xf92a74bbUL, 0x3e3c5813UL, 0x00000000UL, 0x3fdb90e7UL, 0x479664c0UL,
+    0xbe50d644UL, 0x00000000UL, 0x3fdb65e3UL, 0x5004975bUL, 0xbe55258fUL,
+    0x00000000UL, 0x3fdb3af3UL, 0xe4b23194UL, 0xbe588407UL, 0xc0000000UL,
+    0x3fdb1016UL, 0xe65d4d0aUL, 0x3e527c26UL, 0x80000000UL, 0x3fdae54eUL,
+    0x814fddd6UL, 0x3e5962a2UL, 0x40000000UL, 0x3fdaba9aUL, 0xe19d0913UL,
+    0xbe562f4eUL, 0x80000000UL, 0x3fda8ff9UL, 0x43cfd006UL, 0xbe4cfdebUL,
+    0x40000000UL, 0x3fda656cUL, 0x686f0a4eUL, 0x3e5e47a8UL, 0xc0000000UL,
+    0x3fda3af2UL, 0x7200d410UL, 0x3e5e1199UL, 0xc0000000UL, 0x3fda108cUL,
+    0xabd2266eUL, 0x3e5ee4d1UL, 0x40000000UL, 0x3fd9e63aUL, 0x396f8f2cUL,
+    0x3e4dbffbUL, 0x00000000UL, 0x3fd9bbfbUL, 0xe32b25ddUL, 0x3e5c3a54UL,
+    0x40000000UL, 0x3fd991cfUL, 0x431e4035UL, 0xbe457925UL, 0x80000000UL,
+    0x3fd967b6UL, 0x7bed3dd3UL, 0x3e40c61dUL, 0x00000000UL, 0x3fd93db1UL,
+    0xd7449365UL, 0x3e306419UL, 0x80000000UL, 0x3fd913beUL, 0x1746e791UL,
+    0x3e56fcfcUL, 0x40000000UL, 0x3fd8e9dfUL, 0xf3a9028bUL, 0xbe5041b9UL,
+    0xc0000000UL, 0x3fd8c012UL, 0x56840c50UL, 0xbe26e20aUL, 0x40000000UL,
+    0x3fd89659UL, 0x19763102UL, 0xbe51f466UL, 0x80000000UL, 0x3fd86cb2UL,
+    0x7032de7cUL, 0xbe4d298aUL, 0x80000000UL, 0x3fd8431eUL, 0xdeb39fabUL,
+    0xbe4361ebUL, 0x40000000UL, 0x3fd8199dUL, 0x5d01cbe0UL, 0xbe5425b3UL,
+    0x80000000UL, 0x3fd7f02eUL, 0x3ce99aa9UL, 0x3e146fa8UL, 0x80000000UL,
+    0x3fd7c6d2UL, 0xd1a262b9UL, 0xbe5a1a69UL, 0xc0000000UL, 0x3fd79d88UL,
+    0x8606c236UL, 0x3e423a08UL, 0x80000000UL, 0x3fd77451UL, 0x8fd1e1b7UL,
+    0x3e5a6a63UL, 0xc0000000UL, 0x3fd74b2cUL, 0xe491456aUL, 0x3e42c1caUL,
+    0x40000000UL, 0x3fd7221aUL, 0x4499a6d7UL, 0x3e36a69aUL, 0x00000000UL,
+    0x3fd6f91aUL, 0x5237df94UL, 0xbe0f8f02UL, 0x00000000UL, 0x3fd6d02cUL,
+    0xb6482c6eUL, 0xbe5abcf7UL, 0x00000000UL, 0x3fd6a750UL, 0x1919fd61UL,
+    0xbe57ade2UL, 0x00000000UL, 0x3fd67e86UL, 0xaa7a994dUL, 0xbe3f3fbdUL,
+    0x00000000UL, 0x3fd655ceUL, 0x67db014cUL, 0x3e33c550UL, 0x00000000UL,
+    0x3fd62d28UL, 0xa82856b7UL, 0xbe1409d1UL, 0xc0000000UL, 0x3fd60493UL,
+    0x1e6a300dUL, 0x3e55d899UL, 0x80000000UL, 0x3fd5dc11UL, 0x1222bd5cUL,
+    0xbe35bfc0UL, 0xc0000000UL, 0x3fd5b3a0UL, 0x6e8dc2d3UL, 0x3e5d4d79UL,
+    0x00000000UL, 0x3fd58b42UL, 0xe0e4ace6UL, 0xbe517303UL, 0x80000000UL,
+    0x3fd562f4UL, 0xb306e0a8UL, 0x3e5edf0fUL, 0xc0000000UL, 0x3fd53ab8UL,
+    0x6574bc54UL, 0x3e5ee859UL, 0x80000000UL, 0x3fd5128eUL, 0xea902207UL,
+    0x3e5f6188UL, 0xc0000000UL, 0x3fd4ea75UL, 0x9f911d79UL, 0x3e511735UL,
+    0x80000000UL, 0x3fd4c26eUL, 0xf9c77397UL, 0xbe5b1643UL, 0x40000000UL,
+    0x3fd49a78UL, 0x15fc9258UL, 0x3e479a37UL, 0x80000000UL, 0x3fd47293UL,
+    0xd5a04dd9UL, 0xbe426e56UL, 0xc0000000UL, 0x3fd44abfUL, 0xe04042f5UL,
+    0x3e56f7c6UL, 0x40000000UL, 0x3fd422fdUL, 0x1d8bf2c8UL, 0x3e5d8810UL,
+    0x00000000UL, 0x3fd3fb4cUL, 0x88a8ddeeUL, 0xbe311454UL, 0xc0000000UL,
+    0x3fd3d3abUL, 0x3e3b5e47UL, 0xbe5d1b72UL, 0x40000000UL, 0x3fd3ac1cUL,
+    0xc2ab5d59UL, 0x3e31b02bUL, 0xc0000000UL, 0x3fd3849dUL, 0xd4e34b9eUL,
+    0x3e51cb2fUL, 0x40000000UL, 0x3fd35d30UL, 0x177204fbUL, 0xbe2b8cd7UL,
+    0x80000000UL, 0x3fd335d3UL, 0xfcd38c82UL, 0xbe4356e1UL, 0x80000000UL,
+    0x3fd30e87UL, 0x64f54accUL, 0xbe4e6224UL, 0x00000000UL, 0x3fd2e74cUL,
+    0xaa7975d9UL, 0x3e5dc0feUL, 0x80000000UL, 0x3fd2c021UL, 0x516dab3fUL,
+    0xbe50ffa3UL, 0x40000000UL, 0x3fd29907UL, 0x2bfb7313UL, 0x3e5674a2UL,
+    0xc0000000UL, 0x3fd271fdUL, 0x0549fc99UL, 0x3e385d29UL, 0xc0000000UL,
+    0x3fd24b04UL, 0x55b63073UL, 0xbe500c6dUL, 0x00000000UL, 0x3fd2241cUL,
+    0x3f91953aUL, 0x3e389977UL, 0xc0000000UL, 0x3fd1fd43UL, 0xa1543f71UL,
+    0xbe3487abUL, 0xc0000000UL, 0x3fd1d67bUL, 0x4ec8867cUL, 0x3df6a2dcUL,
+    0x00000000UL, 0x3fd1afc4UL, 0x4328e3bbUL, 0x3e41d9c0UL, 0x80000000UL,
+    0x3fd1891cUL, 0x2e1cda84UL, 0x3e3bdd87UL, 0x40000000UL, 0x3fd16285UL,
+    0x4b5331aeUL, 0xbe53128eUL, 0x00000000UL, 0x3fd13bfeUL, 0xb9aec164UL,
+    0xbe52ac98UL, 0xc0000000UL, 0x3fd11586UL, 0xd91e1316UL, 0xbe350630UL,
+    0x80000000UL, 0x3fd0ef1fUL, 0x7cacc12cUL, 0x3e3f5219UL, 0x40000000UL,
+    0x3fd0c8c8UL, 0xbce277b7UL, 0x3e3d30c0UL, 0x00000000UL, 0x3fd0a281UL,
+    0x2a63447dUL, 0xbe541377UL, 0x80000000UL, 0x3fd07c49UL, 0xfac483b5UL,
+    0xbe5772ecUL, 0xc0000000UL, 0x3fd05621UL, 0x36b8a570UL, 0xbe4fd4bdUL,
+    0xc0000000UL, 0x3fd03009UL, 0xbae505f7UL, 0xbe450388UL, 0x80000000UL,
+    0x3fd00a01UL, 0x3e35aeadUL, 0xbe5430fcUL, 0x80000000UL, 0x3fcfc811UL,
+    0x707475acUL, 0x3e38806eUL, 0x80000000UL, 0x3fcf7c3fUL, 0xc91817fcUL,
+    0xbe40cceaUL, 0x80000000UL, 0x3fcf308cUL, 0xae05d5e9UL, 0xbe4919b8UL,
+    0x80000000UL, 0x3fcee4f8UL, 0xae6cc9e6UL, 0xbe530b94UL, 0x00000000UL,
+    0x3fce9983UL, 0x1efe3e8eUL, 0x3e57747eUL, 0x00000000UL, 0x3fce4e2dUL,
+    0xda78d9bfUL, 0xbe59a608UL, 0x00000000UL, 0x3fce02f5UL, 0x8abe2c2eUL,
+    0x3e4a35adUL, 0x00000000UL, 0x3fcdb7dcUL, 0x1495450dUL, 0xbe0872ccUL,
+    0x80000000UL, 0x3fcd6ce1UL, 0x86ee0ba0UL, 0xbe4f59a0UL, 0x00000000UL,
+    0x3fcd2205UL, 0xe81ca888UL, 0x3e5402c3UL, 0x00000000UL, 0x3fccd747UL,
+    0x3b4424b9UL, 0x3e5dfdc3UL, 0x80000000UL, 0x3fcc8ca7UL, 0xd305b56cUL,
+    0x3e202da6UL, 0x00000000UL, 0x3fcc4226UL, 0x399a6910UL, 0xbe482a1cUL,
+    0x80000000UL, 0x3fcbf7c2UL, 0x747f7938UL, 0xbe587372UL, 0x80000000UL,
+    0x3fcbad7cUL, 0x6fc246a0UL, 0x3e50d83dUL, 0x00000000UL, 0x3fcb6355UL,
+    0xee9e9be5UL, 0xbe5c35bdUL, 0x80000000UL, 0x3fcb194aUL, 0x8416c0bcUL,
+    0x3e546d4fUL, 0x00000000UL, 0x3fcacf5eUL, 0x49f7f08fUL, 0x3e56da76UL,
+    0x00000000UL, 0x3fca858fUL, 0x5dc30de2UL, 0x3e5f390cUL, 0x00000000UL,
+    0x3fca3bdeUL, 0x950583b6UL, 0xbe5e4169UL, 0x80000000UL, 0x3fc9f249UL,
+    0x33631553UL, 0x3e52aeb1UL, 0x00000000UL, 0x3fc9a8d3UL, 0xde8795a6UL,
+    0xbe59a504UL, 0x00000000UL, 0x3fc95f79UL, 0x076bf41eUL, 0x3e5122feUL,
+    0x80000000UL, 0x3fc9163cUL, 0x2914c8e7UL, 0x3e3dd064UL, 0x00000000UL,
+    0x3fc8cd1dUL, 0x3a30eca3UL, 0xbe21b4aaUL, 0x80000000UL, 0x3fc8841aUL,
+    0xb2a96650UL, 0xbe575444UL, 0x80000000UL, 0x3fc83b34UL, 0x2376c0cbUL,
+    0xbe2a74c7UL, 0x80000000UL, 0x3fc7f26bUL, 0xd8a0b653UL, 0xbe5181b6UL,
+    0x00000000UL, 0x3fc7a9bfUL, 0x32257882UL, 0xbe4a78b4UL, 0x00000000UL,
+    0x3fc7612fUL, 0x1eee8bd9UL, 0xbe1bfe9dUL, 0x80000000UL, 0x3fc718bbUL,
+    0x0c603cc4UL, 0x3e36fdc9UL, 0x80000000UL, 0x3fc6d064UL, 0x3728b8cfUL,
+    0xbe1e542eUL, 0x80000000UL, 0x3fc68829UL, 0xc79a4067UL, 0x3e5c380fUL,
+    0x00000000UL, 0x3fc6400bUL, 0xf69eac69UL, 0x3e550a84UL, 0x80000000UL,
+    0x3fc5f808UL, 0xb7a780a4UL, 0x3e5d9224UL, 0x80000000UL, 0x3fc5b022UL,
+    0xad9dfb1eUL, 0xbe55242fUL, 0x00000000UL, 0x3fc56858UL, 0x659b18beUL,
+    0xbe4bfda3UL, 0x80000000UL, 0x3fc520a9UL, 0x66ee3631UL, 0xbe57d769UL,
+    0x80000000UL, 0x3fc4d916UL, 0x1ec62819UL, 0x3e2427f7UL, 0x80000000UL,
+    0x3fc4919fUL, 0xdec25369UL, 0xbe435431UL, 0x00000000UL, 0x3fc44a44UL,
+    0xa8acfc4bUL, 0xbe3c62e8UL, 0x00000000UL, 0x3fc40304UL, 0xcf1d3eabUL,
+    0xbdfba29fUL, 0x80000000UL, 0x3fc3bbdfUL, 0x79aba3eaUL, 0xbdf1b7c8UL,
+    0x80000000UL, 0x3fc374d6UL, 0xb8d186daUL, 0xbe5130cfUL, 0x80000000UL,
+    0x3fc32de8UL, 0x9d74f152UL, 0x3e2285b6UL, 0x00000000UL, 0x3fc2e716UL,
+    0x50ae7ca9UL, 0xbe503920UL, 0x80000000UL, 0x3fc2a05eUL, 0x6caed92eUL,
+    0xbe533924UL, 0x00000000UL, 0x3fc259c2UL, 0x9cb5034eUL, 0xbe510e31UL,
+    0x80000000UL, 0x3fc21340UL, 0x12c4d378UL, 0xbe540b43UL, 0x80000000UL,
+    0x3fc1ccd9UL, 0xcc418706UL, 0x3e59887aUL, 0x00000000UL, 0x3fc1868eUL,
+    0x921f4106UL, 0xbe528e67UL, 0x80000000UL, 0x3fc1405cUL, 0x3969441eUL,
+    0x3e5d8051UL, 0x00000000UL, 0x3fc0fa46UL, 0xd941ef5bUL, 0x3e5f9079UL,
+    0x80000000UL, 0x3fc0b44aUL, 0x5a3e81b2UL, 0xbe567691UL, 0x00000000UL,
+    0x3fc06e69UL, 0x9d66afe7UL, 0xbe4d43fbUL, 0x00000000UL, 0x3fc028a2UL,
+    0x0a92a162UL, 0xbe52f394UL, 0x00000000UL, 0x3fbfc5eaUL, 0x209897e5UL,
+    0x3e529e37UL, 0x00000000UL, 0x3fbf3ac5UL, 0x8458bd7bUL, 0x3e582831UL,
+    0x00000000UL, 0x3fbeafd5UL, 0xb8d8b4b8UL, 0xbe486b4aUL, 0x00000000UL,
+    0x3fbe2518UL, 0xe0a3b7b6UL, 0x3e5bafd2UL, 0x00000000UL, 0x3fbd9a90UL,
+    0x2bf2710eUL, 0x3e383b2bUL, 0x00000000UL, 0x3fbd103cUL, 0x73eb6ab7UL,
+    0xbe56d78dUL, 0x00000000UL, 0x3fbc861bUL, 0x32ceaff5UL, 0xbe32dc5aUL,
+    0x00000000UL, 0x3fbbfc2eUL, 0xbee04cb7UL, 0xbe4a71a4UL, 0x00000000UL,
+    0x3fbb7274UL, 0x35ae9577UL, 0x3e38142fUL, 0x00000000UL, 0x3fbae8eeUL,
+    0xcbaddab4UL, 0xbe5490f0UL, 0x00000000UL, 0x3fba5f9aUL, 0x95ce1114UL,
+    0x3e597c71UL, 0x00000000UL, 0x3fb9d67aUL, 0x6d7c0f78UL, 0x3e3abc2dUL,
+    0x00000000UL, 0x3fb94d8dUL, 0x2841a782UL, 0xbe566cbcUL, 0x00000000UL,
+    0x3fb8c4d2UL, 0x6ed429c6UL, 0xbe3cfff9UL, 0x00000000UL, 0x3fb83c4aUL,
+    0xe4a49fbbUL, 0xbe552964UL, 0x00000000UL, 0x3fb7b3f4UL, 0x2193d81eUL,
+    0xbe42fa72UL, 0x00000000UL, 0x3fb72bd0UL, 0xdd70c122UL, 0x3e527a8cUL,
+    0x00000000UL, 0x3fb6a3dfUL, 0x03108a54UL, 0xbe450393UL, 0x00000000UL,
+    0x3fb61c1fUL, 0x30ff7954UL, 0x3e565840UL, 0x00000000UL, 0x3fb59492UL,
+    0xdedd460cUL, 0xbe5422b5UL, 0x00000000UL, 0x3fb50d36UL, 0x950f9f45UL,
+    0xbe5313f6UL, 0x00000000UL, 0x3fb4860bUL, 0x582cdcb1UL, 0x3e506d39UL,
+    0x00000000UL, 0x3fb3ff12UL, 0x7216d3a6UL, 0x3e4aa719UL, 0x00000000UL,
+    0x3fb3784aUL, 0x57a423fdUL, 0x3e5a9b9fUL, 0x00000000UL, 0x3fb2f1b4UL,
+    0x7a138b41UL, 0xbe50b418UL, 0x00000000UL, 0x3fb26b4eUL, 0x2fbfd7eaUL,
+    0x3e23a53eUL, 0x00000000UL, 0x3fb1e519UL, 0x18913ccbUL, 0x3e465fc1UL,
+    0x00000000UL, 0x3fb15f15UL, 0x7ea24e21UL, 0x3e042843UL, 0x00000000UL,
+    0x3fb0d941UL, 0x7c6d9c77UL, 0x3e59f61eUL, 0x00000000UL, 0x3fb0539eUL,
+    0x114efd44UL, 0x3e4ccab7UL, 0x00000000UL, 0x3faf9c56UL, 0x1777f657UL,
+    0x3e552f65UL, 0x00000000UL, 0x3fae91d2UL, 0xc317b86aUL, 0xbe5a61e0UL,
+    0x00000000UL, 0x3fad87acUL, 0xb7664efbUL, 0xbe41f64eUL, 0x00000000UL,
+    0x3fac7de6UL, 0x5d3d03a9UL, 0x3e0807a0UL, 0x00000000UL, 0x3fab7480UL,
+    0x743c38ebUL, 0xbe3726e1UL, 0x00000000UL, 0x3faa6b78UL, 0x06a253f1UL,
+    0x3e5ad636UL, 0x00000000UL, 0x3fa962d0UL, 0xa35f541bUL, 0x3e5a187aUL,
+    0x00000000UL, 0x3fa85a88UL, 0x4b86e446UL, 0xbe508150UL, 0x00000000UL,
+    0x3fa7529cUL, 0x2589cacfUL, 0x3e52938aUL, 0x00000000UL, 0x3fa64b10UL,
+    0xaf6b11f2UL, 0xbe3454cdUL, 0x00000000UL, 0x3fa543e2UL, 0x97506fefUL,
+    0xbe5fdec5UL, 0x00000000UL, 0x3fa43d10UL, 0xe75f7dd9UL, 0xbe388dd3UL,
+    0x00000000UL, 0x3fa3369cUL, 0xa4139632UL, 0xbdea5177UL, 0x00000000UL,
+    0x3fa23086UL, 0x352d6f1eUL, 0xbe565ad6UL, 0x00000000UL, 0x3fa12accUL,
+    0x77449eb7UL, 0xbe50d5c7UL, 0x00000000UL, 0x3fa0256eUL, 0x7478da78UL,
+    0x3e404724UL, 0x00000000UL, 0x3f9e40dcUL, 0xf59cef7fUL, 0xbe539d0aUL,
+    0x00000000UL, 0x3f9c3790UL, 0x1511d43cUL, 0x3e53c2c8UL, 0x00000000UL,
+    0x3f9a2f00UL, 0x9b8bff3cUL, 0xbe43b3e1UL, 0x00000000UL, 0x3f982724UL,
+    0xad1e22a5UL, 0x3e46f0bdUL, 0x00000000UL, 0x3f962000UL, 0x130d9356UL,
+    0x3e475ba0UL, 0x00000000UL, 0x3f941994UL, 0x8f86f883UL, 0xbe513d0bUL,
+    0x00000000UL, 0x3f9213dcUL, 0x914d0dc8UL, 0xbe534335UL, 0x00000000UL,
+    0x3f900ed8UL, 0x2d73e5e7UL, 0xbe22ba75UL, 0x00000000UL, 0x3f8c1510UL,
+    0xc5b7d70eUL, 0x3e599c5dUL, 0x00000000UL, 0x3f880de0UL, 0x8a27857eUL,
+    0xbe3d28c8UL, 0x00000000UL, 0x3f840810UL, 0xda767328UL, 0x3e531b3dUL,
+    0x00000000UL, 0x3f8003b0UL, 0x77bacaf3UL, 0xbe5f04e3UL, 0x00000000UL,
+    0x3f780150UL, 0xdf4b0720UL, 0x3e5a8bffUL, 0x00000000UL, 0x3f6ffc40UL,
+    0x34c48e71UL, 0xbe3fcd99UL, 0x00000000UL, 0x3f5ff6c0UL, 0x1ad218afUL,
+    0xbe4c78a7UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x80000000UL,
+    0x00000000UL, 0xfffff800UL, 0x00000000UL, 0xfffff800UL, 0x00000000UL,
+    0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL, 0x6dc96112UL, 0xbf836578UL,
+    0xee241472UL, 0xbf9b0301UL, 0x9f95985aUL, 0xbfb528dbUL, 0xb3841d2aUL,
+    0xbfd619b6UL, 0x518775e3UL, 0x3f9004f2UL, 0xac8349bbUL, 0x3fa76c9bUL,
+    0x486ececcUL, 0x3fc4635eUL, 0x161bb241UL, 0xbf5dabe1UL, 0x9f95985aUL,
+    0xbfb528dbUL, 0xf8b5787dUL, 0x3ef2531eUL, 0x486ececbUL, 0x3fc4635eUL,
+    0x412055ccUL, 0xbdd61bb2UL, 0x00000000UL, 0xfffffff8UL, 0x00000000UL,
+    0xffffffffUL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x3b700000UL,
+    0xfa5abcbfUL, 0x3ff00b1aUL, 0xa7609f71UL, 0xbc84f6b2UL, 0xa9fb3335UL,
+    0x3ff0163dUL, 0x9ab8cdb7UL, 0x3c9b6129UL, 0x143b0281UL, 0x3ff02168UL,
+    0x0fc54eb6UL, 0xbc82bf31UL, 0x3e778061UL, 0x3ff02c9aUL, 0x535b085dUL,
+    0xbc719083UL, 0x2e11bbccUL, 0x3ff037d4UL, 0xeeade11aUL, 0x3c656811UL,
+    0xe86e7f85UL, 0x3ff04315UL, 0x1977c96eUL, 0xbc90a31cUL, 0x72f654b1UL,
+    0x3ff04e5fUL, 0x3aa0d08cUL, 0x3c84c379UL, 0xd3158574UL, 0x3ff059b0UL,
+    0xa475b465UL, 0x3c8d73e2UL, 0x0e3c1f89UL, 0x3ff0650aUL, 0x5799c397UL,
+    0xbc95cb7bUL, 0x29ddf6deUL, 0x3ff0706bUL, 0xe2b13c27UL, 0xbc8c91dfUL,
+    0x2b72a836UL, 0x3ff07bd4UL, 0x54458700UL, 0x3c832334UL, 0x18759bc8UL,
+    0x3ff08745UL, 0x4bb284ffUL, 0x3c6186beUL, 0xf66607e0UL, 0x3ff092bdUL,
+    0x800a3fd1UL, 0xbc968063UL, 0xcac6f383UL, 0x3ff09e3eUL, 0x18316136UL,
+    0x3c914878UL, 0x9b1f3919UL, 0x3ff0a9c7UL, 0x873d1d38UL, 0x3c85d16cUL,
+    0x6cf9890fUL, 0x3ff0b558UL, 0x4adc610bUL, 0x3c98a62eUL, 0x45e46c85UL,
+    0x3ff0c0f1UL, 0x06d21cefUL, 0x3c94f989UL, 0x2b7247f7UL, 0x3ff0cc92UL,
+    0x16e24f71UL, 0x3c901edcUL, 0x23395decUL, 0x3ff0d83bUL, 0xe43f316aUL,
+    0xbc9bc14dUL, 0x32d3d1a2UL, 0x3ff0e3ecUL, 0x27c57b52UL, 0x3c403a17UL,
+    0x5fdfa9c5UL, 0x3ff0efa5UL, 0xbc54021bUL, 0xbc949db9UL, 0xaffed31bUL,
+    0x3ff0fb66UL, 0xc44ebd7bUL, 0xbc6b9bedUL, 0x28d7233eUL, 0x3ff10730UL,
+    0x1692fdd5UL, 0x3c8d46ebUL, 0xd0125b51UL, 0x3ff11301UL, 0x39449b3aUL,
+    0xbc96c510UL, 0xab5e2ab6UL, 0x3ff11edbUL, 0xf703fb72UL, 0xbc9ca454UL,
+    0xc06c31ccUL, 0x3ff12abdUL, 0xb36ca5c7UL, 0xbc51b514UL, 0x14f204abUL,
+    0x3ff136a8UL, 0xba48dcf0UL, 0xbc67108fUL, 0xaea92de0UL, 0x3ff1429aUL,
+    0x9af1369eUL, 0xbc932fbfUL, 0x934f312eUL, 0x3ff14e95UL, 0x39bf44abUL,
+    0xbc8b91e8UL, 0xc8a58e51UL, 0x3ff15a98UL, 0xb9eeab0aUL, 0x3c82406aUL,
+    0x5471c3c2UL, 0x3ff166a4UL, 0x82ea1a32UL, 0x3c58f23bUL, 0x3c7d517bUL,
+    0x3ff172b8UL, 0xb9d78a76UL, 0xbc819041UL, 0x8695bbc0UL, 0x3ff17ed4UL,
+    0xe2ac5a64UL, 0x3c709e3fUL, 0x388c8deaUL, 0x3ff18af9UL, 0xd1970f6cUL,
+    0xbc911023UL, 0x58375d2fUL, 0x3ff19726UL, 0x85f17e08UL, 0x3c94aaddUL,
+    0xeb6fcb75UL, 0x3ff1a35bUL, 0x7b4968e4UL, 0x3c8e5b4cUL, 0xf8138a1cUL,
+    0x3ff1af99UL, 0xa4b69280UL, 0x3c97bf85UL, 0x84045cd4UL, 0x3ff1bbe0UL,
+    0x352ef607UL, 0xbc995386UL, 0x95281c6bUL, 0x3ff1c82fUL, 0x8010f8c9UL,
+    0x3c900977UL, 0x3168b9aaUL, 0x3ff1d487UL, 0x00a2643cUL, 0x3c9e016eUL,
+    0x5eb44027UL, 0x3ff1e0e7UL, 0x088cb6deUL, 0xbc96fdd8UL, 0x22fcd91dUL,
+    0x3ff1ed50UL, 0x027bb78cUL, 0xbc91df98UL, 0x8438ce4dUL, 0x3ff1f9c1UL,
+    0xa097af5cUL, 0xbc9bf524UL, 0x88628cd6UL, 0x3ff2063bUL, 0x814a8495UL,
+    0x3c8dc775UL, 0x3578a819UL, 0x3ff212beUL, 0x2cfcaac9UL, 0x3c93592dUL,
+    0x917ddc96UL, 0x3ff21f49UL, 0x9494a5eeUL, 0x3c82a97eUL, 0xa27912d1UL,
+    0x3ff22bddUL, 0x5577d69fUL, 0x3c8d34fbUL, 0x6e756238UL, 0x3ff2387aUL,
+    0xb6c70573UL, 0x3c99b07eUL, 0xfb82140aUL, 0x3ff2451fUL, 0x911ca996UL,
+    0x3c8acfccUL, 0x4fb2a63fUL, 0x3ff251ceUL, 0xbef4f4a4UL, 0x3c8ac155UL,
+    0x711ece75UL, 0x3ff25e85UL, 0x4ac31b2cUL, 0x3c93e1a2UL, 0x65e27cddUL,
+    0x3ff26b45UL, 0x9940e9d9UL, 0x3c82bd33UL, 0x341ddf29UL, 0x3ff2780eUL,
+    0x05f9e76cUL, 0x3c9e067cUL, 0xe1f56381UL, 0x3ff284dfUL, 0x8c3f0d7eUL,
+    0xbc9a4c3aUL, 0x7591bb70UL, 0x3ff291baUL, 0x28401cbdUL, 0xbc82cc72UL,
+    0xf51fdee1UL, 0x3ff29e9dUL, 0xafad1255UL, 0x3c8612e8UL, 0x66d10f13UL,
+    0x3ff2ab8aUL, 0x191690a7UL, 0xbc995743UL, 0xd0dad990UL, 0x3ff2b87fUL,
+    0xd6381aa4UL, 0xbc410adcUL, 0x39771b2fUL, 0x3ff2c57eUL, 0xa6eb5124UL,
+    0xbc950145UL, 0xa6e4030bUL, 0x3ff2d285UL, 0x54db41d5UL, 0x3c900247UL,
+    0x1f641589UL, 0x3ff2df96UL, 0xfbbce198UL, 0x3c9d16cfUL, 0xa93e2f56UL,
+    0x3ff2ecafUL, 0x45d52383UL, 0x3c71ca0fUL, 0x4abd886bUL, 0x3ff2f9d2UL,
+    0x532bda93UL, 0xbc653c55UL, 0x0a31b715UL, 0x3ff306feUL, 0xd23182e4UL,
+    0x3c86f46aUL, 0xedeeb2fdUL, 0x3ff31432UL, 0xf3f3fcd1UL, 0x3c8959a3UL,
+    0xfc4cd831UL, 0x3ff32170UL, 0x8e18047cUL, 0x3c8a9ce7UL, 0x3ba8ea32UL,
+    0x3ff32eb8UL, 0x3cb4f318UL, 0xbc9c45e8UL, 0xb26416ffUL, 0x3ff33c08UL,
+    0x843659a6UL, 0x3c932721UL, 0x66e3fa2dUL, 0x3ff34962UL, 0x930881a4UL,
+    0xbc835a75UL, 0x5f929ff1UL, 0x3ff356c5UL, 0x5c4e4628UL, 0xbc8b5ceeUL,
+    0xa2de883bUL, 0x3ff36431UL, 0xa06cb85eUL, 0xbc8c3144UL, 0x373aa9cbUL,
+    0x3ff371a7UL, 0xbf42eae2UL, 0xbc963aeaUL, 0x231e754aUL, 0x3ff37f26UL,
+    0x9eceb23cUL, 0xbc99f5caUL, 0x6d05d866UL, 0x3ff38caeUL, 0x3c9904bdUL,
+    0xbc9e958dUL, 0x1b7140efUL, 0x3ff39a40UL, 0xfc8e2934UL, 0xbc99a9a5UL,
+    0x34e59ff7UL, 0x3ff3a7dbUL, 0xd661f5e3UL, 0xbc75e436UL, 0xbfec6cf4UL,
+    0x3ff3b57fUL, 0xe26fff18UL, 0x3c954c66UL, 0xc313a8e5UL, 0x3ff3c32dUL,
+    0x375d29c3UL, 0xbc9efff8UL, 0x44ede173UL, 0x3ff3d0e5UL, 0x8c284c71UL,
+    0x3c7fe8d0UL, 0x4c123422UL, 0x3ff3dea6UL, 0x11f09ebcUL, 0x3c8ada09UL,
+    0xdf1c5175UL, 0x3ff3ec70UL, 0x7b8c9bcaUL, 0xbc8af663UL, 0x04ac801cUL,
+    0x3ff3fa45UL, 0xf956f9f3UL, 0xbc97d023UL, 0xc367a024UL, 0x3ff40822UL,
+    0xb6f4d048UL, 0x3c8bddf8UL, 0x21f72e2aUL, 0x3ff4160aUL, 0x1c309278UL,
+    0xbc5ef369UL, 0x2709468aUL, 0x3ff423fbUL, 0xc0b314ddUL, 0xbc98462dUL,
+    0xd950a897UL, 0x3ff431f5UL, 0xe35f7999UL, 0xbc81c7ddUL, 0x3f84b9d4UL,
+    0x3ff43ffaUL, 0x9704c003UL, 0x3c8880beUL, 0x6061892dUL, 0x3ff44e08UL,
+    0x04ef80d0UL, 0x3c489b7aUL, 0x42a7d232UL, 0x3ff45c20UL, 0x82fb1f8eUL,
+    0xbc686419UL, 0xed1d0057UL, 0x3ff46a41UL, 0xd1648a76UL, 0x3c9c944bUL,
+    0x668b3237UL, 0x3ff4786dUL, 0xed445733UL, 0xbc9c20f0UL, 0xb5c13cd0UL,
+    0x3ff486a2UL, 0xb69062f0UL, 0x3c73c1a3UL, 0xe192aed2UL, 0x3ff494e1UL,
+    0x5e499ea0UL, 0xbc83b289UL, 0xf0d7d3deUL, 0x3ff4a32aUL, 0xf3d1be56UL,
+    0x3c99cb62UL, 0xea6db7d7UL, 0x3ff4b17dUL, 0x7f2897f0UL, 0xbc8125b8UL,
+    0xd5362a27UL, 0x3ff4bfdaUL, 0xafec42e2UL, 0x3c7d4397UL, 0xb817c114UL,
+    0x3ff4ce41UL, 0x690abd5dUL, 0x3c905e29UL, 0x99fddd0dUL, 0x3ff4dcb2UL,
+    0xbc6a7833UL, 0x3c98ecdbUL, 0x81d8abffUL, 0x3ff4eb2dUL, 0x2e5d7a52UL,
+    0xbc95257dUL, 0x769d2ca7UL, 0x3ff4f9b2UL, 0xd25957e3UL, 0xbc94b309UL,
+    0x7f4531eeUL, 0x3ff50841UL, 0x49b7465fUL, 0x3c7a249bUL, 0xa2cf6642UL,
+    0x3ff516daUL, 0x69bd93efUL, 0xbc8f7685UL, 0xe83f4eefUL, 0x3ff5257dUL,
+    0x43efef71UL, 0xbc7c998dUL, 0x569d4f82UL, 0x3ff5342bUL, 0x1db13cadUL,
+    0xbc807abeUL, 0xf4f6ad27UL, 0x3ff542e2UL, 0x192d5f7eUL, 0x3c87926dUL,
+    0xca5d920fUL, 0x3ff551a4UL, 0xefede59bUL, 0xbc8d689cUL, 0xdde910d2UL,
+    0x3ff56070UL, 0x168eebf0UL, 0xbc90fb6eUL, 0x36b527daUL, 0x3ff56f47UL,
+    0x011d93adUL, 0x3c99bb2cUL, 0xdbe2c4cfUL, 0x3ff57e27UL, 0x8a57b9c4UL,
+    0xbc90b98cUL, 0xd497c7fdUL, 0x3ff58d12UL, 0x5b9a1de8UL, 0x3c8295e1UL,
+    0x27ff07ccUL, 0x3ff59c08UL, 0xe467e60fUL, 0xbc97e2ceUL, 0xdd485429UL,
+    0x3ff5ab07UL, 0x054647adUL, 0x3c96324cUL, 0xfba87a03UL, 0x3ff5ba11UL,
+    0x4c233e1aUL, 0xbc9b77a1UL, 0x8a5946b7UL, 0x3ff5c926UL, 0x816986a2UL,
+    0x3c3c4b1bUL, 0x90998b93UL, 0x3ff5d845UL, 0xa8b45643UL, 0xbc9cd6a7UL,
+    0x15ad2148UL, 0x3ff5e76fUL, 0x3080e65eUL, 0x3c9ba6f9UL, 0x20dceb71UL,
+    0x3ff5f6a3UL, 0xe3cdcf92UL, 0xbc89eaddUL, 0xb976dc09UL, 0x3ff605e1UL,
+    0x9b56de47UL, 0xbc93e242UL, 0xe6cdf6f4UL, 0x3ff6152aUL, 0x4ab84c27UL,
+    0x3c9e4b3eUL, 0xb03a5585UL, 0x3ff6247eUL, 0x7e40b497UL, 0xbc9383c1UL,
+    0x1d1929fdUL, 0x3ff633ddUL, 0xbeb964e5UL, 0x3c984710UL, 0x34ccc320UL,
+    0x3ff64346UL, 0x759d8933UL, 0xbc8c483cUL, 0xfebc8fb7UL, 0x3ff652b9UL,
+    0xc9a73e09UL, 0xbc9ae3d5UL, 0x82552225UL, 0x3ff66238UL, 0x87591c34UL,
+    0xbc9bb609UL, 0xc70833f6UL, 0x3ff671c1UL, 0x586c6134UL, 0xbc8e8732UL,
+    0xd44ca973UL, 0x3ff68155UL, 0x44f73e65UL, 0x3c6038aeUL, 0xb19e9538UL,
+    0x3ff690f4UL, 0x9aeb445dUL, 0x3c8804bdUL, 0x667f3bcdUL, 0x3ff6a09eUL,
+    0x13b26456UL, 0xbc9bdd34UL, 0xfa75173eUL, 0x3ff6b052UL, 0x2c9a9d0eUL,
+    0x3c7a38f5UL, 0x750bdabfUL, 0x3ff6c012UL, 0x67ff0b0dUL, 0xbc728956UL,
+    0xddd47645UL, 0x3ff6cfdcUL, 0xb6f17309UL, 0x3c9c7aa9UL, 0x3c651a2fUL,
+    0x3ff6dfb2UL, 0x683c88abUL, 0xbc6bbe3aUL, 0x98593ae5UL, 0x3ff6ef92UL,
+    0x9e1ac8b2UL, 0xbc90b974UL, 0xf9519484UL, 0x3ff6ff7dUL, 0x25860ef6UL,
+    0xbc883c0fUL, 0x66f42e87UL, 0x3ff70f74UL, 0xd45aa65fUL, 0x3c59d644UL,
+    0xe8ec5f74UL, 0x3ff71f75UL, 0x86887a99UL, 0xbc816e47UL, 0x86ead08aUL,
+    0x3ff72f82UL, 0x2cd62c72UL, 0xbc920aa0UL, 0x48a58174UL, 0x3ff73f9aUL,
+    0x6c65d53cUL, 0xbc90a8d9UL, 0x35d7cbfdUL, 0x3ff74fbdUL, 0x618a6e1cUL,
+    0x3c9047fdUL, 0x564267c9UL, 0x3ff75febUL, 0x57316dd3UL, 0xbc902459UL,
+    0xb1ab6e09UL, 0x3ff77024UL, 0x169147f8UL, 0x3c9b7877UL, 0x4fde5d3fUL,
+    0x3ff78069UL, 0x0a02162dUL, 0x3c9866b8UL, 0x38ac1cf6UL, 0x3ff790b9UL,
+    0x62aadd3eUL, 0x3c9349a8UL, 0x73eb0187UL, 0x3ff7a114UL, 0xee04992fUL,
+    0xbc841577UL, 0x0976cfdbUL, 0x3ff7b17bUL, 0x8468dc88UL, 0xbc9bebb5UL,
+    0x0130c132UL, 0x3ff7c1edUL, 0xd1164dd6UL, 0x3c9f124cUL, 0x62ff86f0UL,
+    0x3ff7d26aUL, 0xfb72b8b4UL, 0x3c91bddbUL, 0x36cf4e62UL, 0x3ff7e2f3UL,
+    0xba15797eUL, 0x3c705d02UL, 0x8491c491UL, 0x3ff7f387UL, 0xcf9311aeUL,
+    0xbc807f11UL, 0x543e1a12UL, 0x3ff80427UL, 0x626d972bUL, 0xbc927c86UL,
+    0xadd106d9UL, 0x3ff814d2UL, 0x0d151d4dUL, 0x3c946437UL, 0x994cce13UL,
+    0x3ff82589UL, 0xd41532d8UL, 0xbc9d4c1dUL, 0x1eb941f7UL, 0x3ff8364cUL,
+    0x31df2bd5UL, 0x3c999b9aUL, 0x4623c7adUL, 0x3ff8471aUL, 0xa341cdfbUL,
+    0xbc88d684UL, 0x179f5b21UL, 0x3ff857f4UL, 0xf8b216d0UL, 0xbc5ba748UL,
+    0x9b4492edUL, 0x3ff868d9UL, 0x9bd4f6baUL, 0xbc9fc6f8UL, 0xd931a436UL,
+    0x3ff879caUL, 0xd2db47bdUL, 0x3c85d2d7UL, 0xd98a6699UL, 0x3ff88ac7UL,
+    0xf37cb53aUL, 0x3c9994c2UL, 0xa478580fUL, 0x3ff89bd0UL, 0x4475202aUL,
+    0x3c9d5395UL, 0x422aa0dbUL, 0x3ff8ace5UL, 0x56864b27UL, 0x3c96e9f1UL,
+    0xbad61778UL, 0x3ff8be05UL, 0xfc43446eUL, 0x3c9ecb5eUL, 0x16b5448cUL,
+    0x3ff8cf32UL, 0x32e9e3aaUL, 0xbc70d55eUL, 0x5e0866d9UL, 0x3ff8e06aUL,
+    0x6fc9b2e6UL, 0xbc97114aUL, 0x99157736UL, 0x3ff8f1aeUL, 0xa2e3976cUL,
+    0x3c85cc13UL, 0xd0282c8aUL, 0x3ff902feUL, 0x85fe3fd2UL, 0x3c9592caUL,
+    0x0b91ffc6UL, 0x3ff9145bUL, 0x2e582524UL, 0xbc9dd679UL, 0x53aa2fe2UL,
+    0x3ff925c3UL, 0xa639db7fUL, 0xbc83455fUL, 0xb0cdc5e5UL, 0x3ff93737UL,
+    0x81b57ebcUL, 0xbc675fc7UL, 0x2b5f98e5UL, 0x3ff948b8UL, 0x797d2d99UL,
+    0xbc8dc3d6UL, 0xcbc8520fUL, 0x3ff95a44UL, 0x96a5f039UL, 0xbc764b7cUL,
+    0x9a7670b3UL, 0x3ff96bddUL, 0x7f19c896UL, 0xbc5ba596UL, 0x9fde4e50UL,
+    0x3ff97d82UL, 0x7c1b85d1UL, 0xbc9d185bUL, 0xe47a22a2UL, 0x3ff98f33UL,
+    0xa24c78ecUL, 0x3c7cabdaUL, 0x70ca07baUL, 0x3ff9a0f1UL, 0x91cee632UL,
+    0xbc9173bdUL, 0x4d53fe0dUL, 0x3ff9b2bbUL, 0x4df6d518UL, 0xbc9dd84eUL,
+    0x82a3f090UL, 0x3ff9c491UL, 0xb071f2beUL, 0x3c7c7c46UL, 0x194bb8d5UL,
+    0x3ff9d674UL, 0xa3dd8233UL, 0xbc9516beUL, 0x19e32323UL, 0x3ff9e863UL,
+    0x78e64c6eUL, 0x3c7824caUL, 0x8d07f29eUL, 0x3ff9fa5eUL, 0xaaf1faceUL,
+    0xbc84a9ceUL, 0x7b5de565UL, 0x3ffa0c66UL, 0x5d1cd533UL, 0xbc935949UL,
+    0xed8eb8bbUL, 0x3ffa1e7aUL, 0xee8be70eUL, 0x3c9c6618UL, 0xec4a2d33UL,
+    0x3ffa309bUL, 0x7ddc36abUL, 0x3c96305cUL, 0x80460ad8UL, 0x3ffa42c9UL,
+    0x589fb120UL, 0xbc9aa780UL, 0xb23e255dUL, 0x3ffa5503UL, 0xdb8d41e1UL,
+    0xbc9d2f6eUL, 0x8af46052UL, 0x3ffa674aUL, 0x30670366UL, 0x3c650f56UL,
+    0x1330b358UL, 0x3ffa799eUL, 0xcac563c7UL, 0x3c9bcb7eUL, 0x53c12e59UL,
+    0x3ffa8bfeUL, 0xb2ba15a9UL, 0xbc94f867UL, 0x5579fdbfUL, 0x3ffa9e6bUL,
+    0x0ef7fd31UL, 0x3c90fac9UL, 0x21356ebaUL, 0x3ffab0e5UL, 0xdae94545UL,
+    0x3c889c31UL, 0xbfd3f37aUL, 0x3ffac36bUL, 0xcae76cd0UL, 0xbc8f9234UL,
+    0x3a3c2774UL, 0x3ffad5ffUL, 0xb6b1b8e5UL, 0x3c97ef3bUL, 0x995ad3adUL,
+    0x3ffae89fUL, 0x345dcc81UL, 0x3c97a1cdUL, 0xe622f2ffUL, 0x3ffafb4cUL,
+    0x0f315ecdUL, 0xbc94b2fcUL, 0x298db666UL, 0x3ffb0e07UL, 0x4c80e425UL,
+    0xbc9bdef5UL, 0x6c9a8952UL, 0x3ffb20ceUL, 0x4a0756ccUL, 0x3c94dd02UL,
+    0xb84f15fbUL, 0x3ffb33a2UL, 0x3084d708UL, 0xbc62805eUL, 0x15b749b1UL,
+    0x3ffb4684UL, 0xe9df7c90UL, 0xbc7f763dUL, 0x8de5593aUL, 0x3ffb5972UL,
+    0xbbba6de3UL, 0xbc9c71dfUL, 0x29f1c52aUL, 0x3ffb6c6eUL, 0x52883f6eUL,
+    0x3c92a8f3UL, 0xf2fb5e47UL, 0x3ffb7f76UL, 0x7e54ac3bUL, 0xbc75584fUL,
+    0xf22749e4UL, 0x3ffb928cUL, 0x54cb65c6UL, 0xbc9b7216UL, 0x30a1064aUL,
+    0x3ffba5b0UL, 0x0e54292eUL, 0xbc9efcd3UL, 0xb79a6f1fUL, 0x3ffbb8e0UL,
+    0xc9696205UL, 0xbc3f52d1UL, 0x904bc1d2UL, 0x3ffbcc1eUL, 0x7a2d9e84UL,
+    0x3c823dd0UL, 0xc3f3a207UL, 0x3ffbdf69UL, 0x60ea5b53UL, 0xbc3c2623UL,
+    0x5bd71e09UL, 0x3ffbf2c2UL, 0x3f6b9c73UL, 0xbc9efdcaUL, 0x6141b33dUL,
+    0x3ffc0628UL, 0xa1fbca34UL, 0xbc8d8a5aUL, 0xdd85529cUL, 0x3ffc199bUL,
+    0x895048ddUL, 0x3c811065UL, 0xd9fa652cUL, 0x3ffc2d1cUL, 0x17c8a5d7UL,
+    0xbc96e516UL, 0x5fffd07aUL, 0x3ffc40abUL, 0xe083c60aUL, 0x3c9b4537UL,
+    0x78fafb22UL, 0x3ffc5447UL, 0x2493b5afUL, 0x3c912f07UL, 0x2e57d14bUL,
+    0x3ffc67f1UL, 0xff483cadUL, 0x3c92884dUL, 0x8988c933UL, 0x3ffc7ba8UL,
+    0xbe255559UL, 0xbc8e76bbUL, 0x9406e7b5UL, 0x3ffc8f6dUL, 0x48805c44UL,
+    0x3c71acbcUL, 0x5751c4dbUL, 0x3ffca340UL, 0xd10d08f5UL, 0xbc87f2beUL,
+    0xdcef9069UL, 0x3ffcb720UL, 0xd1e949dbUL, 0x3c7503cbUL, 0x2e6d1675UL,
+    0x3ffccb0fUL, 0x86009092UL, 0xbc7d220fUL, 0x555dc3faUL, 0x3ffcdf0bUL,
+    0x53829d72UL, 0xbc8dd83bUL, 0x5b5bab74UL, 0x3ffcf315UL, 0xb86dff57UL,
+    0xbc9a08e9UL, 0x4a07897cUL, 0x3ffd072dUL, 0x43797a9cUL, 0xbc9cbc37UL,
+    0x2b08c968UL, 0x3ffd1b53UL, 0x219a36eeUL, 0x3c955636UL, 0x080d89f2UL,
+    0x3ffd2f87UL, 0x719d8578UL, 0xbc9d487bUL, 0xeacaa1d6UL, 0x3ffd43c8UL,
+    0xbf5a1614UL, 0x3c93db53UL, 0xdcfba487UL, 0x3ffd5818UL, 0xd75b3707UL,
+    0x3c82ed02UL, 0xe862e6d3UL, 0x3ffd6c76UL, 0x4a8165a0UL, 0x3c5fe87aUL,
+    0x16c98398UL, 0x3ffd80e3UL, 0x8beddfe8UL, 0xbc911ec1UL, 0x71ff6075UL,
+    0x3ffd955dUL, 0xbb9af6beUL, 0x3c9a052dUL, 0x03db3285UL, 0x3ffda9e6UL,
+    0x696db532UL, 0x3c9c2300UL, 0xd63a8315UL, 0x3ffdbe7cUL, 0x926b8be4UL,
+    0xbc9b76f1UL, 0xf301b460UL, 0x3ffdd321UL, 0x78f018c3UL, 0x3c92da57UL,
+    0x641c0658UL, 0x3ffde7d5UL, 0x8e79ba8fUL, 0xbc9ca552UL, 0x337b9b5fUL,
+    0x3ffdfc97UL, 0x4f184b5cUL, 0xbc91a5cdUL, 0x6b197d17UL, 0x3ffe1167UL,
+    0xbd5c7f44UL, 0xbc72b529UL, 0x14f5a129UL, 0x3ffe2646UL, 0x817a1496UL,
+    0xbc97b627UL, 0x3b16ee12UL, 0x3ffe3b33UL, 0x31fdc68bUL, 0xbc99f4a4UL,
+    0xe78b3ff6UL, 0x3ffe502eUL, 0x80a9cc8fUL, 0x3c839e89UL, 0x24676d76UL,
+    0x3ffe6539UL, 0x7522b735UL, 0xbc863ff8UL, 0xfbc74c83UL, 0x3ffe7a51UL,
+    0xca0c8de2UL, 0x3c92d522UL, 0x77cdb740UL, 0x3ffe8f79UL, 0x80b054b1UL,
+    0xbc910894UL, 0xa2a490daUL, 0x3ffea4afUL, 0x179c2893UL, 0xbc9e9c23UL,
+    0x867cca6eUL, 0x3ffeb9f4UL, 0x2293e4f2UL, 0x3c94832fUL, 0x2d8e67f1UL,
+    0x3ffecf48UL, 0xb411ad8cUL, 0xbc9c93f3UL, 0xa2188510UL, 0x3ffee4aaUL,
+    0xa487568dUL, 0x3c91c68dUL, 0xee615a27UL, 0x3ffefa1bUL, 0x86a4b6b0UL,
+    0x3c9dc7f4UL, 0x1cb6412aUL, 0x3fff0f9cUL, 0x65181d45UL, 0xbc932200UL,
+    0x376bba97UL, 0x3fff252bUL, 0xbf0d8e43UL, 0x3c93a1a5UL, 0x48dd7274UL,
+    0x3fff3ac9UL, 0x3ed837deUL, 0xbc795a5aUL, 0x5b6e4540UL, 0x3fff5076UL,
+    0x2dd8a18bUL, 0x3c99d3e1UL, 0x798844f8UL, 0x3fff6632UL, 0x3539343eUL,
+    0x3c9fa37bUL, 0xad9cbe14UL, 0x3fff7bfdUL, 0xd006350aUL, 0xbc9dbb12UL,
+    0x02243c89UL, 0x3fff91d8UL, 0xa779f689UL, 0xbc612ea8UL, 0x819e90d8UL,
+    0x3fffa7c1UL, 0xf3a5931eUL, 0x3c874853UL, 0x3692d514UL, 0x3fffbdbaUL,
+    0x15098eb6UL, 0xbc796773UL, 0x2b8f71f1UL, 0x3fffd3c2UL, 0x966579e7UL,
+    0x3c62eb74UL, 0x6b2a23d9UL, 0x3fffe9d9UL, 0x7442fde3UL, 0x3c74a603UL,
+    0xe78a6731UL, 0x3f55d87fUL, 0xd704a0c0UL, 0x3fac6b08UL, 0x6fba4e77UL,
+    0x3f83b2abUL, 0xff82c58fUL, 0x3fcebfbdUL, 0xfefa39efUL, 0x3fe62e42UL,
+    0x00000000UL, 0x00000000UL, 0xfefa39efUL, 0x3fe62e42UL, 0xfefa39efUL,
+    0xbfe62e42UL, 0xf8000000UL, 0xffffffffUL, 0xf8000000UL, 0xffffffffUL,
+    0x00000000UL, 0x80000000UL, 0x00000000UL, 0x00000000UL
+
+};
+
+//registers,
+// input: xmm0, xmm1
+// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
+//          eax, edx, ecx, ebx
+
+// Code generated by Intel C compiler for LIBM library
+
+void MacroAssembler::fast_pow(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
+  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
+  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
+  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
+  Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, L_2TAG_PACKET_14_0_2, L_2TAG_PACKET_15_0_2;
+  Label L_2TAG_PACKET_16_0_2, L_2TAG_PACKET_17_0_2, L_2TAG_PACKET_18_0_2, L_2TAG_PACKET_19_0_2;
+  Label L_2TAG_PACKET_20_0_2, L_2TAG_PACKET_21_0_2, L_2TAG_PACKET_22_0_2, L_2TAG_PACKET_23_0_2;
+  Label L_2TAG_PACKET_24_0_2, L_2TAG_PACKET_25_0_2, L_2TAG_PACKET_26_0_2, L_2TAG_PACKET_27_0_2;
+  Label L_2TAG_PACKET_28_0_2, L_2TAG_PACKET_29_0_2, L_2TAG_PACKET_30_0_2, L_2TAG_PACKET_31_0_2;
+  Label L_2TAG_PACKET_32_0_2, L_2TAG_PACKET_33_0_2, L_2TAG_PACKET_34_0_2, L_2TAG_PACKET_35_0_2;
+  Label L_2TAG_PACKET_36_0_2, L_2TAG_PACKET_37_0_2, L_2TAG_PACKET_38_0_2, L_2TAG_PACKET_39_0_2;
+  Label L_2TAG_PACKET_40_0_2, L_2TAG_PACKET_41_0_2, L_2TAG_PACKET_42_0_2, L_2TAG_PACKET_43_0_2;
+  Label L_2TAG_PACKET_44_0_2, L_2TAG_PACKET_45_0_2, L_2TAG_PACKET_46_0_2, L_2TAG_PACKET_47_0_2;
+  Label L_2TAG_PACKET_48_0_2, L_2TAG_PACKET_49_0_2, L_2TAG_PACKET_50_0_2, L_2TAG_PACKET_51_0_2;
+  Label L_2TAG_PACKET_52_0_2, L_2TAG_PACKET_53_0_2, L_2TAG_PACKET_54_0_2, L_2TAG_PACKET_55_0_2;
+  Label L_2TAG_PACKET_56_0_2, L_2TAG_PACKET_57_0_2, L_2TAG_PACKET_58_0_2, start;
+
+  assert_different_registers(tmp, eax, ecx, edx);
+
+  address static_const_table_pow = (address)_static_const_table_pow;
+
+  bind(start);
+  subl(rsp, 120);
+  movl(Address(rsp, 64), tmp);
+  lea(tmp, ExternalAddress(static_const_table_pow));
+  movsd(xmm0, Address(rsp, 128));
+  movsd(xmm1, Address(rsp, 136));
+  xorpd(xmm2, xmm2);
+  movl(eax, 16368);
+  pinsrw(xmm2, eax, 3);
+  movl(ecx, 1069088768);
+  movdl(xmm7, ecx);
+  movsd(Address(rsp, 16), xmm1);
+  xorpd(xmm1, xmm1);
+  movl(edx, 30704);
+  pinsrw(xmm1, edx, 3);
+  movsd(Address(rsp, 8), xmm0);
+  movdqu(xmm3, xmm0);
+  movl(edx, 8192);
+  movdl(xmm4, edx);
+  movdqu(xmm6, Address(tmp, 8240));
+  pextrw(eax, xmm0, 3);
+  por(xmm0, xmm2);
+  psllq(xmm0, 5);
+  movsd(xmm2, Address(tmp, 8256));
+  psrlq(xmm0, 34);
+  movl(edx, eax);
+  andl(edx, 32752);
+  subl(edx, 16368);
+  movl(ecx, edx);
+  sarl(edx, 31);
+  addl(ecx, edx);
+  xorl(ecx, edx);
+  rcpss(xmm0, xmm0);
+  psllq(xmm3, 12);
+  addl(ecx, 16);
+  bsrl(ecx, ecx);
+  psrlq(xmm3, 12);
+  movl(Address(rsp, 24), rsi);
+  subl(eax, 16);
+  cmpl(eax, 32736);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
+  movl(rsi, 0);
+
+  bind(L_2TAG_PACKET_1_0_2);
+  mulss(xmm0, xmm7);
+  movl(edx, -1);
+  subl(ecx, 4);
+  shll(edx);
+  movdl(xmm5, edx);
+  por(xmm3, xmm1);
+  subl(eax, 16351);
+  cmpl(eax, 1);
+  jcc(Assembler::belowEqual, L_2TAG_PACKET_2_0_2);
+  paddd(xmm0, xmm4);
+  psllq(xmm5, 32);
+  movdl(edx, xmm0);
+  psllq(xmm0, 29);
+  pand(xmm5, xmm3);
+
+  bind(L_2TAG_PACKET_3_0_2);
+  pand(xmm0, xmm6);
+  subsd(xmm3, xmm5);
+  subl(eax, 1);
+  sarl(eax, 4);
+  cvtsi2sdl(xmm7, eax);
+  mulpd(xmm5, xmm0);
+
+  bind(L_2TAG_PACKET_4_0_2);
+  mulsd(xmm3, xmm0);
+  movdqu(xmm1, Address(tmp, 8272));
+  subsd(xmm5, xmm2);
+  movdqu(xmm4, Address(tmp, 8288));
+  movl(ecx, eax);
+  sarl(eax, 31);
+  addl(ecx, eax);
+  xorl(eax, ecx);
+  addl(eax, 1);
+  bsrl(eax, eax);
+  unpcklpd(xmm5, xmm3);
+  movdqu(xmm6, Address(tmp, 8304));
+  addsd(xmm3, xmm5);
+  andl(edx, 16760832);
+  shrl(edx, 10);
+  addpd(xmm5, Address(tmp, edx, Address::times_1, -3616));
+  movdqu(xmm0, Address(tmp, 8320));
+  pshufd(xmm2, xmm3, 68);
+  mulsd(xmm3, xmm3);
+  mulpd(xmm1, xmm2);
+  mulpd(xmm4, xmm2);
+  addsd(xmm5, xmm7);
+  mulsd(xmm2, xmm3);
+  addpd(xmm6, xmm1);
+  mulsd(xmm3, xmm3);
+  addpd(xmm0, xmm4);
+  movsd(xmm1, Address(rsp, 16));
+  movzwl(ecx, Address(rsp, 22));
+  pshufd(xmm7, xmm5, 238);
+  movsd(xmm4, Address(tmp, 8368));
+  mulpd(xmm6, xmm2);
+  pshufd(xmm3, xmm3, 68);
+  mulpd(xmm0, xmm2);
+  shll(eax, 4);
+  subl(eax, 15872);
+  andl(ecx, 32752);
+  addl(eax, ecx);
+  mulpd(xmm3, xmm6);
+  cmpl(eax, 624);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_5_0_2);
+  xorpd(xmm6, xmm6);
+  movl(edx, 17080);
+  pinsrw(xmm6, edx, 3);
+  movdqu(xmm2, xmm1);
+  pand(xmm4, xmm1);
+  subsd(xmm1, xmm4);
+  mulsd(xmm4, xmm5);
+  addsd(xmm0, xmm7);
+  mulsd(xmm1, xmm5);
+  movdqu(xmm7, xmm6);
+  addsd(xmm6, xmm4);
+  addpd(xmm3, xmm0);
+  movdl(edx, xmm6);
+  subsd(xmm6, xmm7);
+  pshufd(xmm0, xmm3, 238);
+  subsd(xmm4, xmm6);
+  addsd(xmm0, xmm3);
+  movl(ecx, edx);
+  andl(edx, 255);
+  addl(edx, edx);
+  movdqu(xmm5, Address(tmp, edx, Address::times_8, 8384));
+  addsd(xmm4, xmm1);
+  mulsd(xmm2, xmm0);
+  movdqu(xmm7, Address(tmp, 12480));
+  movdqu(xmm3, Address(tmp, 12496));
+  shll(ecx, 12);
+  xorl(ecx, rsi);
+  andl(ecx, -1048576);
+  movdl(xmm6, ecx);
+  addsd(xmm2, xmm4);
+  movsd(xmm1, Address(tmp, 12512));
+  pshufd(xmm0, xmm2, 68);
+  pshufd(xmm4, xmm2, 68);
+  mulpd(xmm0, xmm0);
+  movl(rsi, Address(rsp, 24));
+  mulpd(xmm7, xmm4);
+  pshufd(xmm6, xmm6, 17);
+  mulsd(xmm1, xmm2);
+  mulsd(xmm0, xmm0);
+  paddd(xmm5, xmm6);
+  addpd(xmm3, xmm7);
+  mulsd(xmm1, xmm5);
+  pshufd(xmm6, xmm5, 238);
+  mulpd(xmm0, xmm3);
+  addsd(xmm1, xmm6);
+  pshufd(xmm3, xmm0, 238);
+  mulsd(xmm0, xmm5);
+  mulsd(xmm3, xmm5);
+  addsd(xmm0, xmm1);
+  addsd(xmm0, xmm3);
+  addsd(xmm0, xmm5);
+  movsd(Address(rsp, 0), xmm0);
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_6_0_2);
+
+  bind(L_2TAG_PACKET_7_0_2);
+  movsd(xmm0, Address(rsp, 128));
+  movsd(xmm1, Address(rsp, 136));
+  mulsd(xmm0, xmm1);
+  movsd(Address(rsp, 0), xmm0);
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_6_0_2);
+
+  bind(L_2TAG_PACKET_0_0_2);
+  addl(eax, 16);
+  movl(edx, 32752);
+  andl(edx, eax);
+  cmpl(edx, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_8_0_2);
+  testl(eax, 32768);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_9_0_2);
+
+  bind(L_2TAG_PACKET_10_0_2);
+  movl(ecx, Address(rsp, 16));
+  xorl(edx, edx);
+  testl(ecx, ecx);
+  movl(ecx, 1);
+  cmovl(Assembler::notEqual, edx, ecx);
+  orl(edx, Address(rsp, 20));
+  cmpl(edx, 1072693248);
+  jcc(Assembler::equal, L_2TAG_PACKET_7_0_2);
+  movsd(xmm0, Address(rsp, 8));
+  movsd(xmm3, Address(rsp, 8));
+  movdl(edx, xmm3);
+  psrlq(xmm3, 32);
+  movdl(ecx, xmm3);
+  orl(edx, ecx);
+  cmpl(edx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_11_0_2);
+  xorpd(xmm3, xmm3);
+  movl(eax, 18416);
+  pinsrw(xmm3, eax, 3);
+  mulsd(xmm0, xmm3);
+  xorpd(xmm2, xmm2);
+  movl(eax, 16368);
+  pinsrw(xmm2, eax, 3);
+  movdqu(xmm3, xmm0);
+  pextrw(eax, xmm0, 3);
+  por(xmm0, xmm2);
+  movl(ecx, 18416);
+  psllq(xmm0, 5);
+  movsd(xmm2, Address(tmp, 8256));
+  psrlq(xmm0, 34);
+  rcpss(xmm0, xmm0);
+  psllq(xmm3, 12);
+  movdqu(xmm6, Address(tmp, 8240));
+  psrlq(xmm3, 12);
+  mulss(xmm0, xmm7);
+  movl(edx, -1024);
+  movdl(xmm5, edx);
+  por(xmm3, xmm1);
+  paddd(xmm0, xmm4);
+  psllq(xmm5, 32);
+  movdl(edx, xmm0);
+  psllq(xmm0, 29);
+  pand(xmm5, xmm3);
+  movl(rsi, 0);
+  pand(xmm0, xmm6);
+  subsd(xmm3, xmm5);
+  andl(eax, 32752);
+  subl(eax, 18416);
+  sarl(eax, 4);
+  cvtsi2sdl(xmm7, eax);
+  mulpd(xmm5, xmm0);
+  jmp(L_2TAG_PACKET_4_0_2);
+
+  bind(L_2TAG_PACKET_12_0_2);
+  movl(ecx, Address(rsp, 16));
+  xorl(edx, edx);
+  testl(ecx, ecx);
+  movl(ecx, 1);
+  cmovl(Assembler::notEqual, edx, ecx);
+  orl(edx, Address(rsp, 20));
+  cmpl(edx, 1072693248);
+  jcc(Assembler::equal, L_2TAG_PACKET_7_0_2);
+  movsd(xmm0, Address(rsp, 8));
+  movsd(xmm3, Address(rsp, 8));
+  movdl(edx, xmm3);
+  psrlq(xmm3, 32);
+  movdl(ecx, xmm3);
+  orl(edx, ecx);
+  cmpl(edx, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_11_0_2);
+  xorpd(xmm3, xmm3);
+  movl(eax, 18416);
+  pinsrw(xmm3, eax, 3);
+  mulsd(xmm0, xmm3);
+  xorpd(xmm2, xmm2);
+  movl(eax, 16368);
+  pinsrw(xmm2, eax, 3);
+  movdqu(xmm3, xmm0);
+  pextrw(eax, xmm0, 3);
+  por(xmm0, xmm2);
+  movl(ecx, 18416);
+  psllq(xmm0, 5);
+  movsd(xmm2, Address(tmp, 8256));
+  psrlq(xmm0, 34);
+  rcpss(xmm0, xmm0);
+  psllq(xmm3, 12);
+  movdqu(xmm6, Address(tmp, 8240));
+  psrlq(xmm3, 12);
+  mulss(xmm0, xmm7);
+  movl(edx, -1024);
+  movdl(xmm5, edx);
+  por(xmm3, xmm1);
+  paddd(xmm0, xmm4);
+  psllq(xmm5, 32);
+  movdl(edx, xmm0);
+  psllq(xmm0, 29);
+  pand(xmm5, xmm3);
+  movl(rsi, INT_MIN);
+  pand(xmm0, xmm6);
+  subsd(xmm3, xmm5);
+  andl(eax, 32752);
+  subl(eax, 18416);
+  sarl(eax, 4);
+  cvtsi2sdl(xmm7, eax);
+  mulpd(xmm5, xmm0);
+  jmp(L_2TAG_PACKET_4_0_2);
+
+  bind(L_2TAG_PACKET_5_0_2);
+  cmpl(eax, 0);
+  jcc(Assembler::less, L_2TAG_PACKET_13_0_2);
+  cmpl(eax, 752);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_14_0_2);
+
+  bind(L_2TAG_PACKET_15_0_2);
+  addsd(xmm0, xmm7);
+  movsd(xmm2, Address(tmp, 12544));
+  addpd(xmm3, xmm0);
+  xorpd(xmm6, xmm6);
+  movl(eax, 17080);
+  pinsrw(xmm6, eax, 3);
+  pshufd(xmm0, xmm3, 238);
+  addsd(xmm0, xmm3);
+  movdqu(xmm3, xmm5);
+  addsd(xmm5, xmm0);
+  movdqu(xmm4, xmm2);
+  subsd(xmm3, xmm5);
+  movdqu(xmm7, xmm5);
+  pand(xmm5, xmm2);
+  movdqu(xmm2, xmm1);
+  pand(xmm4, xmm1);
+  subsd(xmm7, xmm5);
+  addsd(xmm0, xmm3);
+  subsd(xmm1, xmm4);
+  mulsd(xmm4, xmm5);
+  addsd(xmm0, xmm7);
+  mulsd(xmm2, xmm0);
+  movdqu(xmm7, xmm6);
+  mulsd(xmm1, xmm5);
+  addsd(xmm6, xmm4);
+  movdl(eax, xmm6);
+  subsd(xmm6, xmm7);
+  addsd(xmm2, xmm1);
+  movdqu(xmm7, Address(tmp, 12480));
+  movdqu(xmm3, Address(tmp, 12496));
+  subsd(xmm4, xmm6);
+  pextrw(edx, xmm6, 3);
+  movl(ecx, eax);
+  andl(eax, 255);
+  addl(eax, eax);
+  movdqu(xmm5, Address(tmp, eax, Address::times_8, 8384));
+  addsd(xmm2, xmm4);
+  sarl(ecx, 8);
+  movl(eax, ecx);
+  sarl(ecx, 1);
+  subl(eax, ecx);
+  shll(ecx, 20);
+  xorl(ecx, rsi);
+  movdl(xmm6, ecx);
+  movsd(xmm1, Address(tmp, 12512));
+  andl(edx, 32767);
+  cmpl(edx, 16529);
+  jcc(Assembler::above, L_2TAG_PACKET_14_0_2);
+  pshufd(xmm0, xmm2, 68);
+  pshufd(xmm4, xmm2, 68);
+  mulpd(xmm0, xmm0);
+  mulpd(xmm7, xmm4);
+  pshufd(xmm6, xmm6, 17);
+  mulsd(xmm1, xmm2);
+  mulsd(xmm0, xmm0);
+  paddd(xmm5, xmm6);
+  addpd(xmm3, xmm7);
+  mulsd(xmm1, xmm5);
+  pshufd(xmm6, xmm5, 238);
+  mulpd(xmm0, xmm3);
+  addsd(xmm1, xmm6);
+  pshufd(xmm3, xmm0, 238);
+  mulsd(xmm0, xmm5);
+  mulsd(xmm3, xmm5);
+  shll(eax, 4);
+  xorpd(xmm4, xmm4);
+  addl(eax, 16368);
+  pinsrw(xmm4, eax, 3);
+  addsd(xmm0, xmm1);
+  movl(rsi, Address(rsp, 24));
+  addsd(xmm0, xmm3);
+  movdqu(xmm1, xmm0);
+  addsd(xmm0, xmm5);
+  mulsd(xmm0, xmm4);
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_16_0_2);
+  cmpl(eax, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_17_0_2);
+
+  bind(L_2TAG_PACKET_18_0_2);
+  movsd(Address(rsp, 0), xmm0);
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_6_0_2);
+
+  bind(L_2TAG_PACKET_8_0_2);
+  movsd(xmm1, Address(rsp, 16));
+  movsd(xmm0, Address(rsp, 8));
+  movdqu(xmm2, xmm0);
+  movdl(eax, xmm2);
+  psrlq(xmm2, 20);
+  movdl(edx, xmm2);
+  orl(eax, edx);
+  jcc(Assembler::equal, L_2TAG_PACKET_19_0_2);
+  addsd(xmm0, xmm0);
+  movdl(eax, xmm1);
+  psrlq(xmm1, 32);
+  movdl(edx, xmm1);
+  movl(ecx, edx);
+  addl(edx, edx);
+  orl(eax, edx);
+  jcc(Assembler::equal, L_2TAG_PACKET_20_0_2);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_20_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 16368);
+  pinsrw(xmm0, eax, 3);
+  movl(edx, 29);
+  jmp(L_2TAG_PACKET_21_0_2);
+
+  bind(L_2TAG_PACKET_22_0_2);
+  movsd(xmm0, Address(rsp, 16));
+  addpd(xmm0, xmm0);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_19_0_2);
+  movdl(eax, xmm1);
+  movdqu(xmm2, xmm1);
+  psrlq(xmm1, 32);
+  movdl(edx, xmm1);
+  movl(ecx, edx);
+  addl(edx, edx);
+  orl(eax, edx);
+  jcc(Assembler::equal, L_2TAG_PACKET_23_0_2);
+  pextrw(eax, xmm2, 3);
+  andl(eax, 32752);
+  cmpl(eax, 32752);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_24_0_2);
+  movdl(eax, xmm2);
+  psrlq(xmm2, 20);
+  movdl(edx, xmm2);
+  orl(eax, edx);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_22_0_2);
+
+  bind(L_2TAG_PACKET_24_0_2);
+  pextrw(eax, xmm0, 3);
+  testl(eax, 32768);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_25_0_2);
+  testl(ecx, INT_MIN);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_26_0_2);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_27_0_2);
+  movsd(xmm1, Address(rsp, 16));
+  movdl(eax, xmm1);
+  testl(eax, 1);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_28_0_2);
+  testl(eax, 2);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_29_0_2);
+  jmp(L_2TAG_PACKET_28_0_2);
+
+  bind(L_2TAG_PACKET_25_0_2);
+  shrl(ecx, 20);
+  andl(ecx, 2047);
+  cmpl(ecx, 1075);
+  jcc(Assembler::above, L_2TAG_PACKET_28_0_2);
+  jcc(Assembler::equal, L_2TAG_PACKET_30_0_2);
+  cmpl(ecx, 1074);
+  jcc(Assembler::above, L_2TAG_PACKET_27_0_2);
+  cmpl(ecx, 1023);
+  jcc(Assembler::below, L_2TAG_PACKET_28_0_2);
+  movsd(xmm1, Address(rsp, 16));
+  movl(eax, 17208);
+  xorpd(xmm3, xmm3);
+  pinsrw(xmm3, eax, 3);
+  movdqu(xmm4, xmm3);
+  addsd(xmm3, xmm1);
+  subsd(xmm4, xmm3);
+  addsd(xmm1, xmm4);
+  pextrw(eax, xmm1, 3);
+  andl(eax, 32752);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_28_0_2);
+  movdl(eax, xmm3);
+  andl(eax, 1);
+  jcc(Assembler::equal, L_2TAG_PACKET_28_0_2);
+
+  bind(L_2TAG_PACKET_29_0_2);
+  movsd(xmm1, Address(rsp, 16));
+  pextrw(eax, xmm1, 3);
+  andl(eax, 32768);
+  jcc(Assembler::equal, L_2TAG_PACKET_18_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 32768);
+  pinsrw(xmm0, eax, 3);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_28_0_2);
+  movsd(xmm1, Address(rsp, 16));
+  pextrw(eax, xmm1, 3);
+  andl(eax, 32768);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_26_0_2);
+
+  bind(L_2TAG_PACKET_31_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 32752);
+  pinsrw(xmm0, eax, 3);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_30_0_2);
+  movsd(xmm1, Address(rsp, 16));
+  movdl(eax, xmm1);
+  andl(eax, 1);
+  jcc(Assembler::equal, L_2TAG_PACKET_28_0_2);
+  jmp(L_2TAG_PACKET_29_0_2);
+
+  bind(L_2TAG_PACKET_32_0_2);
+  movdl(eax, xmm1);
+  psrlq(xmm1, 20);
+  movdl(edx, xmm1);
+  orl(eax, edx);
+  jcc(Assembler::equal, L_2TAG_PACKET_33_0_2);
+  movsd(xmm0, Address(rsp, 16));
+  addsd(xmm0, xmm0);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_33_0_2);
+  movsd(xmm0, Address(rsp, 8));
+  pextrw(eax, xmm0, 3);
+  cmpl(eax, 49136);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_34_0_2);
+  movdl(ecx, xmm0);
+  psrlq(xmm0, 20);
+  movdl(edx, xmm0);
+  orl(ecx, edx);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_34_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 32760);
+  pinsrw(xmm0, eax, 3);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_34_0_2);
+  movsd(xmm1, Address(rsp, 16));
+  andl(eax, 32752);
+  subl(eax, 16368);
+  pextrw(edx, xmm1, 3);
+  xorpd(xmm0, xmm0);
+  xorl(eax, edx);
+  andl(eax, 32768);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_18_0_2);
+  movl(ecx, 32752);
+  pinsrw(xmm0, ecx, 3);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_35_0_2);
+  movdl(eax, xmm1);
+  cmpl(edx, 17184);
+  jcc(Assembler::above, L_2TAG_PACKET_36_0_2);
+  testl(eax, 1);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_37_0_2);
+  testl(eax, 2);
+  jcc(Assembler::equal, L_2TAG_PACKET_38_0_2);
+  jmp(L_2TAG_PACKET_39_0_2);
+
+  bind(L_2TAG_PACKET_36_0_2);
+  testl(eax, 1);
+  jcc(Assembler::equal, L_2TAG_PACKET_38_0_2);
+  jmp(L_2TAG_PACKET_39_0_2);
+
+  bind(L_2TAG_PACKET_9_0_2);
+  movsd(xmm2, Address(rsp, 8));
+  movdl(eax, xmm2);
+  psrlq(xmm2, 31);
+  movdl(ecx, xmm2);
+  orl(eax, ecx);
+  jcc(Assembler::equal, L_2TAG_PACKET_11_0_2);
+  movsd(xmm1, Address(rsp, 16));
+  pextrw(edx, xmm1, 3);
+  movdl(eax, xmm1);
+  movdqu(xmm2, xmm1);
+  psrlq(xmm2, 32);
+  movdl(ecx, xmm2);
+  addl(ecx, ecx);
+  orl(ecx, eax);
+  jcc(Assembler::equal, L_2TAG_PACKET_40_0_2);
+  andl(edx, 32752);
+  cmpl(edx, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_32_0_2);
+  cmpl(edx, 17200);
+  jcc(Assembler::above, L_2TAG_PACKET_38_0_2);
+  cmpl(edx, 17184);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_35_0_2);
+  cmpl(edx, 16368);
+  jcc(Assembler::below, L_2TAG_PACKET_37_0_2);
+  movl(eax, 17208);
+  xorpd(xmm2, xmm2);
+  pinsrw(xmm2, eax, 3);
+  movdqu(xmm4, xmm2);
+  addsd(xmm2, xmm1);
+  subsd(xmm4, xmm2);
+  addsd(xmm1, xmm4);
+  pextrw(eax, xmm1, 3);
+  andl(eax, 32767);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_37_0_2);
+  movdl(eax, xmm2);
+  andl(eax, 1);
+  jcc(Assembler::equal, L_2TAG_PACKET_38_0_2);
+
+  bind(L_2TAG_PACKET_39_0_2);
+  xorpd(xmm1, xmm1);
+  movl(edx, 30704);
+  pinsrw(xmm1, edx, 3);
+  movsd(xmm2, Address(tmp, 8256));
+  movsd(xmm4, Address(rsp, 8));
+  pextrw(eax, xmm4, 3);
+  movl(edx, 8192);
+  movdl(xmm4, edx);
+  andl(eax, 32767);
+  subl(eax, 16);
+  jcc(Assembler::less, L_2TAG_PACKET_12_0_2);
+  movl(edx, eax);
+  andl(edx, 32752);
+  subl(edx, 16368);
+  movl(ecx, edx);
+  sarl(edx, 31);
+  addl(ecx, edx);
+  xorl(ecx, edx);
+  addl(ecx, 16);
+  bsrl(ecx, ecx);
+  movl(rsi, INT_MIN);
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_37_0_2);
+  xorpd(xmm1, xmm1);
+  movl(eax, 32752);
+  pinsrw(xmm1, eax, 3);
+  xorpd(xmm0, xmm0);
+  mulsd(xmm0, xmm1);
+  movl(edx, 28);
+  jmp(L_2TAG_PACKET_21_0_2);
+
+  bind(L_2TAG_PACKET_38_0_2);
+  xorpd(xmm1, xmm1);
+  movl(edx, 30704);
+  pinsrw(xmm1, edx, 3);
+  movsd(xmm2, Address(tmp, 8256));
+  movsd(xmm4, Address(rsp, 8));
+  pextrw(eax, xmm4, 3);
+  movl(edx, 8192);
+  movdl(xmm4, edx);
+  andl(eax, 32767);
+  subl(eax, 16);
+  jcc(Assembler::less, L_2TAG_PACKET_10_0_2);
+  movl(edx, eax);
+  andl(edx, 32752);
+  subl(edx, 16368);
+  movl(ecx, edx);
+  sarl(edx, 31);
+  addl(ecx, edx);
+  xorl(ecx, edx);
+  addl(ecx, 16);
+  bsrl(ecx, ecx);
+  movl(rsi, 0);
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_23_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 16368);
+  pinsrw(xmm0, eax, 3);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_26_0_2);
+  xorpd(xmm0, xmm0);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_13_0_2);
+  addl(eax, 384);
+  cmpl(eax, 0);
+  jcc(Assembler::less, L_2TAG_PACKET_41_0_2);
+  mulsd(xmm5, xmm1);
+  addsd(xmm0, xmm7);
+  shrl(rsi, 31);
+  addpd(xmm3, xmm0);
+  pshufd(xmm0, xmm3, 238);
+  addsd(xmm3, xmm0);
+  movsd(xmm4, Address(tmp, rsi, Address::times_8, 12528));
+  mulsd(xmm1, xmm3);
+  xorpd(xmm0, xmm0);
+  movl(eax, 16368);
+  shll(rsi, 15);
+  orl(eax, rsi);
+  pinsrw(xmm0, eax, 3);
+  addsd(xmm5, xmm1);
+  movl(rsi, Address(rsp, 24));
+  mulsd(xmm5, xmm4);
+  addsd(xmm0, xmm5);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_41_0_2);
+  movl(rsi, Address(rsp, 24));
+  xorpd(xmm0, xmm0);
+  movl(eax, 16368);
+  pinsrw(xmm0, eax, 3);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_40_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 16368);
+  pinsrw(xmm0, eax, 3);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_42_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 16368);
+  pinsrw(xmm0, eax, 3);
+  movl(edx, 26);
+  jmp(L_2TAG_PACKET_21_0_2);
+
+  bind(L_2TAG_PACKET_11_0_2);
+  movsd(xmm1, Address(rsp, 16));
+  movdqu(xmm2, xmm1);
+  pextrw(eax, xmm1, 3);
+  andl(eax, 32752);
+  cmpl(eax, 32752);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_43_0_2);
+  movdl(eax, xmm2);
+  psrlq(xmm2, 20);
+  movdl(edx, xmm2);
+  orl(eax, edx);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_22_0_2);
+
+  bind(L_2TAG_PACKET_43_0_2);
+  movdl(eax, xmm1);
+  psrlq(xmm1, 32);
+  movdl(edx, xmm1);
+  movl(ecx, edx);
+  addl(edx, edx);
+  orl(eax, edx);
+  jcc(Assembler::equal, L_2TAG_PACKET_42_0_2);
+  shrl(edx, 21);
+  cmpl(edx, 1075);
+  jcc(Assembler::above, L_2TAG_PACKET_44_0_2);
+  jcc(Assembler::equal, L_2TAG_PACKET_45_0_2);
+  cmpl(edx, 1023);
+  jcc(Assembler::below, L_2TAG_PACKET_44_0_2);
+  movsd(xmm1, Address(rsp, 16));
+  movl(eax, 17208);
+  xorpd(xmm3, xmm3);
+  pinsrw(xmm3, eax, 3);
+  movdqu(xmm4, xmm3);
+  addsd(xmm3, xmm1);
+  subsd(xmm4, xmm3);
+  addsd(xmm1, xmm4);
+  pextrw(eax, xmm1, 3);
+  andl(eax, 32752);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_44_0_2);
+  movdl(eax, xmm3);
+  andl(eax, 1);
+  jcc(Assembler::equal, L_2TAG_PACKET_44_0_2);
+
+  bind(L_2TAG_PACKET_46_0_2);
+  movsd(xmm0, Address(rsp, 8));
+  testl(ecx, INT_MIN);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_47_0_2);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_45_0_2);
+  movsd(xmm1, Address(rsp, 16));
+  movdl(eax, xmm1);
+  testl(eax, 1);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_46_0_2);
+
+  bind(L_2TAG_PACKET_44_0_2);
+  testl(ecx, INT_MIN);
+  jcc(Assembler::equal, L_2TAG_PACKET_26_0_2);
+  xorpd(xmm0, xmm0);
+
+  bind(L_2TAG_PACKET_47_0_2);
+  movl(eax, 16368);
+  xorpd(xmm1, xmm1);
+  pinsrw(xmm1, eax, 3);
+  divsd(xmm1, xmm0);
+  movdqu(xmm0, xmm1);
+  movl(edx, 27);
+  jmp(L_2TAG_PACKET_21_0_2);
+
+  bind(L_2TAG_PACKET_14_0_2);
+  movsd(xmm2, Address(rsp, 8));
+  movsd(xmm6, Address(rsp, 16));
+  pextrw(eax, xmm2, 3);
+  pextrw(edx, xmm6, 3);
+  movl(ecx, 32752);
+  andl(ecx, edx);
+  cmpl(ecx, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_48_0_2);
+  andl(eax, 32752);
+  subl(eax, 16368);
+  xorl(edx, eax);
+  testl(edx, 32768);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_49_0_2);
+
+  bind(L_2TAG_PACKET_50_0_2);
+  movl(eax, 32736);
+  pinsrw(xmm0, eax, 3);
+  shrl(rsi, 16);
+  orl(eax, rsi);
+  pinsrw(xmm1, eax, 3);
+  movl(rsi, Address(rsp, 24));
+  mulsd(xmm0, xmm1);
+
+  bind(L_2TAG_PACKET_17_0_2);
+  movl(edx, 24);
+
+  bind(L_2TAG_PACKET_21_0_2);
+  movsd(Address(rsp, 0), xmm0);
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_6_0_2);
+
+  bind(L_2TAG_PACKET_49_0_2);
+  movl(eax, 16);
+  pinsrw(xmm0, eax, 3);
+  mulsd(xmm0, xmm0);
+  testl(rsi, INT_MIN);
+  jcc(Assembler::equal, L_2TAG_PACKET_51_0_2);
+  movsd(xmm2, Address(tmp, 12560));
+  xorpd(xmm0, xmm2);
+
+  bind(L_2TAG_PACKET_51_0_2);
+  movl(rsi, Address(rsp, 24));
+  movl(edx, 25);
+  jmp(L_2TAG_PACKET_21_0_2);
+
+  bind(L_2TAG_PACKET_16_0_2);
+  pextrw(ecx, xmm5, 3);
+  pextrw(edx, xmm4, 3);
+  movl(eax, -1);
+  andl(ecx, 32752);
+  subl(ecx, 16368);
+  andl(edx, 32752);
+  addl(edx, ecx);
+  movl(ecx, -31);
+  sarl(edx, 4);
+  subl(ecx, edx);
+  jcc(Assembler::lessEqual, L_2TAG_PACKET_52_0_2);
+  cmpl(ecx, 20);
+  jcc(Assembler::above, L_2TAG_PACKET_53_0_2);
+  shll(eax);
+
+  bind(L_2TAG_PACKET_52_0_2);
+  movdl(xmm0, eax);
+  psllq(xmm0, 32);
+  pand(xmm0, xmm5);
+  subsd(xmm5, xmm0);
+  addsd(xmm5, xmm1);
+  mulsd(xmm0, xmm4);
+  mulsd(xmm5, xmm4);
+  addsd(xmm0, xmm5);
+
+  bind(L_2TAG_PACKET_53_0_2);
+  movl(edx, 25);
+  jmp(L_2TAG_PACKET_21_0_2);
+
+  bind(L_2TAG_PACKET_2_0_2);
+  movzwl(ecx, Address(rsp, 22));
+  movl(edx, INT_MIN);
+  movdl(xmm1, edx);
+  xorpd(xmm7, xmm7);
+  paddd(xmm0, xmm4);
+  psllq(xmm5, 32);
+  movdl(edx, xmm0);
+  psllq(xmm0, 29);
+  paddq(xmm1, xmm3);
+  pand(xmm5, xmm1);
+  andl(ecx, 32752);
+  cmpl(ecx, 16560);
+  jcc(Assembler::below, L_2TAG_PACKET_3_0_2);
+  pand(xmm0, xmm6);
+  subsd(xmm3, xmm5);
+  addl(eax, 16351);
+  shrl(eax, 4);
+  subl(eax, 1022);
+  cvtsi2sdl(xmm7, eax);
+  mulpd(xmm5, xmm0);
+  movsd(xmm4, Address(tmp, 0));
+  mulsd(xmm3, xmm0);
+  movsd(xmm6, Address(tmp, 0));
+  subsd(xmm5, xmm2);
+  movsd(xmm1, Address(tmp, 8));
+  pshufd(xmm2, xmm3, 68);
+  unpcklpd(xmm5, xmm3);
+  addsd(xmm3, xmm5);
+  movsd(xmm0, Address(tmp, 8));
+  andl(edx, 16760832);
+  shrl(edx, 10);
+  addpd(xmm7, Address(tmp, edx, Address::times_1, -3616));
+  mulsd(xmm4, xmm5);
+  mulsd(xmm0, xmm5);
+  mulsd(xmm6, xmm2);
+  mulsd(xmm1, xmm2);
+  movdqu(xmm2, xmm5);
+  mulsd(xmm4, xmm5);
+  addsd(xmm5, xmm0);
+  movdqu(xmm0, xmm7);
+  addsd(xmm2, xmm3);
+  addsd(xmm7, xmm5);
+  mulsd(xmm6, xmm2);
+  subsd(xmm0, xmm7);
+  movdqu(xmm2, xmm7);
+  addsd(xmm7, xmm4);
+  addsd(xmm0, xmm5);
+  subsd(xmm2, xmm7);
+  addsd(xmm4, xmm2);
+  pshufd(xmm2, xmm5, 238);
+  movdqu(xmm5, xmm7);
+  addsd(xmm7, xmm2);
+  addsd(xmm4, xmm0);
+  movdqu(xmm0, Address(tmp, 8272));
+  subsd(xmm5, xmm7);
+  addsd(xmm6, xmm4);
+  movdqu(xmm4, xmm7);
+  addsd(xmm5, xmm2);
+  addsd(xmm7, xmm1);
+  movdqu(xmm2, Address(tmp, 8336));
+  subsd(xmm4, xmm7);
+  addsd(xmm6, xmm5);
+  addsd(xmm4, xmm1);
+  pshufd(xmm5, xmm7, 238);
+  movdqu(xmm1, xmm7);
+  addsd(xmm7, xmm5);
+  subsd(xmm1, xmm7);
+  addsd(xmm1, xmm5);
+  movdqu(xmm5, Address(tmp, 8352));
+  pshufd(xmm3, xmm3, 68);
+  addsd(xmm6, xmm4);
+  addsd(xmm6, xmm1);
+  movdqu(xmm1, Address(tmp, 8304));
+  mulpd(xmm0, xmm3);
+  mulpd(xmm2, xmm3);
+  pshufd(xmm4, xmm3, 68);
+  mulpd(xmm3, xmm3);
+  addpd(xmm0, xmm1);
+  addpd(xmm5, xmm2);
+  mulsd(xmm4, xmm3);
+  movsd(xmm2, Address(tmp, 16));
+  mulpd(xmm3, xmm3);
+  movsd(xmm1, Address(rsp, 16));
+  movzwl(ecx, Address(rsp, 22));
+  mulpd(xmm0, xmm4);
+  pextrw(eax, xmm7, 3);
+  mulpd(xmm5, xmm4);
+  mulpd(xmm0, xmm3);
+  movsd(xmm4, Address(tmp, 8376));
+  pand(xmm2, xmm7);
+  addsd(xmm5, xmm6);
+  subsd(xmm7, xmm2);
+  addpd(xmm5, xmm0);
+  andl(eax, 32752);
+  subl(eax, 16368);
+  andl(ecx, 32752);
+  cmpl(ecx, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_48_0_2);
+  addl(ecx, eax);
+  cmpl(ecx, 16576);
+  jcc(Assembler::aboveEqual, L_2TAG_PACKET_54_0_2);
+  pshufd(xmm0, xmm5, 238);
+  pand(xmm4, xmm1);
+  movdqu(xmm3, xmm1);
+  addsd(xmm5, xmm0);
+  subsd(xmm1, xmm4);
+  xorpd(xmm6, xmm6);
+  movl(edx, 17080);
+  pinsrw(xmm6, edx, 3);
+  addsd(xmm7, xmm5);
+  mulsd(xmm4, xmm2);
+  mulsd(xmm1, xmm2);
+  movdqu(xmm5, xmm6);
+  mulsd(xmm3, xmm7);
+  addsd(xmm6, xmm4);
+  addsd(xmm1, xmm3);
+  movdqu(xmm7, Address(tmp, 12480));
+  movdl(edx, xmm6);
+  subsd(xmm6, xmm5);
+  movdqu(xmm3, Address(tmp, 12496));
+  movsd(xmm2, Address(tmp, 12512));
+  subsd(xmm4, xmm6);
+  movl(ecx, edx);
+  andl(edx, 255);
+  addl(edx, edx);
+  movdqu(xmm5, Address(tmp, edx, Address::times_8, 8384));
+  addsd(xmm4, xmm1);
+  pextrw(edx, xmm6, 3);
+  shrl(ecx, 8);
+  movl(eax, ecx);
+  shrl(ecx, 1);
+  subl(eax, ecx);
+  shll(ecx, 20);
+  movdl(xmm6, ecx);
+  pshufd(xmm0, xmm4, 68);
+  pshufd(xmm1, xmm4, 68);
+  mulpd(xmm0, xmm0);
+  mulpd(xmm7, xmm1);
+  pshufd(xmm6, xmm6, 17);
+  mulsd(xmm2, xmm4);
+  andl(edx, 32767);
+  cmpl(edx, 16529);
+  jcc(Assembler::above, L_2TAG_PACKET_14_0_2);
+  mulsd(xmm0, xmm0);
+  paddd(xmm5, xmm6);
+  addpd(xmm3, xmm7);
+  mulsd(xmm2, xmm5);
+  pshufd(xmm6, xmm5, 238);
+  mulpd(xmm0, xmm3);
+  addsd(xmm2, xmm6);
+  pshufd(xmm3, xmm0, 238);
+  addl(eax, 1023);
+  shll(eax, 20);
+  orl(eax, rsi);
+  movdl(xmm4, eax);
+  mulsd(xmm0, xmm5);
+  mulsd(xmm3, xmm5);
+  addsd(xmm0, xmm2);
+  psllq(xmm4, 32);
+  addsd(xmm0, xmm3);
+  movdqu(xmm1, xmm0);
+  addsd(xmm0, xmm5);
+  movl(rsi, Address(rsp, 24));
+  mulsd(xmm0, xmm4);
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_16_0_2);
+  cmpl(eax, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_17_0_2);
+
+  bind(L_2TAG_PACKET_55_0_2);
+  movsd(Address(rsp, 0), xmm0);
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_6_0_2);
+
+  bind(L_2TAG_PACKET_48_0_2);
+  movl(rsi, Address(rsp, 24));
+
+  bind(L_2TAG_PACKET_56_0_2);
+  movsd(xmm0, Address(rsp, 8));
+  movsd(xmm1, Address(rsp, 16));
+  addsd(xmm1, xmm1);
+  xorpd(xmm2, xmm2);
+  movl(eax, 49136);
+  pinsrw(xmm2, eax, 3);
+  addsd(xmm2, xmm0);
+  pextrw(eax, xmm2, 3);
+  cmpl(eax, 0);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_57_0_2);
+  xorpd(xmm0, xmm0);
+  movl(eax, 32760);
+  pinsrw(xmm0, eax, 3);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_57_0_2);
+  movdl(edx, xmm1);
+  movdqu(xmm3, xmm1);
+  psrlq(xmm3, 20);
+  movdl(ecx, xmm3);
+  orl(ecx, edx);
+  jcc(Assembler::equal, L_2TAG_PACKET_58_0_2);
+  addsd(xmm1, xmm1);
+  movdqu(xmm0, xmm1);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_58_0_2);
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32752);
+  pextrw(edx, xmm1, 3);
+  xorpd(xmm0, xmm0);
+  subl(eax, 16368);
+  xorl(eax, edx);
+  testl(eax, 32768);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_18_0_2);
+  movl(edx, 32752);
+  pinsrw(xmm0, edx, 3);
+  jmp(L_2TAG_PACKET_18_0_2);
+
+  bind(L_2TAG_PACKET_54_0_2);
+  pextrw(eax, xmm1, 3);
+  pextrw(ecx, xmm2, 3);
+  xorl(eax, ecx);
+  testl(eax, 32768);
+  jcc(Assembler::equal, L_2TAG_PACKET_50_0_2);
+  jmp(L_2TAG_PACKET_49_0_2);
+
+  bind(L_2TAG_PACKET_6_0_2);
+  movl(tmp, Address(rsp, 64));
+
+}
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86_sin.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,2448 @@
+/*
+* Copyright (c) 2016, Intel Corporation.
+* Intel Math Library (LIBM) Source Code
+*
+* 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.
+*
+*/
+
+#include "precompiled.hpp"
+#include "asm/assembler.hpp"
+#include "asm/assembler.inline.hpp"
+#include "runtime/stubRoutines.hpp"
+#include "stubRoutines_x86.hpp"
+#include "macroAssembler_x86.hpp"
+
+#ifdef _MSC_VER
+#define ALIGNED_(x) __declspec(align(x))
+#else
+#define ALIGNED_(x) __attribute__ ((aligned(x)))
+#endif
+
+/******************************************************************************/
+//                     ALGORITHM DESCRIPTION - SIN()
+//                     ---------------------
+//
+//     1. RANGE REDUCTION
+//
+//     We perform an initial range reduction from X to r with
+//
+//          X =~= N * pi/32 + r
+//
+//     so that |r| <= pi/64 + epsilon. We restrict inputs to those
+//     where |N| <= 932560. Beyond this, the range reduction is
+//     insufficiently accurate. For extremely small inputs,
+//     denormalization can occur internally, impacting performance.
+//     This means that the main path is actually only taken for
+//     2^-252 <= |X| < 90112.
+//
+//     To avoid branches, we perform the range reduction to full
+//     accuracy each time.
+//
+//          X - N * (P_1 + P_2 + P_3)
+//
+//     where P_1 and P_2 are 32-bit numbers (so multiplication by N
+//     is exact) and P_3 is a 53-bit number. Together, these
+//     approximate pi well enough for all cases in the restricted
+//     range.
+//
+//     The main reduction sequence is:
+//
+//             y = 32/pi * x
+//             N = integer(y)
+//     (computed by adding and subtracting off SHIFTER)
+//
+//             m_1 = N * P_1
+//             m_2 = N * P_2
+//             r_1 = x - m_1
+//             r = r_1 - m_2
+//     (this r can be used for most of the calculation)
+//
+//             c_1 = r_1 - r
+//             m_3 = N * P_3
+//             c_2 = c_1 - m_2
+//             c = c_2 - m_3
+//
+//     2. MAIN ALGORITHM
+//
+//     The algorithm uses a table lookup based on B = M * pi / 32
+//     where M = N mod 64. The stored values are:
+//       sigma             closest power of 2 to cos(B)
+//       C_hl              53-bit cos(B) - sigma
+//       S_hi + S_lo       2 * 53-bit sin(B)
+//
+//     The computation is organized as follows:
+//
+//          sin(B + r + c) = [sin(B) + sigma * r] +
+//                           r * (cos(B) - sigma) +
+//                           sin(B) * [cos(r + c) - 1] +
+//                           cos(B) * [sin(r + c) - r]
+//
+//     which is approximately:
+//
+//          [S_hi + sigma * r] +
+//          C_hl * r +
+//          S_lo + S_hi * [(cos(r) - 1) - r * c] +
+//          (C_hl + sigma) * [(sin(r) - r) + c]
+//
+//     and this is what is actually computed. We separate this sum
+//     into four parts:
+//
+//          hi + med + pols + corr
+//
+//     where
+//
+//          hi       = S_hi + sigma r
+//          med      = C_hl * r
+//          pols     = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r)
+//          corr     = S_lo + c * ((C_hl + sigma) - S_hi * r)
+//
+//     3. POLYNOMIAL
+//
+//     The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) *
+//     (sin(r) - r) can be rearranged freely, since it is quite
+//     small, so we exploit parallelism to the fullest.
+//
+//          psc4       =   SC_4 * r_1
+//          msc4       =   psc4 * r
+//          r2         =   r * r
+//          msc2       =   SC_2 * r2
+//          r4         =   r2 * r2
+//          psc3       =   SC_3 + msc4
+//          psc1       =   SC_1 + msc2
+//          msc3       =   r4 * psc3
+//          sincospols =   psc1 + msc3
+//          pols       =   sincospols *
+//                         <S_hi * r^2 | (C_hl + sigma) * r^3>
+//
+//     4. CORRECTION TERM
+//
+//     This is where the "c" component of the range reduction is
+//     taken into account; recall that just "r" is used for most of
+//     the calculation.
+//
+//          -c   = m_3 - c_2
+//          -d   = S_hi * r - (C_hl + sigma)
+//          corr = -c * -d + S_lo
+//
+//     5. COMPENSATED SUMMATIONS
+//
+//     The two successive compensated summations add up the high
+//     and medium parts, leaving just the low parts to add up at
+//     the end.
+//
+//          rs        =  sigma * r
+//          res_int   =  S_hi + rs
+//          k_0       =  S_hi - res_int
+//          k_2       =  k_0 + rs
+//          med       =  C_hl * r
+//          res_hi    =  res_int + med
+//          k_1       =  res_int - res_hi
+//          k_3       =  k_1 + med
+//
+//     6. FINAL SUMMATION
+//
+//     We now add up all the small parts:
+//
+//          res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3
+//
+//     Now the overall result is just:
+//
+//          res_hi + res_lo
+//
+//     7. SMALL ARGUMENTS
+//
+//     If |x| < SNN (SNN meaning the smallest normal number), we
+//     simply perform 0.1111111 cdots 1111 * x. For SNN <= |x|, we
+//     do 2^-55 * (2^55 * x - x).
+//
+// Special cases:
+//  sin(NaN) = quiet NaN, and raise invalid exception
+//  sin(INF) = NaN and raise invalid exception
+//  sin(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#ifdef _LP64
+// The 64 bit code is at most SSE2 compliant
+ALIGNED_(16) juint StubRoutines::x86::_ONEHALF[] =
+{
+    0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
+};
+
+ALIGNED_(16) juint StubRoutines::x86::_P_2[] =
+{
+    0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
+};
+
+ALIGNED_(16) juint StubRoutines::x86::_SC_4[] =
+{
+    0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL
+};
+
+ALIGNED_(16) juint StubRoutines::x86::_Ctable[] =
+{
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL, 0xbf73b92eUL,
+    0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
+    0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL,
+    0xc0000000UL, 0xbc626d19UL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL,
+    0xbfa60beaUL, 0x2ed59f06UL, 0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL,
+    0x00000000UL, 0x3ff00000UL, 0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL,
+    0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL, 0x00000000UL, 0x3ff00000UL,
+    0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL, 0x20000000UL,
+    0x3c5e0d89UL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL, 0xbfc59267UL,
+    0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
+    0x3ff00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL,
+    0x20000000UL, 0x3c68076aUL, 0x00000000UL, 0x3ff00000UL, 0x99fcef32UL,
+    0x3fca8279UL, 0x667f3bcdUL, 0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL,
+    0x00000000UL, 0x3fe00000UL, 0x94247758UL, 0x3fc133ccUL, 0x6b151741UL,
+    0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL, 0x00000000UL, 0x3fe00000UL,
+    0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL, 0xe0000000UL,
+    0x3c39f630UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL, 0xbf9d4a2cUL,
+    0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
+    0x3fe00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0x3fed906bUL,
+    0x20000000UL, 0x3c7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x76acf82dUL,
+    0x3fa4a031UL, 0x56c62ddaUL, 0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL,
+    0x00000000UL, 0x3fd00000UL, 0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL,
+    0x3fef6297UL, 0x20000000UL, 0x3c756217UL, 0x00000000UL, 0x3fd00000UL,
+    0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL, 0x3fefd88dUL, 0x40000000UL,
+    0xbc887df6UL, 0x00000000UL, 0x3fc00000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0x3fefd88dUL,
+    0x40000000UL, 0xbc887df6UL, 0x00000000UL, 0xbfc00000UL, 0x0e5967d5UL,
+    0x3fac1d1fUL, 0xcff75cb0UL, 0x3fef6297UL, 0x20000000UL, 0x3c756217UL,
+    0x00000000UL, 0xbfd00000UL, 0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL,
+    0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL, 0x00000000UL, 0xbfd00000UL,
+    0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL, 0x3fed906bUL, 0x20000000UL,
+    0x3c7457e6UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL, 0x3f9d4a2cUL,
+    0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
+    0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL,
+    0xe0000000UL, 0x3c39f630UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL,
+    0xbfc133ccUL, 0x6b151741UL, 0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL,
+    0x00000000UL, 0xbfe00000UL, 0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL,
+    0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL, 0x00000000UL, 0xbfe00000UL,
+    0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL, 0x20000000UL,
+    0x3c68076aUL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL, 0x3fc59267UL,
+    0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
+    0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL,
+    0x20000000UL, 0x3c5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL,
+    0x3fb37ca1UL, 0xa6aea963UL, 0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL,
+    0x00000000UL, 0xbff00000UL, 0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL,
+    0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL, 0x00000000UL, 0xbff00000UL,
+    0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL, 0xc0000000UL,
+    0xbc626d19UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL, 0x3f73b92eUL,
+    0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
+    0xbff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL,
+    0x3f73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
+    0x00000000UL, 0xbff00000UL, 0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL,
+    0xbfc8f8b8UL, 0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0xbff00000UL,
+    0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL,
+    0x3c75d28dUL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL, 0x3fb37ca1UL,
+    0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL, 0x3c672cedUL, 0x00000000UL,
+    0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0xbfde2b5dUL,
+    0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL,
+    0x3fc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
+    0x00000000UL, 0xbff00000UL, 0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL,
+    0xbfe44cf3UL, 0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0xbff00000UL,
+    0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL,
+    0x3c8bdd34UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL, 0xbfc133ccUL,
+    0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL, 0x3c82c5e1UL, 0x00000000UL,
+    0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0xbfea9b66UL,
+    0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL,
+    0x3f9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
+    0x00000000UL, 0xbfe00000UL, 0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL,
+    0xbfed906bUL, 0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0xbfe00000UL,
+    0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL,
+    0xbc8760b1UL, 0x00000000UL, 0xbfd00000UL, 0x0e5967d5UL, 0x3fac1d1fUL,
+    0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL, 0xbc756217UL, 0x00000000UL,
+    0xbfd00000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0xbfefd88dUL,
+    0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0xbfc00000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL,
+    0xbfefd88dUL, 0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0x3fc00000UL,
+    0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL,
+    0xbc756217UL, 0x00000000UL, 0x3fd00000UL, 0x76acf82dUL, 0x3fa4a031UL,
+    0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL, 0xbc8760b1UL, 0x00000000UL,
+    0x3fd00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0xbfed906bUL,
+    0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL,
+    0xbf9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
+    0x00000000UL, 0x3fe00000UL, 0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL,
+    0xbfea9b66UL, 0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0x3fe00000UL,
+    0x94247758UL, 0x3fc133ccUL, 0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL,
+    0x3c82c5e1UL, 0x00000000UL, 0x3fe00000UL, 0x99fcef32UL, 0x3fca8279UL,
+    0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL, 0x3c8bdd34UL, 0x00000000UL,
+    0x3fe00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0xbfe44cf3UL,
+    0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL,
+    0xbfc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
+    0x00000000UL, 0x3ff00000UL, 0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL,
+    0xbfde2b5dUL, 0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0x3ff00000UL,
+    0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL,
+    0x3c672cedUL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL, 0xbfa60beaUL,
+    0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL, 0x3c75d28dUL, 0x00000000UL,
+    0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0xbfc8f8b8UL,
+    0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL,
+    0xbf73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
+    0x00000000UL, 0x3ff00000UL
+};
+
+ALIGNED_(16) juint StubRoutines::x86::_SC_2[] =
+{
+    0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
+};
+
+ALIGNED_(16) juint StubRoutines::x86::_SC_3[] =
+{
+    0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
+};
+
+ALIGNED_(16) juint StubRoutines::x86::_SC_1[] =
+{
+    0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
+};
+
+ALIGNED_(16) juint StubRoutines::x86::_PI_INV_TABLE[] =
+{
+    0x00000000UL, 0x00000000UL, 0xa2f9836eUL, 0x4e441529UL, 0xfc2757d1UL,
+    0xf534ddc0UL, 0xdb629599UL, 0x3c439041UL, 0xfe5163abUL, 0xdebbc561UL,
+    0xb7246e3aUL, 0x424dd2e0UL, 0x06492eeaUL, 0x09d1921cUL, 0xfe1deb1cUL,
+    0xb129a73eUL, 0xe88235f5UL, 0x2ebb4484UL, 0xe99c7026UL, 0xb45f7e41UL,
+    0x3991d639UL, 0x835339f4UL, 0x9c845f8bUL, 0xbdf9283bUL, 0x1ff897ffUL,
+    0xde05980fUL, 0xef2f118bUL, 0x5a0a6d1fUL, 0x6d367ecfUL, 0x27cb09b7UL,
+    0x4f463f66UL, 0x9e5fea2dUL, 0x7527bac7UL, 0xebe5f17bUL, 0x3d0739f7UL,
+    0x8a5292eaUL, 0x6bfb5fb1UL, 0x1f8d5d08UL, 0x56033046UL, 0xfc7b6babUL,
+    0xf0cfbc21UL
+};
+
+ALIGNED_(8) juint StubRoutines::x86::_PI_4[] =
+{
+    0x40000000UL, 0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
+};
+
+ALIGNED_(8) juint StubRoutines::x86::_PI32INV[] =
+{
+    0x6dc9c883UL, 0x40245f30UL
+};
+
+ALIGNED_(8) juint _SHIFTER[] =
+{
+    0x00000000UL, 0x43380000UL
+};
+
+ALIGNED_(8) juint StubRoutines::x86::_SIGN_MASK[] =
+{
+    0x00000000UL, 0x80000000UL
+};
+
+ALIGNED_(8) juint StubRoutines::x86::_P_3[] =
+{
+    0x2e037073UL, 0x3b63198aUL
+};
+
+ALIGNED_(8) juint _ALL_ONES[] =
+{
+    0xffffffffUL, 0x3fefffffUL
+};
+
+ALIGNED_(8) juint _TWO_POW_55[] =
+{
+    0x00000000UL, 0x43600000UL
+};
+
+ALIGNED_(8) juint _TWO_POW_M55[] =
+{
+    0x00000000UL, 0x3c800000UL
+};
+
+ALIGNED_(8) juint StubRoutines::x86::_P_1[] =
+{
+    0x54400000UL, 0x3fb921fbUL
+};
+
+ALIGNED_(8) juint StubRoutines::x86::_NEG_ZERO[] =
+{
+    0x00000000UL, 0x3c800000UL
+};
+
+void MacroAssembler::fast_sin(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ebx, Register ecx, Register edx, Register tmp1, Register tmp2, Register tmp3, Register tmp4) {
+  Label L_2TAG_PACKET_0_0_1, L_2TAG_PACKET_1_0_1, L_2TAG_PACKET_2_0_1, L_2TAG_PACKET_3_0_1;
+  Label L_2TAG_PACKET_4_0_1, L_2TAG_PACKET_5_0_1, L_2TAG_PACKET_6_0_1, L_2TAG_PACKET_7_0_1;
+  Label L_2TAG_PACKET_8_0_1, L_2TAG_PACKET_9_0_1, L_2TAG_PACKET_10_0_1, L_2TAG_PACKET_11_0_1;
+  Label L_2TAG_PACKET_13_0_1, L_2TAG_PACKET_14_0_1;
+  Label L_2TAG_PACKET_12_0_1, B1_1, B1_2, B1_4, start;
+
+  assert_different_registers(tmp1, tmp2, tmp3, tmp4, eax, ebx, ecx, edx);
+  address ONEHALF = StubRoutines::x86::_ONEHALF_addr();
+  address P_2 = StubRoutines::x86::_P_2_addr();
+  address SC_4 = StubRoutines::x86::_SC_4_addr();
+  address Ctable = StubRoutines::x86::_Ctable_addr();
+  address SC_2 = StubRoutines::x86::_SC_2_addr();
+  address SC_3 = StubRoutines::x86::_SC_3_addr();
+  address SC_1 = StubRoutines::x86::_SC_1_addr();
+  address PI_INV_TABLE = StubRoutines::x86::_PI_INV_TABLE_addr();
+  address PI_4 = (address)StubRoutines::x86::_PI_4_addr();
+  address PI32INV = (address)StubRoutines::x86::_PI32INV_addr();
+  address SHIFTER = (address)_SHIFTER;
+  address SIGN_MASK = (address)StubRoutines::x86::_SIGN_MASK_addr();
+  address P_3 = (address)StubRoutines::x86::_P_3_addr();
+  address ALL_ONES = (address)_ALL_ONES;
+  address TWO_POW_55 = (address)_TWO_POW_55;
+  address TWO_POW_M55 = (address)_TWO_POW_M55;
+  address P_1 = (address)StubRoutines::x86::_P_1_addr();
+  address NEG_ZERO = (address)StubRoutines::x86::_NEG_ZERO_addr();
+
+  bind(start);
+  push(rbx);
+  subq(rsp, 16);
+  movsd(Address(rsp, 8), xmm0);
+  movl(eax, Address(rsp, 12));
+  movq(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x40245f30UL
+  movq(xmm2, ExternalAddress(SHIFTER));    //0x00000000UL, 0x43380000UL
+  andl(eax, 2147418112);
+  subl(eax, 808452096);
+  cmpl(eax, 281346048);
+  jcc(Assembler::above, L_2TAG_PACKET_0_0_1);
+  mulsd(xmm1, xmm0);
+  movdqu(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
+  movq(xmm4, ExternalAddress(SIGN_MASK));    //0x00000000UL, 0x80000000UL
+  pand(xmm4, xmm0);
+  por(xmm5, xmm4);
+  addpd(xmm1, xmm5);
+  cvttsd2sil(edx, xmm1);
+  cvtsi2sdl(xmm1, edx);
+  movdqu(xmm6, ExternalAddress(P_2));    //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
+  mov64(r8, 0x3fb921fb54400000);
+  movdq(xmm3, r8);
+  movdqu(xmm5, ExternalAddress(SC_4));    //0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL
+  pshufd(xmm4, xmm0, 68);
+  mulsd(xmm3, xmm1);
+  if (VM_Version::supports_sse3()) {
+    movddup(xmm1, xmm1);
+  }
+  else {
+    movlhps(xmm1, xmm1);
+  }
+  andl(edx, 63);
+  shll(edx, 5);
+  lea(rax, ExternalAddress(Ctable));
+  addq(rax, rdx);
+  mulpd(xmm6, xmm1);
+  mulsd(xmm1, ExternalAddress(P_3));    //0x2e037073UL, 0x3b63198aUL
+  subsd(xmm4, xmm3);
+  movq(xmm7, Address(rax, 8));
+  subsd(xmm0, xmm3);
+  if (VM_Version::supports_sse3()) {
+    movddup(xmm3, xmm4);
+  }
+  else {
+    movdqu(xmm3, xmm4);
+    movlhps(xmm3, xmm3);
+  }
+  subsd(xmm4, xmm6);
+  pshufd(xmm0, xmm0, 68);
+  movdqu(xmm2, Address(rax, 0));
+  mulpd(xmm5, xmm0);
+  subpd(xmm0, xmm6);
+  mulsd(xmm7, xmm4);
+  subsd(xmm3, xmm4);
+  mulpd(xmm5, xmm0);
+  mulpd(xmm0, xmm0);
+  subsd(xmm3, xmm6);
+  movdqu(xmm6, ExternalAddress(SC_2));    //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
+  subsd(xmm1, xmm3);
+  movq(xmm3, Address(rax, 24));
+  addsd(xmm2, xmm3);
+  subsd(xmm7, xmm2);
+  mulsd(xmm2, xmm4);
+  mulpd(xmm6, xmm0);
+  mulsd(xmm3, xmm4);
+  mulpd(xmm2, xmm0);
+  mulpd(xmm0, xmm0);
+  addpd(xmm5, ExternalAddress(SC_3));    //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
+  mulsd(xmm4, Address(rax, 0));
+  addpd(xmm6, ExternalAddress(SC_1));    //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
+  mulpd(xmm5, xmm0);
+  movdqu(xmm0, xmm3);
+  addsd(xmm3, Address(rax, 8));
+  mulpd(xmm1, xmm7);
+  movdqu(xmm7, xmm4);
+  addsd(xmm4, xmm3);
+  addpd(xmm6, xmm5);
+  movq(xmm5, Address(rax, 8));
+  subsd(xmm5, xmm3);
+  subsd(xmm3, xmm4);
+  addsd(xmm1, Address(rax, 16));
+  mulpd(xmm6, xmm2);
+  addsd(xmm5, xmm0);
+  addsd(xmm3, xmm7);
+  addsd(xmm1, xmm5);
+  addsd(xmm1, xmm3);
+  addsd(xmm1, xmm6);
+  unpckhpd(xmm6, xmm6);
+  movdqu(xmm0, xmm4);
+  addsd(xmm1, xmm6);
+  addsd(xmm0, xmm1);
+  jmp(B1_4);
+
+  bind(L_2TAG_PACKET_0_0_1);
+  jcc(Assembler::greater, L_2TAG_PACKET_1_0_1);
+  shrl(eax, 20);
+  cmpl(eax, 3325);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_2_0_1);
+  mulsd(xmm0, ExternalAddress(ALL_ONES));    //0xffffffffUL, 0x3fefffffUL
+  jmp(B1_4);
+
+  bind(L_2TAG_PACKET_2_0_1);
+  movq(xmm3, ExternalAddress(TWO_POW_55));    //0x00000000UL, 0x43600000UL
+  mulsd(xmm3, xmm0);
+  subsd(xmm3, xmm0);
+  mulsd(xmm3, ExternalAddress(TWO_POW_M55));    //0x00000000UL, 0x3c800000UL
+  jmp(B1_4);
+
+  bind(L_2TAG_PACKET_1_0_1);
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32752);
+  cmpl(eax, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_3_0_1);
+  pextrw(ecx, xmm0, 3);
+  andl(ecx, 32752);
+  subl(ecx, 16224);
+  shrl(ecx, 7);
+  andl(ecx, 65532);
+  lea(r11, ExternalAddress(PI_INV_TABLE));
+  addq(rcx, r11);
+  movdq(rax, xmm0);
+  movl(r10, Address(rcx, 20));
+  movl(r8, Address(rcx, 24));
+  movl(edx, eax);
+  shrq(rax, 21);
+  orl(eax, INT_MIN);
+  shrl(eax, 11);
+  movl(r9, r10);
+  imulq(r10, rdx);
+  imulq(r9, rax);
+  imulq(r8, rax);
+  movl(rsi, Address(rcx, 16));
+  movl(rdi, Address(rcx, 12));
+  movl(r11, r10);
+  shrq(r10, 32);
+  addq(r9, r10);
+  addq(r11, r8);
+  movl(r8, r11);
+  shrq(r11, 32);
+  addq(r9, r11);
+  movl(r10, rsi);
+  imulq(rsi, rdx);
+  imulq(r10, rax);
+  movl(r11, rdi);
+  imulq(rdi, rdx);
+  movl(ebx, rsi);
+  shrq(rsi, 32);
+  addq(r9, rbx);
+  movl(ebx, r9);
+  shrq(r9, 32);
+  addq(r10, rsi);
+  addq(r10, r9);
+  shlq(rbx, 32);
+  orq(r8, rbx);
+  imulq(r11, rax);
+  movl(r9, Address(rcx, 8));
+  movl(rsi, Address(rcx, 4));
+  movl(ebx, rdi);
+  shrq(rdi, 32);
+  addq(r10, rbx);
+  movl(ebx, r10);
+  shrq(r10, 32);
+  addq(r11, rdi);
+  addq(r11, r10);
+  movq(rdi, r9);
+  imulq(r9, rdx);
+  imulq(rdi, rax);
+  movl(r10, r9);
+  shrq(r9, 32);
+  addq(r11, r10);
+  movl(r10, r11);
+  shrq(r11, 32);
+  addq(rdi, r9);
+  addq(rdi, r11);
+  movq(r9, rsi);
+  imulq(rsi, rdx);
+  imulq(r9, rax);
+  shlq(r10, 32);
+  orq(r10, rbx);
+  movl(eax, Address(rcx, 0));
+  movl(r11, rsi);
+  shrq(rsi, 32);
+  addq(rdi, r11);
+  movl(r11, rdi);
+  shrq(rdi, 32);
+  addq(r9, rsi);
+  addq(r9, rdi);
+  imulq(rdx, rax);
+  pextrw(ebx, xmm0, 3);
+  lea(rdi, ExternalAddress(PI_INV_TABLE));
+  subq(rcx, rdi);
+  addl(ecx, ecx);
+  addl(ecx, ecx);
+  addl(ecx, ecx);
+  addl(ecx, 19);
+  movl(rsi, 32768);
+  andl(rsi, ebx);
+  shrl(ebx, 4);
+  andl(ebx, 2047);
+  subl(ebx, 1023);
+  subl(ecx, ebx);
+  addq(r9, rdx);
+  movl(edx, ecx);
+  addl(edx, 32);
+  cmpl(ecx, 1);
+  jcc(Assembler::less, L_2TAG_PACKET_4_0_1);
+  negl(ecx);
+  addl(ecx, 29);
+  shll(r9);
+  movl(rdi, r9);
+  andl(r9, 536870911);
+  testl(r9, 268435456);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_5_0_1);
+  shrl(r9);
+  movl(ebx, 0);
+  shlq(r9, 32);
+  orq(r9, r11);
+
+  bind(L_2TAG_PACKET_6_0_1);
+
+  bind(L_2TAG_PACKET_7_0_1);
+
+  cmpq(r9, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_8_0_1);
+
+  bind(L_2TAG_PACKET_9_0_1);
+  bsrq(r11, r9);
+  movl(ecx, 29);
+  subl(ecx, r11);
+  jcc(Assembler::lessEqual, L_2TAG_PACKET_10_0_1);
+  shlq(r9);
+  movq(rax, r10);
+  shlq(r10);
+  addl(edx, ecx);
+  negl(ecx);
+  addl(ecx, 64);
+  shrq(rax);
+  shrq(r8);
+  orq(r9, rax);
+  orq(r10, r8);
+
+  bind(L_2TAG_PACKET_11_0_1);
+  cvtsi2sdq(xmm0, r9);
+  shrq(r10, 1);
+  cvtsi2sdq(xmm3, r10);
+  xorpd(xmm4, xmm4);
+  shll(edx, 4);
+  negl(edx);
+  addl(edx, 16368);
+  orl(edx, rsi);
+  xorl(edx, ebx);
+  pinsrw(xmm4, edx, 3);
+  movq(xmm2, ExternalAddress(PI_4));    //0x40000000UL, 0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
+  movq(xmm6, ExternalAddress(8 + PI_4));    //0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
+  xorpd(xmm5, xmm5);
+  subl(edx, 1008);
+  pinsrw(xmm5, edx, 3);
+  mulsd(xmm0, xmm4);
+  shll(rsi, 16);
+  sarl(rsi, 31);
+  mulsd(xmm3, xmm5);
+  movdqu(xmm1, xmm0);
+  mulsd(xmm0, xmm2);
+  shrl(rdi, 29);
+  addsd(xmm1, xmm3);
+  mulsd(xmm3, xmm2);
+  addl(rdi, rsi);
+  xorl(rdi, rsi);
+  mulsd(xmm6, xmm1);
+  movl(eax, rdi);
+  addsd(xmm6, xmm3);
+  movdqu(xmm2, xmm0);
+  addsd(xmm0, xmm6);
+  subsd(xmm2, xmm0);
+  addsd(xmm6, xmm2);
+
+  bind(L_2TAG_PACKET_12_0_1);
+  movq(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x40245f30UL
+  mulsd(xmm1, xmm0);
+  movq(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
+  movq(xmm4, ExternalAddress(SIGN_MASK));    //0x00000000UL, 0x80000000UL
+  pand(xmm4, xmm0);
+  por(xmm5, xmm4);
+  addpd(xmm1, xmm5);
+  cvttsd2sil(edx, xmm1);
+  cvtsi2sdl(xmm1, edx);
+  movq(xmm3, ExternalAddress(P_1));    //0x54400000UL, 0x3fb921fbUL
+  movdqu(xmm2, ExternalAddress(P_2));    //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
+  mulsd(xmm3, xmm1);
+  unpcklpd(xmm1, xmm1);
+  shll(eax, 3);
+  addl(edx, 1865216);
+  movdqu(xmm4, xmm0);
+  addl(edx, eax);
+  andl(edx, 63);
+  movdqu(xmm5, ExternalAddress(SC_4));    //0x54400000UL, 0x3fb921fbUL
+  lea(rax, ExternalAddress(Ctable));
+  shll(edx, 5);
+  addq(rax, rdx);
+  mulpd(xmm2, xmm1);
+  subsd(xmm0, xmm3);
+  mulsd(xmm1, ExternalAddress(P_3));    //0x2e037073UL, 0x3b63198aUL
+  subsd(xmm4, xmm3);
+  movq(xmm7, Address(rax, 8));
+  unpcklpd(xmm0, xmm0);
+  movdqu(xmm3, xmm4);
+  subsd(xmm4, xmm2);
+  mulpd(xmm5, xmm0);
+  subpd(xmm0, xmm2);
+  mulsd(xmm7, xmm4);
+  subsd(xmm3, xmm4);
+  mulpd(xmm5, xmm0);
+  mulpd(xmm0, xmm0);
+  subsd(xmm3, xmm2);
+  movdqu(xmm2, Address(rax, 0));
+  subsd(xmm1, xmm3);
+  movq(xmm3, Address(rax, 24));
+  addsd(xmm2, xmm3);
+  subsd(xmm7, xmm2);
+  subsd(xmm1, xmm6);
+  movdqu(xmm6, ExternalAddress(SC_2));    //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
+  mulsd(xmm2, xmm4);
+  mulpd(xmm6, xmm0);
+  mulsd(xmm3, xmm4);
+  mulpd(xmm2, xmm0);
+  mulpd(xmm0, xmm0);
+  addpd(xmm5, ExternalAddress(SC_3));    //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
+  mulsd(xmm4, Address(rax, 0));
+  addpd(xmm6, ExternalAddress(SC_1));    //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
+  mulpd(xmm5, xmm0);
+  movdqu(xmm0, xmm3);
+  addsd(xmm3, Address(rax, 8));
+  mulpd(xmm1, xmm7);
+  movdqu(xmm7, xmm4);
+  addsd(xmm4, xmm3);
+  addpd(xmm6, xmm5);
+  movq(xmm5, Address(rax, 8));
+  subsd(xmm5, xmm3);
+  subsd(xmm3, xmm4);
+  addsd(xmm1, Address(rax, 16));
+  mulpd(xmm6, xmm2);
+  addsd(xmm5, xmm0);
+  addsd(xmm3, xmm7);
+  addsd(xmm1, xmm5);
+  addsd(xmm1, xmm3);
+  addsd(xmm1, xmm6);
+  unpckhpd(xmm6, xmm6);
+  movdqu(xmm0, xmm4);
+  addsd(xmm1, xmm6);
+  addsd(xmm0, xmm1);
+  jmp(B1_4);
+
+  bind(L_2TAG_PACKET_8_0_1);
+  addl(edx, 64);
+  movq(r9, r10);
+  movq(r10, r8);
+  movl(r8, 0);
+  cmpq(r9, 0);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_9_0_1);
+  addl(edx, 64);
+  movq(r9, r10);
+  movq(r10, r8);
+  cmpq(r9, 0);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_9_0_1);
+  xorpd(xmm0, xmm0);
+  xorpd(xmm6, xmm6);
+  jmp(L_2TAG_PACKET_12_0_1);
+
+  bind(L_2TAG_PACKET_10_0_1);
+  jcc(Assembler::equal, L_2TAG_PACKET_11_0_1);
+  negl(ecx);
+  shrq(r10);
+  movq(rax, r9);
+  shrq(r9);
+  subl(edx, ecx);
+  negl(ecx);
+  addl(ecx, 64);
+  shlq(rax);
+  orq(r10, rax);
+  jmp(L_2TAG_PACKET_11_0_1);
+
+  bind(L_2TAG_PACKET_4_0_1);
+  negl(ecx);
+  shlq(r9, 32);
+  orq(r9, r11);
+  shlq(r9);
+  movq(rdi, r9);
+  testl(r9, INT_MIN);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_13_0_1);
+  shrl(r9);
+  movl(ebx, 0);
+  shrq(rdi, 3);
+  jmp(L_2TAG_PACKET_7_0_1);
+
+  bind(L_2TAG_PACKET_5_0_1);
+  shrl(r9);
+  movl(ebx, 536870912);
+  shrl(ebx);
+  shlq(r9, 32);
+  orq(r9, r11);
+  shlq(rbx, 32);
+  addl(rdi, 536870912);
+  movl(rcx, 0);
+  movl(r11, 0);
+  subq(rcx, r8);
+  sbbq(r11, r10);
+  sbbq(rbx, r9);
+  movq(r8, rcx);
+  movq(r10, r11);
+  movq(r9, rbx);
+  movl(ebx, 32768);
+  jmp(L_2TAG_PACKET_6_0_1);
+
+  bind(L_2TAG_PACKET_13_0_1);
+  shrl(r9);
+  mov64(rbx, 0x100000000);
+  shrq(rbx);
+  movl(rcx, 0);
+  movl(r11, 0);
+  subq(rcx, r8);
+  sbbq(r11, r10);
+  sbbq(rbx, r9);
+  movq(r8, rcx);
+  movq(r10, r11);
+  movq(r9, rbx);
+  movl(ebx, 32768);
+  shrq(rdi, 3);
+  addl(rdi, 536870912);
+  jmp(L_2TAG_PACKET_7_0_1);
+
+  bind(L_2TAG_PACKET_3_0_1);
+  movq(xmm0, Address(rsp, 8));
+  mulsd(xmm0, ExternalAddress(NEG_ZERO));    //0x00000000UL, 0x80000000UL
+  movq(Address(rsp, 0), xmm0);
+
+  bind(L_2TAG_PACKET_14_0_1);
+
+  bind(B1_4);
+  addq(rsp, 16);
+  pop(rbx);
+}
+#else
+// The 32 bit code is at most SSE2 compliant
+ALIGNED_(8) juint _zero_none[] =
+{
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0xbff00000UL
+};
+
+ALIGNED_(4) juint __4onpi_d[] =
+{
+    0x6dc9c883UL, 0x3ff45f30UL
+};
+
+ALIGNED_(4) juint _TWO_32H[] =
+{
+    0x00000000UL, 0x41f80000UL
+};
+
+ALIGNED_(4) juint _pi04_3d[] =
+{
+    0x54442d00UL, 0x3fe921fbUL, 0x98cc5180UL, 0x3ce84698UL, 0xcbb5bf6cUL,
+    0xb9dfc8f8UL
+};
+
+ALIGNED_(4) juint _pi04_5d[] =
+{
+    0x54400000UL, 0x3fe921fbUL, 0x1a600000UL, 0x3dc0b461UL, 0x2e000000UL,
+    0x3b93198aUL, 0x25200000UL, 0x396b839aUL, 0x533e63a0UL, 0x37027044UL
+};
+
+ALIGNED_(4) juint _SCALE[] =
+{
+    0x00000000UL, 0x32600000UL
+};
+
+ALIGNED_(4) juint _zeros[] =
+{
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x80000000UL
+};
+
+ALIGNED_(4) juint _pi04_2d[] =
+{
+    0x54400000UL, 0x3fe921fbUL, 0x1a626331UL, 0x3dc0b461UL
+};
+
+ALIGNED_(4) juint _TWO_12H[] =
+{
+    0x00000000UL, 0x40b80000UL
+};
+
+ALIGNED_(2) jushort __4onpi_31l[] =
+{
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x836e, 0xa2f9,
+    0x40d8, 0x0000, 0x0000, 0x0000, 0x2a50, 0x9c88, 0x40b7, 0x0000, 0x0000, 0x0000,
+    0xabe8, 0xfe13, 0x4099, 0x0000, 0x0000, 0x0000, 0x6ee0, 0xfa9a, 0x4079, 0x0000,
+    0x0000, 0x0000, 0x9580, 0xdb62, 0x4058, 0x0000, 0x0000, 0x0000, 0x1c82, 0xc9e2,
+    0x403d, 0x0000, 0x0000, 0x0000, 0xb1c0, 0xff28, 0x4019, 0x0000, 0x0000, 0x0000,
+    0xef14, 0xaf7a, 0x3ffe, 0x0000, 0x0000, 0x0000, 0x48dc, 0xc36e, 0x3fdf, 0x0000,
+    0x0000, 0x0000, 0x3740, 0xe909, 0x3fbe, 0x0000, 0x0000, 0x0000, 0x924a, 0xb801,
+    0x3fa2, 0x0000, 0x0000, 0x0000, 0x3a32, 0xdd41, 0x3f83, 0x0000, 0x0000, 0x0000,
+    0x8778, 0x873f, 0x3f62, 0x0000, 0x0000, 0x0000, 0x1298, 0xb1cb, 0x3f44, 0x0000,
+    0x0000, 0x0000, 0xa208, 0x9cfb, 0x3f26, 0x0000, 0x0000, 0x0000, 0xbaec, 0xd7d4,
+    0x3f06, 0x0000, 0x0000, 0x0000, 0xd338, 0x8909, 0x3ee7, 0x0000, 0x0000, 0x0000,
+    0x68b8, 0xe04d, 0x3ec7, 0x0000, 0x0000, 0x0000, 0x4e64, 0xdf90, 0x3eaa, 0x0000,
+    0x0000, 0x0000, 0xc1a8, 0xeb1c, 0x3e89, 0x0000, 0x0000, 0x0000, 0x2720, 0xce7d,
+    0x3e6a, 0x0000, 0x0000, 0x0000, 0x77b8, 0x8bf1, 0x3e4b, 0x0000, 0x0000, 0x0000,
+    0xec7e, 0xe4a0, 0x3e2e, 0x0000, 0x0000, 0x0000, 0xffbc, 0xf12f, 0x3e0f, 0x0000,
+    0x0000, 0x0000, 0xfdc0, 0xb301, 0x3deb, 0x0000, 0x0000, 0x0000, 0xc5ac, 0x9788,
+    0x3dd1, 0x0000, 0x0000, 0x0000, 0x47da, 0x829b, 0x3db2, 0x0000, 0x0000, 0x0000,
+    0xd9e4, 0xa6cf, 0x3d93, 0x0000, 0x0000, 0x0000, 0x36e8, 0xf961, 0x3d73, 0x0000,
+    0x0000, 0x0000, 0xf668, 0xf463, 0x3d54, 0x0000, 0x0000, 0x0000, 0x5168, 0xf2ff,
+    0x3d35, 0x0000, 0x0000, 0x0000, 0x758e, 0xea4f, 0x3d17, 0x0000, 0x0000, 0x0000,
+    0xf17a, 0xebe5, 0x3cf8, 0x0000, 0x0000, 0x0000, 0x9cfa, 0x9e83, 0x3cd9, 0x0000,
+    0x0000, 0x0000, 0xa4ba, 0xe294, 0x3cba, 0x0000, 0x0000, 0x0000, 0xd7ec, 0x9afe,
+    0x3c9a, 0x0000, 0x0000, 0x0000, 0xae80, 0x8fc6, 0x3c79, 0x0000, 0x0000, 0x0000,
+    0x3304, 0x8560, 0x3c5c, 0x0000, 0x0000, 0x0000, 0x6d70, 0xdf8f, 0x3c3b, 0x0000,
+    0x0000, 0x0000, 0x3ef0, 0xafc3, 0x3c1e, 0x0000, 0x0000, 0x0000, 0xd0d8, 0x826b,
+    0x3bfe, 0x0000, 0x0000, 0x0000, 0x1c80, 0xed4f, 0x3bdd, 0x0000, 0x0000, 0x0000,
+    0x730c, 0xb0af, 0x3bc1, 0x0000, 0x0000, 0x0000, 0x6660, 0xc219, 0x3ba2, 0x0000,
+    0x0000, 0x0000, 0x940c, 0xabe2, 0x3b83, 0x0000, 0x0000, 0x0000, 0xdffc, 0x8408,
+    0x3b64, 0x0000, 0x0000, 0x0000, 0x6b98, 0xc402, 0x3b45, 0x0000, 0x0000, 0x0000,
+    0x1818, 0x9cc4, 0x3b26, 0x0000, 0x0000, 0x0000, 0x5390, 0xaab6, 0x3b05, 0x0000,
+    0x0000, 0x0000, 0xb070, 0xd464, 0x3ae9, 0x0000, 0x0000, 0x0000, 0x231a, 0x9ef0,
+    0x3aca, 0x0000, 0x0000, 0x0000, 0x0670, 0xd1f1, 0x3aaa, 0x0000, 0x0000, 0x0000,
+    0x7738, 0xd9f3, 0x3a8a, 0x0000, 0x0000, 0x0000, 0xa834, 0x8092, 0x3a6c, 0x0000,
+    0x0000, 0x0000, 0xb45c, 0xce23, 0x3a4d, 0x0000, 0x0000, 0x0000, 0x36e8, 0xb0e5,
+    0x3a2d, 0x0000, 0x0000, 0x0000, 0xd156, 0xaf44, 0x3a10, 0x0000, 0x0000, 0x0000,
+    0x9f52, 0x8c82, 0x39f1, 0x0000, 0x0000, 0x0000, 0x829c, 0xff83, 0x39d1, 0x0000,
+    0x0000, 0x0000, 0x7d06, 0xefc6, 0x39b3, 0x0000, 0x0000, 0x0000, 0x93e0, 0xb0b7,
+    0x3992, 0x0000, 0x0000, 0x0000, 0xedde, 0xc193, 0x3975, 0x0000, 0x0000, 0x0000,
+    0xbbc0, 0xcf49, 0x3952, 0x0000, 0x0000, 0x0000, 0xbdf0, 0xd63c, 0x3937, 0x0000,
+    0x0000, 0x0000, 0x1f34, 0x9f3a, 0x3918, 0x0000, 0x0000, 0x0000, 0x3f8e, 0xe579,
+    0x38f9, 0x0000, 0x0000, 0x0000, 0x90c8, 0xc3f8, 0x38d9, 0x0000, 0x0000, 0x0000,
+    0x48c0, 0xf8f8, 0x38b7, 0x0000, 0x0000, 0x0000, 0xed56, 0xafa6, 0x389c, 0x0000,
+    0x0000, 0x0000, 0x8218, 0xb969, 0x387d, 0x0000, 0x0000, 0x0000, 0x1852, 0xec57,
+    0x385e, 0x0000, 0x0000, 0x0000, 0x670c, 0xd674, 0x383e, 0x0000, 0x0000, 0x0000,
+    0xad40, 0xc2c4, 0x3820, 0x0000, 0x0000, 0x0000, 0x2e80, 0xa696, 0x3801, 0x0000,
+    0x0000, 0x0000, 0xd800, 0xc467, 0x37dc, 0x0000, 0x0000, 0x0000, 0x3c72, 0xc5ae,
+    0x37c3, 0x0000, 0x0000, 0x0000, 0xb006, 0xac69, 0x37a4, 0x0000, 0x0000, 0x0000,
+    0x34a0, 0x8cdf, 0x3782, 0x0000, 0x0000, 0x0000, 0x9ed2, 0xd25e, 0x3766, 0x0000,
+    0x0000, 0x0000, 0x6fec, 0xaaaa, 0x3747, 0x0000, 0x0000, 0x0000, 0x6040, 0xfb5c,
+    0x3726, 0x0000, 0x0000, 0x0000, 0x764c, 0xa3fc, 0x3708, 0x0000, 0x0000, 0x0000,
+    0xb254, 0x954e, 0x36e9, 0x0000, 0x0000, 0x0000, 0x3e1c, 0xf5dc, 0x36ca, 0x0000,
+    0x0000, 0x0000, 0x7b06, 0xc635, 0x36ac, 0x0000, 0x0000, 0x0000, 0xa8ba, 0xd738,
+    0x368d, 0x0000, 0x0000, 0x0000, 0x06cc, 0xb24e, 0x366d, 0x0000, 0x0000, 0x0000,
+    0x7108, 0xac76, 0x364f, 0x0000, 0x0000, 0x0000, 0x2324, 0xa7cb, 0x3630, 0x0000,
+    0x0000, 0x0000, 0xac40, 0xef15, 0x360f, 0x0000, 0x0000, 0x0000, 0xae46, 0xd516,
+    0x35f2, 0x0000, 0x0000, 0x0000, 0x615e, 0xe003, 0x35d3, 0x0000, 0x0000, 0x0000,
+    0x0cf0, 0xefe7, 0x35b1, 0x0000, 0x0000, 0x0000, 0xfb50, 0xf98c, 0x3595, 0x0000,
+    0x0000, 0x0000, 0x0abc, 0xf333, 0x3575, 0x0000, 0x0000, 0x0000, 0xdd60, 0xca3f,
+    0x3555, 0x0000, 0x0000, 0x0000, 0x7eb6, 0xd87f, 0x3538, 0x0000, 0x0000, 0x0000,
+    0x44f4, 0xb291, 0x3519, 0x0000, 0x0000, 0x0000, 0xff80, 0xc982, 0x34f6, 0x0000,
+    0x0000, 0x0000, 0x9de0, 0xd9b8, 0x34db, 0x0000, 0x0000, 0x0000, 0xcd42, 0x9366,
+    0x34bc, 0x0000, 0x0000, 0x0000, 0xbef0, 0xfaee, 0x349d, 0x0000, 0x0000, 0x0000,
+    0xdac4, 0xb6f1, 0x347d, 0x0000, 0x0000, 0x0000, 0xf140, 0x94de, 0x345d, 0x0000,
+    0x0000, 0x0000, 0xa218, 0x8b4b, 0x343e, 0x0000, 0x0000, 0x0000, 0x6380, 0xa135,
+    0x341e, 0x0000, 0x0000, 0x0000, 0xb184, 0x8cb2, 0x3402, 0x0000, 0x0000, 0x0000,
+    0x196e, 0xdc61, 0x33e3, 0x0000, 0x0000, 0x0000, 0x0c00, 0xde05, 0x33c4, 0x0000,
+    0x0000, 0x0000, 0xef9a, 0xbd38, 0x33a5, 0x0000, 0x0000, 0x0000, 0xc1a0, 0xdf00,
+    0x3385, 0x0000, 0x0000, 0x0000, 0x1090, 0x9973, 0x3365, 0x0000, 0x0000, 0x0000,
+    0x4882, 0x8301, 0x3348, 0x0000, 0x0000, 0x0000, 0x7abe, 0xadc7, 0x3329, 0x0000,
+    0x0000, 0x0000, 0x7cba, 0xec2b, 0x330a, 0x0000, 0x0000, 0x0000, 0xa520, 0x8f21,
+    0x32e9, 0x0000, 0x0000, 0x0000, 0x710c, 0x8d36, 0x32cc, 0x0000, 0x0000, 0x0000,
+    0x5212, 0xc6ed, 0x32ad, 0x0000, 0x0000, 0x0000, 0x7308, 0xfd76, 0x328d, 0x0000,
+    0x0000, 0x0000, 0x5014, 0xd548, 0x326f, 0x0000, 0x0000, 0x0000, 0xd3f2, 0xb499,
+    0x3250, 0x0000, 0x0000, 0x0000, 0x7f74, 0xa606, 0x3230, 0x0000, 0x0000, 0x0000,
+    0xf0a8, 0xd720, 0x3212, 0x0000, 0x0000, 0x0000, 0x185c, 0xe20f, 0x31f2, 0x0000,
+    0x0000, 0x0000, 0xa5a8, 0x8738, 0x31d4, 0x0000, 0x0000, 0x0000, 0xdd74, 0xcafb,
+    0x31b4, 0x0000, 0x0000, 0x0000, 0x98b6, 0xbd8e, 0x3196, 0x0000, 0x0000, 0x0000,
+    0xe9de, 0x977f, 0x3177, 0x0000, 0x0000, 0x0000, 0x67c0, 0x818d, 0x3158, 0x0000,
+    0x0000, 0x0000, 0xe52a, 0x9322, 0x3139, 0x0000, 0x0000, 0x0000, 0xe568, 0x9b6c,
+    0x3119, 0x0000, 0x0000, 0x0000, 0x2358, 0xaa0a, 0x30fa, 0x0000, 0x0000, 0x0000,
+    0xe480, 0xe13b, 0x30d9, 0x0000, 0x0000, 0x0000, 0x3024, 0x90a1, 0x30bd, 0x0000,
+    0x0000, 0x0000, 0x9620, 0xda30, 0x309d, 0x0000, 0x0000, 0x0000, 0x898a, 0xb388,
+    0x307f, 0x0000, 0x0000, 0x0000, 0xb24c, 0xc891, 0x3060, 0x0000, 0x0000, 0x0000,
+    0x8056, 0xf98b, 0x3041, 0x0000, 0x0000, 0x0000, 0x72a4, 0xa1ea, 0x3021, 0x0000,
+    0x0000, 0x0000, 0x6af8, 0x9488, 0x3001, 0x0000, 0x0000, 0x0000, 0xe00c, 0xdfcb,
+    0x2fe4, 0x0000, 0x0000, 0x0000, 0xeeec, 0xc941, 0x2fc4, 0x0000, 0x0000, 0x0000,
+    0x53e0, 0xe70f, 0x2fa4, 0x0000, 0x0000, 0x0000, 0x8f60, 0x9c07, 0x2f85, 0x0000,
+    0x0000, 0x0000, 0xb328, 0xc3e7, 0x2f68, 0x0000, 0x0000, 0x0000, 0x9404, 0xf8c7,
+    0x2f48, 0x0000, 0x0000, 0x0000, 0x38e0, 0xc99f, 0x2f29, 0x0000, 0x0000, 0x0000,
+    0x9778, 0xd984, 0x2f09, 0x0000, 0x0000, 0x0000, 0xe700, 0xd142, 0x2eea, 0x0000,
+    0x0000, 0x0000, 0xd904, 0x9443, 0x2ecd, 0x0000, 0x0000, 0x0000, 0xd4ba, 0xae7e,
+    0x2eae, 0x0000, 0x0000, 0x0000, 0x8e5e, 0x8524, 0x2e8f, 0x0000, 0x0000, 0x0000,
+    0xb550, 0xc9ed, 0x2e6e, 0x0000, 0x0000, 0x0000, 0x53b8, 0x8648, 0x2e51, 0x0000,
+    0x0000, 0x0000, 0xdae4, 0x87f9, 0x2e32, 0x0000, 0x0000, 0x0000, 0x2942, 0xd966,
+    0x2e13, 0x0000, 0x0000, 0x0000, 0x4f28, 0xcf3c, 0x2df3, 0x0000, 0x0000, 0x0000,
+    0xfa40, 0xc4ef, 0x2dd1, 0x0000, 0x0000, 0x0000, 0x4424, 0xbca7, 0x2db5, 0x0000,
+    0x0000, 0x0000, 0x2e62, 0xcdc5, 0x2d97, 0x0000, 0x0000, 0x0000, 0xed88, 0x996b,
+    0x2d78, 0x0000, 0x0000, 0x0000, 0x7c30, 0xd97d, 0x2d56, 0x0000, 0x0000, 0x0000,
+    0xed26, 0xbf6e, 0x2d3a, 0x0000, 0x0000, 0x0000, 0x2918, 0x921b, 0x2d1a, 0x0000,
+    0x0000, 0x0000, 0x4e24, 0xe84e, 0x2cfb, 0x0000, 0x0000, 0x0000, 0x6dc0, 0x92ec,
+    0x2cdd, 0x0000, 0x0000, 0x0000, 0x4f2c, 0xacf8, 0x2cbd, 0x0000, 0x0000, 0x0000,
+    0xc634, 0xf094, 0x2c9e, 0x0000, 0x0000, 0x0000, 0xdc70, 0xe5d3, 0x2c7e, 0x0000,
+    0x0000, 0x0000, 0x2180, 0xa600, 0x2c5b, 0x0000, 0x0000, 0x0000, 0x8480, 0xd680,
+    0x2c3c, 0x0000, 0x0000, 0x0000, 0x8b24, 0xd63b, 0x2c22, 0x0000, 0x0000, 0x0000,
+    0x02e0, 0xaa47, 0x2c00, 0x0000, 0x0000, 0x0000, 0x9ad0, 0xee84, 0x2be3, 0x0000,
+    0x0000, 0x0000, 0xf7dc, 0xf699, 0x2bc6, 0x0000, 0x0000, 0x0000, 0xddde, 0xe490,
+    0x2ba7, 0x0000, 0x0000, 0x0000, 0x34a0, 0xb4fd, 0x2b85, 0x0000, 0x0000, 0x0000,
+    0x91b4, 0x8ef6, 0x2b68, 0x0000, 0x0000, 0x0000, 0xa3e0, 0xa2a7, 0x2b47, 0x0000,
+    0x0000, 0x0000, 0xcce4, 0x82b3, 0x2b2a, 0x0000, 0x0000, 0x0000, 0xe4be, 0x8207,
+    0x2b0c, 0x0000, 0x0000, 0x0000, 0x1d92, 0xab43, 0x2aed, 0x0000, 0x0000, 0x0000,
+    0xe818, 0xf9f6, 0x2acd, 0x0000, 0x0000, 0x0000, 0xff12, 0xba80, 0x2aaf, 0x0000,
+    0x0000, 0x0000, 0x5254, 0x8529, 0x2a90, 0x0000, 0x0000, 0x0000, 0x1b88, 0xe032,
+    0x2a71, 0x0000, 0x0000, 0x0000, 0x3248, 0xd86d, 0x2a50, 0x0000, 0x0000, 0x0000,
+    0x3140, 0xc9d5, 0x2a2e, 0x0000, 0x0000, 0x0000, 0x14e6, 0xbd47, 0x2a14, 0x0000,
+    0x0000, 0x0000, 0x5c10, 0xe544, 0x29f4, 0x0000, 0x0000, 0x0000, 0x9f50, 0x90b6,
+    0x29d4, 0x0000, 0x0000, 0x0000, 0x9850, 0xab55, 0x29b6, 0x0000, 0x0000, 0x0000,
+    0x2750, 0x9d07, 0x2998, 0x0000, 0x0000, 0x0000, 0x6700, 0x8bbb, 0x2973, 0x0000,
+    0x0000, 0x0000, 0x5dba, 0xed31, 0x295a, 0x0000, 0x0000, 0x0000, 0x61dc, 0x85fe,
+    0x293a, 0x0000, 0x0000, 0x0000, 0x9ba2, 0xd6b4, 0x291c, 0x0000, 0x0000, 0x0000,
+    0x2d30, 0xe3a5, 0x28fb, 0x0000, 0x0000, 0x0000, 0x6630, 0xb566, 0x28dd, 0x0000,
+    0x0000, 0x0000, 0x5ad4, 0xa829, 0x28bf, 0x0000, 0x0000, 0x0000, 0x89d8, 0xe290,
+    0x28a0, 0x0000, 0x0000, 0x0000, 0x3916, 0xc428, 0x2881, 0x0000, 0x0000, 0x0000,
+    0x0490, 0xbea4, 0x2860, 0x0000, 0x0000, 0x0000, 0xee06, 0x80ee, 0x2843, 0x0000,
+    0x0000, 0x0000, 0xfc00, 0xf327, 0x2820, 0x0000, 0x0000, 0x0000, 0xea40, 0xa871,
+    0x2800, 0x0000, 0x0000, 0x0000, 0x63d8, 0x9c26, 0x27e4, 0x0000, 0x0000, 0x0000,
+    0x07ba, 0xc0c9, 0x27c7, 0x0000, 0x0000, 0x0000, 0x3fa2, 0x9797, 0x27a8, 0x0000,
+    0x0000, 0x0000, 0x21c6, 0xfeca, 0x2789, 0x0000, 0x0000, 0x0000, 0xde40, 0x860d,
+    0x2768, 0x0000, 0x0000, 0x0000, 0x9cc8, 0x98ce, 0x2749, 0x0000, 0x0000, 0x0000,
+    0x3778, 0xa31c, 0x272a, 0x0000, 0x0000, 0x0000, 0xe778, 0xf6e2, 0x270b, 0x0000,
+    0x0000, 0x0000, 0x59b8, 0xf841, 0x26ed, 0x0000, 0x0000, 0x0000, 0x02e0, 0xad04,
+    0x26cd, 0x0000, 0x0000, 0x0000, 0x5a92, 0x9380, 0x26b0, 0x0000, 0x0000, 0x0000,
+    0xc740, 0x8886, 0x268d, 0x0000, 0x0000, 0x0000, 0x0680, 0xfaf8, 0x266c, 0x0000,
+    0x0000, 0x0000, 0xfb60, 0x897f, 0x2653, 0x0000, 0x0000, 0x0000, 0x8760, 0xf903,
+    0x2634, 0x0000, 0x0000, 0x0000, 0xad2a, 0xc2c8, 0x2615, 0x0000, 0x0000, 0x0000,
+    0x2d86, 0x8aef, 0x25f6, 0x0000, 0x0000, 0x0000, 0x1ef4, 0xe627, 0x25d6, 0x0000,
+    0x0000, 0x0000, 0x09e4, 0x8020, 0x25b7, 0x0000, 0x0000, 0x0000, 0x7548, 0xd227,
+    0x2598, 0x0000, 0x0000, 0x0000, 0x75dc, 0xfb5b, 0x2579, 0x0000, 0x0000, 0x0000,
+    0xea84, 0xc8b6, 0x255a, 0x0000, 0x0000, 0x0000, 0xe4d0, 0x8145, 0x253b, 0x0000,
+    0x0000, 0x0000, 0x3640, 0x9768, 0x251c, 0x0000, 0x0000, 0x0000, 0x246a, 0xccec,
+    0x24fe, 0x0000, 0x0000, 0x0000, 0x51d0, 0xa075, 0x24dd, 0x0000, 0x0000, 0x0000,
+    0x4638, 0xa385, 0x24bf, 0x0000, 0x0000, 0x0000, 0xd788, 0xd776, 0x24a1, 0x0000,
+    0x0000, 0x0000, 0x1370, 0x8997, 0x2482, 0x0000, 0x0000, 0x0000, 0x1e88, 0x9b67,
+    0x2462, 0x0000, 0x0000, 0x0000, 0x6c08, 0xd975, 0x2444, 0x0000, 0x0000, 0x0000,
+    0xfdb0, 0xcfc0, 0x2422, 0x0000, 0x0000, 0x0000, 0x3100, 0xc026, 0x2406, 0x0000,
+    0x0000, 0x0000, 0xc5b4, 0xae64, 0x23e6, 0x0000, 0x0000, 0x0000, 0x2280, 0xf687,
+    0x23c3, 0x0000, 0x0000, 0x0000, 0x2de0, 0x9006, 0x23a9, 0x0000, 0x0000, 0x0000,
+    0x24bc, 0xf631, 0x238a, 0x0000, 0x0000, 0x0000, 0xb8d4, 0xa975, 0x236b, 0x0000,
+    0x0000, 0x0000, 0xd9a4, 0xb949, 0x234b, 0x0000, 0x0000, 0x0000, 0xb54e, 0xbd39,
+    0x232d, 0x0000, 0x0000, 0x0000, 0x4aac, 0x9a52, 0x230e, 0x0000, 0x0000, 0x0000,
+    0xbbbc, 0xd085, 0x22ef, 0x0000, 0x0000, 0x0000, 0xdf18, 0xc633, 0x22cf, 0x0000,
+    0x0000, 0x0000, 0x16d0, 0xeca5, 0x22af, 0x0000, 0x0000, 0x0000, 0xf2a0, 0xdf6f,
+    0x228e, 0x0000, 0x0000, 0x0000, 0x8c44, 0xe86b, 0x2272, 0x0000, 0x0000, 0x0000,
+    0x35c0, 0xbbf4, 0x2253, 0x0000, 0x0000, 0x0000, 0x0c40, 0xdafb, 0x2230, 0x0000,
+    0x0000, 0x0000, 0x92dc, 0x9935, 0x2216, 0x0000, 0x0000, 0x0000, 0x0ca0, 0xbda6,
+    0x21f3, 0x0000, 0x0000, 0x0000, 0x5958, 0xa6fd, 0x21d6, 0x0000, 0x0000, 0x0000,
+    0xa3dc, 0x9d7f, 0x21b9, 0x0000, 0x0000, 0x0000, 0x79dc, 0xfcb5, 0x2199, 0x0000,
+    0x0000, 0x0000, 0xf264, 0xcebb, 0x217b, 0x0000, 0x0000, 0x0000, 0x0abe, 0x8308,
+    0x215c, 0x0000, 0x0000, 0x0000, 0x30ae, 0xb463, 0x213d, 0x0000, 0x0000, 0x0000,
+    0x6228, 0xb040, 0x211c, 0x0000, 0x0000, 0x0000, 0xc9b2, 0xf43b, 0x20ff, 0x0000,
+    0x0000, 0x0000, 0x3d8e, 0xa4b3, 0x20e0, 0x0000, 0x0000, 0x0000, 0x84e6, 0x8dab,
+    0x20c1, 0x0000, 0x0000, 0x0000, 0xa124, 0x9b74, 0x20a1, 0x0000, 0x0000, 0x0000,
+    0xc276, 0xd497, 0x2083, 0x0000, 0x0000, 0x0000, 0x6354, 0xa466, 0x2063, 0x0000,
+    0x0000, 0x0000, 0x8654, 0xaf0a, 0x2044, 0x0000, 0x0000, 0x0000, 0x1d20, 0xfa5c,
+    0x2024, 0x0000, 0x0000, 0x0000, 0xbcd0, 0xf3f0, 0x2004, 0x0000, 0x0000, 0x0000,
+    0xedf0, 0xf0b6, 0x1fe7, 0x0000, 0x0000, 0x0000, 0x45bc, 0x9182, 0x1fc9, 0x0000,
+    0x0000, 0x0000, 0xe254, 0xdc85, 0x1faa, 0x0000, 0x0000, 0x0000, 0xb898, 0xe9b1,
+    0x1f8a, 0x0000, 0x0000, 0x0000, 0x0ebe, 0xe6f0, 0x1f6c, 0x0000, 0x0000, 0x0000,
+    0xa9b8, 0xf584, 0x1f4c, 0x0000, 0x0000, 0x0000, 0x12e8, 0xdf6b, 0x1f2e, 0x0000,
+    0x0000, 0x0000, 0x9f9e, 0xcd55, 0x1f0f, 0x0000, 0x0000, 0x0000, 0x05a0, 0xec3a,
+    0x1eef, 0x0000, 0x0000, 0x0000, 0xd8e0, 0x96f8, 0x1ed1, 0x0000, 0x0000, 0x0000,
+    0x3bd4, 0xccc6, 0x1eb1, 0x0000, 0x0000, 0x0000, 0x4910, 0xb87b, 0x1e93, 0x0000,
+    0x0000, 0x0000, 0xbefc, 0xd40b, 0x1e73, 0x0000, 0x0000, 0x0000, 0x317e, 0xa406,
+    0x1e55, 0x0000, 0x0000, 0x0000, 0x6bb2, 0xc2b2, 0x1e36, 0x0000, 0x0000, 0x0000,
+    0xb87e, 0xbb78, 0x1e17, 0x0000, 0x0000, 0x0000, 0xa03c, 0xdbbd, 0x1df7, 0x0000,
+    0x0000, 0x0000, 0x5b6c, 0xe3c8, 0x1dd9, 0x0000, 0x0000, 0x0000, 0x8968, 0xca8e,
+    0x1dba, 0x0000, 0x0000, 0x0000, 0xc024, 0xe6ab, 0x1d9a, 0x0000, 0x0000, 0x0000,
+    0x4110, 0xd4eb, 0x1d7a, 0x0000, 0x0000, 0x0000, 0xa168, 0xbdb5, 0x1d5d, 0x0000,
+    0x0000, 0x0000, 0x012e, 0xa5fa, 0x1d3e, 0x0000, 0x0000, 0x0000, 0x6838, 0x9c1f,
+    0x1d1e, 0x0000, 0x0000, 0x0000, 0xa158, 0xaa76, 0x1d00, 0x0000, 0x0000, 0x0000,
+    0x090a, 0xbd95, 0x1ce1, 0x0000, 0x0000, 0x0000, 0xf73e, 0x8b6d, 0x1cc2, 0x0000,
+    0x0000, 0x0000, 0x5fda, 0xbcbf, 0x1ca3, 0x0000, 0x0000, 0x0000, 0xdbe8, 0xb89f,
+    0x1c84, 0x0000, 0x0000, 0x0000, 0x6e4c, 0x96c7, 0x1c64, 0x0000, 0x0000, 0x0000,
+    0x19c2, 0xf2a4, 0x1c46, 0x0000, 0x0000, 0x0000, 0xb800, 0xf855, 0x1c1e, 0x0000,
+    0x0000, 0x0000, 0x87fc, 0x85ff, 0x1c08, 0x0000, 0x0000, 0x0000, 0x1418, 0x839f,
+    0x1be9, 0x0000, 0x0000, 0x0000, 0x6186, 0xd9d8, 0x1bca, 0x0000, 0x0000, 0x0000,
+    0xf500, 0xabaa, 0x1ba6, 0x0000, 0x0000, 0x0000, 0x7b36, 0xdafe, 0x1b8c, 0x0000,
+    0x0000, 0x0000, 0xf394, 0xe6d8, 0x1b6c, 0x0000, 0x0000, 0x0000, 0x6efc, 0x9e55,
+    0x1b4e, 0x0000, 0x0000, 0x0000, 0x5e10, 0xc523, 0x1b2e, 0x0000, 0x0000, 0x0000,
+    0x8210, 0xb6f9, 0x1b0d, 0x0000, 0x0000, 0x0000, 0x9ab0, 0x96e3, 0x1af1, 0x0000,
+    0x0000, 0x0000, 0x3864, 0x92e7, 0x1ad1, 0x0000, 0x0000, 0x0000, 0x9878, 0xdc65,
+    0x1ab1, 0x0000, 0x0000, 0x0000, 0xfa20, 0xd6cb, 0x1a94, 0x0000, 0x0000, 0x0000,
+    0x6c00, 0xa4e4, 0x1a70, 0x0000, 0x0000, 0x0000, 0xab40, 0xb41b, 0x1a53, 0x0000,
+    0x0000, 0x0000, 0x43a4, 0x8ede, 0x1a37, 0x0000, 0x0000, 0x0000, 0x22e0, 0x9314,
+    0x1a15, 0x0000, 0x0000, 0x0000, 0x6170, 0xb949, 0x19f8, 0x0000, 0x0000, 0x0000,
+    0x6b00, 0xe056, 0x19d8, 0x0000, 0x0000, 0x0000, 0x9ba8, 0xa94c, 0x19b9, 0x0000,
+    0x0000, 0x0000, 0xfaa0, 0xaa16, 0x199b, 0x0000, 0x0000, 0x0000, 0x899a, 0xf627,
+    0x197d, 0x0000, 0x0000, 0x0000, 0x9f20, 0xfb70, 0x195d, 0x0000, 0x0000, 0x0000,
+    0xa4b8, 0xc176, 0x193e, 0x0000, 0x0000, 0x0000, 0xb21c, 0x85c3, 0x1920, 0x0000,
+    0x0000, 0x0000, 0x50d2, 0x9b19, 0x1901, 0x0000, 0x0000, 0x0000, 0xd4b0, 0xb708,
+    0x18e0, 0x0000, 0x0000, 0x0000, 0xfb88, 0xf510, 0x18c1, 0x0000, 0x0000, 0x0000,
+    0x31ec, 0xdc8d, 0x18a3, 0x0000, 0x0000, 0x0000, 0x3c00, 0xbff9, 0x1885, 0x0000,
+    0x0000, 0x0000, 0x5020, 0xc30b, 0x1862, 0x0000, 0x0000, 0x0000, 0xd4f0, 0xda0c,
+    0x1844, 0x0000, 0x0000, 0x0000, 0x20d2, 0x99a5, 0x1828, 0x0000, 0x0000, 0x0000,
+    0x852e, 0xd159, 0x1809, 0x0000, 0x0000, 0x0000, 0x7cd8, 0x97a1, 0x17e9, 0x0000,
+    0x0000, 0x0000, 0x423a, 0x997b, 0x17cb, 0x0000, 0x0000, 0x0000, 0xc1c0, 0xbe7d,
+    0x17a8, 0x0000, 0x0000, 0x0000, 0xe8bc, 0xdcdd, 0x178d, 0x0000, 0x0000, 0x0000,
+    0x8b28, 0xae06, 0x176e, 0x0000, 0x0000, 0x0000, 0x102e, 0xb8d4, 0x174f, 0x0000,
+    0x0000, 0x0000, 0xaa00, 0xaa5c, 0x172f, 0x0000, 0x0000, 0x0000, 0x51f0, 0x9fc0,
+    0x170e, 0x0000, 0x0000, 0x0000, 0xf858, 0xe181, 0x16f2, 0x0000, 0x0000, 0x0000,
+    0x91a8, 0x8162, 0x16d3, 0x0000, 0x0000, 0x0000, 0x5f40, 0xcb6f, 0x16b1, 0x0000,
+    0x0000, 0x0000, 0xbb50, 0xe55f, 0x1693, 0x0000, 0x0000, 0x0000, 0xacd2, 0xd895,
+    0x1676, 0x0000, 0x0000, 0x0000, 0xef30, 0x97bf, 0x1654, 0x0000, 0x0000, 0x0000,
+    0xf700, 0xb3d7, 0x1633, 0x0000, 0x0000, 0x0000, 0x3454, 0xa7b5, 0x1619, 0x0000,
+    0x0000, 0x0000, 0x6b00, 0xa929, 0x15f6, 0x0000, 0x0000, 0x0000, 0x9f04, 0x89f7,
+    0x15db, 0x0000, 0x0000, 0x0000, 0xad78, 0xd985, 0x15bc, 0x0000, 0x0000, 0x0000,
+    0xa46a, 0xae3f, 0x159d, 0x0000, 0x0000, 0x0000, 0x63a0, 0xd0da, 0x157c, 0x0000,
+    0x0000, 0x0000, 0x5e90, 0x817d, 0x155e, 0x0000, 0x0000, 0x0000, 0x1494, 0xb13f,
+    0x1540, 0x0000, 0x0000, 0x0000, 0x0090, 0x9c40, 0x1521, 0x0000, 0x0000, 0x0000,
+    0xdd70, 0xcc86, 0x1500, 0x0000, 0x0000, 0x0000, 0x64f8, 0xdb6f, 0x14e1, 0x0000,
+    0x0000, 0x0000, 0xe22c, 0xac17, 0x14c3, 0x0000, 0x0000, 0x0000, 0x60e0, 0xa9ad,
+    0x14a3, 0x0000, 0x0000, 0x0000, 0x4640, 0xd658, 0x1481, 0x0000, 0x0000, 0x0000,
+    0x6490, 0xa181, 0x1467, 0x0000, 0x0000, 0x0000, 0x1df4, 0xaaa2, 0x1447, 0x0000,
+    0x0000, 0x0000, 0xb94a, 0x8f61, 0x1429, 0x0000, 0x0000, 0x0000, 0x5198, 0x9d83,
+    0x1409, 0x0000, 0x0000, 0x0000, 0x0f7a, 0xa818, 0x13eb, 0x0000, 0x0000, 0x0000,
+    0xc45e, 0xc06c, 0x13cc, 0x0000, 0x0000, 0x0000, 0x4ec0, 0xfa29, 0x13a8, 0x0000,
+    0x0000, 0x0000, 0x6418, 0x8cad, 0x138c, 0x0000, 0x0000, 0x0000, 0xbcc8, 0xe7d1,
+    0x136f, 0x0000, 0x0000, 0x0000, 0xc934, 0xf9b0, 0x134f, 0x0000, 0x0000, 0x0000,
+    0x6ce0, 0x98df, 0x1331, 0x0000, 0x0000, 0x0000, 0x3516, 0xe5e9, 0x1312, 0x0000,
+    0x0000, 0x0000, 0xc6c0, 0xef8b, 0x12ef, 0x0000, 0x0000, 0x0000, 0xaf02, 0x913d,
+    0x12d4, 0x0000, 0x0000, 0x0000, 0xd230, 0xe1d5, 0x12b5, 0x0000, 0x0000, 0x0000,
+    0xfba8, 0xc232, 0x1295, 0x0000, 0x0000, 0x0000, 0x7ba4, 0xabeb, 0x1277, 0x0000,
+    0x0000, 0x0000, 0x6e5c, 0xc692, 0x1258, 0x0000, 0x0000, 0x0000, 0x76a2, 0x9756,
+    0x1239, 0x0000, 0x0000, 0x0000, 0xe180, 0xe423, 0x1214, 0x0000, 0x0000, 0x0000,
+    0x8c3c, 0x90f8, 0x11fb, 0x0000, 0x0000, 0x0000, 0x9f3c, 0x9fd2, 0x11dc, 0x0000,
+    0x0000, 0x0000, 0x53e0, 0xb73e, 0x11bd, 0x0000, 0x0000, 0x0000, 0x45be, 0x88d6,
+    0x119e, 0x0000, 0x0000, 0x0000, 0x111a, 0x8bc0, 0x117f, 0x0000, 0x0000, 0x0000,
+    0xe26a, 0xd7ff, 0x1160, 0x0000, 0x0000, 0x0000, 0xfb60, 0xdd8d, 0x113f, 0x0000,
+    0x0000, 0x0000, 0x9370, 0xc108, 0x1120, 0x0000, 0x0000, 0x0000, 0x9654, 0x8baf,
+    0x1103, 0x0000, 0x0000, 0x0000, 0xd6ec, 0xd6b9, 0x10e4, 0x0000, 0x0000, 0x0000,
+    0x23e4, 0xd7b7, 0x10c4, 0x0000, 0x0000, 0x0000, 0x1aa6, 0xa847, 0x10a6, 0x0000,
+    0x0000, 0x0000, 0xbee6, 0x9fef, 0x1087, 0x0000, 0x0000, 0x0000, 0x26d0, 0xa6eb,
+    0x1066, 0x0000, 0x0000, 0x0000, 0x5b86, 0xa880, 0x1049, 0x0000, 0x0000, 0x0000,
+    0x125c, 0xd971, 0x1029, 0x0000, 0x0000, 0x0000, 0x1f78, 0x9d18, 0x100a, 0x0000,
+    0x0000, 0x0000, 0x0e84, 0xb15b, 0x0feb, 0x0000, 0x0000, 0x0000, 0xd0c0, 0xc150,
+    0x0fcc, 0x0000, 0x0000, 0x0000, 0xa330, 0xc40c, 0x0fad, 0x0000, 0x0000, 0x0000,
+    0x5202, 0xfc2c, 0x0f8f, 0x0000, 0x0000, 0x0000, 0x3f7c, 0xecf5, 0x0f6f, 0x0000,
+    0x0000, 0x0000, 0xef44, 0xfdfd, 0x0f50, 0x0000, 0x0000, 0x0000, 0x3f6c, 0xab1b,
+    0x0f31, 0x0000, 0x0000, 0x0000, 0xf658, 0x89ec, 0x0f11, 0x0000, 0x0000, 0x0000,
+    0xbfc8, 0x9ba8, 0x0ef4, 0x0000, 0x0000, 0x0000, 0x3d40, 0xbe21, 0x0ed5, 0x0000,
+    0x0000, 0x0000, 0xbbc4, 0xc70d, 0x0eb6, 0x0000, 0x0000, 0x0000, 0x5158, 0xdb16,
+    0x0e96, 0x0000, 0x0000, 0x0000, 0xb5a8, 0xa8d8, 0x0e78, 0x0000, 0x0000, 0x0000,
+    0xcccc, 0xb40e, 0x0e58, 0x0000, 0x0000, 0x0000, 0x448c, 0xcb62, 0x0e3a, 0x0000,
+    0x0000, 0x0000, 0xf12a, 0x8aed, 0x0e1b, 0x0000, 0x0000, 0x0000, 0x79d0, 0xc59c,
+    0x0dfb, 0x0000, 0x0000, 0x0000, 0x06b4, 0xcdc9, 0x0ddd, 0x0000, 0x0000, 0x0000,
+    0xae70, 0xa979, 0x0dbe, 0x0000, 0x0000, 0x0000, 0x317c, 0xa8fb, 0x0d9e, 0x0000,
+    0x0000, 0x0000, 0x5fe0, 0x8a50, 0x0d7d, 0x0000, 0x0000, 0x0000, 0x70b6, 0xfdfa,
+    0x0d61, 0x0000, 0x0000, 0x0000, 0x1640, 0x9dc7, 0x0d41, 0x0000, 0x0000, 0x0000,
+    0x9a9c, 0xdc50, 0x0d23, 0x0000, 0x0000, 0x0000, 0x4fcc, 0x9a9b, 0x0d04, 0x0000,
+    0x0000, 0x0000, 0x7e48, 0x8f77, 0x0ce5, 0x0000, 0x0000, 0x0000, 0x84e4, 0xd4b9,
+    0x0cc6, 0x0000, 0x0000, 0x0000, 0x84e0, 0xbd10, 0x0ca6, 0x0000, 0x0000, 0x0000,
+    0x1b0a, 0xc8d9, 0x0c88, 0x0000, 0x0000, 0x0000, 0x6a48, 0xfc81, 0x0c68, 0x0000,
+    0x0000, 0x0000, 0x070a, 0xbef6, 0x0c4a, 0x0000, 0x0000, 0x0000, 0x8a70, 0xf096,
+    0x0c2b, 0x0000, 0x0000, 0x0000, 0xecc2, 0xc994, 0x0c0c, 0x0000, 0x0000, 0x0000,
+    0x1540, 0x9537, 0x0bea, 0x0000, 0x0000, 0x0000, 0x1b02, 0xab5b, 0x0bce, 0x0000,
+    0x0000, 0x0000, 0x5dc0, 0xb0c8, 0x0bad, 0x0000, 0x0000, 0x0000, 0xc928, 0xe034,
+    0x0b8f, 0x0000, 0x0000, 0x0000, 0x2d12, 0xb4b0, 0x0b71, 0x0000, 0x0000, 0x0000,
+    0x8fc2, 0xbb94, 0x0b52, 0x0000, 0x0000, 0x0000, 0xe236, 0xe22f, 0x0b33, 0x0000,
+    0x0000, 0x0000, 0xb97c, 0xbe9e, 0x0b13, 0x0000, 0x0000, 0x0000, 0xe1a6, 0xe16d,
+    0x0af5, 0x0000, 0x0000, 0x0000, 0xd330, 0xbaf0, 0x0ad6, 0x0000, 0x0000, 0x0000,
+    0xc0bc, 0xbbd0, 0x0ab7, 0x0000, 0x0000, 0x0000, 0x8e66, 0xdd9b, 0x0a98, 0x0000,
+    0x0000, 0x0000, 0xc95c, 0xf799, 0x0a79, 0x0000, 0x0000, 0x0000, 0xdac0, 0xbe4c,
+    0x0a55, 0x0000, 0x0000, 0x0000, 0xafc0, 0xc378, 0x0a37, 0x0000, 0x0000, 0x0000,
+    0xa880, 0xe341, 0x0a19, 0x0000, 0x0000, 0x0000, 0xc242, 0x81f6, 0x09fd, 0x0000,
+    0x0000, 0x0000, 0x7470, 0xc777, 0x09de, 0x0000, 0x0000, 0x0000, 0x62bc, 0xb684,
+    0x09be, 0x0000, 0x0000, 0x0000, 0x43ac, 0x8c58, 0x099f, 0x0000, 0x0000, 0x0000,
+    0xcc3c, 0xf9ac, 0x0981, 0x0000, 0x0000, 0x0000, 0x1526, 0xb670, 0x0962, 0x0000,
+    0x0000, 0x0000, 0xc9fe, 0xdf50, 0x0943, 0x0000, 0x0000, 0x0000, 0x6ae6, 0xc065,
+    0x0924, 0x0000, 0x0000, 0x0000, 0xb114, 0xcf29, 0x0905, 0x0000, 0x0000, 0x0000,
+    0xd388, 0x922a, 0x08e4, 0x0000, 0x0000, 0x0000, 0xcf54, 0xb926, 0x08c7, 0x0000,
+    0x0000, 0x0000, 0x3826, 0xe855, 0x08a8, 0x0000, 0x0000, 0x0000, 0xe7c8, 0x829b,
+    0x0888, 0x0000, 0x0000, 0x0000, 0x546c, 0xa903, 0x086a, 0x0000, 0x0000, 0x0000,
+    0x8768, 0x99cc, 0x0849, 0x0000, 0x0000, 0x0000, 0x00ac, 0xf529, 0x082b, 0x0000,
+    0x0000, 0x0000, 0x2658, 0x9f0b, 0x080c, 0x0000, 0x0000, 0x0000, 0xfe5c, 0x9e21,
+    0x07ee, 0x0000, 0x0000, 0x0000, 0x6da2, 0x9910, 0x07cf, 0x0000, 0x0000, 0x0000,
+    0x9220, 0xf9b3, 0x07b0, 0x0000, 0x0000, 0x0000, 0x3d90, 0xa541, 0x0791, 0x0000,
+    0x0000, 0x0000, 0x6e4c, 0xe7cc, 0x0771, 0x0000, 0x0000, 0x0000, 0xa8fa, 0xe80a,
+    0x0753, 0x0000, 0x0000, 0x0000, 0x4e14, 0xc3a7, 0x0734, 0x0000, 0x0000, 0x0000,
+    0xf7e0, 0xbad9, 0x0712, 0x0000, 0x0000, 0x0000, 0xfea0, 0xeff2, 0x06f5, 0x0000,
+    0x0000, 0x0000, 0xcef6, 0xbd48, 0x06d7, 0x0000, 0x0000, 0x0000, 0x7544, 0xf559,
+    0x06b7, 0x0000, 0x0000, 0x0000, 0x2388, 0xf655, 0x0698, 0x0000, 0x0000, 0x0000,
+    0xe900, 0xad56, 0x0676, 0x0000, 0x0000, 0x0000, 0x2cc0, 0x8437, 0x0659, 0x0000,
+    0x0000, 0x0000, 0x3068, 0xc544, 0x063b, 0x0000, 0x0000, 0x0000, 0xdc70, 0xe73c,
+    0x061b, 0x0000, 0x0000, 0x0000, 0xee50, 0x9d49, 0x05fc, 0x0000, 0x0000, 0x0000,
+    0x93d2, 0x81f6, 0x05df, 0x0000, 0x0000, 0x0000, 0x941c, 0xadff, 0x05bf, 0x0000,
+    0x0000, 0x0000, 0x2ce2, 0x8e45, 0x05a1, 0x0000, 0x0000, 0x0000, 0x4a60, 0x95fd,
+    0x0581, 0x0000, 0x0000, 0x0000, 0x79f8, 0xb83a, 0x0563, 0x0000, 0x0000, 0x0000,
+    0xcb58, 0xa1f5, 0x0543, 0x0000, 0x0000, 0x0000, 0x2a3a, 0xdc36, 0x0525, 0x0000,
+    0x0000, 0x0000, 0x14ee, 0x890e, 0x0506, 0x0000, 0x0000, 0x0000, 0x8f20, 0xc432,
+    0x04e3, 0x0000, 0x0000, 0x0000, 0x8440, 0xb21d, 0x04c6, 0x0000, 0x0000, 0x0000,
+    0x5430, 0xf698, 0x04a7, 0x0000, 0x0000, 0x0000, 0x04ae, 0x8b20, 0x048a, 0x0000,
+    0x0000, 0x0000, 0x04d0, 0xe872, 0x046b, 0x0000, 0x0000, 0x0000, 0xc78e, 0x8893,
+    0x044c, 0x0000, 0x0000, 0x0000, 0x0f78, 0x9895, 0x042b, 0x0000, 0x0000, 0x0000,
+    0x11d4, 0xdf2e, 0x040d, 0x0000, 0x0000, 0x0000, 0xe84c, 0x89d5, 0x03ef, 0x0000,
+    0x0000, 0x0000, 0xf7be, 0x8a67, 0x03d0, 0x0000, 0x0000, 0x0000, 0x95d0, 0xc906,
+    0x03b1, 0x0000, 0x0000, 0x0000, 0x64ce, 0xd96c, 0x0392, 0x0000, 0x0000, 0x0000,
+    0x97ba, 0xa16f, 0x0373, 0x0000, 0x0000, 0x0000, 0x463c, 0xc51a, 0x0354, 0x0000,
+    0x0000, 0x0000, 0xef0a, 0xe93e, 0x0335, 0x0000, 0x0000, 0x0000, 0x526a, 0xa466,
+    0x0316, 0x0000, 0x0000, 0x0000, 0x4140, 0xa94d, 0x02f5, 0x0000, 0x0000, 0x0000,
+    0xb4ec, 0xce68, 0x02d8, 0x0000, 0x0000, 0x0000, 0x4fa2, 0x8490, 0x02b9, 0x0000,
+    0x0000, 0x0000, 0x4e60, 0xca98, 0x0298, 0x0000, 0x0000, 0x0000, 0x08dc, 0xe09c,
+    0x027a, 0x0000, 0x0000, 0x0000, 0x2b90, 0xc7e3, 0x025c, 0x0000, 0x0000, 0x0000,
+    0x5a7c, 0xf8ef, 0x023c, 0x0000, 0x0000, 0x0000, 0x5022, 0x9d58, 0x021e, 0x0000,
+    0x0000, 0x0000, 0x553a, 0xe242, 0x01ff, 0x0000, 0x0000, 0x0000, 0x7e6e, 0xb54d,
+    0x01e0, 0x0000, 0x0000, 0x0000, 0xd2d4, 0xa88c, 0x01c1, 0x0000, 0x0000, 0x0000,
+    0x75b6, 0xfe6d, 0x01a2, 0x0000, 0x0000, 0x0000, 0x3bb2, 0xf04c, 0x0183, 0x0000,
+    0x0000, 0x0000, 0xc2d0, 0xc046, 0x0163, 0x0000, 0x0000, 0x0000, 0x250c, 0xf9d6,
+    0x0145, 0x0000, 0x0000, 0x0000, 0xb7b4, 0x8a0d, 0x0126, 0x0000, 0x0000, 0x0000,
+    0x1a72, 0xe4f5, 0x0107, 0x0000, 0x0000, 0x0000, 0x825c, 0xa9b8, 0x00e8, 0x0000,
+    0x0000, 0x0000, 0x6c90, 0xc9ad, 0x00c6, 0x0000, 0x0000, 0x0000, 0x4d00, 0xd1bb,
+    0x00aa, 0x0000, 0x0000, 0x0000, 0xa4a0, 0xee01, 0x0087, 0x0000, 0x0000, 0x0000,
+    0x89a8, 0xbe9f, 0x006b, 0x0000, 0x0000, 0x0000, 0x038e, 0xc80c, 0x004d, 0x0000,
+    0x0000, 0x0000, 0xfe26, 0x8384, 0x002e, 0x0000, 0x0000, 0x0000, 0xcd90, 0xca57,
+    0x000e, 0x0000
+};
+
+void MacroAssembler::libm_reduce_pi04l(Register eax, Register ecx, Register edx, Register ebx, Register esi, Register edi, Register ebp, Register esp) {
+  Label B1_1, B1_2, B1_3, B1_4, B1_5, B1_6, B1_7, B1_8, B1_9, B1_10, B1_11, B1_12;
+  Label B1_13, B1_14, B1_15;
+
+  assert_different_registers(ebx, eax, ecx, edx, esi, edi, ebp, esp);
+
+  address zero_none = (address)_zero_none;
+  address _4onpi_d = (address)__4onpi_d;
+  address TWO_32H = (address)_TWO_32H;
+  address pi04_3d = (address)_pi04_3d;
+  address pi04_5d = (address)_pi04_5d;
+  address SCALE = (address)_SCALE;
+  address zeros = (address)_zeros;
+  address pi04_2d = (address)_pi04_2d;
+  address TWO_12H = (address)_TWO_12H;
+  address _4onpi_31l = (address)__4onpi_31l;
+
+  bind(B1_1);
+  push(ebp);
+  movl(ebp, esp);
+  andl(esp, -16);
+  push(esi);
+  push(edi);
+  push(ebx);
+  subl(esp, 20);
+  movzwl(ebx, Address(ebp, 16));
+  andl(ebx, 32767);
+  movl(eax, Address(ebp, 20));
+  cmpl(ebx, 16413);
+  movl(esi, Address(ebp, 24));
+  movl(Address(esp, 4), eax);
+  jcc(Assembler::greaterEqual, B1_8);
+
+  bind(B1_2);
+  fld_x(Address(ebp, 8));
+  fld_d(ExternalAddress(_4onpi_d));    //0x6dc9c883UL, 0x3ff45f30UL
+  fmul(1);
+  fstp_x(Address(esp, 8));
+  movzwl(ecx, Address(esp, 16));
+  negl(ecx);
+  addl(ecx, 30);
+  movl(eax, Address(esp, 12));
+  shrl(eax);
+  cmpl(Address(esp, 4), 0);
+  jcc(Assembler::notEqual, B1_4);
+
+  bind(B1_3);
+  lea(ecx, Address(eax, 1));
+  andl(ecx, -2);
+  jmp(B1_5);
+
+  bind(B1_4);
+  movl(ecx, eax);
+  addl(eax, Address(esp, 4));
+  movl(edx, eax);
+  andl(edx, 1);
+  addl(ecx, edx);
+
+  bind(B1_5);
+  fld_d(ExternalAddress(TWO_32H));    //0x00000000UL, 0x41f80000UL
+  cmpl(ebx, 16400);
+  movl(Address(esp, 0), ecx);
+  fild_s(Address(esp, 0));
+  jcc(Assembler::greaterEqual, B1_7);
+
+  bind(B1_6);
+  fld_d(ExternalAddress(pi04_3d));    //0x54442d00UL, 0x3fe921fbUL
+  fmul(1);
+  fsubp(3);
+  fxch(1);
+  fmul(2);
+  fld_s(2);
+  fadd(1);
+  fsubrp(1);
+  fld_s(0);
+  fxch(1);
+  fsuba(3);
+  fld_d(ExternalAddress(8 + pi04_3d));    //0x98cc5180UL, 0x3ce84698UL
+  fmul(3);
+  fsuba(2);
+  fxch(1);
+  fsub(2);
+  fsubrp(1);
+  faddp(3);
+  fld_d(ExternalAddress(16 + pi04_3d));    //0xcbb5bf6cUL, 0xb9dfc8f8UL
+  fmulp(2);
+  fld_s(1);
+  fsubr(1);
+  fsuba(1);
+  fxch(2);
+  fsubp(1);
+  faddp(2);
+  fxch(1);
+  jmp(B1_15);
+
+  bind(B1_7);
+  fld_d(ExternalAddress(pi04_5d));    //0x54400000UL, 0x3fe921fbUL
+  fmul(1);
+  fsubp(3);
+  fxch(1);
+  fmul(2);
+  fld_s(2);
+  fadd(1);
+  fsubrp(1);
+  fld_s(0);
+  fxch(1);
+  fsuba(3);
+  fld_d(ExternalAddress(8 + pi04_5d));    //0x1a600000UL, 0x3dc0b461UL
+  fmul(3);
+  fsuba(2);
+  fxch(1);
+  fsub(2);
+  fsubrp(1);
+  faddp(3);
+  fld_d(ExternalAddress(16 + pi04_5d));    //0x2e000000UL, 0x3b93198aUL
+  fmul(2);
+  fld_s(0);
+  fsubr(2);
+  fsuba(2);
+  fxch(1);
+  fsubp(2);
+  fxch(1);
+  faddp(3);
+  fld_d(ExternalAddress(24 + pi04_5d));    //0x25200000UL, 0x396b839aUL
+  fmul(2);
+  fld_s(0);
+  fsubr(2);
+  fsuba(2);
+  fxch(1);
+  fsubp(2);
+  fxch(1);
+  faddp(3);
+  fld_d(ExternalAddress(32 + pi04_5d));    //0x533e63a0UL, 0x37027044UL
+  fmulp(2);
+  fld_s(1);
+  fsubr(1);
+  fsuba(1);
+  fxch(2);
+  fsubp(1);
+  faddp(2);
+  fxch(1);
+  jmp(B1_15);
+
+  bind(B1_8);
+  fld_x(Address(ebp, 8));
+  addl(ebx, -16417);
+  fmul_d(as_Address(ExternalAddress(SCALE)));    //0x00000000UL, 0x32600000UL
+  movl(eax, -2078209981);
+  imull(ebx);
+  addl(edx, ebx);
+  movl(ecx, ebx);
+  sarl(edx, 4);
+  sarl(ecx, 31);
+  subl(edx, ecx);
+  movl(eax, edx);
+  shll(eax, 5);
+  fstp_x(Address(ebp, 8));
+  fld_x(Address(ebp, 8));
+  subl(eax, edx);
+  movl(Address(ebp, 8), 0);
+  subl(ebx, eax);
+  fld_x(Address(ebp, 8));
+  cmpl(ebx, 17);
+  fsuba(1);
+  jcc(Assembler::less, B1_10);
+
+  bind(B1_9);
+  lea(eax, Address(noreg, edx, Address::times_8));
+  lea(ecx, Address(eax, edx, Address::times_4));
+  incl(edx);
+  fld_x(Address(_4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
+  fmul(2);
+  fld_x(Address(12 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
+  fmul(2);
+  fld_s(0);
+  fadd(2);
+  fsuba(2);
+  fxch(1);
+  faddp(2);
+  fld_s(1);
+  fadd(1);
+  fstp_x(Address(esp, 8));
+  andl(Address(esp, 8), -16777216);
+  fld_x(Address(esp, 8));
+  fsubp(1);
+  jmp(B1_11);
+
+  bind(B1_10);
+  fld_d(ExternalAddress(zeros));    //0x00000000UL, 0x00000000UL
+  fld_s(0);
+
+  bind(B1_11);
+  fld_s(0);
+  lea(eax, Address(noreg, edx, Address::times_8));
+  fld_s(3);
+  lea(edx, Address(eax, edx, Address::times_4));
+  fld_x(Address(_4onpi_31l, RelocationHolder::none).plus_disp(edx, Address::times_1));
+  fmul(6);
+  movl(Address(esp, 0), edx);
+  fadda(2);
+  fxch(2);
+  fsuba(3);
+  fxch(2);
+  faddp(3);
+  fxch(2);
+  faddp(3);
+  fld_x(Address(12 + _4onpi_31l, RelocationHolder::none).plus_disp(edx, Address::times_1));
+  fmula(2);
+  fld_s(2);
+  fadd(2);
+  fld_s(0);
+  fxch(1);
+  fsubra(3);
+  fxch(3);
+  fchs();
+  faddp(4);
+  fxch(3);
+  faddp(4);
+  fxch(2);
+  fadd(3);
+  fxch(2);
+  fmul(5);
+  fadda(2);
+  fld_s(4);
+  fld_x(Address(24 + _4onpi_31l, RelocationHolder::none).plus_disp(edx, Address::times_1));
+  fmula(1);
+  fxch(1);
+  fadda(4);
+  fxch(4);
+  fstp_x(Address(esp, 8));
+  movzwl(ebx, Address(esp, 16));
+  andl(ebx, 32767);
+  cmpl(ebx, 16415);
+  jcc(Assembler::greaterEqual, B1_13);
+
+  bind(B1_12);
+  negl(ebx);
+  addl(ebx, 30);
+  movl(ecx, ebx);
+  movl(eax, Address(esp, 12));
+  shrl(eax);
+  shll(eax);
+  movl(Address(esp, 12), eax);
+  movl(Address(esp, 8), 0);
+  shrl(eax);
+  jmp(B1_14);
+
+  bind(B1_13);
+  negl(ebx);
+  addl(ebx, 30);
+  movl(ecx, ebx);
+  movl(edx, Address(esp, 8));
+  shrl(edx);
+  shll(edx);
+  negl(ecx);
+  movl(eax, Address(esp, 12));
+  shll(eax);
+  movl(ecx, ebx);
+  movl(Address(esp, 8), edx);
+  shrl(edx);
+  orl(eax, edx);
+
+  bind(B1_14);
+  fld_x(Address(esp, 8));
+  addl(eax, Address(esp, 4));
+  fsubp(3);
+  fmul(6);
+  fld_s(4);
+  movl(edx, eax);
+  andl(edx, 1);
+  fadd(3);
+  movl(ecx, Address(esp, 0));
+  fsuba(3);
+  fxch(3);
+  faddp(5);
+  fld_s(1);
+  fxch(3);
+  fadd_d(Address(zero_none, RelocationHolder::none).plus_disp(edx, Address::times_8));
+  fadda(3);
+  fsub(3);
+  faddp(2);
+  fxch(1);
+  faddp(4);
+  fld_s(2);
+  fadd(2);
+  fsuba(2);
+  fxch(3);
+  faddp(2);
+  fxch(1);
+  faddp(3);
+  fld_s(0);
+  fadd(2);
+  fsuba(2);
+  fxch(1);
+  faddp(2);
+  fxch(1);
+  faddp(2);
+  fld_s(2);
+  fld_x(Address(36 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
+  fmula(1);
+  fld_s(1);
+  fadd(3);
+  fsuba(3);
+  fxch(2);
+  faddp(3);
+  fxch(2);
+  faddp(3);
+  fxch(1);
+  fmul(4);
+  fld_s(0);
+  fadd(2);
+  fsuba(2);
+  fxch(1);
+  faddp(2);
+  fxch(1);
+  faddp(2);
+  fld_s(2);
+  fld_x(Address(48 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
+  fmula(1);
+  fld_s(1);
+  fadd(3);
+  fsuba(3);
+  fxch(2);
+  faddp(3);
+  fxch(2);
+  faddp(3);
+  fld_s(3);
+  fxch(2);
+  fmul(5);
+  fld_x(Address(60 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
+  fmula(3);
+  fxch(3);
+  faddp(1);
+  fld_s(0);
+  fadd(2);
+  fsuba(2);
+  fxch(1);
+  faddp(2);
+  fxch(1);
+  faddp(3);
+  fld_s(3);
+  fxch(2);
+  fmul(5);
+  fld_x(Address(72 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
+  fmula(3);
+  fxch(3);
+  faddp(1);
+  fld_s(0);
+  fadd(2);
+  fsuba(2);
+  fxch(1);
+  faddp(2);
+  fxch(1);
+  faddp(3);
+  fxch(1);
+  fmulp(4);
+  fld_x(Address(84 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
+  fmulp(3);
+  fxch(2);
+  faddp(3);
+  fld_s(2);
+  fadd(2);
+  fld_d(ExternalAddress(TWO_32H));    //0x00000000UL, 0x41f80000UL
+  fmul(1);
+  fadda(1);
+  fsubp(1);
+  fsuba(2);
+  fxch(3);
+  faddp(2);
+  faddp(1);
+  fld_d(ExternalAddress(pi04_2d));    //0x54400000UL, 0x3fe921fbUL
+  fld_s(0);
+  fmul(2);
+  fxch(2);
+  fadd(3);
+  fxch(1);
+  fmulp(3);
+  fmul_d(as_Address(ExternalAddress(8 + pi04_2d)));    //0x1a626331UL, 0x3dc0b461UL
+  faddp(1);
+
+  bind(B1_15);
+  fld_d(ExternalAddress(TWO_12H));    //0x00000000UL, 0x40b80000UL
+  fld_s(2);
+  fadd(2);
+  fmula(1);
+  fstp_x(Address(esp, 8));
+  fld_x(Address(esp, 8));
+  fadd(1);
+  fsubrp(1);
+  fst_d(Address(esi, 0));
+  fsubp(2);
+  faddp(1);
+  fstp_d(Address(esi, 8));
+  addl(esp, 20);
+  pop(ebx);
+  pop(edi);
+  pop(esi);
+  movl(esp, ebp);
+  pop(ebp);
+  ret(0);
+}
+
+ALIGNED_(16) juint StubRoutines::x86::_L_2il0floatpacket_0[] =
+{
+    0xffffffffUL, 0x7fffffffUL, 0x00000000UL, 0x00000000UL
+};
+
+ALIGNED_(16) juint StubRoutines::x86::_Pi4Inv[] =
+{
+    0x6dc9c883UL, 0x3ff45f30UL
+};
+
+ALIGNED_(16) juint StubRoutines::x86::_Pi4x3[] =
+{
+    0x54443000UL, 0xbfe921fbUL, 0x3b39a000UL, 0x3d373dcbUL, 0xe0e68948UL,
+    0xba845c06UL
+};
+
+ALIGNED_(16) juint StubRoutines::x86::_Pi4x4[] =
+{
+    0x54400000UL, 0xbfe921fbUL, 0x1a600000UL, 0xbdc0b461UL, 0x2e000000UL,
+    0xbb93198aUL, 0x252049c1UL, 0xb96b839aUL
+};
+
+ALIGNED_(16) jushort _SP[] =
+{
+    0xaaab, 0xaaaa, 0xaaaa, 0xaaaa, 0xbffc, 0x0000, 0x8887, 0x8888, 0x8888, 0x8888,
+    0x3ff8, 0x0000, 0xc527, 0x0d00, 0x00d0, 0xd00d, 0xbff2, 0x0000, 0x45f6, 0xb616,
+    0x1d2a, 0xb8ef, 0x3fec, 0x0000, 0x825b, 0x3997, 0x2b3f, 0xd732, 0xbfe5, 0x0000,
+    0xbf33, 0x8bb4, 0x2fda, 0xb092, 0x3fde, 0x0000, 0x44a6, 0xed1a, 0x29ef, 0xd73e,
+    0xbfd6, 0x0000, 0x8610, 0x307f, 0x62a1, 0xc921, 0x3fce, 0x0000
+};
+
+ALIGNED_(16) jushort _CP[] =
+{
+    0x0000, 0x0000, 0x0000, 0x8000, 0xbffe, 0x0000, 0xaaa5, 0xaaaa, 0xaaaa, 0xaaaa,
+    0x3ffa, 0x0000, 0x9c2f, 0x0b60, 0x60b6, 0xb60b, 0xbff5, 0x0000, 0xf024, 0x0cac,
+    0x00d0, 0xd00d, 0x3fef, 0x0000, 0x03fe, 0x3f65, 0x7dbb, 0x93f2, 0xbfe9, 0x0000,
+    0xd84d, 0xadee, 0xc698, 0x8f76, 0x3fe2, 0x0000, 0xdaba, 0xfe79, 0xea36, 0xc9c9,
+    0xbfda, 0x0000, 0x3ac6, 0x0ba0, 0x07ce, 0xd585, 0x3fd2, 0x0000
+};
+
+ALIGNED_(16) juint StubRoutines::x86::_ones[] =
+{
+    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xbff00000UL
+};
+
+void MacroAssembler::libm_sincos_huge(XMMRegister xmm0, XMMRegister xmm1, Register eax, Register ecx, Register edx, Register ebx, Register esi, Register edi, Register ebp, Register esp) {
+  Label B1_1, B1_2, B1_3, B1_4, B1_5, B1_6, B1_7, B1_8, B1_9, B1_10, B1_11, B1_12;
+  Label B1_13, B1_14, B1_15, B1_16, B1_17, B1_18, B1_19, B1_20, B1_21, B1_22, B1_23;
+  Label B1_24, B1_25, B1_26, B1_27, B1_28, B1_29, B1_30, B1_31, B1_32, B1_33, B1_34;
+  Label B1_35, B1_36, B1_37, B1_38, B1_39, B1_40, B1_41, B1_42, B1_43, B1_44, B1_45, B1_46;
+
+  assert_different_registers(ebx, eax, ecx, edx, esi, edi, ebp, esp);
+
+  address L_2il0floatpacket_0 = StubRoutines::x86::_L_2il0floatpacket_0_addr();
+  address Pi4Inv = StubRoutines::x86::_Pi4Inv_addr();
+  address Pi4x3 = StubRoutines::x86::_Pi4x3_addr();
+  address Pi4x4 = StubRoutines::x86::_Pi4x4_addr();
+  address ones = StubRoutines::x86::_ones_addr();
+  address CP = (address)_CP;
+  address SP = (address)_SP;
+
+  bind(B1_1);
+  push(ebp);
+  movl(ebp, esp);
+  andl(esp, -64);
+  push(esi);
+  push(edi);
+  push(ebx);
+  subl(esp, 52);
+  movl(eax, Address(ebp, 16));
+  movl(edx, Address(ebp, 20));
+  movl(Address(esp, 32), eax);
+  movl(Address(esp, 36), edx);
+
+  bind(B1_2);
+  fnstcw(Address(esp, 30));
+
+  bind(B1_3);
+  movsd(xmm1, Address(ebp, 8));
+  movl(esi, Address(ebp, 12));
+  movl(eax, esi);
+  andl(eax, 2147483647);
+  andps(xmm1, ExternalAddress(L_2il0floatpacket_0));    //0xffffffffUL, 0x7fffffffUL, 0x00000000UL, 0x00000000UL
+  shrl(esi, 31);
+  movl(Address(esp, 40), eax);
+  cmpl(eax, 1104150528);
+  movsd(Address(ebp, 8), xmm1);
+  jcc(Assembler::aboveEqual, B1_11);
+
+  bind(B1_4);
+  movsd(xmm0, ExternalAddress(Pi4Inv));    //0x6dc9c883UL, 0x3ff45f30UL
+  mulsd(xmm0, xmm1);
+  movzwl(edx, Address(esp, 30));
+  movl(eax, edx);
+  andl(eax, 768);
+  movsd(Address(esp, 0), xmm0);
+  cmpl(eax, 768);
+  jcc(Assembler::equal, B1_42);
+
+  bind(B1_5);
+  orl(edx, -64768);
+  movw(Address(esp, 28), edx);
+
+  bind(B1_6);
+  fldcw(Address(esp, 28));
+
+  bind(B1_7);
+  movsd(xmm1, Address(ebp, 8));
+  movl(ebx, 1);
+
+  bind(B1_8);
+  movl(Address(esp, 12), ebx);
+  movl(ebx, Address(esp, 4));
+  movl(eax, ebx);
+  movl(Address(esp, 8), esi);
+  movl(esi, ebx);
+  shrl(esi, 20);
+  andl(eax, 1048575);
+  movl(ecx, esi);
+  orl(eax, 1048576);
+  negl(ecx);
+  movl(edx, eax);
+  addl(ecx, 19);
+  addl(esi, 13);
+  movl(Address(esp, 24), ecx);
+  shrl(edx);
+  movl(ecx, esi);
+  shll(eax);
+  movl(ecx, Address(esp, 24));
+  movl(esi, Address(esp, 0));
+  shrl(esi);
+  orl(eax, esi);
+  cmpl(ebx, 1094713344);
+  movsd(Address(esp, 16), xmm1);
+  fld_d(Address(esp, 16));
+  cmov32(Assembler::below, eax, edx);
+  movl(esi, Address(esp, 8));
+  lea(edx, Address(eax, 1));
+  movl(ebx, edx);
+  andl(ebx, -2);
+  movl(Address(esp, 16), ebx);
+  fild_s(Address(esp, 16));
+  movl(ebx, Address(esp, 12));
+  cmpl(Address(esp, 40), 1094713344);
+  jcc(Assembler::aboveEqual, B1_10);
+
+  bind(B1_9);
+  fld_d(ExternalAddress(Pi4x3));    //0x54443000UL, 0xbfe921fbUL
+  fmul(1);
+  faddp(2);
+  fld_d(ExternalAddress(8 + Pi4x3));    //0x3b39a000UL, 0x3d373dcbUL
+  fmul(1);
+  faddp(2);
+  fld_d(ExternalAddress(16 + Pi4x3));    //0xe0e68948UL, 0xba845c06UL
+  fmulp(1);
+  faddp(1);
+  jmp(B1_17);
+
+  bind(B1_10);
+  fld_d(ExternalAddress(Pi4x4));    //0x54400000UL, 0xbfe921fbUL
+  fmul(1);
+  faddp(2);
+  fld_d(ExternalAddress(8 + Pi4x4));    //0x1a600000UL, 0xbdc0b461UL
+  fmul(1);
+  faddp(2);
+  fld_d(ExternalAddress(16 + Pi4x4));    //0x2e000000UL, 0xbb93198aUL
+  fmul(1);
+  faddp(2);
+  fld_d(ExternalAddress(24 + Pi4x4));    //0x252049c1UL, 0xb96b839aUL
+  fmulp(1);
+  faddp(1);
+  jmp(B1_17);
+
+  bind(B1_11);
+  movzwl(edx, Address(esp, 30));
+  movl(eax, edx);
+  andl(eax, 768);
+  cmpl(eax, 768);
+  jcc(Assembler::equal, B1_43);
+  bind(B1_12);
+  orl(edx, -64768);
+  movw(Address(esp, 28), edx);
+
+  bind(B1_13);
+  fldcw(Address(esp, 28));
+
+  bind(B1_14);
+  movsd(xmm1, Address(ebp, 8));
+  movl(ebx, 1);
+
+  bind(B1_15);
+  movsd(Address(esp, 16), xmm1);
+  fld_d(Address(esp, 16));
+  addl(esp, -32);
+  lea(eax, Address(esp, 32));
+  fstp_x(Address(esp, 0));
+  movl(Address(esp, 12), 0);
+  movl(Address(esp, 16), eax);
+  call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_reduce_pi04l())));
+
+  bind(B1_46);
+  addl(esp, 32);
+
+  bind(B1_16);
+  fld_d(Address(esp, 0));
+  lea(edx, Address(eax, 1));
+  fld_d(Address(esp, 8));
+  faddp(1);
+
+  bind(B1_17);
+  movl(ecx, edx);
+  addl(eax, 3);
+  shrl(ecx, 2);
+  andl(ecx, 1);
+  shrl(eax, 2);
+  xorl(esi, ecx);
+  movl(ecx, Address(esp, 36));
+  andl(eax, 1);
+  andl(ecx, 3);
+  cmpl(ecx, 3);
+  jcc(Assembler::notEqual, B1_25);
+
+  bind(B1_18);
+  fld_x(ExternalAddress(84 + SP));    //0x8610, 0x307f, 0x62
+  fld_s(1);
+  fmul((2));
+  testb(edx, 2);
+  fmula((1));
+  fld_x(ExternalAddress(72 + SP));    //0x44a6, 0xed1a, 0x29
+  faddp(2);
+  fmula(1);
+  fld_x(ExternalAddress(60 + SP));    //0xbf33, 0x8bb4, 0x2f
+  faddp(2);
+  fmula(1);
+  fld_x(ExternalAddress(48 + SP));    //0x825b, 0x3997, 0x2b
+  faddp(2);
+  fmula(1);
+  fld_x(ExternalAddress(36 + SP));    //0x45f6, 0xb616, 0x1d
+  faddp(2);
+  fmula(1);
+  fld_x(ExternalAddress(24 + SP));    //0xc527, 0x0d00, 0x00
+  faddp(2);
+  fmula(1);
+  fld_x(ExternalAddress(12 + SP));    //0x8887, 0x8888, 0x88
+  faddp(2);
+  fmula(1);
+  fld_x(ExternalAddress(SP));    //0xaaab, 0xaaaa, 0xaa
+  faddp(2);
+  fmula(1);
+  fld_x(ExternalAddress(84 + CP));    //0x3ac6, 0x0ba0, 0x07
+  fmul(1);
+  fld_x(ExternalAddress(72 + CP));    //0xdaba, 0xfe79, 0xea
+  faddp(1);
+  fmul(1);
+  fld_x(ExternalAddress(62 + CP));    //0xd84d, 0xadee, 0xc6
+  faddp(1);
+  fmul(1);
+  fld_x(ExternalAddress(48 + CP));    //0x03fe, 0x3f65, 0x7d
+  faddp(1);
+  fmul(1);
+  fld_x(ExternalAddress(36 + CP));    //0xf024, 0x0cac, 0x00
+  faddp(1);
+  fmul(1);
+  fld_x(ExternalAddress(24 + CP));    //0x9c2f, 0x0b60, 0x60
+  faddp(1);
+  fmul(1);
+  fld_x(ExternalAddress(12 + CP));    //0xaaa5, 0xaaaa, 0xaa
+  faddp(1);
+  fmul(1);
+  fld_x(ExternalAddress(CP));    //0x0000, 0x0000, 0x00
+  faddp(1);
+  fmulp(1);
+  fld_d(Address(ones, RelocationHolder::none).plus_disp(esi, Address::times_8));
+  fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
+  jcc(Assembler::equal, B1_22);
+
+  bind(B1_19);
+  fmulp(4);
+  testl(ebx, ebx);
+  fxch(2);
+  fmul(3);
+  movl(eax, Address(esp, 2));
+  faddp(3);
+  fxch(2);
+  fstp_d(Address(eax, 0));
+  fmula(1);
+  faddp(1);
+  fstp_d(Address(eax, 8));
+  jcc(Assembler::equal, B1_21);
+
+  bind(B1_20);
+  fldcw(Address(esp, 30));
+
+  bind(B1_21);
+  addl(esp, 52);
+  pop(ebx);
+  pop(edi);
+  pop(esi);
+  movl(esp, ebp);
+  pop(ebp);
+  ret(0);
+
+  bind(B1_22);
+  fxch(1);
+  fmulp(4);
+  testl(ebx, ebx);
+  fxch(2);
+  fmul(3);
+  movl(eax, Address(esp, 32));
+  faddp(3);
+  fxch(2);
+  fstp_d(Address(eax, 8));
+  fmula(1);
+  faddp(1);
+  fstp_d(Address(eax, 0));
+  jcc(Assembler::equal, B1_24);
+
+  bind(B1_23);
+  fldcw(Address(esp, 30));
+
+  bind(B1_24);
+  addl(esp, 52);
+  pop(ebx);
+  pop(edi);
+  pop(esi);
+  movl(esp, ebp);
+  pop(ebp);
+  ret(0);
+
+  bind(B1_25);
+  testb(Address(esp, 36), 2);
+  jcc(Assembler::equal, B1_33);
+
+  bind(B1_26);
+  fld_s(0);
+  testb(edx, 2);
+  fmul(1);
+  fld_s(0);
+  fmul(1);
+  jcc(Assembler::equal, B1_30);
+
+  bind(B1_27);
+  fstp_d(2);
+  fld_x(ExternalAddress(84 + CP));    //0x3ac6, 0x0ba0, 0x07
+  testl(ebx, ebx);
+  fmul(2);
+  fld_x(ExternalAddress(72 + CP));    //0xdaba, 0xfe79, 0xea
+  fmul(3);
+  fld_x(ExternalAddress(60 + CP));    //0xd84d, 0xadee, 0xc6
+  movl(eax, Address(rsp, 32));
+  faddp(2);
+  fxch(1);
+  fmul(3);
+  fld_x(ExternalAddress(48 + CP));    //0x03fe, 0x3f65, 0x7d
+  faddp(2);
+  fxch(1);
+  fmul(3);
+  fld_x(ExternalAddress(36 + CP));    //0xf024, 0x0cac, 0x00
+  faddp(2);
+  fxch(1);
+  fmul(3);
+  fld_x(ExternalAddress(24 + CP));    //0x9c2f, 0x0b60, 0x60
+  faddp(2);
+  fxch(1);
+  fmul(3);
+  fld_x(ExternalAddress(12 + CP));    //0xaaa5, 0xaaaa, 0xaa
+  faddp(2);
+  fxch(1);
+  fmulp(3);
+  fld_x(ExternalAddress(CP));    //0x0000, 0x0000, 0x00
+  faddp(1);
+  fmulp(1);
+  faddp(1);
+  fld_d(Address(ones, RelocationHolder::none).plus_disp(rsi, Address::times_8));
+  fmula(1);
+  faddp(1);
+  fstp_d(Address(eax, 8));
+  jcc(Assembler::equal, B1_29);
+
+  bind(B1_28);
+  fldcw(Address(esp, 30));
+
+  bind(B1_29);
+  addl(esp, 52);
+  pop(ebx);
+  pop(edi);
+  pop(esi);
+  movl(esp, ebp);
+  pop(ebp);
+  ret(0);
+
+  bind(B1_30);
+  fld_x(ExternalAddress(84 + SP));    //0x8610, 0x307f, 0x62
+  testl(ebx, ebx);
+  fmul(1);
+  fld_x(ExternalAddress(72 + SP));    //0x44a6, 0xed1a, 0x29
+  fmul(2);
+  fld_x(ExternalAddress(60 + SP));    //0xbf33, 0x8bb4, 0x2f
+  movl(eax, Address(rsp, 32));
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(48 + SP));    //0x825b, 0x3997, 0x2b
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(36 + SP));    //0x45f6, 0xb616, 0x1d
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(24 + SP));    //0xc527, 0x0d00, 0x00
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(12 + SP));    //0x8887, 0x8888, 0x88
+  faddp(2);
+  fxch(1);
+  fmulp(2);
+  fld_x(ExternalAddress(SP));    //0xaaab, 0xaaaa, 0xaa
+  faddp(1);
+  fmulp(2);
+  faddp(1);
+  fld_d(Address(ones, RelocationHolder::none).plus_disp(rsi, Address::times_8));
+  fmulp(2);
+  fmul(1);
+  faddp(1);
+  fstp_d(Address(eax, 8));
+  jcc(Assembler::equal, B1_32);
+
+  bind(B1_31);
+  fldcw(Address(esp, 30));
+
+  bind(B1_32);
+  addl(esp, 52);
+  pop(ebx);
+  pop(edi);
+  pop(esi);
+  movl(esp, ebp);
+  pop(ebp);
+  ret(0);
+
+  bind(B1_33);
+  testb(Address(esp, 36), 1);
+  jcc(Assembler::equal, B1_41);
+
+  bind(B1_34);
+  fld_s(0);
+  testb(edx, 2);
+  fmul(1);
+  fld_s(0);
+  fmul(1);
+  jcc(Assembler::equal, B1_38);
+
+  bind(B1_35);
+  fld_x(ExternalAddress(84 + SP));    //0x8610, 0x307f, 0x62
+  testl(ebx, ebx);
+  fmul(1);
+  fld_x(ExternalAddress(72 + SP));    //0x44a6, 0xed1a, 0x29
+  fmul(2);
+  fld_x(ExternalAddress(60 + SP));    //0xbf33, 0x8bb4, 0x2f
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(48 + SP));    //0x825b, 0x3997, 0x2b
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(36 + SP));    //0x45f6, 0xb616, 0x1d
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(24 + SP));    //0xc527, 0x0d00, 0x00
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(12 + SP));    //0x8887, 0x8888, 0x88
+  faddp(2);
+  fxch(1);
+  fmulp(2);
+  fld_x(ExternalAddress(SP));    //0xaaab, 0xaaaa, 0xaa
+  faddp(1);
+  fmulp(2);
+  faddp(1);
+  fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
+  fmulp(2);
+  fmul(1);
+  movl(eax, Address(esp, 32));
+  faddp(1);
+  fstp_d(Address(eax, 0));
+  jcc(Assembler::equal, B1_37);
+
+  bind(B1_36);
+  fldcw(Address(esp, 30));
+
+  bind(B1_37);
+  addl(esp, 52);
+  pop(ebx);
+  pop(edi);
+  pop(esi);
+  movl(esp, ebp);
+  pop(ebp);
+  ret(0);
+
+  bind(B1_38);
+  fstp_d(2);
+  fld_x(ExternalAddress(84 + CP));    //0x3ac6, 0x0ba0, 0x07
+  testl(ebx, ebx);
+  fmul(2);
+  fld_x(ExternalAddress(72 + CP));    //0xdaba, 0xfe79, 0xea
+  fmul(3);
+  fld_x(ExternalAddress(60 + CP));    //0xd84d, 0xadee, 0xc6
+  faddp(2);
+  fxch(1);
+  fmul(3);
+  fld_x(ExternalAddress(48 + CP));    //0x03fe, 0x3f65, 0x7d
+  faddp(2);
+  fxch(1);
+  fmul(3);
+  fld_x(ExternalAddress(36 + CP));    //0xf024, 0x0cac, 0x00
+  faddp(2);
+  fxch(1);
+  fmul(3);
+  fld_x(ExternalAddress(24 + CP));    //0x9c2f, 0x0b60, 0x60
+  faddp(2);
+  fxch(1);
+  fmul(3);
+  fld_x(ExternalAddress(12 + CP));    //0xaaa5, 0xaaaa, 0xaa
+  faddp(2);
+  fxch(1);
+  fmulp(3);
+  fld_x(ExternalAddress(CP));    //0x0000, 0x0000, 0x00
+  faddp(1);
+  fmulp(1);
+  faddp(1);
+  fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
+  fmula(1);
+  movl(eax, Address(esp, 32));
+  faddp(1);
+  fstp_d(Address(eax, 0));
+  jcc(Assembler::equal, B1_40);
+
+  bind(B1_39);
+  fldcw(Address(esp, 30));
+  bind(B1_40);
+  addl(esp, 52);
+  pop(ebx);
+  pop(edi);
+  pop(esi);
+  movl(esp, ebp);
+  pop(ebp);
+  ret(0);
+  bind(B1_41);
+  fstp_d(0);
+  addl(esp, 52);
+  pop(ebx);
+  pop(edi);
+  pop(esi);
+  movl(esp, ebp);
+  pop(ebp);
+  ret(0);
+  bind(B1_42);
+  xorl(ebx, ebx);
+  jmp(B1_8);
+  bind(B1_43);
+  xorl(ebx, ebx);
+  jmp(B1_15);
+}
+
+ALIGNED_(16) juint _static_const_table_sin[] =
+{
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL, 0xbf73b92eUL,
+    0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
+    0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL,
+    0xc0000000UL, 0xbc626d19UL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL,
+    0xbfa60beaUL, 0x2ed59f06UL, 0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL,
+    0x00000000UL, 0x3ff00000UL, 0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL,
+    0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL, 0x00000000UL, 0x3ff00000UL,
+    0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL, 0x20000000UL,
+    0x3c5e0d89UL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL, 0xbfc59267UL,
+    0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
+    0x3ff00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL,
+    0x20000000UL, 0x3c68076aUL, 0x00000000UL, 0x3ff00000UL, 0x99fcef32UL,
+    0x3fca8279UL, 0x667f3bcdUL, 0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL,
+    0x00000000UL, 0x3fe00000UL, 0x94247758UL, 0x3fc133ccUL, 0x6b151741UL,
+    0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL, 0x00000000UL, 0x3fe00000UL,
+    0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL, 0xe0000000UL,
+    0x3c39f630UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL, 0xbf9d4a2cUL,
+    0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
+    0x3fe00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0x3fed906bUL,
+    0x20000000UL, 0x3c7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x76acf82dUL,
+    0x3fa4a031UL, 0x56c62ddaUL, 0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL,
+    0x00000000UL, 0x3fd00000UL, 0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL,
+    0x3fef6297UL, 0x20000000UL, 0x3c756217UL, 0x00000000UL, 0x3fd00000UL,
+    0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL, 0x3fefd88dUL, 0x40000000UL,
+    0xbc887df6UL, 0x00000000UL, 0x3fc00000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0x3fefd88dUL,
+    0x40000000UL, 0xbc887df6UL, 0x00000000UL, 0xbfc00000UL, 0x0e5967d5UL,
+    0x3fac1d1fUL, 0xcff75cb0UL, 0x3fef6297UL, 0x20000000UL, 0x3c756217UL,
+    0x00000000UL, 0xbfd00000UL, 0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL,
+    0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL, 0x00000000UL, 0xbfd00000UL,
+    0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL, 0x3fed906bUL, 0x20000000UL,
+    0x3c7457e6UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL, 0x3f9d4a2cUL,
+    0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
+    0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL,
+    0xe0000000UL, 0x3c39f630UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL,
+    0xbfc133ccUL, 0x6b151741UL, 0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL,
+    0x00000000UL, 0xbfe00000UL, 0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL,
+    0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL, 0x00000000UL, 0xbfe00000UL,
+    0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL, 0x20000000UL,
+    0x3c68076aUL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL, 0x3fc59267UL,
+    0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
+    0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL,
+    0x20000000UL, 0x3c5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL,
+    0x3fb37ca1UL, 0xa6aea963UL, 0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL,
+    0x00000000UL, 0xbff00000UL, 0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL,
+    0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL, 0x00000000UL, 0xbff00000UL,
+    0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL, 0xc0000000UL,
+    0xbc626d19UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL, 0x3f73b92eUL,
+    0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
+    0xbff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL,
+    0x3f73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
+    0x00000000UL, 0xbff00000UL, 0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL,
+    0xbfc8f8b8UL, 0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0xbff00000UL,
+    0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL,
+    0x3c75d28dUL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL, 0x3fb37ca1UL,
+    0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL, 0x3c672cedUL, 0x00000000UL,
+    0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0xbfde2b5dUL,
+    0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL,
+    0x3fc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
+    0x00000000UL, 0xbff00000UL, 0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL,
+    0xbfe44cf3UL, 0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0xbff00000UL,
+    0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL,
+    0x3c8bdd34UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL, 0xbfc133ccUL,
+    0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL, 0x3c82c5e1UL, 0x00000000UL,
+    0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0xbfea9b66UL,
+    0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL,
+    0x3f9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
+    0x00000000UL, 0xbfe00000UL, 0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL,
+    0xbfed906bUL, 0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0xbfe00000UL,
+    0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL,
+    0xbc8760b1UL, 0x00000000UL, 0xbfd00000UL, 0x0e5967d5UL, 0x3fac1d1fUL,
+    0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL, 0xbc756217UL, 0x00000000UL,
+    0xbfd00000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0xbfefd88dUL,
+    0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0xbfc00000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL,
+    0xbfefd88dUL, 0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0x3fc00000UL,
+    0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL,
+    0xbc756217UL, 0x00000000UL, 0x3fd00000UL, 0x76acf82dUL, 0x3fa4a031UL,
+    0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL, 0xbc8760b1UL, 0x00000000UL,
+    0x3fd00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0xbfed906bUL,
+    0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL,
+    0xbf9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
+    0x00000000UL, 0x3fe00000UL, 0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL,
+    0xbfea9b66UL, 0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0x3fe00000UL,
+    0x94247758UL, 0x3fc133ccUL, 0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL,
+    0x3c82c5e1UL, 0x00000000UL, 0x3fe00000UL, 0x99fcef32UL, 0x3fca8279UL,
+    0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL, 0x3c8bdd34UL, 0x00000000UL,
+    0x3fe00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0xbfe44cf3UL,
+    0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL,
+    0xbfc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
+    0x00000000UL, 0x3ff00000UL, 0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL,
+    0xbfde2b5dUL, 0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0x3ff00000UL,
+    0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL,
+    0x3c672cedUL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL, 0xbfa60beaUL,
+    0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL, 0x3c75d28dUL, 0x00000000UL,
+    0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0xbfc8f8b8UL,
+    0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL,
+    0xbf73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
+    0x00000000UL, 0x3ff00000UL, 0x55555555UL, 0xbfc55555UL, 0x00000000UL,
+    0xbfe00000UL, 0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL,
+    0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL, 0xa556c734UL,
+    0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL, 0x1a600000UL, 0x3d90b461UL,
+    0x1a600000UL, 0x3d90b461UL, 0x54400000UL, 0x3fb921fbUL, 0x00000000UL,
+    0x00000000UL, 0x2e037073UL, 0x3b63198aUL, 0x00000000UL, 0x00000000UL,
+    0x6dc9c883UL, 0x40245f30UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x43380000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x43600000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x3c800000UL, 0x00000000UL,
+    0x00000000UL, 0xffffffffUL, 0x3fefffffUL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x80000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x80000000UL, 0x00000000UL, 0x80000000UL, 0x00000000UL, 0x3fe00000UL,
+    0x00000000UL, 0x3fe00000UL
+};
+
+void MacroAssembler::fast_sin(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ebx, Register edx) {
+
+  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
+  Label L_2TAG_PACKET_4_0_2, start;
+  assert_different_registers(eax, ebx, edx);
+  address static_const_table_sin = (address)_static_const_table_sin;
+
+  bind(start);
+  subl(rsp, 120);
+  movl(Address(rsp, 56), ebx);
+  lea(ebx, ExternalAddress(static_const_table_sin));
+  movsd(xmm0, Address(rsp, 128));
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32767);
+  subl(eax, 12336);
+  cmpl(eax, 4293);
+  jcc(Assembler::above, L_2TAG_PACKET_0_0_2);
+  movsd(xmm1, Address(ebx, 2160));
+  mulsd(xmm1, xmm0);
+  movsd(xmm5, Address(ebx, 2272));
+  movdqu(xmm4, Address(ebx, 2256));
+  pand(xmm4, xmm0);
+  por(xmm5, xmm4);
+  movsd(xmm3, Address(ebx, 2128));
+  movdqu(xmm2, Address(ebx, 2112));
+  addpd(xmm1, xmm5);
+  cvttsd2sil(edx, xmm1);
+  cvtsi2sdl(xmm1, edx);
+  mulsd(xmm3, xmm1);
+  unpcklpd(xmm1, xmm1);
+  addl(edx, 1865216);
+  movdqu(xmm4, xmm0);
+  andl(edx, 63);
+  movdqu(xmm5, Address(ebx, 2096));
+  lea(eax, Address(ebx, 0));
+  shll(edx, 5);
+  addl(eax, edx);
+  mulpd(xmm2, xmm1);
+  subsd(xmm0, xmm3);
+  mulsd(xmm1, Address(ebx, 2144));
+  subsd(xmm4, xmm3);
+  movsd(xmm7, Address(eax, 8));
+  unpcklpd(xmm0, xmm0);
+  movapd(xmm3, xmm4);
+  subsd(xmm4, xmm2);
+  mulpd(xmm5, xmm0);
+  subpd(xmm0, xmm2);
+  movdqu(xmm6, Address(ebx, 2064));
+  mulsd(xmm7, xmm4);
+  subsd(xmm3, xmm4);
+  mulpd(xmm5, xmm0);
+  mulpd(xmm0, xmm0);
+  subsd(xmm3, xmm2);
+  movdqu(xmm2, Address(eax, 0));
+  subsd(xmm1, xmm3);
+  movsd(xmm3, Address(eax, 24));
+  addsd(xmm2, xmm3);
+  subsd(xmm7, xmm2);
+  mulsd(xmm2, xmm4);
+  mulpd(xmm6, xmm0);
+  mulsd(xmm3, xmm4);
+  mulpd(xmm2, xmm0);
+  mulpd(xmm0, xmm0);
+  addpd(xmm5, Address(ebx, 2080));
+  mulsd(xmm4, Address(eax, 0));
+  addpd(xmm6, Address(ebx, 2048));
+  mulpd(xmm5, xmm0);
+  movapd(xmm0, xmm3);
+  addsd(xmm3, Address(eax, 8));
+  mulpd(xmm1, xmm7);
+  movapd(xmm7, xmm4);
+  addsd(xmm4, xmm3);
+  addpd(xmm6, xmm5);
+  movsd(xmm5, Address(eax, 8));
+  subsd(xmm5, xmm3);
+  subsd(xmm3, xmm4);
+  addsd(xmm1, Address(eax, 16));
+  mulpd(xmm6, xmm2);
+  addsd(xmm5, xmm0);
+  addsd(xmm3, xmm7);
+  addsd(xmm1, xmm5);
+  addsd(xmm1, xmm3);
+  addsd(xmm1, xmm6);
+  unpckhpd(xmm6, xmm6);
+  addsd(xmm1, xmm6);
+  addsd(xmm4, xmm1);
+  movsd(Address(rsp, 0), xmm4);
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_0_0_2);
+  jcc(Assembler::greater, L_2TAG_PACKET_2_0_2);
+  shrl(eax, 4);
+  cmpl(eax, 268434685);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_3_0_2);
+  movsd(Address(rsp, 0), xmm0);
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_3_0_2);
+  movsd(xmm3, Address(ebx, 2192));
+  mulsd(xmm3, xmm0);
+  subsd(xmm3, xmm0);
+  mulsd(xmm3, Address(ebx, 2208));
+  movsd(Address(rsp, 0), xmm0);
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_2_0_2);
+  movl(eax, Address(rsp, 132));
+  andl(eax, 2146435072);
+  cmpl(eax, 2146435072);
+  jcc(Assembler::equal, L_2TAG_PACKET_4_0_2);
+  subl(rsp, 32);
+  movsd(Address(rsp, 0), xmm0);
+  lea(eax, Address(rsp, 40));
+  movl(Address(rsp, 8), eax);
+  movl(eax, 2);
+  movl(Address(rsp, 12), eax);
+  call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_sin_cos_huge())));
+  addl(rsp, 32);
+  fld_d(Address(rsp, 16));
+  jmp(L_2TAG_PACKET_1_0_2);
+  bind(L_2TAG_PACKET_4_0_2);
+  fld_d(Address(rsp, 128));
+  fmul_d(Address(ebx, 2240));
+  bind(L_2TAG_PACKET_1_0_2);
+  movl(ebx, Address(rsp, 56));
+}
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86_tan.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,2144 @@
+/*
+* Copyright (c) 2016, Intel Corporation.
+* Intel Math Library (LIBM) Source Code
+*
+* 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.
+*
+*/
+
+#include "precompiled.hpp"
+#include "asm/assembler.hpp"
+#include "asm/assembler.inline.hpp"
+#include "runtime/stubRoutines.hpp"
+#include "macroAssembler_x86.hpp"
+
+#ifdef _MSC_VER
+#define ALIGNED_(x) __declspec(align(x))
+#else
+#define ALIGNED_(x) __attribute__ ((aligned(x)))
+#endif
+
+/******************************************************************************/
+//                     ALGORITHM DESCRIPTION - TAN()
+//                     ---------------------
+//
+// Polynomials coefficients and other constants.
+//
+// Note that in this algorithm, there is a different polynomial for
+// each breakpoint, so there are 32 sets of polynomial coefficients
+// as well as 32 instances of the other constants.
+//
+// The polynomial coefficients and constants are offset from the start
+// of the main block as follows:
+//
+//   0:  c8 | c0
+//  16:  c9 | c1
+//  32: c10 | c2
+//  48: c11 | c3
+//  64: c12 | c4
+//  80: c13 | c5
+//  96: c14 | c6
+// 112: c15 | c7
+// 128: T_hi
+// 136: T_lo
+// 144: Sigma
+// 152: T_hl
+// 160: Tau
+// 168: Mask
+// 176: (end of block)
+//
+// The total table size is therefore 5632 bytes.
+//
+// Note that c0 and c1 are always zero. We could try storing
+// other constants here, and just loading the low part of the
+// SIMD register in these cases, after ensuring the high part
+// is zero.
+//
+// The higher terms of the polynomial are computed in the *low*
+// part of the SIMD register. This is so we can overlap the
+// multiplication by r^8 and the unpacking of the other part.
+//
+// The constants are:
+// T_hi + T_lo = accurate constant term in power series
+// Sigma + T_hl = accurate coefficient of r in power series (Sigma=1 bit)
+// Tau = multiplier for the reciprocal, always -1 or 0
+//
+// The basic reconstruction formula using these constants is:
+//
+// High = tau * recip_hi + t_hi
+// Med = (sgn * r + t_hl * r)_hi
+// Low = (sgn * r + t_hl * r)_lo +
+//       tau * recip_lo + T_lo + (T_hl + sigma) * c + pol
+//
+// where pol = c0 + c1 * r + c2 * r^2 + ... + c15 * r^15
+//
+// (c0 = c1 = 0, but using them keeps SIMD regularity)
+//
+// We then do a compensated sum High + Med, add the low parts together
+// and then do the final sum.
+//
+// Here recip_hi + recip_lo is an accurate reciprocal of the remainder
+// modulo pi/2
+//
+// Special cases:
+//  tan(NaN) = quiet NaN, and raise invalid exception
+//  tan(INF) = NaN and raise invalid exception
+//  tan(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#ifdef _LP64
+// The 64 bit code is at most SSE2 compliant
+ALIGNED_(16) juint _ONEHALF_tan[] =
+{
+    0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
+};
+
+ALIGNED_(16) juint _MUL16[] =
+{
+    0x00000000UL, 0x40300000UL, 0x00000000UL, 0x3ff00000UL
+};
+
+ALIGNED_(16) juint _sign_mask_tan[] =
+{
+    0x00000000UL, 0x80000000UL, 0x00000000UL, 0x80000000UL
+};
+
+ALIGNED_(16) juint _PI32INV_tan[] =
+{
+    0x6dc9c883UL, 0x3fe45f30UL, 0x6dc9c883UL, 0x40245f30UL
+};
+
+ALIGNED_(16) juint _P_1_tan[] =
+{
+    0x54444000UL, 0x3fb921fbUL, 0x54440000UL, 0x3fb921fbUL
+};
+
+ALIGNED_(16) juint _P_2_tan[] =
+{
+    0x67674000UL, 0xbd32e7b9UL, 0x4c4c0000UL, 0x3d468c23UL
+};
+
+ALIGNED_(16) juint _P_3_tan[] =
+{
+    0x3707344aUL, 0x3aa8a2e0UL, 0x03707345UL, 0x3ae98a2eUL
+};
+
+ALIGNED_(16) juint _Ctable_tan[] =
+{
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x882c10faUL,
+    0x3f9664f4UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x55e6c23dUL, 0x3f8226e3UL, 0x55555555UL,
+    0x3fd55555UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x0e157de0UL, 0x3f6d6d3dUL, 0x11111111UL, 0x3fc11111UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x452b75e3UL, 0x3f57da36UL,
+    0x1ba1ba1cUL, 0x3faba1baUL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x4e435f9bUL,
+    0x3f953f83UL, 0x00000000UL, 0x00000000UL, 0x3c6e8e46UL, 0x3f9b74eaUL,
+    0x00000000UL, 0x00000000UL, 0xda5b7511UL, 0x3f85ad63UL, 0xdc230b9bUL,
+    0x3fb97558UL, 0x26cb3788UL, 0x3f881308UL, 0x76fc4985UL, 0x3fd62ac9UL,
+    0x77bb08baUL, 0x3f757c85UL, 0xb6247521UL, 0x3fb1381eUL, 0x5922170cUL,
+    0x3f754e95UL, 0x8746482dUL, 0x3fc27f83UL, 0x11055b30UL, 0x3f64e391UL,
+    0x3e666320UL, 0x3fa3e609UL, 0x0de9dae3UL, 0x3f6301dfUL, 0x1f1dca06UL,
+    0x3fafa8aeUL, 0x8c5b2da2UL, 0x3fb936bbUL, 0x4e88f7a5UL, 0x3c587d05UL,
+    0x00000000UL, 0x3ff00000UL, 0xa8935dd9UL, 0x3f83dde2UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x5a279ea3UL, 0x3faa3407UL,
+    0x00000000UL, 0x00000000UL, 0x432d65faUL, 0x3fa70153UL, 0x00000000UL,
+    0x00000000UL, 0x891a4602UL, 0x3f9d03efUL, 0xd62ca5f8UL, 0x3fca77d9UL,
+    0xb35f4628UL, 0x3f97a265UL, 0x433258faUL, 0x3fd8cf51UL, 0xb58fd909UL,
+    0x3f8f88e3UL, 0x01771ceaUL, 0x3fc2b154UL, 0xf3562f8eUL, 0x3f888f57UL,
+    0xc028a723UL, 0x3fc7370fUL, 0x20b7f9f0UL, 0x3f80f44cUL, 0x214368e9UL,
+    0x3fb6dfaaUL, 0x28891863UL, 0x3f79b4b6UL, 0x172dbbf0UL, 0x3fb6cb8eUL,
+    0xe0553158UL, 0x3fc975f5UL, 0x593fe814UL, 0x3c2ef5d3UL, 0x00000000UL,
+    0x3ff00000UL, 0x03dec550UL, 0x3fa44203UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x9314533eUL, 0x3fbb8ec5UL, 0x00000000UL,
+    0x00000000UL, 0x09aa36d0UL, 0x3fb6d3f4UL, 0x00000000UL, 0x00000000UL,
+    0xdcb427fdUL, 0x3fb13950UL, 0xd87ab0bbUL, 0x3fd5335eUL, 0xce0ae8a5UL,
+    0x3fabb382UL, 0x79143126UL, 0x3fddba41UL, 0x5f2b28d4UL, 0x3fa552f1UL,
+    0x59f21a6dUL, 0x3fd015abUL, 0x22c27d95UL, 0x3fa0e984UL, 0xe19fc6aaUL,
+    0x3fd0576cUL, 0x8f2c2950UL, 0x3f9a4898UL, 0xc0b3f22cUL, 0x3fc59462UL,
+    0x1883a4b8UL, 0x3f94b61cUL, 0x3f838640UL, 0x3fc30eb8UL, 0x355c63dcUL,
+    0x3fd36a08UL, 0x1dce993dUL, 0xbc6d704dUL, 0x00000000UL, 0x3ff00000UL,
+    0x2b82ab63UL, 0x3fb78e92UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x56f37042UL, 0x3fccfc56UL, 0x00000000UL, 0x00000000UL,
+    0xaa563951UL, 0x3fc90125UL, 0x00000000UL, 0x00000000UL, 0x3d0e7c5dUL,
+    0x3fc50533UL, 0x9bed9b2eUL, 0x3fdf0ed9UL, 0x5fe7c47cUL, 0x3fc1f250UL,
+    0x96c125e5UL, 0x3fe2edd9UL, 0x5a02bbd8UL, 0x3fbe5c71UL, 0x86362c20UL,
+    0x3fda08b7UL, 0x4b4435edUL, 0x3fb9d342UL, 0x4b494091UL, 0x3fd911bdUL,
+    0xb56658beUL, 0x3fb5e4c7UL, 0x93a2fd76UL, 0x3fd3c092UL, 0xda271794UL,
+    0x3fb29910UL, 0x3303df2bUL, 0x3fd189beUL, 0x99fcef32UL, 0x3fda8279UL,
+    0xb68c1467UL, 0x3c708b2fUL, 0x00000000UL, 0x3ff00000UL, 0x980c4337UL,
+    0x3fc5f619UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0xcc03e501UL, 0x3fdff10fUL, 0x00000000UL, 0x00000000UL, 0x44a4e845UL,
+    0x3fddb63bUL, 0x00000000UL, 0x00000000UL, 0x3768ad9fUL, 0x3fdb72a4UL,
+    0x3dd01ccaUL, 0x3fe5fdb9UL, 0xa61d2811UL, 0x3fd972b2UL, 0x5645ad0bUL,
+    0x3fe977f9UL, 0xd013b3abUL, 0x3fd78ca3UL, 0xbf0bf914UL, 0x3fe4f192UL,
+    0x4d53e730UL, 0x3fd5d060UL, 0x3f8b9000UL, 0x3fe49933UL, 0xe2b82f08UL,
+    0x3fd4322aUL, 0x5936a835UL, 0x3fe27ae1UL, 0xb1c61c9bUL, 0x3fd2b3fbUL,
+    0xef478605UL, 0x3fe1659eUL, 0x190834ecUL, 0x3fe11ab7UL, 0xcdb625eaUL,
+    0xbc8e564bUL, 0x00000000UL, 0x3ff00000UL, 0xb07217e3UL, 0x3fd248f1UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x2b2c49d0UL,
+    0x3ff2de9cUL, 0x00000000UL, 0x00000000UL, 0x2655bc98UL, 0x3ff33e58UL,
+    0x00000000UL, 0x00000000UL, 0xff691fa2UL, 0x3ff3972eUL, 0xe93463bdUL,
+    0x3feeed87UL, 0x070e10a0UL, 0x3ff3f5b2UL, 0xf4d790a4UL, 0x3ff20c10UL,
+    0xa04e8ea3UL, 0x3ff4541aUL, 0x386accd3UL, 0x3ff1369eUL, 0x222a66ddUL,
+    0x3ff4b521UL, 0x22a9777eUL, 0x3ff20817UL, 0x52a04a6eUL, 0x3ff5178fUL,
+    0xddaa0031UL, 0x3ff22137UL, 0x4447d47cUL, 0x3ff57c01UL, 0x1e9c7f1dUL,
+    0x3ff29311UL, 0x2ab7f990UL, 0x3fe561b8UL, 0x209c7df1UL, 0x3c87a8c5UL,
+    0x00000000UL, 0x3ff00000UL, 0x4170bcc6UL, 0x3fdc92d8UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0xc7ab4d5aUL, 0x40085e24UL,
+    0x00000000UL, 0x00000000UL, 0xe93ea75dUL, 0x400b963dUL, 0x00000000UL,
+    0x00000000UL, 0x94a7f25aUL, 0x400f37e2UL, 0x4b6261cbUL, 0x3ff5f984UL,
+    0x5a9dd812UL, 0x4011aab0UL, 0x74c30018UL, 0x3ffaf5a5UL, 0x7f2ce8e3UL,
+    0x4013fe8bUL, 0xfe8e54faUL, 0x3ffd7334UL, 0x670d618dUL, 0x4016a10cUL,
+    0x4db97058UL, 0x4000e012UL, 0x24df44ddUL, 0x40199c5fUL, 0x697d6eceUL,
+    0x4003006eUL, 0x83298b82UL, 0x401cfc4dUL, 0x19d490d6UL, 0x40058c19UL,
+    0x2ae42850UL, 0x3fea4300UL, 0x118e20e6UL, 0xbc7a6db8UL, 0x00000000UL,
+    0x40000000UL, 0xe33345b8UL, 0xbfd4e526UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x65965966UL, 0x40219659UL, 0x00000000UL,
+    0x00000000UL, 0x882c10faUL, 0x402664f4UL, 0x00000000UL, 0x00000000UL,
+    0x83cd3723UL, 0x402c8342UL, 0x00000000UL, 0x40000000UL, 0x55e6c23dUL,
+    0x403226e3UL, 0x55555555UL, 0x40055555UL, 0x34451939UL, 0x40371c96UL,
+    0xaaaaaaabUL, 0x400aaaaaUL, 0x0e157de0UL, 0x403d6d3dUL, 0x11111111UL,
+    0x40111111UL, 0xa738201fUL, 0x4042bbceUL, 0x05b05b06UL, 0x4015b05bUL,
+    0x452b75e3UL, 0x4047da36UL, 0x1ba1ba1cUL, 0x401ba1baUL, 0x00000000UL,
+    0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x40000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x4f48b8d3UL, 0xbf33eaf9UL, 0x00000000UL, 0x00000000UL,
+    0x0cf7586fUL, 0x3f20b8eaUL, 0x00000000UL, 0x00000000UL, 0xd0258911UL,
+    0xbf0abaf3UL, 0x23e49fe9UL, 0xbfab5a8cUL, 0x2d53222eUL, 0x3ef60d15UL,
+    0x21169451UL, 0x3fa172b2UL, 0xbb254dbcUL, 0xbee1d3b5UL, 0xdbf93b8eUL,
+    0xbf84c7dbUL, 0x05b4630bUL, 0x3ecd3364UL, 0xee9aada7UL, 0x3f743924UL,
+    0x794a8297UL, 0xbeb7b7b9UL, 0xe015f797UL, 0xbf5d41f5UL, 0xe41a4a56UL,
+    0x3ea35dfbUL, 0xe4c2a251UL, 0x3f49a2abUL, 0x5af9e000UL, 0xbfce49ceUL,
+    0x8c743719UL, 0x3d1eb860UL, 0x00000000UL, 0x00000000UL, 0x1b4863cfUL,
+    0x3fd78294UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL,
+    0x535ad890UL, 0xbf2b9320UL, 0x00000000UL, 0x00000000UL, 0x018fdf1fUL,
+    0x3f16d61dUL, 0x00000000UL, 0x00000000UL, 0x0359f1beUL, 0xbf0139e4UL,
+    0xa4317c6dUL, 0xbfa67e17UL, 0x82672d0fUL, 0x3eebb405UL, 0x2f1b621eUL,
+    0x3f9f455bUL, 0x51ccf238UL, 0xbed55317UL, 0xf437b9acUL, 0xbf804beeUL,
+    0xc791a2b5UL, 0x3ec0e993UL, 0x919a1db2UL, 0x3f7080c2UL, 0x336a5b0eUL,
+    0xbeaa48a2UL, 0x0a268358UL, 0xbf55a443UL, 0xdfd978e4UL, 0x3e94b61fUL,
+    0xd7767a58UL, 0x3f431806UL, 0x2aea0000UL, 0xbfc9bbe8UL, 0x7723ea61UL,
+    0xbd3a2369UL, 0x00000000UL, 0x00000000UL, 0xdf7796ffUL, 0x3fd6e642UL,
+    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0xb9ff07ceUL,
+    0xbf231c78UL, 0x00000000UL, 0x00000000UL, 0xa5517182UL, 0x3f0ff0e0UL,
+    0x00000000UL, 0x00000000UL, 0x790b4cbcUL, 0xbef66191UL, 0x848a46c6UL,
+    0xbfa21ac0UL, 0xb16435faUL, 0x3ee1d3ecUL, 0x2a1aa832UL, 0x3f9c71eaUL,
+    0xfdd299efUL, 0xbec9dd1aUL, 0x3f8dbaafUL, 0xbf793363UL, 0x309fc6eaUL,
+    0x3eb415d6UL, 0xbee60471UL, 0x3f6b83baUL, 0x94a0a697UL, 0xbe9dae11UL,
+    0x3e5c67b3UL, 0xbf4fd07bUL, 0x9a8f3e3eUL, 0x3e86bd75UL, 0xa4beb7a4UL,
+    0x3f3d1eb1UL, 0x29cfc000UL, 0xbfc549ceUL, 0xbf159358UL, 0xbd397b33UL,
+    0x00000000UL, 0x00000000UL, 0x871fee6cUL, 0x3fd666f0UL, 0x00000000UL,
+    0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x7d98a556UL, 0xbf1a3958UL,
+    0x00000000UL, 0x00000000UL, 0x9d88dc01UL, 0x3f0704c2UL, 0x00000000UL,
+    0x00000000UL, 0x73742a2bUL, 0xbeed054aUL, 0x58844587UL, 0xbf9c2a13UL,
+    0x55688a79UL, 0x3ed7a326UL, 0xee33f1d6UL, 0x3f9a48f4UL, 0xa8dc9888UL,
+    0xbebf8939UL, 0xaad4b5b8UL, 0xbf72f746UL, 0x9102efa1UL, 0x3ea88f82UL,
+    0xdabc29cfUL, 0x3f678228UL, 0x9289afb8UL, 0xbe90f456UL, 0x741fb4edUL,
+    0xbf46f3a3UL, 0xa97f6663UL, 0x3e79b4bfUL, 0xca89ff3fUL, 0x3f36db70UL,
+    0xa8a2a000UL, 0xbfc0ee13UL, 0x3da24be1UL, 0xbd338b9fUL, 0x00000000UL,
+    0x00000000UL, 0x11cd6c69UL, 0x3fd601fdUL, 0x00000000UL, 0x3ff00000UL,
+    0x00000000UL, 0xfffffff8UL, 0x1a154b97UL, 0xbf116b01UL, 0x00000000UL,
+    0x00000000UL, 0x2d427630UL, 0x3f0147bfUL, 0x00000000UL, 0x00000000UL,
+    0xb93820c8UL, 0xbee264d4UL, 0xbb6cbb18UL, 0xbf94ab8cUL, 0x888d4d92UL,
+    0x3ed0568bUL, 0x60730f7cUL, 0x3f98b19bUL, 0xe4b1fb11UL, 0xbeb2f950UL,
+    0x22cf9f74UL, 0xbf6b21cdUL, 0x4a3ff0a6UL, 0x3e9f499eUL, 0xfd2b83ceUL,
+    0x3f64aad7UL, 0x637b73afUL, 0xbe83487cUL, 0xe522591aUL, 0xbf3fc092UL,
+    0xa158e8bcUL, 0x3e6e3aaeUL, 0xe5e82ffaUL, 0x3f329d2fUL, 0xd636a000UL,
+    0xbfb9477fUL, 0xc2c2d2bcUL, 0xbd135ef9UL, 0x00000000UL, 0x00000000UL,
+    0xf2fdb123UL, 0x3fd5b566UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL,
+    0xfffffff8UL, 0xc41acb64UL, 0xbf05448dUL, 0x00000000UL, 0x00000000UL,
+    0xdbb03d6fUL, 0x3efb7ad2UL, 0x00000000UL, 0x00000000UL, 0x9e42962dUL,
+    0xbed5aea5UL, 0x2579f8efUL, 0xbf8b2398UL, 0x288a1ed9UL, 0x3ec81441UL,
+    0xb0198dc5UL, 0x3f979a3aUL, 0x2fdfe253UL, 0xbea57cd3UL, 0x5766336fUL,
+    0xbf617caaUL, 0x600944c3UL, 0x3e954ed6UL, 0xa4e0aaf8UL, 0x3f62c646UL,
+    0x6b8fb29cUL, 0xbe74e3a3UL, 0xdc4c0409UL, 0xbf33f952UL, 0x9bffe365UL,
+    0x3e6301ecUL, 0xb8869e44UL, 0x3f2fc566UL, 0xe1e04000UL, 0xbfb0cc62UL,
+    0x016b907fUL, 0xbd119cbcUL, 0x00000000UL, 0x00000000UL, 0xe6b9d8faUL,
+    0x3fd57fb3UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL,
+    0x5daf22a6UL, 0xbef429d7UL, 0x00000000UL, 0x00000000UL, 0x06bca545UL,
+    0x3ef7a27dUL, 0x00000000UL, 0x00000000UL, 0x7211c19aUL, 0xbec41c3eUL,
+    0x956ed53eUL, 0xbf7ae3f4UL, 0xee750e72UL, 0x3ec3901bUL, 0x91d443f5UL,
+    0x3f96f713UL, 0x36661e6cUL, 0xbe936e09UL, 0x506f9381UL, 0xbf5122e8UL,
+    0xcb6dd43fUL, 0x3e9041b9UL, 0x6698b2ffUL, 0x3f61b0c7UL, 0x576bf12bUL,
+    0xbe625a8aUL, 0xe5a0e9dcUL, 0xbf23499dUL, 0x110384ddUL, 0x3e5b1c2cUL,
+    0x68d43db6UL, 0x3f2cb899UL, 0x6ecac000UL, 0xbfa0c414UL, 0xcd7dd58cUL,
+    0x3d13500fUL, 0x00000000UL, 0x00000000UL, 0x85a2c8fbUL, 0x3fd55fe0UL,
+    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x2bf70ebeUL, 0x3ef66a8fUL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0xd644267fUL, 0x3ec22805UL, 0x16c16c17UL, 0x3f96c16cUL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0xc4e09162UL,
+    0x3e8d6db2UL, 0xbc011567UL, 0x3f61566aUL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x1f79955cUL, 0x3e57da4eUL, 0x9334ef0bUL,
+    0x3f2bbd77UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x55555555UL, 0x3fd55555UL, 0x00000000UL,
+    0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x5daf22a6UL, 0x3ef429d7UL,
+    0x00000000UL, 0x00000000UL, 0x06bca545UL, 0x3ef7a27dUL, 0x00000000UL,
+    0x00000000UL, 0x7211c19aUL, 0x3ec41c3eUL, 0x956ed53eUL, 0x3f7ae3f4UL,
+    0xee750e72UL, 0x3ec3901bUL, 0x91d443f5UL, 0x3f96f713UL, 0x36661e6cUL,
+    0x3e936e09UL, 0x506f9381UL, 0x3f5122e8UL, 0xcb6dd43fUL, 0x3e9041b9UL,
+    0x6698b2ffUL, 0x3f61b0c7UL, 0x576bf12bUL, 0x3e625a8aUL, 0xe5a0e9dcUL,
+    0x3f23499dUL, 0x110384ddUL, 0x3e5b1c2cUL, 0x68d43db6UL, 0x3f2cb899UL,
+    0x6ecac000UL, 0x3fa0c414UL, 0xcd7dd58cUL, 0xbd13500fUL, 0x00000000UL,
+    0x00000000UL, 0x85a2c8fbUL, 0x3fd55fe0UL, 0x00000000UL, 0x3ff00000UL,
+    0x00000000UL, 0xfffffff8UL, 0xc41acb64UL, 0x3f05448dUL, 0x00000000UL,
+    0x00000000UL, 0xdbb03d6fUL, 0x3efb7ad2UL, 0x00000000UL, 0x00000000UL,
+    0x9e42962dUL, 0x3ed5aea5UL, 0x2579f8efUL, 0x3f8b2398UL, 0x288a1ed9UL,
+    0x3ec81441UL, 0xb0198dc5UL, 0x3f979a3aUL, 0x2fdfe253UL, 0x3ea57cd3UL,
+    0x5766336fUL, 0x3f617caaUL, 0x600944c3UL, 0x3e954ed6UL, 0xa4e0aaf8UL,
+    0x3f62c646UL, 0x6b8fb29cUL, 0x3e74e3a3UL, 0xdc4c0409UL, 0x3f33f952UL,
+    0x9bffe365UL, 0x3e6301ecUL, 0xb8869e44UL, 0x3f2fc566UL, 0xe1e04000UL,
+    0x3fb0cc62UL, 0x016b907fUL, 0x3d119cbcUL, 0x00000000UL, 0x00000000UL,
+    0xe6b9d8faUL, 0x3fd57fb3UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL,
+    0xfffffff8UL, 0x1a154b97UL, 0x3f116b01UL, 0x00000000UL, 0x00000000UL,
+    0x2d427630UL, 0x3f0147bfUL, 0x00000000UL, 0x00000000UL, 0xb93820c8UL,
+    0x3ee264d4UL, 0xbb6cbb18UL, 0x3f94ab8cUL, 0x888d4d92UL, 0x3ed0568bUL,
+    0x60730f7cUL, 0x3f98b19bUL, 0xe4b1fb11UL, 0x3eb2f950UL, 0x22cf9f74UL,
+    0x3f6b21cdUL, 0x4a3ff0a6UL, 0x3e9f499eUL, 0xfd2b83ceUL, 0x3f64aad7UL,
+    0x637b73afUL, 0x3e83487cUL, 0xe522591aUL, 0x3f3fc092UL, 0xa158e8bcUL,
+    0x3e6e3aaeUL, 0xe5e82ffaUL, 0x3f329d2fUL, 0xd636a000UL, 0x3fb9477fUL,
+    0xc2c2d2bcUL, 0x3d135ef9UL, 0x00000000UL, 0x00000000UL, 0xf2fdb123UL,
+    0x3fd5b566UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL,
+    0x7d98a556UL, 0x3f1a3958UL, 0x00000000UL, 0x00000000UL, 0x9d88dc01UL,
+    0x3f0704c2UL, 0x00000000UL, 0x00000000UL, 0x73742a2bUL, 0x3eed054aUL,
+    0x58844587UL, 0x3f9c2a13UL, 0x55688a79UL, 0x3ed7a326UL, 0xee33f1d6UL,
+    0x3f9a48f4UL, 0xa8dc9888UL, 0x3ebf8939UL, 0xaad4b5b8UL, 0x3f72f746UL,
+    0x9102efa1UL, 0x3ea88f82UL, 0xdabc29cfUL, 0x3f678228UL, 0x9289afb8UL,
+    0x3e90f456UL, 0x741fb4edUL, 0x3f46f3a3UL, 0xa97f6663UL, 0x3e79b4bfUL,
+    0xca89ff3fUL, 0x3f36db70UL, 0xa8a2a000UL, 0x3fc0ee13UL, 0x3da24be1UL,
+    0x3d338b9fUL, 0x00000000UL, 0x00000000UL, 0x11cd6c69UL, 0x3fd601fdUL,
+    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0xb9ff07ceUL,
+    0x3f231c78UL, 0x00000000UL, 0x00000000UL, 0xa5517182UL, 0x3f0ff0e0UL,
+    0x00000000UL, 0x00000000UL, 0x790b4cbcUL, 0x3ef66191UL, 0x848a46c6UL,
+    0x3fa21ac0UL, 0xb16435faUL, 0x3ee1d3ecUL, 0x2a1aa832UL, 0x3f9c71eaUL,
+    0xfdd299efUL, 0x3ec9dd1aUL, 0x3f8dbaafUL, 0x3f793363UL, 0x309fc6eaUL,
+    0x3eb415d6UL, 0xbee60471UL, 0x3f6b83baUL, 0x94a0a697UL, 0x3e9dae11UL,
+    0x3e5c67b3UL, 0x3f4fd07bUL, 0x9a8f3e3eUL, 0x3e86bd75UL, 0xa4beb7a4UL,
+    0x3f3d1eb1UL, 0x29cfc000UL, 0x3fc549ceUL, 0xbf159358UL, 0x3d397b33UL,
+    0x00000000UL, 0x00000000UL, 0x871fee6cUL, 0x3fd666f0UL, 0x00000000UL,
+    0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x535ad890UL, 0x3f2b9320UL,
+    0x00000000UL, 0x00000000UL, 0x018fdf1fUL, 0x3f16d61dUL, 0x00000000UL,
+    0x00000000UL, 0x0359f1beUL, 0x3f0139e4UL, 0xa4317c6dUL, 0x3fa67e17UL,
+    0x82672d0fUL, 0x3eebb405UL, 0x2f1b621eUL, 0x3f9f455bUL, 0x51ccf238UL,
+    0x3ed55317UL, 0xf437b9acUL, 0x3f804beeUL, 0xc791a2b5UL, 0x3ec0e993UL,
+    0x919a1db2UL, 0x3f7080c2UL, 0x336a5b0eUL, 0x3eaa48a2UL, 0x0a268358UL,
+    0x3f55a443UL, 0xdfd978e4UL, 0x3e94b61fUL, 0xd7767a58UL, 0x3f431806UL,
+    0x2aea0000UL, 0x3fc9bbe8UL, 0x7723ea61UL, 0x3d3a2369UL, 0x00000000UL,
+    0x00000000UL, 0xdf7796ffUL, 0x3fd6e642UL, 0x00000000UL, 0x3ff00000UL,
+    0x00000000UL, 0xfffffff8UL, 0x4f48b8d3UL, 0x3f33eaf9UL, 0x00000000UL,
+    0x00000000UL, 0x0cf7586fUL, 0x3f20b8eaUL, 0x00000000UL, 0x00000000UL,
+    0xd0258911UL, 0x3f0abaf3UL, 0x23e49fe9UL, 0x3fab5a8cUL, 0x2d53222eUL,
+    0x3ef60d15UL, 0x21169451UL, 0x3fa172b2UL, 0xbb254dbcUL, 0x3ee1d3b5UL,
+    0xdbf93b8eUL, 0x3f84c7dbUL, 0x05b4630bUL, 0x3ecd3364UL, 0xee9aada7UL,
+    0x3f743924UL, 0x794a8297UL, 0x3eb7b7b9UL, 0xe015f797UL, 0x3f5d41f5UL,
+    0xe41a4a56UL, 0x3ea35dfbUL, 0xe4c2a251UL, 0x3f49a2abUL, 0x5af9e000UL,
+    0x3fce49ceUL, 0x8c743719UL, 0xbd1eb860UL, 0x00000000UL, 0x00000000UL,
+    0x1b4863cfUL, 0x3fd78294UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL,
+    0xfffffff8UL, 0x65965966UL, 0xc0219659UL, 0x00000000UL, 0x00000000UL,
+    0x882c10faUL, 0x402664f4UL, 0x00000000UL, 0x00000000UL, 0x83cd3723UL,
+    0xc02c8342UL, 0x00000000UL, 0xc0000000UL, 0x55e6c23dUL, 0x403226e3UL,
+    0x55555555UL, 0x40055555UL, 0x34451939UL, 0xc0371c96UL, 0xaaaaaaabUL,
+    0xc00aaaaaUL, 0x0e157de0UL, 0x403d6d3dUL, 0x11111111UL, 0x40111111UL,
+    0xa738201fUL, 0xc042bbceUL, 0x05b05b06UL, 0xc015b05bUL, 0x452b75e3UL,
+    0x4047da36UL, 0x1ba1ba1cUL, 0x401ba1baUL, 0x00000000UL, 0xbff00000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x40000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0xc7ab4d5aUL, 0xc0085e24UL, 0x00000000UL, 0x00000000UL, 0xe93ea75dUL,
+    0x400b963dUL, 0x00000000UL, 0x00000000UL, 0x94a7f25aUL, 0xc00f37e2UL,
+    0x4b6261cbUL, 0xbff5f984UL, 0x5a9dd812UL, 0x4011aab0UL, 0x74c30018UL,
+    0x3ffaf5a5UL, 0x7f2ce8e3UL, 0xc013fe8bUL, 0xfe8e54faUL, 0xbffd7334UL,
+    0x670d618dUL, 0x4016a10cUL, 0x4db97058UL, 0x4000e012UL, 0x24df44ddUL,
+    0xc0199c5fUL, 0x697d6eceUL, 0xc003006eUL, 0x83298b82UL, 0x401cfc4dUL,
+    0x19d490d6UL, 0x40058c19UL, 0x2ae42850UL, 0xbfea4300UL, 0x118e20e6UL,
+    0x3c7a6db8UL, 0x00000000UL, 0x40000000UL, 0xe33345b8UL, 0xbfd4e526UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x2b2c49d0UL,
+    0xbff2de9cUL, 0x00000000UL, 0x00000000UL, 0x2655bc98UL, 0x3ff33e58UL,
+    0x00000000UL, 0x00000000UL, 0xff691fa2UL, 0xbff3972eUL, 0xe93463bdUL,
+    0xbfeeed87UL, 0x070e10a0UL, 0x3ff3f5b2UL, 0xf4d790a4UL, 0x3ff20c10UL,
+    0xa04e8ea3UL, 0xbff4541aUL, 0x386accd3UL, 0xbff1369eUL, 0x222a66ddUL,
+    0x3ff4b521UL, 0x22a9777eUL, 0x3ff20817UL, 0x52a04a6eUL, 0xbff5178fUL,
+    0xddaa0031UL, 0xbff22137UL, 0x4447d47cUL, 0x3ff57c01UL, 0x1e9c7f1dUL,
+    0x3ff29311UL, 0x2ab7f990UL, 0xbfe561b8UL, 0x209c7df1UL, 0xbc87a8c5UL,
+    0x00000000UL, 0x3ff00000UL, 0x4170bcc6UL, 0x3fdc92d8UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0xcc03e501UL, 0xbfdff10fUL,
+    0x00000000UL, 0x00000000UL, 0x44a4e845UL, 0x3fddb63bUL, 0x00000000UL,
+    0x00000000UL, 0x3768ad9fUL, 0xbfdb72a4UL, 0x3dd01ccaUL, 0xbfe5fdb9UL,
+    0xa61d2811UL, 0x3fd972b2UL, 0x5645ad0bUL, 0x3fe977f9UL, 0xd013b3abUL,
+    0xbfd78ca3UL, 0xbf0bf914UL, 0xbfe4f192UL, 0x4d53e730UL, 0x3fd5d060UL,
+    0x3f8b9000UL, 0x3fe49933UL, 0xe2b82f08UL, 0xbfd4322aUL, 0x5936a835UL,
+    0xbfe27ae1UL, 0xb1c61c9bUL, 0x3fd2b3fbUL, 0xef478605UL, 0x3fe1659eUL,
+    0x190834ecUL, 0xbfe11ab7UL, 0xcdb625eaUL, 0x3c8e564bUL, 0x00000000UL,
+    0x3ff00000UL, 0xb07217e3UL, 0x3fd248f1UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x56f37042UL, 0xbfccfc56UL, 0x00000000UL,
+    0x00000000UL, 0xaa563951UL, 0x3fc90125UL, 0x00000000UL, 0x00000000UL,
+    0x3d0e7c5dUL, 0xbfc50533UL, 0x9bed9b2eUL, 0xbfdf0ed9UL, 0x5fe7c47cUL,
+    0x3fc1f250UL, 0x96c125e5UL, 0x3fe2edd9UL, 0x5a02bbd8UL, 0xbfbe5c71UL,
+    0x86362c20UL, 0xbfda08b7UL, 0x4b4435edUL, 0x3fb9d342UL, 0x4b494091UL,
+    0x3fd911bdUL, 0xb56658beUL, 0xbfb5e4c7UL, 0x93a2fd76UL, 0xbfd3c092UL,
+    0xda271794UL, 0x3fb29910UL, 0x3303df2bUL, 0x3fd189beUL, 0x99fcef32UL,
+    0xbfda8279UL, 0xb68c1467UL, 0xbc708b2fUL, 0x00000000UL, 0x3ff00000UL,
+    0x980c4337UL, 0x3fc5f619UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x9314533eUL, 0xbfbb8ec5UL, 0x00000000UL, 0x00000000UL,
+    0x09aa36d0UL, 0x3fb6d3f4UL, 0x00000000UL, 0x00000000UL, 0xdcb427fdUL,
+    0xbfb13950UL, 0xd87ab0bbUL, 0xbfd5335eUL, 0xce0ae8a5UL, 0x3fabb382UL,
+    0x79143126UL, 0x3fddba41UL, 0x5f2b28d4UL, 0xbfa552f1UL, 0x59f21a6dUL,
+    0xbfd015abUL, 0x22c27d95UL, 0x3fa0e984UL, 0xe19fc6aaUL, 0x3fd0576cUL,
+    0x8f2c2950UL, 0xbf9a4898UL, 0xc0b3f22cUL, 0xbfc59462UL, 0x1883a4b8UL,
+    0x3f94b61cUL, 0x3f838640UL, 0x3fc30eb8UL, 0x355c63dcUL, 0xbfd36a08UL,
+    0x1dce993dUL, 0x3c6d704dUL, 0x00000000UL, 0x3ff00000UL, 0x2b82ab63UL,
+    0x3fb78e92UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x5a279ea3UL, 0xbfaa3407UL, 0x00000000UL, 0x00000000UL, 0x432d65faUL,
+    0x3fa70153UL, 0x00000000UL, 0x00000000UL, 0x891a4602UL, 0xbf9d03efUL,
+    0xd62ca5f8UL, 0xbfca77d9UL, 0xb35f4628UL, 0x3f97a265UL, 0x433258faUL,
+    0x3fd8cf51UL, 0xb58fd909UL, 0xbf8f88e3UL, 0x01771ceaUL, 0xbfc2b154UL,
+    0xf3562f8eUL, 0x3f888f57UL, 0xc028a723UL, 0x3fc7370fUL, 0x20b7f9f0UL,
+    0xbf80f44cUL, 0x214368e9UL, 0xbfb6dfaaUL, 0x28891863UL, 0x3f79b4b6UL,
+    0x172dbbf0UL, 0x3fb6cb8eUL, 0xe0553158UL, 0xbfc975f5UL, 0x593fe814UL,
+    0xbc2ef5d3UL, 0x00000000UL, 0x3ff00000UL, 0x03dec550UL, 0x3fa44203UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x4e435f9bUL,
+    0xbf953f83UL, 0x00000000UL, 0x00000000UL, 0x3c6e8e46UL, 0x3f9b74eaUL,
+    0x00000000UL, 0x00000000UL, 0xda5b7511UL, 0xbf85ad63UL, 0xdc230b9bUL,
+    0xbfb97558UL, 0x26cb3788UL, 0x3f881308UL, 0x76fc4985UL, 0x3fd62ac9UL,
+    0x77bb08baUL, 0xbf757c85UL, 0xb6247521UL, 0xbfb1381eUL, 0x5922170cUL,
+    0x3f754e95UL, 0x8746482dUL, 0x3fc27f83UL, 0x11055b30UL, 0xbf64e391UL,
+    0x3e666320UL, 0xbfa3e609UL, 0x0de9dae3UL, 0x3f6301dfUL, 0x1f1dca06UL,
+    0x3fafa8aeUL, 0x8c5b2da2UL, 0xbfb936bbUL, 0x4e88f7a5UL, 0xbc587d05UL,
+    0x00000000UL, 0x3ff00000UL, 0xa8935dd9UL, 0x3f83dde2UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL
+};
+
+ALIGNED_(16) juint _MASK_35_tan[] =
+{
+    0xfffc0000UL, 0xffffffffUL, 0x00000000UL, 0x00000000UL
+};
+
+ALIGNED_(16) juint _Q_11_tan[] =
+{
+    0xb8fe4d77UL, 0x3f82609aUL
+};
+
+ALIGNED_(16) juint _Q_9_tan[] =
+{
+    0xbf847a43UL, 0x3f9664a0UL
+};
+
+ALIGNED_(16) juint _Q_7_tan[] =
+{
+    0x52c4c8abUL, 0x3faba1baUL
+};
+
+ALIGNED_(16) juint _Q_5_tan[] =
+{
+    0x11092746UL, 0x3fc11111UL
+};
+
+ALIGNED_(16) juint _Q_3_tan[] =
+{
+    0x55555612UL, 0x3fd55555UL
+};
+
+ALIGNED_(16) juint _PI_INV_TABLE_tan[] =
+{
+    0x00000000UL, 0x00000000UL, 0xa2f9836eUL, 0x4e441529UL, 0xfc2757d1UL,
+    0xf534ddc0UL, 0xdb629599UL, 0x3c439041UL, 0xfe5163abUL, 0xdebbc561UL,
+    0xb7246e3aUL, 0x424dd2e0UL, 0x06492eeaUL, 0x09d1921cUL, 0xfe1deb1cUL,
+    0xb129a73eUL, 0xe88235f5UL, 0x2ebb4484UL, 0xe99c7026UL, 0xb45f7e41UL,
+    0x3991d639UL, 0x835339f4UL, 0x9c845f8bUL, 0xbdf9283bUL, 0x1ff897ffUL,
+    0xde05980fUL, 0xef2f118bUL, 0x5a0a6d1fUL, 0x6d367ecfUL, 0x27cb09b7UL,
+    0x4f463f66UL, 0x9e5fea2dUL, 0x7527bac7UL, 0xebe5f17bUL, 0x3d0739f7UL,
+    0x8a5292eaUL, 0x6bfb5fb1UL, 0x1f8d5d08UL, 0x56033046UL, 0xfc7b6babUL,
+    0xf0cfbc21UL
+};
+
+ALIGNED_(8) juint _PI_4_tan[] =
+{
+    0x00000000UL, 0x3fe921fbUL, 0x4611a626UL, 0x3e85110bUL
+};
+
+ALIGNED_(8) juint _QQ_2_tan[] =
+{
+    0x676733afUL, 0x3d32e7b9UL
+};
+
+ALIGNED_(8) juint _ONE_tan[] =
+{
+    0x00000000UL, 0x3ff00000UL
+};
+
+ALIGNED_(8) juint _TWO_POW_55_tan[] =
+{
+    0x00000000UL, 0x43600000UL
+};
+
+ALIGNED_(4) juint _TWO_POW_M55_tan[] =
+{
+    0x00000000UL, 0x3c800000UL
+};
+
+ALIGNED_(4) juint _NEG_ZERO_tan[] =
+{
+    0x00000000UL, 0x80000000UL
+};
+
+void MacroAssembler::fast_tan(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register r8, Register r9, Register r10, Register r11) {
+
+  Label L_2TAG_PACKET_0_0_1, L_2TAG_PACKET_1_0_1, L_2TAG_PACKET_2_0_1, L_2TAG_PACKET_3_0_1;
+  Label L_2TAG_PACKET_4_0_1, L_2TAG_PACKET_5_0_1, L_2TAG_PACKET_6_0_1, L_2TAG_PACKET_7_0_1;
+  Label L_2TAG_PACKET_8_0_1, L_2TAG_PACKET_9_0_1, L_2TAG_PACKET_10_0_1, L_2TAG_PACKET_11_0_1;
+  Label L_2TAG_PACKET_12_0_1, L_2TAG_PACKET_13_0_1, L_2TAG_PACKET_14_0_1, B1_2, B1_3, B1_4, B1_5, start;
+
+  address ONEHALF = (address)_ONEHALF_tan;
+  address MUL16 = (address)_MUL16;
+  address sign_mask = (address)_sign_mask_tan;
+  address PI32INV = (address)_PI32INV_tan;
+  address P_1 = (address)_P_1_tan;
+  address P_2 = (address)_P_2_tan;
+  address P_3 = (address)_P_3_tan;
+  address Ctable = (address)_Ctable_tan;
+  address MASK_35 = (address)_MASK_35_tan;
+  address Q_11 = (address)_Q_11_tan;
+  address Q_9 = (address)_Q_9_tan;
+  address Q_7 = (address)_Q_7_tan;
+  address Q_5 = (address)_Q_5_tan;
+  address Q_3 = (address)_Q_3_tan;
+  address PI_INV_TABLE = (address)_PI_INV_TABLE_tan;
+  address PI_4 = (address)_PI_4_tan;
+  address QQ_2 = (address)_QQ_2_tan;
+  address ONE = (address)_ONE_tan;
+  address TWO_POW_55 = (address)_TWO_POW_55_tan;
+  address TWO_POW_M55 = (address)_TWO_POW_M55_tan;
+  address NEG_ZERO = (address)_NEG_ZERO_tan;
+
+  bind(start);
+  push(rbx);
+  subq(rsp, 16);
+  movsd(Address(rsp, 8), xmm0);
+
+  bind(B1_2);
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32767);
+  subl(eax, 16314);
+  cmpl(eax, 270);
+  jcc(Assembler::above, L_2TAG_PACKET_0_0_1);
+  movdqu(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
+  movdqu(xmm6, ExternalAddress(MUL16));    //0x00000000UL, 0x40300000UL, 0x00000000UL, 0x3ff00000UL
+  unpcklpd(xmm0, xmm0);
+  movdqu(xmm4, ExternalAddress(sign_mask));    //0x00000000UL, 0x80000000UL, 0x00000000UL, 0x80000000UL
+  andpd(xmm4, xmm0);
+  movdqu(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x3fe45f30UL, 0x6dc9c883UL, 0x40245f30UL
+  mulpd(xmm1, xmm0);
+  por(xmm5, xmm4);
+  addpd(xmm1, xmm5);
+  movdqu(xmm7, xmm1);
+  unpckhpd(xmm7, xmm7);
+  cvttsd2sil(edx, xmm7);
+  cvttpd2dq(xmm1, xmm1);
+  cvtdq2pd(xmm1, xmm1);
+  mulpd(xmm1, xmm6);
+  movdqu(xmm3, ExternalAddress(P_1));    //0x54444000UL, 0x3fb921fbUL, 0x54440000UL, 0x3fb921fbUL
+  movq(xmm5, ExternalAddress(QQ_2));    //0x676733afUL, 0x3d32e7b9UL
+  addq(rdx, 469248);
+  movdqu(xmm4, ExternalAddress(P_2));    //0x67674000UL, 0xbd32e7b9UL, 0x4c4c0000UL, 0x3d468c23UL
+  mulpd(xmm3, xmm1);
+  andq(rdx, 31);
+  mulsd(xmm5, xmm1);
+  movq(rcx, rdx);
+  mulpd(xmm4, xmm1);
+  shlq(rcx, 1);
+  subpd(xmm0, xmm3);
+  mulpd(xmm1, ExternalAddress(P_3));    //0x3707344aUL, 0x3aa8a2e0UL, 0x03707345UL, 0x3ae98a2eUL
+  addq(rdx, rcx);
+  shlq(rcx, 2);
+  addq(rdx, rcx);
+  addsd(xmm5, xmm0);
+  movdqu(xmm2, xmm0);
+  subpd(xmm0, xmm4);
+  movq(xmm6, ExternalAddress(ONE));    //0x00000000UL, 0x3ff00000UL
+  shlq(rdx, 4);
+  lea(rax, ExternalAddress(Ctable));
+  andpd(xmm5, ExternalAddress(MASK_35));    //0xfffc0000UL, 0xffffffffUL, 0x00000000UL, 0x00000000UL
+  movdqu(xmm3, xmm0);
+  addq(rax, rdx);
+  subpd(xmm2, xmm0);
+  unpckhpd(xmm0, xmm0);
+  divsd(xmm6, xmm5);
+  subpd(xmm2, xmm4);
+  movdqu(xmm7, Address(rax, 16));
+  subsd(xmm3, xmm5);
+  mulpd(xmm7, xmm0);
+  subpd(xmm2, xmm1);
+  movdqu(xmm1, Address(rax, 48));
+  mulpd(xmm1, xmm0);
+  movdqu(xmm4, Address(rax, 96));
+  mulpd(xmm4, xmm0);
+  addsd(xmm2, xmm3);
+  movdqu(xmm3, xmm0);
+  mulpd(xmm0, xmm0);
+  addpd(xmm7, Address(rax, 0));
+  addpd(xmm1, Address(rax, 32));
+  mulpd(xmm1, xmm0);
+  addpd(xmm4, Address(rax, 80));
+  addpd(xmm7, xmm1);
+  movdqu(xmm1, Address(rax, 112));
+  mulpd(xmm1, xmm0);
+  mulpd(xmm0, xmm0);
+  addpd(xmm4, xmm1);
+  movdqu(xmm1, Address(rax, 64));
+  mulpd(xmm1, xmm0);
+  addpd(xmm7, xmm1);
+  movdqu(xmm1, xmm3);
+  mulpd(xmm3, xmm0);
+  mulsd(xmm0, xmm0);
+  mulpd(xmm1, Address(rax, 144));
+  mulpd(xmm4, xmm3);
+  movdqu(xmm3, xmm1);
+  addpd(xmm7, xmm4);
+  movdqu(xmm4, xmm1);
+  mulsd(xmm0, xmm7);
+  unpckhpd(xmm7, xmm7);
+  addsd(xmm0, xmm7);
+  unpckhpd(xmm1, xmm1);
+  addsd(xmm3, xmm1);
+  subsd(xmm4, xmm3);
+  addsd(xmm1, xmm4);
+  movdqu(xmm4, xmm2);
+  movq(xmm7, Address(rax, 144));
+  unpckhpd(xmm2, xmm2);
+  addsd(xmm7, Address(rax, 152));
+  mulsd(xmm7, xmm2);
+  addsd(xmm7, Address(rax, 136));
+  addsd(xmm7, xmm1);
+  addsd(xmm0, xmm7);
+  movq(xmm7, ExternalAddress(ONE));    //0x00000000UL, 0x3ff00000UL
+  mulsd(xmm4, xmm6);
+  movq(xmm2, Address(rax, 168));
+  andpd(xmm2, xmm6);
+  mulsd(xmm5, xmm2);
+  mulsd(xmm6, Address(rax, 160));
+  subsd(xmm7, xmm5);
+  subsd(xmm2, Address(rax, 128));
+  subsd(xmm7, xmm4);
+  mulsd(xmm7, xmm6);
+  movdqu(xmm4, xmm3);
+  subsd(xmm3, xmm2);
+  addsd(xmm2, xmm3);
+  subsd(xmm4, xmm2);
+  addsd(xmm0, xmm4);
+  subsd(xmm0, xmm7);
+  addsd(xmm0, xmm3);
+  jmp(B1_4);
+
+  bind(L_2TAG_PACKET_0_0_1);
+  jcc(Assembler::greater, L_2TAG_PACKET_1_0_1);
+  pextrw(eax, xmm0, 3);
+  movl(edx, eax);
+  andl(eax, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_2_0_1);
+  andl(edx, 32767);
+  cmpl(edx, 15904);
+  jcc(Assembler::below, L_2TAG_PACKET_3_0_1);
+  movdqu(xmm2, xmm0);
+  movdqu(xmm3, xmm0);
+  movq(xmm1, ExternalAddress(Q_11));    //0xb8fe4d77UL, 0x3f82609aUL
+  mulsd(xmm2, xmm0);
+  mulsd(xmm3, xmm2);
+  mulsd(xmm1, xmm2);
+  addsd(xmm1, ExternalAddress(Q_9));    //0xbf847a43UL, 0x3f9664a0UL
+  mulsd(xmm1, xmm2);
+  addsd(xmm1, ExternalAddress(Q_7));    //0x52c4c8abUL, 0x3faba1baUL
+  mulsd(xmm1, xmm2);
+  addsd(xmm1, ExternalAddress(Q_5));    //0x11092746UL, 0x3fc11111UL
+  mulsd(xmm1, xmm2);
+  addsd(xmm1, ExternalAddress(Q_3));    //0x55555612UL, 0x3fd55555UL
+  mulsd(xmm1, xmm3);
+  addsd(xmm0, xmm1);
+  jmp(B1_4);
+
+  bind(L_2TAG_PACKET_3_0_1);
+  movq(xmm3, ExternalAddress(TWO_POW_55));    //0x00000000UL, 0x43600000UL
+  mulsd(xmm3, xmm0);
+  addsd(xmm0, xmm3);
+  mulsd(xmm0, ExternalAddress(TWO_POW_M55));    //0x00000000UL, 0x3c800000UL
+  jmp(B1_4);
+
+  bind(L_2TAG_PACKET_2_0_1);
+  movdqu(xmm1, xmm0);
+  mulsd(xmm1, xmm1);
+  jmp(B1_4);
+
+  bind(L_2TAG_PACKET_1_0_1);
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32752);
+  cmpl(eax, 32752);
+  jcc(Assembler::equal, L_2TAG_PACKET_4_0_1);
+  pextrw(ecx, xmm0, 3);
+  andl(ecx, 32752);
+  subl(ecx, 16224);
+  shrl(ecx, 7);
+  andl(ecx, 65532);
+  lea(r11, ExternalAddress(PI_INV_TABLE));
+  addq(rcx, r11);
+  movdq(rax, xmm0);
+  movl(r10, Address(rcx, 20));
+  movl(r8, Address(rcx, 24));
+  movl(edx, eax);
+  shrq(rax, 21);
+  orl(eax, INT_MIN);
+  shrl(eax, 11);
+  movl(r9, r10);
+  imulq(r10, rdx);
+  imulq(r9, rax);
+  imulq(r8, rax);
+  movl(rsi, Address(rcx, 16));
+  movl(rdi, Address(rcx, 12));
+  movl(r11, r10);
+  shrq(r10, 32);
+  addq(r9, r10);
+  addq(r11, r8);
+  movl(r8, r11);
+  shrq(r11, 32);
+  addq(r9, r11);
+  movl(r10, rsi);
+  imulq(rsi, rdx);
+  imulq(r10, rax);
+  movl(r11, rdi);
+  imulq(rdi, rdx);
+  movl(rbx, rsi);
+  shrq(rsi, 32);
+  addq(r9, rbx);
+  movl(rbx, r9);
+  shrq(r9, 32);
+  addq(r10, rsi);
+  addq(r10, r9);
+  shlq(rbx, 32);
+  orq(r8, rbx);
+  imulq(r11, rax);
+  movl(r9, Address(rcx, 8));
+  movl(rsi, Address(rcx, 4));
+  movl(rbx, rdi);
+  shrq(rdi, 32);
+  addq(r10, rbx);
+  movl(rbx, r10);
+  shrq(r10, 32);
+  addq(r11, rdi);
+  addq(r11, r10);
+  movq(rdi, r9);
+  imulq(r9, rdx);
+  imulq(rdi, rax);
+  movl(r10, r9);
+  shrq(r9, 32);
+  addq(r11, r10);
+  movl(r10, r11);
+  shrq(r11, 32);
+  addq(rdi, r9);
+  addq(rdi, r11);
+  movq(r9, rsi);
+  imulq(rsi, rdx);
+  imulq(r9, rax);
+  shlq(r10, 32);
+  orq(r10, rbx);
+  movl(eax, Address(rcx, 0));
+  movl(r11, rsi);
+  shrq(rsi, 32);
+  addq(rdi, r11);
+  movl(r11, rdi);
+  shrq(rdi, 32);
+  addq(r9, rsi);
+  addq(r9, rdi);
+  imulq(rdx, rax);
+  pextrw(rbx, xmm0, 3);
+  lea(rdi, ExternalAddress(PI_INV_TABLE));
+  subq(rcx, rdi);
+  addl(ecx, ecx);
+  addl(ecx, ecx);
+  addl(ecx, ecx);
+  addl(ecx, 19);
+  movl(rsi, 32768);
+  andl(rsi, rbx);
+  shrl(rbx, 4);
+  andl(rbx, 2047);
+  subl(rbx, 1023);
+  subl(ecx, rbx);
+  addq(r9, rdx);
+  movl(edx, ecx);
+  addl(edx, 32);
+  cmpl(ecx, 0);
+  jcc(Assembler::less, L_2TAG_PACKET_5_0_1);
+  negl(ecx);
+  addl(ecx, 29);
+  shll(r9);
+  movl(rdi, r9);
+  andl(r9, 1073741823);
+  testl(r9, 536870912);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_6_0_1);
+  shrl(r9);
+  movl(rbx, 0);
+  shlq(r9, 32);
+  orq(r9, r11);
+
+  bind(L_2TAG_PACKET_7_0_1);
+
+  bind(L_2TAG_PACKET_8_0_1);
+  cmpq(r9, 0);
+  jcc(Assembler::equal, L_2TAG_PACKET_9_0_1);
+
+  bind(L_2TAG_PACKET_10_0_1);
+  bsrq(r11, r9);
+  movl(ecx, 29);
+  subl(ecx, r11);
+  jcc(Assembler::lessEqual, L_2TAG_PACKET_11_0_1);
+  shlq(r9);
+  movq(rax, r10);
+  shlq(r10);
+  addl(edx, ecx);
+  negl(ecx);
+  addl(ecx, 64);
+  shrq(rax);
+  shrq(r8);
+  orq(r9, rax);
+  orq(r10, r8);
+
+  bind(L_2TAG_PACKET_12_0_1);
+  cvtsi2sdq(xmm0, r9);
+  shrq(r10, 1);
+  cvtsi2sdq(xmm3, r10);
+  xorpd(xmm4, xmm4);
+  shll(edx, 4);
+  negl(edx);
+  addl(edx, 16368);
+  orl(edx, rsi);
+  xorl(edx, rbx);
+  pinsrw(xmm4, edx, 3);
+  movq(xmm2, ExternalAddress(PI_4));    //0x00000000UL, 0x3fe921fbUL, 0x4611a626UL, 0x3e85110bUL
+  movq(xmm7, ExternalAddress(8 + PI_4));    //0x3fe921fbUL, 0x4611a626UL, 0x3e85110bUL
+  xorpd(xmm5, xmm5);
+  subl(edx, 1008);
+  pinsrw(xmm5, edx, 3);
+  mulsd(xmm0, xmm4);
+  shll(rsi, 16);
+  sarl(rsi, 31);
+  mulsd(xmm3, xmm5);
+  movdqu(xmm1, xmm0);
+  mulsd(xmm0, xmm2);
+  shrl(rdi, 30);
+  addsd(xmm1, xmm3);
+  mulsd(xmm3, xmm2);
+  addl(rdi, rsi);
+  xorl(rdi, rsi);
+  mulsd(xmm7, xmm1);
+  movl(eax, rdi);
+  addsd(xmm7, xmm3);
+  movdqu(xmm2, xmm0);
+  addsd(xmm0, xmm7);
+  subsd(xmm2, xmm0);
+  addsd(xmm7, xmm2);
+  movdqu(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x3fe45f30UL, 0x6dc9c883UL, 0x40245f30UL
+  if (VM_Version::supports_sse3()) {
+    movddup(xmm0, xmm0);
+  }
+  else {
+    movlhps(xmm0, xmm0);
+  }
+  movdqu(xmm4, ExternalAddress(sign_mask));    //0x00000000UL, 0x80000000UL, 0x00000000UL, 0x80000000UL
+  andpd(xmm4, xmm0);
+  mulpd(xmm1, xmm0);
+  if (VM_Version::supports_sse3()) {
+    movddup(xmm7, xmm7);
+  }
+  else {
+    movlhps(xmm7, xmm7);
+  }
+  movdqu(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
+  movdqu(xmm6, ExternalAddress(MUL16));    //0x00000000UL, 0x40300000UL, 0x00000000UL, 0x3ff00000UL
+  por(xmm5, xmm4);
+  addpd(xmm1, xmm5);
+  movdqu(xmm5, xmm1);
+  unpckhpd(xmm5, xmm5);
+  cvttsd2sil(edx, xmm5);
+  cvttpd2dq(xmm1, xmm1);
+  cvtdq2pd(xmm1, xmm1);
+  mulpd(xmm1, xmm6);
+  movdqu(xmm3, ExternalAddress(P_1));    //0x54444000UL, 0x3fb921fbUL, 0x54440000UL, 0x3fb921fbUL
+  movq(xmm5, ExternalAddress(QQ_2));    //0x676733afUL, 0x3d32e7b9UL
+  shll(eax, 4);
+  addl(edx, 469248);
+  movdqu(xmm4, ExternalAddress(P_2));    //0x67674000UL, 0xbd32e7b9UL, 0x4c4c0000UL, 0x3d468c23UL
+  mulpd(xmm3, xmm1);
+  addl(edx, eax);
+  andl(edx, 31);
+  mulsd(xmm5, xmm1);
+  movl(ecx, edx);
+  mulpd(xmm4, xmm1);
+  shll(ecx, 1);
+  subpd(xmm0, xmm3);
+  mulpd(xmm1, ExternalAddress(P_3));    //0x3707344aUL, 0x3aa8a2e0UL, 0x03707345UL, 0x3ae98a2eUL
+  addl(edx, ecx);
+  shll(ecx, 2);
+  addl(edx, ecx);
+  addsd(xmm5, xmm0);
+  movdqu(xmm2, xmm0);
+  subpd(xmm0, xmm4);
+  movq(xmm6, ExternalAddress(ONE));    //0x00000000UL, 0x3ff00000UL
+  shll(edx, 4);
+  lea(rax, ExternalAddress(Ctable));
+  andpd(xmm5, ExternalAddress(MASK_35));    //0xfffc0000UL, 0xffffffffUL, 0x00000000UL, 0x00000000UL
+  movdqu(xmm3, xmm0);
+  addq(rax, rdx);
+  subpd(xmm2, xmm0);
+  unpckhpd(xmm0, xmm0);
+  divsd(xmm6, xmm5);
+  subpd(xmm2, xmm4);
+  subsd(xmm3, xmm5);
+  subpd(xmm2, xmm1);
+  movdqu(xmm1, Address(rax, 48));
+  addpd(xmm2, xmm7);
+  movdqu(xmm7, Address(rax, 16));
+  mulpd(xmm7, xmm0);
+  movdqu(xmm4, Address(rax, 96));
+  mulpd(xmm1, xmm0);
+  mulpd(xmm4, xmm0);
+  addsd(xmm2, xmm3);
+  movdqu(xmm3, xmm0);
+  mulpd(xmm0, xmm0);
+  addpd(xmm7, Address(rax, 0));
+  addpd(xmm1, Address(rax, 32));
+  mulpd(xmm1, xmm0);
+  addpd(xmm4, Address(rax, 80));
+  addpd(xmm7, xmm1);
+  movdqu(xmm1, Address(rax, 112));
+  mulpd(xmm1, xmm0);
+  mulpd(xmm0, xmm0);
+  addpd(xmm4, xmm1);
+  movdqu(xmm1, Address(rax, 64));
+  mulpd(xmm1, xmm0);
+  addpd(xmm7, xmm1);
+  movdqu(xmm1, xmm3);
+  mulpd(xmm3, xmm0);
+  mulsd(xmm0, xmm0);
+  mulpd(xmm1, Address(rax, 144));
+  mulpd(xmm4, xmm3);
+  movdqu(xmm3, xmm1);
+  addpd(xmm7, xmm4);
+  movdqu(xmm4, xmm1);
+  mulsd(xmm0, xmm7);
+  unpckhpd(xmm7, xmm7);
+  addsd(xmm0, xmm7);
+  unpckhpd(xmm1, xmm1);
+  addsd(xmm3, xmm1);
+  subsd(xmm4, xmm3);
+  addsd(xmm1, xmm4);
+  movdqu(xmm4, xmm2);
+  movq(xmm7, Address(rax, 144));
+  unpckhpd(xmm2, xmm2);
+  addsd(xmm7, Address(rax, 152));
+  mulsd(xmm7, xmm2);
+  addsd(xmm7, Address(rax, 136));
+  addsd(xmm7, xmm1);
+  addsd(xmm0, xmm7);
+  movq(xmm7, ExternalAddress(ONE));    //0x00000000UL, 0x3ff00000UL
+  mulsd(xmm4, xmm6);
+  movq(xmm2, Address(rax, 168));
+  andpd(xmm2, xmm6);
+  mulsd(xmm5, xmm2);
+  mulsd(xmm6, Address(rax, 160));
+  subsd(xmm7, xmm5);
+  subsd(xmm2, Address(rax, 128));
+  subsd(xmm7, xmm4);
+  mulsd(xmm7, xmm6);
+  movdqu(xmm4, xmm3);
+  subsd(xmm3, xmm2);
+  addsd(xmm2, xmm3);
+  subsd(xmm4, xmm2);
+  addsd(xmm0, xmm4);
+  subsd(xmm0, xmm7);
+  addsd(xmm0, xmm3);
+  jmp(B1_4);
+
+  bind(L_2TAG_PACKET_9_0_1);
+  addl(edx, 64);
+  movq(r9, r10);
+  movq(r10, r8);
+  movl(r8, 0);
+  cmpq(r9, 0);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_10_0_1);
+  addl(edx, 64);
+  movq(r9, r10);
+  movq(r10, r8);
+  cmpq(r9, 0);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_10_0_1);
+  jmp(L_2TAG_PACKET_12_0_1);
+
+  bind(L_2TAG_PACKET_11_0_1);
+  jcc(Assembler::equal, L_2TAG_PACKET_12_0_1);
+  negl(ecx);
+  shrq(r10);
+  movq(rax, r9);
+  shrq(r9);
+  subl(edx, ecx);
+  negl(ecx);
+  addl(ecx, 64);
+  shlq(rax);
+  orq(r10, rax);
+  jmp(L_2TAG_PACKET_12_0_1);
+
+  bind(L_2TAG_PACKET_5_0_1);
+  notl(ecx);
+  shlq(r9, 32);
+  orq(r9, r11);
+  shlq(r9);
+  movq(rdi, r9);
+  testl(r9, INT_MIN);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_13_0_1);
+  shrl(r9);
+  movl(rbx, 0);
+  shrq(rdi, 2);
+  jmp(L_2TAG_PACKET_8_0_1);
+
+  bind(L_2TAG_PACKET_6_0_1);
+  shrl(r9);
+  movl(rbx, 1073741824);
+  shrl(rbx);
+  shlq(r9, 32);
+  orq(r9, r11);
+  shlq(rbx, 32);
+  addl(rdi, 1073741824);
+  movl(rcx, 0);
+  movl(r11, 0);
+  subq(rcx, r8);
+  sbbq(r11, r10);
+  sbbq(rbx, r9);
+  movq(r8, rcx);
+  movq(r10, r11);
+  movq(r9, rbx);
+  movl(rbx, 32768);
+  jmp(L_2TAG_PACKET_7_0_1);
+
+  bind(L_2TAG_PACKET_13_0_1);
+  shrl(r9);
+  mov64(rbx, 0x100000000);
+  shrq(rbx);
+  movl(rcx, 0);
+  movl(r11, 0);
+  subq(rcx, r8);
+  sbbq(r11, r10);
+  sbbq(rbx, r9);
+  movq(r8, rcx);
+  movq(r10, r11);
+  movq(r9, rbx);
+  movl(rbx, 32768);
+  shrq(rdi, 2);
+  addl(rdi, 1073741824);
+  jmp(L_2TAG_PACKET_8_0_1);
+
+  bind(L_2TAG_PACKET_4_0_1);
+  movq(xmm0, Address(rsp, 8));
+  mulsd(xmm0, ExternalAddress(NEG_ZERO));    //0x00000000UL, 0x80000000UL
+  movq(Address(rsp, 0), xmm0);
+
+  bind(L_2TAG_PACKET_14_0_1);
+
+  bind(B1_4);
+  addq(rsp, 16);
+
+}
+#else
+// The 32 bit code is at most SSE2 compliant
+ALIGNED_(16) jushort _TP[] =
+{
+    0x4cd6, 0xaf6c, 0xc710, 0xc662, 0xbffd, 0x0000, 0x4b06, 0xb0ac, 0xd3b2, 0xcc2c,
+    0x3ff9, 0x0000, 0x00e3, 0xc850, 0xaa28, 0x9533, 0xbff3, 0x0000, 0x2ff0, 0x466d,
+    0x1a3b, 0xb266, 0x3fe5, 0x0000
+};
+
+ALIGNED_(16) jushort _TQ[] =
+{
+    0x399c, 0x8391, 0x154c, 0x94ca, 0xbfff, 0x0000, 0xb6a3, 0xc36a, 0x44e2, 0x8a2c,
+    0x3ffe, 0x0000, 0xb70f, 0xd068, 0xa6ce, 0xe9dd, 0xbff9, 0x0000, 0x820f, 0x51ce,
+    0x7d76, 0x9bff, 0x3ff3, 0x0000
+};
+
+ALIGNED_(16) jushort _GP[] =
+{
+    0xaaab, 0xaaaa, 0xaaaa, 0xaaaa, 0xbffd, 0x0000, 0xb62f, 0x0b60, 0x60b6, 0xb60b,
+    0xbff9, 0x0000, 0xdfa7, 0x08aa, 0x55e0, 0x8ab3, 0xbff6, 0x0000, 0x85a0, 0xa819,
+    0xbc99, 0xddeb, 0xbff2, 0x0000, 0x7065, 0x6a37, 0x795f, 0xb354, 0xbfef, 0x0000,
+    0xa8f9, 0x83f1, 0x2ec8, 0x9140, 0xbfec, 0x0000, 0xf3ca, 0x8c96, 0x8e0b, 0xeb6d,
+    0xbfe8, 0x0000, 0x355b, 0xd910, 0x67c9, 0xbed3, 0xbfe5, 0x0000, 0x286b, 0xb49e,
+    0xb854, 0x9a98, 0xbfe2, 0x0000, 0x0871, 0x1a2f, 0x6477, 0xfcc4, 0xbfde, 0x0000,
+    0xa559, 0x1da9, 0xaed2, 0xba76, 0xbfdb, 0x0000, 0x00a3, 0x7fea, 0x9bc3, 0xf205,
+    0xbfd8, 0x0000
+};
+
+void MacroAssembler::libm_tancot_huge(XMMRegister xmm0, XMMRegister xmm1, Register eax, Register ecx, Register edx, Register ebx, Register esi, Register edi, Register ebp, Register esp) {
+  Label B1_1, B1_2, B1_3, B1_4, B1_5, B1_6, B1_7, B1_8, B1_9, B1_10, B1_11, B1_12;
+  Label B1_13, B1_14, B1_15, B1_16, B1_17, B1_18, B1_19, B1_20, B1_21, B1_22, B1_23;
+  Label B1_24, B1_25, B1_26, B1_27, B1_28, B1_29, B1_30, B1_31, B1_32, B1_33, B1_34;
+  Label B1_35, B1_36, B1_37, B1_38, B1_39, B1_40, B1_41, B1_42, B1_43, B1_44, B1_45, B1_46;
+
+  assert_different_registers(ebx, eax, ecx, edx, esi, edi, ebp, esp);
+
+  address L_2il0floatpacket_0 = StubRoutines::x86::_L_2il0floatpacket_0_addr();
+  address Pi4Inv = StubRoutines::x86::_Pi4Inv_addr();
+  address Pi4x3 = StubRoutines::x86::_Pi4x3_addr();
+  address Pi4x4 = StubRoutines::x86::_Pi4x4_addr();
+  address ones = StubRoutines::x86::_ones_addr();
+  address TP = (address)_TP;
+  address TQ = (address)_TQ;
+  address GP = (address)_GP;
+
+  bind(B1_1);
+  push(ebp);
+  movl(ebp, esp);
+  andl(esp, -64);
+  push(esi);
+  push(edi);
+  push(ebx);
+  subl(esp, 52);
+  movl(eax, Address(ebp, 16));
+  movl(ebx, Address(ebp, 20));
+  movl(Address(esp, 40), eax);
+
+  bind(B1_2);
+  fnstcw(Address(esp, 38));
+
+  bind(B1_3);
+  movl(edx, Address(ebp, 12));
+  movl(eax, edx);
+  andl(eax, 2147483647);
+  shrl(edx, 31);
+  movl(Address(esp, 44), edx);
+  cmpl(eax, 1104150528);
+  jcc(Assembler::aboveEqual, B1_11);
+
+  bind(B1_4);
+  movsd(xmm1, Address(ebp, 8));
+  movzwl(ecx, Address(esp, 38));
+  movl(edx, ecx);
+  andl(edx, 768);
+  andps(xmm1, ExternalAddress(L_2il0floatpacket_0));    //0xffffffffUL, 0x7fffffffUL, 0x00000000UL, 0x00000000UL
+  cmpl(edx, 768);
+  movsd(xmm0, ExternalAddress(Pi4Inv));    ////0x6dc9c883UL, 0x3ff45f30UL
+  mulsd(xmm0, xmm1);
+  movsd(Address(ebp, 8), xmm1);
+  movsd(Address(esp, 0), xmm0);
+  jcc(Assembler::equal, B1_39);
+
+  bind(B1_5);
+  orl(ecx, -64768);
+  movw(Address(esp, 36), ecx);
+
+  bind(B1_6);
+  fldcw(Address(esp, 36));
+
+  bind(B1_7);
+  movsd(xmm1, Address(ebp, 8));
+  movl(edi, 1);
+
+  bind(B1_8);
+  movl(Address(esp, 12), esi);
+  movl(esi, Address(esp, 4));
+  movl(edx, esi);
+  movl(Address(esp, 24), edi);
+  movl(edi, esi);
+  shrl(edi, 20);
+  andl(edx, 1048575);
+  movl(ecx, edi);
+  orl(edx, 1048576);
+  negl(ecx);
+  addl(edi, 13);
+  movl(Address(esp, 8), ebx);
+  addl(ecx, 19);
+  movl(ebx, edx);
+  movl(Address(esp, 28), ecx);
+  shrl(ebx);
+  movl(ecx, edi);
+  shll(edx);
+  movl(ecx, Address(esp, 28));
+  movl(edi, Address(esp, 0));
+  shrl(edi);
+  orl(edx, edi);
+  cmpl(esi, 1094713344);
+  movsd(Address(esp, 16), xmm1);
+  fld_d(Address(esp, 16));
+  cmov32(Assembler::below, edx, ebx);
+  movl(edi, Address(esp, 24));
+  movl(esi, Address(esp, 12));
+  lea(ebx, Address(edx, 1));
+  andl(ebx, -2);
+  movl(Address(esp, 16), ebx);
+  cmpl(eax, 1094713344);
+  fild_s(Address(esp, 16));
+  movl(ebx, Address(esp, 8));
+  jcc(Assembler::aboveEqual, B1_10);
+
+  bind(B1_9);
+  fld_d(ExternalAddress(Pi4x3));    //0x54443000UL, 0xbfe921fbUL
+  fmul(1);
+  faddp(2);
+  fld_d(ExternalAddress(8 + Pi4x3));    //0x3b39a000UL, 0x3d373dcbUL
+  fmul(1);
+  faddp(2);
+  fld_d(ExternalAddress(16 + Pi4x3));    //0xe0e68948UL, 0xba845c06UL
+  fmulp(1);
+  faddp(1);
+  jmp(B1_17);
+
+  bind(B1_10);
+  fld_d(ExternalAddress(Pi4x4));    //0x54400000UL, 0xbfe921fbUL
+  fmul(1);
+  faddp(2);
+  fld_d(ExternalAddress(8 + Pi4x4));    //0x1a600000UL, 0xbdc0b461UL
+  fmul(1);
+  faddp(2);
+  fld_d(ExternalAddress(16 + Pi4x4));    //0x2e000000UL, 0xbb93198aUL
+  fmul(1);
+  faddp(2);
+  fld_d(ExternalAddress(24 + Pi4x4));    //0x252049c1UL, 0xb96b839aUL
+  fmulp(1);
+  faddp(1);
+  jmp(B1_17);
+
+  bind(B1_11);
+  movzwl(edx, Address(esp, 38));
+  movl(eax, edx);
+  andl(eax, 768);
+  cmpl(eax, 768);
+  jcc(Assembler::equal, B1_40);
+
+  bind(B1_12);
+  orl(edx, -64768);
+  movw(Address(esp, 36), edx);
+
+  bind(B1_13);
+  fldcw(Address(esp, 36));
+
+  bind(B1_14);
+  movl(edi, 1);
+
+  bind(B1_15);
+  movsd(xmm0, Address(ebp, 8));
+  addl(esp, -32);
+  andps(xmm0, ExternalAddress(L_2il0floatpacket_0));    //0xffffffffUL, 0x7fffffffUL, 0x00000000UL, 0x00000000UL
+  lea(eax, Address(esp, 32));
+  movsd(Address(eax, 16), xmm0);
+  fld_d(Address(eax, 16));
+  fstp_x(Address(esp, 0));
+  movl(Address(esp, 12), 0);
+  movl(Address(esp, 16), eax);
+  call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_reduce_pi04l())));
+
+  bind(B1_43);
+  movl(edx, eax);
+  addl(esp, 32);
+
+  bind(B1_16);
+  fld_d(Address(esp, 0));
+  fld_d(Address(esp, 8));
+  faddp(1);
+
+  bind(B1_17);
+  movl(eax, ebx);
+  andl(eax, 3);
+  cmpl(eax, 3);
+  jcc(Assembler::notEqual, B1_24);
+
+  bind(B1_18);
+  fld_d(ExternalAddress(ones));
+  incl(edx);
+  fdiv(1);
+  testb(edx, 2);
+  fstp_x(Address(esp, 24));
+  fld_s(0);
+  fmul(1);
+  fld_s(0);
+  fmul(1);
+  fld_x(ExternalAddress(36 + TP));    //0x2ff0, 0x466d, 0x1a
+  fmul(2);
+  fld_x(ExternalAddress(24 + TP));    //0x00e3, 0xc850, 0xaa
+  faddp(1);
+  fmul(2);
+  fld_x(ExternalAddress(12 + TP));    //0x4b06, 0xb0ac, 0xd3
+  faddp(1);
+  fmul(2);
+  fld_x(ExternalAddress(36 + TQ));    //0x820f, 0x51ce, 0x7d
+  fmul(3);
+  fld_x(ExternalAddress(24 + TQ));    //0xb70f, 0xd068, 0xa6
+  faddp(1);
+  fmul(3);
+  fld_x(ExternalAddress(12 + TQ));    //0xb6a3, 0xc36a, 0x44
+  faddp(1);
+  fmul(3);
+  fld_x(ExternalAddress(TQ));    //0x399c, 0x8391, 0x15
+  faddp(1);
+  fld_x(ExternalAddress(TP));    //0x4cd6, 0xaf6c, 0xc7
+  faddp(2);
+  fld_x(ExternalAddress(132 + GP));    //0x00a3, 0x7fea, 0x9b
+  fmul(3);
+  fld_x(ExternalAddress(120 + GP));    //0xa559, 0x1da9, 0xae
+  fmul(4);
+  fld_x(ExternalAddress(108 + GP));    //0x0871, 0x1a2f, 0x64
+  faddp(2);
+  fxch(1);
+  fmul(4);
+  fld_x(ExternalAddress(96 + GP));    //0x286b, 0xb49e, 0xb8
+  faddp(2);
+  fxch(1);
+  fmul(4);
+  fld_x(ExternalAddress(84 + GP));    //0x355b, 0xd910, 0x67
+  faddp(2);
+  fxch(1);
+  fmul(4);
+  fld_x(ExternalAddress(72 + GP));    //0x8c96, 0x8e0b, 0xeb
+  faddp(2);
+  fxch(1);
+  fmul(4);
+  fld_x(ExternalAddress(60 + GP));    //0xa8f9, 0x83f1, 0x2e
+  faddp(2);
+  fxch(1);
+  fmul(4);
+  fld_x(ExternalAddress(48 + GP));    //0x7065, 0x6a37, 0x79
+  faddp(2);
+  fxch(1);
+  fmul(4);
+  fld_x(ExternalAddress(36 + GP));    //0x85a0, 0xa819, 0xbc
+  faddp(2);
+  fxch(1);
+  fmul(4);
+  fld_x(ExternalAddress(24 + GP));    //0xdfa7, 0x08aa, 0x55
+  faddp(2);
+  fxch(1);
+  fmulp(4);
+  fld_x(ExternalAddress(12 + GP));    //0xb62f, 0x0b60, 0x60
+  faddp(1);
+  fmul(4);
+  fmul(5);
+  fld_x(ExternalAddress(GP));    //0xaaab, 0xaaaa, 0xaa
+  faddp(4);
+  fxch(3);
+  fmul(5);
+  faddp(3);
+  jcc(Assembler::equal, B1_20);
+
+  bind(B1_19);
+  fld_x(Address(esp, 24));
+  fxch(1);
+  fdivrp(2);
+  fxch(1);
+  fmulp(3);
+  movl(eax, Address(esp, 44));
+  xorl(eax, 1);
+  fxch(2);
+  fmul(3);
+  fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
+  fmula(2);
+  fmula(3);
+  fxch(3);
+  faddp(2);
+  fxch(1);
+  fstp_d(Address(esp, 16));
+  fmul(1);
+  fxch(1);
+  fmulp(2);
+  movsd(xmm0, Address(esp, 16));
+  faddp(1);
+  fstp_d(Address(esp, 16));
+  movsd(xmm1, Address(esp, 16));
+  jmp(B1_21);
+
+  bind(B1_20);
+  fdivrp(1);
+  fmulp(2);
+  fxch(1);
+  fmul(2);
+  movl(eax, Address(esp, 44));
+  fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
+  fmula(1);
+  fmula(3);
+  fxch(3);
+  faddp(1);
+  fstp_d(Address(esp, 16));
+  fmul(1);
+  fld_x(Address(esp, 24));
+  fmulp(2);
+  movsd(xmm0, Address(esp, 16));
+  faddp(1);
+  fstp_d(Address(esp, 16));
+  movsd(xmm1, Address(esp, 16));
+
+  bind(B1_21);
+  testl(edi, edi);
+  jcc(Assembler::equal, B1_23);
+
+  bind(B1_22);
+  fldcw(Address(esp, 38));
+
+  bind(B1_23);
+  movl(eax, Address(esp, 40));
+  movsd(Address(eax, 0), xmm0);
+  movsd(Address(eax, 8), xmm1);
+  addl(esp, 52);
+  pop(ebx);
+  pop(edi);
+  pop(esi);
+  movl(esp, ebp);
+  pop(ebp);
+  ret(0);
+
+  bind(B1_24);
+  testb(ebx, 2);
+  jcc(Assembler::equal, B1_31);
+
+  bind(B1_25);
+  incl(edx);
+  fld_s(0);
+  fmul(1);
+  testb(edx, 2);
+  jcc(Assembler::equal, B1_27);
+
+  bind(B1_26);
+  fld_d(ExternalAddress(ones));
+  fdiv(2);
+  fld_s(1);
+  fmul(2);
+  fld_x(ExternalAddress(132 + GP));    //0x00a3, 0x7fea, 0x9b
+  fmul(1);
+  fld_x(ExternalAddress(120 + GP));    //0xa559, 0x1da9, 0xae
+  fmul(2);
+  fld_x(ExternalAddress(108 + GP));    //0x67c9, 0xbed3, 0xbf
+  movl(eax, Address(esp, 44));
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  xorl(eax, 1);
+  fld_x(ExternalAddress(96 + GP));    //0x286b, 0xb49e, 0xb8
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(84 + GP));    //0x355b, 0xd910, 0x67
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(72 + GP));    //0xf3ca, 0x8c96, 0x8e
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(60 + GP));    //0xa8f9, 0x83f1, 0x2e
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(48 + GP));    //0x7065, 0x6a37, 0x79
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(36 + GP));    //0x85a0, 0xa819, 0xbc
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(24 + GP));    //0xdfa7, 0x08aa, 0x55
+  faddp(2);
+  fxch(1);
+  fmulp(2);
+  fld_x(ExternalAddress(12 + GP));    //0xb62f, 0x0b60, 0x60
+  faddp(1);
+  fmulp(3);
+  fld_x(ExternalAddress(GP));    //0xaaab, 0xaaaa, 0xaa
+  faddp(1);
+  fmul(3);
+  fxch(2);
+  fmulp(3);
+  fxch(1);
+  faddp(2);
+  fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
+  fmula(2);
+  fmulp(1);
+  faddp(1);
+  fstp_d(Address(esp, 16));
+  movsd(xmm0, Address(esp, 16));
+  jmp(B1_28);
+
+  bind(B1_27);
+  fld_x(ExternalAddress(36 + TP));    //0x2ff0, 0x466d, 0x1a
+  fmul(1);
+  fld_x(ExternalAddress(24 + TP));    //0x00e3, 0xc850, 0xaa
+  movl(eax, Address(esp, 44));
+  faddp(1);
+  fmul(1);
+  fld_x(ExternalAddress(36 + TQ));    //0x820f, 0x51ce, 0x7d
+  fmul(2);
+  fld_x(ExternalAddress(24 + TQ));    //0xb70f, 0xd068, 0xa6
+  faddp(1);
+  fmul(2);
+  fld_x(ExternalAddress(12 + TQ));    //0xb6a3, 0xc36a, 0x44
+  faddp(1);
+  fmul(2);
+  fld_x(ExternalAddress(TQ));    //0x399c, 0x8391, 0x15
+  faddp(1);
+  fld_x(ExternalAddress(12 + TP));    //0x4b06, 0xb0ac, 0xd3
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(TP));    //0x4cd6, 0xaf6c, 0xc7
+  faddp(1);
+  fdivrp(1);
+  fmulp(1);
+  fmul(1);
+  fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
+  fmula(1);
+  fmulp(2);
+  faddp(1);
+  fstp_d(Address(esp, 16));
+  movsd(xmm0, Address(esp, 16));
+
+  bind(B1_28);
+  testl(edi, edi);
+  jcc(Assembler::equal, B1_30);
+
+  bind(B1_29);
+  fldcw(Address(esp, 38));
+
+  bind(B1_30);
+  movl(eax, Address(esp, 40));
+  movsd(Address(eax, 0), xmm0);
+  addl(esp, 52);
+  pop(ebx);
+  pop(edi);
+  pop(esi);
+  movl(esp, ebp);
+  pop(ebp);
+  ret(0);
+
+  bind(B1_31);
+  testb(ebx, 1);
+  jcc(Assembler::equal, B1_38);
+
+  bind(B1_32);
+  incl(edx);
+  fld_s(0);
+  fmul(1);
+  testb(edx, 2);
+  jcc(Assembler::equal, B1_34);
+
+  bind(B1_33);
+  fld_x(ExternalAddress(36 + TP));    //0x2ff0, 0x466d, 0x1a
+  fmul(1);
+  fld_x(ExternalAddress(24 + TP));    //0x00e3, 0xc850, 0xaa
+  movl(eax, Address(esp, 44));
+  faddp(1);
+  fmul(1);
+  xorl(eax, 1);
+  fld_x(ExternalAddress(36 + TQ));    //0x820f, 0x51ce, 0x7d
+  fmul(2);
+  fld_x(ExternalAddress(24 + TQ));    //0xb70f, 0xd068, 0xa6
+  faddp(1);
+  fmul(2);
+  fld_x(ExternalAddress(12 + TQ));    //0xb6a3, 0xc36a, 0x44
+  faddp(1);
+  fmul(2);
+  fld_x(ExternalAddress(TQ));    //0x399c, 0x8391, 0x15
+  faddp(1);
+  fld_x(ExternalAddress(12 + TP));    //0x4b06, 0xb0ac, 0xd3
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(TP));    //0x4cd6, 0xaf6c, 0xc7
+  faddp(1);
+  fdivrp(1);
+  fmulp(1);
+  fmul(1);
+  fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
+  fmula(1);
+  fmulp(2);
+  faddp(1);
+  fstp_d(Address(esp, 16));
+  movsd(xmm0, Address(esp, 16));
+  jmp(B1_35);
+
+  bind(B1_34);
+  fld_d(ExternalAddress(ones));
+  fdiv(2);
+  fld_s(1);
+  fmul(2);
+  fld_x(ExternalAddress(132 + GP));    //0x00a3, 0x7fea, 0x9b
+  fmul(1);
+  fld_x(ExternalAddress(120 + GP));    //0xa559, 0x1da9, 0xae
+  fmul(2);
+  fld_x(ExternalAddress(108 + GP));    //0x67c9, 0xbed3, 0xbf
+  movl(eax, Address(esp, 44));
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(96 + GP));    //0x286b, 0xb49e, 0xb8
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(84 + GP));    //0x355b, 0xd910, 0x67
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(72 + GP));    //0xf3ca, 0x8c96, 0x8e
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(60 + GP));    //0xa8f9, 0x83f1, 0x2e
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(48 + GP));    //0x7065, 0x6a37, 0x79
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(36 + GP));    //0x85a0, 0xa819, 0xbc
+  faddp(2);
+  fxch(1);
+  fmul(2);
+  fld_x(ExternalAddress(24 + GP));    //0xdfa7, 0x08aa, 0x55
+  faddp(2);
+  fxch(1);
+  fmulp(2);
+  fld_x(ExternalAddress(12 + GP));    //0xb62f, 0x0b60, 0x60
+  faddp(1);
+  fmulp(3);
+  fld_x(ExternalAddress(GP));    //0xaaab, 0xaaaa, 0xaa
+  faddp(1);
+  fmul(3);
+  fxch(2);
+  fmulp(3);
+  fxch(1);
+  faddp(2);
+  fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
+  fmula(2);
+  fmulp(1);
+  faddp(1);
+  fstp_d(Address(esp, 16));
+  movsd(xmm0, Address(esp, 16));
+
+  bind(B1_35);
+  testl(edi, edi);
+  jcc(Assembler::equal, B1_37);
+
+  bind(B1_36);
+  fldcw(Address(esp, 38));
+
+  bind(B1_37);
+  movl(eax, Address(esp, 40));
+  movsd(Address(eax, 8), xmm0);
+  addl(esp, 52);
+  pop(ebx);
+  pop(edi);
+  pop(esi);
+  mov(esp, ebp);
+  pop(ebp);
+  ret(0);
+
+  bind(B1_38);
+  fstp_d(0);
+  addl(esp, 52);
+  pop(ebx);
+  pop(edi);
+  pop(esi);
+  mov(esp, ebp);
+  pop(ebp);
+  ret(0);
+
+  bind(B1_39);
+  xorl(edi, edi);
+  jmp(B1_8);
+
+  bind(B1_40);
+  xorl(edi, edi);
+  jmp(B1_15);
+}
+
+ALIGNED_(16) juint _static_const_table_tan[] =
+{
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x882c10faUL,
+    0x3f9664f4UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x55e6c23dUL, 0x3f8226e3UL, 0x55555555UL,
+    0x3fd55555UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x0e157de0UL, 0x3f6d6d3dUL, 0x11111111UL, 0x3fc11111UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x452b75e3UL, 0x3f57da36UL,
+    0x1ba1ba1cUL, 0x3faba1baUL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x4e435f9bUL,
+    0x3f953f83UL, 0x00000000UL, 0x00000000UL, 0x3c6e8e46UL, 0x3f9b74eaUL,
+    0x00000000UL, 0x00000000UL, 0xda5b7511UL, 0x3f85ad63UL, 0xdc230b9bUL,
+    0x3fb97558UL, 0x26cb3788UL, 0x3f881308UL, 0x76fc4985UL, 0x3fd62ac9UL,
+    0x77bb08baUL, 0x3f757c85UL, 0xb6247521UL, 0x3fb1381eUL, 0x5922170cUL,
+    0x3f754e95UL, 0x8746482dUL, 0x3fc27f83UL, 0x11055b30UL, 0x3f64e391UL,
+    0x3e666320UL, 0x3fa3e609UL, 0x0de9dae3UL, 0x3f6301dfUL, 0x1f1dca06UL,
+    0x3fafa8aeUL, 0x8c5b2da2UL, 0x3fb936bbUL, 0x4e88f7a5UL, 0x3c587d05UL,
+    0x00000000UL, 0x3ff00000UL, 0xa8935dd9UL, 0x3f83dde2UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x5a279ea3UL, 0x3faa3407UL,
+    0x00000000UL, 0x00000000UL, 0x432d65faUL, 0x3fa70153UL, 0x00000000UL,
+    0x00000000UL, 0x891a4602UL, 0x3f9d03efUL, 0xd62ca5f8UL, 0x3fca77d9UL,
+    0xb35f4628UL, 0x3f97a265UL, 0x433258faUL, 0x3fd8cf51UL, 0xb58fd909UL,
+    0x3f8f88e3UL, 0x01771ceaUL, 0x3fc2b154UL, 0xf3562f8eUL, 0x3f888f57UL,
+    0xc028a723UL, 0x3fc7370fUL, 0x20b7f9f0UL, 0x3f80f44cUL, 0x214368e9UL,
+    0x3fb6dfaaUL, 0x28891863UL, 0x3f79b4b6UL, 0x172dbbf0UL, 0x3fb6cb8eUL,
+    0xe0553158UL, 0x3fc975f5UL, 0x593fe814UL, 0x3c2ef5d3UL, 0x00000000UL,
+    0x3ff00000UL, 0x03dec550UL, 0x3fa44203UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x9314533eUL, 0x3fbb8ec5UL, 0x00000000UL,
+    0x00000000UL, 0x09aa36d0UL, 0x3fb6d3f4UL, 0x00000000UL, 0x00000000UL,
+    0xdcb427fdUL, 0x3fb13950UL, 0xd87ab0bbUL, 0x3fd5335eUL, 0xce0ae8a5UL,
+    0x3fabb382UL, 0x79143126UL, 0x3fddba41UL, 0x5f2b28d4UL, 0x3fa552f1UL,
+    0x59f21a6dUL, 0x3fd015abUL, 0x22c27d95UL, 0x3fa0e984UL, 0xe19fc6aaUL,
+    0x3fd0576cUL, 0x8f2c2950UL, 0x3f9a4898UL, 0xc0b3f22cUL, 0x3fc59462UL,
+    0x1883a4b8UL, 0x3f94b61cUL, 0x3f838640UL, 0x3fc30eb8UL, 0x355c63dcUL,
+    0x3fd36a08UL, 0x1dce993dUL, 0xbc6d704dUL, 0x00000000UL, 0x3ff00000UL,
+    0x2b82ab63UL, 0x3fb78e92UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x56f37042UL, 0x3fccfc56UL, 0x00000000UL, 0x00000000UL,
+    0xaa563951UL, 0x3fc90125UL, 0x00000000UL, 0x00000000UL, 0x3d0e7c5dUL,
+    0x3fc50533UL, 0x9bed9b2eUL, 0x3fdf0ed9UL, 0x5fe7c47cUL, 0x3fc1f250UL,
+    0x96c125e5UL, 0x3fe2edd9UL, 0x5a02bbd8UL, 0x3fbe5c71UL, 0x86362c20UL,
+    0x3fda08b7UL, 0x4b4435edUL, 0x3fb9d342UL, 0x4b494091UL, 0x3fd911bdUL,
+    0xb56658beUL, 0x3fb5e4c7UL, 0x93a2fd76UL, 0x3fd3c092UL, 0xda271794UL,
+    0x3fb29910UL, 0x3303df2bUL, 0x3fd189beUL, 0x99fcef32UL, 0x3fda8279UL,
+    0xb68c1467UL, 0x3c708b2fUL, 0x00000000UL, 0x3ff00000UL, 0x980c4337UL,
+    0x3fc5f619UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0xcc03e501UL, 0x3fdff10fUL, 0x00000000UL, 0x00000000UL, 0x44a4e845UL,
+    0x3fddb63bUL, 0x00000000UL, 0x00000000UL, 0x3768ad9fUL, 0x3fdb72a4UL,
+    0x3dd01ccaUL, 0x3fe5fdb9UL, 0xa61d2811UL, 0x3fd972b2UL, 0x5645ad0bUL,
+    0x3fe977f9UL, 0xd013b3abUL, 0x3fd78ca3UL, 0xbf0bf914UL, 0x3fe4f192UL,
+    0x4d53e730UL, 0x3fd5d060UL, 0x3f8b9000UL, 0x3fe49933UL, 0xe2b82f08UL,
+    0x3fd4322aUL, 0x5936a835UL, 0x3fe27ae1UL, 0xb1c61c9bUL, 0x3fd2b3fbUL,
+    0xef478605UL, 0x3fe1659eUL, 0x190834ecUL, 0x3fe11ab7UL, 0xcdb625eaUL,
+    0xbc8e564bUL, 0x00000000UL, 0x3ff00000UL, 0xb07217e3UL, 0x3fd248f1UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x2b2c49d0UL,
+    0x3ff2de9cUL, 0x00000000UL, 0x00000000UL, 0x2655bc98UL, 0x3ff33e58UL,
+    0x00000000UL, 0x00000000UL, 0xff691fa2UL, 0x3ff3972eUL, 0xe93463bdUL,
+    0x3feeed87UL, 0x070e10a0UL, 0x3ff3f5b2UL, 0xf4d790a4UL, 0x3ff20c10UL,
+    0xa04e8ea3UL, 0x3ff4541aUL, 0x386accd3UL, 0x3ff1369eUL, 0x222a66ddUL,
+    0x3ff4b521UL, 0x22a9777eUL, 0x3ff20817UL, 0x52a04a6eUL, 0x3ff5178fUL,
+    0xddaa0031UL, 0x3ff22137UL, 0x4447d47cUL, 0x3ff57c01UL, 0x1e9c7f1dUL,
+    0x3ff29311UL, 0x2ab7f990UL, 0x3fe561b8UL, 0x209c7df1UL, 0x3c87a8c5UL,
+    0x00000000UL, 0x3ff00000UL, 0x4170bcc6UL, 0x3fdc92d8UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0xc7ab4d5aUL, 0x40085e24UL,
+    0x00000000UL, 0x00000000UL, 0xe93ea75dUL, 0x400b963dUL, 0x00000000UL,
+    0x00000000UL, 0x94a7f25aUL, 0x400f37e2UL, 0x4b6261cbUL, 0x3ff5f984UL,
+    0x5a9dd812UL, 0x4011aab0UL, 0x74c30018UL, 0x3ffaf5a5UL, 0x7f2ce8e3UL,
+    0x4013fe8bUL, 0xfe8e54faUL, 0x3ffd7334UL, 0x670d618dUL, 0x4016a10cUL,
+    0x4db97058UL, 0x4000e012UL, 0x24df44ddUL, 0x40199c5fUL, 0x697d6eceUL,
+    0x4003006eUL, 0x83298b82UL, 0x401cfc4dUL, 0x19d490d6UL, 0x40058c19UL,
+    0x2ae42850UL, 0x3fea4300UL, 0x118e20e6UL, 0xbc7a6db8UL, 0x00000000UL,
+    0x40000000UL, 0xe33345b8UL, 0xbfd4e526UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x65965966UL, 0x40219659UL, 0x00000000UL,
+    0x00000000UL, 0x882c10faUL, 0x402664f4UL, 0x00000000UL, 0x00000000UL,
+    0x83cd3723UL, 0x402c8342UL, 0x00000000UL, 0x40000000UL, 0x55e6c23dUL,
+    0x403226e3UL, 0x55555555UL, 0x40055555UL, 0x34451939UL, 0x40371c96UL,
+    0xaaaaaaabUL, 0x400aaaaaUL, 0x0e157de0UL, 0x403d6d3dUL, 0x11111111UL,
+    0x40111111UL, 0xa738201fUL, 0x4042bbceUL, 0x05b05b06UL, 0x4015b05bUL,
+    0x452b75e3UL, 0x4047da36UL, 0x1ba1ba1cUL, 0x401ba1baUL, 0x00000000UL,
+    0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x40000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x4f48b8d3UL, 0xbf33eaf9UL, 0x00000000UL, 0x00000000UL,
+    0x0cf7586fUL, 0x3f20b8eaUL, 0x00000000UL, 0x00000000UL, 0xd0258911UL,
+    0xbf0abaf3UL, 0x23e49fe9UL, 0xbfab5a8cUL, 0x2d53222eUL, 0x3ef60d15UL,
+    0x21169451UL, 0x3fa172b2UL, 0xbb254dbcUL, 0xbee1d3b5UL, 0xdbf93b8eUL,
+    0xbf84c7dbUL, 0x05b4630bUL, 0x3ecd3364UL, 0xee9aada7UL, 0x3f743924UL,
+    0x794a8297UL, 0xbeb7b7b9UL, 0xe015f797UL, 0xbf5d41f5UL, 0xe41a4a56UL,
+    0x3ea35dfbUL, 0xe4c2a251UL, 0x3f49a2abUL, 0x5af9e000UL, 0xbfce49ceUL,
+    0x8c743719UL, 0x3d1eb860UL, 0x00000000UL, 0x00000000UL, 0x1b4863cfUL,
+    0x3fd78294UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL,
+    0x535ad890UL, 0xbf2b9320UL, 0x00000000UL, 0x00000000UL, 0x018fdf1fUL,
+    0x3f16d61dUL, 0x00000000UL, 0x00000000UL, 0x0359f1beUL, 0xbf0139e4UL,
+    0xa4317c6dUL, 0xbfa67e17UL, 0x82672d0fUL, 0x3eebb405UL, 0x2f1b621eUL,
+    0x3f9f455bUL, 0x51ccf238UL, 0xbed55317UL, 0xf437b9acUL, 0xbf804beeUL,
+    0xc791a2b5UL, 0x3ec0e993UL, 0x919a1db2UL, 0x3f7080c2UL, 0x336a5b0eUL,
+    0xbeaa48a2UL, 0x0a268358UL, 0xbf55a443UL, 0xdfd978e4UL, 0x3e94b61fUL,
+    0xd7767a58UL, 0x3f431806UL, 0x2aea0000UL, 0xbfc9bbe8UL, 0x7723ea61UL,
+    0xbd3a2369UL, 0x00000000UL, 0x00000000UL, 0xdf7796ffUL, 0x3fd6e642UL,
+    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0xb9ff07ceUL,
+    0xbf231c78UL, 0x00000000UL, 0x00000000UL, 0xa5517182UL, 0x3f0ff0e0UL,
+    0x00000000UL, 0x00000000UL, 0x790b4cbcUL, 0xbef66191UL, 0x848a46c6UL,
+    0xbfa21ac0UL, 0xb16435faUL, 0x3ee1d3ecUL, 0x2a1aa832UL, 0x3f9c71eaUL,
+    0xfdd299efUL, 0xbec9dd1aUL, 0x3f8dbaafUL, 0xbf793363UL, 0x309fc6eaUL,
+    0x3eb415d6UL, 0xbee60471UL, 0x3f6b83baUL, 0x94a0a697UL, 0xbe9dae11UL,
+    0x3e5c67b3UL, 0xbf4fd07bUL, 0x9a8f3e3eUL, 0x3e86bd75UL, 0xa4beb7a4UL,
+    0x3f3d1eb1UL, 0x29cfc000UL, 0xbfc549ceUL, 0xbf159358UL, 0xbd397b33UL,
+    0x00000000UL, 0x00000000UL, 0x871fee6cUL, 0x3fd666f0UL, 0x00000000UL,
+    0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x7d98a556UL, 0xbf1a3958UL,
+    0x00000000UL, 0x00000000UL, 0x9d88dc01UL, 0x3f0704c2UL, 0x00000000UL,
+    0x00000000UL, 0x73742a2bUL, 0xbeed054aUL, 0x58844587UL, 0xbf9c2a13UL,
+    0x55688a79UL, 0x3ed7a326UL, 0xee33f1d6UL, 0x3f9a48f4UL, 0xa8dc9888UL,
+    0xbebf8939UL, 0xaad4b5b8UL, 0xbf72f746UL, 0x9102efa1UL, 0x3ea88f82UL,
+    0xdabc29cfUL, 0x3f678228UL, 0x9289afb8UL, 0xbe90f456UL, 0x741fb4edUL,
+    0xbf46f3a3UL, 0xa97f6663UL, 0x3e79b4bfUL, 0xca89ff3fUL, 0x3f36db70UL,
+    0xa8a2a000UL, 0xbfc0ee13UL, 0x3da24be1UL, 0xbd338b9fUL, 0x00000000UL,
+    0x00000000UL, 0x11cd6c69UL, 0x3fd601fdUL, 0x00000000UL, 0x3ff00000UL,
+    0x00000000UL, 0xfffffff8UL, 0x1a154b97UL, 0xbf116b01UL, 0x00000000UL,
+    0x00000000UL, 0x2d427630UL, 0x3f0147bfUL, 0x00000000UL, 0x00000000UL,
+    0xb93820c8UL, 0xbee264d4UL, 0xbb6cbb18UL, 0xbf94ab8cUL, 0x888d4d92UL,
+    0x3ed0568bUL, 0x60730f7cUL, 0x3f98b19bUL, 0xe4b1fb11UL, 0xbeb2f950UL,
+    0x22cf9f74UL, 0xbf6b21cdUL, 0x4a3ff0a6UL, 0x3e9f499eUL, 0xfd2b83ceUL,
+    0x3f64aad7UL, 0x637b73afUL, 0xbe83487cUL, 0xe522591aUL, 0xbf3fc092UL,
+    0xa158e8bcUL, 0x3e6e3aaeUL, 0xe5e82ffaUL, 0x3f329d2fUL, 0xd636a000UL,
+    0xbfb9477fUL, 0xc2c2d2bcUL, 0xbd135ef9UL, 0x00000000UL, 0x00000000UL,
+    0xf2fdb123UL, 0x3fd5b566UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL,
+    0xfffffff8UL, 0xc41acb64UL, 0xbf05448dUL, 0x00000000UL, 0x00000000UL,
+    0xdbb03d6fUL, 0x3efb7ad2UL, 0x00000000UL, 0x00000000UL, 0x9e42962dUL,
+    0xbed5aea5UL, 0x2579f8efUL, 0xbf8b2398UL, 0x288a1ed9UL, 0x3ec81441UL,
+    0xb0198dc5UL, 0x3f979a3aUL, 0x2fdfe253UL, 0xbea57cd3UL, 0x5766336fUL,
+    0xbf617caaUL, 0x600944c3UL, 0x3e954ed6UL, 0xa4e0aaf8UL, 0x3f62c646UL,
+    0x6b8fb29cUL, 0xbe74e3a3UL, 0xdc4c0409UL, 0xbf33f952UL, 0x9bffe365UL,
+    0x3e6301ecUL, 0xb8869e44UL, 0x3f2fc566UL, 0xe1e04000UL, 0xbfb0cc62UL,
+    0x016b907fUL, 0xbd119cbcUL, 0x00000000UL, 0x00000000UL, 0xe6b9d8faUL,
+    0x3fd57fb3UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL,
+    0x5daf22a6UL, 0xbef429d7UL, 0x00000000UL, 0x00000000UL, 0x06bca545UL,
+    0x3ef7a27dUL, 0x00000000UL, 0x00000000UL, 0x7211c19aUL, 0xbec41c3eUL,
+    0x956ed53eUL, 0xbf7ae3f4UL, 0xee750e72UL, 0x3ec3901bUL, 0x91d443f5UL,
+    0x3f96f713UL, 0x36661e6cUL, 0xbe936e09UL, 0x506f9381UL, 0xbf5122e8UL,
+    0xcb6dd43fUL, 0x3e9041b9UL, 0x6698b2ffUL, 0x3f61b0c7UL, 0x576bf12bUL,
+    0xbe625a8aUL, 0xe5a0e9dcUL, 0xbf23499dUL, 0x110384ddUL, 0x3e5b1c2cUL,
+    0x68d43db6UL, 0x3f2cb899UL, 0x6ecac000UL, 0xbfa0c414UL, 0xcd7dd58cUL,
+    0x3d13500fUL, 0x00000000UL, 0x00000000UL, 0x85a2c8fbUL, 0x3fd55fe0UL,
+    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x2bf70ebeUL, 0x3ef66a8fUL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0xd644267fUL, 0x3ec22805UL, 0x16c16c17UL, 0x3f96c16cUL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0xc4e09162UL,
+    0x3e8d6db2UL, 0xbc011567UL, 0x3f61566aUL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x1f79955cUL, 0x3e57da4eUL, 0x9334ef0bUL,
+    0x3f2bbd77UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x55555555UL, 0x3fd55555UL, 0x00000000UL,
+    0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x5daf22a6UL, 0x3ef429d7UL,
+    0x00000000UL, 0x00000000UL, 0x06bca545UL, 0x3ef7a27dUL, 0x00000000UL,
+    0x00000000UL, 0x7211c19aUL, 0x3ec41c3eUL, 0x956ed53eUL, 0x3f7ae3f4UL,
+    0xee750e72UL, 0x3ec3901bUL, 0x91d443f5UL, 0x3f96f713UL, 0x36661e6cUL,
+    0x3e936e09UL, 0x506f9381UL, 0x3f5122e8UL, 0xcb6dd43fUL, 0x3e9041b9UL,
+    0x6698b2ffUL, 0x3f61b0c7UL, 0x576bf12bUL, 0x3e625a8aUL, 0xe5a0e9dcUL,
+    0x3f23499dUL, 0x110384ddUL, 0x3e5b1c2cUL, 0x68d43db6UL, 0x3f2cb899UL,
+    0x6ecac000UL, 0x3fa0c414UL, 0xcd7dd58cUL, 0xbd13500fUL, 0x00000000UL,
+    0x00000000UL, 0x85a2c8fbUL, 0x3fd55fe0UL, 0x00000000UL, 0x3ff00000UL,
+    0x00000000UL, 0xfffffff8UL, 0xc41acb64UL, 0x3f05448dUL, 0x00000000UL,
+    0x00000000UL, 0xdbb03d6fUL, 0x3efb7ad2UL, 0x00000000UL, 0x00000000UL,
+    0x9e42962dUL, 0x3ed5aea5UL, 0x2579f8efUL, 0x3f8b2398UL, 0x288a1ed9UL,
+    0x3ec81441UL, 0xb0198dc5UL, 0x3f979a3aUL, 0x2fdfe253UL, 0x3ea57cd3UL,
+    0x5766336fUL, 0x3f617caaUL, 0x600944c3UL, 0x3e954ed6UL, 0xa4e0aaf8UL,
+    0x3f62c646UL, 0x6b8fb29cUL, 0x3e74e3a3UL, 0xdc4c0409UL, 0x3f33f952UL,
+    0x9bffe365UL, 0x3e6301ecUL, 0xb8869e44UL, 0x3f2fc566UL, 0xe1e04000UL,
+    0x3fb0cc62UL, 0x016b907fUL, 0x3d119cbcUL, 0x00000000UL, 0x00000000UL,
+    0xe6b9d8faUL, 0x3fd57fb3UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL,
+    0xfffffff8UL, 0x1a154b97UL, 0x3f116b01UL, 0x00000000UL, 0x00000000UL,
+    0x2d427630UL, 0x3f0147bfUL, 0x00000000UL, 0x00000000UL, 0xb93820c8UL,
+    0x3ee264d4UL, 0xbb6cbb18UL, 0x3f94ab8cUL, 0x888d4d92UL, 0x3ed0568bUL,
+    0x60730f7cUL, 0x3f98b19bUL, 0xe4b1fb11UL, 0x3eb2f950UL, 0x22cf9f74UL,
+    0x3f6b21cdUL, 0x4a3ff0a6UL, 0x3e9f499eUL, 0xfd2b83ceUL, 0x3f64aad7UL,
+    0x637b73afUL, 0x3e83487cUL, 0xe522591aUL, 0x3f3fc092UL, 0xa158e8bcUL,
+    0x3e6e3aaeUL, 0xe5e82ffaUL, 0x3f329d2fUL, 0xd636a000UL, 0x3fb9477fUL,
+    0xc2c2d2bcUL, 0x3d135ef9UL, 0x00000000UL, 0x00000000UL, 0xf2fdb123UL,
+    0x3fd5b566UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL,
+    0x7d98a556UL, 0x3f1a3958UL, 0x00000000UL, 0x00000000UL, 0x9d88dc01UL,
+    0x3f0704c2UL, 0x00000000UL, 0x00000000UL, 0x73742a2bUL, 0x3eed054aUL,
+    0x58844587UL, 0x3f9c2a13UL, 0x55688a79UL, 0x3ed7a326UL, 0xee33f1d6UL,
+    0x3f9a48f4UL, 0xa8dc9888UL, 0x3ebf8939UL, 0xaad4b5b8UL, 0x3f72f746UL,
+    0x9102efa1UL, 0x3ea88f82UL, 0xdabc29cfUL, 0x3f678228UL, 0x9289afb8UL,
+    0x3e90f456UL, 0x741fb4edUL, 0x3f46f3a3UL, 0xa97f6663UL, 0x3e79b4bfUL,
+    0xca89ff3fUL, 0x3f36db70UL, 0xa8a2a000UL, 0x3fc0ee13UL, 0x3da24be1UL,
+    0x3d338b9fUL, 0x00000000UL, 0x00000000UL, 0x11cd6c69UL, 0x3fd601fdUL,
+    0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0xb9ff07ceUL,
+    0x3f231c78UL, 0x00000000UL, 0x00000000UL, 0xa5517182UL, 0x3f0ff0e0UL,
+    0x00000000UL, 0x00000000UL, 0x790b4cbcUL, 0x3ef66191UL, 0x848a46c6UL,
+    0x3fa21ac0UL, 0xb16435faUL, 0x3ee1d3ecUL, 0x2a1aa832UL, 0x3f9c71eaUL,
+    0xfdd299efUL, 0x3ec9dd1aUL, 0x3f8dbaafUL, 0x3f793363UL, 0x309fc6eaUL,
+    0x3eb415d6UL, 0xbee60471UL, 0x3f6b83baUL, 0x94a0a697UL, 0x3e9dae11UL,
+    0x3e5c67b3UL, 0x3f4fd07bUL, 0x9a8f3e3eUL, 0x3e86bd75UL, 0xa4beb7a4UL,
+    0x3f3d1eb1UL, 0x29cfc000UL, 0x3fc549ceUL, 0xbf159358UL, 0x3d397b33UL,
+    0x00000000UL, 0x00000000UL, 0x871fee6cUL, 0x3fd666f0UL, 0x00000000UL,
+    0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x535ad890UL, 0x3f2b9320UL,
+    0x00000000UL, 0x00000000UL, 0x018fdf1fUL, 0x3f16d61dUL, 0x00000000UL,
+    0x00000000UL, 0x0359f1beUL, 0x3f0139e4UL, 0xa4317c6dUL, 0x3fa67e17UL,
+    0x82672d0fUL, 0x3eebb405UL, 0x2f1b621eUL, 0x3f9f455bUL, 0x51ccf238UL,
+    0x3ed55317UL, 0xf437b9acUL, 0x3f804beeUL, 0xc791a2b5UL, 0x3ec0e993UL,
+    0x919a1db2UL, 0x3f7080c2UL, 0x336a5b0eUL, 0x3eaa48a2UL, 0x0a268358UL,
+    0x3f55a443UL, 0xdfd978e4UL, 0x3e94b61fUL, 0xd7767a58UL, 0x3f431806UL,
+    0x2aea0000UL, 0x3fc9bbe8UL, 0x7723ea61UL, 0x3d3a2369UL, 0x00000000UL,
+    0x00000000UL, 0xdf7796ffUL, 0x3fd6e642UL, 0x00000000UL, 0x3ff00000UL,
+    0x00000000UL, 0xfffffff8UL, 0x4f48b8d3UL, 0x3f33eaf9UL, 0x00000000UL,
+    0x00000000UL, 0x0cf7586fUL, 0x3f20b8eaUL, 0x00000000UL, 0x00000000UL,
+    0xd0258911UL, 0x3f0abaf3UL, 0x23e49fe9UL, 0x3fab5a8cUL, 0x2d53222eUL,
+    0x3ef60d15UL, 0x21169451UL, 0x3fa172b2UL, 0xbb254dbcUL, 0x3ee1d3b5UL,
+    0xdbf93b8eUL, 0x3f84c7dbUL, 0x05b4630bUL, 0x3ecd3364UL, 0xee9aada7UL,
+    0x3f743924UL, 0x794a8297UL, 0x3eb7b7b9UL, 0xe015f797UL, 0x3f5d41f5UL,
+    0xe41a4a56UL, 0x3ea35dfbUL, 0xe4c2a251UL, 0x3f49a2abUL, 0x5af9e000UL,
+    0x3fce49ceUL, 0x8c743719UL, 0xbd1eb860UL, 0x00000000UL, 0x00000000UL,
+    0x1b4863cfUL, 0x3fd78294UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL,
+    0xfffffff8UL, 0x65965966UL, 0xc0219659UL, 0x00000000UL, 0x00000000UL,
+    0x882c10faUL, 0x402664f4UL, 0x00000000UL, 0x00000000UL, 0x83cd3723UL,
+    0xc02c8342UL, 0x00000000UL, 0xc0000000UL, 0x55e6c23dUL, 0x403226e3UL,
+    0x55555555UL, 0x40055555UL, 0x34451939UL, 0xc0371c96UL, 0xaaaaaaabUL,
+    0xc00aaaaaUL, 0x0e157de0UL, 0x403d6d3dUL, 0x11111111UL, 0x40111111UL,
+    0xa738201fUL, 0xc042bbceUL, 0x05b05b06UL, 0xc015b05bUL, 0x452b75e3UL,
+    0x4047da36UL, 0x1ba1ba1cUL, 0x401ba1baUL, 0x00000000UL, 0xbff00000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x40000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0xc7ab4d5aUL, 0xc0085e24UL, 0x00000000UL, 0x00000000UL, 0xe93ea75dUL,
+    0x400b963dUL, 0x00000000UL, 0x00000000UL, 0x94a7f25aUL, 0xc00f37e2UL,
+    0x4b6261cbUL, 0xbff5f984UL, 0x5a9dd812UL, 0x4011aab0UL, 0x74c30018UL,
+    0x3ffaf5a5UL, 0x7f2ce8e3UL, 0xc013fe8bUL, 0xfe8e54faUL, 0xbffd7334UL,
+    0x670d618dUL, 0x4016a10cUL, 0x4db97058UL, 0x4000e012UL, 0x24df44ddUL,
+    0xc0199c5fUL, 0x697d6eceUL, 0xc003006eUL, 0x83298b82UL, 0x401cfc4dUL,
+    0x19d490d6UL, 0x40058c19UL, 0x2ae42850UL, 0xbfea4300UL, 0x118e20e6UL,
+    0x3c7a6db8UL, 0x00000000UL, 0x40000000UL, 0xe33345b8UL, 0xbfd4e526UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x2b2c49d0UL,
+    0xbff2de9cUL, 0x00000000UL, 0x00000000UL, 0x2655bc98UL, 0x3ff33e58UL,
+    0x00000000UL, 0x00000000UL, 0xff691fa2UL, 0xbff3972eUL, 0xe93463bdUL,
+    0xbfeeed87UL, 0x070e10a0UL, 0x3ff3f5b2UL, 0xf4d790a4UL, 0x3ff20c10UL,
+    0xa04e8ea3UL, 0xbff4541aUL, 0x386accd3UL, 0xbff1369eUL, 0x222a66ddUL,
+    0x3ff4b521UL, 0x22a9777eUL, 0x3ff20817UL, 0x52a04a6eUL, 0xbff5178fUL,
+    0xddaa0031UL, 0xbff22137UL, 0x4447d47cUL, 0x3ff57c01UL, 0x1e9c7f1dUL,
+    0x3ff29311UL, 0x2ab7f990UL, 0xbfe561b8UL, 0x209c7df1UL, 0xbc87a8c5UL,
+    0x00000000UL, 0x3ff00000UL, 0x4170bcc6UL, 0x3fdc92d8UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0xcc03e501UL, 0xbfdff10fUL,
+    0x00000000UL, 0x00000000UL, 0x44a4e845UL, 0x3fddb63bUL, 0x00000000UL,
+    0x00000000UL, 0x3768ad9fUL, 0xbfdb72a4UL, 0x3dd01ccaUL, 0xbfe5fdb9UL,
+    0xa61d2811UL, 0x3fd972b2UL, 0x5645ad0bUL, 0x3fe977f9UL, 0xd013b3abUL,
+    0xbfd78ca3UL, 0xbf0bf914UL, 0xbfe4f192UL, 0x4d53e730UL, 0x3fd5d060UL,
+    0x3f8b9000UL, 0x3fe49933UL, 0xe2b82f08UL, 0xbfd4322aUL, 0x5936a835UL,
+    0xbfe27ae1UL, 0xb1c61c9bUL, 0x3fd2b3fbUL, 0xef478605UL, 0x3fe1659eUL,
+    0x190834ecUL, 0xbfe11ab7UL, 0xcdb625eaUL, 0x3c8e564bUL, 0x00000000UL,
+    0x3ff00000UL, 0xb07217e3UL, 0x3fd248f1UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x56f37042UL, 0xbfccfc56UL, 0x00000000UL,
+    0x00000000UL, 0xaa563951UL, 0x3fc90125UL, 0x00000000UL, 0x00000000UL,
+    0x3d0e7c5dUL, 0xbfc50533UL, 0x9bed9b2eUL, 0xbfdf0ed9UL, 0x5fe7c47cUL,
+    0x3fc1f250UL, 0x96c125e5UL, 0x3fe2edd9UL, 0x5a02bbd8UL, 0xbfbe5c71UL,
+    0x86362c20UL, 0xbfda08b7UL, 0x4b4435edUL, 0x3fb9d342UL, 0x4b494091UL,
+    0x3fd911bdUL, 0xb56658beUL, 0xbfb5e4c7UL, 0x93a2fd76UL, 0xbfd3c092UL,
+    0xda271794UL, 0x3fb29910UL, 0x3303df2bUL, 0x3fd189beUL, 0x99fcef32UL,
+    0xbfda8279UL, 0xb68c1467UL, 0xbc708b2fUL, 0x00000000UL, 0x3ff00000UL,
+    0x980c4337UL, 0x3fc5f619UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x9314533eUL, 0xbfbb8ec5UL, 0x00000000UL, 0x00000000UL,
+    0x09aa36d0UL, 0x3fb6d3f4UL, 0x00000000UL, 0x00000000UL, 0xdcb427fdUL,
+    0xbfb13950UL, 0xd87ab0bbUL, 0xbfd5335eUL, 0xce0ae8a5UL, 0x3fabb382UL,
+    0x79143126UL, 0x3fddba41UL, 0x5f2b28d4UL, 0xbfa552f1UL, 0x59f21a6dUL,
+    0xbfd015abUL, 0x22c27d95UL, 0x3fa0e984UL, 0xe19fc6aaUL, 0x3fd0576cUL,
+    0x8f2c2950UL, 0xbf9a4898UL, 0xc0b3f22cUL, 0xbfc59462UL, 0x1883a4b8UL,
+    0x3f94b61cUL, 0x3f838640UL, 0x3fc30eb8UL, 0x355c63dcUL, 0xbfd36a08UL,
+    0x1dce993dUL, 0x3c6d704dUL, 0x00000000UL, 0x3ff00000UL, 0x2b82ab63UL,
+    0x3fb78e92UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
+    0x5a279ea3UL, 0xbfaa3407UL, 0x00000000UL, 0x00000000UL, 0x432d65faUL,
+    0x3fa70153UL, 0x00000000UL, 0x00000000UL, 0x891a4602UL, 0xbf9d03efUL,
+    0xd62ca5f8UL, 0xbfca77d9UL, 0xb35f4628UL, 0x3f97a265UL, 0x433258faUL,
+    0x3fd8cf51UL, 0xb58fd909UL, 0xbf8f88e3UL, 0x01771ceaUL, 0xbfc2b154UL,
+    0xf3562f8eUL, 0x3f888f57UL, 0xc028a723UL, 0x3fc7370fUL, 0x20b7f9f0UL,
+    0xbf80f44cUL, 0x214368e9UL, 0xbfb6dfaaUL, 0x28891863UL, 0x3f79b4b6UL,
+    0x172dbbf0UL, 0x3fb6cb8eUL, 0xe0553158UL, 0xbfc975f5UL, 0x593fe814UL,
+    0xbc2ef5d3UL, 0x00000000UL, 0x3ff00000UL, 0x03dec550UL, 0x3fa44203UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x4e435f9bUL,
+    0xbf953f83UL, 0x00000000UL, 0x00000000UL, 0x3c6e8e46UL, 0x3f9b74eaUL,
+    0x00000000UL, 0x00000000UL, 0xda5b7511UL, 0xbf85ad63UL, 0xdc230b9bUL,
+    0xbfb97558UL, 0x26cb3788UL, 0x3f881308UL, 0x76fc4985UL, 0x3fd62ac9UL,
+    0x77bb08baUL, 0xbf757c85UL, 0xb6247521UL, 0xbfb1381eUL, 0x5922170cUL,
+    0x3f754e95UL, 0x8746482dUL, 0x3fc27f83UL, 0x11055b30UL, 0xbf64e391UL,
+    0x3e666320UL, 0xbfa3e609UL, 0x0de9dae3UL, 0x3f6301dfUL, 0x1f1dca06UL,
+    0x3fafa8aeUL, 0x8c5b2da2UL, 0xbfb936bbUL, 0x4e88f7a5UL, 0xbc587d05UL,
+    0x00000000UL, 0x3ff00000UL, 0xa8935dd9UL, 0x3f83dde2UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x6dc9c883UL, 0x3fe45f30UL,
+    0x6dc9c883UL, 0x40245f30UL, 0x00000000UL, 0x43780000UL, 0x00000000UL,
+    0x43380000UL, 0x54444000UL, 0x3fb921fbUL, 0x54440000UL, 0x3fb921fbUL,
+    0x67674000UL, 0xbd32e7b9UL, 0x4c4c0000UL, 0x3d468c23UL, 0x3707344aUL,
+    0x3aa8a2e0UL, 0x03707345UL, 0x3ae98a2eUL, 0x00000000UL, 0x80000000UL,
+    0x00000000UL, 0x80000000UL, 0x676733afUL, 0x3d32e7b9UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x7ff00000UL, 0x00000000UL, 0x00000000UL, 0xfffc0000UL,
+    0xffffffffUL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x43600000UL,
+    0x00000000UL, 0x00000000UL, 0x00000000UL, 0x3c800000UL, 0x00000000UL,
+    0x00000000UL, 0x00000000UL, 0x3ca00000UL, 0x00000000UL, 0x00000000UL,
+    0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL, 0x00000000UL,
+    0x40300000UL, 0x00000000UL, 0x3ff00000UL
+};
+
+void MacroAssembler::fast_tan(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
+
+  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
+  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
+  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
+  Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
+
+  assert_different_registers(tmp, eax, ecx, edx);
+
+  address static_const_table_tan = (address)_static_const_table_tan;
+
+  bind(start);
+  subl(rsp, 120);
+  movl(Address(rsp, 56), tmp);
+  lea(tmp, ExternalAddress(static_const_table_tan));
+  movsd(xmm0, Address(rsp, 128));
+  pextrw(eax, xmm0, 3);
+  andl(eax, 32767);
+  subl(eax, 14368);
+  cmpl(eax, 2216);
+  jcc(Assembler::above, L_2TAG_PACKET_0_0_2);
+  movdqu(xmm5, Address(tmp, 5840));
+  movdqu(xmm6, Address(tmp, 5856));
+  unpcklpd(xmm0, xmm0);
+  movdqu(xmm4, Address(tmp, 5712));
+  andpd(xmm4, xmm0);
+  movdqu(xmm1, Address(tmp, 5632));
+  mulpd(xmm1, xmm0);
+  por(xmm5, xmm4);
+  addpd(xmm1, xmm5);
+  movdqu(xmm7, xmm1);
+  unpckhpd(xmm7, xmm7);
+  cvttsd2sil(edx, xmm7);
+  cvttpd2dq(xmm1, xmm1);
+  cvtdq2pd(xmm1, xmm1);
+  mulpd(xmm1, xmm6);
+  movdqu(xmm3, Address(tmp, 5664));
+  movsd(xmm5, Address(tmp, 5728));
+  addl(edx, 469248);
+  movdqu(xmm4, Address(tmp, 5680));
+  mulpd(xmm3, xmm1);
+  andl(edx, 31);
+  mulsd(xmm5, xmm1);
+  movl(ecx, edx);
+  mulpd(xmm4, xmm1);
+  shll(ecx, 1);
+  subpd(xmm0, xmm3);
+  mulpd(xmm1, Address(tmp, 5696));
+  addl(edx, ecx);
+  shll(ecx, 2);
+  addl(edx, ecx);
+  addsd(xmm5, xmm0);
+  movdqu(xmm2, xmm0);
+  subpd(xmm0, xmm4);
+  movsd(xmm6, Address(tmp, 5744));
+  shll(edx, 4);
+  lea(eax, Address(tmp, 0));
+  andpd(xmm5, Address(tmp, 5776));
+  movdqu(xmm3, xmm0);
+  addl(eax, edx);
+  subpd(xmm2, xmm0);
+  unpckhpd(xmm0, xmm0);
+  divsd(xmm6, xmm5);
+  subpd(xmm2, xmm4);
+  movdqu(xmm7, Address(eax, 16));
+  subsd(xmm3, xmm5);
+  mulpd(xmm7, xmm0);
+  subpd(xmm2, xmm1);
+  movdqu(xmm1, Address(eax, 48));
+  mulpd(xmm1, xmm0);
+  movdqu(xmm4, Address(eax, 96));
+  mulpd(xmm4, xmm0);
+  addsd(xmm2, xmm3);
+  movdqu(xmm3, xmm0);
+  mulpd(xmm0, xmm0);
+  addpd(xmm7, Address(eax, 0));
+  addpd(xmm1, Address(eax, 32));
+  mulpd(xmm1, xmm0);
+  addpd(xmm4, Address(eax, 80));
+  addpd(xmm7, xmm1);
+  movdqu(xmm1, Address(eax, 112));
+  mulpd(xmm1, xmm0);
+  mulpd(xmm0, xmm0);
+  addpd(xmm4, xmm1);
+  movdqu(xmm1, Address(eax, 64));
+  mulpd(xmm1, xmm0);
+  addpd(xmm7, xmm1);
+  movdqu(xmm1, xmm3);
+  mulpd(xmm3, xmm0);
+  mulsd(xmm0, xmm0);
+  mulpd(xmm1, Address(eax, 144));
+  mulpd(xmm4, xmm3);
+  movdqu(xmm3, xmm1);
+  addpd(xmm7, xmm4);
+  movdqu(xmm4, xmm1);
+  mulsd(xmm0, xmm7);
+  unpckhpd(xmm7, xmm7);
+  addsd(xmm0, xmm7);
+  unpckhpd(xmm1, xmm1);
+  addsd(xmm3, xmm1);
+  subsd(xmm4, xmm3);
+  addsd(xmm1, xmm4);
+  movdqu(xmm4, xmm2);
+  movsd(xmm7, Address(eax, 144));
+  unpckhpd(xmm2, xmm2);
+  addsd(xmm7, Address(eax, 152));
+  mulsd(xmm7, xmm2);
+  addsd(xmm7, Address(eax, 136));
+  addsd(xmm7, xmm1);
+  addsd(xmm0, xmm7);
+  movsd(xmm7, Address(tmp, 5744));
+  mulsd(xmm4, xmm6);
+  movsd(xmm2, Address(eax, 168));
+  andpd(xmm2, xmm6);
+  mulsd(xmm5, xmm2);
+  mulsd(xmm6, Address(eax, 160));
+  subsd(xmm7, xmm5);
+  subsd(xmm2, Address(eax, 128));
+  subsd(xmm7, xmm4);
+  mulsd(xmm7, xmm6);
+  movdqu(xmm4, xmm3);
+  subsd(xmm3, xmm2);
+  addsd(xmm2, xmm3);
+  subsd(xmm4, xmm2);
+  addsd(xmm0, xmm4);
+  subsd(xmm0, xmm7);
+  addsd(xmm0, xmm3);
+  movsd(Address(rsp, 0), xmm0);
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_0_0_2);
+  jcc(Assembler::greater, L_2TAG_PACKET_2_0_2);
+  shrl(eax, 4);
+  cmpl(eax, 268434558);
+  jcc(Assembler::notEqual, L_2TAG_PACKET_3_0_2);
+  movdqu(xmm3, xmm0);
+  mulsd(xmm3, Address(tmp, 5808));
+
+  bind(L_2TAG_PACKET_3_0_2);
+  movsd(xmm3, Address(tmp, 5792));
+  mulsd(xmm3, xmm0);
+  addsd(xmm3, xmm0);
+  mulsd(xmm3, Address(tmp, 5808));
+  movsd(Address(rsp, 0), xmm3);
+  fld_d(Address(rsp, 0));
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_2_0_2);
+  movq(xmm7, Address(tmp, 5712));
+  andpd(xmm7, xmm0);
+  xorpd(xmm7, xmm0);
+  ucomisd(xmm7, Address(tmp, 5760));
+  jcc(Assembler::equal, L_2TAG_PACKET_4_0_2);
+  subl(rsp, 32);
+  movsd(Address(rsp, 0), xmm0);
+  lea(eax, Address(rsp, 40));
+  movl(Address(rsp, 8), eax);
+  movl(eax, 2);
+  movl(Address(rsp, 12), eax);
+  call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_tan_cot_huge())));
+  addl(rsp, 32);
+  fld_d(Address(rsp, 8));
+  jmp(L_2TAG_PACKET_1_0_2);
+
+  bind(L_2TAG_PACKET_4_0_2);
+  movq(Address(rsp, 0), xmm0);
+  fld_d(Address(rsp, 0));
+  fsub_d(Address(rsp, 0));
+
+  bind(L_2TAG_PACKET_1_0_2);
+  movl(tmp, Address(rsp, 56));
+}
+#endif
--- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2092,25 +2092,6 @@
                                entry_checkcast_arraycopy);
   }
 
-  void generate_math_stubs() {
-    {
-      StubCodeMark mark(this, "StubRoutines", "log10");
-      StubRoutines::_intrinsic_log10 = (double (*)(double)) __ pc();
-
-      __ fld_d(Address(rsp, 4));
-      __ flog10();
-      __ ret(0);
-    }
-    {
-      StubCodeMark mark(this, "StubRoutines", "tan");
-      StubRoutines::_intrinsic_tan = (double (*)(double)) __ pc();
-
-      __ fld_d(Address(rsp, 4));
-      __ trigfunc('t');
-      __ ret(0);
-    }
-  }
-
   // AES intrinsic stubs
   enum {AESBlockSize = 16};
 
@@ -3533,6 +3514,31 @@
 
  }
 
+ address generate_libmLog10() {
+   address start = __ pc();
+
+   const XMMRegister x0 = xmm0;
+   const XMMRegister x1 = xmm1;
+   const XMMRegister x2 = xmm2;
+   const XMMRegister x3 = xmm3;
+
+   const XMMRegister x4 = xmm4;
+   const XMMRegister x5 = xmm5;
+   const XMMRegister x6 = xmm6;
+   const XMMRegister x7 = xmm7;
+
+   const Register tmp = rbx;
+
+   BLOCK_COMMENT("Entry:");
+   __ enter(); // required for proper stackwalking of RuntimeStub frame
+   __ fast_log10(x0, x1, x2, x3, x4, x5, x6, x7, rax, rcx, rdx, tmp);
+   __ leave(); // required for proper stackwalking of RuntimeStub frame
+   __ ret(0);
+
+   return start;
+
+ }
+
  address generate_libmPow() {
    address start = __ pc();
 
@@ -3629,6 +3635,44 @@
 
  }
 
+ address generate_libm_tan_cot_huge() {
+   address start = __ pc();
+
+   const XMMRegister x0 = xmm0;
+   const XMMRegister x1 = xmm1;
+
+   BLOCK_COMMENT("Entry:");
+   __ libm_tancot_huge(x0, x1, rax, rcx, rdx, rbx, rsi, rdi, rbp, rsp);
+
+   return start;
+
+ }
+
+ address generate_libmTan() {
+   address start = __ pc();
+
+   const XMMRegister x0 = xmm0;
+   const XMMRegister x1 = xmm1;
+   const XMMRegister x2 = xmm2;
+   const XMMRegister x3 = xmm3;
+
+   const XMMRegister x4 = xmm4;
+   const XMMRegister x5 = xmm5;
+   const XMMRegister x6 = xmm6;
+   const XMMRegister x7 = xmm7;
+
+   const Register tmp = rbx;
+
+   BLOCK_COMMENT("Entry:");
+   __ enter(); // required for proper stackwalking of RuntimeStub frame
+   __ fast_tan(x0, x1, x2, x3, x4, x5, x6, x7, rax, rcx, rdx, tmp);
+   __ leave(); // required for proper stackwalking of RuntimeStub frame
+   __ ret(0);
+
+   return start;
+
+ }
+
   // Safefetch stubs.
   void generate_safefetch(const char* name, int size, address* entry,
                           address* fault_pc, address* continuation_pc) {
@@ -3852,24 +3896,25 @@
       StubRoutines::_crc32c_table_addr = (address)StubRoutines::x86::_crc32c_table;
       StubRoutines::_updateBytesCRC32C = generate_updateBytesCRC32C(supports_clmul);
     }
-    if (VM_Version::supports_sse2()) {
+    if (VM_Version::supports_sse2() && UseLibmIntrinsic) {
+      StubRoutines::x86::_L_2il0floatpacket_0_adr = (address)StubRoutines::x86::_L_2il0floatpacket_0;
+      StubRoutines::x86::_Pi4Inv_adr = (address)StubRoutines::x86::_Pi4Inv;
+      StubRoutines::x86::_Pi4x3_adr = (address)StubRoutines::x86::_Pi4x3;
+      StubRoutines::x86::_Pi4x4_adr = (address)StubRoutines::x86::_Pi4x4;
+      StubRoutines::x86::_ones_adr = (address)StubRoutines::x86::_ones;
       StubRoutines::_dexp = generate_libmExp();
       StubRoutines::_dlog = generate_libmLog();
+      StubRoutines::_dlog10 = generate_libmLog10();
       StubRoutines::_dpow = generate_libmPow();
-      if (UseLibmSinIntrinsic || UseLibmCosIntrinsic) {
-        StubRoutines::_dlibm_reduce_pi04l = generate_libm_reduce_pi04l();
-        StubRoutines::_dlibm_sin_cos_huge = generate_libm_sin_cos_huge();
-      }
-      if (UseLibmSinIntrinsic) {
-        StubRoutines::_dsin = generate_libmSin();
-      }
-      if (UseLibmCosIntrinsic) {
-        StubRoutines::_dcos = generate_libmCos();
-      }
+      StubRoutines::_dlibm_reduce_pi04l = generate_libm_reduce_pi04l();
+      StubRoutines::_dlibm_sin_cos_huge = generate_libm_sin_cos_huge();
+      StubRoutines::_dsin = generate_libmSin();
+      StubRoutines::_dcos = generate_libmCos();
+      StubRoutines::_dlibm_tan_cot_huge = generate_libm_tan_cot_huge();
+      StubRoutines::_dtan = generate_libmTan();
     }
   }
 
-
   void generate_all() {
     // Generates all stubs and initializes the entry points
 
@@ -3888,8 +3933,6 @@
     // arraycopy stubs used by compilers
     generate_arraycopy_stubs();
 
-    generate_math_stubs();
-
     // don't bother generating these AES intrinsic stubs unless global flag is set
     if (UseAESIntrinsics) {
       StubRoutines::x86::_key_shuffle_mask_addr = generate_key_shuffle_mask();  // might be needed by the others
--- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2971,35 +2971,6 @@
     StubRoutines::_arrayof_oop_arraycopy_uninit             = StubRoutines::_oop_arraycopy_uninit;
   }
 
-  void generate_math_stubs() {
-    {
-      StubCodeMark mark(this, "StubRoutines", "log10");
-      StubRoutines::_intrinsic_log10 = (double (*)(double)) __ pc();
-
-      __ subq(rsp, 8);
-      __ movdbl(Address(rsp, 0), xmm0);
-      __ fld_d(Address(rsp, 0));
-      __ flog10();
-      __ fstp_d(Address(rsp, 0));
-      __ movdbl(xmm0, Address(rsp, 0));
-      __ addq(rsp, 8);
-      __ ret(0);
-    }
-    {
-      StubCodeMark mark(this, "StubRoutines", "tan");
-      StubRoutines::_intrinsic_tan = (double (*)(double)) __ pc();
-
-      __ subq(rsp, 8);
-      __ movdbl(Address(rsp, 0), xmm0);
-      __ fld_d(Address(rsp, 0));
-      __ trigfunc('t');
-      __ fstp_d(Address(rsp, 0));
-      __ movdbl(xmm0, Address(rsp, 0));
-      __ addq(rsp, 8);
-      __ ret(0);
-    }
-  }
-
   // AES intrinsic stubs
   enum {AESBlockSize = 16};
 
@@ -4744,6 +4715,46 @@
 
   }
 
+  address generate_libmLog10() {
+    address start = __ pc();
+
+    const XMMRegister x0 = xmm0;
+    const XMMRegister x1 = xmm1;
+    const XMMRegister x2 = xmm2;
+    const XMMRegister x3 = xmm3;
+
+    const XMMRegister x4 = xmm4;
+    const XMMRegister x5 = xmm5;
+    const XMMRegister x6 = xmm6;
+    const XMMRegister x7 = xmm7;
+
+    const Register tmp = r11;
+
+    BLOCK_COMMENT("Entry:");
+    __ enter(); // required for proper stackwalking of RuntimeStub frame
+
+#ifdef _WIN64
+    // save the xmm registers which must be preserved 6-7
+    __ subptr(rsp, 4 * wordSize);
+    __ movdqu(Address(rsp, 0), xmm6);
+    __ movdqu(Address(rsp, 2 * wordSize), xmm7);
+#endif
+    __ fast_log10(x0, x1, x2, x3, x4, x5, x6, x7, rax, rcx, rdx, tmp);
+
+#ifdef _WIN64
+    // restore xmm regs belonging to calling function
+    __ movdqu(xmm6, Address(rsp, 0));
+    __ movdqu(xmm7, Address(rsp, 2 * wordSize));
+    __ addptr(rsp, 4 * wordSize);
+#endif
+
+    __ leave(); // required for proper stackwalking of RuntimeStub frame
+    __ ret(0);
+
+    return start;
+
+  }
+
   address generate_libmPow() {
     address start = __ pc();
 
@@ -4809,6 +4820,8 @@
     __ enter(); // required for proper stackwalking of RuntimeStub frame
 
 #ifdef _WIN64
+    __ push(rsi);
+    __ push(rdi);
     // save the xmm registers which must be preserved 6-7
     __ subptr(rsp, 4 * wordSize);
     __ movdqu(Address(rsp, 0), xmm6);
@@ -4821,6 +4834,8 @@
     __ movdqu(xmm6, Address(rsp, 0));
     __ movdqu(xmm7, Address(rsp, 2 * wordSize));
     __ addptr(rsp, 4 * wordSize);
+    __ pop(rdi);
+    __ pop(rsi);
 #endif
 
     __ leave(); // required for proper stackwalking of RuntimeStub frame
@@ -4852,6 +4867,8 @@
     __ enter(); // required for proper stackwalking of RuntimeStub frame
 
 #ifdef _WIN64
+    __ push(rsi);
+    __ push(rdi);
     // save the xmm registers which must be preserved 6-7
     __ subptr(rsp, 4 * wordSize);
     __ movdqu(Address(rsp, 0), xmm6);
@@ -4864,6 +4881,55 @@
     __ movdqu(xmm6, Address(rsp, 0));
     __ movdqu(xmm7, Address(rsp, 2 * wordSize));
     __ addptr(rsp, 4 * wordSize);
+    __ pop(rdi);
+    __ pop(rsi);
+#endif
+
+    __ leave(); // required for proper stackwalking of RuntimeStub frame
+    __ ret(0);
+
+    return start;
+
+  }
+
+  address generate_libmTan() {
+    address start = __ pc();
+
+    const XMMRegister x0 = xmm0;
+    const XMMRegister x1 = xmm1;
+    const XMMRegister x2 = xmm2;
+    const XMMRegister x3 = xmm3;
+
+    const XMMRegister x4 = xmm4;
+    const XMMRegister x5 = xmm5;
+    const XMMRegister x6 = xmm6;
+    const XMMRegister x7 = xmm7;
+
+    const Register tmp1 = r8;
+    const Register tmp2 = r9;
+    const Register tmp3 = r10;
+    const Register tmp4 = r11;
+
+    BLOCK_COMMENT("Entry:");
+    __ enter(); // required for proper stackwalking of RuntimeStub frame
+
+#ifdef _WIN64
+    __ push(rsi);
+    __ push(rdi);
+    // save the xmm registers which must be preserved 6-7
+    __ subptr(rsp, 4 * wordSize);
+    __ movdqu(Address(rsp, 0), xmm6);
+    __ movdqu(Address(rsp, 2 * wordSize), xmm7);
+#endif
+    __ fast_tan(x0, x1, x2, x3, x4, x5, x6, x7, rax, rcx, rdx, tmp1, tmp2, tmp3, tmp4);
+
+#ifdef _WIN64
+    // restore xmm regs belonging to calling function
+    __ movdqu(xmm6, Address(rsp, 0));
+    __ movdqu(xmm7, Address(rsp, 2 * wordSize));
+    __ addptr(rsp, 4 * wordSize);
+    __ pop(rdi);
+    __ pop(rsi);
 #endif
 
     __ leave(); // required for proper stackwalking of RuntimeStub frame
@@ -5064,16 +5130,28 @@
       StubRoutines::_crc32c_table_addr = (address)StubRoutines::x86::_crc32c_table;
       StubRoutines::_updateBytesCRC32C = generate_updateBytesCRC32C(supports_clmul);
     }
-    if (VM_Version::supports_sse2()) {
+    if (VM_Version::supports_sse2() && UseLibmIntrinsic) {
+      StubRoutines::x86::_ONEHALF_adr = (address)StubRoutines::x86::_ONEHALF;
+      StubRoutines::x86::_P_2_adr = (address)StubRoutines::x86::_P_2;
+      StubRoutines::x86::_SC_4_adr = (address)StubRoutines::x86::_SC_4;
+      StubRoutines::x86::_Ctable_adr = (address)StubRoutines::x86::_Ctable;
+      StubRoutines::x86::_SC_2_adr = (address)StubRoutines::x86::_SC_2;
+      StubRoutines::x86::_SC_3_adr = (address)StubRoutines::x86::_SC_3;
+      StubRoutines::x86::_SC_1_adr = (address)StubRoutines::x86::_SC_1;
+      StubRoutines::x86::_PI_INV_TABLE_adr = (address)StubRoutines::x86::_PI_INV_TABLE;
+      StubRoutines::x86::_PI_4_adr = (address)StubRoutines::x86::_PI_4;
+      StubRoutines::x86::_PI32INV_adr = (address)StubRoutines::x86::_PI32INV;
+      StubRoutines::x86::_SIGN_MASK_adr = (address)StubRoutines::x86::_SIGN_MASK;
+      StubRoutines::x86::_P_1_adr = (address)StubRoutines::x86::_P_1;
+      StubRoutines::x86::_P_3_adr = (address)StubRoutines::x86::_P_3;
+      StubRoutines::x86::_NEG_ZERO_adr = (address)StubRoutines::x86::_NEG_ZERO;
       StubRoutines::_dexp = generate_libmExp();
       StubRoutines::_dlog = generate_libmLog();
+      StubRoutines::_dlog10 = generate_libmLog10();
       StubRoutines::_dpow = generate_libmPow();
-      if (UseLibmSinIntrinsic) {
-        StubRoutines::_dsin = generate_libmSin();
-      }
-      if (UseLibmCosIntrinsic) {
-        StubRoutines::_dcos = generate_libmCos();
-      }
+      StubRoutines::_dtan = generate_libmTan();
+      StubRoutines::_dsin = generate_libmSin();
+      StubRoutines::_dcos = generate_libmCos();
     }
   }
 
@@ -5118,8 +5196,6 @@
     // arraycopy stubs used by compilers
     generate_arraycopy_stubs();
 
-    generate_math_stubs();
-
     // don't bother generating these AES intrinsic stubs unless global flag is set
     if (UseAESIntrinsics) {
       StubRoutines::x86::_key_shuffle_mask_addr = generate_key_shuffle_mask();  // needed by the others
--- a/hotspot/src/cpu/x86/vm/stubRoutines_x86.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/stubRoutines_x86.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -48,6 +48,29 @@
 address StubRoutines::x86::_k256_adr = NULL;
 address StubRoutines::x86::_pshuffle_byte_flip_mask_addr = NULL;
 
+//tables common for sin and cos
+address StubRoutines::x86::_ONEHALF_adr = NULL;
+address StubRoutines::x86::_P_2_adr = NULL;
+address StubRoutines::x86::_SC_4_adr = NULL;
+address StubRoutines::x86::_Ctable_adr = NULL;
+address StubRoutines::x86::_SC_2_adr = NULL;
+address StubRoutines::x86::_SC_3_adr = NULL;
+address StubRoutines::x86::_SC_1_adr = NULL;
+address StubRoutines::x86::_PI_INV_TABLE_adr = NULL;
+address StubRoutines::x86::_PI_4_adr = NULL;
+address StubRoutines::x86::_PI32INV_adr = NULL;
+address StubRoutines::x86::_SIGN_MASK_adr = NULL;
+address StubRoutines::x86::_P_1_adr = NULL;
+address StubRoutines::x86::_P_3_adr = NULL;
+address StubRoutines::x86::_NEG_ZERO_adr = NULL;
+
+//tables common for sincos and tancot
+address StubRoutines::x86::_L_2il0floatpacket_0_adr = NULL;
+address StubRoutines::x86::_Pi4Inv_adr = NULL;
+address StubRoutines::x86::_Pi4x3_adr = NULL;
+address StubRoutines::x86::_Pi4x4_adr = NULL;
+address StubRoutines::x86::_ones_adr = NULL;
+
 uint64_t StubRoutines::x86::_crc_by128_masks[] =
 {
   /* The fields in this structure are arranged so that they can be
--- a/hotspot/src/cpu/x86/vm/stubRoutines_x86.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/stubRoutines_x86.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -57,6 +57,48 @@
   // byte flip mask for sha256
   static address _pshuffle_byte_flip_mask_addr;
 
+  //tables common for LIBM sin and cos
+  static juint _ONEHALF[];
+  static address _ONEHALF_adr;
+  static juint _P_2[];
+  static address _P_2_adr;
+  static juint _SC_4[];
+  static address _SC_4_adr;
+  static juint _Ctable[];
+  static address _Ctable_adr;
+  static juint _SC_2[];
+  static address _SC_2_adr;
+  static juint _SC_3[];
+  static address _SC_3_adr;
+  static juint _SC_1[];
+  static address _SC_1_adr;
+  static juint _PI_INV_TABLE[];
+  static address _PI_INV_TABLE_adr;
+  static juint _PI_4[];
+  static address _PI_4_adr;
+  static juint _PI32INV[];
+  static address _PI32INV_adr;
+  static juint _SIGN_MASK[];
+  static address _SIGN_MASK_adr;
+  static juint _P_1[];
+  static address _P_1_adr;
+  static juint _P_3[];
+  static address _P_3_adr;
+  static juint _NEG_ZERO[];
+  static address _NEG_ZERO_adr;
+
+  //tables common for LIBM sincos and tancot
+  static juint _L_2il0floatpacket_0[];
+  static address _L_2il0floatpacket_0_adr;
+  static juint _Pi4Inv[];
+  static address _Pi4Inv_adr;
+  static juint _Pi4x3[];
+  static address _Pi4x3_adr;
+  static juint _Pi4x4[];
+  static address _Pi4x4_adr;
+  static juint _ones[];
+  static address _ones_adr;
+
  public:
   static address verify_mxcsr_entry()    { return _verify_mxcsr_entry; }
   static address key_shuffle_mask_addr() { return _key_shuffle_mask_addr; }
@@ -69,4 +111,24 @@
   static address k256_addr()      { return _k256_adr; }
   static address pshuffle_byte_flip_mask_addr() { return _pshuffle_byte_flip_mask_addr; }
   static void generate_CRC32C_table(bool is_pclmulqdq_supported);
+  static address _ONEHALF_addr()      { return _ONEHALF_adr; }
+  static address _P_2_addr()      { return _P_2_adr; }
+  static address _SC_4_addr()      { return _SC_4_adr; }
+  static address _Ctable_addr()      { return _Ctable_adr; }
+  static address _SC_2_addr()      { return _SC_2_adr; }
+  static address _SC_3_addr()      { return _SC_3_adr; }
+  static address _SC_1_addr()      { return _SC_1_adr; }
+  static address _PI_INV_TABLE_addr()      { return _PI_INV_TABLE_adr; }
+  static address _PI_4_addr()      { return _PI_4_adr; }
+  static address _PI32INV_addr()      { return _PI32INV_adr; }
+  static address _SIGN_MASK_addr()      { return _SIGN_MASK_adr; }
+  static address _P_1_addr()      { return _P_1_adr; }
+  static address _P_3_addr()      { return _P_3_adr; }
+  static address _NEG_ZERO_addr()      { return _NEG_ZERO_adr; }
+  static address _L_2il0floatpacket_0_addr()      { return _L_2il0floatpacket_0_adr; }
+  static address _Pi4Inv_addr()      { return _Pi4Inv_adr; }
+  static address _Pi4x3_addr()      { return _Pi4x3_adr; }
+  static address _Pi4x4_addr()      { return _Pi4x4_adr; }
+  static address _ones_addr()      { return _ones_adr; }
+
 #endif // CPU_X86_VM_STUBROUTINES_X86_32_HPP
--- a/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -608,18 +608,13 @@
 
   // get synchronization object
   {
-    const int mirror_offset = in_bytes(Klass::java_mirror_offset());
     Label done;
     __ movl(rax, access_flags);
     __ testl(rax, JVM_ACC_STATIC);
     // get receiver (assume this is frequent case)
     __ movptr(rax, Address(rlocals, Interpreter::local_offset_in_bytes(0)));
     __ jcc(Assembler::zero, done);
-    __ movptr(rax, Address(rbx, Method::const_offset()));
-    __ movptr(rax, Address(rax, ConstMethod::constants_offset()));
-    __ movptr(rax, Address(rax,
-                           ConstantPool::pool_holder_offset_in_bytes()));
-    __ movptr(rax, Address(rax, mirror_offset));
+    __ load_mirror(rax, rbx);
 
 #ifdef ASSERT
     {
@@ -662,6 +657,9 @@
   __ movptr(rbcp, Address(rbx, Method::const_offset()));      // get ConstMethod*
   __ lea(rbcp, Address(rbcp, ConstMethod::codes_offset())); // get codebase
   __ push(rbx);        // save Method*
+  // Get mirror and store it in the frame as GC root for this Method*
+  __ load_mirror(rdx, rbx);
+  __ push(rdx);
   if (ProfileInterpreter) {
     Label method_data_continue;
     __ movptr(rdx, Address(rbx, in_bytes(Method::method_data_offset())));
@@ -999,15 +997,11 @@
   // pass mirror handle if static call
   {
     Label L;
-    const int mirror_offset = in_bytes(Klass::java_mirror_offset());
     __ movl(t, Address(method, Method::access_flags_offset()));
     __ testl(t, JVM_ACC_STATIC);
     __ jcc(Assembler::zero, L);
     // get mirror
-    __ movptr(t, Address(method, Method::const_offset()));
-    __ movptr(t, Address(t, ConstMethod::constants_offset()));
-    __ movptr(t, Address(t, ConstantPool::pool_holder_offset_in_bytes()));
-    __ movptr(t, Address(t, mirror_offset));
+    __ load_mirror(t, method);
     // copy mirror into activation frame
     __ movptr(Address(rbp, frame::interpreter_frame_oop_temp_offset * wordSize),
             t);
--- a/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86_32.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86_32.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -345,13 +345,34 @@
   __ fld_d(Address(rsp, 1*wordSize));
   switch (kind) {
     case Interpreter::java_lang_math_sin :
-        __ trigfunc('s');
+        __ subptr(rsp, 2 * wordSize);
+        __ fstp_d(Address(rsp, 0));
+        if (VM_Version::supports_sse2() && StubRoutines::dsin() != NULL) {
+          __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dsin())));
+        } else {
+          __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dsin)));
+        }
+        __ addptr(rsp, 2 * wordSize);
         break;
     case Interpreter::java_lang_math_cos :
-        __ trigfunc('c');
+        __ subptr(rsp, 2 * wordSize);
+        __ fstp_d(Address(rsp, 0));
+        if (VM_Version::supports_sse2() && StubRoutines::dcos() != NULL) {
+          __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dcos())));
+        } else {
+          __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dcos)));
+        }
+        __ addptr(rsp, 2 * wordSize);
         break;
     case Interpreter::java_lang_math_tan :
-        __ trigfunc('t');
+        __ subptr(rsp, 2 * wordSize);
+        __ fstp_d(Address(rsp, 0));
+        if (StubRoutines::dtan() != NULL) {
+          __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dtan())));
+        } else {
+          __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dtan)));
+        }
+        __ addptr(rsp, 2 * wordSize);
         break;
     case Interpreter::java_lang_math_sqrt:
         __ fsqrt();
@@ -362,26 +383,29 @@
     case Interpreter::java_lang_math_log:
         __ subptr(rsp, 2 * wordSize);
         __ fstp_d(Address(rsp, 0));
-        if (VM_Version::supports_sse2()) {
+        if (StubRoutines::dlog() != NULL) {
           __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlog())));
-        }
-        else {
+        } else {
           __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dlog)));
         }
         __ addptr(rsp, 2 * wordSize);
         break;
     case Interpreter::java_lang_math_log10:
-        __ flog10();
-        // Store to stack to convert 80bit precision back to 64bits
-        __ push_fTOS();
-        __ pop_fTOS();
+        __ subptr(rsp, 2 * wordSize);
+        __ fstp_d(Address(rsp, 0));
+        if (StubRoutines::dlog10() != NULL) {
+          __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlog10())));
+        } else {
+          __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dlog10)));
+        }
+        __ addptr(rsp, 2 * wordSize);
         break;
     case Interpreter::java_lang_math_pow:
       __ fld_d(Address(rsp, 3*wordSize)); // second argument
       __ subptr(rsp, 4 * wordSize);
       __ fstp_d(Address(rsp, 0));
       __ fstp_d(Address(rsp, 2 * wordSize));
-      if (VM_Version::supports_sse2()) {
+      if (StubRoutines::dpow() != NULL) {
         __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dpow())));
       } else {
         __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dpow)));
@@ -391,7 +415,7 @@
     case Interpreter::java_lang_math_exp:
       __ subptr(rsp, 2*wordSize);
       __ fstp_d(Address(rsp, 0));
-      if (VM_Version::supports_sse2()) {
+      if (StubRoutines::dexp() != NULL) {
         __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dexp())));
       } else {
         __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dexp)));
--- a/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86_64.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86_64.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -29,6 +29,7 @@
 #include "interpreter/interpreterRuntime.hpp"
 #include "interpreter/templateInterpreterGenerator.hpp"
 #include "runtime/arguments.hpp"
+#include "runtime/sharedRuntime.hpp"
 
 #define __ _masm->
 
@@ -373,32 +374,60 @@
     __ sqrtsd(xmm0, Address(rsp, wordSize));
   } else if (kind == Interpreter::java_lang_math_exp) {
     __ movdbl(xmm0, Address(rsp, wordSize));
-    __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dexp())));
+    if (StubRoutines::dexp() != NULL) {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dexp())));
+    } else {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dexp)));
+    }
   } else if (kind == Interpreter::java_lang_math_log) {
     __ movdbl(xmm0, Address(rsp, wordSize));
-    __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlog())));
+    if (StubRoutines::dlog() != NULL) {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlog())));
+    } else {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dlog)));
+    }
+  } else if (kind == Interpreter::java_lang_math_log10) {
+    __ movdbl(xmm0, Address(rsp, wordSize));
+    if (StubRoutines::dlog10() != NULL) {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlog10())));
+    } else {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dlog10)));
+    }
+  } else if (kind == Interpreter::java_lang_math_sin) {
+    __ movdbl(xmm0, Address(rsp, wordSize));
+    if (StubRoutines::dsin() != NULL) {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dsin())));
+    } else {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dsin)));
+    }
+  } else if (kind == Interpreter::java_lang_math_cos) {
+    __ movdbl(xmm0, Address(rsp, wordSize));
+    if (StubRoutines::dcos() != NULL) {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dcos())));
+    } else {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dcos)));
+    }
   } else if (kind == Interpreter::java_lang_math_pow) {
     __ movdbl(xmm1, Address(rsp, wordSize));
     __ movdbl(xmm0, Address(rsp, 3 * wordSize));
-    __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dpow())));
+    if (StubRoutines::dpow() != NULL) {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dpow())));
+    } else {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dpow)));
+    }
+  } else if (kind == Interpreter::java_lang_math_tan) {
+    __ movdbl(xmm0, Address(rsp, wordSize));
+    if (StubRoutines::dtan() != NULL) {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dtan())));
+    } else {
+      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dtan)));
+    }
   } else {
     __ fld_d(Address(rsp, wordSize));
     switch (kind) {
-      case Interpreter::java_lang_math_sin :
-          __ trigfunc('s');
-          break;
-      case Interpreter::java_lang_math_cos :
-          __ trigfunc('c');
-          break;
-      case Interpreter::java_lang_math_tan :
-          __ trigfunc('t');
-          break;
       case Interpreter::java_lang_math_abs:
           __ fabs();
           break;
-      case Interpreter::java_lang_math_log10:
-          __ flog10();
-          break;
       default                              :
           ShouldNotReachHere();
     }
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -844,6 +844,11 @@
   static uint32_t get_xsave_header_upper_segment() {
     return _cpuid_info.xem_xcr0_edx;
   }
+
+  // SSE2 and later processors implement a 'pause' instruction
+  // that can be used for efficient implementation of
+  // the intrinsic for java.lang.Thread.onSpinWait()
+  static bool supports_on_spin_wait() { return supports_sse2(); }
 };
 
 #endif // CPU_X86_VM_VM_VERSION_X86_HPP
--- a/hotspot/src/cpu/x86/vm/x86.ad	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/x86.ad	Thu Apr 28 14:44:52 2016 -0700
@@ -1719,6 +1719,10 @@
       if (!(UseSSE > 4))
         ret_value = false;
       break;
+    case Op_OnSpinWait:
+      if (VM_Version::supports_on_spin_wait() == false)
+        ret_value = false;
+      break;
   }
 
   return ret_value;  // Per default match rules are supported.
@@ -1754,6 +1758,15 @@
   return ret_value;  // Per default match rules are supported.
 }
 
+const bool Matcher::has_predicated_vectors(void) {
+  bool ret_value = false;
+  if (UseAVX > 2) {
+    ret_value = VM_Version::supports_avx512vl();
+  }
+
+  return ret_value;
+}
+
 const int Matcher::float_pressure(int default_pressure_threshold) {
   int float_pressure_threshold = default_pressure_threshold;
 #ifdef _LP64
@@ -1871,7 +1884,7 @@
       __ vmovdqu(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[src_lo]));
       break;
     case Op_VecZ:
-      __ evmovdqul(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[src_lo]), 2);
+      __ evmovdquq(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[src_lo]), 2);
       break;
     default:
       ShouldNotReachHere();
@@ -1926,7 +1939,7 @@
         __ vmovdqu(as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset));
         break;
       case Op_VecZ:
-        __ evmovdqul(as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset), 2);
+        __ evmovdquq(as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset), 2);
         break;
       default:
         ShouldNotReachHere();
@@ -1946,7 +1959,7 @@
         __ vmovdqu(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]));
         break;
       case Op_VecZ:
-        __ evmovdqul(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]), 2);
+        __ evmovdquq(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]), 2);
         break;
       default:
         ShouldNotReachHere();
@@ -2172,6 +2185,19 @@
   ins_pipe(pipe_slow);
 %}
 
+// =================================EVEX special===============================
+
+instruct setMask(rRegI dst, rRegI src) %{
+  predicate(Matcher::has_predicated_vectors());
+  match(Set dst (SetVectMaskI  src));
+  effect(TEMP dst);
+  format %{ "setvectmask   $dst, $src" %}
+  ins_encode %{
+    __ setvectmask($dst$$Register, $src$$Register);
+  %}
+  ins_pipe(pipe_slow);
+%}
+
 // ============================================================================
 
 instruct addF_reg(regF dst, regF src) %{
@@ -2996,6 +3022,24 @@
   ins_pipe(pipe_slow);
 %}
 
+instruct onspinwait() %{
+  match(OnSpinWait);
+  ins_cost(200);
+
+  format %{
+    $$template
+    if (os::is_MP()) {
+      $$emit$$"pause\t! membar_onspinwait"
+    } else {
+      $$emit$$"MEMBAR-onspinwait ! (empty encoding)"
+    }
+  %}
+  ins_encode %{
+    __ pause();
+  %}
+  ins_pipe(pipe_slow);
+%}
+
 // ====================VECTOR INSTRUCTIONS=====================================
 
 // Load vectors (4 bytes long)
@@ -3047,11 +3091,11 @@
 %}
 
 // Load vectors (64 bytes long)
-instruct loadV64(vecZ dst, memory mem) %{
-  predicate(n->as_LoadVector()->memory_size() == 64);
+instruct loadV64_dword(vecZ dst, memory mem) %{
+  predicate(n->as_LoadVector()->memory_size() == 64 && n->as_LoadVector()->element_size() <= 4);
   match(Set dst (LoadVector mem));
   ins_cost(125);
-  format %{ "vmovdqu $dst k0,$mem\t! load vector (64 bytes)" %}
+  format %{ "vmovdqul $dst k0,$mem\t! load vector (64 bytes)" %}
   ins_encode %{
     int vector_len = 2;
     __ evmovdqul($dst$$XMMRegister, $mem$$Address, vector_len);
@@ -3059,6 +3103,19 @@
   ins_pipe( pipe_slow );
 %}
 
+// Load vectors (64 bytes long)
+instruct loadV64_qword(vecZ dst, memory mem) %{
+  predicate(n->as_LoadVector()->memory_size() == 64 && n->as_LoadVector()->element_size() > 4);
+  match(Set dst (LoadVector mem));
+  ins_cost(125);
+  format %{ "vmovdquq $dst k0,$mem\t! load vector (64 bytes)" %}
+  ins_encode %{
+    int vector_len = 2;
+    __ evmovdquq($dst$$XMMRegister, $mem$$Address, vector_len);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
 // Store vectors
 instruct storeV4(memory mem, vecS src) %{
   predicate(n->as_StoreVector()->memory_size() == 4);
@@ -3104,11 +3161,11 @@
   ins_pipe( pipe_slow );
 %}
 
-instruct storeV64(memory mem, vecZ src) %{
-  predicate(n->as_StoreVector()->memory_size() == 64);
+instruct storeV64_dword(memory mem, vecZ src) %{
+  predicate(n->as_StoreVector()->memory_size() == 64 && n->as_StoreVector()->element_size() <= 4);
   match(Set mem (StoreVector mem src));
   ins_cost(145);
-  format %{ "vmovdqu $mem k0,$src\t! store vector (64 bytes)" %}
+  format %{ "vmovdqul $mem k0,$src\t! store vector (64 bytes)" %}
   ins_encode %{
     int vector_len = 2;
     __ evmovdqul($mem$$Address, $src$$XMMRegister, vector_len);
@@ -3116,6 +3173,18 @@
   ins_pipe( pipe_slow );
 %}
 
+instruct storeV64_qword(memory mem, vecZ src) %{
+  predicate(n->as_StoreVector()->memory_size() == 64 && n->as_StoreVector()->element_size() > 4);
+  match(Set mem (StoreVector mem src));
+  ins_cost(145);
+  format %{ "vmovdquq $mem k0,$src\t! store vector (64 bytes)" %}
+  ins_encode %{
+    int vector_len = 2;
+    __ evmovdquq($mem$$Address, $src$$XMMRegister, vector_len);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
 // ====================LEGACY REPLICATE=======================================
 
 instruct Repl4B_mem(vecS dst, memory mem) %{
--- a/hotspot/src/cpu/x86/vm/x86_32.ad	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/x86_32.ad	Thu Apr 28 14:44:52 2016 -0700
@@ -1021,10 +1021,10 @@
       __ vmovdqu(xmm0, Address(rsp, -32));
       break;
     case Op_VecZ:
-      __ evmovdqul(Address(rsp, -64), xmm0, 2);
-      __ evmovdqul(xmm0, Address(rsp, src_offset), 2);
-      __ evmovdqul(Address(rsp, dst_offset), xmm0, 2);
-      __ evmovdqul(xmm0, Address(rsp, -64), 2);
+      __ evmovdquq(Address(rsp, -64), xmm0, 2);
+      __ evmovdquq(xmm0, Address(rsp, src_offset), 2);
+      __ evmovdquq(Address(rsp, dst_offset), xmm0, 2);
+      __ evmovdquq(xmm0, Address(rsp, -64), 2);
       break;
     default:
       ShouldNotReachHere();
@@ -9828,27 +9828,6 @@
   ins_pipe( pipe_slow );
 %}
 
-instruct tanDPR_reg(regDPR1 dst, regDPR1 src) %{
-  predicate (UseSSE<=1);
-  match(Set dst(TanD src));
-  format %{ "DTAN   $dst" %}
-  ins_encode( Opcode(0xD9), Opcode(0xF2),    // fptan
-              Opcode(0xDD), Opcode(0xD8));   // fstp st
-  ins_pipe( pipe_slow );
-%}
-
-instruct tanD_reg(regD dst, eFlagsReg cr) %{
-  predicate (UseSSE>=2);
-  match(Set dst(TanD dst));
-  effect(KILL cr); // Push_{Src|Result}D() uses "{SUB|ADD} ESP,8"
-  format %{ "DTAN   $dst" %}
-  ins_encode( Push_SrcD(dst),
-              Opcode(0xD9), Opcode(0xF2),    // fptan
-              Opcode(0xDD), Opcode(0xD8),   // fstp st
-              Push_ResultD(dst) );
-  ins_pipe( pipe_slow );
-%}
-
 instruct atanDPR_reg(regDPR dst, regDPR src) %{
   predicate (UseSSE<=1);
   match(Set dst(AtanD dst src));
@@ -9880,41 +9859,6 @@
   ins_pipe( pipe_slow );
 %}
 
-instruct log10DPR_reg(regDPR1 dst, regDPR1 src) %{
-  predicate (UseSSE<=1);
-  // The source Double operand on FPU stack
-  match(Set dst (Log10D src));
-  // fldlg2       ; push log_10(2) on the FPU stack; full 80-bit number
-  // fxch         ; swap ST(0) with ST(1)
-  // fyl2x        ; compute log_10(2) * log_2(x)
-  format %{ "FLDLG2 \t\t\t#Log10\n\t"
-            "FXCH   \n\t"
-            "FYL2X  \t\t\t# Q=Log10*Log_2(x)"
-         %}
-  ins_encode( Opcode(0xD9), Opcode(0xEC),   // fldlg2
-              Opcode(0xD9), Opcode(0xC9),   // fxch
-              Opcode(0xD9), Opcode(0xF1));  // fyl2x
-
-  ins_pipe( pipe_slow );
-%}
-
-instruct log10D_reg(regD dst, regD src, eFlagsReg cr) %{
-  predicate (UseSSE>=2);
-  effect(KILL cr);
-  match(Set dst (Log10D src));
-  // fldlg2       ; push log_10(2) on the FPU stack; full 80-bit number
-  // fyl2x        ; compute log_10(2) * log_2(x)
-  format %{ "FLDLG2 \t\t\t#Log10\n\t"
-            "FYL2X  \t\t\t# Q=Log10*Log_2(x)"
-         %}
-  ins_encode( Opcode(0xD9), Opcode(0xEC),   // fldlg2
-              Push_SrcD(src),
-              Opcode(0xD9), Opcode(0xF1),   // fyl2x
-              Push_ResultD(dst));
-
-  ins_pipe( pipe_slow );
-%}
-
 //-------------Float Instructions-------------------------------
 // Float Math
 
@@ -12103,6 +12047,7 @@
 
 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 instruct jmpLoopEnd(cmpOp cop, eFlagsReg cr, label labl) %{
+  predicate(!n->has_vector_mask_set());
   match(CountedLoopEnd cop cr);
   effect(USE labl);
 
@@ -12118,6 +12063,7 @@
 
 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 instruct jmpLoopEndU(cmpOpU cop, eFlagsRegU cmp, label labl) %{
+  predicate(!n->has_vector_mask_set());
   match(CountedLoopEnd cop cmp);
   effect(USE labl);
 
@@ -12132,6 +12078,7 @@
 %}
 
 instruct jmpLoopEndUCF(cmpOpUCF cop, eFlagsRegUCF cmp, label labl) %{
+  predicate(!n->has_vector_mask_set());
   match(CountedLoopEnd cop cmp);
   effect(USE labl);
 
@@ -12145,6 +12092,60 @@
   ins_pipe( pipe_jcc );
 %}
 
+// mask version
+// Jump Direct Conditional - Label defines a relative address from Jcc+1
+instruct jmpLoopEnd_and_restoreMask(cmpOp cop, eFlagsReg cr, label labl) %{
+  predicate(n->has_vector_mask_set());
+  match(CountedLoopEnd cop cr);
+  effect(USE labl);
+
+  ins_cost(400);
+  format %{ "J$cop    $labl\t# Loop end\n\t"
+            "restorevectmask \t# vector mask restore for loops" %}
+  size(10);
+  ins_encode %{
+    Label* L = $labl$$label;
+    __ jcc((Assembler::Condition)($cop$$cmpcode), *L, false); // Always long jump
+    __ restorevectmask();
+  %}
+  ins_pipe( pipe_jcc );
+%}
+
+// Jump Direct Conditional - Label defines a relative address from Jcc+1
+instruct jmpLoopEndU_and_restoreMask(cmpOpU cop, eFlagsRegU cmp, label labl) %{
+  predicate(n->has_vector_mask_set());
+  match(CountedLoopEnd cop cmp);
+  effect(USE labl);
+
+  ins_cost(400);
+  format %{ "J$cop,u  $labl\t# Loop end\n\t"
+            "restorevectmask \t# vector mask restore for loops" %}
+  size(10);
+  ins_encode %{
+    Label* L = $labl$$label;
+    __ jcc((Assembler::Condition)($cop$$cmpcode), *L, false); // Always long jump
+    __ restorevectmask();
+  %}
+  ins_pipe( pipe_jcc );
+%}
+
+instruct jmpLoopEndUCF_and_restoreMask(cmpOpUCF cop, eFlagsRegUCF cmp, label labl) %{
+  predicate(n->has_vector_mask_set());
+  match(CountedLoopEnd cop cmp);
+  effect(USE labl);
+
+  ins_cost(300);
+  format %{ "J$cop,u  $labl\t# Loop end\n\t"
+            "restorevectmask \t# vector mask restore for loops" %}
+  size(10);
+  ins_encode %{
+    Label* L = $labl$$label;
+    __ jcc((Assembler::Condition)($cop$$cmpcode), *L, false); // Always long jump
+    __ restorevectmask();
+  %}
+  ins_pipe( pipe_jcc );
+%}
+
 // Jump Direct Conditional - using unsigned comparison
 instruct jmpConU(cmpOpU cop, eFlagsRegU cmp, label labl) %{
   match(If cop cmp);
--- a/hotspot/src/cpu/x86/vm/x86_64.ad	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/x86_64.ad	Thu Apr 28 14:44:52 2016 -0700
@@ -1081,10 +1081,10 @@
       __ vmovdqu(xmm0, Address(rsp, -32));
       break;
     case Op_VecZ:
-      __ evmovdqul(Address(rsp, -64), xmm0, 2);
-      __ evmovdqul(xmm0, Address(rsp, src_offset), 2);
-      __ evmovdqul(Address(rsp, dst_offset), xmm0, 2);
-      __ evmovdqul(xmm0, Address(rsp, -64), 2);
+      __ evmovdquq(Address(rsp, -64), xmm0, 2);
+      __ evmovdquq(xmm0, Address(rsp, src_offset), 2);
+      __ evmovdquq(Address(rsp, dst_offset), xmm0, 2);
+      __ evmovdquq(xmm0, Address(rsp, -64), 2);
       break;
     default:
       ShouldNotReachHere();
@@ -9897,34 +9897,6 @@
   ins_pipe(pipe_slow);
 %}
 
-// -----------Trig and Trancendental Instructions------------------------------
-instruct tanD_reg(regD dst) %{
-  match(Set dst (TanD dst));
-
-  format %{ "dtan   $dst\n\t" %}
-  ins_encode( Push_SrcXD(dst),
-              Opcode(0xD9), Opcode(0xF2),   //fptan
-              Opcode(0xDD), Opcode(0xD8),   //fstp st
-              Push_ResultXD(dst) );
-  ins_pipe( pipe_slow );
-%}
-
-instruct log10D_reg(regD dst) %{
-  // The source and result Double operands in XMM registers
-  match(Set dst (Log10D dst));
-  // fldlg2       ; push log_10(2) on the FPU stack; full 80-bit number
-  // fyl2x        ; compute log_10(2) * log_2(x)
-  format %{ "fldlg2\t\t\t#Log10\n\t"
-            "fyl2x\t\t\t# Q=Log10*Log_2(x)\n\t"
-         %}
-   ins_encode(Opcode(0xD9), Opcode(0xEC),   // fldlg2
-              Push_SrcXD(dst),
-              Opcode(0xD9), Opcode(0xF1),   // fyl2x
-              Push_ResultXD(dst));
-
-  ins_pipe( pipe_slow );
-%}
-
 //----------Arithmetic Conversion Instructions---------------------------------
 
 instruct roundFloat_nop(regF dst)
@@ -11471,6 +11443,7 @@
 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 instruct jmpLoopEnd(cmpOp cop, rFlagsReg cr, label labl)
 %{
+  predicate(!n->has_vector_mask_set());
   match(CountedLoopEnd cop cr);
   effect(USE labl);
 
@@ -11486,6 +11459,7 @@
 
 // Jump Direct Conditional - Label defines a relative address from Jcc+1
 instruct jmpLoopEndU(cmpOpU cop, rFlagsRegU cmp, label labl) %{
+  predicate(!n->has_vector_mask_set());
   match(CountedLoopEnd cop cmp);
   effect(USE labl);
 
@@ -11500,6 +11474,7 @@
 %}
 
 instruct jmpLoopEndUCF(cmpOpUCF cop, rFlagsRegUCF cmp, label labl) %{
+  predicate(!n->has_vector_mask_set());
   match(CountedLoopEnd cop cmp);
   effect(USE labl);
 
@@ -11513,6 +11488,61 @@
   ins_pipe(pipe_jcc);
 %}
 
+// mask version
+// Jump Direct Conditional - Label defines a relative address from Jcc+1
+instruct jmpLoopEnd_and_restoreMask(cmpOp cop, rFlagsReg cr, label labl)
+%{
+  predicate(n->has_vector_mask_set());
+  match(CountedLoopEnd cop cr);
+  effect(USE labl);
+
+  ins_cost(400);
+  format %{ "j$cop     $labl\t# loop end\n\t"
+            "restorevectmask \t# vector mask restore for loops" %}
+  size(10);
+  ins_encode %{
+    Label* L = $labl$$label;
+    __ jcc((Assembler::Condition)($cop$$cmpcode), *L, false); // Always long jump
+    __ restorevectmask();
+  %}
+  ins_pipe(pipe_jcc);
+%}
+
+// Jump Direct Conditional - Label defines a relative address from Jcc+1
+instruct jmpLoopEndU_and_restoreMask(cmpOpU cop, rFlagsRegU cmp, label labl) %{
+  predicate(n->has_vector_mask_set());
+  match(CountedLoopEnd cop cmp);
+  effect(USE labl);
+
+  ins_cost(400);
+  format %{ "j$cop,u   $labl\t# loop end\n\t"
+            "restorevectmask \t# vector mask restore for loops" %}
+  size(10);
+  ins_encode %{
+    Label* L = $labl$$label;
+    __ jcc((Assembler::Condition)($cop$$cmpcode), *L, false); // Always long jump
+    __ restorevectmask();
+  %}
+  ins_pipe(pipe_jcc);
+%}
+
+instruct jmpLoopEndUCF_and_restoreMask(cmpOpUCF cop, rFlagsRegUCF cmp, label labl) %{
+  predicate(n->has_vector_mask_set());
+  match(CountedLoopEnd cop cmp);
+  effect(USE labl);
+
+  ins_cost(300);
+  format %{ "j$cop,u   $labl\t# loop end\n\t"
+            "restorevectmask \t# vector mask restore for loops" %}
+  size(10);
+  ins_encode %{
+    Label* L = $labl$$label;
+    __ jcc((Assembler::Condition)($cop$$cmpcode), *L, false); // Always long jump
+    __ restorevectmask();
+  %}
+  ins_pipe(pipe_jcc);
+%}
+
 // Jump Direct Conditional - using unsigned comparison
 instruct jmpConU(cmpOpU cop, rFlagsRegU cmp, label labl) %{
   match(If cop cmp);
--- a/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -49,6 +49,7 @@
   DO(_locals);
   DO(_constants);
   DO(_method);
+  DO(_mirror);
   DO(_mdx);
   DO(_stack);
   DO(_msg);
@@ -77,6 +78,7 @@
                                                   bool      is_top_frame) {
   istate->set_locals(locals);
   istate->set_method(method);
+  istate->set_mirror(method->method_holder()->java_mirror());
   istate->set_self_link(istate);
   istate->set_prev_link(NULL);
   // thread will be set by a hacky repurposing of frame::patch_pc()
--- a/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, 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.
  *
@@ -44,6 +44,9 @@
   inline void set_method(Method* new_method) {
     _method = new_method;
   }
+  inline void set_mirror(oop new_mirror) {
+    _mirror = new_mirror;
+  }
   inline interpreterState self_link() {
     return _self_link;
   }
--- a/hotspot/src/cpu/zero/vm/compiledIC_zero.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/zero/vm/compiledIC_zero.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -42,22 +42,6 @@
 #include "utilities/events.hpp"
 
 
-// Release the CompiledICHolder* associated with this call site is there is one.
-void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
-  // This call site might have become stale so inspect it carefully.
-  NativeCall* call = nativeCall_at(call_site->addr());
-  if (is_icholder_entry(call->destination())) {
-    NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
-    InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
-  }
-}
-
-bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
-  // This call site might have become stale so inspect it carefully.
-  NativeCall* call = nativeCall_at(call_site->addr());
-  return is_icholder_entry(call->destination());
-}
-
 // ----------------------------------------------------------------------------
 
 address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark) {
--- a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -221,9 +221,16 @@
   // Push our result
   for (int i = 0; i < result_slots; i++) {
     // Adjust result to smaller
-    intptr_t res = result[-i];
+    union {
+      intptr_t res;
+      jint res_jint;
+    };
+    res = result[-i];
     if (result_slots == 1) {
-      res = narrow(method->result_type(), res);
+      BasicType t = method->result_type();
+      if (is_subword_type(t)) {
+        res_jint = (jint)narrow(t, res_jint);
+      }
     }
     stack->push(res);
   }
@@ -748,6 +755,7 @@
 
   istate->set_locals(locals);
   istate->set_method(method);
+  istate->set_mirror(method->method_holder()->java_mirror());
   istate->set_self_link(istate);
   istate->set_prev_link(NULL);
   istate->set_thread(thread);
--- a/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, 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.
  *
@@ -115,6 +115,10 @@
   return &(get_interpreterState()->_method);
 }
 
+inline oop* frame::interpreter_frame_mirror_addr() const {
+  return &(get_interpreterState()->_mirror);
+}
+
 inline intptr_t* frame::interpreter_frame_mdp_addr() const {
   return (intptr_t*) &(get_interpreterState()->_mdx);
 }
--- a/hotspot/src/cpu/zero/vm/globals_zero.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/cpu/zero/vm/globals_zero.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -43,7 +43,12 @@
 define_pd_global(intx,  OptoLoopAlignment,    16);
 define_pd_global(intx,  InlineFrequencyCount, 100);
 define_pd_global(intx,  InlineSmallCode,      1000);
-define_pd_global(intx,  InitArrayShortSize,   -1); // not used
+
+// not used, but must satisfy following constraints:
+// 1.) <VALUE> must be in the allowed range for intx *and*
+// 2.) <VALUE> % BytesPerLong == 0 so as to not
+//     violate the constraint verifier on JVM start-up.
+define_pd_global(intx,  InitArrayShortSize,   0);
 
 #define DEFAULT_STACK_YELLOW_PAGES (2)
 #define DEFAULT_STACK_RED_PAGES (1)
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/SymbolTable.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/SymbolTable.java	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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
@@ -85,6 +85,12 @@
       tables. */
   public Symbol probe(byte[] name) {
     long hashValue = hashSymbol(name);
+
+    Symbol s = sharedTable.probe(name, hashValue);
+    if (s != null) {
+      return s;
+    }
+
     for (HashtableEntry e = (HashtableEntry) bucket(hashToIndex(hashValue)); e != null; e = (HashtableEntry) e.next()) {
       if (e.hash() == hashValue) {
          Symbol sym = Symbol.create(e.literalValue());
@@ -94,7 +100,7 @@
       }
     }
 
-    return sharedTable.probe(name, hashValue);
+    return null;
   }
 
   public interface SymbolVisitor {
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/BreakpointInfo.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/BreakpointInfo.java	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016 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
@@ -46,6 +46,11 @@
   }
 
   private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
+    if (!VM.getVM().isJvmtiSupported()) {
+      // no BreakpointInfo support without JVMTI
+      return;
+    }
+
     Type type                  = db.lookupType("BreakpointInfo");
 
     origBytecodeField   = type.getCIntegerField("_orig_bytecode");
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java	Thu Apr 28 14:44:52 2016 -0700
@@ -85,7 +85,9 @@
     isMarkedDependent    = new CIntField(type.getCIntegerField("_is_marked_dependent"), 0);
     initState            = new CIntField(type.getCIntegerField("_init_state"), 0);
     itableLen            = new CIntField(type.getCIntegerField("_itable_len"), 0);
-    breakpoints          = type.getAddressField("_breakpoints");
+    if (VM.getVM().isJvmtiSupported()) {
+      breakpoints        = type.getAddressField("_breakpoints");
+    }
     genericSignatureIndex = new CIntField(type.getCIntegerField("_generic_signature_index"), 0);
     majorVersion         = new CIntField(type.getCIntegerField("_major_version"), 0);
     minorVersion         = new CIntField(type.getCIntegerField("_minor_version"), 0);
@@ -837,6 +839,9 @@
 
   /** Breakpoint support (see methods on Method* for details) */
   public BreakpointInfo getBreakpoints() {
+    if (!VM.getVM().isJvmtiSupported()) {
+      return null;
+    }
     Address addr = getAddress().getAddressAt(breakpoints.getOffset());
     return (BreakpointInfo) VMObjectFactory.newObject(BreakpointInfo.class, addr);
   }
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, 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
@@ -87,6 +87,8 @@
   private StubRoutines stubRoutines;
   private Bytes        bytes;
 
+  /** Flag indicating if JVMTI support is included in the build */
+  private boolean      isJvmtiSupported;
   /** Flags indicating whether we are attached to a core, C1, or C2 build */
   private boolean      usingClientCompiler;
   private boolean      usingServerCompiler;
@@ -336,6 +338,16 @@
     stackBias    = db.lookupIntConstant("STACK_BIAS").intValue();
     invocationEntryBCI = db.lookupIntConstant("InvocationEntryBci").intValue();
 
+    // We infer the presence of JVMTI from the presence of the InstanceKlass::_breakpoints field.
+    {
+      Type type = db.lookupType("InstanceKlass");
+      if (type.getField("_breakpoints", false, false) == null) {
+        isJvmtiSupported = false;
+      } else {
+        isJvmtiSupported = true;
+      }
+    }
+
     // We infer the presence of C1 or C2 from a couple of fields we
     // already have present in the type database
     {
@@ -701,6 +713,11 @@
     return isBigEndian;
   }
 
+  /** Returns true if JVMTI is supported, false otherwise */
+  public boolean isJvmtiSupported() {
+    return isJvmtiSupported;
+  }
+
   /** Returns true if this is a "core" build, false if either C1 or C2
       is present */
   public boolean isCore() {
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/CompactHashTable.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/CompactHashTable.java	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, 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
@@ -44,21 +44,23 @@
     Type type = db.lookupType("SymbolCompactHashTable");
     baseAddressField = type.getAddressField("_base_address");
     bucketCountField = type.getCIntegerField("_bucket_count");
-    tableEndOffsetField = type.getCIntegerField("_table_end_offset");
+    entryCountField = type.getCIntegerField("_entry_count");
     bucketsField = type.getAddressField("_buckets");
-    uintSize = db.lookupType("juint").getSize();
+    entriesField = type.getAddressField("_entries");
+    uintSize = db.lookupType("u4").getSize();
   }
 
   // Fields
   private static CIntegerField bucketCountField;
-  private static CIntegerField tableEndOffsetField;
+  private static CIntegerField entryCountField;
   private static AddressField  baseAddressField;
   private static AddressField  bucketsField;
+  private static AddressField  entriesField;
   private static long uintSize;
 
   private static int BUCKET_OFFSET_MASK = 0x3FFFFFFF;
   private static int BUCKET_TYPE_SHIFT = 30;
-  private static int COMPACT_BUCKET_TYPE = 1;
+  private static int VALUE_ONLY_BUCKET_TYPE = 1;
 
   public CompactHashTable(Address addr) {
     super(addr);
@@ -68,12 +70,8 @@
     return (int)bucketCountField.getValue(addr);
   }
 
-  private int tableEndOffset() {
-    return (int)tableEndOffsetField.getValue(addr);
-  }
-
-  private boolean isCompactBucket(int bucket_info) {
-    return (bucket_info >> BUCKET_TYPE_SHIFT) == COMPACT_BUCKET_TYPE;
+  private boolean isValueOnlyBucket(int bucket_info) {
+    return (bucket_info >> BUCKET_TYPE_SHIFT) == VALUE_ONLY_BUCKET_TYPE;
   }
 
   private int bucketOffset(int bucket_info) {
@@ -81,9 +79,8 @@
   }
 
   public Symbol probe(byte[] name, long hash) {
-
-    if (bucketCount() == 0) {
-      // The table is invalid, so don't try to lookup
+    if (bucketCount() <= 0) {
+      // This CompactHashTable is not in use
       return null;
     }
 
@@ -91,34 +88,33 @@
     Symbol  sym;
     Address baseAddress = baseAddressField.getValue(addr);
     Address bucket = bucketsField.getValue(addr);
-    Address bucketEnd = bucket;
     long index = hash % bucketCount();
     int bucketInfo = (int)bucket.getCIntegerAt(index * uintSize, uintSize, true);
     int bucketOffset = bucketOffset(bucketInfo);
     int nextBucketInfo = (int)bucket.getCIntegerAt((index+1) * uintSize, uintSize, true);
     int nextBucketOffset = bucketOffset(nextBucketInfo);
 
-    bucket = bucket.addOffsetTo(bucketOffset * uintSize);
+    Address entry = entriesField.getValue(addr).addOffsetTo(bucketOffset * uintSize);
 
-    if (isCompactBucket(bucketInfo)) {
-      symOffset = bucket.getCIntegerAt(0, uintSize, true);
+    if (isValueOnlyBucket(bucketInfo)) {
+      symOffset = entry.getCIntegerAt(0, uintSize, true);
       sym = Symbol.create(baseAddress.addOffsetTo(symOffset));
       if (sym.equals(name)) {
         return sym;
       }
     } else {
-      bucketEnd = bucket.addOffsetTo(nextBucketOffset * uintSize);
-      while (bucket.lessThan(bucketEnd)) {
-        long symHash = bucket.getCIntegerAt(0, uintSize, true);
+      Address entryMax = entriesField.getValue(addr).addOffsetTo(nextBucketOffset * uintSize);
+      while (entry.lessThan(entryMax)) {
+        long symHash = entry.getCIntegerAt(0, uintSize, true);
         if (symHash == hash) {
-          symOffset = bucket.getCIntegerAt(uintSize, uintSize, true);
+          symOffset = entry.getCIntegerAt(uintSize, uintSize, true);
           Address symAddr = baseAddress.addOffsetTo(symOffset);
           sym = Symbol.create(symAddr);
           if (sym.equals(name)) {
             return sym;
           }
         }
-        bucket = bucket.addOffsetTo(2 * uintSize);
+        entry = entry.addOffsetTo(2 * uintSize);
       }
     }
     return null;
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/UnsafeUtil.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/UnsafeUtil.java	Thu Apr 28 14:44:52 2016 -0700
@@ -22,7 +22,7 @@
  */
 package jdk.vm.ci.common;
 
-import sun.misc.Unsafe;
+import jdk.internal.misc.Unsafe;
 
 /**
  * Utilities for operating on raw memory with {@link Unsafe}.
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java	Thu Apr 28 14:44:52 2016 -0700
@@ -39,7 +39,7 @@
 import jdk.vm.ci.meta.JavaType;
 import jdk.vm.ci.meta.ResolvedJavaMethod;
 import jdk.vm.ci.meta.ResolvedJavaType;
-import sun.misc.Unsafe;
+import jdk.internal.misc.Unsafe;
 
 /**
  * Calls from Java into HotSpot. The behavior of all the methods in this class that take a native
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java	Thu Apr 28 14:44:52 2016 -0700
@@ -120,7 +120,9 @@
             resultInstalledCode = installedCode;
         }
 
-        int result = runtime.getCompilerToVM().installCode(target, (HotSpotCompiledCode) compiledCode, resultInstalledCode, (HotSpotSpeculationLog) log);
+        HotSpotSpeculationLog speculationLog = (log != null && log.hasSpeculations()) ? (HotSpotSpeculationLog) log : null;
+
+        int result = runtime.getCompilerToVM().installCode(target, (HotSpotCompiledCode) compiledCode, resultInstalledCode, speculationLog);
         if (result != config.codeInstallResultOk) {
             String resultDesc = config.getCodeInstallResultDescription(result);
             if (compiledCode instanceof HotSpotCompiledNmethod) {
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotInstalledCode.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotInstalledCode.java	Thu Apr 28 14:44:52 2016 -0700
@@ -25,7 +25,7 @@
 import static jdk.vm.ci.hotspot.UnsafeAccess.UNSAFE;
 import jdk.vm.ci.code.InstalledCode;
 import jdk.vm.ci.inittimer.SuppressFBWarnings;
-import sun.misc.Unsafe;
+import jdk.internal.misc.Unsafe;
 
 /**
  * Implementation of {@link InstalledCode} for HotSpot.
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider.java	Thu Apr 28 14:44:52 2016 -0700
@@ -30,7 +30,7 @@
 import jdk.vm.ci.meta.JavaType;
 import jdk.vm.ci.meta.ResolvedJavaType;
 import jdk.vm.ci.runtime.JVMCIRuntime;
-import sun.misc.Unsafe;
+import jdk.internal.misc.Unsafe;
 
 //JaCoCo Exclude
 
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java	Thu Apr 28 14:44:52 2016 -0700
@@ -39,7 +39,7 @@
 import jdk.vm.ci.meta.ResolvedJavaMethod;
 import jdk.vm.ci.meta.ResolvedJavaType;
 import jdk.vm.ci.meta.TriState;
-import sun.misc.Unsafe;
+import jdk.internal.misc.Unsafe;
 
 /**
  * Access to a HotSpot MethodData structure (defined in methodData.hpp).
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSpeculationLog.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSpeculationLog.java	Thu Apr 28 14:44:52 2016 -0700
@@ -38,7 +38,7 @@
     /** All speculations that have been a deoptimization reason. */
     private Set<SpeculationReason> failedSpeculations;
 
-    /** Strong references to all reasons embededded in the current nmethod. */
+    /** Strong references to all reasons embedded in the current nmethod. */
     private volatile Collection<SpeculationReason> speculations;
 
     @Override
@@ -81,4 +81,9 @@
 
         return HotSpotObjectConstantImpl.forObject(reason);
     }
+
+    @Override
+    public synchronized boolean hasSpeculations() {
+        return speculations != null && !speculations.isEmpty();
+    }
 }
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java	Thu Apr 28 14:44:52 2016 -0700
@@ -38,7 +38,7 @@
 import jdk.vm.ci.hotspotvmconfig.HotSpotVMField;
 import jdk.vm.ci.hotspotvmconfig.HotSpotVMFlag;
 import jdk.vm.ci.hotspotvmconfig.HotSpotVMType;
-import sun.misc.Unsafe;
+import jdk.internal.misc.Unsafe;
 
 //JaCoCo Exclude
 
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigVerifier.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigVerifier.java	Thu Apr 28 14:44:52 2016 -0700
@@ -40,7 +40,7 @@
 import jdk.internal.org.objectweb.asm.MethodVisitor;
 import jdk.internal.org.objectweb.asm.Opcodes;
 import jdk.internal.org.objectweb.asm.Type;
-import sun.misc.Unsafe;
+import jdk.internal.misc.Unsafe;
 
 /**
  * A {@link ClassVisitor} that verifies {@link HotSpotVMConfig} does not access {@link Unsafe} from
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVmSymbols.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVmSymbols.java	Thu Apr 28 14:44:52 2016 -0700
@@ -24,7 +24,7 @@
 
 import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
 import static jdk.vm.ci.hotspot.UnsafeAccess.UNSAFE;
-import sun.misc.Unsafe;
+import jdk.internal.misc.Unsafe;
 
 /**
  * Class to access the C++ {@code vmSymbols} table.
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/UnsafeAccess.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/UnsafeAccess.java	Thu Apr 28 14:44:52 2016 -0700
@@ -24,7 +24,7 @@
 
 import java.lang.reflect.Field;
 
-import sun.misc.Unsafe;
+import jdk.internal.misc.Unsafe;
 
 /**
  * Package private access to the {@link Unsafe} capability.
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SpeculationLog.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SpeculationLog.java	Thu Apr 28 14:44:52 2016 -0700
@@ -56,4 +56,11 @@
      *         argument to the deoptimization function.
      */
     JavaConstant speculate(SpeculationReason reason);
+
+    /**
+     * Returns if this log has speculations.
+     *
+     * @return true if there are speculations, false otherwise
+     */
+    boolean hasSpeculations();
 }
--- a/hotspot/src/jdk.vm.ci/share/classes/module-info.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/jdk.vm.ci/share/classes/module-info.java	Thu Apr 28 14:44:52 2016 -0700
@@ -24,9 +24,6 @@
  */
 
 module jdk.vm.ci {
-    // 8153756
-    requires jdk.unsupported;
-
     uses jdk.vm.ci.hotspot.HotSpotVMEventListener;
     uses jdk.vm.ci.hotspot.HotSpotJVMCIBackendFactory;
     uses jdk.vm.ci.runtime.JVMCICompilerFactory;
--- a/hotspot/src/os/aix/vm/os_aix.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/os/aix/vm/os_aix.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -4875,3 +4875,16 @@
   }
   return yes;
 }
+
+static inline time_t get_mtime(const char* filename) {
+  struct stat st;
+  int ret = os::stat(filename, &st);
+  assert(ret == 0, "failed to stat() file '%s': %s", filename, strerror(errno));
+  return st.st_mtime;
+}
+
+int os::compare_file_modified_times(const char* file1, const char* file2) {
+  time_t t1 = get_mtime(file1);
+  time_t t2 = get_mtime(file2);
+  return t1 - t2;
+}
--- a/hotspot/src/os/linux/vm/os_linux.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/os/linux/vm/os_linux.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2013,8 +2013,8 @@
 // their own specific XXX-release file as well as a redhat-release file.
 // Because of this the XXX-release file needs to be searched for before the
 // redhat-release file.
-// Since Red Hat has a lsb-release file that is not very descriptive the
-// search for redhat-release needs to be before lsb-release.
+// Since Red Hat and SuSE have an lsb-release file that is not very descriptive the
+// search for redhat-release / SuSE-release needs to be before lsb-release.
 // Since the lsb-release file is the new standard it needs to be searched
 // before the older style release files.
 // Searching system-release (Red Hat) and os-release (other Linuxes) are a
@@ -2031,8 +2031,8 @@
   "/etc/mandrake-release",
   "/etc/sun-release",
   "/etc/redhat-release",
+  "/etc/SuSE-release",
   "/etc/lsb-release",
-  "/etc/SuSE-release",
   "/etc/turbolinux-release",
   "/etc/gentoo-release",
   "/etc/ltib-release",
@@ -2062,14 +2062,11 @@
   st->cr();
 }
 
-static void parse_os_info(char* distro, size_t length, const char* file) {
-  FILE* fp = fopen(file, "r");
-  if (fp != NULL) {
-    char buf[256];
-    // get last line of the file.
-    while (fgets(buf, sizeof(buf), fp)) { }
-    // Edit out extra stuff in expected ubuntu format
-    if (strstr(buf, "DISTRIB_DESCRIPTION=") != NULL) {
+static void parse_os_info_helper(FILE* fp, char* distro, size_t length, bool get_first_line) {
+  char buf[256];
+  while (fgets(buf, sizeof(buf), fp)) {
+    // Edit out extra stuff in expected format
+    if (strstr(buf, "DISTRIB_DESCRIPTION=") != NULL || strstr(buf, "PRETTY_NAME=") != NULL) {
       char* ptr = strstr(buf, "\"");  // the name is in quotes
       if (ptr != NULL) {
         ptr++; // go beyond first quote
@@ -2083,13 +2080,26 @@
         if (nl != NULL) *nl = '\0';
         strncpy(distro, ptr, length);
       }
-    } else {
-      // if not in expected Ubuntu format, print out whole line minus \n
+      return;
+    } else if (get_first_line) {
       char* nl = strchr(buf, '\n');
       if (nl != NULL) *nl = '\0';
       strncpy(distro, buf, length);
+      return;
     }
-    // close distro file
+  }
+  // print last line and close
+  char* nl = strchr(buf, '\n');
+  if (nl != NULL) *nl = '\0';
+  strncpy(distro, buf, length);
+}
+
+static void parse_os_info(char* distro, size_t length, const char* file) {
+  FILE* fp = fopen(file, "r");
+  if (fp != NULL) {
+    // if suse format, print out first line
+    bool get_first_line = (strcmp(file, "/etc/SuSE-release") == 0);
+    parse_os_info_helper(fp, distro, length, get_first_line);
     fclose(fp);
   }
 }
@@ -3041,6 +3051,48 @@
   return addr == MAP_FAILED ? NULL : addr;
 }
 
+// Allocate (using mmap, NO_RESERVE, with small pages) at either a given request address
+//   (req_addr != NULL) or with a given alignment.
+//  - bytes shall be a multiple of alignment.
+//  - req_addr can be NULL. If not NULL, it must be a multiple of alignment.
+//  - alignment sets the alignment at which memory shall be allocated.
+//     It must be a multiple of allocation granularity.
+// Returns address of memory or NULL. If req_addr was not NULL, will only return
+//  req_addr or NULL.
+static char* anon_mmap_aligned(size_t bytes, size_t alignment, char* req_addr) {
+
+  size_t extra_size = bytes;
+  if (req_addr == NULL && alignment > 0) {
+    extra_size += alignment;
+  }
+
+  char* start = (char*) ::mmap(req_addr, extra_size, PROT_NONE,
+    MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE,
+    -1, 0);
+  if (start == MAP_FAILED) {
+    start = NULL;
+  } else {
+    if (req_addr != NULL) {
+      if (start != req_addr) {
+        ::munmap(start, extra_size);
+        start = NULL;
+      }
+    } else {
+      char* const start_aligned = (char*) align_ptr_up(start, alignment);
+      char* const end_aligned = start_aligned + bytes;
+      char* const end = start + extra_size;
+      if (start_aligned > start) {
+        ::munmap(start, start_aligned - start);
+      }
+      if (end_aligned < end) {
+        ::munmap(end_aligned, end - end_aligned);
+      }
+      start = start_aligned;
+    }
+  }
+  return start;
+}
+
 static int anon_munmap(char * addr, size_t size) {
   return ::munmap(addr, size) == 0;
 }
@@ -3317,29 +3369,113 @@
   #define SHM_HUGETLB 04000
 #endif
 
+#define shm_warning_format(format, ...)              \
+  do {                                               \
+    if (UseLargePages &&                             \
+        (!FLAG_IS_DEFAULT(UseLargePages) ||          \
+         !FLAG_IS_DEFAULT(UseSHM) ||                 \
+         !FLAG_IS_DEFAULT(LargePageSizeInBytes))) {  \
+      warning(format, __VA_ARGS__);                  \
+    }                                                \
+  } while (0)
+
+#define shm_warning(str) shm_warning_format("%s", str)
+
+#define shm_warning_with_errno(str)                \
+  do {                                             \
+    int err = errno;                               \
+    shm_warning_format(str " (error = %d)", err);  \
+  } while (0)
+
+static char* shmat_with_alignment(int shmid, size_t bytes, size_t alignment) {
+  assert(is_size_aligned(bytes, alignment), "Must be divisible by the alignment");
+
+  if (!is_size_aligned(alignment, SHMLBA)) {
+    assert(false, "Code below assumes that alignment is at least SHMLBA aligned");
+    return NULL;
+  }
+
+  // To ensure that we get 'alignment' aligned memory from shmat,
+  // we pre-reserve aligned virtual memory and then attach to that.
+
+  char* pre_reserved_addr = anon_mmap_aligned(bytes, alignment, NULL);
+  if (pre_reserved_addr == NULL) {
+    // Couldn't pre-reserve aligned memory.
+    shm_warning("Failed to pre-reserve aligned memory for shmat.");
+    return NULL;
+  }
+
+  // SHM_REMAP is needed to allow shmat to map over an existing mapping.
+  char* addr = (char*)shmat(shmid, pre_reserved_addr, SHM_REMAP);
+
+  if ((intptr_t)addr == -1) {
+    int err = errno;
+    shm_warning_with_errno("Failed to attach shared memory.");
+
+    assert(err != EACCES, "Unexpected error");
+    assert(err != EIDRM,  "Unexpected error");
+    assert(err != EINVAL, "Unexpected error");
+
+    // Since we don't know if the kernel unmapped the pre-reserved memory area
+    // we can't unmap it, since that would potentially unmap memory that was
+    // mapped from other threads.
+    return NULL;
+  }
+
+  return addr;
+}
+
+static char* shmat_at_address(int shmid, char* req_addr) {
+  if (!is_ptr_aligned(req_addr, SHMLBA)) {
+    assert(false, "Requested address needs to be SHMLBA aligned");
+    return NULL;
+  }
+
+  char* addr = (char*)shmat(shmid, req_addr, 0);
+
+  if ((intptr_t)addr == -1) {
+    shm_warning_with_errno("Failed to attach shared memory.");
+    return NULL;
+  }
+
+  return addr;
+}
+
+static char* shmat_large_pages(int shmid, size_t bytes, size_t alignment, char* req_addr) {
+  // If a req_addr has been provided, we assume that the caller has already aligned the address.
+  if (req_addr != NULL) {
+    assert(is_ptr_aligned(req_addr, os::large_page_size()), "Must be divisible by the large page size");
+    assert(is_ptr_aligned(req_addr, alignment), "Must be divisible by given alignment");
+    return shmat_at_address(shmid, req_addr);
+  }
+
+  // Since shmid has been setup with SHM_HUGETLB, shmat will automatically
+  // return large page size aligned memory addresses when req_addr == NULL.
+  // However, if the alignment is larger than the large page size, we have
+  // to manually ensure that the memory returned is 'alignment' aligned.
+  if (alignment > os::large_page_size()) {
+    assert(is_size_aligned(alignment, os::large_page_size()), "Must be divisible by the large page size");
+    return shmat_with_alignment(shmid, bytes, alignment);
+  } else {
+    return shmat_at_address(shmid, NULL);
+  }
+}
+
 char* os::Linux::reserve_memory_special_shm(size_t bytes, size_t alignment,
                                             char* req_addr, bool exec) {
   // "exec" is passed in but not used.  Creating the shared image for
   // the code cache doesn't have an SHM_X executable permission to check.
   assert(UseLargePages && UseSHM, "only for SHM large pages");
   assert(is_ptr_aligned(req_addr, os::large_page_size()), "Unaligned address");
-
-  if (!is_size_aligned(bytes, os::large_page_size()) || alignment > os::large_page_size()) {
+  assert(is_ptr_aligned(req_addr, alignment), "Unaligned address");
+
+  if (!is_size_aligned(bytes, os::large_page_size())) {
     return NULL; // Fallback to small pages.
   }
 
-  key_t key = IPC_PRIVATE;
-  char *addr;
-
-  bool warn_on_failure = UseLargePages &&
-                        (!FLAG_IS_DEFAULT(UseLargePages) ||
-                         !FLAG_IS_DEFAULT(UseSHM) ||
-                         !FLAG_IS_DEFAULT(LargePageSizeInBytes));
-  char msg[128];
-
   // Create a large shared memory region to attach to based on size.
-  // Currently, size is the total size of the heap
-  int shmid = shmget(key, bytes, SHM_HUGETLB|IPC_CREAT|SHM_R|SHM_W);
+  // Currently, size is the total size of the heap.
+  int shmid = shmget(IPC_PRIVATE, bytes, SHM_HUGETLB|IPC_CREAT|SHM_R|SHM_W);
   if (shmid == -1) {
     // Possible reasons for shmget failure:
     // 1. shmmax is too small for Java heap.
@@ -3355,16 +3491,12 @@
     //            they are so fragmented after a long run that they can't
     //            coalesce into large pages. Try to reserve large pages when
     //            the system is still "fresh".
-    if (warn_on_failure) {
-      jio_snprintf(msg, sizeof(msg), "Failed to reserve shared memory (errno = %d).", errno);
-      warning("%s", msg);
-    }
+    shm_warning_with_errno("Failed to reserve shared memory.");
     return NULL;
   }
 
-  // attach to the region
-  addr = (char*)shmat(shmid, req_addr, 0);
-  int err = errno;
+  // Attach to the region.
+  char* addr = shmat_large_pages(shmid, bytes, alignment, req_addr);
 
   // Remove shmid. If shmat() is successful, the actual shared memory segment
   // will be deleted when it's detached by shmdt() or when the process
@@ -3372,14 +3504,6 @@
   // segment immediately.
   shmctl(shmid, IPC_RMID, NULL);
 
-  if ((intptr_t)addr == -1) {
-    if (warn_on_failure) {
-      jio_snprintf(msg, sizeof(msg), "Failed to attach shared memory (errno = %d).", err);
-      warning("%s", msg);
-    }
-    return NULL;
-  }
-
   return addr;
 }
 
@@ -3422,50 +3546,6 @@
   return addr;
 }
 
-// Helper for os::Linux::reserve_memory_special_huge_tlbfs_mixed().
-// Allocate (using mmap, NO_RESERVE, with small pages) at either a given request address
-//   (req_addr != NULL) or with a given alignment.
-//  - bytes shall be a multiple of alignment.
-//  - req_addr can be NULL. If not NULL, it must be a multiple of alignment.
-//  - alignment sets the alignment at which memory shall be allocated.
-//     It must be a multiple of allocation granularity.
-// Returns address of memory or NULL. If req_addr was not NULL, will only return
-//  req_addr or NULL.
-static char* anon_mmap_aligned(size_t bytes, size_t alignment, char* req_addr) {
-
-  size_t extra_size = bytes;
-  if (req_addr == NULL && alignment > 0) {
-    extra_size += alignment;
-  }
-
-  char* start = (char*) ::mmap(req_addr, extra_size, PROT_NONE,
-    MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE,
-    -1, 0);
-  if (start == MAP_FAILED) {
-    start = NULL;
-  } else {
-    if (req_addr != NULL) {
-      if (start != req_addr) {
-        ::munmap(start, extra_size);
-        start = NULL;
-      }
-    } else {
-      char* const start_aligned = (char*) align_ptr_up(start, alignment);
-      char* const end_aligned = start_aligned + bytes;
-      char* const end = start + extra_size;
-      if (start_aligned > start) {
-        ::munmap(start, start_aligned - start);
-      }
-      if (end_aligned < end) {
-        ::munmap(end_aligned, end - end_aligned);
-      }
-      start = start_aligned;
-    }
-  }
-  return start;
-
-}
-
 // Reserve memory using mmap(MAP_HUGETLB).
 //  - bytes shall be a multiple of alignment.
 //  - req_addr can be NULL. If not NULL, it must be a multiple of alignment.
--- a/hotspot/src/os/posix/vm/os_posix.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/os/posix/vm/os_posix.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -181,8 +181,8 @@
     return vsnprintf(buf, len, fmt, args);
 }
 
-int os::fileno(FILE* fp) {
-  return ::fileno(fp);
+int os::get_fileno(FILE* fp) {
+  return NOT_AIX(::)fileno(fp);
 }
 
 void os::Posix::print_load_average(outputStream* st) {
--- a/hotspot/src/os/windows/vm/os_windows.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/os/windows/vm/os_windows.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -4602,7 +4602,7 @@
   return 0;
 }
 
-int os::fileno(FILE* fp) {
+int os::get_fileno(FILE* fp) {
   return _fileno(fp);
 }
 
--- a/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -247,7 +247,7 @@
 
   } else if ((lf = x->array()->as_LoadField()) != NULL) {
     ciField* field = lf->field();
-    if (field->is_constant() && field->is_static()) {
+    if (field->is_static_constant()) {
       assert(PatchALot || ScavengeRootsInCode < 2, "Constant field loads are folded during parsing");
       ciObject* c = field->constant_value().as_object();
       if (!c->is_null_object()) {
--- a/hotspot/src/share/vm/c1/c1_CodeStubs.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_CodeStubs.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, 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
@@ -77,17 +77,13 @@
   }
 };
 
-
-define_array(CodeStubArray, CodeStub*)
-define_stack(_CodeStubList, CodeStubArray)
-
-class CodeStubList: public _CodeStubList {
+class CodeStubList: public GrowableArray<CodeStub*> {
  public:
-  CodeStubList(): _CodeStubList() {}
+  CodeStubList(): GrowableArray<CodeStub*>() {}
 
   void append(CodeStub* stub) {
     if (!contains(stub)) {
-      _CodeStubList::append(stub);
+      GrowableArray<CodeStub*>::append(stub);
     }
   }
 };
--- a/hotspot/src/share/vm/c1/c1_Compilation.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_Compilation.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, 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
@@ -53,12 +53,9 @@
 class CFGPrinter;
 typedef LIR_OprDesc* LIR_Opr;
 
-
-define_array(BasicTypeArray, BasicType)
-define_stack(BasicTypeList, BasicTypeArray)
-
-define_array(ExceptionInfoArray, ExceptionInfo*)
-define_stack(ExceptionInfoList,  ExceptionInfoArray)
+typedef GrowableArray<BasicType> BasicTypeArray;
+typedef GrowableArray<BasicType> BasicTypeList;
+typedef GrowableArray<ExceptionInfo*> ExceptionInfoList;
 
 class Compilation: public StackObj {
   friend class CompilationResourceObj;
--- a/hotspot/src/share/vm/c1/c1_Compiler.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_Compiler.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -131,6 +131,9 @@
     if (!VM_Version::supports_atomic_getset4()) return false;
 #endif
     break;
+  case vmIntrinsics::_onSpinWait:
+    if (!VM_Version::supports_on_spin_wait()) return false;
+    break;
   case vmIntrinsics::_arraycopy:
   case vmIntrinsics::_currentTimeMillis:
   case vmIntrinsics::_nanoTime:
--- a/hotspot/src/share/vm/c1/c1_FrameMap.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_FrameMap.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, 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 @@
   _reserved_argument_area_size = MAX2(4, reserved_argument_area_size) * BytesPerWord;
 
   _argcount = method->arg_size();
-  _argument_locations = new intArray(_argcount, -1);
+  _argument_locations = new intArray(_argcount, _argcount, -1);
   _incoming_arguments = java_calling_convention(signature_type_array_for(method), false);
   _oop_map_arg_count = _incoming_arguments->reserved_stack_slots();
 
--- a/hotspot/src/share/vm/c1/c1_FrameMap.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_FrameMap.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, 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,8 +36,6 @@
 
 class ciMethod;
 class CallingConvention;
-class BasicTypeArray;
-class BasicTypeList;
 
 //--------------------------------------------------------
 //               FrameMap
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -357,7 +357,7 @@
 
   _active = BitMap(BlockBegin::number_of_blocks());         _active.clear();
   _visited = BitMap(BlockBegin::number_of_blocks());        _visited.clear();
-  _loop_map = intArray(BlockBegin::number_of_blocks(), 0);
+  _loop_map = intArray(BlockBegin::number_of_blocks(), BlockBegin::number_of_blocks(), 0);
   _next_loop_index = 0;
   _next_block_number = _blocks.length();
 
@@ -1366,7 +1366,7 @@
   } else {
     // collect successors & keys
     BlockList* sux = new BlockList(l + 1, NULL);
-    intArray* keys = new intArray(l, 0);
+    intArray* keys = new intArray(l, l, 0);
     int i;
     bool has_bb = false;
     for (i = 0; i < l; i++) {
@@ -1563,6 +1563,8 @@
 }
 
 Value GraphBuilder::make_constant(ciConstant field_value, ciField* field) {
+  if (!field_value.is_valid())  return NULL;
+
   BasicType field_type = field_value.basic_type();
   ValueType* value = as_ValueType(field_value);
 
@@ -1630,9 +1632,8 @@
     case Bytecodes::_getstatic: {
       // check for compile-time constants, i.e., initialized static final fields
       Value constant = NULL;
-      if (field->is_constant() && !PatchALot) {
+      if (field->is_static_constant() && !PatchALot) {
         ciConstant field_value = field->constant_value();
-        // Stable static fields are checked for non-default values in ciField::initialize_from().
         assert(!field->is_stable() || !field_value.is_null_or_zero(),
                "stable static w/ default value shouldn't be a constant");
         constant = make_constant(field_value, field);
@@ -1665,31 +1666,18 @@
       Value constant = NULL;
       obj = apop();
       ObjectType* obj_type = obj->type()->as_ObjectType();
-      if (obj_type->is_constant() && !PatchALot) {
+      if (field->is_constant() && obj_type->is_constant() && !PatchALot) {
         ciObject* const_oop = obj_type->constant_value();
         if (!const_oop->is_null_object() && const_oop->is_loaded()) {
-          if (field->is_constant()) {
-            ciConstant field_value = field->constant_value_of(const_oop);
-            if (FoldStableValues && field->is_stable() && field_value.is_null_or_zero()) {
-              // Stable field with default value can't be constant.
-              constant = NULL;
-            } else {
-              constant = make_constant(field_value, field);
-            }
-          } else {
-            // For CallSite objects treat the target field as a compile time constant.
-            if (const_oop->is_call_site()) {
+          ciConstant field_value = field->constant_value_of(const_oop);
+          if (field_value.is_valid()) {
+            constant = make_constant(field_value, field);
+            // For CallSite objects add a dependency for invalidation of the optimization.
+            if (field->is_call_site_target()) {
               ciCallSite* call_site = const_oop->as_call_site();
-              if (field->is_call_site_target()) {
-                ciMethodHandle* target = call_site->get_target();
-                if (target != NULL) {  // just in case
-                  ciConstant field_val(T_OBJECT, target);
-                  constant = new Constant(as_ValueType(field_val));
-                  // Add a dependence for invalidation of the optimization.
-                  if (!call_site->is_constant_call_site()) {
-                    dependency_recorder()->assert_call_site_target_value(call_site, target);
-                  }
-                }
+              if (!call_site->is_constant_call_site()) {
+                ciMethodHandle* target = field_value.as_object()->as_method_handle();
+                dependency_recorder()->assert_call_site_target_value(call_site, target);
               }
             }
           }
@@ -1772,7 +1760,7 @@
   bool ignored_will_link;
   ciSignature* declared_signature = NULL;
   ciMethod* real_target = method()->get_method_at_bci(bci(), ignored_will_link, &declared_signature);
-  assert(expected == obj_args->length() || real_target->is_method_handle_intrinsic(), "missed on arg?");
+  assert(expected == obj_args->max_length() || real_target->is_method_handle_intrinsic(), "missed on arg?");
 #endif
 }
 
@@ -1783,7 +1771,7 @@
   if (obj_args == NULL) {
     return NULL;
   }
-  int s = obj_args->size();
+  int s = obj_args->max_length();
   // if called through method handle invoke, some arguments may have been popped
   for (int i = start, j = 0; j < s && i < args->length(); i++) {
     if (args->at(i)->type()->is_object_kind()) {
@@ -2220,7 +2208,7 @@
   ciKlass* klass = stream()->get_klass(will_link);
   ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling();
 
-  Values* dims = new Values(dimensions, NULL);
+  Values* dims = new Values(dimensions, dimensions, NULL);
   // fill in all dimensions
   int i = dimensions;
   while (i-- > 0) dims->at_put(i, ipop());
@@ -3823,9 +3811,9 @@
       int start = 0;
       Values* obj_args = args_list_for_profiling(callee, start, has_receiver);
       if (obj_args != NULL) {
-        int s = obj_args->size();
+        int s = obj_args->max_length();
         // if called through method handle invoke, some arguments may have been popped
-        for (int i = args_base+start, j = 0; j < obj_args->size() && i < state()->stack_size(); ) {
+        for (int i = args_base+start, j = 0; j < obj_args->max_length() && i < state()->stack_size(); ) {
           Value v = state()->stack_at_inc(i);
           if (v->type()->is_object_kind()) {
             obj_args->push(v);
@@ -4142,7 +4130,7 @@
   // properly clone all blocks in jsr region as well as exception
   // handlers containing rets
   BlockList* new_bci2block = new BlockList(bci2block()->length());
-  new_bci2block->push_all(bci2block());
+  new_bci2block->appendAll(bci2block());
   data->set_bci2block(new_bci2block);
   data->set_scope(scope());
   data->setup_jsr_xhandlers();
--- a/hotspot/src/share/vm/c1/c1_IR.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_IR.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -531,7 +531,7 @@
   _visited_blocks(_max_block_id),
   _active_blocks(_max_block_id),
   _dominator_blocks(_max_block_id),
-  _forward_branches(_max_block_id, 0),
+  _forward_branches(_max_block_id, _max_block_id, 0),
   _loop_end_blocks(8),
   _work_list(8),
   _linear_scan_order(NULL), // initialized later with correct size
@@ -849,13 +849,13 @@
     return false;
   }
 
-  assert(_linear_scan_order->index_of(cur) == -1, "block already processed (block can be ready only once)");
-  assert(_work_list.index_of(cur) == -1, "block already in work-list (block can be ready only once)");
+  assert(_linear_scan_order->find(cur) == -1, "block already processed (block can be ready only once)");
+  assert(_work_list.find(cur) == -1, "block already in work-list (block can be ready only once)");
   return true;
 }
 
 void ComputeLinearScanOrder::sort_into_work_list(BlockBegin* cur) {
-  assert(_work_list.index_of(cur) == -1, "block already in work list");
+  assert(_work_list.find(cur) == -1, "block already in work list");
 
   int cur_weight = compute_weight(cur);
 
@@ -891,7 +891,7 @@
 
 void ComputeLinearScanOrder::append_block(BlockBegin* cur) {
   TRACE_LINEAR_SCAN(3, tty->print_cr("appending block B%d (weight 0x%6x) to linear-scan order", cur->block_id(), cur->linear_scan_number()));
-  assert(_linear_scan_order->index_of(cur) == -1, "cannot add the same block twice");
+  assert(_linear_scan_order->find(cur) == -1, "cannot add the same block twice");
 
   // currently, the linear scan order and code emit order are equal.
   // therefore the linear_scan_number and the weight of a block must also
@@ -1116,13 +1116,13 @@
     BlockBegin* cur = _linear_scan_order->at(i);
 
     assert(cur->linear_scan_number() == i, "incorrect linear_scan_number");
-    assert(cur->linear_scan_number() >= 0 && cur->linear_scan_number() == _linear_scan_order->index_of(cur), "incorrect linear_scan_number");
+    assert(cur->linear_scan_number() >= 0 && cur->linear_scan_number() == _linear_scan_order->find(cur), "incorrect linear_scan_number");
 
     int j;
     for (j = cur->number_of_sux() - 1; j >= 0; j--) {
       BlockBegin* sux = cur->sux_at(j);
 
-      assert(sux->linear_scan_number() >= 0 && sux->linear_scan_number() == _linear_scan_order->index_of(sux), "incorrect linear_scan_number");
+      assert(sux->linear_scan_number() >= 0 && sux->linear_scan_number() == _linear_scan_order->find(sux), "incorrect linear_scan_number");
       if (!sux->is_set(BlockBegin::backward_branch_target_flag)) {
         assert(cur->linear_scan_number() < sux->linear_scan_number(), "invalid order");
       }
@@ -1134,7 +1134,7 @@
     for (j = cur->number_of_preds() - 1; j >= 0; j--) {
       BlockBegin* pred = cur->pred_at(j);
 
-      assert(pred->linear_scan_number() >= 0 && pred->linear_scan_number() == _linear_scan_order->index_of(pred), "incorrect linear_scan_number");
+      assert(pred->linear_scan_number() >= 0 && pred->linear_scan_number() == _linear_scan_order->find(pred), "incorrect linear_scan_number");
       if (!cur->is_set(BlockBegin::backward_branch_target_flag)) {
         assert(cur->linear_scan_number() > pred->linear_scan_number(), "invalid order");
       }
@@ -1256,8 +1256,7 @@
 }
 
 
-define_array(BlockListArray, BlockList*)
-define_stack(BlockListList, BlockListArray)
+typedef GrowableArray<BlockList*> BlockListList;
 
 class PredecessorValidator : public BlockClosure {
  private:
@@ -1271,7 +1270,7 @@
  public:
   PredecessorValidator(IR* hir) {
     ResourceMark rm;
-    _predecessors = new BlockListList(BlockBegin::number_of_blocks(), NULL);
+    _predecessors = new BlockListList(BlockBegin::number_of_blocks(), BlockBegin::number_of_blocks(), NULL);
     _blocks = new BlockList();
 
     int i;
--- a/hotspot/src/share/vm/c1/c1_IR.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_IR.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, 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
@@ -104,9 +104,7 @@
   bool equals(XHandler* other) const;
 };
 
-define_array(_XHandlerArray, XHandler*)
-define_stack(_XHandlerList, _XHandlerArray)
-
+typedef GrowableArray<XHandler*> _XHandlerList;
 
 // XHandlers is the C1 internal list of exception handlers for a method
 class XHandlers: public CompilationResourceObj {
@@ -132,8 +130,7 @@
 
 
 class IRScope;
-define_array(IRScopeArray, IRScope*)
-define_stack(IRScopeList, IRScopeArray)
+typedef GrowableArray<IRScope*> IRScopeList;
 
 class Compilation;
 class IRScope: public CompilationResourceObj {
--- a/hotspot/src/share/vm/c1/c1_Instruction.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_Instruction.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, 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
@@ -564,7 +564,7 @@
   for (int s = 0; s < from->number_of_sux();) {
     BlockBegin* sux = from->sux_at(s);
     if (sux == to) {
-      int index = sux->_predecessors.index_of(from);
+      int index = sux->_predecessors.find(from);
       if (index >= 0) {
         sux->_predecessors.remove_at(index);
       }
@@ -664,7 +664,7 @@
 
 void BlockBegin::remove_successor(BlockBegin* pred) {
   int idx;
-  while ((idx = _successors.index_of(pred)) >= 0) {
+  while ((idx = _successors.find(pred)) >= 0) {
     _successors.remove_at(idx);
   }
 }
@@ -677,7 +677,7 @@
 
 void BlockBegin::remove_predecessor(BlockBegin* pred) {
   int idx;
-  while ((idx = _predecessors.index_of(pred)) >= 0) {
+  while ((idx = _predecessors.find(pred)) >= 0) {
     _predecessors.remove_at(idx);
   }
 }
@@ -722,13 +722,15 @@
 
 
 void BlockBegin::iterate_preorder(BlockClosure* closure) {
-  boolArray mark(number_of_blocks(), false);
+  int mark_len = number_of_blocks();
+  boolArray mark(mark_len, mark_len, false);
   iterate_preorder(mark, closure);
 }
 
 
 void BlockBegin::iterate_postorder(BlockClosure* closure) {
-  boolArray mark(number_of_blocks(), false);
+  int mark_len = number_of_blocks();
+  boolArray mark(mark_len, mark_len, false);
   iterate_postorder(mark, closure);
 }
 
--- a/hotspot/src/share/vm/c1/c1_Instruction.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_Instruction.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, 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
@@ -115,11 +115,8 @@
 
 // A Value is a reference to the instruction creating the value
 typedef Instruction* Value;
-define_array(ValueArray, Value)
-define_stack(Values, ValueArray)
-
-define_array(ValueStackArray, ValueStack*)
-define_stack(ValueStackStack, ValueStackArray)
+typedef GrowableArray<Value> Values;
+typedef GrowableArray<ValueStack*> ValueStackStack;
 
 // BlockClosure is the base class for block traversal/iteration.
 
@@ -137,14 +134,13 @@
 
 
 // Some array and list classes
-define_array(BlockBeginArray, BlockBegin*)
-define_stack(_BlockList, BlockBeginArray)
-
-class BlockList: public _BlockList {
+typedef GrowableArray<BlockBegin*> BlockBeginArray;
+
+class BlockList: public GrowableArray<BlockBegin*> {
  public:
-  BlockList(): _BlockList() {}
-  BlockList(const int size): _BlockList(size) {}
-  BlockList(const int size, BlockBegin* init): _BlockList(size, init) {}
+  BlockList(): GrowableArray<BlockBegin*>() {}
+  BlockList(const int size): GrowableArray<BlockBegin*>(size) {}
+  BlockList(const int size, BlockBegin* init): GrowableArray<BlockBegin*>(size, size, init) {}
 
   void iterate_forward(BlockClosure* closure);
   void iterate_backward(BlockClosure* closure);
@@ -1747,7 +1743,7 @@
   void remove_predecessor(BlockBegin* pred);
   bool is_predecessor(BlockBegin* pred) const    { return _predecessors.contains(pred); }
   int number_of_preds() const                    { return _predecessors.length(); }
-  BlockBegin* pred_at(int i) const               { return _predecessors[i]; }
+  BlockBegin* pred_at(int i) const               { return _predecessors.at(i); }
 
   // exception handlers potentially invoked by this block
   void add_exception_handler(BlockBegin* b);
@@ -2612,10 +2608,7 @@
   void set_from(BlockBegin* b) { _from = b; }
 };
 
-
-define_array(BlockPairArray, BlockPair*)
-define_stack(BlockPairList, BlockPairArray)
-
+typedef GrowableArray<BlockPair*> BlockPairList;
 
 inline int         BlockBegin::number_of_sux() const            { assert(_end == NULL || _end->number_of_sux() == _successors.length(), "mismatch"); return _successors.length(); }
 inline BlockBegin* BlockBegin::sux_at(int i) const              { assert(_end == NULL || _end->sux_at(i) == _successors.at(i), "mismatch");          return _successors.at(i); }
--- a/hotspot/src/share/vm/c1/c1_LIR.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_LIR.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -483,6 +483,7 @@
     case lir_membar_storestore:        // result and info always invalid
     case lir_membar_loadstore:         // result and info always invalid
     case lir_membar_storeload:         // result and info always invalid
+    case lir_on_spin_wait:
     {
       assert(op->as_Op0() != NULL, "must be");
       assert(op->_info == NULL, "info not used by this instruction");
@@ -727,31 +728,6 @@
       break;
     }
 
-
-    case lir_tan:
-    case lir_log10: {
-      assert(op->as_Op2() != NULL, "must be");
-      LIR_Op2* op2 = (LIR_Op2*)op;
-
-      // On x86 tan/sin/cos need two temporary fpu stack slots and
-      // log/log10 need one so handle opr2 and tmp as temp inputs.
-      // Register input operand as temp to guarantee that it doesn't
-      // overlap with the input.
-      assert(op2->_info == NULL, "not used");
-      assert(op2->_tmp5->is_illegal(), "not used");
-      assert(op2->_opr1->is_valid(), "used");
-      do_input(op2->_opr1); do_temp(op2->_opr1);
-
-      if (op2->_opr2->is_valid())         do_temp(op2->_opr2);
-      if (op2->_tmp1->is_valid())         do_temp(op2->_tmp1);
-      if (op2->_tmp2->is_valid())         do_temp(op2->_tmp2);
-      if (op2->_tmp3->is_valid())         do_temp(op2->_tmp3);
-      if (op2->_tmp4->is_valid())         do_temp(op2->_tmp4);
-      if (op2->_result->is_valid())       do_output(op2->_result);
-
-      break;
-    }
-
 // LIR_Op3
     case lir_idiv:
     case lir_irem: {
@@ -1691,6 +1667,7 @@
      case lir_word_align:            s = "word_align";    break;
      case lir_label:                 s = "label";         break;
      case lir_nop:                   s = "nop";           break;
+     case lir_on_spin_wait:          s = "on_spin_wait";  break;
      case lir_backwardbranch_target: s = "backbranch";    break;
      case lir_std_entry:             s = "std_entry";     break;
      case lir_osr_entry:             s = "osr_entry";     break;
@@ -1738,8 +1715,6 @@
      case lir_rem:                   s = "rem";           break;
      case lir_abs:                   s = "abs";           break;
      case lir_sqrt:                  s = "sqrt";          break;
-     case lir_tan:                   s = "tan";           break;
-     case lir_log10:                 s = "log10";         break;
      case lir_logic_and:             s = "logic_and";     break;
      case lir_logic_or:              s = "logic_or";      break;
      case lir_logic_xor:             s = "logic_xor";     break;
--- a/hotspot/src/share/vm/c1/c1_LIR.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_LIR.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, 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
@@ -59,17 +59,9 @@
 typedef LIR_OprDesc* LIR_Opr;
 typedef int          RegNr;
 
-define_array(LIR_OprArray, LIR_Opr)
-define_stack(LIR_OprList, LIR_OprArray)
-
-define_array(LIR_OprRefArray, LIR_Opr*)
-define_stack(LIR_OprRefList, LIR_OprRefArray)
-
-define_array(CodeEmitInfoArray, CodeEmitInfo*)
-define_stack(CodeEmitInfoList, CodeEmitInfoArray)
-
-define_array(LIR_OpArray, LIR_Op*)
-define_stack(LIR_OpList, LIR_OpArray)
+typedef GrowableArray<LIR_Opr> LIR_OprList;
+typedef GrowableArray<LIR_Op*> LIR_OpArray;
+typedef GrowableArray<LIR_Op*> LIR_OpList;
 
 // define LIR_OprPtr early so LIR_OprDesc can refer to it
 class LIR_OprPtr: public CompilationResourceObj {
@@ -920,6 +912,7 @@
       , lir_membar_loadstore
       , lir_membar_storeload
       , lir_get_thread
+      , lir_on_spin_wait
   , end_op0
   , begin_op1
       , lir_fxch
@@ -2101,6 +2094,8 @@
   void std_entry(LIR_Opr receiver)               { append(new LIR_Op0(lir_std_entry, receiver)); }
   void osr_entry(LIR_Opr osrPointer)             { append(new LIR_Op0(lir_osr_entry, osrPointer)); }
 
+  void on_spin_wait()                            { append(new LIR_Op0(lir_on_spin_wait)); }
+
   void branch_destination(Label* lbl)            { append(new LIR_OpLabel(lbl)); }
 
   void negate(LIR_Opr from, LIR_Opr to)          { append(new LIR_Op1(lir_neg, from, to)); }
--- a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, 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
@@ -127,7 +127,7 @@
 
 void LIR_Assembler::emit_stubs(CodeStubList* stub_list) {
   for (int m = 0; m < stub_list->length(); m++) {
-    CodeStub* s = (*stub_list)[m];
+    CodeStub* s = stub_list->at(m);
 
     check_codespace();
     CHECK_BAILOUT();
@@ -678,6 +678,10 @@
       get_thread(op->result_opr());
       break;
 
+    case lir_on_spin_wait:
+      on_spin_wait();
+      break;
+
     default:
       ShouldNotReachHere();
       break;
--- a/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -250,6 +250,7 @@
   void membar_storestore();
   void membar_loadstore();
   void membar_storeload();
+  void on_spin_wait();
   void get_thread(LIR_Opr result);
 
   void verify_oop_map(CodeEmitInfo* info);
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -150,7 +150,7 @@
   int i;
   // resolve any cycles in moves from and to virtual registers
   for (i = virtual_operands().length() - 1; i >= 0; i --) {
-    ResolveNode* node = virtual_operands()[i];
+    ResolveNode* node = virtual_operands().at(i);
     if (!node->visited()) {
       _loop = NULL;
       move(NULL, node);
@@ -161,7 +161,7 @@
 
   // generate move for move from non virtual register to abitrary destination
   for (i = other_operands().length() - 1; i >= 0; i --) {
-    ResolveNode* node = other_operands()[i];
+    ResolveNode* node = other_operands().at(i);
     for (int j = node->no_of_destinations() - 1; j >= 0; j --) {
       emit_move(node->operand(), node->destination_at(j)->operand());
     }
@@ -177,7 +177,7 @@
     assert(node == NULL || node->operand() == opr, "");
     if (node == NULL) {
       node = new ResolveNode(opr);
-      vreg_table()[vreg_num] = node;
+      vreg_table().at_put(vreg_num, node);
     }
     // Make sure that all virtual operands show up in the list when
     // they are used as the source of a move.
@@ -3161,7 +3161,9 @@
   case vmIntrinsics::_fullFence :
     if (os::is_MP()) __ membar();
     break;
-
+  case vmIntrinsics::_onSpinWait:
+    __ on_spin_wait();
+    break;
   case vmIntrinsics::_Reference_get:
     do_Reference_get(x);
     break;
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, 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
@@ -39,8 +39,7 @@
 class SwitchRange;
 class LIRItem;
 
-define_array(LIRItemArray, LIRItem*)
-define_stack(LIRItemList, LIRItemArray)
+typedef GrowableArray<LIRItem*> LIRItemList;
 
 class SwitchRange: public CompilationResourceObj {
  private:
@@ -56,15 +55,12 @@
   BlockBegin* sux() const { return _sux; }
 };
 
-define_array(SwitchRangeArray, SwitchRange*)
-define_stack(SwitchRangeList, SwitchRangeArray)
-
+typedef GrowableArray<SwitchRange*> SwitchRangeArray;
+typedef GrowableArray<SwitchRange*> SwitchRangeList;
 
 class ResolveNode;
 
-define_array(NodeArray, ResolveNode*);
-define_stack(NodeList, NodeArray);
-
+typedef GrowableArray<ResolveNode*> NodeList;
 
 // Node objects form a directed graph of LIR_Opr
 // Edges between Nodes represent moves from one Node to its destinations
@@ -86,7 +82,7 @@
   // accessors
   LIR_Opr operand() const           { return _operand; }
   int no_of_destinations() const    { return _destinations.length(); }
-  ResolveNode* destination_at(int i)     { return _destinations[i]; }
+  ResolveNode* destination_at(int i)     { return _destinations.at(i); }
   bool assigned() const             { return _assigned; }
   bool visited() const              { return _visited; }
   bool start_node() const           { return _start_node; }
--- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -496,8 +496,8 @@
   }
 
   // initialize with correct length
-  _lir_ops = LIR_OpArray(num_instructions);
-  _block_of_op = BlockBeginArray(num_instructions);
+  _lir_ops = LIR_OpArray(num_instructions, num_instructions, NULL);
+  _block_of_op = BlockBeginArray(num_instructions, num_instructions, NULL);
 
   int op_id = 0;
   int idx = 0;
@@ -2507,7 +2507,8 @@
 void LinearScan::init_compute_debug_info() {
   // cache for frequently used scope values
   // (cpu registers and stack slots)
-  _scope_value_cache = ScopeValueArray((LinearScan::nof_cpu_regs + frame_map()->argcount() + max_spills()) * 2, NULL);
+  int cache_size = (LinearScan::nof_cpu_regs + frame_map()->argcount() + max_spills()) * 2;
+  _scope_value_cache = ScopeValueArray(cache_size, cache_size, NULL);
 }
 
 MonitorValue* LinearScan::location_for_monitor_index(int monitor_index) {
@@ -3042,7 +3043,7 @@
         insert_point++;
       }
     }
-    instructions->truncate(insert_point);
+    instructions->trunc_to(insert_point);
   }
 }
 
@@ -3446,7 +3447,7 @@
   RegisterVerifier(LinearScan* allocator)
     : _allocator(allocator)
     , _work_list(16)
-    , _saved_states(BlockBegin::number_of_blocks(), NULL)
+    , _saved_states(BlockBegin::number_of_blocks(), BlockBegin::number_of_blocks(), NULL)
   { }
 
   void verify(BlockBegin* start);
@@ -4452,7 +4453,7 @@
     new_use_pos_and_kinds.append(_use_pos_and_kinds.at(i));
   }
 
-  _use_pos_and_kinds.truncate(start_idx + 2);
+  _use_pos_and_kinds.trunc_to(start_idx + 2);
   result->_use_pos_and_kinds = _use_pos_and_kinds;
   _use_pos_and_kinds = new_use_pos_and_kinds;
 
@@ -5540,7 +5541,7 @@
     IntervalList* processed = _spill_intervals[reg];
     for (int i = 0; i < _spill_intervals[regHi]->length(); i++) {
       Interval* it = _spill_intervals[regHi]->at(i);
-      if (processed->find_from_end(it) == -1) {
+      if (processed->find(it) == -1) {
         remove_from_list(it);
         split_and_spill_interval(it);
       }
@@ -6211,7 +6212,7 @@
       _original_preds.clear();
       for (j = block->number_of_preds() - 1; j >= 0; j--) {
         BlockBegin* pred = block->pred_at(j);
-        if (_original_preds.index_of(pred) == -1) {
+        if (_original_preds.find(pred) == -1) {
           _original_preds.append(pred);
         }
       }
@@ -6231,7 +6232,7 @@
     }
     old_pos++;
   }
-  code->truncate(new_pos);
+  code->trunc_to(new_pos);
 
   DEBUG_ONLY(verify(code));
 }
@@ -6256,7 +6257,7 @@
           TRACE_LINEAR_SCAN(3, tty->print_cr("Deleting unconditional branch at end of block B%d", block->block_id()));
 
           // delete last branch instruction
-          instructions->truncate(instructions->length() - 1);
+          instructions->trunc_to(instructions->length() - 1);
 
         } else {
           LIR_Op* prev_op = instructions->at(instructions->length() - 2);
@@ -6295,7 +6296,7 @@
                 prev_branch->change_block(last_branch->block());
                 prev_branch->negate_cond();
                 prev_cmp->set_condition(prev_branch->cond());
-                instructions->truncate(instructions->length() - 1);
+                instructions->trunc_to(instructions->length() - 1);
                 // if we do change the condition, we have to change the cmove as well
                 if (prev_cmove != NULL) {
                   prev_cmove->set_condition(prev_branch->cond());
@@ -6378,19 +6379,19 @@
       LIR_OpBranch* op_branch = instructions->at(j)->as_OpBranch();
 
       if (op_branch != NULL) {
-        assert(op_branch->block() == NULL || code->index_of(op_branch->block()) != -1, "branch target not valid");
-        assert(op_branch->ublock() == NULL || code->index_of(op_branch->ublock()) != -1, "branch target not valid");
+        assert(op_branch->block() == NULL || code->find(op_branch->block()) != -1, "branch target not valid");
+        assert(op_branch->ublock() == NULL || code->find(op_branch->ublock()) != -1, "branch target not valid");
       }
     }
 
     for (j = 0; j < block->number_of_sux() - 1; j++) {
       BlockBegin* sux = block->sux_at(j);
-      assert(code->index_of(sux) != -1, "successor not valid");
+      assert(code->find(sux) != -1, "successor not valid");
     }
 
     for (j = 0; j < block->number_of_preds() - 1; j++) {
       BlockBegin* pred = block->pred_at(j);
-      assert(code->index_of(pred) != -1, "successor not valid");
+      assert(code->find(pred) != -1, "successor not valid");
     }
   }
 }
--- a/hotspot/src/share/vm/c1/c1_LinearScan.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_LinearScan.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -44,18 +44,9 @@
 
 typedef GrowableArray<Interval*> IntervalArray;
 typedef GrowableArray<Interval*> IntervalList;
-
-define_array(IntervalsArray, IntervalList*)
-define_stack(IntervalsList, IntervalsArray)
-
-define_array(OopMapArray, OopMap*)
-define_stack(OopMapList, OopMapArray)
-
-define_array(ScopeValueArray, ScopeValue*)
-
-define_array(LIR_OpListArray, LIR_OpList*);
-define_stack(LIR_OpListStack, LIR_OpListArray);
-
+typedef GrowableArray<IntervalList*> IntervalsList;
+typedef GrowableArray<ScopeValue*> ScopeValueArray;
+typedef GrowableArray<LIR_OpList*> LIR_OpListStack;
 
 enum IntervalUseKind {
   // priority of use kinds must be ascending
@@ -67,9 +58,6 @@
   firstValidKind = 1,
   lastValidKind = 3
 };
-define_array(UseKindArray, IntervalUseKind)
-define_stack(UseKindStack, UseKindArray)
-
 
 enum IntervalKind {
   fixedKind = 0,  // interval pre-colored by LIR_Generator
@@ -619,7 +607,7 @@
   void   add_range(int from, int to);
   Interval* split(int split_pos);
   Interval* split_from_start(int split_pos);
-  void remove_first_use_pos()                    { _use_pos_and_kinds.truncate(_use_pos_and_kinds.length() - 2); }
+  void remove_first_use_pos()                    { _use_pos_and_kinds.trunc_to(_use_pos_and_kinds.length() - 2); }
 
   // test intersection
   bool   covers(int op_id, LIR_OpVisitState::OprMode mode) const;
--- a/hotspot/src/share/vm/c1/c1_Optimizer.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_Optimizer.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -32,9 +32,7 @@
 #include "utilities/bitMap.inline.hpp"
 #include "compiler/compileLog.hpp"
 
-define_array(ValueSetArray, ValueSet*);
-define_stack(ValueSetList, ValueSetArray);
-
+typedef GrowableArray<ValueSet*> ValueSetList;
 
 Optimizer::Optimizer(IR* ir) {
   assert(ir->is_valid(), "IR must be valid");
@@ -584,8 +582,8 @@
 
   ValueSet* state()                               { return _set; }
   void      set_state_from (ValueSet* state)      { _set->set_from(state); }
-  ValueSet* state_for      (BlockBegin* block)    { return _block_states[block->block_id()]; }
-  void      set_state_for  (BlockBegin* block, ValueSet* stack) { _block_states[block->block_id()] = stack; }
+  ValueSet* state_for      (BlockBegin* block)    { return _block_states.at(block->block_id()); }
+  void      set_state_for  (BlockBegin* block, ValueSet* stack) { _block_states.at_put(block->block_id(), stack); }
   // Returns true if caused a change in the block's state.
   bool      merge_state_for(BlockBegin* block,
                             ValueSet*   incoming_state);
@@ -596,7 +594,7 @@
     : _opt(opt)
     , _set(new ValueSet())
     , _last_explicit_null_check(NULL)
-    , _block_states(BlockBegin::number_of_blocks(), NULL)
+    , _block_states(BlockBegin::number_of_blocks(), BlockBegin::number_of_blocks(), NULL)
     , _work_list(new BlockList()) {
     _visitable_instructions = new ValueSet();
     _visitor.set_eliminator(this);
@@ -1165,19 +1163,19 @@
   // handlers and iterate over them as well
   int nblocks = BlockBegin::number_of_blocks();
   BlockList blocks(nblocks);
-  boolArray visited_block(nblocks, false);
+  boolArray visited_block(nblocks, nblocks, false);
 
   blocks.push(ir()->start());
-  visited_block[ir()->start()->block_id()] = true;
+  visited_block.at_put(ir()->start()->block_id(), true);
   for (int i = 0; i < blocks.length(); i++) {
-    BlockBegin* b = blocks[i];
+    BlockBegin* b = blocks.at(i);
     // exception handlers need to be treated as additional roots
     for (int e = b->number_of_exception_handlers(); e-- > 0; ) {
       BlockBegin* excp = b->exception_handler_at(e);
       int id = excp->block_id();
-      if (!visited_block[id]) {
+      if (!visited_block.at(id)) {
         blocks.push(excp);
-        visited_block[id] = true;
+        visited_block.at_put(id, true);
         nce.iterate(excp);
       }
     }
@@ -1186,9 +1184,9 @@
     for (int s = end->number_of_sux(); s-- > 0; ) {
       BlockBegin* next = end->sux_at(s);
       int id = next->block_id();
-      if (!visited_block[id]) {
+      if (!visited_block.at(id)) {
         blocks.push(next);
-        visited_block[id] = true;
+        visited_block.at_put(id, true);
       }
     }
   }
--- a/hotspot/src/share/vm/c1/c1_RangeCheckElimination.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_RangeCheckElimination.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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
@@ -53,8 +53,8 @@
 
 // Constructor
 RangeCheckEliminator::RangeCheckEliminator(IR *ir) :
-  _bounds(Instruction::number_of_instructions(), NULL),
-  _access_indexed_info(Instruction::number_of_instructions(), NULL)
+  _bounds(Instruction::number_of_instructions(), Instruction::number_of_instructions(), NULL),
+  _access_indexed_info(Instruction::number_of_instructions(), Instruction::number_of_instructions(), NULL)
 {
   _visitor.set_range_check_eliminator(this);
   _ir = ir;
@@ -303,28 +303,28 @@
   // Wrong type or NULL -> No bound
   if (!v || (!v->type()->as_IntType() && !v->type()->as_ObjectType())) return NULL;
 
-  if (!_bounds[v->id()]) {
+  if (!_bounds.at(v->id())) {
     // First (default) bound is calculated
     // Create BoundStack
-    _bounds[v->id()] = new BoundStack();
+    _bounds.at_put(v->id(), new BoundStack());
     _visitor.clear_bound();
     Value visit_value = v;
     visit_value->visit(&_visitor);
     Bound *bound = _visitor.bound();
     if (bound) {
-      _bounds[v->id()]->push(bound);
+      _bounds.at(v->id())->push(bound);
     }
-    if (_bounds[v->id()]->length() == 0) {
+    if (_bounds.at(v->id())->length() == 0) {
       assert(!(v->as_Constant() && v->type()->as_IntConstant()), "constants not handled here");
-      _bounds[v->id()]->push(new Bound());
+      _bounds.at(v->id())->push(new Bound());
     }
-  } else if (_bounds[v->id()]->length() == 0) {
+  } else if (_bounds.at(v->id())->length() == 0) {
     // To avoid endless loops, bound is currently in calculation -> nothing known about it
     return new Bound();
   }
 
   // Return bound
-  return _bounds[v->id()]->top();
+  return _bounds.at(v->id())->top();
 }
 
 // Update bound
@@ -353,28 +353,28 @@
     // No bound update for constants
     return;
   }
-  if (!_bounds[v->id()]) {
+  if (!_bounds.at(v->id())) {
     get_bound(v);
-    assert(_bounds[v->id()], "Now Stack must exist");
+    assert(_bounds.at(v->id()), "Now Stack must exist");
   }
   Bound *top = NULL;
-  if (_bounds[v->id()]->length() > 0) {
-    top = _bounds[v->id()]->top();
+  if (_bounds.at(v->id())->length() > 0) {
+    top = _bounds.at(v->id())->top();
   }
   if (top) {
     bound->and_op(top);
   }
-  _bounds[v->id()]->push(bound);
+  _bounds.at(v->id())->push(bound);
   pushed.append(v->id());
 }
 
 // Add instruction + idx for in block motion
 void RangeCheckEliminator::add_access_indexed_info(InstructionList &indices, int idx, Value instruction, AccessIndexed *ai) {
   int id = instruction->id();
-  AccessIndexedInfo *aii = _access_indexed_info[id];
+  AccessIndexedInfo *aii = _access_indexed_info.at(id);
   if (aii == NULL) {
     aii = new AccessIndexedInfo();
-    _access_indexed_info[id] = aii;
+    _access_indexed_info.at_put(id, aii);
     indices.append(instruction);
     aii->_min = idx;
     aii->_max = idx;
@@ -461,7 +461,7 @@
     if (_optimistic) {
       for (int i = 0; i < indices.length(); i++) {
         Instruction *index_instruction = indices.at(i);
-        AccessIndexedInfo *info = _access_indexed_info[index_instruction->id()];
+        AccessIndexedInfo *info = _access_indexed_info.at(index_instruction->id());
         assert(info != NULL, "Info must not be null");
 
         // if idx < 0, max > 0, max + idx may fall between 0 and
@@ -562,7 +562,7 @@
     // Clear data structures for next array
     for (int i = 0; i < indices.length(); i++) {
       Instruction *index_instruction = indices.at(i);
-      _access_indexed_info[index_instruction->id()] = NULL;
+      _access_indexed_info.at_put(index_instruction->id(), NULL);
     }
     indices.clear();
   }
@@ -1005,7 +1005,7 @@
 
   // Reset stack
   for (int i=0; i<pushed.length(); i++) {
-    _bounds[pushed[i]]->pop();
+    _bounds.at(pushed.at(i))->pop();
   }
 }
 
@@ -1051,7 +1051,7 @@
 #endif
 
 // Verification or the IR
-RangeCheckEliminator::Verification::Verification(IR *ir) : _used(BlockBegin::number_of_blocks(), false) {
+RangeCheckEliminator::Verification::Verification(IR *ir) : _used(BlockBegin::number_of_blocks(), BlockBegin::number_of_blocks(), false) {
   this->_ir = ir;
   ir->iterate_linear_scan_order(this);
 }
@@ -1146,14 +1146,14 @@
   if (start == end) return start != dont_use;
   // Simple BSF from start to end
   //  BlockBeginList _current;
-  for (int i=0; i<_used.length(); i++) {
-    _used[i] = false;
+  for (int i=0; i < _used.length(); i++) {
+    _used.at_put(i, false);
   }
-  _current.truncate(0);
-  _successors.truncate(0);
+  _current.trunc_to(0);
+  _successors.trunc_to(0);
   if (start != dont_use) {
     _current.push(start);
-    _used[start->block_id()] = true;
+    _used.at_put(start->block_id(), true);
   }
 
   //  BlockBeginList _successors;
@@ -1180,17 +1180,17 @@
       }
     }
     for (int i=0; i<_successors.length(); i++) {
-      BlockBegin *sux = _successors[i];
+      BlockBegin *sux = _successors.at(i);
       assert(sux != NULL, "Successor must not be NULL!");
       if (sux == end) {
         return true;
       }
-      if (sux != dont_use && !_used[sux->block_id()]) {
-        _used[sux->block_id()] = true;
+      if (sux != dont_use && !_used.at(sux->block_id())) {
+        _used.at_put(sux->block_id(), true);
         _current.push(sux);
       }
     }
-    _successors.truncate(0);
+    _successors.trunc_to(0);
   }
 
   return false;
--- a/hotspot/src/share/vm/c1/c1_RangeCheckElimination.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_RangeCheckElimination.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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,10 +40,8 @@
   bool _optimistic; // Insert predicates and deoptimize when they fail
   IR *_ir;
 
-  define_array(BlockBeginArray, BlockBegin*)
-  define_stack(BlockBeginList, BlockBeginArray)
-  define_stack(IntegerStack, intArray)
-  define_array(IntegerMap, IntegerStack*)
+  typedef GrowableArray<BlockBegin*> BlockBeginList;
+  typedef GrowableArray<int> IntegerStack;
 
   class Verification : public BlockClosure {
   // RangeCheckEliminator::Verification should never get instatiated on the heap.
@@ -180,13 +178,10 @@
   void add_assertions(Bound *bound, Instruction *instruction, Instruction *position);
 #endif
 
-  define_array(BoundArray, Bound *)
-  define_stack(BoundStack, BoundArray)
-  define_array(BoundMap, BoundStack *)
-  define_array(AccessIndexedArray, AccessIndexed *)
-  define_stack(AccessIndexedList, AccessIndexedArray)
-  define_array(InstructionArray, Instruction *)
-  define_stack(InstructionList, InstructionArray)
+  typedef GrowableArray<Bound*> BoundStack;
+  typedef GrowableArray<BoundStack*> BoundMap;
+  typedef GrowableArray<AccessIndexed*> AccessIndexedList;
+  typedef GrowableArray<Instruction*> InstructionList;
 
   class AccessIndexedInfo : public CompilationResourceObj  {
   public:
@@ -195,7 +190,7 @@
     int _max;
   };
 
-  define_array(AccessIndexedInfoArray, AccessIndexedInfo *)
+  typedef GrowableArray<AccessIndexedInfo*> AccessIndexedInfoArray;
   BoundMap _bounds; // Mapping from Instruction's id to current bound
   AccessIndexedInfoArray _access_indexed_info; // Mapping from Instruction's id to AccessIndexedInfo for in block motion
   Visitor _visitor;
--- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -320,9 +320,11 @@
   FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32());
   FUNCTION_CASE(entry, StubRoutines::dexp());
   FUNCTION_CASE(entry, StubRoutines::dlog());
+  FUNCTION_CASE(entry, StubRoutines::dlog10());
   FUNCTION_CASE(entry, StubRoutines::dpow());
   FUNCTION_CASE(entry, StubRoutines::dsin());
   FUNCTION_CASE(entry, StubRoutines::dcos());
+  FUNCTION_CASE(entry, StubRoutines::dtan());
 
 #undef FUNCTION_CASE
 
--- a/hotspot/src/share/vm/c1/c1_ValueMap.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_ValueMap.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, 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
@@ -46,7 +46,7 @@
 
 ValueMap::ValueMap()
   : _nesting(0)
-  , _entries(ValueMapInitialSize, NULL)
+  , _entries(ValueMapInitialSize, ValueMapInitialSize, NULL)
   , _killed_values()
   , _entry_count(0)
 {
@@ -56,7 +56,7 @@
 
 ValueMap::ValueMap(ValueMap* old)
   : _nesting(old->_nesting + 1)
-  , _entries(old->_entries.length())
+  , _entries(old->_entries.length(), old->_entries.length(), NULL)
   , _killed_values()
   , _entry_count(old->_entry_count)
 {
@@ -72,7 +72,7 @@
   int new_size = old_size * 2 + 1;
 
   ValueMapEntryList worklist(8);
-  ValueMapEntryArray new_entries(new_size, NULL);
+  ValueMapEntryArray new_entries(new_size, new_size, NULL);
   int new_entry_count = 0;
 
   TRACE_VALUE_NUMBERING(tty->print_cr("increasing table size from %d to %d", old_size, new_size));
@@ -486,7 +486,7 @@
 
 GlobalValueNumbering::GlobalValueNumbering(IR* ir)
   : _current_map(NULL)
-  , _value_maps(ir->linear_scan_order()->length(), NULL)
+  , _value_maps(ir->linear_scan_order()->length(), ir->linear_scan_order()->length(), NULL)
   , _compilation(ir->compilation())
 {
   TRACE_VALUE_NUMBERING(tty->print_cr("****** start of global value numbering"));
--- a/hotspot/src/share/vm/c1/c1_ValueMap.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_ValueMap.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, 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
@@ -53,8 +53,8 @@
   void set_next(ValueMapEntry* next) { _next = next; }
 };
 
-define_array(ValueMapEntryArray, ValueMapEntry*)
-define_stack(ValueMapEntryList, ValueMapEntryArray)
+typedef GrowableArray<ValueMapEntry*> ValueMapEntryArray;
+typedef GrowableArray<ValueMapEntry*> ValueMapEntryList;
 
 // ValueMap implements nested hash tables for value numbering.  It
 // maintains a set _killed_values which represents the instructions
@@ -129,8 +129,7 @@
 #endif
 };
 
-define_array(ValueMapArray, ValueMap*)
-
+typedef GrowableArray<ValueMap*> ValueMapArray;
 
 class ValueNumberingVisitor: public InstructionVisitor {
  protected:
--- a/hotspot/src/share/vm/c1/c1_ValueStack.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/c1/c1_ValueStack.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, 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
@@ -35,7 +35,7 @@
 , _caller_state(caller_state)
 , _bci(-99)
 , _kind(Parsing)
-, _locals(scope->method()->max_locals(), NULL)
+, _locals(scope->method()->max_locals(), scope->method()->max_locals(), NULL)
 , _stack(scope->method()->max_stack())
 , _locks()
 {
@@ -178,7 +178,7 @@
 
   ValueType* t = stack_at(index)->type();
   Value phi = new Phi(t, b, -index - 1);
-  _stack[index] = phi;
+  _stack.at_put(index, phi);
 
   assert(!t->is_double_word() || _stack.at(index + 1) == NULL, "hi-word of doubleword value must be NULL");
 }
@@ -225,7 +225,7 @@
   if (locals_size() > 0) {
     InstructionPrinter ip;
     for (int i = 0; i < locals_size();) {
-      Value l = _locals[i];
+      Value l = _locals.at(i);
       tty->print("local %d ", i);
       if (l == NULL) {
         tty->print("null");
--- a/hotspot/src/share/vm/ci/ciConstant.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/ci/ciConstant.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -124,6 +124,9 @@
     }
   }
 
+  bool is_valid() const {
+    return basic_type() != T_ILLEGAL;
+  }
   // Debugging output
   void print();
 };
--- a/hotspot/src/share/vm/ci/ciField.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/ci/ciField.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -235,94 +235,75 @@
   _holder = CURRENT_ENV->get_instance_klass(fd->field_holder());
 
   // Check to see if the field is constant.
-  bool is_final = this->is_final();
-  bool is_stable = FoldStableValues && this->is_stable();
-  if (_holder->is_initialized() && (is_final || is_stable)) {
-    if (!this->is_static()) {
-      // A field can be constant if it's a final static field or if
+  Klass* k = _holder->get_Klass();
+  bool is_stable_field = FoldStableValues && is_stable();
+  if (is_final() || is_stable_field) {
+    if (is_static()) {
+      // This field just may be constant.  The only case where it will
+      // not be constant is when the field is a *special* static & final field
+      // whose value may change.  The three examples are java.lang.System.in,
+      // java.lang.System.out, and java.lang.System.err.
+      assert(SystemDictionary::System_klass() != NULL, "Check once per vm");
+      if (k == SystemDictionary::System_klass()) {
+        // Check offsets for case 2: System.in, System.out, or System.err
+        if( _offset == java_lang_System::in_offset_in_bytes()  ||
+            _offset == java_lang_System::out_offset_in_bytes() ||
+            _offset == java_lang_System::err_offset_in_bytes() ) {
+          _is_constant = false;
+          return;
+        }
+      }
+      _is_constant = true;
+    } else {
+      // An instance field can be constant if it's a final static field or if
       // it's a final non-static field of a trusted class (classes in
       // java.lang.invoke and sun.invoke packages and subpackages).
-      if (is_stable || trust_final_non_static_fields(_holder)) {
-        _is_constant = true;
-        return;
-      }
-      _is_constant = false;
-      return;
-    }
-
-    // This field just may be constant.  The only case where it will
-    // not be constant is when the field is a *special* static&final field
-    // whose value may change.  The three examples are java.lang.System.in,
-    // java.lang.System.out, and java.lang.System.err.
-
-    KlassHandle k = _holder->get_Klass();
-    assert( SystemDictionary::System_klass() != NULL, "Check once per vm");
-    if( k() == SystemDictionary::System_klass() ) {
-      // Check offsets for case 2: System.in, System.out, or System.err
-      if( _offset == java_lang_System::in_offset_in_bytes()  ||
-          _offset == java_lang_System::out_offset_in_bytes() ||
-          _offset == java_lang_System::err_offset_in_bytes() ) {
-        _is_constant = false;
-        return;
-      }
-    }
-
-    Handle mirror = k->java_mirror();
-
-    switch(type()->basic_type()) {
-    case T_BYTE:
-      _constant_value = ciConstant(type()->basic_type(), mirror->byte_field(_offset));
-      break;
-    case T_CHAR:
-      _constant_value = ciConstant(type()->basic_type(), mirror->char_field(_offset));
-      break;
-    case T_SHORT:
-      _constant_value = ciConstant(type()->basic_type(), mirror->short_field(_offset));
-      break;
-    case T_BOOLEAN:
-      _constant_value = ciConstant(type()->basic_type(), mirror->bool_field(_offset));
-      break;
-    case T_INT:
-      _constant_value = ciConstant(type()->basic_type(), mirror->int_field(_offset));
-      break;
-    case T_FLOAT:
-      _constant_value = ciConstant(mirror->float_field(_offset));
-      break;
-    case T_DOUBLE:
-      _constant_value = ciConstant(mirror->double_field(_offset));
-      break;
-    case T_LONG:
-      _constant_value = ciConstant(mirror->long_field(_offset));
-      break;
-    case T_OBJECT:
-    case T_ARRAY:
-      {
-        oop o = mirror->obj_field(_offset);
-
-        // A field will be "constant" if it is known always to be
-        // a non-null reference to an instance of a particular class,
-        // or to a particular array.  This can happen even if the instance
-        // or array is not perm.  In such a case, an "unloaded" ciArray
-        // or ciInstance is created.  The compiler may be able to use
-        // information about the object's class (which is exact) or length.
-
-        if (o == NULL) {
-          _constant_value = ciConstant(type()->basic_type(), ciNullObject::make());
-        } else {
-          _constant_value = ciConstant(type()->basic_type(), CURRENT_ENV->get_object(o));
-          assert(_constant_value.as_object() == CURRENT_ENV->get_object(o), "check interning");
-        }
-      }
-    }
-    if (is_stable && _constant_value.is_null_or_zero()) {
-      // It is not a constant after all; treat it as uninitialized.
-      _is_constant = false;
-    } else {
-      _is_constant = true;
+      _is_constant = is_stable_field || trust_final_non_static_fields(_holder);
     }
   } else {
-    _is_constant = false;
+    // For CallSite objects treat the target field as a compile time constant.
+    assert(SystemDictionary::CallSite_klass() != NULL, "should be already initialized");
+    if (k == SystemDictionary::CallSite_klass() &&
+        _offset == java_lang_invoke_CallSite::target_offset_in_bytes()) {
+      _is_constant = true;
+    } else {
+      // Non-final & non-stable fields are not constants.
+      _is_constant = false;
+    }
+  }
+}
+
+// ------------------------------------------------------------------
+// ciField::constant_value
+// Get the constant value of a this static field.
+ciConstant ciField::constant_value() {
+  assert(is_static() && is_constant(), "illegal call to constant_value()");
+  if (!_holder->is_initialized()) {
+    return ciConstant(); // Not initialized yet
   }
+  if (_constant_value.basic_type() == T_ILLEGAL) {
+    // Static fields are placed in mirror objects.
+    VM_ENTRY_MARK;
+    ciInstance* mirror = CURRENT_ENV->get_instance(_holder->get_Klass()->java_mirror());
+    _constant_value = mirror->field_value_impl(type()->basic_type(), offset());
+  }
+  if (FoldStableValues && is_stable() && _constant_value.is_null_or_zero()) {
+    return ciConstant();
+  }
+  return _constant_value;
+}
+
+// ------------------------------------------------------------------
+// ciField::constant_value_of
+// Get the constant value of non-static final field in the given object.
+ciConstant ciField::constant_value_of(ciObject* object) {
+  assert(!is_static() && is_constant(), "only if field is non-static constant");
+  assert(object->is_instance(), "must be instance");
+  ciConstant field_value = object->as_instance()->field_value(this);
+  if (FoldStableValues && is_stable() && field_value.is_null_or_zero()) {
+    return ciConstant();
+  }
+  return field_value;
 }
 
 // ------------------------------------------------------------------
--- a/hotspot/src/share/vm/ci/ciField.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/ci/ciField.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -62,7 +62,7 @@
   void initialize_from(fieldDescriptor* fd);
 
 public:
-  ciFlags flags() { return _flags; }
+  ciFlags flags() const { return _flags; }
 
   // Of which klass is this field a member?
   //
@@ -89,13 +89,13 @@
   //
   //   In that case the declared holder of f would be B and
   //   the canonical holder of f would be A.
-  ciInstanceKlass* holder() { return _holder; }
+  ciInstanceKlass* holder() const { return _holder; }
 
   // Name of this field?
-  ciSymbol* name() { return _name; }
+  ciSymbol* name() const { return _name; }
 
   // Signature of this field?
-  ciSymbol* signature() { return _signature; }
+  ciSymbol* signature() const { return _signature; }
 
   // Of what type is this field?
   ciType* type() { return (_type == NULL) ? compute_type() : _type; }
@@ -107,13 +107,13 @@
   int size_in_bytes() { return type2aelembytes(layout_type()); }
 
   // What is the offset of this field?
-  int offset() {
+  int offset() const {
     assert(_offset >= 1, "illegal call to offset()");
     return _offset;
   }
 
   // Same question, explicit units.  (Fields are aligned to the byte level.)
-  int offset_in_bytes() {
+  int offset_in_bytes() const {
     return offset();
   }
 
@@ -127,31 +127,27 @@
   //
   // Clarification: A field is considered constant if:
   //   1. The field is both static and final
-  //   2. The canonical holder of the field has undergone
-  //      static initialization.
-  //   3. The field is not one of the special static/final
+  //   2. The field is not one of the special static/final
   //      non-constant fields.  These are java.lang.System.in
   //      and java.lang.System.out.  Abomination.
   //
   // A field is also considered constant if it is marked @Stable
   // and is non-null (or non-zero, if a primitive).
-  // For non-static fields, the null/zero check must be
-  // arranged by the user, as constant_value().is_null_or_zero().
-  bool is_constant() { return _is_constant; }
+  //
+  // A user should also check the field value (constant_value().is_valid()), since
+  // constant fields of non-initialized classes don't have values yet.
+  bool is_constant() const { return _is_constant; }
 
-  // Get the constant value of this field.
-  ciConstant constant_value() {
-    assert(is_static() && is_constant(), "illegal call to constant_value()");
-    return _constant_value;
+  // Get the constant value of the static field.
+  ciConstant constant_value();
+
+  bool is_static_constant() {
+    return is_static() && is_constant() && constant_value().is_valid();
   }
 
   // Get the constant value of non-static final field in the given
   // object.
-  ciConstant constant_value_of(ciObject* object) {
-    assert(!is_static() && is_constant(), "only if field is non-static constant");
-    assert(object->is_instance(), "must be instance");
-    return object->as_instance()->field_value(this);
-  }
+  ciConstant constant_value_of(ciObject* object);
 
   // Check for link time errors.  Accessing a field from a
   // certain class via a certain bytecode may or may not be legal.
@@ -165,14 +161,14 @@
                  Bytecodes::Code bc);
 
   // Java access flags
-  bool is_public      () { return flags().is_public(); }
-  bool is_private     () { return flags().is_private(); }
-  bool is_protected   () { return flags().is_protected(); }
-  bool is_static      () { return flags().is_static(); }
-  bool is_final       () { return flags().is_final(); }
-  bool is_stable      () { return flags().is_stable(); }
-  bool is_volatile    () { return flags().is_volatile(); }
-  bool is_transient   () { return flags().is_transient(); }
+  bool is_public      () const { return flags().is_public(); }
+  bool is_private     () const { return flags().is_private(); }
+  bool is_protected   () const { return flags().is_protected(); }
+  bool is_static      () const { return flags().is_static(); }
+  bool is_final       () const { return flags().is_final(); }
+  bool is_stable      () const { return flags().is_stable(); }
+  bool is_volatile    () const { return flags().is_volatile(); }
+  bool is_transient   () const { return flags().is_transient(); }
 
   bool is_call_site_target() {
     ciInstanceKlass* callsite_klass = CURRENT_ENV->CallSite_klass();
--- a/hotspot/src/share/vm/ci/ciInstance.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/ci/ciInstance.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -56,49 +56,21 @@
 }
 
 // ------------------------------------------------------------------
-// ciInstance::field_value
-//
-// Constant value of a field.
-ciConstant ciInstance::field_value(ciField* field) {
-  assert(is_loaded(), "invalid access - must be loaded");
-  assert(field->holder()->is_loaded(), "invalid access - holder must be loaded");
-  assert(klass()->is_subclass_of(field->holder()), "invalid access - must be subclass");
-
-  VM_ENTRY_MARK;
-  ciConstant result;
+// ciInstance::field_value_impl
+ciConstant ciInstance::field_value_impl(BasicType field_btype, int offset) {
   Handle obj = get_oop();
   assert(!obj.is_null(), "bad oop");
-  BasicType field_btype = field->type()->basic_type();
-  int offset = field->offset();
-
   switch(field_btype) {
-  case T_BYTE:
-    return ciConstant(field_btype, obj->byte_field(offset));
-    break;
-  case T_CHAR:
-    return ciConstant(field_btype, obj->char_field(offset));
-    break;
-  case T_SHORT:
-    return ciConstant(field_btype, obj->short_field(offset));
-    break;
-  case T_BOOLEAN:
-    return ciConstant(field_btype, obj->bool_field(offset));
-    break;
-  case T_INT:
-    return ciConstant(field_btype, obj->int_field(offset));
-    break;
-  case T_FLOAT:
-    return ciConstant(obj->float_field(offset));
-    break;
-  case T_DOUBLE:
-    return ciConstant(obj->double_field(offset));
-    break;
-  case T_LONG:
-    return ciConstant(obj->long_field(offset));
-    break;
-  case T_OBJECT:
-  case T_ARRAY:
-    {
+    case T_BYTE:    return ciConstant(field_btype, obj->byte_field(offset));
+    case T_CHAR:    return ciConstant(field_btype, obj->char_field(offset));
+    case T_SHORT:   return ciConstant(field_btype, obj->short_field(offset));
+    case T_BOOLEAN: return ciConstant(field_btype, obj->bool_field(offset));
+    case T_INT:     return ciConstant(field_btype, obj->int_field(offset));
+    case T_FLOAT:   return ciConstant(obj->float_field(offset));
+    case T_DOUBLE:  return ciConstant(obj->double_field(offset));
+    case T_LONG:    return ciConstant(obj->long_field(offset));
+    case T_OBJECT:  // fall through
+    case T_ARRAY: {
       oop o = obj->obj_field(offset);
 
       // A field will be "constant" if it is known always to be
@@ -115,12 +87,23 @@
       }
     }
   }
-  ShouldNotReachHere();
-  // to shut up the compiler
+  fatal("no field value: %s", type2name(field_btype));
   return ciConstant();
 }
 
 // ------------------------------------------------------------------
+// ciInstance::field_value
+//
+// Constant value of a field.
+ciConstant ciInstance::field_value(ciField* field) {
+  assert(is_loaded(), "invalid access - must be loaded");
+  assert(field->holder()->is_loaded(), "invalid access - holder must be loaded");
+  assert(field->is_static() || klass()->is_subclass_of(field->holder()), "invalid access - must be subclass");
+
+  GUARDED_VM_ENTRY(return field_value_impl(field->type()->basic_type(), field->offset());)
+}
+
+// ------------------------------------------------------------------
 // ciInstance::field_value_by_offset
 //
 // Constant value of a field at the specified offset.
--- a/hotspot/src/share/vm/ci/ciInstance.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/ci/ciInstance.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -36,6 +36,7 @@
 // instance of java.lang.Object.
 class ciInstance : public ciObject {
   CI_PACKAGE_ACCESS
+  friend class ciField;
 
 protected:
   ciInstance(instanceHandle h_i) : ciObject(h_i) {
@@ -50,6 +51,8 @@
 
   void print_impl(outputStream* st);
 
+  ciConstant field_value_impl(BasicType field_btype, int offset);
+
 public:
   // If this object is a java mirror, return the corresponding type.
   // Otherwise, return NULL.
--- a/hotspot/src/share/vm/ci/ciKlass.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/ci/ciKlass.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -88,12 +88,7 @@
   assert(this->is_loaded(), "must be loaded: %s", this->name()->as_quoted_ascii());
   assert(that->is_loaded(), "must be loaded: %s", that->name()->as_quoted_ascii());
 
-  VM_ENTRY_MARK;
-  Klass* this_klass = get_Klass();
-  Klass* that_klass = that->get_Klass();
-  bool result = this_klass->is_subclass_of(that_klass);
-
-  return result;
+  GUARDED_VM_ENTRY(return get_Klass()->is_subclass_of(that->get_Klass());)
 }
 
 // ------------------------------------------------------------------
--- a/hotspot/src/share/vm/ci/ciMethod.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/ci/ciMethod.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, 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,6 +202,7 @@
   _code = (address)arena->Amalloc(code_size());
   memcpy(_code, me->code_base(), code_size());
 
+#if INCLUDE_JVMTI
   // Revert any breakpoint bytecodes in ci's copy
   if (me->number_of_breakpoints() > 0) {
     BreakpointInfo* bp = me->method_holder()->breakpoints();
@@ -211,6 +212,7 @@
       }
     }
   }
+#endif
 
   // And load the exception table.
   ExceptionTable exc_table(me);
--- a/hotspot/src/share/vm/ci/ciSymbol.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/ci/ciSymbol.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -58,9 +58,7 @@
 //
 // The text of the symbol as a null-terminated C string.
 const char* ciSymbol::as_utf8() {
-  VM_QUICK_ENTRY_MARK;
-  Symbol* s = get_symbol();
-  return s->as_utf8();
+  GUARDED_VM_QUICK_ENTRY(return get_symbol()->as_utf8();)
 }
 
 // The text of the symbol as a null-terminated C string.
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2925,7 +2925,7 @@
   // If JVMTI original method ordering or sharing is enabled construct int
   // array remembering the original ordering
   if (JvmtiExport::can_maintain_original_method_order() || DumpSharedSpaces) {
-    method_ordering = new intArray(length);
+    method_ordering = new intArray(length, length, -1);
     for (int index = 0; index < length; index++) {
       Method* const m = methods->at(index);
       const int old_index = m->vtable_index();
--- a/hotspot/src/share/vm/classfile/classFileParser.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/classFileParser.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -42,7 +42,6 @@
 template <typename T>
 class GrowableArray;
 class InstanceKlass;
-class intArray;
 class Symbol;
 class TempNewSymbol;
 
--- a/hotspot/src/share/vm/classfile/classLoaderData.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -84,7 +84,7 @@
   // An anonymous class loader data doesn't have anything to keep
   // it from being unloaded during parsing of the anonymous class.
   // The null-class-loader should always be kept alive.
-  _keep_alive(is_anonymous || h_class_loader.is_null()),
+  _keep_alive((is_anonymous || h_class_loader.is_null()) ? 1 : 0),
   _metaspace(NULL), _unloading(false), _klasses(NULL),
   _modules(NULL), _packages(NULL),
   _claimed(0), _jmethod_ids(NULL), _handles(NULL), _deallocate_list(NULL),
@@ -114,6 +114,21 @@
   return (int) Atomic::cmpxchg(1, &_claimed, 0) == 0;
 }
 
+// Anonymous classes have their own ClassLoaderData that is marked to keep alive
+// while the class is being parsed, and if the class appears on the module fixup list.
+// Due to the uniqueness that no other class shares the anonymous class' name or
+// ClassLoaderData, no other non-GC thread has knowledge of the anonymous class while
+// it is being defined, therefore _keep_alive is not volatile or atomic.
+void ClassLoaderData::inc_keep_alive() {
+  assert(_keep_alive >= 0, "Invalid keep alive count");
+  _keep_alive++;
+}
+
+void ClassLoaderData::dec_keep_alive() {
+  assert(_keep_alive > 0, "Invalid keep alive count");
+  _keep_alive--;
+}
+
 void ClassLoaderData::oops_do(OopClosure* f, KlassClosure* klass_closure, bool must_claim) {
   if (must_claim && !claim()) {
     return;
--- a/hotspot/src/share/vm/classfile/classLoaderData.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/classLoaderData.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -175,8 +175,11 @@
                            // classes in the class loader are allocated.
   Mutex* _metaspace_lock;  // Locks the metaspace for allocations and setup.
   bool _unloading;         // true if this class loader goes away
-  bool _keep_alive;        // if this CLD is kept alive without a keep_alive_object().
   bool _is_anonymous;      // if this CLD is for an anonymous class
+  int _keep_alive;         // if this CLD is kept alive without a keep_alive_object().
+                           // Currently used solely for anonymous classes.
+                           // _keep_alive does not need to be volatile or
+                           // atomic since there is one unique CLD per anonymous class.
   volatile int _claimed;   // true if claimed, for example during GC traces.
                            // To avoid applying oop closure more than once.
                            // Has to be an int because we cas it.
@@ -224,7 +227,7 @@
   bool claim();
 
   void unload();
-  bool keep_alive() const       { return _keep_alive; }
+  bool keep_alive() const       { return _keep_alive > 0; }
   void classes_do(void f(Klass*));
   void loaded_classes_do(KlassClosure* klass_closure);
   void classes_do(void f(InstanceKlass*));
@@ -286,8 +289,8 @@
     return _unloading;
   }
 
-  // Used to make sure that this CLD is not unloaded.
-  void set_keep_alive(bool value) { _keep_alive = value; }
+  void inc_keep_alive();
+  void dec_keep_alive();
 
   inline unsigned int identity_hash() const;
 
--- a/hotspot/src/share/vm/classfile/compactHashtable.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/compactHashtable.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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 "classfile/compactHashtable.inline.hpp"
 #include "classfile/javaClasses.hpp"
+#include "memory/metadataFactory.hpp"
 #include "memory/metaspaceShared.hpp"
 #include "prims/jvm.h"
 #include "utilities/numberSeq.hpp"
@@ -34,270 +35,259 @@
 //
 // The compact hash table writer implementations
 //
-CompactHashtableWriter::CompactHashtableWriter(int table_type,
-                                               int num_entries,
+CompactHashtableWriter::CompactHashtableWriter(int num_buckets,
                                                CompactHashtableStats* stats) {
   assert(DumpSharedSpaces, "dump-time only");
-  _type = table_type;
-  _num_entries = num_entries;
-  _num_buckets = number_of_buckets(_num_entries);
-  _buckets = NEW_C_HEAP_ARRAY(Entry*, _num_buckets, mtSymbol);
-  memset(_buckets, 0, sizeof(Entry*) * _num_buckets);
-
-  /* bucket sizes table */
-  _bucket_sizes = NEW_C_HEAP_ARRAY(juint, _num_buckets, mtSymbol);
-  memset(_bucket_sizes, 0, sizeof(juint) * _num_buckets);
+  _num_buckets = num_buckets;
+  _num_entries = 0;
+  _buckets = NEW_C_HEAP_ARRAY(GrowableArray<Entry>*, _num_buckets, mtSymbol);
+  for (int i=0; i<_num_buckets; i++) {
+    _buckets[i] = new (ResourceObj::C_HEAP, mtSymbol) GrowableArray<Entry>(0, true, mtSymbol);
+  }
 
-  stats->hashentry_count = _num_entries;
-  // Compact buckets' entries will have only the 4-byte offset, but
-  // we don't know how many there will be at this point. So use a
-  // conservative estimate here. The size is adjusted later when we
-  // write out the buckets.
-  stats->hashentry_bytes = _num_entries * 8;
-  stats->bucket_count    = _num_buckets;
-  stats->bucket_bytes    = (_num_buckets + 1) * (sizeof(juint));
+  stats->bucket_count = _num_buckets;
+  stats->bucket_bytes = (_num_buckets + 1) * (sizeof(u4));
   _stats = stats;
-
-  // See compactHashtable.hpp for table layout
-  _required_bytes = sizeof(juint) * 2; // _base_address, written as 2 juints
-  _required_bytes+= sizeof(juint) +    // num_entries
-                    sizeof(juint) +    // num_buckets
-                    stats->hashentry_bytes +
-                    stats->bucket_bytes;
+  _compact_buckets = NULL;
+  _compact_entries = NULL;
+  _num_empty_buckets = 0;
+  _num_value_only_buckets = 0;
+  _num_other_buckets = 0;
 }
 
 CompactHashtableWriter::~CompactHashtableWriter() {
   for (int index = 0; index < _num_buckets; index++) {
-    Entry* next = NULL;
-    for (Entry* tent = _buckets[index]; tent; tent = next) {
-      next = tent->next();
-      delete tent;
-    }
+    GrowableArray<Entry>* bucket = _buckets[index];
+    delete bucket;
   }
 
-  FREE_C_HEAP_ARRAY(juint, _bucket_sizes);
-  FREE_C_HEAP_ARRAY(Entry*, _buckets);
-}
-
-// Calculate the number of buckets in the temporary hash table
-int CompactHashtableWriter::number_of_buckets(int num_entries) {
-  const int buksize = (int)SharedSymbolTableBucketSize;
-  int num_buckets = (num_entries + buksize - 1) / buksize;
-  num_buckets = (num_buckets + 1) & (~0x01);
-
-  return num_buckets;
+  FREE_C_HEAP_ARRAY(GrowableArray<Entry>*, _buckets);
 }
 
 // Add a symbol entry to the temporary hash table
-void CompactHashtableWriter::add(unsigned int hash, Entry* entry) {
+void CompactHashtableWriter::add(unsigned int hash, u4 value) {
   int index = hash % _num_buckets;
-  entry->set_next(_buckets[index]);
-  _buckets[index] = entry;
-  _bucket_sizes[index] ++;
+  _buckets[index]->append_if_missing(Entry(hash, value));
+  _num_entries++;
 }
 
-// Write the compact table's bucket infos
-juint* CompactHashtableWriter::dump_table(juint* p, juint** first_bucket,
-                                          NumberSeq* summary) {
-  int index;
-  juint* compact_table = p;
-  // Compute the start of the buckets, include the compact_bucket_infos table
-  // and the table end offset.
-  juint offset = _num_buckets + 1;
-  *first_bucket = compact_table + offset;
+void CompactHashtableWriter::allocate_table() {
+  int entries_space = 0;
+  for (int index = 0; index < _num_buckets; index++) {
+    GrowableArray<Entry>* bucket = _buckets[index];
+    int bucket_size = bucket->length();
+    if (bucket_size == 1) {
+      entries_space++;
+    } else {
+      entries_space += 2 * bucket_size;
+    }
+  }
 
-  for (index = 0; index < _num_buckets; index++) {
-    int bucket_size = _bucket_sizes[index];
+  if (entries_space & ~BUCKET_OFFSET_MASK) {
+    vm_exit_during_initialization("CompactHashtableWriter::allocate_table: Overflow! "
+                                  "Too many entries.");
+  }
+
+  Thread* THREAD = VMThread::vm_thread();
+  ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
+  _compact_buckets = MetadataFactory::new_array<u4>(loader_data, _num_buckets + 1, THREAD);
+  _compact_entries = MetadataFactory::new_array<u4>(loader_data, entries_space, THREAD);
+
+  _stats->hashentry_count = _num_entries;
+  _stats->hashentry_bytes = entries_space * sizeof(u4);
+}
+
+// Write the compact table's buckets
+void CompactHashtableWriter::dump_table(NumberSeq* summary) {
+  u4 offset = 0;
+  for (int index = 0; index < _num_buckets; index++) {
+    GrowableArray<Entry>* bucket = _buckets[index];
+    int bucket_size = bucket->length();
     if (bucket_size == 1) {
       // bucket with one entry is compacted and only has the symbol offset
-      compact_table[index] = BUCKET_INFO(offset, COMPACT_BUCKET_TYPE);
-      offset += bucket_size; // each entry contains symbol offset only
+      _compact_buckets->at_put(index, BUCKET_INFO(offset, VALUE_ONLY_BUCKET_TYPE));
+
+      Entry ent = bucket->at(0);
+      _compact_entries->at_put(offset++, ent.value());
+      _num_value_only_buckets++;
     } else {
       // regular bucket, each entry is a symbol (hash, offset) pair
-      compact_table[index] = BUCKET_INFO(offset, REGULAR_BUCKET_TYPE);
-      offset += bucket_size * 2; // each hash entry is 2 juints
-    }
-    if (offset & ~BUCKET_OFFSET_MASK) {
-      vm_exit_during_initialization("CompactHashtableWriter::dump_table: Overflow! "
-                                    "Too many symbols.");
+      _compact_buckets->at_put(index, BUCKET_INFO(offset, REGULAR_BUCKET_TYPE));
+
+      for (int i=0; i<bucket_size; i++) {
+        Entry ent = bucket->at(i);
+        _compact_entries->at_put(offset++, u4(ent.hash())); // write entry hash
+        _compact_entries->at_put(offset++, ent.value());
+      }
+      if (bucket_size == 0) {
+        _num_empty_buckets++;
+      } else {
+        _num_other_buckets++;
+      }
     }
     summary->add(bucket_size);
   }
-  // Mark the end of the table
-  compact_table[_num_buckets] = BUCKET_INFO(offset, TABLEEND_BUCKET_TYPE);
 
-  return compact_table;
+  // Mark the end of the buckets
+  _compact_buckets->at_put(_num_buckets, BUCKET_INFO(offset, TABLEEND_BUCKET_TYPE));
+  assert(offset == (u4)_compact_entries->length(), "sanity");
 }
 
-// Write the compact table's entries
-juint* CompactHashtableWriter::dump_buckets(juint* compact_table, juint* p,
-                                            NumberSeq* summary) {
-  uintx base_address = 0;
-  uintx max_delta = 0;
-  int num_compact_buckets = 0;
-  if (_type == CompactHashtable<Symbol*, char>::_symbol_table) {
-    base_address = uintx(MetaspaceShared::shared_rs()->base());
-    max_delta    = uintx(MetaspaceShared::shared_rs()->size());
-    assert(max_delta <= MAX_SHARED_DELTA, "range check");
-  } else {
-    assert((_type == CompactHashtable<oop, char>::_string_table), "unknown table");
-    assert(UseCompressedOops, "UseCompressedOops is required");
-  }
-
-  assert(p != NULL, "sanity");
-  for (int index = 0; index < _num_buckets; index++) {
-    juint count = 0;
-    int bucket_size = _bucket_sizes[index];
-    int bucket_type = BUCKET_TYPE(compact_table[index]);
-
-    if (bucket_size == 1) {
-      assert(bucket_type == COMPACT_BUCKET_TYPE, "Bad bucket type");
-      num_compact_buckets ++;
-    }
-    for (Entry* tent = _buckets[index]; tent;
-         tent = tent->next()) {
-      if (bucket_type == REGULAR_BUCKET_TYPE) {
-        *p++ = juint(tent->hash()); // write entry hash
-      }
-      if (_type == CompactHashtable<Symbol*, char>::_symbol_table) {
-        uintx deltax = uintx(tent->value()) - base_address;
-        assert(deltax < max_delta, "range check");
-        juint delta = juint(deltax);
-        *p++ = delta; // write entry offset
-      } else {
-        *p++ = oopDesc::encode_heap_oop(tent->string());
-      }
-      count ++;
-    }
-    assert(count == _bucket_sizes[index], "sanity");
-  }
-
-  // Adjust the hashentry_bytes in CompactHashtableStats. Each compact
-  // bucket saves 4-byte.
-  _stats->hashentry_bytes -= num_compact_buckets * 4;
-
-  return p;
-}
 
 // Write the compact table
-void CompactHashtableWriter::dump(char** top, char* end) {
+void CompactHashtableWriter::dump(SimpleCompactHashtable *cht, const char* table_name) {
   NumberSeq summary;
-  char* old_top = *top;
-  juint* p = (juint*)(*top);
-
-  uintx base_address = uintx(MetaspaceShared::shared_rs()->base());
+  allocate_table();
+  dump_table(&summary);
 
-  // Now write the following at the beginning of the table:
-  //      base_address (uintx)
-  //      num_entries  (juint)
-  //      num_buckets  (juint)
-  *p++ = high(base_address);
-  *p++ = low (base_address); // base address
-  *p++ = _num_entries;  // number of entries in the table
-  *p++ = _num_buckets;  // number of buckets in the table
-
-  juint* first_bucket = NULL;
-  juint* compact_table = dump_table(p, &first_bucket, &summary);
-  juint* bucket_end = dump_buckets(compact_table, first_bucket, &summary);
-
-  assert(bucket_end <= (juint*)end, "cannot write past end");
-  *top = (char*)bucket_end;
+  int table_bytes = _stats->bucket_bytes + _stats->hashentry_bytes;
+  address base_address = address(MetaspaceShared::shared_rs()->base());
+  cht->init(base_address,  _num_entries, _num_buckets,
+            _compact_buckets->data(), _compact_entries->data());
 
   if (PrintSharedSpaces) {
     double avg_cost = 0.0;
     if (_num_entries > 0) {
-      avg_cost = double(_required_bytes)/double(_num_entries);
+      avg_cost = double(table_bytes)/double(_num_entries);
     }
     tty->print_cr("Shared %s table stats -------- base: " PTR_FORMAT,
-                  table_name(), (intptr_t)base_address);
+                  table_name, (intptr_t)base_address);
     tty->print_cr("Number of entries       : %9d", _num_entries);
-    tty->print_cr("Total bytes used        : %9d", (int)((*top) - old_top));
+    tty->print_cr("Total bytes used        : %9d", table_bytes);
     tty->print_cr("Average bytes per entry : %9.3f", avg_cost);
     tty->print_cr("Average bucket size     : %9.3f", summary.avg());
     tty->print_cr("Variance of bucket size : %9.3f", summary.variance());
     tty->print_cr("Std. dev. of bucket size: %9.3f", summary.sd());
-    tty->print_cr("Maximum bucket size     : %9d", (int)summary.maximum());
+    tty->print_cr("Empty buckets           : %9d", _num_empty_buckets);
+    tty->print_cr("Value_Only buckets      : %9d", _num_value_only_buckets);
+    tty->print_cr("Other buckets           : %9d", _num_other_buckets);
   }
 }
 
-const char* CompactHashtableWriter::table_name() {
-  switch (_type) {
-  case CompactHashtable<Symbol*, char>::_symbol_table: return "symbol";
-  case CompactHashtable<oop, char>::_string_table: return "string";
-  default:
-    ;
-  }
-  return "unknown";
+/////////////////////////////////////////////////////////////
+//
+// Customization for dumping Symbol and String tables
+
+void CompactSymbolTableWriter::add(unsigned int hash, Symbol *symbol) {
+  address base_address = address(MetaspaceShared::shared_rs()->base());
+  uintx max_delta = uintx(MetaspaceShared::shared_rs()->size());
+  assert(max_delta <= MAX_SHARED_DELTA, "range check");
+
+  uintx deltax = address(symbol) - base_address;
+  assert(deltax < max_delta, "range check");
+  u4 delta = u4(deltax);
+
+  CompactHashtableWriter::add(hash, delta);
+}
+
+void CompactStringTableWriter::add(unsigned int hash, oop string) {
+  CompactHashtableWriter::add(hash, oopDesc::encode_heap_oop(string));
+}
+
+void CompactSymbolTableWriter::dump(CompactHashtable<Symbol*, char> *cht) {
+  CompactHashtableWriter::dump(cht, "symbol");
+}
+
+void CompactStringTableWriter::dump(CompactHashtable<oop, char> *cht) {
+  CompactHashtableWriter::dump(cht, "string");
 }
 
 /////////////////////////////////////////////////////////////
 //
 // The CompactHashtable implementation
 //
-template <class T, class N> const char* CompactHashtable<T, N>::init(
-                           CompactHashtableType type, const char* buffer) {
-  assert(!DumpSharedSpaces, "run-time only");
-  _type = type;
-  juint*p = (juint*)buffer;
-  juint upper = *p++;
-  juint lower = *p++;
-  _base_address = uintx(jlong_from(upper, lower));
-  _entry_count = *p++;
-  _bucket_count = *p++;
-  _buckets = p;
-  _table_end_offset = BUCKET_OFFSET(p[_bucket_count]); // located at the end of the bucket_info table
 
-  juint *end = _buckets + _table_end_offset;
-  return (const char*)end;
+void SimpleCompactHashtable::serialize(SerializeClosure* soc) {
+  soc->do_ptr((void**)&_base_address);
+  soc->do_u4(&_entry_count);
+  soc->do_u4(&_bucket_count);
+  soc->do_ptr((void**)&_buckets);
+  soc->do_ptr((void**)&_entries);
 }
 
-template <class T, class N> void CompactHashtable<T, N>::symbols_do(SymbolClosure *cl) {
+bool SimpleCompactHashtable::exists(u4 value) {
   assert(!DumpSharedSpaces, "run-time only");
-  for (juint i = 0; i < _bucket_count; i ++) {
-    juint bucket_info = _buckets[i];
-    juint bucket_offset = BUCKET_OFFSET(bucket_info);
-    int   bucket_type = BUCKET_TYPE(bucket_info);
-    juint* bucket = _buckets + bucket_offset;
-    juint* bucket_end = _buckets;
+
+  if (_entry_count == 0) {
+    return false;
+  }
+
+  unsigned int hash = (unsigned int)value;
+  int index = hash % _bucket_count;
+  u4 bucket_info = _buckets[index];
+  u4 bucket_offset = BUCKET_OFFSET(bucket_info);
+  int bucket_type = BUCKET_TYPE(bucket_info);
+  u4* entry = _entries + bucket_offset;
 
-    Symbol* sym;
-    if (bucket_type == COMPACT_BUCKET_TYPE) {
-      sym = (Symbol*)((void*)(_base_address + bucket[0]));
-      cl->do_symbol(&sym);
+  if (bucket_type == VALUE_ONLY_BUCKET_TYPE) {
+    return (entry[0] == value);
+  } else {
+    u4*entry_max = _entries + BUCKET_OFFSET(_buckets[index + 1]);
+    while (entry <entry_max) {
+      if (entry[1] == value) {
+        return true;
+      }
+      entry += 2;
+    }
+    return false;
+  }
+}
+
+template <class I>
+inline void SimpleCompactHashtable::iterate(const I& iterator) {
+  assert(!DumpSharedSpaces, "run-time only");
+  for (u4 i = 0; i < _bucket_count; i++) {
+    u4 bucket_info = _buckets[i];
+    u4 bucket_offset = BUCKET_OFFSET(bucket_info);
+    int bucket_type = BUCKET_TYPE(bucket_info);
+    u4* entry = _entries + bucket_offset;
+
+    if (bucket_type == VALUE_ONLY_BUCKET_TYPE) {
+      iterator.do_value(_base_address, entry[0]);
     } else {
-      bucket_end += BUCKET_OFFSET(_buckets[i + 1]);
-      while (bucket < bucket_end) {
-        sym = (Symbol*)((void*)(_base_address + bucket[1]));
-        cl->do_symbol(&sym);
-        bucket += 2;
+      u4*entry_max = _entries + BUCKET_OFFSET(_buckets[i + 1]);
+      while (entry < entry_max) {
+        iterator.do_value(_base_address, entry[0]);
+        entry += 2;
       }
     }
   }
 }
 
-template <class T, class N> void CompactHashtable<T, N>::oops_do(OopClosure* f) {
-  assert(!DumpSharedSpaces, "run-time only");
-  assert(_type == _string_table || _bucket_count == 0, "sanity");
-  for (juint i = 0; i < _bucket_count; i ++) {
-    juint bucket_info = _buckets[i];
-    juint bucket_offset = BUCKET_OFFSET(bucket_info);
-    int   bucket_type = BUCKET_TYPE(bucket_info);
-    juint* bucket = _buckets + bucket_offset;
-    juint* bucket_end = _buckets;
+template <class T, class N> void CompactHashtable<T, N>::serialize(SerializeClosure* soc) {
+  SimpleCompactHashtable::serialize(soc);
+  soc->do_u4(&_type);
+}
+
+class CompactHashtable_SymbolIterator {
+  SymbolClosure* const _closure;
+public:
+  CompactHashtable_SymbolIterator(SymbolClosure *cl) : _closure(cl) {}
+  inline void do_value(address base_address, u4 offset) const {
+    Symbol* sym = (Symbol*)((void*)(base_address + offset));
+    _closure->do_symbol(&sym);
+  }
+};
 
-    narrowOop o;
-    if (bucket_type == COMPACT_BUCKET_TYPE) {
-      o = (narrowOop)bucket[0];
-      f->do_oop(&o);
-    } else {
-      bucket_end += BUCKET_OFFSET(_buckets[i + 1]);
-      while (bucket < bucket_end) {
-        o = (narrowOop)bucket[1];
-        f->do_oop(&o);
-        bucket += 2;
-      }
-    }
+template <class T, class N> void CompactHashtable<T, N>::symbols_do(SymbolClosure *cl) {
+  CompactHashtable_SymbolIterator iterator(cl);
+  iterate(iterator);
+}
+
+class CompactHashtable_OopIterator {
+  OopClosure* const _closure;
+public:
+  CompactHashtable_OopIterator(OopClosure *cl) : _closure(cl) {}
+  inline void do_value(address base_address, u4 offset) const {
+    narrowOop o = (narrowOop)offset;
+    _closure->do_oop(&o);
   }
+};
+
+template <class T, class N> void CompactHashtable<T, N>::oops_do(OopClosure* cl) {
+  assert(_type == _string_table || _bucket_count == 0, "sanity");
+  CompactHashtable_OopIterator iterator(cl);
+  iterate(iterator);
 }
 
 // Explicitly instantiate these types
@@ -360,7 +350,7 @@
   } else {
     corrupted(_p, "Unexpected character");
   }
-  _line_no ++;
+  _line_no++;
   return true;
 }
 
@@ -390,7 +380,7 @@
 }
 
 void HashtableTextDump::scan_prefix_type() {
-  _p ++;
+  _p++;
   if (strncmp(_p, "SECTION: String", 15) == 0) {
     _p += 15;
     _prefix_type = StringPrefix;
--- a/hotspot/src/share/vm/classfile/compactHashtable.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/compactHashtable.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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,10 @@
 #include "services/diagnosticCommand.hpp"
 #include "utilities/hashtable.hpp"
 
+template <class T, class N> class CompactHashtable;
 class NumberSeq;
+class SimpleCompactHashtable;
+class SerializeClosure;
 
 // Stats for symbol tables in the CDS archive
 class CompactHashtableStats VALUE_OBJ_CLASS_SPEC {
@@ -70,66 +73,74 @@
 //
 class CompactHashtableWriter: public StackObj {
 public:
-  class Entry: public CHeapObj<mtSymbol> {
-    Entry* _next;
+  class Entry VALUE_OBJ_CLASS_SPEC {
     unsigned int _hash;
-    void* _literal;
+    u4 _value;
 
   public:
-    Entry(unsigned int hash, Symbol *symbol) : _next(NULL), _hash(hash), _literal(symbol) {}
-    Entry(unsigned int hash, oop string)     : _next(NULL), _hash(hash), _literal(string) {}
+    Entry() {}
+    Entry(unsigned int hash, u4 val) : _hash(hash), _value(val) {}
 
-    void *value() {
-      return _literal;
-    }
-    Symbol *symbol() {
-      return (Symbol*)_literal;
-    }
-    oop string() {
-      return (oop)_literal;
+    u4 value() {
+      return _value;
     }
     unsigned int hash() {
       return _hash;
     }
-    Entry *next()           {return _next;}
-    void set_next(Entry *p) {_next = p;}
+
+    bool operator==(const CompactHashtableWriter::Entry& other) {
+      return (_value == other._value && _hash == other._hash);
+    }
   }; // class CompactHashtableWriter::Entry
 
 private:
-  static int number_of_buckets(int num_entries);
-
-  int _type;
   int _num_entries;
   int _num_buckets;
-  juint* _bucket_sizes;
-  Entry** _buckets;
-  int _required_bytes;
+  int _num_empty_buckets;
+  int _num_value_only_buckets;
+  int _num_other_buckets;
+  GrowableArray<Entry>** _buckets;
   CompactHashtableStats* _stats;
+  Array<u4>* _compact_buckets;
+  Array<u4>* _compact_entries;
 
 public:
   // This is called at dump-time only
-  CompactHashtableWriter(int table_type, int num_entries, CompactHashtableStats* stats);
+  CompactHashtableWriter(int num_buckets, CompactHashtableStats* stats);
   ~CompactHashtableWriter();
 
-  int get_required_bytes() {
-    return _required_bytes;
+  void add(unsigned int hash, u4 value);
+  void add(u4 value) {
+    add((unsigned int)value, value);
   }
 
-  inline void add(unsigned int hash, Symbol* symbol);
-  inline void add(unsigned int hash, oop string);
-
 private:
-  void add(unsigned int hash, Entry* entry);
-  juint* dump_table(juint* p, juint** first_bucket, NumberSeq* summary);
-  juint* dump_buckets(juint* table, juint* p, NumberSeq* summary);
+  void allocate_table();
+  void dump_table(NumberSeq* summary);
 
 public:
-  void dump(char** top, char* end);
+  void dump(SimpleCompactHashtable *cht, const char* table_name);
   const char* table_name();
 };
 
+class CompactSymbolTableWriter: public CompactHashtableWriter {
+public:
+  CompactSymbolTableWriter(int num_buckets, CompactHashtableStats* stats) :
+    CompactHashtableWriter(num_buckets, stats) {}
+  void add(unsigned int hash, Symbol *symbol);
+  void dump(CompactHashtable<Symbol*, char> *cht);
+};
+
+class CompactStringTableWriter: public CompactHashtableWriter {
+public:
+  CompactStringTableWriter(int num_entries, CompactHashtableStats* stats) :
+    CompactHashtableWriter(num_entries, stats) {}
+  void add(unsigned int hash, oop string);
+  void dump(CompactHashtable<oop, char> *cht);
+};
+
 #define REGULAR_BUCKET_TYPE       0
-#define COMPACT_BUCKET_TYPE       1
+#define VALUE_ONLY_BUCKET_TYPE    1
 #define TABLEEND_BUCKET_TYPE      3
 #define BUCKET_OFFSET_MASK        0x3FFFFFFF
 #define BUCKET_OFFSET(info)       ((info) & BUCKET_OFFSET_MASK)
@@ -146,90 +157,106 @@
 // and tend to have large number of entries, we try to minimize the footprint
 // cost per entry.
 //
-// Layout of compact table in the shared archive:
+// The CompactHashtable is split into two arrays
 //
-//   uintx base_address;
-//   juint num_entries;
-//   juint num_buckets;
-//   juint bucket_infos[num_buckets+1]; // bit[31,30]: type; bit[29-0]: offset
-//   juint table[]
+//   u4 buckets[num_buckets+1]; // bit[31,30]: type; bit[29-0]: offset
+//   u4 entries[<variable size>]
 //
-// -----------------------------------
-// | base_address  | num_entries     |
-// |---------------------------------|
-// | num_buckets   | bucket_info0    |
-// |---------------------------------|
-// | bucket_info1  | bucket_info2    |
-// | bucket_info3    ...             |
-// | ....          | table_end_info  |
-// |---------------------------------|
-// | entry0                          |
-// | entry1                          |
-// | entry2                          |
-// |                                 |
-// | ...                             |
-// -----------------------------------
+// The size of buckets[] is 'num_buckets + 1'. Each entry of
+// buckets[] is a 32-bit encoding of the bucket type and bucket offset,
+// with the type in the left-most 2-bit and offset in the remaining 30-bit.
+// The last entry is a special type. It contains the end of the last
+// bucket.
 //
-// The size of the bucket_info table is 'num_buckets + 1'. Each entry of the
-// bucket_info table is a 32-bit encoding of the bucket type and bucket offset,
-// with the type in the left-most 2-bit and offset in the remaining 30-bit.
-// The last entry is a special type. It contains the offset of the last
-// bucket end. We use that information when traversing the compact table.
-//
-// There are two types of buckets, regular buckets and compact buckets. The
-// compact buckets have '01' in their highest 2-bit, and regular buckets have
+// There are two types of buckets, regular buckets and value_only buckets. The
+// value_only buckets have '01' in their highest 2-bit, and regular buckets have
 // '00' in their highest 2-bit.
 //
-// For normal buckets, each entry is 8 bytes in the table[]:
-//   juint hash;    /* symbol/string hash */
+// For normal buckets, each entry is 8 bytes in the entries[]:
+//   u4 hash;    /* symbol/string hash */
 //   union {
-//     juint offset;  /* Symbol* sym = (Symbol*)(base_address + offset) */
+//     u4 offset;  /* Symbol* sym = (Symbol*)(base_address + offset) */
 //     narrowOop str; /* String narrowOop encoding */
 //   }
 //
 //
-// For compact buckets, each entry has only the 4-byte 'offset' in the table[].
+// For value_only buckets, each entry has only the 4-byte 'offset' in the entries[].
+//
+// Example -- note that the second bucket is a VALUE_ONLY_BUCKET_TYPE so the hash code
+//            is skipped.
+// buckets[0, 4, 5, ....]
+//         |  |  |
+//         |  |  +---+
+//         |  |      |
+//         |  +----+ |
+//         v       v v
+// entries[H,O,H,O,O,H,O,H,O.....]
 //
 // See CompactHashtable::lookup() for how the table is searched at runtime.
 // See CompactHashtableWriter::dump() for how the table is written at CDS
 // dump time.
 //
-template <class T, class N> class CompactHashtable VALUE_OBJ_CLASS_SPEC {
+class SimpleCompactHashtable VALUE_OBJ_CLASS_SPEC {
+protected:
+  address  _base_address;
+  u4  _bucket_count;
+  u4  _entry_count;
+  u4* _buckets;
+  u4* _entries;
+
+public:
+  SimpleCompactHashtable() {
+    _entry_count = 0;
+    _bucket_count = 0;
+    _buckets = 0;
+    _entries = 0;
+  }
+
+  void reset() {
+    _bucket_count = 0;
+    _entry_count = 0;
+    _buckets = 0;
+    _entries = 0;
+  }
+
+  void init(address base_address, u4 entry_count, u4 bucket_count, u4* buckets, u4* entries) {
+    _base_address = base_address;
+    _bucket_count = bucket_count;
+    _entry_count = entry_count;
+    _buckets = buckets;
+    _entries = entries;
+  }
+
+  template <class I> inline void iterate(const I& iterator);
+
+  bool exists(u4 value);
+
+  // For reading from/writing to the CDS archive
+  void serialize(SerializeClosure* soc);
+};
+
+template <class T, class N> class CompactHashtable : public SimpleCompactHashtable {
   friend class VMStructs;
 
- public:
+public:
   enum CompactHashtableType {
     _symbol_table = 0,
     _string_table = 1
   };
 
 private:
-  CompactHashtableType _type;
-  uintx  _base_address;
-  juint  _entry_count;
-  juint  _bucket_count;
-  juint  _table_end_offset;
-  juint* _buckets;
+  u4 _type;
 
-  inline Symbol* lookup_entry(CompactHashtable<Symbol*, char>* const t,
-                              juint* addr, const char* name, int len);
+  inline Symbol* decode_entry(CompactHashtable<Symbol*, char>* const t,
+                              u4 offset, const char* name, int len);
 
-  inline oop lookup_entry(CompactHashtable<oop, char>* const t,
-                          juint* addr, const char* name, int len);
+  inline oop decode_entry(CompactHashtable<oop, char>* const t,
+                          u4 offset, const char* name, int len);
 public:
-  CompactHashtable() {
-    _entry_count = 0;
-    _bucket_count = 0;
-    _table_end_offset = 0;
-    _buckets = 0;
-  }
-  const char* init(CompactHashtableType type, const char *buffer);
+  CompactHashtable() : SimpleCompactHashtable() {}
 
-  void reset() {
-    _entry_count = 0;
-    _bucket_count = 0;
-    _table_end_offset = 0;
-    _buckets = 0;
+  void set_type(CompactHashtableType type) {
+    _type = (u4)type;
   }
 
   // Lookup an entry from the compact table
@@ -240,6 +267,9 @@
 
   // iterate over strings
   void oops_do(OopClosure* f);
+
+  // For reading from/writing to the CDS archive
+  void serialize(SerializeClosure* soc);
 };
 
 ////////////////////////////////////////////////////////////////////////
@@ -293,7 +323,7 @@
     u8 n = 0;
 
     while (p < end) {
-      char c = *p ++;
+      char c = *p++;
       if ('0' <= c && c <= '9') {
         n = n * 10 + (c - '0');
         if (n > (u8)INT_MAX) {
--- a/hotspot/src/share/vm/classfile/compactHashtable.inline.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/compactHashtable.inline.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, 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,9 +30,9 @@
 #include "oops/oop.inline.hpp"
 
 template <class T, class N>
-inline Symbol* CompactHashtable<T, N>::lookup_entry(CompactHashtable<Symbol*, char>* const t,
-                                             juint* addr, const char* name, int len) {
-  Symbol* sym = (Symbol*)((void*)(_base_address + *addr));
+inline Symbol* CompactHashtable<T, N>::decode_entry(CompactHashtable<Symbol*, char>* const t,
+                                                    u4 offset, const char* name, int len) {
+  Symbol* sym = (Symbol*)(_base_address + offset);
   if (sym->equals(name, len)) {
     assert(sym->refcount() == -1, "must be shared");
     return sym;
@@ -42,9 +42,9 @@
 }
 
 template <class T, class N>
-inline oop CompactHashtable<T, N>::lookup_entry(CompactHashtable<oop, char>* const t,
-                                                juint* addr, const char* name, int len) {
-  narrowOop obj = (narrowOop)(*addr);
+inline oop CompactHashtable<T, N>::decode_entry(CompactHashtable<oop, char>* const t,
+                                                u4 offset, const char* name, int len) {
+  narrowOop obj = (narrowOop)offset;
   oop string = oopDesc::decode_heap_oop(obj);
   if (java_lang_String::equals(string, (jchar*)name, len)) {
     return string;
@@ -56,17 +56,14 @@
 template <class T, class N>
 inline T CompactHashtable<T,N>::lookup(const N* name, unsigned int hash, int len) {
   if (_entry_count > 0) {
-    assert(!DumpSharedSpaces, "run-time only");
     int index = hash % _bucket_count;
-    juint bucket_info = _buckets[index];
-    juint bucket_offset = BUCKET_OFFSET(bucket_info);
-    int   bucket_type = BUCKET_TYPE(bucket_info);
-    juint* bucket = _buckets + bucket_offset;
-    juint* bucket_end = _buckets;
+    u4 bucket_info = _buckets[index];
+    u4 bucket_offset = BUCKET_OFFSET(bucket_info);
+    int bucket_type = BUCKET_TYPE(bucket_info);
+    u4* entry = _entries + bucket_offset;
 
-    if (bucket_type == COMPACT_BUCKET_TYPE) {
-      // the compact bucket has one entry with entry offset only
-      T res = lookup_entry(this, &bucket[0], name, len);
+    if (bucket_type == VALUE_ONLY_BUCKET_TYPE) {
+      T res = decode_entry(this, entry[0], name, len);
       if (res != NULL) {
         return res;
       }
@@ -74,29 +71,20 @@
       // This is a regular bucket, which has more than one
       // entries. Each entry is a pair of entry (hash, offset).
       // Seek until the end of the bucket.
-      bucket_end += BUCKET_OFFSET(_buckets[index + 1]);
-      while (bucket < bucket_end) {
-        unsigned int h = (unsigned int)(bucket[0]);
+      u4* entry_max = _entries + BUCKET_OFFSET(_buckets[index + 1]);
+      while (entry < entry_max) {
+        unsigned int h = (unsigned int)(entry[0]);
         if (h == hash) {
-          T res = lookup_entry(this, &bucket[1], name, len);
+          T res = decode_entry(this, entry[1], name, len);
           if (res != NULL) {
             return res;
           }
         }
-        bucket += 2;
+        entry += 2;
       }
     }
   }
   return NULL;
 }
 
-inline void CompactHashtableWriter::add(unsigned int hash, Symbol* symbol) {
-  add(hash, new Entry(hash, symbol));
-}
-
-inline void CompactHashtableWriter::add(unsigned int hash, oop string) {
-  add(hash, new Entry(hash, string));
-}
-
-
 #endif // SHARE_VM_CLASSFILE_COMPACTHASHTABLE_INLINE_HPP
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -852,6 +852,7 @@
           new (ResourceObj::C_HEAP, mtClass) GrowableArray<Klass*>(500, true);
         set_fixup_module_field_list(list);
       }
+      k->class_loader_data()->inc_keep_alive();
       fixup_module_field_list()->push(k());
     }
   } else {
--- a/hotspot/src/share/vm/classfile/moduleEntry.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/moduleEntry.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -354,6 +354,7 @@
     Thread* THREAD = Thread::current();
     KlassHandle kh(THREAD, k);
     java_lang_Class::fixup_module_field(kh, module_handle);
+    k->class_loader_data()->dec_keep_alive();
   }
 
   delete java_lang_Class::fixup_module_field_list();
--- a/hotspot/src/share/vm/classfile/modules.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/modules.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -277,6 +277,11 @@
   {
     MutexLocker m1(Module_lock, THREAD);
 
+    if (ModuleEntryTable::javabase_defined()) {
+      THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
+                "Module java.base is already defined");
+    }
+
     // Verify that all java.base packages created during bootstrapping are in
     // pkg_list.  If any are not in pkg_list, than a non-java.base class was
     // loaded erroneously pre java.base module definition.
--- a/hotspot/src/share/vm/classfile/stringTable.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/stringTable.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -662,7 +662,7 @@
 
 // Sharing
 bool StringTable::copy_shared_string(GrowableArray<MemRegion> *string_space,
-                                     CompactHashtableWriter* ch_table) {
+                                     CompactStringTableWriter* writer) {
 #if INCLUDE_CDS && INCLUDE_ALL_GCS && defined(_LP64) && !defined(_WINDOWS)
   assert(UseG1GC, "Only support G1 GC");
   assert(UseCompressedOops && UseCompressedClassPointers,
@@ -713,7 +713,7 @@
       }
 
       // add to the compact table
-      ch_table->add(hash, new_s);
+      writer->add(hash, new_s);
     }
   }
 
@@ -723,40 +723,45 @@
   return true;
 }
 
-bool StringTable::copy_compact_table(char** top, char *end, GrowableArray<MemRegion> *string_space,
-                                     size_t* space_size) {
+void StringTable::serialize(SerializeClosure* soc, GrowableArray<MemRegion> *string_space,
+                            size_t* space_size) {
 #if INCLUDE_CDS && defined(_LP64) && !defined(_WINDOWS)
-  if (!(UseG1GC && UseCompressedOops && UseCompressedClassPointers)) {
-    if (PrintSharedSpaces) {
-      tty->print_cr("Shared strings are excluded from the archive as UseG1GC, "
-                    "UseCompressedOops and UseCompressedClassPointers are required.");
+  _shared_table.reset();
+  if (soc->writing()) {
+    if (!(UseG1GC && UseCompressedOops && UseCompressedClassPointers)) {
+      if (PrintSharedSpaces) {
+        tty->print_cr(
+          "Shared strings are excluded from the archive as UseG1GC, "
+          "UseCompressedOops and UseCompressedClassPointers are required."
+          "Current settings: UseG1GC=%s, UseCompressedOops=%s, UseCompressedClassPointers=%s.",
+          BOOL_TO_STR(UseG1GC), BOOL_TO_STR(UseCompressedOops),
+          BOOL_TO_STR(UseCompressedClassPointers));
+      }
+    } else {
+      int num_buckets = the_table()->number_of_entries() /
+                             SharedSymbolTableBucketSize;
+      CompactStringTableWriter writer(num_buckets,
+                                      &MetaspaceShared::stats()->string);
+
+      // Copy the interned strings into the "string space" within the java heap
+      if (copy_shared_string(string_space, &writer)) {
+        for (int i = 0; i < string_space->length(); i++) {
+          *space_size += string_space->at(i).byte_size();
+        }
+        writer.dump(&_shared_table);
+      }
     }
-    return true;
   }
 
-  CompactHashtableWriter ch_table(CompactHashtable<oop, char>::_string_table,
-                                  the_table()->number_of_entries(),
-                                  &MetaspaceShared::stats()->string);
+  _shared_table.set_type(CompactHashtable<oop, char>::_string_table);
+  _shared_table.serialize(soc);
 
-  // Copy the interned strings into the "string space" within the java heap
-  if (!copy_shared_string(string_space, &ch_table)) {
-    return false;
-  }
-
-  for (int i = 0; i < string_space->length(); i++) {
-    *space_size += string_space->at(i).byte_size();
+  if (soc->writing()) {
+    _shared_table.reset(); // Sanity. Make sure we don't use the shared table at dump time
+  } else if (_ignore_shared_strings) {
+    _shared_table.reset();
   }
-
-  // Now dump the compact table
-  if (*top + ch_table.get_required_bytes() > end) {
-    // not enough space left
-    return false;
-  }
-  ch_table.dump(top, end);
-  *top = (char*)align_ptr_up(*top, sizeof(void*));
-
 #endif
-  return true;
 }
 
 void StringTable::shared_oops_do(OopClosure* f) {
@@ -765,25 +770,3 @@
 #endif
 }
 
-const char* StringTable::init_shared_table(FileMapInfo *mapinfo, char *buffer) {
-#if INCLUDE_CDS && defined(_LP64) && !defined(_WINDOWS)
-  if (mapinfo->space_capacity(MetaspaceShared::first_string) == 0) {
-    // no shared string data
-    return buffer;
-  }
-
-  // initialize the shared table
-  juint *p = (juint*)buffer;
-  const char* end = _shared_table.init(
-          CompactHashtable<oop, char>::_string_table, (char*)p);
-  const char* aligned_end = (const char*)align_ptr_up(end, sizeof(void*));
-
-  if (_ignore_shared_strings) {
-    _shared_table.reset();
-  }
-
-  return aligned_end;
-#endif
-
-  return buffer;
-}
--- a/hotspot/src/share/vm/classfile/stringTable.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/stringTable.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -29,8 +29,9 @@
 #include "utilities/hashtable.hpp"
 
 template <class T, class N> class CompactHashtable;
-class CompactHashtableWriter;
+class CompactStringTableWriter;
 class FileMapInfo;
+class SerializeClosure;
 
 class StringTable : public RehashableHashtable<oop, mtSymbol> {
   friend class VMStructs;
@@ -155,10 +156,9 @@
   static bool shared_string_ignored()       { return _ignore_shared_strings; }
   static void shared_oops_do(OopClosure* f);
   static bool copy_shared_string(GrowableArray<MemRegion> *string_space,
-                                 CompactHashtableWriter* ch_table);
-  static bool copy_compact_table(char** top, char* end, GrowableArray<MemRegion> *string_space,
-                                 size_t* space_size);
-  static const char* init_shared_table(FileMapInfo *mapinfo, char* buffer);
+                                 CompactStringTableWriter* ch_table);
+  static void serialize(SerializeClosure* soc, GrowableArray<MemRegion> *string_space,
+                        size_t* space_size);
   static void reverse() {
     the_table()->Hashtable<oop, mtSymbol>::reverse();
   }
--- a/hotspot/src/share/vm/classfile/symbolTable.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/symbolTable.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -537,37 +537,42 @@
   }
 }
 
-bool SymbolTable::copy_compact_table(char** top, char*end) {
+void SymbolTable::serialize(SerializeClosure* soc) {
 #if INCLUDE_CDS
-  CompactHashtableWriter ch_table(CompactHashtable<Symbol*, char>::_symbol_table,
-                                  the_table()->number_of_entries(),
-                                  &MetaspaceShared::stats()->symbol);
-  if (*top + ch_table.get_required_bytes() > end) {
-    // not enough space left
-    return false;
+  _shared_table.reset();
+  if (soc->writing()) {
+    int num_buckets = the_table()->number_of_entries() /
+                            SharedSymbolTableBucketSize;
+    CompactSymbolTableWriter writer(num_buckets,
+                                    &MetaspaceShared::stats()->symbol);
+    for (int i = 0; i < the_table()->table_size(); ++i) {
+      HashtableEntry<Symbol*, mtSymbol>* p = the_table()->bucket(i);
+      for ( ; p != NULL; p = p->next()) {
+        Symbol* s = (Symbol*)(p->literal());
+      unsigned int fixed_hash =  hash_shared_symbol((char*)s->bytes(), s->utf8_length());
+        assert(fixed_hash == p->hash(), "must not rehash during dumping");
+        writer.add(fixed_hash, s);
+      }
+    }
+
+    writer.dump(&_shared_table);
   }
 
-  for (int i = 0; i < the_table()->table_size(); ++i) {
-    HashtableEntry<Symbol*, mtSymbol>* p = the_table()->bucket(i);
-    for ( ; p != NULL; p = p->next()) {
-      Symbol* s = (Symbol*)(p->literal());
-      unsigned int fixed_hash =  hash_shared_symbol((char*)s->bytes(), s->utf8_length());
-      assert(fixed_hash == p->hash(), "must not rehash during dumping");
-      ch_table.add(fixed_hash, s);
-    }
-  }
+  _shared_table.set_type(CompactHashtable<Symbol*, char>::_symbol_table);
+  _shared_table.serialize(soc);
 
-  ch_table.dump(top, end);
+  if (soc->writing()) {
+    // Verify table is correct
+    Symbol* sym = vmSymbols::java_lang_Object();
+    const char* name = (const char*)sym->bytes();
+    int len = sym->utf8_length();
+    unsigned int hash = hash_symbol(name, len);
+    assert(sym == _shared_table.lookup(name, hash, len), "sanity");
 
-  *top = (char*)align_ptr_up(*top, sizeof(void*));
+    // Sanity. Make sure we don't use the shared table at dump time
+    _shared_table.reset();
+  }
 #endif
-  return true;
-}
-
-const char* SymbolTable::init_shared_table(const char* buffer) {
-  const char* end = _shared_table.init(
-          CompactHashtable<Symbol*, char>::_symbol_table, buffer);
-  return (const char*)align_ptr_up(end, sizeof(void*));
 }
 
 //---------------------------------------------------------------------------
--- a/hotspot/src/share/vm/classfile/symbolTable.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/symbolTable.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -41,6 +41,7 @@
 
 class BoolObjectClosure;
 class outputStream;
+class SerializeClosure;
 
 // TempNewSymbol acts as a handle class in a handle/body idiom and is
 // responsible for proper resource management of the body (which is a Symbol*).
@@ -251,8 +252,7 @@
   static void read(const char* filename, TRAPS);
 
   // Sharing
-  static bool copy_compact_table(char** top, char* end);
-  static const char* init_shared_table(const char* buffer);
+  static void serialize(SerializeClosure* soc);
 
   // Rehash the symbol table if it gets out of balance
   static void rehash_table();
--- a/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -29,6 +29,7 @@
 #include "classfile/dictionary.hpp"
 
 class ClassFileStream;
+class SerializeClosure;
 
 class SystemDictionaryShared: public SystemDictionary {
 public:
@@ -77,6 +78,7 @@
                                            TRAPS) {
     return NULL;
   }
+  static void serialize(SerializeClosure* soc) {}
 };
 
 #endif // SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -876,6 +876,10 @@
    do_name(     newArray_name,                                    "newArray")                                           \
    do_signature(newArray_signature,                               "(Ljava/lang/Class;I)Ljava/lang/Object;")             \
                                                                                                                         \
+  do_intrinsic(_onSpinWait,               java_lang_Thread,       onSpinWait_name, onSpinWait_signature,         F_S)   \
+   do_name(     onSpinWait_name,                                  "onSpinWait")                                         \
+   do_alias(    onSpinWait_signature,                             void_method_signature)                                \
+                                                                                                                        \
   do_intrinsic(_copyOf,                   java_util_Arrays,       copyOf_name, copyOf_signature,                 F_S)   \
    do_name(     copyOf_name,                                     "copyOf")                                              \
    do_signature(copyOf_signature,             "([Ljava/lang/Object;ILjava/lang/Class;)[Ljava/lang/Object;")             \
--- a/hotspot/src/share/vm/code/codeCache.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/code/codeCache.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -336,7 +336,7 @@
   if (!SegmentedCodeCache) {
     // No segmentation: use a single code heap
     return (code_blob_type == CodeBlobType::All);
-  } else if (Arguments::mode() == Arguments::_int) {
+  } else if (Arguments::is_interpreter_only()) {
     // Interpreter only: we don't need any method code heaps
     return (code_blob_type == CodeBlobType::NonNMethod);
   } else if (TieredCompilation && (TieredStopAtLevel > CompLevel_simple)) {
--- a/hotspot/src/share/vm/code/compiledIC.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/code/compiledIC.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -533,6 +533,22 @@
   return (cb != NULL && cb->is_adapter_blob());
 }
 
+// Release the CompiledICHolder* associated with this call site is there is one.
+void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
+  // This call site might have become stale so inspect it carefully.
+  NativeCall* call = nativeCall_at(call_site->addr());
+  if (is_icholder_entry(call->destination())) {
+    NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
+    InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
+  }
+}
+
+bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
+  // This call site might have become stale so inspect it carefully.
+  NativeCall* call = nativeCall_at(call_site->addr());
+  return is_icholder_entry(call->destination());
+}
+
 // ----------------------------------------------------------------------------
 
 void CompiledStaticCall::set_to_clean() {
--- a/hotspot/src/share/vm/code/nmethod.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/code/nmethod.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -313,7 +313,8 @@
 
 
 address ExceptionCache::test_address(address addr) {
-  for (int i=0; i<count(); i++) {
+  int limit = count();
+  for (int i = 0; i < limit; i++) {
     if (pc_at(i) == addr) {
       return handler_at(i);
     }
@@ -329,7 +330,6 @@
   if (index < cache_size) {
     set_pc_at(index, addr);
     set_handler_at(index, handler);
-    OrderAccess::storestore();
     increment_count();
     return true;
   }
@@ -442,10 +442,11 @@
   assert(new_entry != NULL,"Must be non null");
   assert(new_entry->next() == NULL, "Must be null");
 
-  if (exception_cache() != NULL) {
-    new_entry->set_next(exception_cache());
+  ExceptionCache *ec = exception_cache();
+  if (ec != NULL) {
+    new_entry->set_next(ec);
   }
-  set_exception_cache(new_entry);
+  release_set_exception_cache(new_entry);
 }
 
 void nmethod::clean_exception_cache(BoolObjectClosure* is_alive) {
--- a/hotspot/src/share/vm/code/nmethod.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/code/nmethod.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -41,15 +41,16 @@
   Klass*   _exception_type;
   address  _pc[cache_size];
   address  _handler[cache_size];
-  int      _count;
+  volatile int _count;
   ExceptionCache* _next;
 
   address pc_at(int index)                     { assert(index >= 0 && index < count(),""); return _pc[index]; }
   void    set_pc_at(int index, address a)      { assert(index >= 0 && index < cache_size,""); _pc[index] = a; }
   address handler_at(int index)                { assert(index >= 0 && index < count(),""); return _handler[index]; }
   void    set_handler_at(int index, address a) { assert(index >= 0 && index < cache_size,""); _handler[index] = a; }
-  int     count()                              { return _count; }
-  void    increment_count()                    { _count++; }
+  int     count()                              { return OrderAccess::load_acquire(&_count); }
+  // increment_count is only called under lock, but there may be concurrent readers.
+  void    increment_count()                    { OrderAccess::release_store(&_count, _count + 1); }
 
  public:
 
@@ -241,7 +242,7 @@
   // counter is decreased (by 1) while sweeping.
   int _hotness_counter;
 
-  ExceptionCache *_exception_cache;
+  ExceptionCache * volatile _exception_cache;
   PcDescCache     _pc_desc_cache;
 
   // These are used for compiled synchronized native methods to
@@ -433,7 +434,7 @@
 
   // flag accessing and manipulation
   bool  is_in_use() const                         { return _state == in_use; }
-  bool  is_alive() const                          { return _state == in_use || _state == not_entrant; }
+  bool  is_alive() const                          { unsigned char s = _state; return s == in_use || s == not_entrant; }
   bool  is_not_entrant() const                    { return _state == not_entrant; }
   bool  is_zombie() const                         { return _state == zombie; }
   bool  is_unloaded() const                       { return _state == unloaded; }
@@ -576,8 +577,10 @@
   void  set_stack_traversal_mark(long l)          { _stack_traversal_mark = l; }
 
   // Exception cache support
+  // Note: _exception_cache may be read concurrently. We rely on memory_order_consume here.
   ExceptionCache* exception_cache() const         { return _exception_cache; }
   void set_exception_cache(ExceptionCache *ec)    { _exception_cache = ec; }
+  void release_set_exception_cache(ExceptionCache *ec) { OrderAccess::release_store_ptr(&_exception_cache, ec); }
   address handler_for_exception_and_pc(Handle exception, address pc);
   void add_handler_for_exception_and_pc(Handle exception, address pc, address handler);
   void clean_exception_cache(BoolObjectClosure* is_alive);
--- a/hotspot/src/share/vm/compiler/compileBroker.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/compiler/compileBroker.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1060,6 +1060,7 @@
   assert(osr_bci == InvocationEntryBci || (0 <= osr_bci && osr_bci < method->code_size()), "bci out of range");
   assert(!method->is_abstract() && (osr_bci == InvocationEntryBci || !method->is_native()), "cannot compile abstract/native methods");
   assert(!method->method_holder()->is_not_initialized(), "method holder must be initialized");
+  assert(!TieredCompilation || comp_level <= TieredStopAtLevel, "Invalid compilation level");
   // allow any levels for WhiteBox
   assert(WhiteBoxAPI || TieredCompilation || comp_level == CompLevel_highest_tier, "only CompLevel_highest_tier must be used in non-tiered");
   // return quickly if possible
--- a/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2769,10 +2769,10 @@
       _collector(collector),
       _n_workers(n_workers) {}
   // Work method in support of parallel rescan ... of young gen spaces
-  void do_young_space_rescan(uint worker_id, OopsInGenClosure* cl,
+  void do_young_space_rescan(OopsInGenClosure* cl,
                              ContiguousSpace* space,
                              HeapWord** chunk_array, size_t chunk_top);
-  void work_on_young_gen_roots(uint worker_id, OopsInGenClosure* cl);
+  void work_on_young_gen_roots(OopsInGenClosure* cl);
 };
 
 // Parallel initial mark task
@@ -4255,7 +4255,7 @@
 
   // ---------- young gen roots --------------
   {
-    work_on_young_gen_roots(worker_id, &par_mri_cl);
+    work_on_young_gen_roots(&par_mri_cl);
     _timer.stop();
     log_trace(gc, task)("Finished young gen initial mark scan work in %dth thread: %3.3f sec", worker_id, _timer.seconds());
   }
@@ -4346,7 +4346,7 @@
   }
 };
 
-void CMSParMarkTask::work_on_young_gen_roots(uint worker_id, OopsInGenClosure* cl) {
+void CMSParMarkTask::work_on_young_gen_roots(OopsInGenClosure* cl) {
   ParNewGeneration* young_gen = _collector->_young_gen;
   ContiguousSpace* eden_space = young_gen->eden();
   ContiguousSpace* from_space = young_gen->from();
@@ -4360,9 +4360,9 @@
   assert(ect <= _collector->_eden_chunk_capacity, "out of bounds");
   assert(sct <= _collector->_survivor_chunk_capacity, "out of bounds");
 
-  do_young_space_rescan(worker_id, cl, to_space, NULL, 0);
-  do_young_space_rescan(worker_id, cl, from_space, sca, sct);
-  do_young_space_rescan(worker_id, cl, eden_space, eca, ect);
+  do_young_space_rescan(cl, to_space, NULL, 0);
+  do_young_space_rescan(cl, from_space, sca, sct);
+  do_young_space_rescan(cl, eden_space, eca, ect);
 }
 
 // work_queue(i) is passed to the closure
@@ -4389,7 +4389,7 @@
   // work first.
   // ---------- young gen roots --------------
   {
-    work_on_young_gen_roots(worker_id, &par_mrias_cl);
+    work_on_young_gen_roots(&par_mrias_cl);
     _timer.stop();
     log_trace(gc, task)("Finished young gen rescan work in %dth thread: %3.3f sec", worker_id, _timer.seconds());
   }
@@ -4471,9 +4471,8 @@
   log_trace(gc, task)("Finished work stealing in %dth thread: %3.3f sec", worker_id, _timer.seconds());
 }
 
-// Note that parameter "i" is not used.
 void
-CMSParMarkTask::do_young_space_rescan(uint worker_id,
+CMSParMarkTask::do_young_space_rescan(
   OopsInGenClosure* cl, ContiguousSpace* space,
   HeapWord** chunk_array, size_t chunk_top) {
   // Until all tasks completed:
--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -287,7 +287,7 @@
   }
 }
 
-class ParScanThreadStateSet: private ResourceArray {
+class ParScanThreadStateSet: StackObj {
 public:
   // Initializes states for the specified number of threads;
   ParScanThreadStateSet(int                     num_threads,
@@ -322,8 +322,10 @@
   ParallelTaskTerminator& _term;
   ParNewGeneration&       _young_gen;
   Generation&             _old_gen;
+  ParScanThreadState*     _per_thread_states;
+  const int               _num_threads;
  public:
-  bool is_valid(int id) const { return id < length(); }
+  bool is_valid(int id) const { return id < _num_threads; }
   ParallelTaskTerminator* terminator() { return &_term; }
 };
 
@@ -336,30 +338,31 @@
                                              PreservedMarksSet& preserved_marks_set,
                                              size_t desired_plab_sz,
                                              ParallelTaskTerminator& term)
-  : ResourceArray(sizeof(ParScanThreadState), num_threads),
-    _young_gen(young_gen),
+  : _young_gen(young_gen),
     _old_gen(old_gen),
-    _term(term)
+    _term(term),
+    _per_thread_states(NEW_RESOURCE_ARRAY(ParScanThreadState, num_threads)),
+    _num_threads(num_threads)
 {
   assert(num_threads > 0, "sanity check!");
   assert(ParGCUseLocalOverflow == (overflow_stacks != NULL),
          "overflow_stack allocation mismatch");
   // Initialize states.
   for (int i = 0; i < num_threads; ++i) {
-    new ((ParScanThreadState*)_data + i)
-        ParScanThreadState(&to_space, &young_gen, &old_gen, i, &queue_set,
-                           overflow_stacks, preserved_marks_set.get(i),
-                           desired_plab_sz, term);
+    new(_per_thread_states + i)
+      ParScanThreadState(&to_space, &young_gen, &old_gen, i, &queue_set,
+                         overflow_stacks, preserved_marks_set.get(i),
+                         desired_plab_sz, term);
   }
 }
 
 inline ParScanThreadState& ParScanThreadStateSet::thread_state(int i) {
-  assert(i >= 0 && i < length(), "sanity check!");
-  return ((ParScanThreadState*)_data)[i];
+  assert(i >= 0 && i < _num_threads, "sanity check!");
+  return _per_thread_states[i];
 }
 
 void ParScanThreadStateSet::trace_promotion_failed(const YoungGCTracer* gc_tracer) {
-  for (int i = 0; i < length(); ++i) {
+  for (int i = 0; i < _num_threads; ++i) {
     if (thread_state(i).promotion_failed()) {
       gc_tracer->report_promotion_failed(thread_state(i).promotion_failed_info());
       thread_state(i).promotion_failed_info().reset();
@@ -370,7 +373,7 @@
 void ParScanThreadStateSet::reset(uint active_threads, bool promotion_failed) {
   _term.reset_for_reuse(active_threads);
   if (promotion_failed) {
-    for (int i = 0; i < length(); ++i) {
+    for (int i = 0; i < _num_threads; ++i) {
       thread_state(i).print_promotion_failure_size();
     }
   }
@@ -385,7 +388,7 @@
 }
 
 void ParScanThreadStateSet::reset_stats() {
-  for (int i = 0; i < length(); ++i) {
+  for (int i = 0; i < _num_threads; ++i) {
     thread_state(i).reset_stats();
   }
 }
@@ -408,7 +411,7 @@
 
   print_termination_stats_hdr(st);
 
-  for (int i = 0; i < length(); ++i) {
+  for (int i = 0; i < _num_threads; ++i) {
     const ParScanThreadState & pss = thread_state(i);
     const double elapsed_ms = pss.elapsed_time() * 1000.0;
     const double s_roots_ms = pss.strong_roots_time() * 1000.0;
@@ -436,7 +439,7 @@
   print_taskqueue_stats_hdr(st);
 
   TaskQueueStats totals;
-  for (int i = 0; i < length(); ++i) {
+  for (int i = 0; i < _num_threads; ++i) {
     const ParScanThreadState & pss = thread_state(i);
     const TaskQueueStats & stats = pss.taskqueue_stats();
     st->print("%3d ", i); stats.print(st); st->cr();
@@ -459,7 +462,7 @@
   // possible since this might otherwise become a bottleneck
   // to scaling. Should we add heavy-weight work into this
   // loop, consider parallelizing the loop into the worker threads.
-  for (int i = 0; i < length(); ++i) {
+  for (int i = 0; i < _num_threads; ++i) {
     ParScanThreadState& par_scan_state = thread_state(i);
 
     // Flush stats related to To-space PLAB activity and
--- a/hotspot/src/share/vm/gc/g1/collectionSetChooser.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/collectionSetChooser.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -25,7 +25,6 @@
 #include "precompiled.hpp"
 #include "gc/g1/collectionSetChooser.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/shared/space.inline.hpp"
 #include "runtime/atomic.inline.hpp"
 
--- a/hotspot/src/share/vm/gc/g1/concurrentG1Refine.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/concurrentG1Refine.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -27,7 +27,6 @@
 #include "gc/g1/concurrentG1RefineThread.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
 #include "gc/g1/g1HotCardCache.hpp"
-#include "gc/g1/g1Predictions.hpp"
 #include "runtime/java.hpp"
 #include "utilities/debug.hpp"
 #include "utilities/globalDefinitions.hpp"
--- a/hotspot/src/share/vm/gc/g1/concurrentG1RefineThread.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/concurrentG1RefineThread.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -26,7 +26,6 @@
 #include "gc/g1/concurrentG1Refine.hpp"
 #include "gc/g1/concurrentG1RefineThread.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/g1/suspendibleThreadSet.hpp"
 #include "logging/log.hpp"
 #include "memory/resourceArea.hpp"
--- a/hotspot/src/share/vm/gc/g1/concurrentMarkThread.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/concurrentMarkThread.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -27,9 +27,9 @@
 #include "gc/g1/concurrentMarkThread.inline.hpp"
 #include "gc/g1/g1Analytics.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/g1/g1ConcurrentMark.inline.hpp"
 #include "gc/g1/g1MMUTracker.hpp"
+#include "gc/g1/g1Policy.hpp"
 #include "gc/g1/suspendibleThreadSet.hpp"
 #include "gc/g1/vm_operations_g1.hpp"
 #include "gc/shared/gcId.hpp"
@@ -80,7 +80,7 @@
 };
 
 // Marking pauses can be scheduled flexibly, so we might delay marking to meet MMU.
-void ConcurrentMarkThread::delay_to_keep_mmu(G1CollectorPolicy* g1_policy, bool remark) {
+void ConcurrentMarkThread::delay_to_keep_mmu(G1Policy* g1_policy, bool remark) {
   const G1Analytics* analytics = g1_policy->analytics();
   if (g1_policy->adaptive_young_list_length()) {
     double now = os::elapsedTime();
@@ -111,7 +111,7 @@
   _vtime_start = os::elapsedVTime();
 
   G1CollectedHeap* g1h = G1CollectedHeap::heap();
-  G1CollectorPolicy* g1_policy = g1h->g1_policy();
+  G1Policy* g1_policy = g1h->g1_policy();
 
   while (!should_terminate()) {
     // wait until started is set.
--- a/hotspot/src/share/vm/gc/g1/concurrentMarkThread.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/concurrentMarkThread.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -31,7 +31,7 @@
 // as well as handling various marking cleanup.
 
 class G1ConcurrentMark;
-class G1CollectorPolicy;
+class G1Policy;
 
 class ConcurrentMarkThread: public ConcurrentGCThread {
   friend class VMStructs;
@@ -51,7 +51,7 @@
   volatile State _state;
 
   void sleepBeforeNextCycle();
-  void delay_to_keep_mmu(G1CollectorPolicy* g1_policy, bool remark);
+  void delay_to_keep_mmu(G1Policy* g1_policy, bool remark);
 
   void run_service();
   void stop_service();
--- a/hotspot/src/share/vm/gc/g1/g1Allocator.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1Allocator.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -27,7 +27,6 @@
 #include "gc/g1/g1AllocRegion.inline.hpp"
 #include "gc/g1/g1EvacStats.inline.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/g1/g1MarkSweep.hpp"
 #include "gc/g1/heapRegion.inline.hpp"
 #include "gc/g1/heapRegionSet.inline.hpp"
--- a/hotspot/src/share/vm/gc/g1/g1CardCounts.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CardCounts.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -25,8 +25,6 @@
 #include "precompiled.hpp"
 #include "gc/g1/g1CardCounts.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
-#include "gc/g1/g1GCPhaseTimes.hpp"
 #include "gc/shared/cardTableModRefBS.hpp"
 #include "services/memTracker.hpp"
 #include "utilities/copy.hpp"
--- a/hotspot/src/share/vm/gc/g1/g1CardLiveData.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CardLiveData.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -28,6 +28,7 @@
 #include "gc/g1/g1CardLiveData.inline.hpp"
 #include "gc/g1/suspendibleThreadSet.hpp"
 #include "gc/shared/workgroup.hpp"
+#include "logging/log.hpp"
 #include "memory/universe.hpp"
 #include "runtime/atomic.inline.hpp"
 #include "runtime/globals.hpp"
@@ -38,6 +39,7 @@
 G1CardLiveData::G1CardLiveData() :
   _max_capacity(0),
   _cards_per_region(0),
+  _gc_timestamp_at_create(0),
   _live_regions(NULL),
   _live_regions_size_in_bits(0),
   _live_cards(NULL),
@@ -58,7 +60,7 @@
 }
 
 void G1CardLiveData::free_large_bitmap(bm_word_t* bitmap, size_t size_in_bits) {
-  MmapArrayAllocator<bm_word_t, mtGC>::free(bitmap, size_in_bits / BitsPerWord);
+  MmapArrayAllocator<bm_word_t, mtGC>::free(bitmap, BitMap::calc_size_in_words(size_in_bits));
 }
 
 void G1CardLiveData::initialize(size_t max_capacity, uint num_max_regions) {
@@ -127,6 +129,13 @@
   // lots of work most of the time.
   BitMap::idx_t _last_marked_bit_idx;
 
+  void clear_card_bitmap_range(HeapWord* start, HeapWord* end) {
+    BitMap::idx_t start_idx = card_live_bitmap_index_for(start);
+    BitMap::idx_t end_idx = card_live_bitmap_index_for((HeapWord*)align_ptr_up(end, CardTableModRefBS::card_size));
+
+    _card_bm.clear_range(start_idx, end_idx);
+  }
+
   // Mark the card liveness bitmap for the object spanning from start to end.
   void mark_card_bitmap_range(HeapWord* start, HeapWord* end) {
     BitMap::idx_t start_idx = card_live_bitmap_index_for(start);
@@ -169,6 +178,10 @@
     _region_bm.par_set_bit(hr->hrm_index());
   }
 
+  void reset_live_data(HeapRegion* hr) {
+    clear_card_bitmap_range(hr->next_top_at_mark_start(), hr->end());
+  }
+
   // Mark the range of bits covered by allocations done since the last marking
   // in the given heap region, i.e. from NTAMS to top of the given region.
   // Returns if there has been some allocation in this region since the last marking.
@@ -305,6 +318,8 @@
 };
 
 void G1CardLiveData::create(WorkGang* workers, G1CMBitMap* mark_bitmap) {
+  _gc_timestamp_at_create = G1CollectedHeap::heap()->get_gc_time_stamp();
+
   uint n_workers = workers->active_workers();
 
   G1CreateCardLiveDataTask cl(mark_bitmap,
@@ -322,14 +337,24 @@
   class G1FinalizeCardLiveDataClosure: public HeapRegionClosure {
   private:
     G1CardLiveDataHelper _helper;
+
+    uint _gc_timestamp_at_create;
+
+    bool has_been_reclaimed(HeapRegion* hr) const {
+      return hr->get_gc_time_stamp() > _gc_timestamp_at_create;
+    }
   public:
     G1FinalizeCardLiveDataClosure(G1CollectedHeap* g1h,
                                   G1CMBitMap* bitmap,
                                   G1CardLiveData* live_data) :
       HeapRegionClosure(),
-      _helper(live_data, g1h->reserved_region().start()) { }
+      _helper(live_data, g1h->reserved_region().start()),
+      _gc_timestamp_at_create(live_data->gc_timestamp_at_create()) { }
 
     bool doHeapRegion(HeapRegion* hr) {
+      if (has_been_reclaimed(hr)) {
+        _helper.reset_live_data(hr);
+      }
       bool allocated_since_marking = _helper.mark_allocated_since_marking(hr);
       if (allocated_since_marking || hr->next_marked_bytes() > 0) {
         _helper.set_bit_for_region(hr);
@@ -459,27 +484,26 @@
       // Verify the marked bytes for this region.
 
       if (exp_marked_bytes != act_marked_bytes) {
+        log_error(gc)("Expected marked bytes " SIZE_FORMAT " != actual marked bytes " SIZE_FORMAT " in region %u", exp_marked_bytes, act_marked_bytes, hr->hrm_index());
         failures += 1;
       } else if (exp_marked_bytes > HeapRegion::GrainBytes) {
+        log_error(gc)("Expected marked bytes " SIZE_FORMAT " larger than possible " SIZE_FORMAT " in region %u", exp_marked_bytes, HeapRegion::GrainBytes, hr->hrm_index());
         failures += 1;
       }
 
       // Verify the bit, for this region, in the actual and expected
       // (which was just calculated) region bit maps.
-      // We're not OK if the bit in the calculated expected region
-      // bitmap is set and the bit in the actual region bitmap is not.
       uint index = hr->hrm_index();
 
       bool expected = _exp_live_data->is_region_live(index);
       bool actual = _act_live_data->is_region_live(index);
-      if (expected && !actual) {
+      if (expected != actual) {
+        log_error(gc)("Expected liveness %d not equal actual %d in region %u", expected, actual, hr->hrm_index());
         failures += 1;
       }
 
       // Verify that the card bit maps for the cards spanned by the current
-      // region match. We have an error if we have a set bit in the expected
-      // bit map and the corresponding bit in the actual bitmap is not set.
-
+      // region match.
       BitMap::idx_t start_idx = _helper.card_live_bitmap_index_for(hr->bottom());
       BitMap::idx_t end_idx = _helper.card_live_bitmap_index_for(hr->top());
 
@@ -487,7 +511,8 @@
         expected = _exp_live_data->is_card_live_at(i);
         actual = _act_live_data->is_card_live_at(i);
 
-        if (expected && !actual) {
+        if (expected != actual) {
+          log_error(gc)("Expected card liveness %d not equal actual card liveness %d at card " SIZE_FORMAT " in region %u", expected, actual, i, hr->hrm_index());
           failures += 1;
         }
       }
--- a/hotspot/src/share/vm/gc/g1/g1CardLiveData.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CardLiveData.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -46,6 +46,17 @@
   size_t _max_capacity;
   size_t _cards_per_region;
 
+  // Regions may be reclaimed while concurrently creating live data (e.g. due to humongous
+  // eager reclaim). This results in wrong live data for these regions at the end.
+  // So we need to somehow detect these regions, and during live data finalization completely
+  // recreate their information.
+  // This _gc_timestamp_at_create tracks the global timestamp when live data creation
+  // has started. Any regions with a higher time stamp have been cleared after that
+  // point in time, and need re-finalization.
+  // Unsynchronized access to this variable is okay, since this value is only set during a
+  // concurrent phase, and read only at the Cleanup safepoint. I.e. there is always
+  // full memory synchronization inbetween.
+  uint _gc_timestamp_at_create;
   // The per-card liveness bitmap.
   bm_word_t* _live_cards;
   size_t _live_cards_size_in_bits;
@@ -69,6 +80,8 @@
   size_t live_region_bitmap_size_in_bits() const;
   size_t live_card_bitmap_size_in_bits() const;
 public:
+  uint gc_timestamp_at_create() const { return _gc_timestamp_at_create; }
+
   inline bool is_region_live(uint region) const;
 
   inline void remove_nonlive_cards(uint region, BitMap* bm);
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -45,6 +45,7 @@
 #include "gc/g1/g1MarkSweep.hpp"
 #include "gc/g1/g1OopClosures.inline.hpp"
 #include "gc/g1/g1ParScanThreadState.inline.hpp"
+#include "gc/g1/g1Policy.hpp"
 #include "gc/g1/g1RegionToSpaceMapper.hpp"
 #include "gc/g1/g1RemSet.inline.hpp"
 #include "gc/g1/g1RootClosures.hpp"
@@ -97,7 +98,7 @@
   RefineCardTableEntryClosure() : _concurrent(true) { }
 
   bool do_card_ptr(jbyte* card_ptr, uint worker_i) {
-    bool oops_into_cset = G1CollectedHeap::heap()->g1_rem_set()->refine_card(card_ptr, worker_i, false);
+    bool oops_into_cset = G1CollectedHeap::heap()->g1_rem_set()->refine_card(card_ptr, worker_i, NULL);
     // This path is executed by the concurrent refine or mutator threads,
     // concurrently, and so we do not care if card_ptr contains references
     // that point into the collection set.
@@ -1744,10 +1745,11 @@
 
 // Public methods.
 
-G1CollectedHeap::G1CollectedHeap(G1CollectorPolicy* policy_) :
+G1CollectedHeap::G1CollectedHeap(G1CollectorPolicy* collector_policy) :
   CollectedHeap(),
-  _g1_policy(policy_),
-  _collection_set(this),
+  _collector_policy(collector_policy),
+  _g1_policy(create_g1_policy()),
+  _collection_set(this, _g1_policy),
   _dirty_card_queue_set(false),
   _is_alive_closure_cm(this),
   _is_alive_closure_stw(this),
@@ -1987,7 +1989,7 @@
   }
 
   // Perform any initialization actions delegated to the policy.
-  g1_policy()->init();
+  g1_policy()->init(this, &_collection_set);
 
   JavaThread::satb_mark_queue_set().initialize(SATB_Q_CBL_mon,
                                                SATB_Q_FL_lock,
@@ -2056,7 +2058,6 @@
 }
 
 void G1CollectedHeap::post_initialize() {
-  CollectedHeap::post_initialize();
   ref_processing_init();
 }
 
@@ -2134,7 +2135,7 @@
 }
 
 CollectorPolicy* G1CollectedHeap::collector_policy() const {
-  return g1_policy();
+  return _collector_policy;
 }
 
 size_t G1CollectedHeap::capacity() const {
@@ -3088,28 +3089,6 @@
     }
 };
 
-#ifdef ASSERT
-class VerifyCSetClosure: public HeapRegionClosure {
-public:
-  bool doHeapRegion(HeapRegion* hr) {
-    // Here we check that the CSet region's RSet is ready for parallel
-    // iteration. The fields that we'll verify are only manipulated
-    // when the region is part of a CSet and is collected. Afterwards,
-    // we reset these fields when we clear the region's RSet (when the
-    // region is freed) so they are ready when the region is
-    // re-allocated. The only exception to this is if there's an
-    // evacuation failure and instead of freeing the region we leave
-    // it in the heap. In that case, we reset these fields during
-    // evacuation failure handling.
-    guarantee(hr->rem_set()->verify_ready_for_par_iteration(), "verification");
-
-    // Here's a good place to add any other checks we'd like to
-    // perform on CSet regions.
-    return false;
-  }
-};
-#endif // ASSERT
-
 uint G1CollectedHeap::num_task_queues() const {
   return _task_queues->size();
 }
@@ -3352,11 +3331,6 @@
           }
         }
 
-#ifdef ASSERT
-        VerifyCSetClosure cl;
-        collection_set_iterate(&cl);
-#endif // ASSERT
-
         // Initialize the GC alloc regions.
         _allocator->init_gc_alloc_regions(evacuation_info);
 
@@ -4859,7 +4833,7 @@
   // head and length, and unlink any young regions in the code below
   _young_list->clear();
 
-  G1CollectorPolicy* policy = g1_policy();
+  G1Policy* policy = g1_policy();
 
   double start_sec = os::elapsedTime();
   bool non_young = true;
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -68,6 +68,7 @@
 class Space;
 class G1CollectionSet;
 class G1CollectorPolicy;
+class G1Policy;
 class G1RemSet;
 class HeapRegionRemSetIterator;
 class G1ConcurrentMark;
@@ -137,6 +138,7 @@
 
 private:
   WorkGang* _workers;
+  G1CollectorPolicy* _collector_policy;
 
   static size_t _humongous_object_threshold_in_words;
 
@@ -243,7 +245,7 @@
   // If not, we can skip a few steps.
   bool _has_humongous_reclaim_candidates;
 
-  volatile unsigned _gc_time_stamp;
+  volatile uint _gc_time_stamp;
 
   G1HRPrinter _hr_printer;
 
@@ -290,6 +292,8 @@
                                                          size_t size,
                                                          size_t translation_factor);
 
+  static G1Policy* create_g1_policy();
+
   void trace_heap(GCWhen::Type when, const GCTracer* tracer);
 
   void process_weak_jni_handles();
@@ -360,7 +364,7 @@
   YoungList*  _young_list;
 
   // The current policy object for the collector.
-  G1CollectorPolicy* _g1_policy;
+  G1Policy* _g1_policy;
   G1HeapSizingPolicy* _heap_sizing_policy;
 
   G1CollectionSet _collection_set;
@@ -979,7 +983,7 @@
   G1CollectorState* collector_state() { return &_collector_state; }
 
   // The current policy object for the collector.
-  G1CollectorPolicy* g1_policy() const { return _g1_policy; }
+  G1Policy* g1_policy() const { return _g1_policy; }
 
   const G1CollectionSet* collection_set() const { return &_collection_set; }
   G1CollectionSet* collection_set() { return &_collection_set; }
@@ -995,7 +999,7 @@
   // Try to minimize the remembered set.
   void scrub_rem_set();
 
-  unsigned get_gc_time_stamp() {
+  uint get_gc_time_stamp() {
     return _gc_time_stamp;
   }
 
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.inline.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.inline.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -26,7 +26,6 @@
 #define SHARE_VM_GC_G1_G1COLLECTEDHEAP_INLINE_HPP
 
 #include "gc/g1/g1CollectedHeap.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/g1/g1CollectorState.hpp"
 #include "gc/g1/g1ConcurrentMark.inline.hpp"
 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap_ext.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap_ext.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "gc/g1/g1CollectedHeap.hpp"
+#include "gc/g1/g1DefaultPolicy.hpp"
 #include "gc/g1/g1ParScanThreadState.hpp"
 #include "gc/g1/heapRegion.inline.hpp"
 
@@ -38,3 +39,7 @@
                                              MemRegion mr) {
   return new HeapRegion(hrs_index, bot(), mr);
 }
+
+G1Policy* G1CollectedHeap::create_g1_policy() {
+  return new G1DefaultPolicy();
+}
--- a/hotspot/src/share/vm/gc/g1/g1CollectionSet.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectionSet.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -25,8 +25,8 @@
 #include "precompiled.hpp"
 #include "gc/g1/g1CollectedHeap.hpp"
 #include "gc/g1/g1CollectionSet.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/g1/g1CollectorState.hpp"
+#include "gc/g1/g1Policy.hpp"
 #include "gc/g1/heapRegion.inline.hpp"
 #include "gc/g1/heapRegionRemSet.hpp"
 #include "gc/g1/heapRegionSet.hpp"
@@ -49,9 +49,9 @@
 }
 
 
-G1CollectionSet::G1CollectionSet(G1CollectedHeap* g1h) :
+G1CollectionSet::G1CollectionSet(G1CollectedHeap* g1h, G1Policy* policy) :
   _g1(g1h),
-  _policy(NULL),
+  _policy(policy),
   _cset_chooser(new CollectionSetChooser()),
   _eden_region_length(0),
   _survivor_region_length(0),
--- a/hotspot/src/share/vm/gc/g1/g1CollectionSet.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectionSet.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -31,14 +31,14 @@
 #include "utilities/globalDefinitions.hpp"
 
 class G1CollectedHeap;
-class G1CollectorPolicy;
 class G1CollectorState;
 class G1GCPhaseTimes;
+class G1Policy;
 class HeapRegion;
 
 class G1CollectionSet VALUE_OBJ_CLASS_SPEC {
   G1CollectedHeap* _g1;
-  G1CollectorPolicy* _policy;
+  G1Policy* _policy;
 
   CollectionSetChooser* _cset_chooser;
 
@@ -110,14 +110,9 @@
   double predict_region_elapsed_time_ms(HeapRegion* hr);
 
 public:
-  G1CollectionSet(G1CollectedHeap* g1h);
+  G1CollectionSet(G1CollectedHeap* g1h, G1Policy* policy);
   ~G1CollectionSet();
 
-  void set_policy(G1CollectorPolicy* g1p) {
-    assert(_policy == NULL, "should only initialize once");
-    _policy = g1p;
-  }
-
   CollectionSetChooser* cset_chooser();
 
   void init_region_lengths(uint eden_cset_region_length,
--- a/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -23,43 +23,16 @@
  */
 
 #include "precompiled.hpp"
-#include "gc/g1/concurrentG1Refine.hpp"
-#include "gc/g1/concurrentMarkThread.inline.hpp"
 #include "gc/g1/g1Analytics.hpp"
-#include "gc/g1/g1CollectedHeap.inline.hpp"
-#include "gc/g1/g1CollectionSet.hpp"
 #include "gc/g1/g1CollectorPolicy.hpp"
-#include "gc/g1/g1ConcurrentMark.hpp"
-#include "gc/g1/g1IHOPControl.hpp"
-#include "gc/g1/g1GCPhaseTimes.hpp"
 #include "gc/g1/g1YoungGenSizer.hpp"
-#include "gc/g1/heapRegion.inline.hpp"
+#include "gc/g1/heapRegion.hpp"
 #include "gc/g1/heapRegionRemSet.hpp"
 #include "gc/shared/gcPolicyCounters.hpp"
-#include "runtime/arguments.hpp"
-#include "runtime/java.hpp"
-#include "runtime/mutexLocker.hpp"
+#include "runtime/globals.hpp"
 #include "utilities/debug.hpp"
-#include "utilities/pair.hpp"
 
-G1CollectorPolicy::G1CollectorPolicy() :
-  _predictor(G1ConfidencePercent / 100.0),
-  _analytics(new G1Analytics(&_predictor)),
-  _pause_time_target_ms((double) MaxGCPauseMillis),
-  _rs_lengths_prediction(0),
-  _max_survivor_regions(0),
-  _survivors_age_table(true),
-
-  _bytes_allocated_in_old_since_last_gc(0),
-  _ihop_control(NULL),
-  _initial_mark_to_mixed() {
-
-  // SurvRateGroups below must be initialized after the predictor because they
-  // indirectly use it through this object passed to their constructor.
-  _short_lived_surv_rate_group =
-    new SurvRateGroup(&_predictor, "Short Lived", G1YoungSurvRateNumRegionsSummary);
-  _survivor_surv_rate_group =
-    new SurvRateGroup(&_predictor, "Survivor", G1YoungSurvRateNumRegionsSummary);
+G1CollectorPolicy::G1CollectorPolicy() {
 
   // Set up the region size and associated fields. Given that the
   // policy is created before the heap, we have to set this up here,
@@ -74,64 +47,6 @@
   // unaligned values for the heap.
   HeapRegion::setup_heap_region_size(InitialHeapSize, MaxHeapSize);
   HeapRegionRemSet::setup_remset_size();
-
-  _phase_times = new G1GCPhaseTimes(ParallelGCThreads);
-
-  // Below, we might need to calculate the pause time target based on
-  // the pause interval. When we do so we are going to give G1 maximum
-  // flexibility and allow it to do pauses when it needs to. So, we'll
-  // arrange that the pause interval to be pause time target + 1 to
-  // ensure that a) the pause time target is maximized with respect to
-  // the pause interval and b) we maintain the invariant that pause
-  // time target < pause interval. If the user does not want this
-  // maximum flexibility, they will have to set the pause interval
-  // explicitly.
-
-  // First make sure that, if either parameter is set, its value is
-  // reasonable.
-  guarantee(MaxGCPauseMillis >= 1, "Range checking for MaxGCPauseMillis should guarantee that value is >= 1");
-
-  // Then, if the pause time target parameter was not set, set it to
-  // the default value.
-  if (FLAG_IS_DEFAULT(MaxGCPauseMillis)) {
-    if (FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
-      // The default pause time target in G1 is 200ms
-      FLAG_SET_DEFAULT(MaxGCPauseMillis, 200);
-    } else {
-      // We do not allow the pause interval to be set without the
-      // pause time target
-      vm_exit_during_initialization("GCPauseIntervalMillis cannot be set "
-                                    "without setting MaxGCPauseMillis");
-    }
-  }
-
-  // Then, if the interval parameter was not set, set it according to
-  // the pause time target (this will also deal with the case when the
-  // pause time target is the default value).
-  if (FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
-    FLAG_SET_DEFAULT(GCPauseIntervalMillis, MaxGCPauseMillis + 1);
-  }
-  guarantee(GCPauseIntervalMillis >= 1, "Constraint for GCPauseIntervalMillis should guarantee that value is >= 1");
-  guarantee(GCPauseIntervalMillis > MaxGCPauseMillis, "Constraint for GCPauseIntervalMillis should guarantee that GCPauseIntervalMillis > MaxGCPauseMillis");
-
-  double max_gc_time = (double) MaxGCPauseMillis / 1000.0;
-  double time_slice  = (double) GCPauseIntervalMillis / 1000.0;
-  _mmu_tracker = new G1MMUTrackerQueue(time_slice, max_gc_time);
-
-  _tenuring_threshold = MaxTenuringThreshold;
-
-
-  guarantee(G1ReservePercent <= 50, "Range checking should not allow values over 50.");
-  _reserve_factor = (double) G1ReservePercent / 100.0;
-  // This will be set when the heap is expanded
-  // for the first time during initialization.
-  _reserve_regions = 0;
-
-  _ihop_control = create_ihop_control();
-}
-
-G1CollectorPolicy::~G1CollectorPolicy() {
-  delete _ihop_control;
 }
 
 void G1CollectorPolicy::initialize_alignments() {
@@ -140,1133 +55,3 @@
   size_t page_size = UseLargePages ? os::large_page_size() : os::vm_page_size();
   _heap_alignment = MAX3(card_table_alignment, _space_alignment, page_size);
 }
-
-G1CollectorState* G1CollectorPolicy::collector_state() const { return _g1->collector_state(); }
-
-void G1CollectorPolicy::post_heap_initialize() {
-  uintx max_regions = G1CollectedHeap::heap()->max_regions();
-  size_t max_young_size = (size_t)_young_gen_sizer->max_young_length(max_regions) * HeapRegion::GrainBytes;
-  if (max_young_size != MaxNewSize) {
-    FLAG_SET_ERGO(size_t, MaxNewSize, max_young_size);
-  }
-}
-
-void G1CollectorPolicy::initialize_flags() {
-  if (G1HeapRegionSize != HeapRegion::GrainBytes) {
-    FLAG_SET_ERGO(size_t, G1HeapRegionSize, HeapRegion::GrainBytes);
-  }
-
-  guarantee(SurvivorRatio >= 1, "Range checking for SurvivorRatio should guarantee that value is >= 1");
-
-  CollectorPolicy::initialize_flags();
-  _young_gen_sizer = new G1YoungGenSizer(); // Must be after call to initialize_flags
-}
-
-
-void G1CollectorPolicy::init() {
-  // Set aside an initial future to_space.
-  _g1 = G1CollectedHeap::heap();
-  _collection_set = _g1->collection_set();
-  _collection_set->set_policy(this);
-
-  assert(Heap_lock->owned_by_self(), "Locking discipline.");
-
-  initialize_gc_policy_counters();
-
-  if (adaptive_young_list_length()) {
-    _young_list_fixed_length = 0;
-  } else {
-    _young_list_fixed_length = _young_gen_sizer->min_desired_young_length();
-  }
-  _free_regions_at_end_of_collection = _g1->num_free_regions();
-
-  update_young_list_max_and_target_length();
-  // We may immediately start allocating regions and placing them on the
-  // collection set list. Initialize the per-collection set info
-  _collection_set->start_incremental_building();
-}
-
-void G1CollectorPolicy::note_gc_start() {
-  phase_times()->note_gc_start();
-}
-
-// Create the jstat counters for the policy.
-void G1CollectorPolicy::initialize_gc_policy_counters() {
-  _gc_policy_counters = new GCPolicyCounters("GarbageFirst", 1, 3);
-}
-
-bool G1CollectorPolicy::predict_will_fit(uint young_length,
-                                         double base_time_ms,
-                                         uint base_free_regions,
-                                         double target_pause_time_ms) const {
-  if (young_length >= base_free_regions) {
-    // end condition 1: not enough space for the young regions
-    return false;
-  }
-
-  double accum_surv_rate = accum_yg_surv_rate_pred((int) young_length - 1);
-  size_t bytes_to_copy =
-               (size_t) (accum_surv_rate * (double) HeapRegion::GrainBytes);
-  double copy_time_ms = _analytics->predict_object_copy_time_ms(bytes_to_copy,
-                                                                collector_state()->during_concurrent_mark());
-  double young_other_time_ms = _analytics->predict_young_other_time_ms(young_length);
-  double pause_time_ms = base_time_ms + copy_time_ms + young_other_time_ms;
-  if (pause_time_ms > target_pause_time_ms) {
-    // end condition 2: prediction is over the target pause time
-    return false;
-  }
-
-  size_t free_bytes = (base_free_regions - young_length) * HeapRegion::GrainBytes;
-
-  // When copying, we will likely need more bytes free than is live in the region.
-  // Add some safety margin to factor in the confidence of our guess, and the
-  // natural expected waste.
-  // (100.0 / G1ConfidencePercent) is a scale factor that expresses the uncertainty
-  // of the calculation: the lower the confidence, the more headroom.
-  // (100 + TargetPLABWastePct) represents the increase in expected bytes during
-  // copying due to anticipated waste in the PLABs.
-  double safety_factor = (100.0 / G1ConfidencePercent) * (100 + TargetPLABWastePct) / 100.0;
-  size_t expected_bytes_to_copy = (size_t)(safety_factor * bytes_to_copy);
-
-  if (expected_bytes_to_copy > free_bytes) {
-    // end condition 3: out-of-space
-    return false;
-  }
-
-  // success!
-  return true;
-}
-
-void G1CollectorPolicy::record_new_heap_size(uint new_number_of_regions) {
-  // re-calculate the necessary reserve
-  double reserve_regions_d = (double) new_number_of_regions * _reserve_factor;
-  // We use ceiling so that if reserve_regions_d is > 0.0 (but
-  // smaller than 1.0) we'll get 1.
-  _reserve_regions = (uint) ceil(reserve_regions_d);
-
-  _young_gen_sizer->heap_size_changed(new_number_of_regions);
-
-  _ihop_control->update_target_occupancy(new_number_of_regions * HeapRegion::GrainBytes);
-}
-
-uint G1CollectorPolicy::calculate_young_list_desired_min_length(
-                                                       uint base_min_length) const {
-  uint desired_min_length = 0;
-  if (adaptive_young_list_length()) {
-    if (_analytics->num_alloc_rate_ms() > 3) {
-      double now_sec = os::elapsedTime();
-      double when_ms = _mmu_tracker->when_max_gc_sec(now_sec) * 1000.0;
-      double alloc_rate_ms = _analytics->predict_alloc_rate_ms();
-      desired_min_length = (uint) ceil(alloc_rate_ms * when_ms);
-    } else {
-      // otherwise we don't have enough info to make the prediction
-    }
-  }
-  desired_min_length += base_min_length;
-  // make sure we don't go below any user-defined minimum bound
-  return MAX2(_young_gen_sizer->min_desired_young_length(), desired_min_length);
-}
-
-uint G1CollectorPolicy::calculate_young_list_desired_max_length() const {
-  // Here, we might want to also take into account any additional
-  // constraints (i.e., user-defined minimum bound). Currently, we
-  // effectively don't set this bound.
-  return _young_gen_sizer->max_desired_young_length();
-}
-
-uint G1CollectorPolicy::update_young_list_max_and_target_length() {
-  return update_young_list_max_and_target_length(_analytics->predict_rs_lengths());
-}
-
-uint G1CollectorPolicy::update_young_list_max_and_target_length(size_t rs_lengths) {
-  uint unbounded_target_length = update_young_list_target_length(rs_lengths);
-  update_max_gc_locker_expansion();
-  return unbounded_target_length;
-}
-
-uint G1CollectorPolicy::update_young_list_target_length(size_t rs_lengths) {
-  YoungTargetLengths young_lengths = young_list_target_lengths(rs_lengths);
-  _young_list_target_length = young_lengths.first;
-  return young_lengths.second;
-}
-
-G1CollectorPolicy::YoungTargetLengths G1CollectorPolicy::young_list_target_lengths(size_t rs_lengths) const {
-  YoungTargetLengths result;
-
-  // Calculate the absolute and desired min bounds first.
-
-  // This is how many young regions we already have (currently: the survivors).
-  const uint base_min_length = _g1->young_list()->survivor_length();
-  uint desired_min_length = calculate_young_list_desired_min_length(base_min_length);
-  // This is the absolute minimum young length. Ensure that we
-  // will at least have one eden region available for allocation.
-  uint absolute_min_length = base_min_length + MAX2(_g1->young_list()->eden_length(), (uint)1);
-  // If we shrank the young list target it should not shrink below the current size.
-  desired_min_length = MAX2(desired_min_length, absolute_min_length);
-  // Calculate the absolute and desired max bounds.
-
-  uint desired_max_length = calculate_young_list_desired_max_length();
-
-  uint young_list_target_length = 0;
-  if (adaptive_young_list_length()) {
-    if (collector_state()->gcs_are_young()) {
-      young_list_target_length =
-                        calculate_young_list_target_length(rs_lengths,
-                                                           base_min_length,
-                                                           desired_min_length,
-                                                           desired_max_length);
-    } else {
-      // Don't calculate anything and let the code below bound it to
-      // the desired_min_length, i.e., do the next GC as soon as
-      // possible to maximize how many old regions we can add to it.
-    }
-  } else {
-    // The user asked for a fixed young gen so we'll fix the young gen
-    // whether the next GC is young or mixed.
-    young_list_target_length = _young_list_fixed_length;
-  }
-
-  result.second = young_list_target_length;
-
-  // We will try our best not to "eat" into the reserve.
-  uint absolute_max_length = 0;
-  if (_free_regions_at_end_of_collection > _reserve_regions) {
-    absolute_max_length = _free_regions_at_end_of_collection - _reserve_regions;
-  }
-  if (desired_max_length > absolute_max_length) {
-    desired_max_length = absolute_max_length;
-  }
-
-  // Make sure we don't go over the desired max length, nor under the
-  // desired min length. In case they clash, desired_min_length wins
-  // which is why that test is second.
-  if (young_list_target_length > desired_max_length) {
-    young_list_target_length = desired_max_length;
-  }
-  if (young_list_target_length < desired_min_length) {
-    young_list_target_length = desired_min_length;
-  }
-
-  assert(young_list_target_length > base_min_length,
-         "we should be able to allocate at least one eden region");
-  assert(young_list_target_length >= absolute_min_length, "post-condition");
-
-  result.first = young_list_target_length;
-  return result;
-}
-
-uint
-G1CollectorPolicy::calculate_young_list_target_length(size_t rs_lengths,
-                                                     uint base_min_length,
-                                                     uint desired_min_length,
-                                                     uint desired_max_length) const {
-  assert(adaptive_young_list_length(), "pre-condition");
-  assert(collector_state()->gcs_are_young(), "only call this for young GCs");
-
-  // In case some edge-condition makes the desired max length too small...
-  if (desired_max_length <= desired_min_length) {
-    return desired_min_length;
-  }
-
-  // We'll adjust min_young_length and max_young_length not to include
-  // the already allocated young regions (i.e., so they reflect the
-  // min and max eden regions we'll allocate). The base_min_length
-  // will be reflected in the predictions by the
-  // survivor_regions_evac_time prediction.
-  assert(desired_min_length > base_min_length, "invariant");
-  uint min_young_length = desired_min_length - base_min_length;
-  assert(desired_max_length > base_min_length, "invariant");
-  uint max_young_length = desired_max_length - base_min_length;
-
-  double target_pause_time_ms = _mmu_tracker->max_gc_time() * 1000.0;
-  double survivor_regions_evac_time = predict_survivor_regions_evac_time();
-  size_t pending_cards = _analytics->predict_pending_cards();
-  size_t adj_rs_lengths = rs_lengths + _analytics->predict_rs_length_diff();
-  size_t scanned_cards = _analytics->predict_card_num(adj_rs_lengths, /* gcs_are_young */ true);
-  double base_time_ms =
-    predict_base_elapsed_time_ms(pending_cards, scanned_cards) +
-    survivor_regions_evac_time;
-  uint available_free_regions = _free_regions_at_end_of_collection;
-  uint base_free_regions = 0;
-  if (available_free_regions > _reserve_regions) {
-    base_free_regions = available_free_regions - _reserve_regions;
-  }
-
-  // Here, we will make sure that the shortest young length that
-  // makes sense fits within the target pause time.
-
-  if (predict_will_fit(min_young_length, base_time_ms,
-                       base_free_regions, target_pause_time_ms)) {
-    // The shortest young length will fit into the target pause time;
-    // we'll now check whether the absolute maximum number of young
-    // regions will fit in the target pause time. If not, we'll do
-    // a binary search between min_young_length and max_young_length.
-    if (predict_will_fit(max_young_length, base_time_ms,
-                         base_free_regions, target_pause_time_ms)) {
-      // The maximum young length will fit into the target pause time.
-      // We are done so set min young length to the maximum length (as
-      // the result is assumed to be returned in min_young_length).
-      min_young_length = max_young_length;
-    } else {
-      // The maximum possible number of young regions will not fit within
-      // the target pause time so we'll search for the optimal
-      // length. The loop invariants are:
-      //
-      // min_young_length < max_young_length
-      // min_young_length is known to fit into the target pause time
-      // max_young_length is known not to fit into the target pause time
-      //
-      // Going into the loop we know the above hold as we've just
-      // checked them. Every time around the loop we check whether
-      // the middle value between min_young_length and
-      // max_young_length fits into the target pause time. If it
-      // does, it becomes the new min. If it doesn't, it becomes
-      // the new max. This way we maintain the loop invariants.
-
-      assert(min_young_length < max_young_length, "invariant");
-      uint diff = (max_young_length - min_young_length) / 2;
-      while (diff > 0) {
-        uint young_length = min_young_length + diff;
-        if (predict_will_fit(young_length, base_time_ms,
-                             base_free_regions, target_pause_time_ms)) {
-          min_young_length = young_length;
-        } else {
-          max_young_length = young_length;
-        }
-        assert(min_young_length <  max_young_length, "invariant");
-        diff = (max_young_length - min_young_length) / 2;
-      }
-      // The results is min_young_length which, according to the
-      // loop invariants, should fit within the target pause time.
-
-      // These are the post-conditions of the binary search above:
-      assert(min_young_length < max_young_length,
-             "otherwise we should have discovered that max_young_length "
-             "fits into the pause target and not done the binary search");
-      assert(predict_will_fit(min_young_length, base_time_ms,
-                              base_free_regions, target_pause_time_ms),
-             "min_young_length, the result of the binary search, should "
-             "fit into the pause target");
-      assert(!predict_will_fit(min_young_length + 1, base_time_ms,
-                               base_free_regions, target_pause_time_ms),
-             "min_young_length, the result of the binary search, should be "
-             "optimal, so no larger length should fit into the pause target");
-    }
-  } else {
-    // Even the minimum length doesn't fit into the pause time
-    // target, return it as the result nevertheless.
-  }
-  return base_min_length + min_young_length;
-}
-
-double G1CollectorPolicy::predict_survivor_regions_evac_time() const {
-  double survivor_regions_evac_time = 0.0;
-  for (HeapRegion * r = _g1->young_list()->first_survivor_region();
-       r != NULL && r != _g1->young_list()->last_survivor_region()->get_next_young_region();
-       r = r->get_next_young_region()) {
-    survivor_regions_evac_time += predict_region_elapsed_time_ms(r, collector_state()->gcs_are_young());
-  }
-  return survivor_regions_evac_time;
-}
-
-void G1CollectorPolicy::revise_young_list_target_length_if_necessary(size_t rs_lengths) {
-  guarantee( adaptive_young_list_length(), "should not call this otherwise" );
-
-  if (rs_lengths > _rs_lengths_prediction) {
-    // add 10% to avoid having to recalculate often
-    size_t rs_lengths_prediction = rs_lengths * 1100 / 1000;
-    update_rs_lengths_prediction(rs_lengths_prediction);
-
-    update_young_list_max_and_target_length(rs_lengths_prediction);
-  }
-}
-
-void G1CollectorPolicy::update_rs_lengths_prediction() {
-  update_rs_lengths_prediction(_analytics->predict_rs_lengths());
-}
-
-void G1CollectorPolicy::update_rs_lengths_prediction(size_t prediction) {
-  if (collector_state()->gcs_are_young() && adaptive_young_list_length()) {
-    _rs_lengths_prediction = prediction;
-  }
-}
-
-#ifndef PRODUCT
-bool G1CollectorPolicy::verify_young_ages() {
-  HeapRegion* head = _g1->young_list()->first_region();
-  return
-    verify_young_ages(head, _short_lived_surv_rate_group);
-  // also call verify_young_ages on any additional surv rate groups
-}
-
-bool
-G1CollectorPolicy::verify_young_ages(HeapRegion* head,
-                                     SurvRateGroup *surv_rate_group) {
-  guarantee( surv_rate_group != NULL, "pre-condition" );
-
-  const char* name = surv_rate_group->name();
-  bool ret = true;
-  int prev_age = -1;
-
-  for (HeapRegion* curr = head;
-       curr != NULL;
-       curr = curr->get_next_young_region()) {
-    SurvRateGroup* group = curr->surv_rate_group();
-    if (group == NULL && !curr->is_survivor()) {
-      log_error(gc, verify)("## %s: encountered NULL surv_rate_group", name);
-      ret = false;
-    }
-
-    if (surv_rate_group == group) {
-      int age = curr->age_in_surv_rate_group();
-
-      if (age < 0) {
-        log_error(gc, verify)("## %s: encountered negative age", name);
-        ret = false;
-      }
-
-      if (age <= prev_age) {
-        log_error(gc, verify)("## %s: region ages are not strictly increasing (%d, %d)", name, age, prev_age);
-        ret = false;
-      }
-      prev_age = age;
-    }
-  }
-
-  return ret;
-}
-#endif // PRODUCT
-
-void G1CollectorPolicy::record_full_collection_start() {
-  _full_collection_start_sec = os::elapsedTime();
-  // Release the future to-space so that it is available for compaction into.
-  collector_state()->set_full_collection(true);
-}
-
-void G1CollectorPolicy::record_full_collection_end() {
-  // Consider this like a collection pause for the purposes of allocation
-  // since last pause.
-  double end_sec = os::elapsedTime();
-  double full_gc_time_sec = end_sec - _full_collection_start_sec;
-  double full_gc_time_ms = full_gc_time_sec * 1000.0;
-
-  _analytics->update_recent_gc_times(end_sec, full_gc_time_ms);
-
-  collector_state()->set_full_collection(false);
-
-  // "Nuke" the heuristics that control the young/mixed GC
-  // transitions and make sure we start with young GCs after the Full GC.
-  collector_state()->set_gcs_are_young(true);
-  collector_state()->set_last_young_gc(false);
-  collector_state()->set_initiate_conc_mark_if_possible(need_to_start_conc_mark("end of Full GC", 0));
-  collector_state()->set_during_initial_mark_pause(false);
-  collector_state()->set_in_marking_window(false);
-  collector_state()->set_in_marking_window_im(false);
-
-  _short_lived_surv_rate_group->start_adding_regions();
-  // also call this on any additional surv rate groups
-
-  _free_regions_at_end_of_collection = _g1->num_free_regions();
-  // Reset survivors SurvRateGroup.
-  _survivor_surv_rate_group->reset();
-  update_young_list_max_and_target_length();
-  update_rs_lengths_prediction();
-  cset_chooser()->clear();
-
-  _bytes_allocated_in_old_since_last_gc = 0;
-
-  record_pause(FullGC, _full_collection_start_sec, end_sec);
-}
-
-void G1CollectorPolicy::record_collection_pause_start(double start_time_sec) {
-  // We only need to do this here as the policy will only be applied
-  // to the GC we're about to start. so, no point is calculating this
-  // every time we calculate / recalculate the target young length.
-  update_survivors_policy();
-
-  assert(_g1->used() == _g1->recalculate_used(),
-         "sanity, used: " SIZE_FORMAT " recalculate_used: " SIZE_FORMAT,
-         _g1->used(), _g1->recalculate_used());
-
-  phase_times()->record_cur_collection_start_sec(start_time_sec);
-  _pending_cards = _g1->pending_card_num();
-
-  _collection_set->reset_bytes_used_before();
-  _bytes_copied_during_gc = 0;
-
-  collector_state()->set_last_gc_was_young(false);
-
-  // do that for any other surv rate groups
-  _short_lived_surv_rate_group->stop_adding_regions();
-  _survivors_age_table.clear();
-
-  assert( verify_young_ages(), "region age verification" );
-}
-
-void G1CollectorPolicy::record_concurrent_mark_init_end(double
-                                                   mark_init_elapsed_time_ms) {
-  collector_state()->set_during_marking(true);
-  assert(!collector_state()->initiate_conc_mark_if_possible(), "we should have cleared it by now");
-  collector_state()->set_during_initial_mark_pause(false);
-}
-
-void G1CollectorPolicy::record_concurrent_mark_remark_start() {
-  _mark_remark_start_sec = os::elapsedTime();
-  collector_state()->set_during_marking(false);
-}
-
-void G1CollectorPolicy::record_concurrent_mark_remark_end() {
-  double end_time_sec = os::elapsedTime();
-  double elapsed_time_ms = (end_time_sec - _mark_remark_start_sec)*1000.0;
-  _analytics->report_concurrent_mark_remark_times_ms(elapsed_time_ms);
-  _analytics->append_prev_collection_pause_end_ms(elapsed_time_ms);
-
-  record_pause(Remark, _mark_remark_start_sec, end_time_sec);
-}
-
-void G1CollectorPolicy::record_concurrent_mark_cleanup_start() {
-  _mark_cleanup_start_sec = os::elapsedTime();
-}
-
-void G1CollectorPolicy::record_concurrent_mark_cleanup_completed() {
-  bool should_continue_with_reclaim = next_gc_should_be_mixed("request last young-only gc",
-                                                              "skip last young-only gc");
-  collector_state()->set_last_young_gc(should_continue_with_reclaim);
-  // We skip the marking phase.
-  if (!should_continue_with_reclaim) {
-    abort_time_to_mixed_tracking();
-  }
-  collector_state()->set_in_marking_window(false);
-}
-
-double G1CollectorPolicy::average_time_ms(G1GCPhaseTimes::GCParPhases phase) const {
-  return phase_times()->average_time_ms(phase);
-}
-
-double G1CollectorPolicy::young_other_time_ms() const {
-  return phase_times()->young_cset_choice_time_ms() +
-         phase_times()->young_free_cset_time_ms();
-}
-
-double G1CollectorPolicy::non_young_other_time_ms() const {
-  return phase_times()->non_young_cset_choice_time_ms() +
-         phase_times()->non_young_free_cset_time_ms();
-
-}
-
-double G1CollectorPolicy::other_time_ms(double pause_time_ms) const {
-  return pause_time_ms -
-         average_time_ms(G1GCPhaseTimes::UpdateRS) -
-         average_time_ms(G1GCPhaseTimes::ScanRS) -
-         average_time_ms(G1GCPhaseTimes::ObjCopy) -
-         average_time_ms(G1GCPhaseTimes::Termination);
-}
-
-double G1CollectorPolicy::constant_other_time_ms(double pause_time_ms) const {
-  return other_time_ms(pause_time_ms) - young_other_time_ms() - non_young_other_time_ms();
-}
-
-CollectionSetChooser* G1CollectorPolicy::cset_chooser() const {
-  return _collection_set->cset_chooser();
-}
-
-bool G1CollectorPolicy::about_to_start_mixed_phase() const {
-  return _g1->concurrent_mark()->cmThread()->during_cycle() || collector_state()->last_young_gc();
-}
-
-bool G1CollectorPolicy::need_to_start_conc_mark(const char* source, size_t alloc_word_size) {
-  if (about_to_start_mixed_phase()) {
-    return false;
-  }
-
-  size_t marking_initiating_used_threshold = _ihop_control->get_conc_mark_start_threshold();
-
-  size_t cur_used_bytes = _g1->non_young_capacity_bytes();
-  size_t alloc_byte_size = alloc_word_size * HeapWordSize;
-  size_t marking_request_bytes = cur_used_bytes + alloc_byte_size;
-
-  bool result = false;
-  if (marking_request_bytes > marking_initiating_used_threshold) {
-    result = collector_state()->gcs_are_young() && !collector_state()->last_young_gc();
-    log_debug(gc, ergo, ihop)("%s occupancy: " SIZE_FORMAT "B allocation request: " SIZE_FORMAT "B threshold: " SIZE_FORMAT "B (%1.2f) source: %s",
-                              result ? "Request concurrent cycle initiation (occupancy higher than threshold)" : "Do not request concurrent cycle initiation (still doing mixed collections)",
-                              cur_used_bytes, alloc_byte_size, marking_initiating_used_threshold, (double) marking_initiating_used_threshold / _g1->capacity() * 100, source);
-  }
-
-  return result;
-}
-
-// Anything below that is considered to be zero
-#define MIN_TIMER_GRANULARITY 0.0000001
-
-void G1CollectorPolicy::record_collection_pause_end(double pause_time_ms, size_t cards_scanned, size_t heap_used_bytes_before_gc) {
-  double end_time_sec = os::elapsedTime();
-
-  size_t cur_used_bytes = _g1->used();
-  assert(cur_used_bytes == _g1->recalculate_used(), "It should!");
-  bool last_pause_included_initial_mark = false;
-  bool update_stats = !_g1->evacuation_failed();
-
-  NOT_PRODUCT(_short_lived_surv_rate_group->print());
-
-  record_pause(young_gc_pause_kind(), end_time_sec - pause_time_ms / 1000.0, end_time_sec);
-
-  last_pause_included_initial_mark = collector_state()->during_initial_mark_pause();
-  if (last_pause_included_initial_mark) {
-    record_concurrent_mark_init_end(0.0);
-  } else {
-    maybe_start_marking();
-  }
-
-  double app_time_ms = (phase_times()->cur_collection_start_sec() * 1000.0 - _analytics->prev_collection_pause_end_ms());
-  if (app_time_ms < MIN_TIMER_GRANULARITY) {
-    // This usually happens due to the timer not having the required
-    // granularity. Some Linuxes are the usual culprits.
-    // We'll just set it to something (arbitrarily) small.
-    app_time_ms = 1.0;
-  }
-
-  if (update_stats) {
-    // We maintain the invariant that all objects allocated by mutator
-    // threads will be allocated out of eden regions. So, we can use
-    // the eden region number allocated since the previous GC to
-    // calculate the application's allocate rate. The only exception
-    // to that is humongous objects that are allocated separately. But
-    // given that humongous object allocations do not really affect
-    // either the pause's duration nor when the next pause will take
-    // place we can safely ignore them here.
-    uint regions_allocated = _collection_set->eden_region_length();
-    double alloc_rate_ms = (double) regions_allocated / app_time_ms;
-    _analytics->report_alloc_rate_ms(alloc_rate_ms);
-
-    double interval_ms =
-      (end_time_sec - _analytics->last_known_gc_end_time_sec()) * 1000.0;
-    _analytics->update_recent_gc_times(end_time_sec, pause_time_ms);
-    _analytics->compute_pause_time_ratio(interval_ms, pause_time_ms);
-  }
-
-  bool new_in_marking_window = collector_state()->in_marking_window();
-  bool new_in_marking_window_im = false;
-  if (last_pause_included_initial_mark) {
-    new_in_marking_window = true;
-    new_in_marking_window_im = true;
-  }
-
-  if (collector_state()->last_young_gc()) {
-    // This is supposed to to be the "last young GC" before we start
-    // doing mixed GCs. Here we decide whether to start mixed GCs or not.
-    assert(!last_pause_included_initial_mark, "The last young GC is not allowed to be an initial mark GC");
-
-    if (next_gc_should_be_mixed("start mixed GCs",
-                                "do not start mixed GCs")) {
-      collector_state()->set_gcs_are_young(false);
-    } else {
-      // We aborted the mixed GC phase early.
-      abort_time_to_mixed_tracking();
-    }
-
-    collector_state()->set_last_young_gc(false);
-  }
-
-  if (!collector_state()->last_gc_was_young()) {
-    // This is a mixed GC. Here we decide whether to continue doing
-    // mixed GCs or not.
-    if (!next_gc_should_be_mixed("continue mixed GCs",
-                                 "do not continue mixed GCs")) {
-      collector_state()->set_gcs_are_young(true);
-
-      maybe_start_marking();
-    }
-  }
-
-  _short_lived_surv_rate_group->start_adding_regions();
-  // Do that for any other surv rate groups
-
-  double scan_hcc_time_ms = ConcurrentG1Refine::hot_card_cache_enabled() ? average_time_ms(G1GCPhaseTimes::ScanHCC) : 0.0;
-
-  if (update_stats) {
-    double cost_per_card_ms = 0.0;
-    if (_pending_cards > 0) {
-      cost_per_card_ms = (average_time_ms(G1GCPhaseTimes::UpdateRS) - scan_hcc_time_ms) / (double) _pending_cards;
-      _analytics->report_cost_per_card_ms(cost_per_card_ms);
-    }
-    _analytics->report_cost_scan_hcc(scan_hcc_time_ms);
-
-    double cost_per_entry_ms = 0.0;
-    if (cards_scanned > 10) {
-      cost_per_entry_ms = average_time_ms(G1GCPhaseTimes::ScanRS) / (double) cards_scanned;
-      _analytics->report_cost_per_entry_ms(cost_per_entry_ms, collector_state()->last_gc_was_young());
-    }
-
-    if (_max_rs_lengths > 0) {
-      double cards_per_entry_ratio =
-        (double) cards_scanned / (double) _max_rs_lengths;
-      _analytics->report_cards_per_entry_ratio(cards_per_entry_ratio, collector_state()->last_gc_was_young());
-    }
-
-    // This is defensive. For a while _max_rs_lengths could get
-    // smaller than _recorded_rs_lengths which was causing
-    // rs_length_diff to get very large and mess up the RSet length
-    // predictions. The reason was unsafe concurrent updates to the
-    // _inc_cset_recorded_rs_lengths field which the code below guards
-    // against (see CR 7118202). This bug has now been fixed (see CR
-    // 7119027). However, I'm still worried that
-    // _inc_cset_recorded_rs_lengths might still end up somewhat
-    // inaccurate. The concurrent refinement thread calculates an
-    // RSet's length concurrently with other CR threads updating it
-    // which might cause it to calculate the length incorrectly (if,
-    // say, it's in mid-coarsening). So I'll leave in the defensive
-    // conditional below just in case.
-    size_t rs_length_diff = 0;
-    size_t recorded_rs_lengths = _collection_set->recorded_rs_lengths();
-    if (_max_rs_lengths > recorded_rs_lengths) {
-      rs_length_diff = _max_rs_lengths - recorded_rs_lengths;
-    }
-    _analytics->report_rs_length_diff((double) rs_length_diff);
-
-    size_t freed_bytes = heap_used_bytes_before_gc - cur_used_bytes;
-    size_t copied_bytes = _collection_set->bytes_used_before() - freed_bytes;
-    double cost_per_byte_ms = 0.0;
-
-    if (copied_bytes > 0) {
-      cost_per_byte_ms = average_time_ms(G1GCPhaseTimes::ObjCopy) / (double) copied_bytes;
-      _analytics->report_cost_per_byte_ms(cost_per_byte_ms, collector_state()->in_marking_window());
-    }
-
-    if (_collection_set->young_region_length() > 0) {
-      _analytics->report_young_other_cost_per_region_ms(young_other_time_ms() /
-                                                        _collection_set->young_region_length());
-    }
-
-    if (_collection_set->old_region_length() > 0) {
-      _analytics->report_non_young_other_cost_per_region_ms(non_young_other_time_ms() /
-                                                            _collection_set->old_region_length());
-    }
-
-    _analytics->report_constant_other_time_ms(constant_other_time_ms(pause_time_ms));
-
-    _analytics->report_pending_cards((double) _pending_cards);
-    _analytics->report_rs_lengths((double) _max_rs_lengths);
-  }
-
-  collector_state()->set_in_marking_window(new_in_marking_window);
-  collector_state()->set_in_marking_window_im(new_in_marking_window_im);
-  _free_regions_at_end_of_collection = _g1->num_free_regions();
-  // IHOP control wants to know the expected young gen length if it were not
-  // restrained by the heap reserve. Using the actual length would make the
-  // prediction too small and the limit the young gen every time we get to the
-  // predicted target occupancy.
-  size_t last_unrestrained_young_length = update_young_list_max_and_target_length();
-  update_rs_lengths_prediction();
-
-  update_ihop_prediction(app_time_ms / 1000.0,
-                         _bytes_allocated_in_old_since_last_gc,
-                         last_unrestrained_young_length * HeapRegion::GrainBytes);
-  _bytes_allocated_in_old_since_last_gc = 0;
-
-  _ihop_control->send_trace_event(_g1->gc_tracer_stw());
-
-  // Note that _mmu_tracker->max_gc_time() returns the time in seconds.
-  double update_rs_time_goal_ms = _mmu_tracker->max_gc_time() * MILLIUNITS * G1RSetUpdatingPauseTimePercent / 100.0;
-
-  if (update_rs_time_goal_ms < scan_hcc_time_ms) {
-    log_debug(gc, ergo, refine)("Adjust concurrent refinement thresholds (scanning the HCC expected to take longer than Update RS time goal)."
-                                "Update RS time goal: %1.2fms Scan HCC time: %1.2fms",
-                                update_rs_time_goal_ms, scan_hcc_time_ms);
-
-    update_rs_time_goal_ms = 0;
-  } else {
-    update_rs_time_goal_ms -= scan_hcc_time_ms;
-  }
-  _g1->concurrent_g1_refine()->adjust(average_time_ms(G1GCPhaseTimes::UpdateRS) - scan_hcc_time_ms,
-                                      phase_times()->sum_thread_work_items(G1GCPhaseTimes::UpdateRS),
-                                      update_rs_time_goal_ms);
-
-  cset_chooser()->verify();
-}
-
-G1IHOPControl* G1CollectorPolicy::create_ihop_control() const {
-  if (G1UseAdaptiveIHOP) {
-    return new G1AdaptiveIHOPControl(InitiatingHeapOccupancyPercent,
-                                     &_predictor,
-                                     G1ReservePercent,
-                                     G1HeapWastePercent);
-  } else {
-    return new G1StaticIHOPControl(InitiatingHeapOccupancyPercent);
-  }
-}
-
-void G1CollectorPolicy::update_ihop_prediction(double mutator_time_s,
-                                               size_t mutator_alloc_bytes,
-                                               size_t young_gen_size) {
-  // Always try to update IHOP prediction. Even evacuation failures give information
-  // about e.g. whether to start IHOP earlier next time.
-
-  // Avoid using really small application times that might create samples with
-  // very high or very low values. They may be caused by e.g. back-to-back gcs.
-  double const min_valid_time = 1e-6;
-
-  bool report = false;
-
-  double marking_to_mixed_time = -1.0;
-  if (!collector_state()->last_gc_was_young() && _initial_mark_to_mixed.has_result()) {
-    marking_to_mixed_time = _initial_mark_to_mixed.last_marking_time();
-    assert(marking_to_mixed_time > 0.0,
-           "Initial mark to mixed time must be larger than zero but is %.3f",
-           marking_to_mixed_time);
-    if (marking_to_mixed_time > min_valid_time) {
-      _ihop_control->update_marking_length(marking_to_mixed_time);
-      report = true;
-    }
-  }
-
-  // As an approximation for the young gc promotion rates during marking we use
-  // all of them. In many applications there are only a few if any young gcs during
-  // marking, which makes any prediction useless. This increases the accuracy of the
-  // prediction.
-  if (collector_state()->last_gc_was_young() && mutator_time_s > min_valid_time) {
-    _ihop_control->update_allocation_info(mutator_time_s, mutator_alloc_bytes, young_gen_size);
-    report = true;
-  }
-
-  if (report) {
-    report_ihop_statistics();
-  }
-}
-
-void G1CollectorPolicy::report_ihop_statistics() {
-  _ihop_control->print();
-}
-
-void G1CollectorPolicy::print_phases() {
-  phase_times()->print();
-}
-
-double G1CollectorPolicy::predict_yg_surv_rate(int age, SurvRateGroup* surv_rate_group) const {
-  TruncatedSeq* seq = surv_rate_group->get_seq(age);
-  guarantee(seq->num() > 0, "There should be some young gen survivor samples available. Tried to access with age %d", age);
-  double pred = _predictor.get_new_prediction(seq);
-  if (pred > 1.0) {
-    pred = 1.0;
-  }
-  return pred;
-}
-
-double G1CollectorPolicy::predict_yg_surv_rate(int age) const {
-  return predict_yg_surv_rate(age, _short_lived_surv_rate_group);
-}
-
-double G1CollectorPolicy::accum_yg_surv_rate_pred(int age) const {
-  return _short_lived_surv_rate_group->accum_surv_rate_pred(age);
-}
-
-double G1CollectorPolicy::predict_base_elapsed_time_ms(size_t pending_cards,
-                                                       size_t scanned_cards) const {
-  return
-    _analytics->predict_rs_update_time_ms(pending_cards) +
-    _analytics->predict_rs_scan_time_ms(scanned_cards, collector_state()->gcs_are_young()) +
-    _analytics->predict_constant_other_time_ms();
-}
-
-double G1CollectorPolicy::predict_base_elapsed_time_ms(size_t pending_cards) const {
-  size_t rs_length = _analytics->predict_rs_lengths() + _analytics->predict_rs_length_diff();
-  size_t card_num = _analytics->predict_card_num(rs_length, collector_state()->gcs_are_young());
-  return predict_base_elapsed_time_ms(pending_cards, card_num);
-}
-
-size_t G1CollectorPolicy::predict_bytes_to_copy(HeapRegion* hr) const {
-  size_t bytes_to_copy;
-  if (hr->is_marked())
-    bytes_to_copy = hr->max_live_bytes();
-  else {
-    assert(hr->is_young() && hr->age_in_surv_rate_group() != -1, "invariant");
-    int age = hr->age_in_surv_rate_group();
-    double yg_surv_rate = predict_yg_surv_rate(age, hr->surv_rate_group());
-    bytes_to_copy = (size_t) (hr->used() * yg_surv_rate);
-  }
-  return bytes_to_copy;
-}
-
-double G1CollectorPolicy::predict_region_elapsed_time_ms(HeapRegion* hr,
-                                                         bool for_young_gc) const {
-  size_t rs_length = hr->rem_set()->occupied();
-  // Predicting the number of cards is based on which type of GC
-  // we're predicting for.
-  size_t card_num = _analytics->predict_card_num(rs_length, for_young_gc);
-  size_t bytes_to_copy = predict_bytes_to_copy(hr);
-
-  double region_elapsed_time_ms =
-    _analytics->predict_rs_scan_time_ms(card_num, collector_state()->gcs_are_young()) +
-    _analytics->predict_object_copy_time_ms(bytes_to_copy, collector_state()->during_concurrent_mark());
-
-  // The prediction of the "other" time for this region is based
-  // upon the region type and NOT the GC type.
-  if (hr->is_young()) {
-    region_elapsed_time_ms += _analytics->predict_young_other_time_ms(1);
-  } else {
-    region_elapsed_time_ms += _analytics->predict_non_young_other_time_ms(1);
-  }
-  return region_elapsed_time_ms;
-}
-
-
-void G1CollectorPolicy::print_yg_surv_rate_info() const {
-#ifndef PRODUCT
-  _short_lived_surv_rate_group->print_surv_rate_summary();
-  // add this call for any other surv rate groups
-#endif // PRODUCT
-}
-
-bool G1CollectorPolicy::is_young_list_full() const {
-  uint young_list_length = _g1->young_list()->length();
-  uint young_list_target_length = _young_list_target_length;
-  return young_list_length >= young_list_target_length;
-}
-
-bool G1CollectorPolicy::can_expand_young_list() const {
-  uint young_list_length = _g1->young_list()->length();
-  uint young_list_max_length = _young_list_max_length;
-  return young_list_length < young_list_max_length;
-}
-
-bool G1CollectorPolicy::adaptive_young_list_length() const {
-  return _young_gen_sizer->adaptive_young_list_length();
-}
-
-void G1CollectorPolicy::update_max_gc_locker_expansion() {
-  uint expansion_region_num = 0;
-  if (GCLockerEdenExpansionPercent > 0) {
-    double perc = (double) GCLockerEdenExpansionPercent / 100.0;
-    double expansion_region_num_d = perc * (double) _young_list_target_length;
-    // We use ceiling so that if expansion_region_num_d is > 0.0 (but
-    // less than 1.0) we'll get 1.
-    expansion_region_num = (uint) ceil(expansion_region_num_d);
-  } else {
-    assert(expansion_region_num == 0, "sanity");
-  }
-  _young_list_max_length = _young_list_target_length + expansion_region_num;
-  assert(_young_list_target_length <= _young_list_max_length, "post-condition");
-}
-
-// Calculates survivor space parameters.
-void G1CollectorPolicy::update_survivors_policy() {
-  double max_survivor_regions_d =
-                 (double) _young_list_target_length / (double) SurvivorRatio;
-  // We use ceiling so that if max_survivor_regions_d is > 0.0 (but
-  // smaller than 1.0) we'll get 1.
-  _max_survivor_regions = (uint) ceil(max_survivor_regions_d);
-
-  _tenuring_threshold = _survivors_age_table.compute_tenuring_threshold(
-        HeapRegion::GrainWords * _max_survivor_regions, counters());
-}
-
-bool G1CollectorPolicy::force_initial_mark_if_outside_cycle(GCCause::Cause gc_cause) {
-  // We actually check whether we are marking here and not if we are in a
-  // reclamation phase. This means that we will schedule a concurrent mark
-  // even while we are still in the process of reclaiming memory.
-  bool during_cycle = _g1->concurrent_mark()->cmThread()->during_cycle();
-  if (!during_cycle) {
-    log_debug(gc, ergo)("Request concurrent cycle initiation (requested by GC cause). GC cause: %s", GCCause::to_string(gc_cause));
-    collector_state()->set_initiate_conc_mark_if_possible(true);
-    return true;
-  } else {
-    log_debug(gc, ergo)("Do not request concurrent cycle initiation (concurrent cycle already in progress). GC cause: %s", GCCause::to_string(gc_cause));
-    return false;
-  }
-}
-
-void G1CollectorPolicy::initiate_conc_mark() {
-  collector_state()->set_during_initial_mark_pause(true);
-  collector_state()->set_initiate_conc_mark_if_possible(false);
-}
-
-void G1CollectorPolicy::decide_on_conc_mark_initiation() {
-  // We are about to decide on whether this pause will be an
-  // initial-mark pause.
-
-  // First, collector_state()->during_initial_mark_pause() should not be already set. We
-  // will set it here if we have to. However, it should be cleared by
-  // the end of the pause (it's only set for the duration of an
-  // initial-mark pause).
-  assert(!collector_state()->during_initial_mark_pause(), "pre-condition");
-
-  if (collector_state()->initiate_conc_mark_if_possible()) {
-    // We had noticed on a previous pause that the heap occupancy has
-    // gone over the initiating threshold and we should start a
-    // concurrent marking cycle. So we might initiate one.
-
-    if (!about_to_start_mixed_phase() && collector_state()->gcs_are_young()) {
-      // Initiate a new initial mark if there is no marking or reclamation going on.
-      initiate_conc_mark();
-      log_debug(gc, ergo)("Initiate concurrent cycle (concurrent cycle initiation requested)");
-    } else if (_g1->is_user_requested_concurrent_full_gc(_g1->gc_cause())) {
-      // Initiate a user requested initial mark. An initial mark must be young only
-      // GC, so the collector state must be updated to reflect this.
-      collector_state()->set_gcs_are_young(true);
-      collector_state()->set_last_young_gc(false);
-
-      abort_time_to_mixed_tracking();
-      initiate_conc_mark();
-      log_debug(gc, ergo)("Initiate concurrent cycle (user requested concurrent cycle)");
-    } else {
-      // The concurrent marking thread is still finishing up the
-      // previous cycle. If we start one right now the two cycles
-      // overlap. In particular, the concurrent marking thread might
-      // be in the process of clearing the next marking bitmap (which
-      // we will use for the next cycle if we start one). Starting a
-      // cycle now will be bad given that parts of the marking
-      // information might get cleared by the marking thread. And we
-      // cannot wait for the marking thread to finish the cycle as it
-      // periodically yields while clearing the next marking bitmap
-      // and, if it's in a yield point, it's waiting for us to
-      // finish. So, at this point we will not start a cycle and we'll
-      // let the concurrent marking thread complete the last one.
-      log_debug(gc, ergo)("Do not initiate concurrent cycle (concurrent cycle already in progress)");
-    }
-  }
-}
-
-void G1CollectorPolicy::record_concurrent_mark_cleanup_end() {
-  cset_chooser()->rebuild(_g1->workers(), _g1->num_regions());
-
-  double end_sec = os::elapsedTime();
-  double elapsed_time_ms = (end_sec - _mark_cleanup_start_sec) * 1000.0;
-  _analytics->report_concurrent_mark_cleanup_times_ms(elapsed_time_ms);
-  _analytics->append_prev_collection_pause_end_ms(elapsed_time_ms);
-
-  record_pause(Cleanup, _mark_cleanup_start_sec, end_sec);
-}
-
-double G1CollectorPolicy::reclaimable_bytes_perc(size_t reclaimable_bytes) const {
-  // Returns the given amount of reclaimable bytes (that represents
-  // the amount of reclaimable space still to be collected) as a
-  // percentage of the current heap capacity.
-  size_t capacity_bytes = _g1->capacity();
-  return (double) reclaimable_bytes * 100.0 / (double) capacity_bytes;
-}
-
-void G1CollectorPolicy::maybe_start_marking() {
-  if (need_to_start_conc_mark("end of GC")) {
-    // Note: this might have already been set, if during the last
-    // pause we decided to start a cycle but at the beginning of
-    // this pause we decided to postpone it. That's OK.
-    collector_state()->set_initiate_conc_mark_if_possible(true);
-  }
-}
-
-G1CollectorPolicy::PauseKind G1CollectorPolicy::young_gc_pause_kind() const {
-  assert(!collector_state()->full_collection(), "must be");
-  if (collector_state()->during_initial_mark_pause()) {
-    assert(collector_state()->last_gc_was_young(), "must be");
-    assert(!collector_state()->last_young_gc(), "must be");
-    return InitialMarkGC;
-  } else if (collector_state()->last_young_gc()) {
-    assert(!collector_state()->during_initial_mark_pause(), "must be");
-    assert(collector_state()->last_gc_was_young(), "must be");
-    return LastYoungGC;
-  } else if (!collector_state()->last_gc_was_young()) {
-    assert(!collector_state()->during_initial_mark_pause(), "must be");
-    assert(!collector_state()->last_young_gc(), "must be");
-    return MixedGC;
-  } else {
-    assert(collector_state()->last_gc_was_young(), "must be");
-    assert(!collector_state()->during_initial_mark_pause(), "must be");
-    assert(!collector_state()->last_young_gc(), "must be");
-    return YoungOnlyGC;
-  }
-}
-
-void G1CollectorPolicy::record_pause(PauseKind kind, double start, double end) {
-  // Manage the MMU tracker. For some reason it ignores Full GCs.
-  if (kind != FullGC) {
-    _mmu_tracker->add_pause(start, end);
-  }
-  // Manage the mutator time tracking from initial mark to first mixed gc.
-  switch (kind) {
-    case FullGC:
-      abort_time_to_mixed_tracking();
-      break;
-    case Cleanup:
-    case Remark:
-    case YoungOnlyGC:
-    case LastYoungGC:
-      _initial_mark_to_mixed.add_pause(end - start);
-      break;
-    case InitialMarkGC:
-      _initial_mark_to_mixed.record_initial_mark_end(end);
-      break;
-    case MixedGC:
-      _initial_mark_to_mixed.record_mixed_gc_start(start);
-      break;
-    default:
-      ShouldNotReachHere();
-  }
-}
-
-void G1CollectorPolicy::abort_time_to_mixed_tracking() {
-  _initial_mark_to_mixed.reset();
-}
-
-bool G1CollectorPolicy::next_gc_should_be_mixed(const char* true_action_str,
-                                                const char* false_action_str) const {
-  if (cset_chooser()->is_empty()) {
-    log_debug(gc, ergo)("%s (candidate old regions not available)", false_action_str);
-    return false;
-  }
-
-  // Is the amount of uncollected reclaimable space above G1HeapWastePercent?
-  size_t reclaimable_bytes = cset_chooser()->remaining_reclaimable_bytes();
-  double reclaimable_perc = reclaimable_bytes_perc(reclaimable_bytes);
-  double threshold = (double) G1HeapWastePercent;
-  if (reclaimable_perc <= threshold) {
-    log_debug(gc, ergo)("%s (reclaimable percentage not over threshold). candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) threshold: " UINTX_FORMAT,
-                        false_action_str, cset_chooser()->remaining_regions(), reclaimable_bytes, reclaimable_perc, G1HeapWastePercent);
-    return false;
-  }
-  log_debug(gc, ergo)("%s (candidate old regions available). candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) threshold: " UINTX_FORMAT,
-                      true_action_str, cset_chooser()->remaining_regions(), reclaimable_bytes, reclaimable_perc, G1HeapWastePercent);
-  return true;
-}
-
-uint G1CollectorPolicy::calc_min_old_cset_length() const {
-  // The min old CSet region bound is based on the maximum desired
-  // number of mixed GCs after a cycle. I.e., even if some old regions
-  // look expensive, we should add them to the CSet anyway to make
-  // sure we go through the available old regions in no more than the
-  // maximum desired number of mixed GCs.
-  //
-  // The calculation is based on the number of marked regions we added
-  // to the CSet chooser in the first place, not how many remain, so
-  // that the result is the same during all mixed GCs that follow a cycle.
-
-  const size_t region_num = (size_t) cset_chooser()->length();
-  const size_t gc_num = (size_t) MAX2(G1MixedGCCountTarget, (uintx) 1);
-  size_t result = region_num / gc_num;
-  // emulate ceiling
-  if (result * gc_num < region_num) {
-    result += 1;
-  }
-  return (uint) result;
-}
-
-uint G1CollectorPolicy::calc_max_old_cset_length() const {
-  // The max old CSet region bound is based on the threshold expressed
-  // as a percentage of the heap size. I.e., it should bound the
-  // number of old regions added to the CSet irrespective of how many
-  // of them are available.
-
-  const G1CollectedHeap* g1h = G1CollectedHeap::heap();
-  const size_t region_num = g1h->num_regions();
-  const size_t perc = (size_t) G1OldCSetRegionThresholdPercent;
-  size_t result = region_num * perc / 100;
-  // emulate ceiling
-  if (100 * result < region_num * perc) {
-    result += 1;
-  }
-  return (uint) result;
-}
-
-void G1CollectorPolicy::finalize_collection_set(double target_pause_time_ms) {
-  double time_remaining_ms = _collection_set->finalize_young_part(target_pause_time_ms);
-  _collection_set->finalize_old_part(time_remaining_ms);
-}
--- a/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -25,419 +25,19 @@
 #ifndef SHARE_VM_GC_G1_G1COLLECTORPOLICY_HPP
 #define SHARE_VM_GC_G1_G1COLLECTORPOLICY_HPP
 
-#include "gc/g1/g1CollectorState.hpp"
-#include "gc/g1/g1GCPhaseTimes.hpp"
-#include "gc/g1/g1InCSetState.hpp"
-#include "gc/g1/g1InitialMarkToMixedTimeTracker.hpp"
-#include "gc/g1/g1MMUTracker.hpp"
-#include "gc/g1/g1Predictions.hpp"
 #include "gc/shared/collectorPolicy.hpp"
-#include "utilities/pair.hpp"
 
-// A G1CollectorPolicy makes policy decisions that determine the
-// characteristics of the collector.  Examples include:
-//   * choice of collection set.
-//   * when to collect.
+// G1CollectorPolicy is primarily used during initialization and to expose the
+// functionality of the CollectorPolicy interface to the rest of the VM.
 
-class HeapRegion;
-class G1CollectionSet;
-class CollectionSetChooser;
-class G1IHOPControl;
-class G1Analytics;
 class G1YoungGenSizer;
 
 class G1CollectorPolicy: public CollectorPolicy {
- private:
-  G1IHOPControl* _ihop_control;
-
-  G1IHOPControl* create_ihop_control() const;
-  // Update the IHOP control with necessary statistics.
-  void update_ihop_prediction(double mutator_time_s,
-                              size_t mutator_alloc_bytes,
-                              size_t young_gen_size);
-  void report_ihop_statistics();
-
-  G1Predictions _predictor;
-  G1Analytics* _analytics;
-  G1MMUTracker* _mmu_tracker;
-
+protected:
   void initialize_alignments();
-  void initialize_flags();
-
-  double _full_collection_start_sec;
-
-  uint _young_list_target_length;
-  uint _young_list_fixed_length;
-
-  // The max number of regions we can extend the eden by while the GC
-  // locker is active. This should be >= _young_list_target_length;
-  uint _young_list_max_length;
-
-  SurvRateGroup* _short_lived_surv_rate_group;
-  SurvRateGroup* _survivor_surv_rate_group;
-
-  double _reserve_factor;
-  uint   _reserve_regions;
-
-  G1YoungGenSizer* _young_gen_sizer;
-
-  uint _free_regions_at_end_of_collection;
-
-  size_t _max_rs_lengths;
-
-  size_t _rs_lengths_prediction;
-
-#ifndef PRODUCT
-  bool verify_young_ages(HeapRegion* head, SurvRateGroup *surv_rate_group);
-#endif // PRODUCT
-
-  double _pause_time_target_ms;
-
-  size_t _pending_cards;
-
-  // The amount of allocated bytes in old gen during the last mutator and the following
-  // young GC phase.
-  size_t _bytes_allocated_in_old_since_last_gc;
-
-  G1InitialMarkToMixedTimeTracker _initial_mark_to_mixed;
-public:
-  const G1Predictions& predictor() const { return _predictor; }
-  const G1Analytics* analytics()   const { return const_cast<const G1Analytics*>(_analytics); }
-
-  // Add the given number of bytes to the total number of allocated bytes in the old gen.
-  void add_bytes_allocated_in_old_since_last_gc(size_t bytes) { _bytes_allocated_in_old_since_last_gc += bytes; }
-
-  // Accessors
-
-  void set_region_eden(HeapRegion* hr, int young_index_in_cset) {
-    hr->set_eden();
-    hr->install_surv_rate_group(_short_lived_surv_rate_group);
-    hr->set_young_index_in_cset(young_index_in_cset);
-  }
-
-  void set_region_survivor(HeapRegion* hr, int young_index_in_cset) {
-    assert(hr->is_survivor(), "pre-condition");
-    hr->install_surv_rate_group(_survivor_surv_rate_group);
-    hr->set_young_index_in_cset(young_index_in_cset);
-  }
-
-#ifndef PRODUCT
-  bool verify_young_ages();
-#endif // PRODUCT
-
-  void record_max_rs_lengths(size_t rs_lengths) {
-    _max_rs_lengths = rs_lengths;
-  }
-
-
-  double predict_base_elapsed_time_ms(size_t pending_cards) const;
-  double predict_base_elapsed_time_ms(size_t pending_cards,
-                                      size_t scanned_cards) const;
-  size_t predict_bytes_to_copy(HeapRegion* hr) const;
-  double predict_region_elapsed_time_ms(HeapRegion* hr, bool for_young_gc) const;
-
-  double predict_survivor_regions_evac_time() const;
-
-  bool should_update_surv_rate_group_predictors() {
-    return collector_state()->last_gc_was_young() && !collector_state()->in_marking_window();
-  }
-
-  void cset_regions_freed() {
-    bool update = should_update_surv_rate_group_predictors();
-
-    _short_lived_surv_rate_group->all_surviving_words_recorded(update);
-    _survivor_surv_rate_group->all_surviving_words_recorded(update);
-  }
-
-  G1MMUTracker* mmu_tracker() {
-    return _mmu_tracker;
-  }
-
-  const G1MMUTracker* mmu_tracker() const {
-    return _mmu_tracker;
-  }
-
-  double max_pause_time_ms() const {
-    return _mmu_tracker->max_gc_time() * 1000.0;
-  }
-
-  // Returns an estimate of the survival rate of the region at yg-age
-  // "yg_age".
-  double predict_yg_surv_rate(int age, SurvRateGroup* surv_rate_group) const;
-
-  double predict_yg_surv_rate(int age) const;
-
-  double accum_yg_surv_rate_pred(int age) const;
-
-protected:
-  G1CollectionSet* _collection_set;
-  virtual double average_time_ms(G1GCPhaseTimes::GCParPhases phase) const;
-  virtual double other_time_ms(double pause_time_ms) const;
-
-  double young_other_time_ms() const;
-  double non_young_other_time_ms() const;
-  double constant_other_time_ms(double pause_time_ms) const;
-
-  CollectionSetChooser* cset_chooser() const;
-private:
-
-  // The number of bytes copied during the GC.
-  size_t _bytes_copied_during_gc;
-
-  // Stash a pointer to the g1 heap.
-  G1CollectedHeap* _g1;
-
-  G1GCPhaseTimes* _phase_times;
-
-  // This set of variables tracks the collector efficiency, in order to
-  // determine whether we should initiate a new marking.
-  double _mark_remark_start_sec;
-  double _mark_cleanup_start_sec;
-
-  // Updates the internal young list maximum and target lengths. Returns the
-  // unbounded young list target length.
-  uint update_young_list_max_and_target_length();
-  uint update_young_list_max_and_target_length(size_t rs_lengths);
-
-  // Update the young list target length either by setting it to the
-  // desired fixed value or by calculating it using G1's pause
-  // prediction model. If no rs_lengths parameter is passed, predict
-  // the RS lengths using the prediction model, otherwise use the
-  // given rs_lengths as the prediction.
-  // Returns the unbounded young list target length.
-  uint update_young_list_target_length(size_t rs_lengths);
-
-  // Calculate and return the minimum desired young list target
-  // length. This is the minimum desired young list length according
-  // to the user's inputs.
-  uint calculate_young_list_desired_min_length(uint base_min_length) const;
-
-  // Calculate and return the maximum desired young list target
-  // length. This is the maximum desired young list length according
-  // to the user's inputs.
-  uint calculate_young_list_desired_max_length() const;
-
-  // Calculate and return the maximum young list target length that
-  // can fit into the pause time goal. The parameters are: rs_lengths
-  // represent the prediction of how large the young RSet lengths will
-  // be, base_min_length is the already existing number of regions in
-  // the young list, min_length and max_length are the desired min and
-  // max young list length according to the user's inputs.
-  uint calculate_young_list_target_length(size_t rs_lengths,
-                                          uint base_min_length,
-                                          uint desired_min_length,
-                                          uint desired_max_length) const;
-
-  // Result of the bounded_young_list_target_length() method, containing both the
-  // bounded as well as the unbounded young list target lengths in this order.
-  typedef Pair<uint, uint, StackObj> YoungTargetLengths;
-  YoungTargetLengths young_list_target_lengths(size_t rs_lengths) const;
-
-  void update_rs_lengths_prediction();
-  void update_rs_lengths_prediction(size_t prediction);
-
-  // Check whether a given young length (young_length) fits into the
-  // given target pause time and whether the prediction for the amount
-  // of objects to be copied for the given length will fit into the
-  // given free space (expressed by base_free_regions).  It is used by
-  // calculate_young_list_target_length().
-  bool predict_will_fit(uint young_length, double base_time_ms,
-                        uint base_free_regions, double target_pause_time_ms) const;
 
 public:
-  size_t pending_cards() const { return _pending_cards; }
-
-  // Calculate the minimum number of old regions we'll add to the CSet
-  // during a mixed GC.
-  uint calc_min_old_cset_length() const;
-
-  // Calculate the maximum number of old regions we'll add to the CSet
-  // during a mixed GC.
-  uint calc_max_old_cset_length() const;
-
-  // Returns the given amount of uncollected reclaimable space
-  // as a percentage of the current heap capacity.
-  double reclaimable_bytes_perc(size_t reclaimable_bytes) const;
-
-private:
-  // Sets up marking if proper conditions are met.
-  void maybe_start_marking();
-
-  // The kind of STW pause.
-  enum PauseKind {
-    FullGC,
-    YoungOnlyGC,
-    MixedGC,
-    LastYoungGC,
-    InitialMarkGC,
-    Cleanup,
-    Remark
-  };
-
-  // Calculate PauseKind from internal state.
-  PauseKind young_gc_pause_kind() const;
-  // Record the given STW pause with the given start and end times (in s).
-  void record_pause(PauseKind kind, double start, double end);
-  // Indicate that we aborted marking before doing any mixed GCs.
-  void abort_time_to_mixed_tracking();
-public:
-
   G1CollectorPolicy();
-
-  virtual ~G1CollectorPolicy();
-
-  virtual G1CollectorPolicy* as_g1_policy() { return this; }
-
-  G1CollectorState* collector_state() const;
-
-  G1GCPhaseTimes* phase_times() const { return _phase_times; }
-
-  // Check the current value of the young list RSet lengths and
-  // compare it against the last prediction. If the current value is
-  // higher, recalculate the young list target length prediction.
-  void revise_young_list_target_length_if_necessary(size_t rs_lengths);
-
-  // This should be called after the heap is resized.
-  void record_new_heap_size(uint new_number_of_regions);
-
-  void init();
-
-  virtual void note_gc_start();
-
-  // Create jstat counters for the policy.
-  virtual void initialize_gc_policy_counters();
-
-  bool need_to_start_conc_mark(const char* source, size_t alloc_word_size = 0);
-
-  bool about_to_start_mixed_phase() const;
-
-  // Record the start and end of an evacuation pause.
-  void record_collection_pause_start(double start_time_sec);
-  void record_collection_pause_end(double pause_time_ms, size_t cards_scanned, size_t heap_used_bytes_before_gc);
-
-  // Record the start and end of a full collection.
-  void record_full_collection_start();
-  void record_full_collection_end();
-
-  // Must currently be called while the world is stopped.
-  void record_concurrent_mark_init_end(double mark_init_elapsed_time_ms);
-
-  // Record start and end of remark.
-  void record_concurrent_mark_remark_start();
-  void record_concurrent_mark_remark_end();
-
-  // Record start, end, and completion of cleanup.
-  void record_concurrent_mark_cleanup_start();
-  void record_concurrent_mark_cleanup_end();
-  void record_concurrent_mark_cleanup_completed();
-
-  virtual void print_phases();
-
-  // Record how much space we copied during a GC. This is typically
-  // called when a GC alloc region is being retired.
-  void record_bytes_copied_during_gc(size_t bytes) {
-    _bytes_copied_during_gc += bytes;
-  }
-
-  // The amount of space we copied during a GC.
-  size_t bytes_copied_during_gc() const {
-    return _bytes_copied_during_gc;
-  }
-
-  // Determine whether there are candidate regions so that the
-  // next GC should be mixed. The two action strings are used
-  // in the ergo output when the method returns true or false.
-  bool next_gc_should_be_mixed(const char* true_action_str,
-                               const char* false_action_str) const;
-
-  virtual void finalize_collection_set(double target_pause_time_ms);
-private:
-  // Set the state to start a concurrent marking cycle and clear
-  // _initiate_conc_mark_if_possible because it has now been
-  // acted on.
-  void initiate_conc_mark();
-
-public:
-  // This sets the initiate_conc_mark_if_possible() flag to start a
-  // new cycle, as long as we are not already in one. It's best if it
-  // is called during a safepoint when the test whether a cycle is in
-  // progress or not is stable.
-  bool force_initial_mark_if_outside_cycle(GCCause::Cause gc_cause);
-
-  // This is called at the very beginning of an evacuation pause (it
-  // has to be the first thing that the pause does). If
-  // initiate_conc_mark_if_possible() is true, and the concurrent
-  // marking thread has completed its work during the previous cycle,
-  // it will set during_initial_mark_pause() to so that the pause does
-  // the initial-mark work and start a marking cycle.
-  void decide_on_conc_mark_initiation();
-
-  // Print stats on young survival ratio
-  void print_yg_surv_rate_info() const;
-
-  void finished_recalculating_age_indexes(bool is_survivors) {
-    if (is_survivors) {
-      _survivor_surv_rate_group->finished_recalculating_age_indexes();
-    } else {
-      _short_lived_surv_rate_group->finished_recalculating_age_indexes();
-    }
-  }
-
-  size_t young_list_target_length() const { return _young_list_target_length; }
-
-  bool is_young_list_full() const;
-
-  bool can_expand_young_list() const;
-
-  uint young_list_max_length() const {
-    return _young_list_max_length;
-  }
-
-  bool adaptive_young_list_length() const;
-
-  virtual bool should_process_references() const {
-    return true;
-  }
-
-private:
-  //
-  // Survivor regions policy.
-  //
-
-  // Current tenuring threshold, set to 0 if the collector reaches the
-  // maximum amount of survivors regions.
-  uint _tenuring_threshold;
-
-  // The limit on the number of regions allocated for survivors.
-  uint _max_survivor_regions;
-
-  AgeTable _survivors_age_table;
-
-public:
-  uint tenuring_threshold() const { return _tenuring_threshold; }
-
-  uint max_survivor_regions() {
-    return _max_survivor_regions;
-  }
-
-  void note_start_adding_survivor_regions() {
-    _survivor_surv_rate_group->start_adding_regions();
-  }
-
-  void note_stop_adding_survivor_regions() {
-    _survivor_surv_rate_group->stop_adding_regions();
-  }
-
-  void record_age_table(AgeTable* age_table) {
-    _survivors_age_table.merge(age_table);
-  }
-
-  void update_max_gc_locker_expansion();
-
-  // Calculates survivor space parameters.
-  void update_survivors_policy();
-
-  virtual void post_heap_initialize();
 };
 
 #endif // SHARE_VM_GC_G1_G1COLLECTORPOLICY_HPP
--- a/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -28,12 +28,12 @@
 #include "code/codeCache.hpp"
 #include "gc/g1/concurrentMarkThread.inline.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/g1/g1CollectorState.hpp"
 #include "gc/g1/g1ConcurrentMark.inline.hpp"
 #include "gc/g1/g1HeapVerifier.hpp"
 #include "gc/g1/g1OopClosures.inline.hpp"
 #include "gc/g1/g1CardLiveData.inline.hpp"
+#include "gc/g1/g1Policy.hpp"
 #include "gc/g1/g1StringDedup.hpp"
 #include "gc/g1/heapRegion.inline.hpp"
 #include "gc/g1/heapRegionRemSet.hpp"
@@ -739,8 +739,8 @@
 };
 
 void G1ConcurrentMark::checkpointRootsInitialPre() {
-  G1CollectedHeap*   g1h = G1CollectedHeap::heap();
-  G1CollectorPolicy* g1p = g1h->g1_policy();
+  G1CollectedHeap* g1h = G1CollectedHeap::heap();
+  G1Policy* g1p = g1h->g1_policy();
 
   _has_aborted = false;
 
@@ -1056,7 +1056,7 @@
   }
   g1h->verifier()->check_bitmaps("Remark Start");
 
-  G1CollectorPolicy* g1p = g1h->g1_policy();
+  G1Policy* g1p = g1h->g1_policy();
   g1p->record_concurrent_mark_remark_start();
 
   double start = os::elapsedTime();
@@ -1144,8 +1144,6 @@
     if (hr->is_archive()) {
       return false;
     }
-    // We use a claim value of zero here because all regions
-    // were claimed with value 1 in the FinalCount task.
     _g1->reset_gc_time_stamps(hr);
     hr->note_end_of_marking();
 
@@ -1240,7 +1238,7 @@
   }
   g1h->verifier()->check_bitmaps("Cleanup Start");
 
-  G1CollectorPolicy* g1p = g1h->g1_policy();
+  G1Policy* g1p = g1h->g1_policy();
   g1p->record_concurrent_mark_cleanup_start();
 
   double start = os::elapsedTime();
@@ -2609,7 +2607,7 @@
   assert(time_target_ms >= 1.0, "minimum granularity is 1ms");
   assert(concurrent() == _cm->concurrent(), "they should be the same");
 
-  G1CollectorPolicy* g1_policy = _g1h->g1_policy();
+  G1Policy* g1_policy = _g1h->g1_policy();
   assert(_task_queues != NULL, "invariant");
   assert(_task_queue != NULL, "invariant");
   assert(_task_queues->queue(_worker_id) == _task_queue, "invariant");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/g1/g1DefaultPolicy.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,1166 @@
+/*
+ * Copyright (c) 2001, 2016, 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.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "gc/g1/concurrentG1Refine.hpp"
+#include "gc/g1/concurrentMarkThread.inline.hpp"
+#include "gc/g1/g1Analytics.hpp"
+#include "gc/g1/g1CollectedHeap.inline.hpp"
+#include "gc/g1/g1CollectionSet.hpp"
+#include "gc/g1/g1ConcurrentMark.hpp"
+#include "gc/g1/g1DefaultPolicy.hpp"
+#include "gc/g1/g1IHOPControl.hpp"
+#include "gc/g1/g1GCPhaseTimes.hpp"
+#include "gc/g1/g1Policy.hpp"
+#include "gc/g1/g1YoungGenSizer.hpp"
+#include "gc/g1/heapRegion.inline.hpp"
+#include "gc/g1/heapRegionRemSet.hpp"
+#include "gc/shared/gcPolicyCounters.hpp"
+#include "runtime/arguments.hpp"
+#include "runtime/java.hpp"
+#include "runtime/mutexLocker.hpp"
+#include "utilities/debug.hpp"
+#include "utilities/pair.hpp"
+
+G1DefaultPolicy::G1DefaultPolicy() :
+  _predictor(G1ConfidencePercent / 100.0),
+  _analytics(new G1Analytics(&_predictor)),
+  _mmu_tracker(new G1MMUTrackerQueue(GCPauseIntervalMillis / 1000.0, MaxGCPauseMillis / 1000.0)),
+  _ihop_control(create_ihop_control(&_predictor)),
+  _policy_counters(new GCPolicyCounters("GarbageFirst", 1, 3)),
+  _young_list_fixed_length(0),
+  _short_lived_surv_rate_group(new SurvRateGroup(&_predictor, "Short Lived", G1YoungSurvRateNumRegionsSummary)),
+  _survivor_surv_rate_group(new SurvRateGroup(&_predictor, "Survivor", G1YoungSurvRateNumRegionsSummary)),
+  _reserve_factor((double) G1ReservePercent / 100.0),
+  _reserve_regions(0),
+  _rs_lengths_prediction(0),
+  _bytes_allocated_in_old_since_last_gc(0),
+  _initial_mark_to_mixed(),
+  _collection_set(NULL),
+  _g1(NULL),
+  _phase_times(new G1GCPhaseTimes(ParallelGCThreads)),
+  _tenuring_threshold(MaxTenuringThreshold),
+  _max_survivor_regions(0),
+  _survivors_age_table(true) { }
+
+G1DefaultPolicy::~G1DefaultPolicy() {
+  delete _ihop_control;
+}
+
+G1CollectorState* G1DefaultPolicy::collector_state() const { return _g1->collector_state(); }
+
+void G1DefaultPolicy::init(G1CollectedHeap* g1h, G1CollectionSet* collection_set) {
+  _g1 = g1h;
+  _collection_set = collection_set;
+
+  assert(Heap_lock->owned_by_self(), "Locking discipline.");
+
+  if (!adaptive_young_list_length()) {
+    _young_list_fixed_length = _young_gen_sizer.min_desired_young_length();
+  }
+  _young_gen_sizer.adjust_max_new_size(_g1->max_regions());
+
+  _free_regions_at_end_of_collection = _g1->num_free_regions();
+
+  update_young_list_max_and_target_length();
+  // We may immediately start allocating regions and placing them on the
+  // collection set list. Initialize the per-collection set info
+  _collection_set->start_incremental_building();
+}
+
+void G1DefaultPolicy::note_gc_start() {
+  phase_times()->note_gc_start();
+}
+
+bool G1DefaultPolicy::predict_will_fit(uint young_length,
+                                       double base_time_ms,
+                                       uint base_free_regions,
+                                       double target_pause_time_ms) const {
+  if (young_length >= base_free_regions) {
+    // end condition 1: not enough space for the young regions
+    return false;
+  }
+
+  double accum_surv_rate = accum_yg_surv_rate_pred((int) young_length - 1);
+  size_t bytes_to_copy =
+               (size_t) (accum_surv_rate * (double) HeapRegion::GrainBytes);
+  double copy_time_ms = _analytics->predict_object_copy_time_ms(bytes_to_copy,
+                                                                collector_state()->during_concurrent_mark());
+  double young_other_time_ms = _analytics->predict_young_other_time_ms(young_length);
+  double pause_time_ms = base_time_ms + copy_time_ms + young_other_time_ms;
+  if (pause_time_ms > target_pause_time_ms) {
+    // end condition 2: prediction is over the target pause time
+    return false;
+  }
+
+  size_t free_bytes = (base_free_regions - young_length) * HeapRegion::GrainBytes;
+
+  // When copying, we will likely need more bytes free than is live in the region.
+  // Add some safety margin to factor in the confidence of our guess, and the
+  // natural expected waste.
+  // (100.0 / G1ConfidencePercent) is a scale factor that expresses the uncertainty
+  // of the calculation: the lower the confidence, the more headroom.
+  // (100 + TargetPLABWastePct) represents the increase in expected bytes during
+  // copying due to anticipated waste in the PLABs.
+  double safety_factor = (100.0 / G1ConfidencePercent) * (100 + TargetPLABWastePct) / 100.0;
+  size_t expected_bytes_to_copy = (size_t)(safety_factor * bytes_to_copy);
+
+  if (expected_bytes_to_copy > free_bytes) {
+    // end condition 3: out-of-space
+    return false;
+  }
+
+  // success!
+  return true;
+}
+
+void G1DefaultPolicy::record_new_heap_size(uint new_number_of_regions) {
+  // re-calculate the necessary reserve
+  double reserve_regions_d = (double) new_number_of_regions * _reserve_factor;
+  // We use ceiling so that if reserve_regions_d is > 0.0 (but
+  // smaller than 1.0) we'll get 1.
+  _reserve_regions = (uint) ceil(reserve_regions_d);
+
+  _young_gen_sizer.heap_size_changed(new_number_of_regions);
+
+  _ihop_control->update_target_occupancy(new_number_of_regions * HeapRegion::GrainBytes);
+}
+
+uint G1DefaultPolicy::calculate_young_list_desired_min_length(uint base_min_length) const {
+  uint desired_min_length = 0;
+  if (adaptive_young_list_length()) {
+    if (_analytics->num_alloc_rate_ms() > 3) {
+      double now_sec = os::elapsedTime();
+      double when_ms = _mmu_tracker->when_max_gc_sec(now_sec) * 1000.0;
+      double alloc_rate_ms = _analytics->predict_alloc_rate_ms();
+      desired_min_length = (uint) ceil(alloc_rate_ms * when_ms);
+    } else {
+      // otherwise we don't have enough info to make the prediction
+    }
+  }
+  desired_min_length += base_min_length;
+  // make sure we don't go below any user-defined minimum bound
+  return MAX2(_young_gen_sizer.min_desired_young_length(), desired_min_length);
+}
+
+uint G1DefaultPolicy::calculate_young_list_desired_max_length() const {
+  // Here, we might want to also take into account any additional
+  // constraints (i.e., user-defined minimum bound). Currently, we
+  // effectively don't set this bound.
+  return _young_gen_sizer.max_desired_young_length();
+}
+
+uint G1DefaultPolicy::update_young_list_max_and_target_length() {
+  return update_young_list_max_and_target_length(_analytics->predict_rs_lengths());
+}
+
+uint G1DefaultPolicy::update_young_list_max_and_target_length(size_t rs_lengths) {
+  uint unbounded_target_length = update_young_list_target_length(rs_lengths);
+  update_max_gc_locker_expansion();
+  return unbounded_target_length;
+}
+
+uint G1DefaultPolicy::update_young_list_target_length(size_t rs_lengths) {
+  YoungTargetLengths young_lengths = young_list_target_lengths(rs_lengths);
+  _young_list_target_length = young_lengths.first;
+  return young_lengths.second;
+}
+
+G1DefaultPolicy::YoungTargetLengths G1DefaultPolicy::young_list_target_lengths(size_t rs_lengths) const {
+  YoungTargetLengths result;
+
+  // Calculate the absolute and desired min bounds first.
+
+  // This is how many young regions we already have (currently: the survivors).
+  const uint base_min_length = _g1->young_list()->survivor_length();
+  uint desired_min_length = calculate_young_list_desired_min_length(base_min_length);
+  // This is the absolute minimum young length. Ensure that we
+  // will at least have one eden region available for allocation.
+  uint absolute_min_length = base_min_length + MAX2(_g1->young_list()->eden_length(), (uint)1);
+  // If we shrank the young list target it should not shrink below the current size.
+  desired_min_length = MAX2(desired_min_length, absolute_min_length);
+  // Calculate the absolute and desired max bounds.
+
+  uint desired_max_length = calculate_young_list_desired_max_length();
+
+  uint young_list_target_length = 0;
+  if (adaptive_young_list_length()) {
+    if (collector_state()->gcs_are_young()) {
+      young_list_target_length =
+                        calculate_young_list_target_length(rs_lengths,
+                                                           base_min_length,
+                                                           desired_min_length,
+                                                           desired_max_length);
+    } else {
+      // Don't calculate anything and let the code below bound it to
+      // the desired_min_length, i.e., do the next GC as soon as
+      // possible to maximize how many old regions we can add to it.
+    }
+  } else {
+    // The user asked for a fixed young gen so we'll fix the young gen
+    // whether the next GC is young or mixed.
+    young_list_target_length = _young_list_fixed_length;
+  }
+
+  result.second = young_list_target_length;
+
+  // We will try our best not to "eat" into the reserve.
+  uint absolute_max_length = 0;
+  if (_free_regions_at_end_of_collection > _reserve_regions) {
+    absolute_max_length = _free_regions_at_end_of_collection - _reserve_regions;
+  }
+  if (desired_max_length > absolute_max_length) {
+    desired_max_length = absolute_max_length;
+  }
+
+  // Make sure we don't go over the desired max length, nor under the
+  // desired min length. In case they clash, desired_min_length wins
+  // which is why that test is second.
+  if (young_list_target_length > desired_max_length) {
+    young_list_target_length = desired_max_length;
+  }
+  if (young_list_target_length < desired_min_length) {
+    young_list_target_length = desired_min_length;
+  }
+
+  assert(young_list_target_length > base_min_length,
+         "we should be able to allocate at least one eden region");
+  assert(young_list_target_length >= absolute_min_length, "post-condition");
+
+  result.first = young_list_target_length;
+  return result;
+}
+
+uint
+G1DefaultPolicy::calculate_young_list_target_length(size_t rs_lengths,
+                                                    uint base_min_length,
+                                                    uint desired_min_length,
+                                                    uint desired_max_length) const {
+  assert(adaptive_young_list_length(), "pre-condition");
+  assert(collector_state()->gcs_are_young(), "only call this for young GCs");
+
+  // In case some edge-condition makes the desired max length too small...
+  if (desired_max_length <= desired_min_length) {
+    return desired_min_length;
+  }
+
+  // We'll adjust min_young_length and max_young_length not to include
+  // the already allocated young regions (i.e., so they reflect the
+  // min and max eden regions we'll allocate). The base_min_length
+  // will be reflected in the predictions by the
+  // survivor_regions_evac_time prediction.
+  assert(desired_min_length > base_min_length, "invariant");
+  uint min_young_length = desired_min_length - base_min_length;
+  assert(desired_max_length > base_min_length, "invariant");
+  uint max_young_length = desired_max_length - base_min_length;
+
+  double target_pause_time_ms = _mmu_tracker->max_gc_time() * 1000.0;
+  double survivor_regions_evac_time = predict_survivor_regions_evac_time();
+  size_t pending_cards = _analytics->predict_pending_cards();
+  size_t adj_rs_lengths = rs_lengths + _analytics->predict_rs_length_diff();
+  size_t scanned_cards = _analytics->predict_card_num(adj_rs_lengths, /* gcs_are_young */ true);
+  double base_time_ms =
+    predict_base_elapsed_time_ms(pending_cards, scanned_cards) +
+    survivor_regions_evac_time;
+  uint available_free_regions = _free_regions_at_end_of_collection;
+  uint base_free_regions = 0;
+  if (available_free_regions > _reserve_regions) {
+    base_free_regions = available_free_regions - _reserve_regions;
+  }
+
+  // Here, we will make sure that the shortest young length that
+  // makes sense fits within the target pause time.
+
+  if (predict_will_fit(min_young_length, base_time_ms,
+                       base_free_regions, target_pause_time_ms)) {
+    // The shortest young length will fit into the target pause time;
+    // we'll now check whether the absolute maximum number of young
+    // regions will fit in the target pause time. If not, we'll do
+    // a binary search between min_young_length and max_young_length.
+    if (predict_will_fit(max_young_length, base_time_ms,
+                         base_free_regions, target_pause_time_ms)) {
+      // The maximum young length will fit into the target pause time.
+      // We are done so set min young length to the maximum length (as
+      // the result is assumed to be returned in min_young_length).
+      min_young_length = max_young_length;
+    } else {
+      // The maximum possible number of young regions will not fit within
+      // the target pause time so we'll search for the optimal
+      // length. The loop invariants are:
+      //
+      // min_young_length < max_young_length
+      // min_young_length is known to fit into the target pause time
+      // max_young_length is known not to fit into the target pause time
+      //
+      // Going into the loop we know the above hold as we've just
+      // checked them. Every time around the loop we check whether
+      // the middle value between min_young_length and
+      // max_young_length fits into the target pause time. If it
+      // does, it becomes the new min. If it doesn't, it becomes
+      // the new max. This way we maintain the loop invariants.
+
+      assert(min_young_length < max_young_length, "invariant");
+      uint diff = (max_young_length - min_young_length) / 2;
+      while (diff > 0) {
+        uint young_length = min_young_length + diff;
+        if (predict_will_fit(young_length, base_time_ms,
+                             base_free_regions, target_pause_time_ms)) {
+          min_young_length = young_length;
+        } else {
+          max_young_length = young_length;
+        }
+        assert(min_young_length <  max_young_length, "invariant");
+        diff = (max_young_length - min_young_length) / 2;
+      }
+      // The results is min_young_length which, according to the
+      // loop invariants, should fit within the target pause time.
+
+      // These are the post-conditions of the binary search above:
+      assert(min_young_length < max_young_length,
+             "otherwise we should have discovered that max_young_length "
+             "fits into the pause target and not done the binary search");
+      assert(predict_will_fit(min_young_length, base_time_ms,
+                              base_free_regions, target_pause_time_ms),
+             "min_young_length, the result of the binary search, should "
+             "fit into the pause target");
+      assert(!predict_will_fit(min_young_length + 1, base_time_ms,
+                               base_free_regions, target_pause_time_ms),
+             "min_young_length, the result of the binary search, should be "
+             "optimal, so no larger length should fit into the pause target");
+    }
+  } else {
+    // Even the minimum length doesn't fit into the pause time
+    // target, return it as the result nevertheless.
+  }
+  return base_min_length + min_young_length;
+}
+
+double G1DefaultPolicy::predict_survivor_regions_evac_time() const {
+  double survivor_regions_evac_time = 0.0;
+  for (HeapRegion * r = _g1->young_list()->first_survivor_region();
+       r != NULL && r != _g1->young_list()->last_survivor_region()->get_next_young_region();
+       r = r->get_next_young_region()) {
+    survivor_regions_evac_time += predict_region_elapsed_time_ms(r, collector_state()->gcs_are_young());
+  }
+  return survivor_regions_evac_time;
+}
+
+void G1DefaultPolicy::revise_young_list_target_length_if_necessary(size_t rs_lengths) {
+  guarantee( adaptive_young_list_length(), "should not call this otherwise" );
+
+  if (rs_lengths > _rs_lengths_prediction) {
+    // add 10% to avoid having to recalculate often
+    size_t rs_lengths_prediction = rs_lengths * 1100 / 1000;
+    update_rs_lengths_prediction(rs_lengths_prediction);
+
+    update_young_list_max_and_target_length(rs_lengths_prediction);
+  }
+}
+
+void G1DefaultPolicy::update_rs_lengths_prediction() {
+  update_rs_lengths_prediction(_analytics->predict_rs_lengths());
+}
+
+void G1DefaultPolicy::update_rs_lengths_prediction(size_t prediction) {
+  if (collector_state()->gcs_are_young() && adaptive_young_list_length()) {
+    _rs_lengths_prediction = prediction;
+  }
+}
+
+#ifndef PRODUCT
+bool G1DefaultPolicy::verify_young_ages() {
+  HeapRegion* head = _g1->young_list()->first_region();
+  return
+    verify_young_ages(head, _short_lived_surv_rate_group);
+  // also call verify_young_ages on any additional surv rate groups
+}
+
+bool G1DefaultPolicy::verify_young_ages(HeapRegion* head, SurvRateGroup *surv_rate_group) {
+  guarantee( surv_rate_group != NULL, "pre-condition" );
+
+  const char* name = surv_rate_group->name();
+  bool ret = true;
+  int prev_age = -1;
+
+  for (HeapRegion* curr = head;
+       curr != NULL;
+       curr = curr->get_next_young_region()) {
+    SurvRateGroup* group = curr->surv_rate_group();
+    if (group == NULL && !curr->is_survivor()) {
+      log_error(gc, verify)("## %s: encountered NULL surv_rate_group", name);
+      ret = false;
+    }
+
+    if (surv_rate_group == group) {
+      int age = curr->age_in_surv_rate_group();
+
+      if (age < 0) {
+        log_error(gc, verify)("## %s: encountered negative age", name);
+        ret = false;
+      }
+
+      if (age <= prev_age) {
+        log_error(gc, verify)("## %s: region ages are not strictly increasing (%d, %d)", name, age, prev_age);
+        ret = false;
+      }
+      prev_age = age;
+    }
+  }
+
+  return ret;
+}
+#endif // PRODUCT
+
+void G1DefaultPolicy::record_full_collection_start() {
+  _full_collection_start_sec = os::elapsedTime();
+  // Release the future to-space so that it is available for compaction into.
+  collector_state()->set_full_collection(true);
+}
+
+void G1DefaultPolicy::record_full_collection_end() {
+  // Consider this like a collection pause for the purposes of allocation
+  // since last pause.
+  double end_sec = os::elapsedTime();
+  double full_gc_time_sec = end_sec - _full_collection_start_sec;
+  double full_gc_time_ms = full_gc_time_sec * 1000.0;
+
+  _analytics->update_recent_gc_times(end_sec, full_gc_time_ms);
+
+  collector_state()->set_full_collection(false);
+
+  // "Nuke" the heuristics that control the young/mixed GC
+  // transitions and make sure we start with young GCs after the Full GC.
+  collector_state()->set_gcs_are_young(true);
+  collector_state()->set_last_young_gc(false);
+  collector_state()->set_initiate_conc_mark_if_possible(need_to_start_conc_mark("end of Full GC", 0));
+  collector_state()->set_during_initial_mark_pause(false);
+  collector_state()->set_in_marking_window(false);
+  collector_state()->set_in_marking_window_im(false);
+
+  _short_lived_surv_rate_group->start_adding_regions();
+  // also call this on any additional surv rate groups
+
+  _free_regions_at_end_of_collection = _g1->num_free_regions();
+  // Reset survivors SurvRateGroup.
+  _survivor_surv_rate_group->reset();
+  update_young_list_max_and_target_length();
+  update_rs_lengths_prediction();
+  cset_chooser()->clear();
+
+  _bytes_allocated_in_old_since_last_gc = 0;
+
+  record_pause(FullGC, _full_collection_start_sec, end_sec);
+}
+
+void G1DefaultPolicy::record_collection_pause_start(double start_time_sec) {
+  // We only need to do this here as the policy will only be applied
+  // to the GC we're about to start. so, no point is calculating this
+  // every time we calculate / recalculate the target young length.
+  update_survivors_policy();
+
+  assert(_g1->used() == _g1->recalculate_used(),
+         "sanity, used: " SIZE_FORMAT " recalculate_used: " SIZE_FORMAT,
+         _g1->used(), _g1->recalculate_used());
+
+  phase_times()->record_cur_collection_start_sec(start_time_sec);
+  _pending_cards = _g1->pending_card_num();
+
+  _collection_set->reset_bytes_used_before();
+  _bytes_copied_during_gc = 0;
+
+  collector_state()->set_last_gc_was_young(false);
+
+  // do that for any other surv rate groups
+  _short_lived_surv_rate_group->stop_adding_regions();
+  _survivors_age_table.clear();
+
+  assert( verify_young_ages(), "region age verification" );
+}
+
+void G1DefaultPolicy::record_concurrent_mark_init_end(double mark_init_elapsed_time_ms) {
+  collector_state()->set_during_marking(true);
+  assert(!collector_state()->initiate_conc_mark_if_possible(), "we should have cleared it by now");
+  collector_state()->set_during_initial_mark_pause(false);
+}
+
+void G1DefaultPolicy::record_concurrent_mark_remark_start() {
+  _mark_remark_start_sec = os::elapsedTime();
+  collector_state()->set_during_marking(false);
+}
+
+void G1DefaultPolicy::record_concurrent_mark_remark_end() {
+  double end_time_sec = os::elapsedTime();
+  double elapsed_time_ms = (end_time_sec - _mark_remark_start_sec)*1000.0;
+  _analytics->report_concurrent_mark_remark_times_ms(elapsed_time_ms);
+  _analytics->append_prev_collection_pause_end_ms(elapsed_time_ms);
+
+  record_pause(Remark, _mark_remark_start_sec, end_time_sec);
+}
+
+void G1DefaultPolicy::record_concurrent_mark_cleanup_start() {
+  _mark_cleanup_start_sec = os::elapsedTime();
+}
+
+void G1DefaultPolicy::record_concurrent_mark_cleanup_completed() {
+  bool should_continue_with_reclaim = next_gc_should_be_mixed("request last young-only gc",
+                                                              "skip last young-only gc");
+  collector_state()->set_last_young_gc(should_continue_with_reclaim);
+  // We skip the marking phase.
+  if (!should_continue_with_reclaim) {
+    abort_time_to_mixed_tracking();
+  }
+  collector_state()->set_in_marking_window(false);
+}
+
+double G1DefaultPolicy::average_time_ms(G1GCPhaseTimes::GCParPhases phase) const {
+  return phase_times()->average_time_ms(phase);
+}
+
+double G1DefaultPolicy::young_other_time_ms() const {
+  return phase_times()->young_cset_choice_time_ms() +
+         phase_times()->young_free_cset_time_ms();
+}
+
+double G1DefaultPolicy::non_young_other_time_ms() const {
+  return phase_times()->non_young_cset_choice_time_ms() +
+         phase_times()->non_young_free_cset_time_ms();
+
+}
+
+double G1DefaultPolicy::other_time_ms(double pause_time_ms) const {
+  return pause_time_ms -
+         average_time_ms(G1GCPhaseTimes::UpdateRS) -
+         average_time_ms(G1GCPhaseTimes::ScanRS) -
+         average_time_ms(G1GCPhaseTimes::ObjCopy) -
+         average_time_ms(G1GCPhaseTimes::Termination);
+}
+
+double G1DefaultPolicy::constant_other_time_ms(double pause_time_ms) const {
+  return other_time_ms(pause_time_ms) - young_other_time_ms() - non_young_other_time_ms();
+}
+
+CollectionSetChooser* G1DefaultPolicy::cset_chooser() const {
+  return _collection_set->cset_chooser();
+}
+
+bool G1DefaultPolicy::about_to_start_mixed_phase() const {
+  return _g1->concurrent_mark()->cmThread()->during_cycle() || collector_state()->last_young_gc();
+}
+
+bool G1DefaultPolicy::need_to_start_conc_mark(const char* source, size_t alloc_word_size) {
+  if (about_to_start_mixed_phase()) {
+    return false;
+  }
+
+  size_t marking_initiating_used_threshold = _ihop_control->get_conc_mark_start_threshold();
+
+  size_t cur_used_bytes = _g1->non_young_capacity_bytes();
+  size_t alloc_byte_size = alloc_word_size * HeapWordSize;
+  size_t marking_request_bytes = cur_used_bytes + alloc_byte_size;
+
+  bool result = false;
+  if (marking_request_bytes > marking_initiating_used_threshold) {
+    result = collector_state()->gcs_are_young() && !collector_state()->last_young_gc();
+    log_debug(gc, ergo, ihop)("%s occupancy: " SIZE_FORMAT "B allocation request: " SIZE_FORMAT "B threshold: " SIZE_FORMAT "B (%1.2f) source: %s",
+                              result ? "Request concurrent cycle initiation (occupancy higher than threshold)" : "Do not request concurrent cycle initiation (still doing mixed collections)",
+                              cur_used_bytes, alloc_byte_size, marking_initiating_used_threshold, (double) marking_initiating_used_threshold / _g1->capacity() * 100, source);
+  }
+
+  return result;
+}
+
+// Anything below that is considered to be zero
+#define MIN_TIMER_GRANULARITY 0.0000001
+
+void G1DefaultPolicy::record_collection_pause_end(double pause_time_ms, size_t cards_scanned, size_t heap_used_bytes_before_gc) {
+  double end_time_sec = os::elapsedTime();
+
+  size_t cur_used_bytes = _g1->used();
+  assert(cur_used_bytes == _g1->recalculate_used(), "It should!");
+  bool last_pause_included_initial_mark = false;
+  bool update_stats = !_g1->evacuation_failed();
+
+  NOT_PRODUCT(_short_lived_surv_rate_group->print());
+
+  record_pause(young_gc_pause_kind(), end_time_sec - pause_time_ms / 1000.0, end_time_sec);
+
+  last_pause_included_initial_mark = collector_state()->during_initial_mark_pause();
+  if (last_pause_included_initial_mark) {
+    record_concurrent_mark_init_end(0.0);
+  } else {
+    maybe_start_marking();
+  }
+
+  double app_time_ms = (phase_times()->cur_collection_start_sec() * 1000.0 - _analytics->prev_collection_pause_end_ms());
+  if (app_time_ms < MIN_TIMER_GRANULARITY) {
+    // This usually happens due to the timer not having the required
+    // granularity. Some Linuxes are the usual culprits.
+    // We'll just set it to something (arbitrarily) small.
+    app_time_ms = 1.0;
+  }
+
+  if (update_stats) {
+    // We maintain the invariant that all objects allocated by mutator
+    // threads will be allocated out of eden regions. So, we can use
+    // the eden region number allocated since the previous GC to
+    // calculate the application's allocate rate. The only exception
+    // to that is humongous objects that are allocated separately. But
+    // given that humongous object allocations do not really affect
+    // either the pause's duration nor when the next pause will take
+    // place we can safely ignore them here.
+    uint regions_allocated = _collection_set->eden_region_length();
+    double alloc_rate_ms = (double) regions_allocated / app_time_ms;
+    _analytics->report_alloc_rate_ms(alloc_rate_ms);
+
+    double interval_ms =
+      (end_time_sec - _analytics->last_known_gc_end_time_sec()) * 1000.0;
+    _analytics->update_recent_gc_times(end_time_sec, pause_time_ms);
+    _analytics->compute_pause_time_ratio(interval_ms, pause_time_ms);
+  }
+
+  bool new_in_marking_window = collector_state()->in_marking_window();
+  bool new_in_marking_window_im = false;
+  if (last_pause_included_initial_mark) {
+    new_in_marking_window = true;
+    new_in_marking_window_im = true;
+  }
+
+  if (collector_state()->last_young_gc()) {
+    // This is supposed to to be the "last young GC" before we start
+    // doing mixed GCs. Here we decide whether to start mixed GCs or not.
+    assert(!last_pause_included_initial_mark, "The last young GC is not allowed to be an initial mark GC");
+
+    if (next_gc_should_be_mixed("start mixed GCs",
+                                "do not start mixed GCs")) {
+      collector_state()->set_gcs_are_young(false);
+    } else {
+      // We aborted the mixed GC phase early.
+      abort_time_to_mixed_tracking();
+    }
+
+    collector_state()->set_last_young_gc(false);
+  }
+
+  if (!collector_state()->last_gc_was_young()) {
+    // This is a mixed GC. Here we decide whether to continue doing
+    // mixed GCs or not.
+    if (!next_gc_should_be_mixed("continue mixed GCs",
+                                 "do not continue mixed GCs")) {
+      collector_state()->set_gcs_are_young(true);
+
+      maybe_start_marking();
+    }
+  }
+
+  _short_lived_surv_rate_group->start_adding_regions();
+  // Do that for any other surv rate groups
+
+  double scan_hcc_time_ms = ConcurrentG1Refine::hot_card_cache_enabled() ? average_time_ms(G1GCPhaseTimes::ScanHCC) : 0.0;
+
+  if (update_stats) {
+    double cost_per_card_ms = 0.0;
+    if (_pending_cards > 0) {
+      cost_per_card_ms = (average_time_ms(G1GCPhaseTimes::UpdateRS) - scan_hcc_time_ms) / (double) _pending_cards;
+      _analytics->report_cost_per_card_ms(cost_per_card_ms);
+    }
+    _analytics->report_cost_scan_hcc(scan_hcc_time_ms);
+
+    double cost_per_entry_ms = 0.0;
+    if (cards_scanned > 10) {
+      cost_per_entry_ms = average_time_ms(G1GCPhaseTimes::ScanRS) / (double) cards_scanned;
+      _analytics->report_cost_per_entry_ms(cost_per_entry_ms, collector_state()->last_gc_was_young());
+    }
+
+    if (_max_rs_lengths > 0) {
+      double cards_per_entry_ratio =
+        (double) cards_scanned / (double) _max_rs_lengths;
+      _analytics->report_cards_per_entry_ratio(cards_per_entry_ratio, collector_state()->last_gc_was_young());
+    }
+
+    // This is defensive. For a while _max_rs_lengths could get
+    // smaller than _recorded_rs_lengths which was causing
+    // rs_length_diff to get very large and mess up the RSet length
+    // predictions. The reason was unsafe concurrent updates to the
+    // _inc_cset_recorded_rs_lengths field which the code below guards
+    // against (see CR 7118202). This bug has now been fixed (see CR
+    // 7119027). However, I'm still worried that
+    // _inc_cset_recorded_rs_lengths might still end up somewhat
+    // inaccurate. The concurrent refinement thread calculates an
+    // RSet's length concurrently with other CR threads updating it
+    // which might cause it to calculate the length incorrectly (if,
+    // say, it's in mid-coarsening). So I'll leave in the defensive
+    // conditional below just in case.
+    size_t rs_length_diff = 0;
+    size_t recorded_rs_lengths = _collection_set->recorded_rs_lengths();
+    if (_max_rs_lengths > recorded_rs_lengths) {
+      rs_length_diff = _max_rs_lengths - recorded_rs_lengths;
+    }
+    _analytics->report_rs_length_diff((double) rs_length_diff);
+
+    size_t freed_bytes = heap_used_bytes_before_gc - cur_used_bytes;
+    size_t copied_bytes = _collection_set->bytes_used_before() - freed_bytes;
+    double cost_per_byte_ms = 0.0;
+
+    if (copied_bytes > 0) {
+      cost_per_byte_ms = average_time_ms(G1GCPhaseTimes::ObjCopy) / (double) copied_bytes;
+      _analytics->report_cost_per_byte_ms(cost_per_byte_ms, collector_state()->in_marking_window());
+    }
+
+    if (_collection_set->young_region_length() > 0) {
+      _analytics->report_young_other_cost_per_region_ms(young_other_time_ms() /
+                                                        _collection_set->young_region_length());
+    }
+
+    if (_collection_set->old_region_length() > 0) {
+      _analytics->report_non_young_other_cost_per_region_ms(non_young_other_time_ms() /
+                                                            _collection_set->old_region_length());
+    }
+
+    _analytics->report_constant_other_time_ms(constant_other_time_ms(pause_time_ms));
+
+    _analytics->report_pending_cards((double) _pending_cards);
+    _analytics->report_rs_lengths((double) _max_rs_lengths);
+  }
+
+  collector_state()->set_in_marking_window(new_in_marking_window);
+  collector_state()->set_in_marking_window_im(new_in_marking_window_im);
+  _free_regions_at_end_of_collection = _g1->num_free_regions();
+  // IHOP control wants to know the expected young gen length if it were not
+  // restrained by the heap reserve. Using the actual length would make the
+  // prediction too small and the limit the young gen every time we get to the
+  // predicted target occupancy.
+  size_t last_unrestrained_young_length = update_young_list_max_and_target_length();
+  update_rs_lengths_prediction();
+
+  update_ihop_prediction(app_time_ms / 1000.0,
+                         _bytes_allocated_in_old_since_last_gc,
+                         last_unrestrained_young_length * HeapRegion::GrainBytes);
+  _bytes_allocated_in_old_since_last_gc = 0;
+
+  _ihop_control->send_trace_event(_g1->gc_tracer_stw());
+
+  // Note that _mmu_tracker->max_gc_time() returns the time in seconds.
+  double update_rs_time_goal_ms = _mmu_tracker->max_gc_time() * MILLIUNITS * G1RSetUpdatingPauseTimePercent / 100.0;
+
+  if (update_rs_time_goal_ms < scan_hcc_time_ms) {
+    log_debug(gc, ergo, refine)("Adjust concurrent refinement thresholds (scanning the HCC expected to take longer than Update RS time goal)."
+                                "Update RS time goal: %1.2fms Scan HCC time: %1.2fms",
+                                update_rs_time_goal_ms, scan_hcc_time_ms);
+
+    update_rs_time_goal_ms = 0;
+  } else {
+    update_rs_time_goal_ms -= scan_hcc_time_ms;
+  }
+  _g1->concurrent_g1_refine()->adjust(average_time_ms(G1GCPhaseTimes::UpdateRS) - scan_hcc_time_ms,
+                                      phase_times()->sum_thread_work_items(G1GCPhaseTimes::UpdateRS),
+                                      update_rs_time_goal_ms);
+
+  cset_chooser()->verify();
+}
+
+G1IHOPControl* G1DefaultPolicy::create_ihop_control(const G1Predictions* predictor){
+  if (G1UseAdaptiveIHOP) {
+    return new G1AdaptiveIHOPControl(InitiatingHeapOccupancyPercent,
+                                     predictor,
+                                     G1ReservePercent,
+                                     G1HeapWastePercent);
+  } else {
+    return new G1StaticIHOPControl(InitiatingHeapOccupancyPercent);
+  }
+}
+
+void G1DefaultPolicy::update_ihop_prediction(double mutator_time_s,
+                                      size_t mutator_alloc_bytes,
+                                      size_t young_gen_size) {
+  // Always try to update IHOP prediction. Even evacuation failures give information
+  // about e.g. whether to start IHOP earlier next time.
+
+  // Avoid using really small application times that might create samples with
+  // very high or very low values. They may be caused by e.g. back-to-back gcs.
+  double const min_valid_time = 1e-6;
+
+  bool report = false;
+
+  double marking_to_mixed_time = -1.0;
+  if (!collector_state()->last_gc_was_young() && _initial_mark_to_mixed.has_result()) {
+    marking_to_mixed_time = _initial_mark_to_mixed.last_marking_time();
+    assert(marking_to_mixed_time > 0.0,
+           "Initial mark to mixed time must be larger than zero but is %.3f",
+           marking_to_mixed_time);
+    if (marking_to_mixed_time > min_valid_time) {
+      _ihop_control->update_marking_length(marking_to_mixed_time);
+      report = true;
+    }
+  }
+
+  // As an approximation for the young gc promotion rates during marking we use
+  // all of them. In many applications there are only a few if any young gcs during
+  // marking, which makes any prediction useless. This increases the accuracy of the
+  // prediction.
+  if (collector_state()->last_gc_was_young() && mutator_time_s > min_valid_time) {
+    _ihop_control->update_allocation_info(mutator_time_s, mutator_alloc_bytes, young_gen_size);
+    report = true;
+  }
+
+  if (report) {
+    report_ihop_statistics();
+  }
+}
+
+void G1DefaultPolicy::report_ihop_statistics() {
+  _ihop_control->print();
+}
+
+void G1DefaultPolicy::print_phases() {
+  phase_times()->print();
+}
+
+double G1DefaultPolicy::predict_yg_surv_rate(int age, SurvRateGroup* surv_rate_group) const {
+  TruncatedSeq* seq = surv_rate_group->get_seq(age);
+  guarantee(seq->num() > 0, "There should be some young gen survivor samples available. Tried to access with age %d", age);
+  double pred = _predictor.get_new_prediction(seq);
+  if (pred > 1.0) {
+    pred = 1.0;
+  }
+  return pred;
+}
+
+double G1DefaultPolicy::predict_yg_surv_rate(int age) const {
+  return predict_yg_surv_rate(age, _short_lived_surv_rate_group);
+}
+
+double G1DefaultPolicy::accum_yg_surv_rate_pred(int age) const {
+  return _short_lived_surv_rate_group->accum_surv_rate_pred(age);
+}
+
+double G1DefaultPolicy::predict_base_elapsed_time_ms(size_t pending_cards,
+                                              size_t scanned_cards) const {
+  return
+    _analytics->predict_rs_update_time_ms(pending_cards) +
+    _analytics->predict_rs_scan_time_ms(scanned_cards, collector_state()->gcs_are_young()) +
+    _analytics->predict_constant_other_time_ms();
+}
+
+double G1DefaultPolicy::predict_base_elapsed_time_ms(size_t pending_cards) const {
+  size_t rs_length = _analytics->predict_rs_lengths() + _analytics->predict_rs_length_diff();
+  size_t card_num = _analytics->predict_card_num(rs_length, collector_state()->gcs_are_young());
+  return predict_base_elapsed_time_ms(pending_cards, card_num);
+}
+
+size_t G1DefaultPolicy::predict_bytes_to_copy(HeapRegion* hr) const {
+  size_t bytes_to_copy;
+  if (hr->is_marked())
+    bytes_to_copy = hr->max_live_bytes();
+  else {
+    assert(hr->is_young() && hr->age_in_surv_rate_group() != -1, "invariant");
+    int age = hr->age_in_surv_rate_group();
+    double yg_surv_rate = predict_yg_surv_rate(age, hr->surv_rate_group());
+    bytes_to_copy = (size_t) (hr->used() * yg_surv_rate);
+  }
+  return bytes_to_copy;
+}
+
+double G1DefaultPolicy::predict_region_elapsed_time_ms(HeapRegion* hr,
+                                                bool for_young_gc) const {
+  size_t rs_length = hr->rem_set()->occupied();
+  // Predicting the number of cards is based on which type of GC
+  // we're predicting for.
+  size_t card_num = _analytics->predict_card_num(rs_length, for_young_gc);
+  size_t bytes_to_copy = predict_bytes_to_copy(hr);
+
+  double region_elapsed_time_ms =
+    _analytics->predict_rs_scan_time_ms(card_num, collector_state()->gcs_are_young()) +
+    _analytics->predict_object_copy_time_ms(bytes_to_copy, collector_state()->during_concurrent_mark());
+
+  // The prediction of the "other" time for this region is based
+  // upon the region type and NOT the GC type.
+  if (hr->is_young()) {
+    region_elapsed_time_ms += _analytics->predict_young_other_time_ms(1);
+  } else {
+    region_elapsed_time_ms += _analytics->predict_non_young_other_time_ms(1);
+  }
+  return region_elapsed_time_ms;
+}
+
+
+void G1DefaultPolicy::print_yg_surv_rate_info() const {
+#ifndef PRODUCT
+  _short_lived_surv_rate_group->print_surv_rate_summary();
+  // add this call for any other surv rate groups
+#endif // PRODUCT
+}
+
+bool G1DefaultPolicy::is_young_list_full() const {
+  uint young_list_length = _g1->young_list()->length();
+  uint young_list_target_length = _young_list_target_length;
+  return young_list_length >= young_list_target_length;
+}
+
+bool G1DefaultPolicy::can_expand_young_list() const {
+  uint young_list_length = _g1->young_list()->length();
+  uint young_list_max_length = _young_list_max_length;
+  return young_list_length < young_list_max_length;
+}
+
+bool G1DefaultPolicy::adaptive_young_list_length() const {
+  return _young_gen_sizer.adaptive_young_list_length();
+}
+
+void G1DefaultPolicy::update_max_gc_locker_expansion() {
+  uint expansion_region_num = 0;
+  if (GCLockerEdenExpansionPercent > 0) {
+    double perc = (double) GCLockerEdenExpansionPercent / 100.0;
+    double expansion_region_num_d = perc * (double) _young_list_target_length;
+    // We use ceiling so that if expansion_region_num_d is > 0.0 (but
+    // less than 1.0) we'll get 1.
+    expansion_region_num = (uint) ceil(expansion_region_num_d);
+  } else {
+    assert(expansion_region_num == 0, "sanity");
+  }
+  _young_list_max_length = _young_list_target_length + expansion_region_num;
+  assert(_young_list_target_length <= _young_list_max_length, "post-condition");
+}
+
+// Calculates survivor space parameters.
+void G1DefaultPolicy::update_survivors_policy() {
+  double max_survivor_regions_d =
+                 (double) _young_list_target_length / (double) SurvivorRatio;
+  // We use ceiling so that if max_survivor_regions_d is > 0.0 (but
+  // smaller than 1.0) we'll get 1.
+  _max_survivor_regions = (uint) ceil(max_survivor_regions_d);
+
+  _tenuring_threshold = _survivors_age_table.compute_tenuring_threshold(
+      HeapRegion::GrainWords * _max_survivor_regions, _policy_counters);
+}
+
+bool G1DefaultPolicy::force_initial_mark_if_outside_cycle(GCCause::Cause gc_cause) {
+  // We actually check whether we are marking here and not if we are in a
+  // reclamation phase. This means that we will schedule a concurrent mark
+  // even while we are still in the process of reclaiming memory.
+  bool during_cycle = _g1->concurrent_mark()->cmThread()->during_cycle();
+  if (!during_cycle) {
+    log_debug(gc, ergo)("Request concurrent cycle initiation (requested by GC cause). GC cause: %s", GCCause::to_string(gc_cause));
+    collector_state()->set_initiate_conc_mark_if_possible(true);
+    return true;
+  } else {
+    log_debug(gc, ergo)("Do not request concurrent cycle initiation (concurrent cycle already in progress). GC cause: %s", GCCause::to_string(gc_cause));
+    return false;
+  }
+}
+
+void G1DefaultPolicy::initiate_conc_mark() {
+  collector_state()->set_during_initial_mark_pause(true);
+  collector_state()->set_initiate_conc_mark_if_possible(false);
+}
+
+void G1DefaultPolicy::decide_on_conc_mark_initiation() {
+  // We are about to decide on whether this pause will be an
+  // initial-mark pause.
+
+  // First, collector_state()->during_initial_mark_pause() should not be already set. We
+  // will set it here if we have to. However, it should be cleared by
+  // the end of the pause (it's only set for the duration of an
+  // initial-mark pause).
+  assert(!collector_state()->during_initial_mark_pause(), "pre-condition");
+
+  if (collector_state()->initiate_conc_mark_if_possible()) {
+    // We had noticed on a previous pause that the heap occupancy has
+    // gone over the initiating threshold and we should start a
+    // concurrent marking cycle. So we might initiate one.
+
+    if (!about_to_start_mixed_phase() && collector_state()->gcs_are_young()) {
+      // Initiate a new initial mark if there is no marking or reclamation going on.
+      initiate_conc_mark();
+      log_debug(gc, ergo)("Initiate concurrent cycle (concurrent cycle initiation requested)");
+    } else if (_g1->is_user_requested_concurrent_full_gc(_g1->gc_cause())) {
+      // Initiate a user requested initial mark. An initial mark must be young only
+      // GC, so the collector state must be updated to reflect this.
+      collector_state()->set_gcs_are_young(true);
+      collector_state()->set_last_young_gc(false);
+
+      abort_time_to_mixed_tracking();
+      initiate_conc_mark();
+      log_debug(gc, ergo)("Initiate concurrent cycle (user requested concurrent cycle)");
+    } else {
+      // The concurrent marking thread is still finishing up the
+      // previous cycle. If we start one right now the two cycles
+      // overlap. In particular, the concurrent marking thread might
+      // be in the process of clearing the next marking bitmap (which
+      // we will use for the next cycle if we start one). Starting a
+      // cycle now will be bad given that parts of the marking
+      // information might get cleared by the marking thread. And we
+      // cannot wait for the marking thread to finish the cycle as it
+      // periodically yields while clearing the next marking bitmap
+      // and, if it's in a yield point, it's waiting for us to
+      // finish. So, at this point we will not start a cycle and we'll
+      // let the concurrent marking thread complete the last one.
+      log_debug(gc, ergo)("Do not initiate concurrent cycle (concurrent cycle already in progress)");
+    }
+  }
+}
+
+void G1DefaultPolicy::record_concurrent_mark_cleanup_end() {
+  cset_chooser()->rebuild(_g1->workers(), _g1->num_regions());
+
+  double end_sec = os::elapsedTime();
+  double elapsed_time_ms = (end_sec - _mark_cleanup_start_sec) * 1000.0;
+  _analytics->report_concurrent_mark_cleanup_times_ms(elapsed_time_ms);
+  _analytics->append_prev_collection_pause_end_ms(elapsed_time_ms);
+
+  record_pause(Cleanup, _mark_cleanup_start_sec, end_sec);
+}
+
+double G1DefaultPolicy::reclaimable_bytes_perc(size_t reclaimable_bytes) const {
+  // Returns the given amount of reclaimable bytes (that represents
+  // the amount of reclaimable space still to be collected) as a
+  // percentage of the current heap capacity.
+  size_t capacity_bytes = _g1->capacity();
+  return (double) reclaimable_bytes * 100.0 / (double) capacity_bytes;
+}
+
+void G1DefaultPolicy::maybe_start_marking() {
+  if (need_to_start_conc_mark("end of GC")) {
+    // Note: this might have already been set, if during the last
+    // pause we decided to start a cycle but at the beginning of
+    // this pause we decided to postpone it. That's OK.
+    collector_state()->set_initiate_conc_mark_if_possible(true);
+  }
+}
+
+G1DefaultPolicy::PauseKind G1DefaultPolicy::young_gc_pause_kind() const {
+  assert(!collector_state()->full_collection(), "must be");
+  if (collector_state()->during_initial_mark_pause()) {
+    assert(collector_state()->last_gc_was_young(), "must be");
+    assert(!collector_state()->last_young_gc(), "must be");
+    return InitialMarkGC;
+  } else if (collector_state()->last_young_gc()) {
+    assert(!collector_state()->during_initial_mark_pause(), "must be");
+    assert(collector_state()->last_gc_was_young(), "must be");
+    return LastYoungGC;
+  } else if (!collector_state()->last_gc_was_young()) {
+    assert(!collector_state()->during_initial_mark_pause(), "must be");
+    assert(!collector_state()->last_young_gc(), "must be");
+    return MixedGC;
+  } else {
+    assert(collector_state()->last_gc_was_young(), "must be");
+    assert(!collector_state()->during_initial_mark_pause(), "must be");
+    assert(!collector_state()->last_young_gc(), "must be");
+    return YoungOnlyGC;
+  }
+}
+
+void G1DefaultPolicy::record_pause(PauseKind kind, double start, double end) {
+  // Manage the MMU tracker. For some reason it ignores Full GCs.
+  if (kind != FullGC) {
+    _mmu_tracker->add_pause(start, end);
+  }
+  // Manage the mutator time tracking from initial mark to first mixed gc.
+  switch (kind) {
+    case FullGC:
+      abort_time_to_mixed_tracking();
+      break;
+    case Cleanup:
+    case Remark:
+    case YoungOnlyGC:
+    case LastYoungGC:
+      _initial_mark_to_mixed.add_pause(end - start);
+      break;
+    case InitialMarkGC:
+      _initial_mark_to_mixed.record_initial_mark_end(end);
+      break;
+    case MixedGC:
+      _initial_mark_to_mixed.record_mixed_gc_start(start);
+      break;
+    default:
+      ShouldNotReachHere();
+  }
+}
+
+void G1DefaultPolicy::abort_time_to_mixed_tracking() {
+  _initial_mark_to_mixed.reset();
+}
+
+bool G1DefaultPolicy::next_gc_should_be_mixed(const char* true_action_str,
+                                       const char* false_action_str) const {
+  if (cset_chooser()->is_empty()) {
+    log_debug(gc, ergo)("%s (candidate old regions not available)", false_action_str);
+    return false;
+  }
+
+  // Is the amount of uncollected reclaimable space above G1HeapWastePercent?
+  size_t reclaimable_bytes = cset_chooser()->remaining_reclaimable_bytes();
+  double reclaimable_perc = reclaimable_bytes_perc(reclaimable_bytes);
+  double threshold = (double) G1HeapWastePercent;
+  if (reclaimable_perc <= threshold) {
+    log_debug(gc, ergo)("%s (reclaimable percentage not over threshold). candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) threshold: " UINTX_FORMAT,
+                        false_action_str, cset_chooser()->remaining_regions(), reclaimable_bytes, reclaimable_perc, G1HeapWastePercent);
+    return false;
+  }
+  log_debug(gc, ergo)("%s (candidate old regions available). candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) threshold: " UINTX_FORMAT,
+                      true_action_str, cset_chooser()->remaining_regions(), reclaimable_bytes, reclaimable_perc, G1HeapWastePercent);
+  return true;
+}
+
+uint G1DefaultPolicy::calc_min_old_cset_length() const {
+  // The min old CSet region bound is based on the maximum desired
+  // number of mixed GCs after a cycle. I.e., even if some old regions
+  // look expensive, we should add them to the CSet anyway to make
+  // sure we go through the available old regions in no more than the
+  // maximum desired number of mixed GCs.
+  //
+  // The calculation is based on the number of marked regions we added
+  // to the CSet chooser in the first place, not how many remain, so
+  // that the result is the same during all mixed GCs that follow a cycle.
+
+  const size_t region_num = (size_t) cset_chooser()->length();
+  const size_t gc_num = (size_t) MAX2(G1MixedGCCountTarget, (uintx) 1);
+  size_t result = region_num / gc_num;
+  // emulate ceiling
+  if (result * gc_num < region_num) {
+    result += 1;
+  }
+  return (uint) result;
+}
+
+uint G1DefaultPolicy::calc_max_old_cset_length() const {
+  // The max old CSet region bound is based on the threshold expressed
+  // as a percentage of the heap size. I.e., it should bound the
+  // number of old regions added to the CSet irrespective of how many
+  // of them are available.
+
+  const G1CollectedHeap* g1h = G1CollectedHeap::heap();
+  const size_t region_num = g1h->num_regions();
+  const size_t perc = (size_t) G1OldCSetRegionThresholdPercent;
+  size_t result = region_num * perc / 100;
+  // emulate ceiling
+  if (100 * result < region_num * perc) {
+    result += 1;
+  }
+  return (uint) result;
+}
+
+void G1DefaultPolicy::finalize_collection_set(double target_pause_time_ms) {
+  double time_remaining_ms = _collection_set->finalize_young_part(target_pause_time_ms);
+  _collection_set->finalize_old_part(time_remaining_ms);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/g1/g1DefaultPolicy.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,440 @@
+/*
+ * Copyright (c) 2016, 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_GC_G1_G1DEFAULTPOLICY_HPP
+#define SHARE_VM_GC_G1_G1DEFAULTPOLICY_HPP
+
+#include "gc/g1/g1CollectorState.hpp"
+#include "gc/g1/g1GCPhaseTimes.hpp"
+#include "gc/g1/g1InCSetState.hpp"
+#include "gc/g1/g1InitialMarkToMixedTimeTracker.hpp"
+#include "gc/g1/g1MMUTracker.hpp"
+#include "gc/g1/g1Predictions.hpp"
+#include "gc/g1/g1Policy.hpp"
+#include "gc/g1/g1YoungGenSizer.hpp"
+#include "gc/shared/gcCause.hpp"
+#include "utilities/pair.hpp"
+
+// A G1Policy makes policy decisions that determine the
+// characteristics of the collector.  Examples include:
+//   * choice of collection set.
+//   * when to collect.
+
+class HeapRegion;
+class G1CollectionSet;
+class CollectionSetChooser;
+class G1IHOPControl;
+class G1Analytics;
+class G1YoungGenSizer;
+class GCPolicyCounters;
+
+class G1DefaultPolicy: public G1Policy {
+ private:
+
+  static G1IHOPControl* create_ihop_control(const G1Predictions* predictor);
+  // Update the IHOP control with necessary statistics.
+  void update_ihop_prediction(double mutator_time_s,
+                              size_t mutator_alloc_bytes,
+                              size_t young_gen_size);
+  void report_ihop_statistics();
+
+  G1Predictions _predictor;
+  G1Analytics* _analytics;
+  G1MMUTracker* _mmu_tracker;
+  G1IHOPControl* _ihop_control;
+
+  GCPolicyCounters* _policy_counters;
+
+  double _full_collection_start_sec;
+
+  uint _young_list_target_length;
+  uint _young_list_fixed_length;
+
+  // The max number of regions we can extend the eden by while the GC
+  // locker is active. This should be >= _young_list_target_length;
+  uint _young_list_max_length;
+
+  // SurvRateGroups below must be initialized after the predictor because they
+  // indirectly use it through this object passed to their constructor.
+  SurvRateGroup* _short_lived_surv_rate_group;
+  SurvRateGroup* _survivor_surv_rate_group;
+
+  double _reserve_factor;
+  // This will be set when the heap is expanded
+  // for the first time during initialization.
+  uint   _reserve_regions;
+
+  G1YoungGenSizer _young_gen_sizer;
+
+  uint _free_regions_at_end_of_collection;
+
+  size_t _max_rs_lengths;
+
+  size_t _rs_lengths_prediction;
+
+#ifndef PRODUCT
+  bool verify_young_ages(HeapRegion* head, SurvRateGroup *surv_rate_group);
+#endif // PRODUCT
+
+  size_t _pending_cards;
+
+  // The amount of allocated bytes in old gen during the last mutator and the following
+  // young GC phase.
+  size_t _bytes_allocated_in_old_since_last_gc;
+
+  G1InitialMarkToMixedTimeTracker _initial_mark_to_mixed;
+public:
+  const G1Predictions& predictor() const { return _predictor; }
+  const G1Analytics* analytics()   const { return const_cast<const G1Analytics*>(_analytics); }
+
+  // Add the given number of bytes to the total number of allocated bytes in the old gen.
+  void add_bytes_allocated_in_old_since_last_gc(size_t bytes) { _bytes_allocated_in_old_since_last_gc += bytes; }
+
+  // Accessors
+
+  void set_region_eden(HeapRegion* hr, int young_index_in_cset) {
+    hr->set_eden();
+    hr->install_surv_rate_group(_short_lived_surv_rate_group);
+    hr->set_young_index_in_cset(young_index_in_cset);
+  }
+
+  void set_region_survivor(HeapRegion* hr, int young_index_in_cset) {
+    assert(hr->is_survivor(), "pre-condition");
+    hr->install_surv_rate_group(_survivor_surv_rate_group);
+    hr->set_young_index_in_cset(young_index_in_cset);
+  }
+
+#ifndef PRODUCT
+  bool verify_young_ages();
+#endif // PRODUCT
+
+  void record_max_rs_lengths(size_t rs_lengths) {
+    _max_rs_lengths = rs_lengths;
+  }
+
+
+  double predict_base_elapsed_time_ms(size_t pending_cards) const;
+  double predict_base_elapsed_time_ms(size_t pending_cards,
+                                      size_t scanned_cards) const;
+  size_t predict_bytes_to_copy(HeapRegion* hr) const;
+  double predict_region_elapsed_time_ms(HeapRegion* hr, bool for_young_gc) const;
+
+  double predict_survivor_regions_evac_time() const;
+
+  bool should_update_surv_rate_group_predictors() {
+    return collector_state()->last_gc_was_young() && !collector_state()->in_marking_window();
+  }
+
+  void cset_regions_freed() {
+    bool update = should_update_surv_rate_group_predictors();
+
+    _short_lived_surv_rate_group->all_surviving_words_recorded(update);
+    _survivor_surv_rate_group->all_surviving_words_recorded(update);
+  }
+
+  G1MMUTracker* mmu_tracker() {
+    return _mmu_tracker;
+  }
+
+  const G1MMUTracker* mmu_tracker() const {
+    return _mmu_tracker;
+  }
+
+  double max_pause_time_ms() const {
+    return _mmu_tracker->max_gc_time() * 1000.0;
+  }
+
+  // Returns an estimate of the survival rate of the region at yg-age
+  // "yg_age".
+  double predict_yg_surv_rate(int age, SurvRateGroup* surv_rate_group) const;
+
+  double predict_yg_surv_rate(int age) const;
+
+  double accum_yg_surv_rate_pred(int age) const;
+
+protected:
+  G1CollectionSet* _collection_set;
+  virtual double average_time_ms(G1GCPhaseTimes::GCParPhases phase) const;
+  virtual double other_time_ms(double pause_time_ms) const;
+
+  double young_other_time_ms() const;
+  double non_young_other_time_ms() const;
+  double constant_other_time_ms(double pause_time_ms) const;
+
+  CollectionSetChooser* cset_chooser() const;
+private:
+
+  // The number of bytes copied during the GC.
+  size_t _bytes_copied_during_gc;
+
+  // Stash a pointer to the g1 heap.
+  G1CollectedHeap* _g1;
+
+  G1GCPhaseTimes* _phase_times;
+
+  // This set of variables tracks the collector efficiency, in order to
+  // determine whether we should initiate a new marking.
+  double _mark_remark_start_sec;
+  double _mark_cleanup_start_sec;
+
+  // Updates the internal young list maximum and target lengths. Returns the
+  // unbounded young list target length.
+  uint update_young_list_max_and_target_length();
+  uint update_young_list_max_and_target_length(size_t rs_lengths);
+
+  // Update the young list target length either by setting it to the
+  // desired fixed value or by calculating it using G1's pause
+  // prediction model. If no rs_lengths parameter is passed, predict
+  // the RS lengths using the prediction model, otherwise use the
+  // given rs_lengths as the prediction.
+  // Returns the unbounded young list target length.
+  uint update_young_list_target_length(size_t rs_lengths);
+
+  // Calculate and return the minimum desired young list target
+  // length. This is the minimum desired young list length according
+  // to the user's inputs.
+  uint calculate_young_list_desired_min_length(uint base_min_length) const;
+
+  // Calculate and return the maximum desired young list target
+  // length. This is the maximum desired young list length according
+  // to the user's inputs.
+  uint calculate_young_list_desired_max_length() const;
+
+  // Calculate and return the maximum young list target length that
+  // can fit into the pause time goal. The parameters are: rs_lengths
+  // represent the prediction of how large the young RSet lengths will
+  // be, base_min_length is the already existing number of regions in
+  // the young list, min_length and max_length are the desired min and
+  // max young list length according to the user's inputs.
+  uint calculate_young_list_target_length(size_t rs_lengths,
+                                          uint base_min_length,
+                                          uint desired_min_length,
+                                          uint desired_max_length) const;
+
+  // Result of the bounded_young_list_target_length() method, containing both the
+  // bounded as well as the unbounded young list target lengths in this order.
+  typedef Pair<uint, uint, StackObj> YoungTargetLengths;
+  YoungTargetLengths young_list_target_lengths(size_t rs_lengths) const;
+
+  void update_rs_lengths_prediction();
+  void update_rs_lengths_prediction(size_t prediction);
+
+  // Check whether a given young length (young_length) fits into the
+  // given target pause time and whether the prediction for the amount
+  // of objects to be copied for the given length will fit into the
+  // given free space (expressed by base_free_regions).  It is used by
+  // calculate_young_list_target_length().
+  bool predict_will_fit(uint young_length, double base_time_ms,
+                        uint base_free_regions, double target_pause_time_ms) const;
+
+public:
+  size_t pending_cards() const { return _pending_cards; }
+
+  // Calculate the minimum number of old regions we'll add to the CSet
+  // during a mixed GC.
+  uint calc_min_old_cset_length() const;
+
+  // Calculate the maximum number of old regions we'll add to the CSet
+  // during a mixed GC.
+  uint calc_max_old_cset_length() const;
+
+  // Returns the given amount of uncollected reclaimable space
+  // as a percentage of the current heap capacity.
+  double reclaimable_bytes_perc(size_t reclaimable_bytes) const;
+
+private:
+  // Sets up marking if proper conditions are met.
+  void maybe_start_marking();
+
+  // The kind of STW pause.
+  enum PauseKind {
+    FullGC,
+    YoungOnlyGC,
+    MixedGC,
+    LastYoungGC,
+    InitialMarkGC,
+    Cleanup,
+    Remark
+  };
+
+  // Calculate PauseKind from internal state.
+  PauseKind young_gc_pause_kind() const;
+  // Record the given STW pause with the given start and end times (in s).
+  void record_pause(PauseKind kind, double start, double end);
+  // Indicate that we aborted marking before doing any mixed GCs.
+  void abort_time_to_mixed_tracking();
+public:
+
+  G1DefaultPolicy();
+
+  virtual ~G1DefaultPolicy();
+
+  G1CollectorState* collector_state() const;
+
+  G1GCPhaseTimes* phase_times() const { return _phase_times; }
+
+  // Check the current value of the young list RSet lengths and
+  // compare it against the last prediction. If the current value is
+  // higher, recalculate the young list target length prediction.
+  void revise_young_list_target_length_if_necessary(size_t rs_lengths);
+
+  // This should be called after the heap is resized.
+  void record_new_heap_size(uint new_number_of_regions);
+
+  void init(G1CollectedHeap* g1h, G1CollectionSet* collection_set);
+
+  virtual void note_gc_start();
+
+  bool need_to_start_conc_mark(const char* source, size_t alloc_word_size = 0);
+
+  bool about_to_start_mixed_phase() const;
+
+  // Record the start and end of an evacuation pause.
+  void record_collection_pause_start(double start_time_sec);
+  void record_collection_pause_end(double pause_time_ms, size_t cards_scanned, size_t heap_used_bytes_before_gc);
+
+  // Record the start and end of a full collection.
+  void record_full_collection_start();
+  void record_full_collection_end();
+
+  // Must currently be called while the world is stopped.
+  void record_concurrent_mark_init_end(double mark_init_elapsed_time_ms);
+
+  // Record start and end of remark.
+  void record_concurrent_mark_remark_start();
+  void record_concurrent_mark_remark_end();
+
+  // Record start, end, and completion of cleanup.
+  void record_concurrent_mark_cleanup_start();
+  void record_concurrent_mark_cleanup_end();
+  void record_concurrent_mark_cleanup_completed();
+
+  virtual void print_phases();
+
+  // Record how much space we copied during a GC. This is typically
+  // called when a GC alloc region is being retired.
+  void record_bytes_copied_during_gc(size_t bytes) {
+    _bytes_copied_during_gc += bytes;
+  }
+
+  // The amount of space we copied during a GC.
+  size_t bytes_copied_during_gc() const {
+    return _bytes_copied_during_gc;
+  }
+
+  // Determine whether there are candidate regions so that the
+  // next GC should be mixed. The two action strings are used
+  // in the ergo output when the method returns true or false.
+  bool next_gc_should_be_mixed(const char* true_action_str,
+                               const char* false_action_str) const;
+
+  virtual void finalize_collection_set(double target_pause_time_ms);
+private:
+  // Set the state to start a concurrent marking cycle and clear
+  // _initiate_conc_mark_if_possible because it has now been
+  // acted on.
+  void initiate_conc_mark();
+
+public:
+  // This sets the initiate_conc_mark_if_possible() flag to start a
+  // new cycle, as long as we are not already in one. It's best if it
+  // is called during a safepoint when the test whether a cycle is in
+  // progress or not is stable.
+  bool force_initial_mark_if_outside_cycle(GCCause::Cause gc_cause);
+
+  // This is called at the very beginning of an evacuation pause (it
+  // has to be the first thing that the pause does). If
+  // initiate_conc_mark_if_possible() is true, and the concurrent
+  // marking thread has completed its work during the previous cycle,
+  // it will set during_initial_mark_pause() to so that the pause does
+  // the initial-mark work and start a marking cycle.
+  void decide_on_conc_mark_initiation();
+
+  // Print stats on young survival ratio
+  void print_yg_surv_rate_info() const;
+
+  void finished_recalculating_age_indexes(bool is_survivors) {
+    if (is_survivors) {
+      _survivor_surv_rate_group->finished_recalculating_age_indexes();
+    } else {
+      _short_lived_surv_rate_group->finished_recalculating_age_indexes();
+    }
+  }
+
+  size_t young_list_target_length() const { return _young_list_target_length; }
+
+  bool is_young_list_full() const;
+
+  bool can_expand_young_list() const;
+
+  uint young_list_max_length() const {
+    return _young_list_max_length;
+  }
+
+  bool adaptive_young_list_length() const;
+
+  virtual bool should_process_references() const {
+    return true;
+  }
+
+private:
+  //
+  // Survivor regions policy.
+  //
+
+  // Current tenuring threshold, set to 0 if the collector reaches the
+  // maximum amount of survivors regions.
+  uint _tenuring_threshold;
+
+  // The limit on the number of regions allocated for survivors.
+  uint _max_survivor_regions;
+
+  AgeTable _survivors_age_table;
+
+public:
+  uint tenuring_threshold() const { return _tenuring_threshold; }
+
+  uint max_survivor_regions() {
+    return _max_survivor_regions;
+  }
+
+  void note_start_adding_survivor_regions() {
+    _survivor_surv_rate_group->start_adding_regions();
+  }
+
+  void note_stop_adding_survivor_regions() {
+    _survivor_surv_rate_group->stop_adding_regions();
+  }
+
+  void record_age_table(AgeTable* age_table) {
+    _survivors_age_table.merge(age_table);
+  }
+
+  void update_max_gc_locker_expansion();
+
+  // Calculates survivor space parameters.
+  void update_survivors_policy();
+};
+
+#endif // SHARE_VM_GC_G1_G1DEFAULTPOLICY_HPP
--- a/hotspot/src/share/vm/gc/g1/g1EvacFailure.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1EvacFailure.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -227,15 +227,6 @@
                                                during_conc_mark);
         _g1h->verifier()->check_bitmaps("Self-Forwarding Ptr Removal", hr);
 
-        // In the common case (i.e. when there is no evacuation
-        // failure) we make sure that the following is done when
-        // the region is freed so that it is "ready-to-go" when it's
-        // re-allocated. However, when evacuation failure happens, a
-        // region will remain in the heap and might ultimately be added
-        // to a CSet in the future. So we have to be careful here and
-        // make sure the region's RSet is ready for parallel iteration
-        // whenever this might be required in the future.
-        hr->rem_set()->reset_for_par_iteration();
         hr->reset_bot();
 
         size_t live_bytes = remove_self_forward_ptr_by_walking_hr(hr, during_initial_mark);
--- a/hotspot/src/share/vm/gc/g1/g1EvacStats.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1EvacStats.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "memory/allocation.inline.hpp"
+#include "gc/g1/g1_globals.hpp"
 #include "gc/g1/g1EvacStats.hpp"
 #include "gc/shared/gcId.hpp"
 #include "logging/log.hpp"
--- a/hotspot/src/share/vm/gc/g1/g1HeapTransition.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1HeapTransition.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -24,8 +24,8 @@
 
 #include "precompiled.hpp"
 #include "gc/g1/g1CollectedHeap.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/g1/g1HeapTransition.hpp"
+#include "gc/g1/g1Policy.hpp"
 #include "logging/log.hpp"
 #include "memory/metaspace.hpp"
 
--- a/hotspot/src/share/vm/gc/g1/g1HeapVerifier.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1HeapVerifier.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -29,6 +29,7 @@
 #include "gc/g1/g1CollectedHeap.inline.hpp"
 #include "gc/g1/g1HeapVerifier.hpp"
 #include "gc/g1/g1MarkSweep.hpp"
+#include "gc/g1/g1Policy.hpp"
 #include "gc/g1/g1RemSet.hpp"
 #include "gc/g1/g1RootProcessor.hpp"
 #include "gc/g1/heapRegion.hpp"
--- a/hotspot/src/share/vm/gc/g1/g1MonitoringSupport.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1MonitoringSupport.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -24,8 +24,8 @@
 
 #include "precompiled.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/g1/g1MonitoringSupport.hpp"
+#include "gc/g1/g1Policy.hpp"
 
 G1GenerationCounters::G1GenerationCounters(G1MonitoringSupport* g1mm,
                                            const char* name,
--- a/hotspot/src/share/vm/gc/g1/g1ParScanThreadState.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1ParScanThreadState.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -27,8 +27,8 @@
 
 #include "gc/g1/dirtyCardQueue.hpp"
 #include "gc/g1/g1CollectedHeap.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/g1/g1OopClosures.hpp"
+#include "gc/g1/g1Policy.hpp"
 #include "gc/g1/g1RemSet.hpp"
 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
 #include "gc/shared/ageTable.hpp"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/g1/g1Policy.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2016, 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_GC_G1_G1POLICY_HPP
+#define SHARE_VM_GC_G1_G1POLICY_HPP
+
+#include "gc/g1/g1CollectorState.hpp"
+#include "gc/g1/g1GCPhaseTimes.hpp"
+#include "gc/g1/g1InCSetState.hpp"
+#include "gc/g1/g1InitialMarkToMixedTimeTracker.hpp"
+#include "gc/g1/g1MMUTracker.hpp"
+#include "gc/g1/g1Predictions.hpp"
+#include "gc/g1/g1YoungGenSizer.hpp"
+#include "gc/shared/gcCause.hpp"
+#include "utilities/pair.hpp"
+
+// A G1Policy makes policy decisions that determine the
+// characteristics of the collector.  Examples include:
+//   * choice of collection set.
+//   * when to collect.
+
+class HeapRegion;
+class G1CollectionSet;
+class CollectionSetChooser;
+class G1IHOPControl;
+class G1Analytics;
+class G1YoungGenSizer;
+
+class G1Policy: public CHeapObj<mtGC> {
+public:
+  virtual const G1Predictions& predictor() const = 0;
+  virtual const G1Analytics* analytics()   const = 0;
+
+  // Add the given number of bytes to the total number of allocated bytes in the old gen.
+  virtual void add_bytes_allocated_in_old_since_last_gc(size_t bytes) = 0;
+
+  // Accessors
+
+  virtual void set_region_eden(HeapRegion* hr, int young_index_in_cset) = 0;
+  virtual void set_region_survivor(HeapRegion* hr, int young_index_in_cset) = 0;
+
+  virtual void record_max_rs_lengths(size_t rs_lengths) = 0;
+
+  virtual double predict_base_elapsed_time_ms(size_t pending_cards) const = 0;
+  virtual double predict_base_elapsed_time_ms(size_t pending_cards,
+                                              size_t scanned_cards) const = 0;
+
+  virtual double predict_region_elapsed_time_ms(HeapRegion* hr, bool for_young_gc) const = 0;
+
+  virtual void cset_regions_freed() = 0;
+
+  virtual G1MMUTracker* mmu_tracker() = 0;
+
+  virtual const G1MMUTracker* mmu_tracker() const = 0;
+
+  virtual double max_pause_time_ms() const = 0;
+
+  virtual size_t pending_cards() const = 0;
+
+  // Calculate the minimum number of old regions we'll add to the CSet
+  // during a mixed GC.
+  virtual uint calc_min_old_cset_length() const = 0;
+
+  // Calculate the maximum number of old regions we'll add to the CSet
+  // during a mixed GC.
+  virtual uint calc_max_old_cset_length() const = 0;
+
+  // Returns the given amount of uncollected reclaimable space
+  // as a percentage of the current heap capacity.
+  virtual double reclaimable_bytes_perc(size_t reclaimable_bytes) const = 0;
+
+  virtual ~G1Policy() {}
+
+  virtual G1CollectorState* collector_state() const = 0;
+
+  virtual G1GCPhaseTimes* phase_times() const = 0;
+
+  // Check the current value of the young list RSet lengths and
+  // compare it against the last prediction. If the current value is
+  // higher, recalculate the young list target length prediction.
+  virtual void revise_young_list_target_length_if_necessary(size_t rs_lengths) = 0;
+
+  // This should be called after the heap is resized.
+  virtual void record_new_heap_size(uint new_number_of_regions) = 0;
+
+  virtual void init(G1CollectedHeap* g1h, G1CollectionSet* collection_set) = 0;
+
+  virtual void note_gc_start() = 0;
+
+  virtual bool need_to_start_conc_mark(const char* source, size_t alloc_word_size = 0) = 0;
+
+  // Record the start and end of an evacuation pause.
+  virtual void record_collection_pause_start(double start_time_sec) = 0;
+  virtual void record_collection_pause_end(double pause_time_ms, size_t cards_scanned, size_t heap_used_bytes_before_gc) = 0;
+
+  // Record the start and end of a full collection.
+  virtual void record_full_collection_start() = 0;
+  virtual void record_full_collection_end() = 0;
+
+  // Must currently be called while the world is stopped.
+  virtual void record_concurrent_mark_init_end(double mark_init_elapsed_time_ms) = 0;
+
+  // Record start and end of remark.
+  virtual void record_concurrent_mark_remark_start() = 0;
+  virtual void record_concurrent_mark_remark_end() = 0;
+
+  // Record start, end, and completion of cleanup.
+  virtual void record_concurrent_mark_cleanup_start() = 0;
+  virtual void record_concurrent_mark_cleanup_end() = 0;
+  virtual void record_concurrent_mark_cleanup_completed() = 0;
+
+  virtual void print_phases() = 0;
+
+  // Record how much space we copied during a GC. This is typically
+  // called when a GC alloc region is being retired.
+  virtual void record_bytes_copied_during_gc(size_t bytes) = 0;
+
+  // The amount of space we copied during a GC.
+  virtual size_t bytes_copied_during_gc() const = 0;
+
+  virtual void finalize_collection_set(double target_pause_time_ms) = 0;
+
+  // This sets the initiate_conc_mark_if_possible() flag to start a
+  // new cycle, as long as we are not already in one. It's best if it
+  // is called during a safepoint when the test whether a cycle is in
+  // progress or not is stable.
+  virtual bool force_initial_mark_if_outside_cycle(GCCause::Cause gc_cause) = 0;
+
+  // This is called at the very beginning of an evacuation pause (it
+  // has to be the first thing that the pause does). If
+  // initiate_conc_mark_if_possible() is true, and the concurrent
+  // marking thread has completed its work during the previous cycle,
+  // it will set during_initial_mark_pause() to so that the pause does
+  // the initial-mark work and start a marking cycle.
+  virtual void decide_on_conc_mark_initiation() = 0;
+
+  // Print stats on young survival ratio
+  virtual void print_yg_surv_rate_info() const = 0;
+
+  virtual void finished_recalculating_age_indexes(bool is_survivors) = 0;
+
+  virtual size_t young_list_target_length() const = 0;
+
+  virtual bool is_young_list_full() const = 0;
+
+  virtual bool can_expand_young_list() const = 0;
+
+  virtual uint young_list_max_length() const = 0;
+
+  virtual bool adaptive_young_list_length() const = 0;
+
+  virtual bool should_process_references() const = 0;
+
+  virtual uint tenuring_threshold() const = 0;
+  virtual uint max_survivor_regions() = 0;
+
+  virtual void note_start_adding_survivor_regions() = 0;
+
+  virtual void note_stop_adding_survivor_regions() = 0;
+
+  virtual void record_age_table(AgeTable* age_table) = 0;
+};
+
+#endif // SHARE_VM_GC_G1_G1POLICY_HPP
--- a/hotspot/src/share/vm/gc/g1/g1RemSet.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1RemSet.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -28,7 +28,6 @@
 #include "gc/g1/dirtyCardQueue.hpp"
 #include "gc/g1/g1BlockOffsetTable.inline.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/g1/g1FromCardCache.hpp"
 #include "gc/g1/g1GCPhaseTimes.hpp"
 #include "gc/g1/g1HotCardCache.hpp"
@@ -46,20 +45,108 @@
 #include "utilities/intHisto.hpp"
 #include "utilities/stack.inline.hpp"
 
+// Collects information about the overall remembered set scan progress during an evacuation.
+class G1RemSetScanState : public CHeapObj<mtGC> {
+private:
+  size_t _max_regions;
+
+  // Scan progress for the remembered set of a single region. Transitions from
+  // Unclaimed -> Claimed -> Complete.
+  // At each of the transitions the thread that does the transition needs to perform
+  // some special action once. This is the reason for the extra "Claimed" state.
+  typedef jint G1RemsetIterState;
+
+  static const G1RemsetIterState Unclaimed = 0; // The remembered set has not been scanned yet.
+  static const G1RemsetIterState Claimed = 1;   // The remembered set is currently being scanned.
+  static const G1RemsetIterState Complete = 2;  // The remembered set has been completely scanned.
+
+  G1RemsetIterState volatile* _iter_states;
+  // The current location where the next thread should continue scanning in a region's
+  // remembered set.
+  size_t volatile* _iter_claims;
+
+public:
+  G1RemSetScanState() :
+    _max_regions(0),
+    _iter_states(NULL),
+    _iter_claims(NULL) {
+
+  }
+
+  ~G1RemSetScanState() {
+    if (_iter_states != NULL) {
+      FREE_C_HEAP_ARRAY(G1RemsetIterState, _iter_states);
+    }
+    if (_iter_claims != NULL) {
+      FREE_C_HEAP_ARRAY(size_t, _iter_claims);
+    }
+  }
+
+  void initialize(uint max_regions) {
+    assert(_iter_states == NULL, "Must not be initialized twice");
+    assert(_iter_claims == NULL, "Must not be initialized twice");
+    _max_regions = max_regions;
+    _iter_states = NEW_C_HEAP_ARRAY(G1RemsetIterState, max_regions, mtGC);
+    _iter_claims = NEW_C_HEAP_ARRAY(size_t, max_regions, mtGC);
+  }
+
+  void reset() {
+    for (uint i = 0; i < _max_regions; i++) {
+      _iter_states[i] = Unclaimed;
+    }
+    memset((void*)_iter_claims, 0, _max_regions * sizeof(size_t));
+  }
+
+  // Attempt to claim the remembered set of the region for iteration. Returns true
+  // if this call caused the transition from Unclaimed to Claimed.
+  inline bool claim_iter(uint region) {
+    assert(region < _max_regions, "Tried to access invalid region %u", region);
+    if (_iter_states[region] != Unclaimed) {
+      return false;
+    }
+    jint res = Atomic::cmpxchg(Claimed, (jint*)(&_iter_states[region]), Unclaimed);
+    return (res == Unclaimed);
+  }
+
+  // Try to atomically sets the iteration state to "complete". Returns true for the
+  // thread that caused the transition.
+  inline bool set_iter_complete(uint region) {
+    if (iter_is_complete(region)) {
+      return false;
+    }
+    jint res = Atomic::cmpxchg(Complete, (jint*)(&_iter_states[region]), Claimed);
+    return (res == Claimed);
+  }
+
+  // Returns true if the region's iteration is complete.
+  inline bool iter_is_complete(uint region) const {
+    assert(region < _max_regions, "Tried to access invalid region %u", region);
+    return _iter_states[region] == Complete;
+  }
+
+  // The current position within the remembered set of the given region.
+  inline size_t iter_claimed(uint region) const {
+    assert(region < _max_regions, "Tried to access invalid region %u", region);
+    return _iter_claims[region];
+  }
+
+  // Claim the next block of cards within the remembered set of the region with
+  // step size.
+  inline size_t iter_claimed_next(uint region, size_t step) {
+    return Atomic::add(step, &_iter_claims[region]) - step;
+  }
+};
+
 G1RemSet::G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs) :
   _g1(g1),
+  _scan_state(new G1RemSetScanState()),
   _conc_refine_cards(0),
   _ct_bs(ct_bs),
   _g1p(_g1->g1_policy()),
   _cg1r(g1->concurrent_g1_refine()),
-  _cset_rs_update_cl(NULL),
   _prev_period_summary(),
   _into_cset_dirty_card_queue_set(false)
 {
-  _cset_rs_update_cl = NEW_C_HEAP_ARRAY(G1ParPushHeapRSClosure*, n_workers(), mtGC);
-  for (uint i = 0; i < n_workers(); i++) {
-    _cset_rs_update_cl[i] = NULL;
-  }
   if (log_is_enabled(Trace, gc, remset)) {
     _prev_period_summary.initialize(this);
   }
@@ -75,10 +162,9 @@
 }
 
 G1RemSet::~G1RemSet() {
-  for (uint i = 0; i < n_workers(); i++) {
-    assert(_cset_rs_update_cl[i] == NULL, "it should be");
+  if (_scan_state != NULL) {
+    delete _scan_state;
   }
-  FREE_C_HEAP_ARRAY(G1ParPushHeapRSClosure*, _cset_rs_update_cl);
 }
 
 uint G1RemSet::num_par_rem_sets() {
@@ -87,6 +173,7 @@
 
 void G1RemSet::initialize(size_t capacity, uint max_regions) {
   G1FromCardCache::initialize(num_par_rem_sets(), max_regions);
+  _scan_state->initialize(max_regions);
   {
     GCTraceTime(Debug, gc, marking)("Initialize Card Live Data");
     _card_live_data.initialize(capacity, max_regions);
@@ -97,29 +184,29 @@
   }
 }
 
-ScanRSClosure::ScanRSClosure(G1ParPushHeapRSClosure* oc,
-                             CodeBlobClosure* code_root_cl,
-                             uint worker_i) :
-  _oc(oc),
+G1ScanRSClosure::G1ScanRSClosure(G1RemSetScanState* scan_state,
+                                 G1ParPushHeapRSClosure* push_heap_cl,
+                                 CodeBlobClosure* code_root_cl,
+                                 uint worker_i) :
+  _scan_state(scan_state),
+  _push_heap_cl(push_heap_cl),
   _code_root_cl(code_root_cl),
   _strong_code_root_scan_time_sec(0.0),
   _cards(0),
   _cards_done(0),
-  _worker_i(worker_i),
-  _try_claimed(false) {
+  _worker_i(worker_i) {
   _g1h = G1CollectedHeap::heap();
   _bot = _g1h->bot();
   _ct_bs = _g1h->g1_barrier_set();
   _block_size = MAX2<size_t>(G1RSetScanBlockSize, 1);
 }
 
-void ScanRSClosure::scanCard(size_t index, HeapRegion *r) {
+void G1ScanRSClosure::scan_card(size_t index, HeapRegion *r) {
   // Stack allocate the DirtyCardToOopClosure instance
-  HeapRegionDCTOC cl(_g1h, r, _oc,
-      CardTableModRefBS::Precise);
+  HeapRegionDCTOC cl(_g1h, r, _push_heap_cl, CardTableModRefBS::Precise);
 
   // Set the "from" region in the closure.
-  _oc->set_region(r);
+  _push_heap_cl->set_region(r);
   MemRegion card_region(_bot->address_for_index(index), BOTConstants::N_words);
   MemRegion pre_gc_allocated(r->bottom(), r->scan_top());
   MemRegion mr = pre_gc_allocated.intersection(card_region);
@@ -133,37 +220,39 @@
   }
 }
 
-void ScanRSClosure::scan_strong_code_roots(HeapRegion* r) {
+void G1ScanRSClosure::scan_strong_code_roots(HeapRegion* r) {
   double scan_start = os::elapsedTime();
   r->strong_code_roots_do(_code_root_cl);
   _strong_code_root_scan_time_sec += (os::elapsedTime() - scan_start);
 }
 
-bool ScanRSClosure::doHeapRegion(HeapRegion* r) {
+bool G1ScanRSClosure::doHeapRegion(HeapRegion* r) {
   assert(r->in_collection_set(), "should only be called on elements of CS.");
-  HeapRegionRemSet* hrrs = r->rem_set();
-  if (hrrs->iter_is_complete()) return false; // All done.
-  if (!_try_claimed && !hrrs->claim_iter()) return false;
-  // If we ever free the collection set concurrently, we should also
-  // clear the card table concurrently therefore we won't need to
-  // add regions of the collection set to the dirty cards region.
-  _g1h->push_dirty_cards_region(r);
-  // If we didn't return above, then
-  //   _try_claimed || r->claim_iter()
-  // is true: either we're supposed to work on claimed-but-not-complete
-  // regions, or we successfully claimed the region.
+  uint region_idx = r->hrm_index();
 
-  HeapRegionRemSetIterator iter(hrrs);
+  if (_scan_state->iter_is_complete(region_idx)) {
+    return false;
+  }
+  if (_scan_state->claim_iter(region_idx)) {
+    // If we ever free the collection set concurrently, we should also
+    // clear the card table concurrently therefore we won't need to
+    // add regions of the collection set to the dirty cards region.
+    _g1h->push_dirty_cards_region(r);
+  }
+
+  HeapRegionRemSetIterator iter(r->rem_set());
   size_t card_index;
 
   // We claim cards in block so as to reduce the contention. The block size is determined by
   // the G1RSetScanBlockSize parameter.
-  size_t jump_to_card = hrrs->iter_claimed_next(_block_size);
+  size_t claimed_card_block = _scan_state->iter_claimed_next(region_idx, _block_size);
   for (size_t current_card = 0; iter.has_next(card_index); current_card++) {
-    if (current_card >= jump_to_card + _block_size) {
-      jump_to_card = hrrs->iter_claimed_next(_block_size);
+    if (current_card >= claimed_card_block + _block_size) {
+      claimed_card_block = _scan_state->iter_claimed_next(region_idx, _block_size);
     }
-    if (current_card < jump_to_card) continue;
+    if (current_card < claimed_card_block) {
+      continue;
+    }
     HeapWord* card_start = _g1h->bot()->address_for_index(card_index);
 
     HeapRegion* card_region = _g1h->heap_region_containing(card_start);
@@ -176,38 +265,33 @@
     // If the card is dirty, then we will scan it during updateRS.
     if (!card_region->in_collection_set() &&
         !_ct_bs->is_card_dirty(card_index)) {
-      scanCard(card_index, card_region);
+      scan_card(card_index, card_region);
     }
   }
-  if (!_try_claimed) {
+  if (_scan_state->set_iter_complete(region_idx)) {
     // Scan the strong code root list attached to the current region
     scan_strong_code_roots(r);
-
-    hrrs->set_iter_complete();
   }
   return false;
 }
 
-size_t G1RemSet::scanRS(G1ParPushHeapRSClosure* oc,
-                        CodeBlobClosure* heap_region_codeblobs,
-                        uint worker_i) {
+size_t G1RemSet::scan_rem_set(G1ParPushHeapRSClosure* oops_in_heap_closure,
+                              CodeBlobClosure* heap_region_codeblobs,
+                              uint worker_i) {
   double rs_time_start = os::elapsedTime();
 
   HeapRegion *startRegion = _g1->start_cset_region_for_worker(worker_i);
 
-  ScanRSClosure scanRScl(oc, heap_region_codeblobs, worker_i);
+  G1ScanRSClosure cl(_scan_state, oops_in_heap_closure, heap_region_codeblobs, worker_i);
+  _g1->collection_set_iterate_from(startRegion, &cl);
 
-  _g1->collection_set_iterate_from(startRegion, &scanRScl);
-  scanRScl.set_try_claimed();
-  _g1->collection_set_iterate_from(startRegion, &scanRScl);
-
-  double scan_rs_time_sec = (os::elapsedTime() - rs_time_start)
-                            - scanRScl.strong_code_root_scan_time_sec();
+   double scan_rs_time_sec = (os::elapsedTime() - rs_time_start) -
+                              cl.strong_code_root_scan_time_sec();
 
   _g1p->phase_times()->record_time_secs(G1GCPhaseTimes::ScanRS, worker_i, scan_rs_time_sec);
-  _g1p->phase_times()->record_time_secs(G1GCPhaseTimes::CodeRoots, worker_i, scanRScl.strong_code_root_scan_time_sec());
+  _g1p->phase_times()->record_time_secs(G1GCPhaseTimes::CodeRoots, worker_i, cl.strong_code_root_scan_time_sec());
 
-  return scanRScl.cards_done();
+  return cl.cards_done();
 }
 
 // Closure used for updating RSets and recording references that
@@ -217,10 +301,12 @@
 class RefineRecordRefsIntoCSCardTableEntryClosure: public CardTableEntryClosure {
   G1RemSet* _g1rs;
   DirtyCardQueue* _into_cset_dcq;
+  G1ParPushHeapRSClosure* _cl;
 public:
   RefineRecordRefsIntoCSCardTableEntryClosure(G1CollectedHeap* g1h,
-                                              DirtyCardQueue* into_cset_dcq) :
-    _g1rs(g1h->g1_rem_set()), _into_cset_dcq(into_cset_dcq)
+                                              DirtyCardQueue* into_cset_dcq,
+                                              G1ParPushHeapRSClosure* cl) :
+    _g1rs(g1h->g1_rem_set()), _into_cset_dcq(into_cset_dcq), _cl(cl)
   {}
 
   bool do_card_ptr(jbyte* card_ptr, uint worker_i) {
@@ -231,7 +317,7 @@
     assert(SafepointSynchronize::is_at_safepoint(), "not during an evacuation pause");
     assert(worker_i < ParallelGCThreads, "should be a GC worker");
 
-    if (_g1rs->refine_card(card_ptr, worker_i, true)) {
+    if (_g1rs->refine_card(card_ptr, worker_i, _cl)) {
       // 'card_ptr' contains references that point into the collection
       // set. We need to record the card in the DCQS
       // (_into_cset_dirty_card_queue_set)
@@ -244,8 +330,10 @@
   }
 };
 
-void G1RemSet::updateRS(DirtyCardQueue* into_cset_dcq, uint worker_i) {
-  RefineRecordRefsIntoCSCardTableEntryClosure into_cset_update_rs_cl(_g1, into_cset_dcq);
+void G1RemSet::update_rem_set(DirtyCardQueue* into_cset_dcq,
+                              G1ParPushHeapRSClosure* oops_in_heap_closure,
+                              uint worker_i) {
+  RefineRecordRefsIntoCSCardTableEntryClosure into_cset_update_rs_cl(_g1, into_cset_dcq, oops_in_heap_closure);
 
   G1GCParPhaseTimesTracker x(_g1p->phase_times(), G1GCPhaseTimes::UpdateRS, worker_i);
   if (ConcurrentG1Refine::hot_card_cache_enabled()) {
@@ -261,14 +349,9 @@
   HeapRegionRemSet::cleanup();
 }
 
-size_t G1RemSet::oops_into_collection_set_do(G1ParPushHeapRSClosure* oc,
+size_t G1RemSet::oops_into_collection_set_do(G1ParPushHeapRSClosure* cl,
                                              CodeBlobClosure* heap_region_codeblobs,
                                              uint worker_i) {
-  // We cache the value of 'oc' closure into the appropriate slot in the
-  // _cset_rs_update_cl for this worker
-  assert(worker_i < n_workers(), "sanity");
-  _cset_rs_update_cl[worker_i] = oc;
-
   // A DirtyCardQueue that is used to hold cards containing references
   // that point into the collection set. This DCQ is associated with a
   // special DirtyCardQueueSet (see g1CollectedHeap.hpp).  Under normal
@@ -280,18 +363,16 @@
   // DirtyCardQueueSet that is used to manage RSet updates
   DirtyCardQueue into_cset_dcq(&_into_cset_dirty_card_queue_set);
 
-  updateRS(&into_cset_dcq, worker_i);
-  size_t cards_scanned = scanRS(oc, heap_region_codeblobs, worker_i);
-
-  // We now clear the cached values of _cset_rs_update_cl for this worker
-  _cset_rs_update_cl[worker_i] = NULL;
-  return cards_scanned;
+  update_rem_set(&into_cset_dcq, cl, worker_i);
+  return scan_rem_set(cl, heap_region_codeblobs, worker_i);;
 }
 
 void G1RemSet::prepare_for_oops_into_collection_set_do() {
   _g1->set_refine_cte_cl_concurrency(false);
   DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
   dcqs.concatenate_logs();
+
+  _scan_state->reset();
 }
 
 void G1RemSet::cleanup_after_oops_into_collection_set_do() {
@@ -366,8 +447,9 @@
 // into the collection set, if we're checking for such references;
 // false otherwise.
 
-bool G1RemSet::refine_card(jbyte* card_ptr, uint worker_i,
-                           bool check_for_refs_into_cset) {
+bool G1RemSet::refine_card(jbyte* card_ptr,
+                           uint worker_i,
+                           G1ParPushHeapRSClosure*  oops_in_heap_closure) {
   assert(_g1->is_in_exact(_ct_bs->addr_for(card_ptr)),
          "Card at " PTR_FORMAT " index " SIZE_FORMAT " representing heap at " PTR_FORMAT " (%u) must be in committed heap",
          p2i(card_ptr),
@@ -375,6 +457,8 @@
          p2i(_ct_bs->addr_for(card_ptr)),
          _g1->addr_to_region(_ct_bs->addr_for(card_ptr)));
 
+  bool check_for_refs_into_cset = oops_in_heap_closure != NULL;
+
   // If the card is no longer dirty, nothing to do.
   if (*card_ptr != CardTableModRefBS::dirty_card_val()) {
     // No need to return that this card contains refs that point
@@ -451,15 +535,6 @@
   HeapWord* end   = start + CardTableModRefBS::card_size_in_words;
   MemRegion dirtyRegion(start, end);
 
-  G1ParPushHeapRSClosure* oops_in_heap_closure = NULL;
-  if (check_for_refs_into_cset) {
-    // ConcurrentG1RefineThreads have worker numbers larger than what
-    // _cset_rs_update_cl[] is set up to handle. But those threads should
-    // only be active outside of a collection which means that when they
-    // reach here they should have check_for_refs_into_cset == false.
-    assert((size_t)worker_i < n_workers(), "index of worker larger than _cset_rs_update_cl[].length");
-    oops_in_heap_closure = _cset_rs_update_cl[worker_i];
-  }
   G1UpdateRSOrPushRefOopClosure update_rs_oop_cl(_g1,
                                                  _g1->g1_rem_set(),
                                                  oops_in_heap_closure,
@@ -579,7 +654,7 @@
     hot_card_cache->set_use_cache(false);
 
     DirtyCardQueue into_cset_dcq(&_into_cset_dirty_card_queue_set);
-    updateRS(&into_cset_dcq, 0);
+    update_rem_set(&into_cset_dcq, NULL, 0);
     _into_cset_dirty_card_queue_set.clear();
 
     hot_card_cache->set_use_cache(use_hot_card_cache);
--- a/hotspot/src/share/vm/gc/g1/g1RemSet.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1RemSet.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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
@@ -41,8 +41,9 @@
 class ConcurrentG1Refine;
 class CodeBlobClosure;
 class G1CollectedHeap;
-class G1CollectorPolicy;
 class G1ParPushHeapRSClosure;
+class G1RemSetScanState;
+class G1Policy;
 class G1SATBCardTableModRefBS;
 class HeapRegionClaimer;
 
@@ -51,6 +52,7 @@
 // so that they can be used to update the individual region remsets.
 class G1RemSet: public CHeapObj<mtGC> {
 private:
+  G1RemSetScanState* _scan_state;
   G1CardLiveData _card_live_data;
 
   G1RemSetSummary _prev_period_summary;
@@ -68,14 +70,10 @@
 
 protected:
   CardTableModRefBS*     _ct_bs;
-  G1CollectorPolicy*     _g1p;
+  G1Policy*              _g1p;
 
   ConcurrentG1Refine*    _cg1r;
 
-  // Used for caching the closure that is responsible for scanning
-  // references into the collection set.
-  G1ParPushHeapRSClosure** _cset_rs_update_cl;
-
 public:
   // Gives an approximation on how many threads can be expected to add records to
   // a remembered set in parallel. This can be used for sizing data structures to
@@ -95,9 +93,9 @@
   G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs);
   ~G1RemSet();
 
-  // Invoke "blk->do_oop" on all pointers into the collection set
+  // Invoke "cl->do_oop" on all pointers into the collection set
   // from objects in regions outside the collection set (having
-  // invoked "blk->set_region" to set the "from" region correctly
+  // invoked "cl->set_region" to set the "from" region correctly
   // beforehand.)
   //
   // Apply non_heap_roots on the oops of the unmarked nmethods
@@ -112,7 +110,7 @@
   //
   // Returns the number of cards scanned while looking for pointers
   // into the collection set.
-  size_t oops_into_collection_set_do(G1ParPushHeapRSClosure* blk,
+  size_t oops_into_collection_set_do(G1ParPushHeapRSClosure* cl,
                                      CodeBlobClosure* heap_region_codeblobs,
                                      uint worker_i);
 
@@ -124,13 +122,15 @@
   void prepare_for_oops_into_collection_set_do();
   void cleanup_after_oops_into_collection_set_do();
 
-  size_t scanRS(G1ParPushHeapRSClosure* oc,
-                CodeBlobClosure* heap_region_codeblobs,
-                uint worker_i);
+  size_t scan_rem_set(G1ParPushHeapRSClosure* oops_in_heap_closure,
+                      CodeBlobClosure* heap_region_codeblobs,
+                      uint worker_i);
 
-  void updateRS(DirtyCardQueue* into_cset_dcq, uint worker_i);
+  G1RemSetScanState* scan_state() const { return _scan_state; }
 
-  CardTableModRefBS* ct_bs() { return _ct_bs; }
+  // Flush remaining refinement buffers into the remembered set,
+  // applying oops_in_heap_closure on the references found.
+  void update_rem_set(DirtyCardQueue* into_cset_dcq, G1ParPushHeapRSClosure* oops_in_heap_closure, uint worker_i);
 
   // Record, if necessary, the fact that *p (where "p" is in region "from",
   // which is required to be non-NULL) has changed to a new non-NULL value.
@@ -145,12 +145,12 @@
   void scrub(uint worker_num, HeapRegionClaimer* hrclaimer);
 
   // Refine the card corresponding to "card_ptr".
-  // If check_for_refs_into_cset is true, a true result is returned
+  // If oops_in_heap_closure is not NULL, a true result is returned
   // if the given card contains oops that have references into the
   // current collection set.
   virtual bool refine_card(jbyte* card_ptr,
                            uint worker_i,
-                           bool check_for_refs_into_cset);
+                           G1ParPushHeapRSClosure* oops_in_heap_closure);
 
   // Print accumulated summary info from the start of the VM.
   virtual void print_summary_info();
@@ -179,11 +179,14 @@
 #endif
 };
 
-class ScanRSClosure : public HeapRegionClosure {
-  size_t _cards_done, _cards;
+class G1ScanRSClosure : public HeapRegionClosure {
+  G1RemSetScanState* _scan_state;
+
+  size_t _cards_done;
+  size_t _cards;
   G1CollectedHeap* _g1h;
 
-  G1ParPushHeapRSClosure* _oc;
+  G1ParPushHeapRSClosure* _push_heap_cl;
   CodeBlobClosure* _code_root_cl;
 
   G1BlockOffsetTable* _bot;
@@ -192,26 +195,23 @@
   double _strong_code_root_scan_time_sec;
   uint   _worker_i;
   size_t _block_size;
-  bool   _try_claimed;
 
+  void scan_card(size_t index, HeapRegion *r);
+  void scan_strong_code_roots(HeapRegion* r);
 public:
-  ScanRSClosure(G1ParPushHeapRSClosure* oc,
-                CodeBlobClosure* code_root_cl,
-                uint worker_i);
+  G1ScanRSClosure(G1RemSetScanState* scan_state,
+                  G1ParPushHeapRSClosure* push_heap_cl,
+                  CodeBlobClosure* code_root_cl,
+                  uint worker_i);
 
   bool doHeapRegion(HeapRegion* r);
 
   double strong_code_root_scan_time_sec() {
     return _strong_code_root_scan_time_sec;
   }
+
   size_t cards_done() { return _cards_done;}
   size_t cards_looked_up() { return _cards;}
-  void set_try_claimed() { _try_claimed = true; }
-private:
-  void scanCard(size_t index, HeapRegion *r);
-  void printCard(HeapRegion* card_region, size_t card_index,
-                 HeapWord* card_start);
-  void scan_strong_code_roots(HeapRegion* r);
 };
 
 class UpdateRSOopClosure: public ExtendedOopClosure {
--- a/hotspot/src/share/vm/gc/g1/g1RootClosures.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1RootClosures.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, 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
@@ -42,7 +42,6 @@
 
   CLDClosure* weak_clds()             { return &_closures._clds; }
   CLDClosure* strong_clds()           { return &_closures._clds; }
-  CLDClosure* thread_root_clds()      { return NULL; }
   CLDClosure* second_pass_weak_clds() { return NULL; }
 
   CodeBlobClosure* strong_codeblobs()      { return &_closures._codeblobs; }
@@ -89,7 +88,6 @@
 
   // If MarkWeak is G1MarkFromRoot then all CLDs are processed by the weak and strong variants
   // return a NULL closure for the following specialized versions in that case.
-  CLDClosure* thread_root_clds()      { return null_if<G1MarkFromRoot>(&_strong._clds); }
   CLDClosure* second_pass_weak_clds() { return null_if<G1MarkFromRoot>(&_weak._clds); }
 
   CodeBlobClosure* strong_codeblobs()      { return &_strong._codeblobs; }
--- a/hotspot/src/share/vm/gc/g1/g1RootClosures.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1RootClosures.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, 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
@@ -41,9 +41,6 @@
   virtual CLDClosure* weak_clds() = 0;
   virtual CLDClosure* strong_clds() = 0;
 
-  // Applied to the CLDs reachable from the thread stacks.
-  virtual CLDClosure* thread_root_clds() = 0;
-
   // Applied to code blobs reachable as strong roots.
   virtual CodeBlobClosure* strong_codeblobs() = 0;
 };
--- a/hotspot/src/share/vm/gc/g1/g1RootProcessor.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1RootProcessor.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, 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,9 +30,9 @@
 #include "gc/g1/bufferingOopClosure.hpp"
 #include "gc/g1/g1CodeBlobClosure.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/g1/g1CollectorState.hpp"
 #include "gc/g1/g1GCPhaseTimes.hpp"
+#include "gc/g1/g1Policy.hpp"
 #include "gc/g1/g1RootClosures.hpp"
 #include "gc/g1/g1RootProcessor.hpp"
 #include "gc/g1/heapRegion.inline.hpp"
@@ -152,7 +152,6 @@
 
   CLDClosure* weak_clds()        { return NULL; }
   CLDClosure* strong_clds()      { return _clds; }
-  CLDClosure* thread_root_clds() { return _clds; }
 
   CodeBlobClosure* strong_codeblobs() { return _blobs; }
 };
@@ -184,9 +183,6 @@
   // system.
   CLDClosure* weak_clds() { return _clds; }
   CLDClosure* strong_clds() { return _clds; }
-  // We don't want to visit CLDs more than once, so we return NULL for the
-  // thread root CLDs.
-  CLDClosure* thread_root_clds() { return NULL; }
 
   // We don't want to visit code blobs more than once, so we return NULL for the
   // strong case and walk the entire code cache as a separate step.
@@ -211,7 +207,6 @@
 void G1RootProcessor::process_java_roots(G1RootClosures* closures,
                                          G1GCPhaseTimes* phase_times,
                                          uint worker_i) {
-  assert(closures->thread_root_clds() == NULL || closures->weak_clds() == NULL, "There is overlap between those, only one may be set");
   // Iterating over the CLDG and the Threads are done early to allow us to
   // first process the strong CLDs and nmethods and then, after a barrier,
   // let the thread process the weak CLDs and nmethods.
@@ -227,7 +222,6 @@
     bool is_par = n_workers() > 1;
     Threads::possibly_parallel_oops_do(is_par,
                                        closures->strong_oops(),
-                                       closures->thread_root_clds(),
                                        closures->strong_codeblobs());
   }
 }
--- a/hotspot/src/share/vm/gc/g1/g1YoungGenSizer.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1YoungGenSizer.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -108,13 +108,18 @@
   assert(*min_young_length <= *max_young_length, "Invalid min/max young gen size values");
 }
 
-uint G1YoungGenSizer::max_young_length(uint number_of_heap_regions) {
+void G1YoungGenSizer::adjust_max_new_size(uint number_of_heap_regions) {
+
   // We need to pass the desired values because recalculation may not update these
   // values in some cases.
   uint temp = _min_desired_young_length;
   uint result = _max_desired_young_length;
   recalculate_min_max_young_length(number_of_heap_regions, &temp, &result);
-  return result;
+
+  size_t max_young_size = result * HeapRegion::GrainBytes;
+  if (max_young_size != MaxNewSize) {
+    FLAG_SET_ERGO(size_t, MaxNewSize, max_young_size);
+  }
 }
 
 void G1YoungGenSizer::heap_size_changed(uint new_number_of_heap_regions) {
--- a/hotspot/src/share/vm/gc/g1/g1YoungGenSizer.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1YoungGenSizer.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -22,6 +22,9 @@
  *
  */
 
+#ifndef SHARE_VM_GC_G1_G1YOUNGGENSIZER_HPP
+#define SHARE_VM_GC_G1_G1YOUNGGENSIZER_HPP
+
 #include "memory/allocation.hpp"
 
 // There are three command line options related to the young gen size:
@@ -60,7 +63,7 @@
 //
 // NewSize and MaxNewSize override NewRatio. So, NewRatio is ignored if it is
 // combined with either NewSize or MaxNewSize. (A warning message is printed.)
-class G1YoungGenSizer : public CHeapObj<mtGC> {
+class G1YoungGenSizer VALUE_OBJ_CLASS_SPEC {
 private:
   enum SizerKind {
     SizerDefaults,
@@ -84,13 +87,13 @@
   G1YoungGenSizer();
   // Calculate the maximum length of the young gen given the number of regions
   // depending on the sizing algorithm.
-  uint max_young_length(uint number_of_heap_regions);
+  void adjust_max_new_size(uint number_of_heap_regions);
 
   void heap_size_changed(uint new_number_of_heap_regions);
-  uint min_desired_young_length() {
+  uint min_desired_young_length() const {
     return _min_desired_young_length;
   }
-  uint max_desired_young_length() {
+  uint max_desired_young_length() const {
     return _max_desired_young_length;
   }
 
@@ -99,3 +102,4 @@
   }
 };
 
+#endif // SHARE_VM_GC_G1_G1YOUNGGENSIZER_HPP
--- a/hotspot/src/share/vm/gc/g1/g1YoungRemSetSamplingThread.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1YoungRemSetSamplingThread.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -24,8 +24,8 @@
 
 #include "precompiled.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/g1/g1CollectionSet.hpp"
+#include "gc/g1/g1Policy.hpp"
 #include "gc/g1/g1YoungRemSetSamplingThread.hpp"
 #include "gc/g1/heapRegion.inline.hpp"
 #include "gc/g1/heapRegionRemSet.hpp"
@@ -74,7 +74,7 @@
 void G1YoungRemSetSamplingThread::sample_young_list_rs_lengths() {
   SuspendibleThreadSetJoiner sts;
   G1CollectedHeap* g1h = G1CollectedHeap::heap();
-  G1CollectorPolicy* g1p = g1h->g1_policy();
+  G1Policy* g1p = g1h->g1_policy();
   if (g1p->adaptive_young_list_length()) {
     int regions_visited = 0;
     HeapRegion* hr = g1h->young_list()->first_region();
--- a/hotspot/src/share/vm/gc/g1/g1YoungRemSetSamplingThread.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1YoungRemSetSamplingThread.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -37,7 +37,7 @@
 // The assumption is that a significant part of the GC is spent on scanning
 // the remembered sets (and many other components), so this thread constantly
 // reevaluates the prediction for the remembered set scanning costs, and potentially
-// G1CollectorPolicy resizes the young gen. This may do a premature GC or even
+// G1Policy resizes the young gen. This may do a premature GC or even
 // increase the young gen size to keep pause time length goal.
 class G1YoungRemSetSamplingThread: public ConcurrentGCThread {
 private:
--- a/hotspot/src/share/vm/gc/g1/heapRegion.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/heapRegion.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -153,6 +153,10 @@
 
   guarantee(CardsPerRegion == 0, "we should only set it once");
   CardsPerRegion = GrainBytes >> CardTableModRefBS::card_shift;
+
+  if (G1HeapRegionSize != GrainBytes) {
+    FLAG_SET_ERGO(size_t, G1HeapRegionSize, GrainBytes);
+  }
 }
 
 void HeapRegion::reset_after_compaction() {
@@ -187,6 +191,7 @@
   zero_marked_bytes();
 
   init_top_at_mark_start();
+  _gc_time_stamp = G1CollectedHeap::heap()->get_gc_time_stamp();
   if (clear_space) clear(SpaceDecorator::Mangle);
 }
 
@@ -204,7 +209,7 @@
   // GC efficiency is the ratio of how much space would be
   // reclaimed over how long we predict it would take to reclaim it.
   G1CollectedHeap* g1h = G1CollectedHeap::heap();
-  G1CollectorPolicy* g1p = g1h->g1_policy();
+  G1Policy* g1p = g1h->g1_policy();
 
   // Retrieve a prediction of the elapsed time for this region for
   // a mixed gc because the region will only be evacuated during a
@@ -1044,7 +1049,7 @@
 
 void G1ContiguousSpace::record_timestamp() {
   G1CollectedHeap* g1h = G1CollectedHeap::heap();
-  unsigned curr_gc_time_stamp = g1h->get_gc_time_stamp();
+  uint curr_gc_time_stamp = g1h->get_gc_time_stamp();
 
   if (_gc_time_stamp < curr_gc_time_stamp) {
     // Setting the time stamp here tells concurrent readers to look at
--- a/hotspot/src/share/vm/gc/g1/heapRegion.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/heapRegion.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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
@@ -124,7 +124,7 @@
  protected:
   G1BlockOffsetTablePart _bot_part;
   Mutex _par_alloc_lock;
-  volatile unsigned _gc_time_stamp;
+  volatile uint _gc_time_stamp;
   // When we need to retire an allocation region, while other threads
   // are also concurrently trying to allocate into it, we typically
   // allocate a dummy object at the end of the region to ensure that
@@ -174,7 +174,7 @@
   HeapWord* scan_top() const;
   void record_timestamp();
   void reset_gc_time_stamp() { _gc_time_stamp = 0; }
-  unsigned get_gc_time_stamp() { return _gc_time_stamp; }
+  uint get_gc_time_stamp() { return _gc_time_stamp; }
   void record_retained_region();
 
   // See the comment above in the declaration of _pre_dummy_top for an
--- a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -692,8 +692,8 @@
                                    HeapRegion* hr)
   : _bot(bot),
     _m(Mutex::leaf, FormatBuffer<128>("HeapRegionRemSet lock #%u", hr->hrm_index()), true, Monitor::_safepoint_check_never),
-    _code_roots(), _other_regions(hr, &_m), _iter_state(Unclaimed), _iter_claimed(0) {
-  reset_for_par_iteration();
+    _code_roots(),
+    _other_regions(hr, &_m) {
 }
 
 void HeapRegionRemSet::setup_remset_size() {
@@ -710,20 +710,6 @@
   guarantee(G1RSetSparseRegionEntries > 0 && G1RSetRegionEntries > 0 , "Sanity");
 }
 
-bool HeapRegionRemSet::claim_iter() {
-  if (_iter_state != Unclaimed) return false;
-  jint res = Atomic::cmpxchg(Claimed, (jint*)(&_iter_state), Unclaimed);
-  return (res == Unclaimed);
-}
-
-void HeapRegionRemSet::set_iter_complete() {
-  _iter_state = Complete;
-}
-
-bool HeapRegionRemSet::iter_is_complete() {
-  return _iter_state == Complete;
-}
-
 #ifndef PRODUCT
 void HeapRegionRemSet::print() {
   HeapRegionRemSetIterator iter(this);
@@ -760,14 +746,6 @@
   _code_roots.clear();
   _other_regions.clear();
   assert(occupied_locked() == 0, "Should be clear.");
-  reset_for_par_iteration();
-}
-
-void HeapRegionRemSet::reset_for_par_iteration() {
-  _iter_state = Unclaimed;
-  _iter_claimed = 0;
-  // It's good to check this to make sure that the two methods are in sync.
-  assert(verify_ready_for_par_iteration(), "post-condition");
 }
 
 void HeapRegionRemSet::scrub(G1CardLiveData* live_data) {
--- a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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
@@ -185,10 +185,6 @@
 
   OtherRegionsTable _other_regions;
 
-  enum ParIterState { Unclaimed, Claimed, Complete };
-  volatile ParIterState _iter_state;
-  volatile size_t _iter_claimed;
-
 public:
   HeapRegionRemSet(G1BlockOffsetTable* bot, HeapRegion* hr);
 
@@ -240,27 +236,6 @@
   void clear();
   void clear_locked();
 
-  // Attempt to claim the region.  Returns true iff this call caused an
-  // atomic transition from Unclaimed to Claimed.
-  bool claim_iter();
-  // Sets the iteration state to "complete".
-  void set_iter_complete();
-  // Returns "true" iff the region's iteration is complete.
-  bool iter_is_complete();
-
-  // Support for claiming blocks of cards during iteration
-  size_t iter_claimed() const { return _iter_claimed; }
-  // Claim the next block of cards
-  size_t iter_claimed_next(size_t step) {
-    return Atomic::add(step, &_iter_claimed) - step;
-  }
-
-  void reset_for_par_iteration();
-
-  bool verify_ready_for_par_iteration() {
-    return (_iter_state == Unclaimed) && (_iter_claimed == 0);
-  }
-
   // The actual # of bytes this hr_remset takes up.
   // Note also includes the strong code root set.
   size_t mem_size() {
--- a/hotspot/src/share/vm/gc/g1/heapRegionSet.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/heapRegionSet.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -38,7 +38,6 @@
   assert(!hr->is_free() || hr->is_empty(), "Free region %u is not empty for set %s", hr->hrm_index(), name());
   assert(!hr->is_empty() || hr->is_free() || hr->is_archive(),
          "Empty region %u is not free or archive for set %s", hr->hrm_index(), name());
-  assert(hr->rem_set()->verify_ready_for_par_iteration(), "Wrong iteration state %u", hr->hrm_index());
 }
 #endif
 
--- a/hotspot/src/share/vm/gc/g1/vm_operations_g1.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/vm_operations_g1.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 #include "gc/g1/concurrentMarkThread.inline.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
+#include "gc/g1/g1Policy.hpp"
 #include "gc/shared/gcId.hpp"
 #include "gc/g1/vm_operations_g1.hpp"
 #include "gc/shared/gcTimer.hpp"
--- a/hotspot/src/share/vm/gc/g1/youngList.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/youngList.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 #include "gc/g1/g1CollectedHeap.hpp"
 #include "gc/g1/g1CollectionSet.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
+#include "gc/g1/g1Policy.hpp"
 #include "gc/g1/heapRegion.hpp"
 #include "gc/g1/heapRegion.inline.hpp"
 #include "gc/g1/heapRegionRemSet.hpp"
--- a/hotspot/src/share/vm/gc/parallel/generationSizer.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/parallel/generationSizer.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -41,5 +41,11 @@
   void initialize_alignments();
   void initialize_flags();
   void initialize_size_info();
+
+ public:
+  // We don't have associated counters and complain if this is invoked.
+  void initialize_gc_policy_counters() {
+    ShouldNotReachHere();
+  }
 };
 #endif // SHARE_VM_GC_PARALLEL_GENERATIONSIZER_HPP
--- a/hotspot/src/share/vm/gc/parallel/pcTasks.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/parallel/pcTasks.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -58,19 +58,16 @@
     ParCompactionManager::gc_thread_compaction_manager(which);
 
   ParCompactionManager::MarkAndPushClosure mark_and_push_closure(cm);
-  CLDToOopClosure mark_and_push_from_clds(&mark_and_push_closure, true);
   MarkingCodeBlobClosure mark_and_push_in_blobs(&mark_and_push_closure, !CodeBlobToOopClosure::FixRelocations);
 
   if (_java_thread != NULL)
     _java_thread->oops_do(
         &mark_and_push_closure,
-        &mark_and_push_from_clds,
         &mark_and_push_in_blobs);
 
   if (_vm_thread != NULL)
     _vm_thread->oops_do(
         &mark_and_push_closure,
-        &mark_and_push_from_clds,
         &mark_and_push_in_blobs);
 
   // Do the real work
@@ -99,8 +96,7 @@
     {
       ResourceMark rm;
       MarkingCodeBlobClosure each_active_code_blob(&mark_and_push_closure, !CodeBlobToOopClosure::FixRelocations);
-      CLDToOopClosure mark_and_push_from_cld(&mark_and_push_closure);
-      Threads::oops_do(&mark_and_push_closure, &mark_and_push_from_cld, &each_active_code_blob);
+      Threads::oops_do(&mark_and_push_closure, &each_active_code_blob);
     }
     break;
 
--- a/hotspot/src/share/vm/gc/parallel/psMarkSweep.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/parallel/psMarkSweep.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -505,9 +505,8 @@
     ParallelScavengeHeap::ParStrongRootsScope psrs;
     Universe::oops_do(mark_and_push_closure());
     JNIHandles::oops_do(mark_and_push_closure());   // Global (strong) JNI handles
-    CLDToOopClosure mark_and_push_from_cld(mark_and_push_closure());
     MarkingCodeBlobClosure each_active_code_blob(mark_and_push_closure(), !CodeBlobToOopClosure::FixRelocations);
-    Threads::oops_do(mark_and_push_closure(), &mark_and_push_from_cld, &each_active_code_blob);
+    Threads::oops_do(mark_and_push_closure(), &each_active_code_blob);
     ObjectSynchronizer::oops_do(mark_and_push_closure());
     FlatProfiler::oops_do(mark_and_push_closure());
     Management::oops_do(mark_and_push_closure());
@@ -597,8 +596,7 @@
   // General strong roots.
   Universe::oops_do(adjust_pointer_closure());
   JNIHandles::oops_do(adjust_pointer_closure());   // Global (strong) JNI handles
-  CLDToOopClosure adjust_from_cld(adjust_pointer_closure());
-  Threads::oops_do(adjust_pointer_closure(), &adjust_from_cld, NULL);
+  Threads::oops_do(adjust_pointer_closure(), NULL);
   ObjectSynchronizer::oops_do(adjust_pointer_closure());
   FlatProfiler::oops_do(adjust_pointer_closure());
   Management::oops_do(adjust_pointer_closure());
--- a/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2148,8 +2148,7 @@
   // General strong roots.
   Universe::oops_do(&oop_closure);
   JNIHandles::oops_do(&oop_closure);   // Global (strong) JNI handles
-  CLDToOopClosure adjust_from_cld(&oop_closure);
-  Threads::oops_do(&oop_closure, &adjust_from_cld, NULL);
+  Threads::oops_do(&oop_closure, NULL);
   ObjectSynchronizer::oops_do(&oop_closure);
   FlatProfiler::oops_do(&oop_closure);
   Management::oops_do(&oop_closure);
--- a/hotspot/src/share/vm/gc/parallel/psTasks.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/parallel/psTasks.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -65,8 +65,7 @@
     case threads:
     {
       ResourceMark rm;
-      CLDClosure* cld_closure = NULL; // Not needed. All CLDs are already visited.
-      Threads::oops_do(&roots_closure, cld_closure, NULL);
+      Threads::oops_do(&roots_closure, NULL);
     }
     break;
 
@@ -122,14 +121,13 @@
 
   PSPromotionManager* pm = PSPromotionManager::gc_thread_promotion_manager(which);
   PSScavengeRootsClosure roots_closure(pm);
-  CLDClosure* roots_from_clds = NULL;  // Not needed. All CLDs are already visited.
   MarkingCodeBlobClosure roots_in_blobs(&roots_closure, CodeBlobToOopClosure::FixRelocations);
 
   if (_java_thread != NULL)
-    _java_thread->oops_do(&roots_closure, roots_from_clds, &roots_in_blobs);
+    _java_thread->oops_do(&roots_closure, &roots_in_blobs);
 
   if (_vm_thread != NULL)
-    _vm_thread->oops_do(&roots_closure, roots_from_clds, &roots_in_blobs);
+    _vm_thread->oops_do(&roots_closure, &roots_in_blobs);
 
   // Do the real work
   pm->drain_stacks(false);
--- a/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -564,7 +564,7 @@
 
 void DefNewGeneration::adjust_desired_tenuring_threshold() {
   // Set the desired survivor size to half the real survivor space
-  GCPolicyCounters* gc_counters = GenCollectedHeap::heap()->collector_policy()->counters();
+  GCPolicyCounters* gc_counters = GenCollectedHeap::heap()->gen_policy()->counters();
   _tenuring_threshold =
     age_table()->compute_tenuring_threshold(to()->capacity()/HeapWordSize, gc_counters);
 }
@@ -945,7 +945,7 @@
 
   // update the generation and space performance counters
   update_counters();
-  gch->collector_policy()->counters()->update_counters();
+  gch->gen_policy()->counters()->update_counters();
 }
 
 void DefNewGeneration::record_spaces_top() {
--- a/hotspot/src/share/vm/gc/shared/collectedHeap.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -510,10 +510,6 @@
   fill_with_object_impl(start, words, zap);
 }
 
-void CollectedHeap::post_initialize() {
-  collector_policy()->post_heap_initialize();
-}
-
 HeapWord* CollectedHeap::allocate_new_tlab(size_t size) {
   guarantee(false, "thread-local allocation buffers not supported");
   return NULL;
--- a/hotspot/src/share/vm/gc/shared/collectedHeap.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -209,7 +209,7 @@
   // In many heaps, there will be a need to perform some initialization activities
   // after the Universe is fully formed, but before general heap allocation is allowed.
   // This is the correct place to place such initialization methods.
-  virtual void post_initialize();
+  virtual void post_initialize() = 0;
 
   // Stop any onging concurrent work and prepare for exit.
   virtual void stop() {}
--- a/hotspot/src/share/vm/gc/shared/collectorPolicy.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/shared/collectorPolicy.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -58,8 +58,6 @@
 
 class CollectorPolicy : public CHeapObj<mtGC> {
  protected:
-  GCPolicyCounters* _gc_policy_counters;
-
   virtual void initialize_alignments() = 0;
   virtual void initialize_flags();
   virtual void initialize_size_info();
@@ -129,17 +127,14 @@
   virtual MarkSweepPolicy*              as_mark_sweep_policy()            { return NULL; }
 #if INCLUDE_ALL_GCS
   virtual ConcurrentMarkSweepPolicy*    as_concurrent_mark_sweep_policy() { return NULL; }
-  virtual G1CollectorPolicy*            as_g1_policy()                    { return NULL; }
 #endif // INCLUDE_ALL_GCS
   // Note that these are not virtual.
   bool is_generation_policy()            { return as_generation_policy() != NULL; }
   bool is_mark_sweep_policy()            { return as_mark_sweep_policy() != NULL; }
 #if INCLUDE_ALL_GCS
   bool is_concurrent_mark_sweep_policy() { return as_concurrent_mark_sweep_policy() != NULL; }
-  bool is_g1_policy()                    { return as_g1_policy() != NULL; }
 #else  // INCLUDE_ALL_GCS
   bool is_concurrent_mark_sweep_policy() { return false; }
-  bool is_g1_policy()                    { return false; }
 #endif // INCLUDE_ALL_GCS
 
 
@@ -148,19 +143,6 @@
   MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
                                                size_t size,
                                                Metaspace::MetadataType mdtype);
-
-  // Performance Counter support
-  GCPolicyCounters* counters()     { return _gc_policy_counters; }
-
-  // Create the jstat counters for the GC policy.  By default, policy's
-  // don't have associated counters, and we complain if this is invoked.
-  virtual void initialize_gc_policy_counters() {
-    ShouldNotReachHere();
-  }
-
-  // Do any updates required to global flags that are due to heap initialization
-  // changes
-  virtual void post_heap_initialize() = 0;
 };
 
 class ClearedAllSoftRefs : public StackObj {
@@ -197,6 +179,8 @@
   GenerationSpec* _young_gen_spec;
   GenerationSpec* _old_gen_spec;
 
+  GCPolicyCounters* _gc_policy_counters;
+
   // Return true if an allocation should be attempted in the older generation
   // if it fails in the younger generation.  Return false, otherwise.
   virtual bool should_try_older_generation_allocation(size_t word_size) const;
@@ -243,6 +227,12 @@
     return _old_gen_spec;
   }
 
+  // Performance Counter support
+  GCPolicyCounters* counters()     { return _gc_policy_counters; }
+
+  // Create the jstat counters for the GC policy.
+  virtual void initialize_gc_policy_counters() = 0;
+
   virtual GenCollectorPolicy* as_generation_policy() { return this; }
 
   virtual void initialize_generations() { };
@@ -266,10 +256,6 @@
   virtual void initialize_size_policy(size_t init_eden_size,
                                       size_t init_promo_size,
                                       size_t init_survivor_size);
-
-  virtual void post_heap_initialize() {
-    assert(_max_young_size == MaxNewSize, "Should be taken care of by initialize_size_info");
-  }
 };
 
 class MarkSweepPolicy : public GenCollectorPolicy {
--- a/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -179,7 +179,6 @@
 }
 
 void GenCollectedHeap::post_initialize() {
-  CollectedHeap::post_initialize();
   ref_processing_init();
   assert((_young_gen->kind() == Generation::DefNew) ||
          (_young_gen->kind() == Generation::ParNew),
@@ -583,14 +582,11 @@
     ClassLoaderDataGraph::roots_cld_do(strong_cld_closure, weak_cld_closure);
   }
 
-  // Some CLDs contained in the thread frames should be considered strong.
-  // Don't process them if they will be processed during the ClassLoaderDataGraph phase.
-  CLDClosure* roots_from_clds_p = (strong_cld_closure != weak_cld_closure) ? strong_cld_closure : NULL;
   // Only process code roots from thread stacks if we aren't visiting the entire CodeCache anyway
   CodeBlobToOopClosure* roots_from_code_p = (so & SO_AllCodeCache) ? NULL : code_roots;
 
   bool is_par = scope->n_threads() > 1;
-  Threads::possibly_parallel_oops_do(is_par, strong_roots, roots_from_clds_p, roots_from_code_p);
+  Threads::possibly_parallel_oops_do(is_par, strong_roots, roots_from_code_p);
 
   if (!_process_strong_tasks->is_task_claimed(GCH_PS_Universe_oops_do)) {
     Universe::oops_do(strong_roots);
--- a/hotspot/src/share/vm/gc/shared/vmGCOperations.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/gc/shared/vmGCOperations.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -40,6 +40,7 @@
 #include "utilities/preserveException.hpp"
 #if INCLUDE_ALL_GCS
 #include "gc/g1/g1CollectedHeap.inline.hpp"
+#include "gc/g1/g1Policy.hpp"
 #endif // INCLUDE_ALL_GCS
 
 VM_GC_Operation::~VM_GC_Operation() {
--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -578,8 +578,9 @@
 /* 0xDC */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 
 /* 0xE0 */ &&opc_default,     &&opc_default,        &&opc_default,         &&opc_default,
-/* 0xE4 */ &&opc_default,     &&opc_fast_aldc,      &&opc_fast_aldc_w,     &&opc_return_register_finalizer,
-/* 0xE8 */ &&opc_invokehandle,&&opc_default,        &&opc_default,         &&opc_default,
+/* 0xE4 */ &&opc_default,     &&opc_default,        &&opc_fast_aldc,    &&opc_fast_aldc_w,
+/* 0xE8 */ &&opc_return_register_finalizer,
+                              &&opc_invokehandle,   &&opc_default,      &&opc_default,
 /* 0xEC */ &&opc_default,     &&opc_default,        &&opc_default,         &&opc_default,
 
 /* 0xF0 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, 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
@@ -110,6 +110,7 @@
     intptr_t*             _locals;        // local variable pointer
     ConstantPoolCache*    _constants;     // constant pool cache
     Method*               _method;        // method being executed
+    oop                   _mirror;        // mirror to klass containing method
     DataLayout*           _mdx;           // compiler profiling data for current bytecode
     intptr_t*             _stack;         // expression stack
     messages              _msg;           // frame manager <-> interpreter message
--- a/hotspot/src/share/vm/interpreter/linkResolver.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/interpreter/linkResolver.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -612,14 +612,13 @@
   }
 
   if (code == Bytecodes::_invokeinterface) {
-    return resolve_interface_method(link_info, true, THREAD);
+    return resolve_interface_method(link_info, code, THREAD);
   } else if (code == Bytecodes::_invokevirtual) {
     return resolve_method(link_info, /*require_methodref*/true, THREAD);
   } else if (!resolved_klass->is_interface()) {
     return resolve_method(link_info, /*require_methodref*/false, THREAD);
   } else {
-    bool nostatics = (code == Bytecodes::_invokestatic) ? false : true;
-    return resolve_interface_method(link_info, nostatics, THREAD);
+    return resolve_interface_method(link_info, code, THREAD);
   }
 }
 
@@ -777,8 +776,8 @@
 #endif // PRODUCT
 }
 
-methodHandle LinkResolver::resolve_interface_method(const LinkInfo& link_info,
-                                                    bool nostatics, TRAPS) {
+// Do linktime resolution of a method in the interface within the context of the specied bytecode.
+methodHandle LinkResolver::resolve_interface_method(const LinkInfo& link_info, Bytecodes::Code code, TRAPS) {
 
   KlassHandle resolved_klass = link_info.resolved_klass();
 
@@ -824,7 +823,7 @@
     check_method_loader_constraints(link_info, resolved_method, "interface method", CHECK_NULL);
   }
 
-  if (nostatics && resolved_method->is_static()) {
+  if (code != Bytecodes::_invokestatic && resolved_method->is_static()) {
     ResourceMark rm(THREAD);
     char buf[200];
     jio_snprintf(buf, sizeof(buf), "Expected instance not static method %s",
@@ -833,6 +832,19 @@
     THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
   }
 
+  if (code == Bytecodes::_invokeinterface && resolved_method->is_private()) {
+    ResourceMark rm(THREAD);
+    char buf[200];
+
+    KlassHandle current_klass = link_info.current_klass();
+    jio_snprintf(buf, sizeof(buf), "private interface method requires invokespecial, not invokeinterface: method %s, caller-class:%s",
+                 Method::name_and_sig_as_C_string(resolved_klass(),
+                                                  resolved_method->name(),
+                                                  resolved_method->signature()),
+                                                  (current_klass.is_null() ? "<NULL>" : current_klass->internal_name()));
+     THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
+  }
+
   if (log_develop_is_enabled(Trace, itables)) {
     trace_method_resolution("invokeinterface resolved method: caller-class",
                             link_info.current_klass(), resolved_klass,
@@ -984,7 +996,7 @@
   if (!resolved_klass->is_interface()) {
     resolved_method = resolve_method(link_info, /*require_methodref*/false, CHECK_NULL);
   } else {
-    resolved_method = resolve_interface_method(link_info, /*nostatics*/false, CHECK_NULL);
+    resolved_method = resolve_interface_method(link_info, Bytecodes::_invokestatic, CHECK_NULL);
   }
   assert(resolved_method->name() != vmSymbols::class_initializer_name(), "should have been checked in verifier");
 
@@ -1027,7 +1039,7 @@
   if (!resolved_klass->is_interface()) {
     resolved_method = resolve_method(link_info, /*require_methodref*/false, CHECK_NULL);
   } else {
-    resolved_method = resolve_interface_method(link_info, /*nostatics*/true, CHECK_NULL);
+    resolved_method = resolve_interface_method(link_info, Bytecodes::_invokespecial, CHECK_NULL);
   }
 
   // check if method name is <init>, that it is found in same klass as static type
@@ -1302,7 +1314,7 @@
 methodHandle LinkResolver::linktime_resolve_interface_method(const LinkInfo& link_info,
                                                              TRAPS) {
   // normal interface method resolution
-  methodHandle resolved_method = resolve_interface_method(link_info, true, CHECK_NULL);
+  methodHandle resolved_method = resolve_interface_method(link_info, Bytecodes::_invokeinterface, CHECK_NULL);
   assert(resolved_method->name() != vmSymbols::object_initializer_name(), "should have been checked in verifier");
   assert(resolved_method->name() != vmSymbols::class_initializer_name (), "should have been checked in verifier");
 
@@ -1321,17 +1333,6 @@
     THROW(vmSymbols::java_lang_NullPointerException());
   }
 
-  // check if private interface method
-  if (resolved_klass->is_interface() && resolved_method->is_private()) {
-    ResourceMark rm(THREAD);
-    char buf[200];
-    jio_snprintf(buf, sizeof(buf), "private interface method requires invokespecial, not invokeinterface: method %s",
-                 Method::name_and_sig_as_C_string(resolved_klass(),
-                                                  resolved_method->name(),
-                                                  resolved_method->signature()));
-    THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
-  }
-
   // check if receiver klass implements the resolved interface
   if (!recv_klass->is_subtype_of(resolved_klass())) {
     ResourceMark rm(THREAD);
--- a/hotspot/src/share/vm/interpreter/linkResolver.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/interpreter/linkResolver.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -191,7 +191,7 @@
                                              KlassHandle current_klass,
                                              KlassHandle sel_klass, TRAPS);
 
-  static methodHandle resolve_interface_method(const LinkInfo& link_info, bool nostatics, TRAPS);
+  static methodHandle resolve_interface_method(const LinkInfo& link_info, Bytecodes::Code code, TRAPS);
   static methodHandle resolve_method          (const LinkInfo& link_info, bool require_methodref, TRAPS);
 
   static methodHandle linktime_resolve_static_method    (const LinkInfo& link_info, TRAPS);
--- a/hotspot/src/share/vm/interpreter/rewriter.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/interpreter/rewriter.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, 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
@@ -65,11 +65,12 @@
   // Record limits of resolved reference map for constant pool cache indices
   record_map_limits();
 
-  guarantee((int)_cp_cache_map.length()-1 <= (int)((u2)-1),
+  guarantee((int) _cp_cache_map.length() - 1 <= (int) ((u2)-1),
             "all cp cache indexes fit in a u2");
 
-  if (saw_mh_symbol)
-    _method_handle_invokers.initialize(length, (int)0);
+  if (saw_mh_symbol) {
+    _method_handle_invokers.at_grow(length, 0);
+  }
 }
 
 // Unrewrite the bytecodes if an error occurs.
@@ -193,7 +194,7 @@
       assert(_pool->tag_at(cp_index).is_method(), "wrong index");
       // Determine whether this is a signature-polymorphic method.
       if (cp_index >= _method_handle_invokers.length())  return;
-      int status = _method_handle_invokers[cp_index];
+      int status = _method_handle_invokers.at(cp_index);
       assert(status >= -1 && status <= 1, "oob tri-state");
       if (status == 0) {
         if (_pool->klass_ref_at_noresolve(cp_index) == vmSymbols::java_lang_invoke_MethodHandle() &&
@@ -211,7 +212,7 @@
         } else {
           status = -1;
         }
-        _method_handle_invokers[cp_index] = status;
+        _method_handle_invokers.at(cp_index) = status;
       }
       // We use a special internal bytecode for such methods (if non-static).
       // The basic reason for this is that such methods need an extra "appendix" argument
@@ -287,7 +288,7 @@
       // add delta to each.
       int resolved_index = _patch_invokedynamic_refs->at(i);
       for (int entry = 0; entry < ConstantPoolCacheEntry::_indy_resolved_references_entries; entry++) {
-        assert(_invokedynamic_references_map[resolved_index+entry] == cache_index,
+        assert(_invokedynamic_references_map.at(resolved_index + entry) == cache_index,
              "should be the same index");
         _invokedynamic_references_map.at_put(resolved_index+entry,
                                              cache_index + delta);
@@ -520,7 +521,14 @@
 Rewriter::Rewriter(instanceKlassHandle klass, const constantPoolHandle& cpool, Array<Method*>* methods, TRAPS)
   : _klass(klass),
     _pool(cpool),
-    _methods(methods)
+    _methods(methods),
+    _cp_map(cpool->length()),
+    _cp_cache_map(cpool->length() / 2),
+    _reference_map(cpool->length()),
+    _resolved_references_map(cpool->length() / 2),
+    _invokedynamic_references_map(cpool->length() / 2),
+    _method_handle_invokers(cpool->length()),
+    _invokedynamic_cp_cache_map(cpool->length() / 4)
 {
 
   // Rewrite bytecodes - exception here exits.
--- a/hotspot/src/share/vm/interpreter/rewriter.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/interpreter/rewriter.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -37,13 +37,13 @@
   instanceKlassHandle _klass;
   constantPoolHandle  _pool;
   Array<Method*>*     _methods;
-  intArray            _cp_map;
-  intStack            _cp_cache_map;        // for Methodref, Fieldref,
-                                            // InterfaceMethodref and InvokeDynamic
-  intArray            _reference_map;       // maps from cp index to resolved_refs index (or -1)
-  intStack            _resolved_references_map;    // for strings, methodHandle, methodType
-  intStack            _invokedynamic_references_map; // for invokedynamic resolved refs
-  intArray            _method_handle_invokers;
+  GrowableArray<int>  _cp_map;
+  GrowableArray<int>  _cp_cache_map;  // for Methodref, Fieldref,
+                                      // InterfaceMethodref and InvokeDynamic
+  GrowableArray<int>  _reference_map; // maps from cp index to resolved_refs index (or -1)
+  GrowableArray<int>  _resolved_references_map; // for strings, methodHandle, methodType
+  GrowableArray<int>  _invokedynamic_references_map; // for invokedynamic resolved refs
+  GrowableArray<int>  _method_handle_invokers;
   int                 _resolved_reference_limit;
 
   // For mapping invokedynamic bytecodes, which are discovered during method
@@ -51,28 +51,31 @@
   // If there are any invokespecial/InterfaceMethodref special case bytecodes,
   // these entries are added before invokedynamic entries so that the
   // invokespecial bytecode 16 bit index doesn't overflow.
-  intStack            _invokedynamic_cp_cache_map;
+  GrowableArray<int>      _invokedynamic_cp_cache_map;
 
   // For patching.
   GrowableArray<address>* _patch_invokedynamic_bcps;
   GrowableArray<int>*     _patch_invokedynamic_refs;
 
   void init_maps(int length) {
-    _cp_map.initialize(length, -1);
-    // Choose an initial value large enough that we don't get frequent
-    // calls to grow().
-    _cp_cache_map.initialize(length/2);
+    _cp_map.trunc_to(0);
+    _cp_map.at_grow(length, -1);
+
+    _cp_cache_map.trunc_to(0);
     // Also cache resolved objects, in another different cache.
-    _reference_map.initialize(length, -1);
-    _resolved_references_map.initialize(length/2);
-    _invokedynamic_references_map.initialize(length/2);
+    _reference_map.trunc_to(0);
+    _reference_map.at_grow(length, -1);
+
+    _method_handle_invokers.trunc_to(0);
+    _resolved_references_map.trunc_to(0);
+    _invokedynamic_references_map.trunc_to(0);
     _resolved_reference_limit = -1;
     _first_iteration_cp_cache_limit = -1;
 
     // invokedynamic specific fields
-    _invokedynamic_cp_cache_map.initialize(length/4);
-    _patch_invokedynamic_bcps = new GrowableArray<address>(length/4);
-    _patch_invokedynamic_refs = new GrowableArray<int>(length/4);
+    _invokedynamic_cp_cache_map.trunc_to(0);
+    _patch_invokedynamic_bcps = new GrowableArray<address>(length / 4);
+    _patch_invokedynamic_refs = new GrowableArray<int>(length / 4);
   }
 
   int _first_iteration_cp_cache_limit;
@@ -90,10 +93,10 @@
     return _cp_cache_map.length() - _first_iteration_cp_cache_limit;
   }
 
-  int  cp_entry_to_cp_cache(int i) { assert(has_cp_cache(i), "oob"); return _cp_map[i]; }
-  bool has_cp_cache(int i) { return (uint)i < (uint)_cp_map.length() && _cp_map[i] >= 0; }
+  int  cp_entry_to_cp_cache(int i) { assert(has_cp_cache(i), "oob"); return _cp_map.at(i); }
+  bool has_cp_cache(int i) { return (uint) i < (uint) _cp_map.length() && _cp_map.at(i) >= 0; }
 
-  int add_map_entry(int cp_index, intArray* cp_map, intStack* cp_cache_map) {
+  int add_map_entry(int cp_index, GrowableArray<int>* cp_map, GrowableArray<int>* cp_cache_map) {
     assert(cp_map->at(cp_index) == -1, "not twice on same cp_index");
     int cache_index = cp_cache_map->append(cp_index);
     cp_map->at_put(cp_index, cache_index);
@@ -121,7 +124,7 @@
   }
 
   int invokedynamic_cp_cache_entry_pool_index(int cache_index) {
-    int cp_index = _invokedynamic_cp_cache_map[cache_index];
+    int cp_index = _invokedynamic_cp_cache_map.at(cache_index);
     return cp_index;
   }
 
@@ -131,9 +134,9 @@
     assert(_first_iteration_cp_cache_limit >= 0, "add these special cache entries after first iteration");
     // Don't add InterfaceMethodref if it already exists at the end.
     for (int i = _first_iteration_cp_cache_limit; i < _cp_cache_map.length(); i++) {
-     if (cp_cache_entry_pool_index(i) == cp_index) {
-       return i;
-     }
+      if (cp_cache_entry_pool_index(i) == cp_index) {
+        return i;
+      }
     }
     int cache_index = _cp_cache_map.append(cp_index);
     assert(cache_index >= _first_iteration_cp_cache_limit, "");
@@ -144,10 +147,10 @@
 
   int  cp_entry_to_resolved_references(int cp_index) const {
     assert(has_entry_in_resolved_references(cp_index), "oob");
-    return _reference_map[cp_index];
+    return _reference_map.at(cp_index);
   }
   bool has_entry_in_resolved_references(int cp_index) const {
-    return (uint)cp_index < (uint)_reference_map.length() && _reference_map[cp_index] >= 0;
+    return (uint) cp_index < (uint) _reference_map.length() && _reference_map.at(cp_index) >= 0;
   }
 
   // add a new entry to the resolved_references map
@@ -174,13 +177,13 @@
   }
 
   int resolved_references_entry_to_pool_index(int ref_index) {
-    int cp_index = _resolved_references_map[ref_index];
+    int cp_index = _resolved_references_map.at(ref_index);
     return cp_index;
   }
 
   // Access the contents of _cp_cache_map to determine CP cache layout.
   int cp_cache_entry_pool_index(int cache_index) {
-    int cp_index = _cp_cache_map[cache_index];
+    int cp_index = _cp_cache_map.at(cache_index);
     return cp_index;
   }
 
--- a/hotspot/src/share/vm/libadt/vectset.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/libadt/vectset.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -31,7 +31,7 @@
 // BitsInByte is a lookup table which tells the number of bits that
 // are in the looked-up number.  It is very useful in VectorSet_Size.
 
-uint8_t bitsInByte[256] = {
+uint8_t bitsInByte[BITS_IN_BYTE_ARRAY_SIZE] = {
   0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
   1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
   1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
--- a/hotspot/src/share/vm/libadt/vectset.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/libadt/vectset.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -27,6 +27,8 @@
 
 #include "libadt/set.hpp"
 
+#define BITS_IN_BYTE_ARRAY_SIZE 256
+
 // Vector Sets - An Abstract Data Type
 //INTERFACE
 
--- a/hotspot/src/share/vm/logging/logConfiguration.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/logging/logConfiguration.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -382,7 +382,7 @@
   return true;
 }
 
-void LogConfiguration::describe(outputStream* out) {
+void LogConfiguration::describe_available(outputStream* out){
   out->print("Available log levels:");
   for (size_t i = 0; i < LogLevel::Count; i++) {
     out->print("%s %s", (i == 0 ? "" : ","), LogLevel::name(static_cast<LogLevelType>(i)));
@@ -402,7 +402,9 @@
   }
   out->cr();
 
-  ConfigurationLock cl;
+}
+
+void LogConfiguration::describe_current_configuration(outputStream* out){
   out->print_cr("Log output configuration:");
   for (size_t i = 0; i < _n_outputs; i++) {
     out->print("#" SIZE_FORMAT ": %s %s ", i, _outputs[i]->name(), _outputs[i]->config_string());
@@ -416,6 +418,12 @@
   }
 }
 
+void LogConfiguration::describe(outputStream* out) {
+  describe_available(out);
+  ConfigurationLock cl;
+  describe_current_configuration(out);
+}
+
 void LogConfiguration::print_command_line_help(FILE* out) {
   jio_fprintf(out, "-Xlog Usage: -Xlog[:[what][:[output][:[decorators][:output-options]]]]\n"
               "\t where 'what' is a combination of tags and levels on the form tag1[+tag2...][*][=level][,...]\n"
--- a/hotspot/src/share/vm/logging/logConfiguration.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/logging/logConfiguration.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -37,6 +37,7 @@
 // kept implicitly in the LogTagSets and their LogOutputLists. During configuration the tagsets
 // are iterated over and updated accordingly.
 class LogConfiguration : public AllStatic {
+ friend class VMError;
  public:
   // Function for listeners
   typedef void (*UpdateListenerFunction)(void);
@@ -79,6 +80,11 @@
   // This should be called after any configuration change while still holding ConfigurationLock
   static void notify_update_listeners();
 
+  // Respectively describe the built-in and runtime dependent portions of the configuration.
+  static void describe_available(outputStream* out);
+  static void describe_current_configuration(outputStream* out);
+
+
  public:
   // Initialization and finalization of log configuration, to be run at vm startup and shutdown respectively.
   static void initialize(jlong vm_start_time);
--- a/hotspot/src/share/vm/logging/logFileOutput.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/logging/logFileOutput.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -252,7 +252,7 @@
 
   if (_file_count == 0 && is_regular_file(_file_name)) {
     log_trace(logging)("Truncating log file");
-    os::ftruncate(os::fileno(_stream), 0);
+    os::ftruncate(os::get_fileno(_stream), 0);
   }
 
   return true;
--- a/hotspot/src/share/vm/logging/logTag.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/logging/logTag.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -62,6 +62,7 @@
   LOG_TAG(ihop) \
   LOG_TAG(itables) \
   LOG_TAG(jni) \
+  LOG_TAG(jvmti) \
   LOG_TAG(liveness) \
   LOG_TAG(logging) \
   LOG_TAG(marking) \
@@ -69,6 +70,7 @@
   LOG_TAG(modules) \
   LOG_TAG(monitorinflation) \
   LOG_TAG(monitormismatch) \
+  LOG_TAG(objecttagging) \
   LOG_TAG(os) \
   LOG_TAG(pagesize) \
   LOG_TAG(phases) \
--- a/hotspot/src/share/vm/memory/iterator.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/memory/iterator.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -355,6 +355,9 @@
   // Read/write the void pointer pointed to by p.
   virtual void do_ptr(void** p) = 0;
 
+  // Read/write the 32-bit unsigned integer pointed to by p.
+  virtual void do_u4(u4* p) = 0;
+
   // Read/write the region specified.
   virtual void do_region(u_char* start, size_t size) = 0;
 
@@ -363,6 +366,10 @@
   // for verification that sections of the serialized data are of the
   // correct length.
   virtual void do_tag(int tag) = 0;
+
+  bool writing() {
+    return !reading();
+  }
 };
 
 class SymbolClosure : public StackObj {
--- a/hotspot/src/share/vm/memory/metaspaceShared.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/memory/metaspaceShared.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -31,6 +31,7 @@
 #include "classfile/sharedClassUtil.hpp"
 #include "classfile/symbolTable.hpp"
 #include "classfile/systemDictionary.hpp"
+#include "classfile/systemDictionaryShared.hpp"
 #include "code/codeCache.hpp"
 #include "gc/shared/gcLocker.hpp"
 #include "interpreter/bytecodeStream.hpp"
@@ -106,7 +107,8 @@
 // Read/write a data stream for restoring/preserving metadata pointers and
 // miscellaneous data from/to the shared archive file.
 
-void MetaspaceShared::serialize(SerializeClosure* soc) {
+void MetaspaceShared::serialize(SerializeClosure* soc, GrowableArray<MemRegion> *string_space,
+                                size_t* space_size) {
   int tag = 0;
   soc->do_tag(--tag);
 
@@ -128,6 +130,15 @@
   vmSymbols::serialize(soc);
   soc->do_tag(--tag);
 
+  // Dump/restore the symbol and string tables
+  SymbolTable::serialize(soc);
+  StringTable::serialize(soc, string_space, space_size);
+  soc->do_tag(--tag);
+
+  // Dump/restore the misc information for system dictionary
+  SystemDictionaryShared::serialize(soc);
+  soc->do_tag(--tag);
+
   soc->do_tag(666);
 }
 
@@ -314,6 +325,11 @@
     ++top;
   }
 
+  void do_u4(u4* p) {
+    void* ptr = (void*)(uintx(*p));
+    do_ptr(&ptr);
+  }
+
   void do_tag(int tag) {
     check_space();
     *top = (intptr_t)tag;
@@ -348,6 +364,8 @@
   METASPACE_OBJ_TYPES_DO(f) \
   f(SymbolHashentry) \
   f(SymbolBucket) \
+  f(StringHashentry) \
+  f(StringBucket) \
   f(Other)
 
 #define SHAREDSPACE_OBJ_TYPE_DECLARE(name) name ## Type,
@@ -406,13 +424,22 @@
   MetaspaceSharedStats *stats = MetaspaceShared::stats();
 
   // symbols
-  _counts[RW][SymbolHashentryType] = stats->symbol.hashentry_count;
-  _bytes [RW][SymbolHashentryType] = stats->symbol.hashentry_bytes;
-  other_bytes -= stats->symbol.hashentry_bytes;
+  _counts[RO][SymbolHashentryType] = stats->symbol.hashentry_count;
+  _bytes [RO][SymbolHashentryType] = stats->symbol.hashentry_bytes;
+  _bytes [RO][TypeArrayU4Type]    -= stats->symbol.hashentry_bytes;
+
+  _counts[RO][SymbolBucketType] = stats->symbol.bucket_count;
+  _bytes [RO][SymbolBucketType] = stats->symbol.bucket_bytes;
+  _bytes [RO][TypeArrayU4Type] -= stats->symbol.bucket_bytes;
 
-  _counts[RW][SymbolBucketType] = stats->symbol.bucket_count;
-  _bytes [RW][SymbolBucketType] = stats->symbol.bucket_bytes;
-  other_bytes -= stats->symbol.bucket_bytes;
+  // strings
+  _counts[RO][StringHashentryType] = stats->string.hashentry_count;
+  _bytes [RO][StringHashentryType] = stats->string.hashentry_bytes;
+  _bytes [RO][TypeArrayU4Type]    -= stats->string.hashentry_bytes;
+
+  _counts[RO][StringBucketType] = stats->string.bucket_count;
+  _bytes [RO][StringBucketType] = stats->string.bucket_bytes;
+  _bytes [RO][TypeArrayU4Type] -= stats->string.bucket_bytes;
 
   // TODO: count things like dictionary, vtable, etc
   _bytes[RW][OtherType] =  other_bytes;
@@ -488,7 +515,6 @@
   GrowableArray<Klass*> *_class_promote_order;
   VirtualSpace _md_vs;
   VirtualSpace _mc_vs;
-  CompactHashtableWriter* _string_cht;
   GrowableArray<MemRegion> *_string_regions;
 
 public:
@@ -600,39 +626,27 @@
   // Not doing this either.
 
   SystemDictionary::reorder_dictionary();
-
   NOT_PRODUCT(SystemDictionary::verify();)
-
-  // Copy the symbol table, string table, and the system dictionary to the shared
-  // space in usable form.  Copy the hashtable
-  // buckets first [read-write], then copy the linked lists of entries
-  // [read-only].
-
-  NOT_PRODUCT(SymbolTable::verify());
-  handle_misc_data_space_failure(SymbolTable::copy_compact_table(&md_top, md_end));
-
-  size_t ss_bytes = 0;
-  char* ss_low;
-  // The string space has maximum two regions. See FileMapInfo::write_string_regions() for details.
-  _string_regions = new GrowableArray<MemRegion>(2);
-  NOT_PRODUCT(StringTable::verify());
-  handle_misc_data_space_failure(StringTable::copy_compact_table(&md_top, md_end, _string_regions,
-                                                                 &ss_bytes));
-  ss_low = _string_regions->is_empty() ? NULL : (char*)_string_regions->first().start();
-
   SystemDictionary::reverse();
   SystemDictionary::copy_buckets(&md_top, md_end);
 
   SystemDictionary::copy_table(&md_top, md_end);
 
   // Write the other data to the output array.
+  // SymbolTable, StringTable and extra information for system dictionary
+  NOT_PRODUCT(SymbolTable::verify());
+  NOT_PRODUCT(StringTable::verify());
+  size_t ss_bytes = 0;
+  char* ss_low;
+  // The string space has maximum two regions. See FileMapInfo::write_string_regions() for details.
+  _string_regions = new GrowableArray<MemRegion>(2);
+
   WriteClosure wc(md_top, md_end);
-  MetaspaceShared::serialize(&wc);
+  MetaspaceShared::serialize(&wc, _string_regions, &ss_bytes);
   md_top = wc.get_top();
+  ss_low = _string_regions->is_empty() ? NULL : (char*)_string_regions->first().start();
 
   // Print shared spaces all the time
-// To make fmt_space be a syntactic constant (for format warnings), use #define.
-#define fmt_space "%s space: " SIZE_FORMAT_W(9) " [ %4.1f%% of total] out of " SIZE_FORMAT_W(9) " bytes [%4.1f%% used] at " INTPTR_FORMAT
   Metaspace* ro_space = _loader_data->ro_metaspace();
   Metaspace* rw_space = _loader_data->rw_metaspace();
 
@@ -665,12 +679,13 @@
   const double mc_u_perc = mc_bytes / double(mc_alloced) * 100.0;
   const double total_u_perc = total_bytes / double(total_alloced) * 100.0;
 
+#define fmt_space "%s space: " SIZE_FORMAT_W(9) " [ %4.1f%% of total] out of " SIZE_FORMAT_W(9) " bytes [%5.1f%% used] at " INTPTR_FORMAT
   tty->print_cr(fmt_space, "ro", ro_bytes, ro_t_perc, ro_alloced, ro_u_perc, p2i(ro_space->bottom()));
   tty->print_cr(fmt_space, "rw", rw_bytes, rw_t_perc, rw_alloced, rw_u_perc, p2i(rw_space->bottom()));
   tty->print_cr(fmt_space, "md", md_bytes, md_t_perc, md_alloced, md_u_perc, p2i(md_low));
   tty->print_cr(fmt_space, "mc", mc_bytes, mc_t_perc, mc_alloced, mc_u_perc, p2i(mc_low));
   tty->print_cr(fmt_space, "st", ss_bytes, ss_t_perc, ss_bytes,   100.0,     p2i(ss_low));
-  tty->print_cr("total   : " SIZE_FORMAT_W(9) " [100.0%% of total] out of " SIZE_FORMAT_W(9) " bytes [%4.1f%% used]",
+  tty->print_cr("total   : " SIZE_FORMAT_W(9) " [100.0%% of total] out of " SIZE_FORMAT_W(9) " bytes [%5.1f%% used]",
                  total_bytes, total_alloced, total_u_perc);
 
   // Update the vtable pointers in all of the Klass objects in the
@@ -974,6 +989,11 @@
     *p = (void*)obj;
   }
 
+  void do_u4(u4* p) {
+    intptr_t obj = nextPtr();
+    *p = (u4)(uintx(obj));
+  }
+
   void do_tag(int tag) {
     int old_tag;
     old_tag = (int)(intptr_t)nextPtr();
@@ -1097,21 +1117,6 @@
   buffer += sizeof(intptr_t);
   buffer += vtable_size;
 
-  // Create the shared symbol table using the compact table at this spot in the
-  // misc data space. (Todo: move this to read-only space. Currently
-  // this is mapped copy-on-write but will never be written into).
-
-  buffer = (char*)SymbolTable::init_shared_table(buffer);
-  SymbolTable::create_table();
-
-  // Create the shared string table using the compact table
-  buffer = (char*)StringTable::init_shared_table(mapinfo, buffer);
-
-  // Create the shared dictionary using the bucket array at this spot in
-  // the misc data space.  Since the shared dictionary table is never
-  // modified, this region (of mapped pages) will be (effectively, if
-  // not explicitly) read-only.
-
   int sharedDictionaryLen = *(intptr_t*)buffer;
   buffer += sizeof(intptr_t);
   int number_of_entries = *(intptr_t*)buffer;
@@ -1129,9 +1134,14 @@
   buffer += sizeof(intptr_t);
   buffer += len;
 
+  // Verify various attributes of the archive, plus initialize the
+  // shared string/symbol tables
   intptr_t* array = (intptr_t*)buffer;
   ReadClosure rc(&array);
-  serialize(&rc);
+  serialize(&rc, NULL, NULL);
+
+  // Initialize the run-time symbol table.
+  SymbolTable::create_table();
 
   // Close the mapinfo file
   mapinfo->close();
--- a/hotspot/src/share/vm/memory/metaspaceShared.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/memory/metaspaceShared.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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
@@ -47,7 +47,7 @@
 #define MIN_SHARED_READ_WRITE_SIZE      (NOT_LP64(7*M) LP64_ONLY(12*M))
 
 #define DEFAULT_SHARED_READ_ONLY_SIZE   (NOT_LP64(12*M) LP64_ONLY(16*M))
-#define MIN_SHARED_READ_ONLY_SIZE       (NOT_LP64(8*M) LP64_ONLY(9*M))
+#define MIN_SHARED_READ_ONLY_SIZE       (NOT_LP64(9*M) LP64_ONLY(10*M))
 
 // the MIN_SHARED_MISC_DATA_SIZE and MIN_SHARED_MISC_CODE_SIZE estimates are based on
 // the sizes required for dumping the archive using the default classlist. The sizes
@@ -193,7 +193,8 @@
                                       void** vtable,
                                       char** md_top, char* md_end,
                                       char** mc_top, char* mc_end);
-  static void serialize(SerializeClosure* sc);
+  static void serialize(SerializeClosure* sc, GrowableArray<MemRegion> *string_space,
+                        size_t* space_size);
 
   static MetaspaceSharedStats* stats() {
     return &_stats;
--- a/hotspot/src/share/vm/memory/virtualspace.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/memory/virtualspace.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -751,6 +751,29 @@
   return low() <= (const char*) p && (const char*) p < high();
 }
 
+static void pretouch_expanded_memory(void* start, void* end) {
+  assert(is_ptr_aligned(start, os::vm_page_size()), "Unexpected alignment");
+  assert(is_ptr_aligned(end,   os::vm_page_size()), "Unexpected alignment");
+
+  os::pretouch_memory(start, end);
+}
+
+static bool commit_expanded(char* start, size_t size, size_t alignment, bool pre_touch, bool executable) {
+  if (os::commit_memory(start, size, alignment, executable)) {
+    if (pre_touch || AlwaysPreTouch) {
+      pretouch_expanded_memory(start, start + size);
+    }
+    return true;
+  }
+
+  debug_only(warning(
+      "INFO: os::commit_memory(" PTR_FORMAT ", " PTR_FORMAT
+      " size=" SIZE_FORMAT ", executable=%d) failed",
+      p2i(start), p2i(start + size), size, executable);)
+
+  return false;
+}
+
 /*
    First we need to determine if a particular virtual space is using large
    pages.  This is done at the initialize function and only virtual spaces
@@ -764,7 +787,9 @@
    allocated with default pages.
 */
 bool VirtualSpace::expand_by(size_t bytes, bool pre_touch) {
-  if (uncommitted_size() < bytes) return false;
+  if (uncommitted_size() < bytes) {
+    return false;
+  }
 
   if (special()) {
     // don't commit memory if the entire space is pinned in memory
@@ -774,30 +799,23 @@
 
   char* previous_high = high();
   char* unaligned_new_high = high() + bytes;
-  assert(unaligned_new_high <= high_boundary(),
-         "cannot expand by more than upper boundary");
+  assert(unaligned_new_high <= high_boundary(), "cannot expand by more than upper boundary");
 
   // Calculate where the new high for each of the regions should be.  If
   // the low_boundary() and high_boundary() are LargePageSizeInBytes aligned
   // then the unaligned lower and upper new highs would be the
   // lower_high() and upper_high() respectively.
-  char* unaligned_lower_new_high =
-    MIN2(unaligned_new_high, lower_high_boundary());
-  char* unaligned_middle_new_high =
-    MIN2(unaligned_new_high, middle_high_boundary());
-  char* unaligned_upper_new_high =
-    MIN2(unaligned_new_high, upper_high_boundary());
+  char* unaligned_lower_new_high =  MIN2(unaligned_new_high, lower_high_boundary());
+  char* unaligned_middle_new_high = MIN2(unaligned_new_high, middle_high_boundary());
+  char* unaligned_upper_new_high =  MIN2(unaligned_new_high, upper_high_boundary());
 
   // Align the new highs based on the regions alignment.  lower and upper
   // alignment will always be default page size.  middle alignment will be
   // LargePageSizeInBytes if the actual size of the virtual space is in
   // fact larger than LargePageSizeInBytes.
-  char* aligned_lower_new_high =
-    (char*) round_to((intptr_t) unaligned_lower_new_high, lower_alignment());
-  char* aligned_middle_new_high =
-    (char*) round_to((intptr_t) unaligned_middle_new_high, middle_alignment());
-  char* aligned_upper_new_high =
-    (char*) round_to((intptr_t) unaligned_upper_new_high, upper_alignment());
+  char* aligned_lower_new_high =  (char*) round_to((intptr_t) unaligned_lower_new_high, lower_alignment());
+  char* aligned_middle_new_high = (char*) round_to((intptr_t) unaligned_middle_new_high, middle_alignment());
+  char* aligned_upper_new_high =  (char*) round_to((intptr_t) unaligned_upper_new_high, upper_alignment());
 
   // Determine which regions need to grow in this expand_by call.
   // If you are growing in the lower region, high() must be in that
@@ -808,75 +826,48 @@
   // is an intra or inter region growth.
   size_t lower_needs = 0;
   if (aligned_lower_new_high > lower_high()) {
-    lower_needs =
-      pointer_delta(aligned_lower_new_high, lower_high(), sizeof(char));
+    lower_needs = pointer_delta(aligned_lower_new_high, lower_high(), sizeof(char));
   }
   size_t middle_needs = 0;
   if (aligned_middle_new_high > middle_high()) {
-    middle_needs =
-      pointer_delta(aligned_middle_new_high, middle_high(), sizeof(char));
+    middle_needs = pointer_delta(aligned_middle_new_high, middle_high(), sizeof(char));
   }
   size_t upper_needs = 0;
   if (aligned_upper_new_high > upper_high()) {
-    upper_needs =
-      pointer_delta(aligned_upper_new_high, upper_high(), sizeof(char));
+    upper_needs = pointer_delta(aligned_upper_new_high, upper_high(), sizeof(char));
   }
 
   // Check contiguity.
-  assert(low_boundary() <= lower_high() &&
-         lower_high() <= lower_high_boundary(),
+  assert(low_boundary() <= lower_high() && lower_high() <= lower_high_boundary(),
          "high address must be contained within the region");
-  assert(lower_high_boundary() <= middle_high() &&
-         middle_high() <= middle_high_boundary(),
+  assert(lower_high_boundary() <= middle_high() && middle_high() <= middle_high_boundary(),
          "high address must be contained within the region");
-  assert(middle_high_boundary() <= upper_high() &&
-         upper_high() <= upper_high_boundary(),
+  assert(middle_high_boundary() <= upper_high() && upper_high() <= upper_high_boundary(),
          "high address must be contained within the region");
 
   // Commit regions
   if (lower_needs > 0) {
-    assert(low_boundary() <= lower_high() &&
-           lower_high() + lower_needs <= lower_high_boundary(),
-           "must not expand beyond region");
-    if (!os::commit_memory(lower_high(), lower_needs, _executable)) {
-      debug_only(warning("INFO: os::commit_memory(" PTR_FORMAT
-                         ", lower_needs=" SIZE_FORMAT ", %d) failed",
-                         p2i(lower_high()), lower_needs, _executable);)
+    assert(lower_high() + lower_needs <= lower_high_boundary(), "must not expand beyond region");
+    if (!commit_expanded(lower_high(), lower_needs, _lower_alignment, pre_touch, _executable)) {
       return false;
-    } else {
-      _lower_high += lower_needs;
     }
+    _lower_high += lower_needs;
   }
+
   if (middle_needs > 0) {
-    assert(lower_high_boundary() <= middle_high() &&
-           middle_high() + middle_needs <= middle_high_boundary(),
-           "must not expand beyond region");
-    if (!os::commit_memory(middle_high(), middle_needs, middle_alignment(),
-                           _executable)) {
-      debug_only(warning("INFO: os::commit_memory(" PTR_FORMAT
-                         ", middle_needs=" SIZE_FORMAT ", " SIZE_FORMAT
-                         ", %d) failed", p2i(middle_high()), middle_needs,
-                         middle_alignment(), _executable);)
+    assert(middle_high() + middle_needs <= middle_high_boundary(), "must not expand beyond region");
+    if (!commit_expanded(middle_high(), middle_needs, _middle_alignment, pre_touch, _executable)) {
       return false;
     }
     _middle_high += middle_needs;
   }
+
   if (upper_needs > 0) {
-    assert(middle_high_boundary() <= upper_high() &&
-           upper_high() + upper_needs <= upper_high_boundary(),
-           "must not expand beyond region");
-    if (!os::commit_memory(upper_high(), upper_needs, _executable)) {
-      debug_only(warning("INFO: os::commit_memory(" PTR_FORMAT
-                         ", upper_needs=" SIZE_FORMAT ", %d) failed",
-                         p2i(upper_high()), upper_needs, _executable);)
+    assert(upper_high() + upper_needs <= upper_high_boundary(), "must not expand beyond region");
+    if (!commit_expanded(upper_high(), upper_needs, _upper_alignment, pre_touch, _executable)) {
       return false;
-    } else {
-      _upper_high += upper_needs;
     }
-  }
-
-  if (pre_touch || AlwaysPreTouch) {
-    os::pretouch_memory(previous_high, unaligned_new_high);
+    _upper_high += upper_needs;
   }
 
   _high += bytes;
@@ -1092,6 +1083,12 @@
     test_log("test_reserved_space3(%p, %p, %d)",
         (void*)(uintptr_t)size, (void*)(uintptr_t)alignment, maybe_large);
 
+    if (size < alignment) {
+      // Tests might set -XX:LargePageSizeInBytes=<small pages> and cause unexpected input arguments for this test.
+      assert((size_t)os::vm_page_size() == os::large_page_size(), "Test needs further refinement");
+      return;
+    }
+
     assert(is_size_aligned(size, os::vm_allocation_granularity()), "Must be at least AG aligned");
     assert(is_size_aligned(size, alignment), "Must be at least aligned against alignment");
 
--- a/hotspot/src/share/vm/oops/cpCache.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/oops/cpCache.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -569,7 +569,7 @@
                                    const intArray& invokedynamic_references_map) {
   for (int i = 0; i < inverse_index_map.length(); i++) {
     ConstantPoolCacheEntry* e = entry_at(i);
-    int original_index = inverse_index_map[i];
+    int original_index = inverse_index_map.at(i);
     e->initialize_entry(original_index);
     assert(entry_at(i) == e, "sanity");
   }
@@ -579,19 +579,19 @@
   for (int i = 0; i < invokedynamic_inverse_index_map.length(); i++) {
     int offset = i + invokedynamic_offset;
     ConstantPoolCacheEntry* e = entry_at(offset);
-    int original_index = invokedynamic_inverse_index_map[i];
+    int original_index = invokedynamic_inverse_index_map.at(i);
     e->initialize_entry(original_index);
     assert(entry_at(offset) == e, "sanity");
   }
 
   for (int ref = 0; ref < invokedynamic_references_map.length(); ref++) {
-    const int cpci = invokedynamic_references_map[ref];
+    const int cpci = invokedynamic_references_map.at(ref);
     if (cpci >= 0) {
 #ifdef ASSERT
       // invokedynamic and invokehandle have more entries; check if they
       // all point to the same constant pool cache entry.
       for (int entry = 1; entry < ConstantPoolCacheEntry::_indy_resolved_references_entries; entry++) {
-        const int cpci_next = invokedynamic_references_map[ref + entry];
+        const int cpci_next = invokedynamic_references_map.at(ref + entry);
         assert(cpci == cpci_next, "%d == %d", cpci, cpci_next);
       }
 #endif
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2032,10 +2032,11 @@
   return (old_state != is_in_error_state());
 }
 
+#if INCLUDE_JVMTI
 static void clear_all_breakpoints(Method* m) {
   m->clear_all_breakpoints();
 }
-
+#endif
 
 void InstanceKlass::notify_unload_class(InstanceKlass* ik) {
   // notify the debugger
@@ -2097,6 +2098,7 @@
   // DC::remove_all_dependents() when it touches unloaded nmethod.
   dependencies().wipe();
 
+#if INCLUDE_JVMTI
   // Deallocate breakpoint records
   if (breakpoints() != 0x0) {
     methods_do(clear_all_breakpoints);
@@ -2108,6 +2110,7 @@
     os::free(_cached_class_file);
     _cached_class_file = NULL;
   }
+#endif
 
   // Decrement symbol reference counts associated with the unloaded class.
   if (_name != NULL) _name->decrement_refcount();
@@ -2841,7 +2844,7 @@
   {
     bool have_pv = false;
     // previous versions are linked together through the InstanceKlass
-    for (InstanceKlass* pv_node = _previous_versions;
+    for (InstanceKlass* pv_node = previous_versions();
          pv_node != NULL;
          pv_node = pv_node->previous_versions()) {
       if (!have_pv)
@@ -3334,7 +3337,7 @@
 }
 #endif
 
-
+#if INCLUDE_JVMTI
 
 // RedefineClasses() support for previous versions:
 int InstanceKlass::_previous_version_count = 0;
@@ -3549,6 +3552,7 @@
   _previous_version_count++;
 } // end add_previous_version()
 
+#endif // INCLUDE_JVMTI
 
 Method* InstanceKlass::method_with_idnum(int idnum) {
   Method* m = NULL;
@@ -3598,7 +3602,7 @@
   return method;
 }
 
-
+#if INCLUDE_JVMTI
 jint InstanceKlass::get_cached_class_file_len() {
   return VM_RedefineClasses::get_cached_class_file_len(_cached_class_file);
 }
@@ -3606,3 +3610,4 @@
 unsigned char * InstanceKlass::get_cached_class_file_bytes() {
   return VM_RedefineClasses::get_cached_class_file_bytes(_cached_class_file);
 }
+#endif
--- a/hotspot/src/share/vm/oops/instanceKlass.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -57,7 +57,9 @@
 
 
 // forward declaration for class -- see below for definition
+#if INCLUDE_JVMTI
 class BreakpointInfo;
+#endif
 class ClassFileParser;
 class KlassDepChange;
 class DependencyContext;
@@ -230,12 +232,14 @@
   jmethodID*      _methods_jmethod_ids;  // jmethodIDs corresponding to method_idnum, or NULL if none
   intptr_t        _dep_context;          // packed DependencyContext structure
   nmethod*        _osr_nmethods_head;    // Head of list of on-stack replacement nmethods for this class
+#if INCLUDE_JVMTI
   BreakpointInfo* _breakpoints;          // bpt lists, managed by Method*
   // Linked instanceKlasses of previous versions
   InstanceKlass* _previous_versions;
   // JVMTI fields can be moved to their own structure - see 6315920
   // JVMTI: cached class file, before retransformable agent modified it in CFLH
   JvmtiCachedClassFileData* _cached_class_file;
+#endif
 
   volatile u2     _idnum_allocated_count;         // JNI/JVMTI: increments with the addition of methods, old ids don't change
 
@@ -245,7 +249,9 @@
   u1              _init_state;                    // state of class
   u1              _reference_type;                // reference type
 
+#if INCLUDE_JVMTI
   JvmtiCachedClassFieldMap* _jvmti_cached_class_field_map;  // JVMTI: used during heap iteration
+#endif
 
   NOT_PRODUCT(int _verify_count;)  // to avoid redundant verifies
 
@@ -687,10 +693,14 @@
     _nonstatic_oop_map_size = words;
   }
 
+#if INCLUDE_JVMTI
   // RedefineClasses() support for previous versions:
   void add_previous_version(instanceKlassHandle ikh, int emcp_method_count);
 
   InstanceKlass* previous_versions() const { return _previous_versions; }
+#else
+  InstanceKlass* previous_versions() const { return NULL; }
+#endif
 
   InstanceKlass* get_klass_version(int version) {
     for (InstanceKlass* ik = this; ik != NULL; ik = ik->previous_versions()) {
@@ -738,6 +748,8 @@
   bool is_mirror_instance_klass() const       { return is_kind(_misc_kind_mirror); }
   bool is_class_loader_instance_klass() const { return is_kind(_misc_kind_class_loader); }
 
+#if INCLUDE_JVMTI
+
   void init_previous_versions() {
     _previous_versions = NULL;
   }
@@ -764,6 +776,16 @@
     return _jvmti_cached_class_field_map;
   }
 
+#else // INCLUDE_JVMTI
+
+  static void purge_previous_versions(InstanceKlass* ik) { return; };
+  static bool has_previous_versions() { return false; }
+
+  void set_cached_class_file(JvmtiCachedClassFileData *data) { ShouldNotReachHere(); }
+  JvmtiCachedClassFileData * get_cached_class_file() { return (JvmtiCachedClassFileData *)NULL; }
+
+#endif // INCLUDE_JVMTI
+
   bool has_default_methods() const {
     return (_misc_flags & _misc_has_default_methods) != 0;
   }
@@ -882,9 +904,11 @@
   int mark_osr_nmethods(const Method* m);
   nmethod* lookup_osr_nmethod(const Method* m, int bci, int level, bool match_level) const;
 
+#if INCLUDE_JVMTI
   // Breakpoint support (see methods on Method* for details)
   BreakpointInfo* breakpoints() const       { return _breakpoints; };
   void set_breakpoints(BreakpointInfo* bps) { _breakpoints = bps; };
+#endif
 
   // support for stub routines
   static ByteSize init_state_offset()  { return in_ByteSize(offset_of(InstanceKlass, _init_state)); }
@@ -1253,9 +1277,11 @@
   // Free CHeap allocated fields.
   void release_C_heap_structures();
 
+#if INCLUDE_JVMTI
   // RedefineClasses support
   void link_previous_versions(InstanceKlass* pv) { _previous_versions = pv; }
   void mark_newly_obsolete_methods(Array<Method*>* old_methods, int emcp_method_count);
+#endif
 public:
   // CDS support - remove and restore oops from metadata. Oops are not shared.
   virtual void remove_unshareable_info();
--- a/hotspot/src/share/vm/oops/method.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/oops/method.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1628,6 +1628,7 @@
   return true;
 }
 
+#if INCLUDE_JVMTI
 
 Bytecodes::Code Method::orig_bytecode_at(int bci) const {
   BreakpointInfo* bp = method_holder()->breakpoints();
@@ -1708,6 +1709,7 @@
   clear_matches(this, -1);
 }
 
+#endif // INCLUDE_JVMTI
 
 int Method::invocation_count() {
   MethodCounters *mcs = method_counters();
@@ -1773,6 +1775,8 @@
   }
 }
 
+#if INCLUDE_JVMTI
+
 BreakpointInfo::BreakpointInfo(Method* m, int bci) {
   _bci = bci;
   _name_index = m->name_index();
@@ -1810,6 +1814,8 @@
   method->decr_number_of_breakpoints(Thread::current());
 }
 
+#endif // INCLUDE_JVMTI
+
 // jmethodID handling
 
 // This is a block allocating object, sort of like JNIHandleBlock, only a
--- a/hotspot/src/share/vm/oops/method.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/oops/method.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -187,8 +187,18 @@
   }
 
   // JVMTI breakpoints
+#if !INCLUDE_JVMTI
+  Bytecodes::Code orig_bytecode_at(int bci) const {
+    ShouldNotReachHere();
+    return Bytecodes::_shouldnotreachhere;
+  }
+  void set_orig_bytecode_at(int bci, Bytecodes::Code code) {
+    ShouldNotReachHere();
+  };
+  u2   number_of_breakpoints() const {return 0;}
+#else // !INCLUDE_JVMTI
   Bytecodes::Code orig_bytecode_at(int bci) const;
-  void        set_orig_bytecode_at(int bci, Bytecodes::Code code);
+  void set_orig_bytecode_at(int bci, Bytecodes::Code code);
   void set_breakpoint(int bci);
   void clear_breakpoint(int bci);
   void clear_all_breakpoints();
@@ -221,6 +231,7 @@
       mcs->clear_number_of_breakpoints();
     }
   }
+#endif // !INCLUDE_JVMTI
 
   // index into InstanceKlass methods() array
   // note: also used by jfr
@@ -1034,6 +1045,8 @@
 };
 
 
+#if INCLUDE_JVMTI
+
 /// Fast Breakpoints.
 
 // If this structure gets more complicated (because bpts get numerous),
@@ -1078,6 +1091,8 @@
   void clear(Method* method);
 };
 
+#endif // INCLUDE_JVMTI
+
 // Utility class for access exception handlers
 class ExceptionTable : public StackObj {
  private:
--- a/hotspot/src/share/vm/oops/methodCounters.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/oops/methodCounters.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -38,7 +38,9 @@
   int               _interpreter_invocation_count; // Count of times invoked (reused as prev_event_count in tiered)
   u2                _interpreter_throwout_count; // Count of times method was exited via exception while interpreting
 #endif
+#if INCLUDE_JVMTI
   u2                _number_of_breakpoints;      // fullspeed debugging support
+#endif
   InvocationCounter _invocation_counter;         // Incremented before each activation of the method - used to trigger frequency-based optimizations
   InvocationCounter _backedge_counter;           // Incremented before each backedge taken - used to trigger frequencey-based optimizations
   // NMethod age is a counter for warm methods detection in the code cache sweeper.
@@ -62,8 +64,7 @@
   u1                _highest_osr_comp_level;      // Same for OSR level
 #endif
 
-  MethodCounters(methodHandle mh) : _number_of_breakpoints(0),
-                                    _nmethod_age(INT_MAX)
+  MethodCounters(methodHandle mh) : _nmethod_age(INT_MAX)
 #ifdef TIERED
                                  , _rate(0),
                                    _prev_time(0),
@@ -73,6 +74,7 @@
   {
     set_interpreter_invocation_count(0);
     set_interpreter_throwout_count(0);
+    JVMTI_ONLY(clear_number_of_breakpoints());
     invocation_counter()->init();
     backedge_counter()->init();
 
@@ -153,10 +155,12 @@
 
 #endif // defined(COMPILER2) || INCLUDE_JVMCI
 
+#if INCLUDE_JVMTI
   u2   number_of_breakpoints() const   { return _number_of_breakpoints; }
   void incr_number_of_breakpoints()    { ++_number_of_breakpoints; }
   void decr_number_of_breakpoints()    { --_number_of_breakpoints; }
   void clear_number_of_breakpoints()   { _number_of_breakpoints = 0; }
+#endif
 
 #ifdef TIERED
   jlong prev_time() const                        { return _prev_time; }
--- a/hotspot/src/share/vm/opto/block.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/block.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -73,7 +73,7 @@
 }
 #endif
 
-uint Block::code_alignment() {
+uint Block::code_alignment() const {
   // Check for Root block
   if (_pre_order == 0) return CodeEntryAlignment;
   // Check for Start block
@@ -1727,8 +1727,14 @@
     first_block()->set_loop_alignment(targ_block);
 
   } else {
-    // Backbranch into the middle of a trace
-    targ_block->set_loop_alignment(targ_block);
+    // That loop may already have a loop top (we're reaching it again
+    // through the backedge of an outer loop)
+    Block* b = prev(targ_block);
+    bool has_top = targ_block->head()->is_Loop() && b->has_loop_alignment() && !b->head()->is_Loop();
+    if (!has_top) {
+      // Backbranch into the middle of a trace
+      targ_block->set_loop_alignment(targ_block);
+    }
   }
 
   return loop_rotated;
--- a/hotspot/src/share/vm/opto/block.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/block.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -197,7 +197,7 @@
 
   // Report the alignment required by this block.  Must be a power of 2.
   // The previous block will insert nops to get this alignment.
-  uint code_alignment();
+  uint code_alignment() const;
   uint compute_loop_alignment();
 
   // BLOCK_FREQUENCY is a sentinel to mark uses of constant block frequencies.
--- a/hotspot/src/share/vm/opto/c2_globals.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/c2_globals.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -587,7 +587,7 @@
           range(0, 100)                                                     \
                                                                             \
   product(bool, BlockLayoutRotateLoops, true,                               \
-          "Allow back branches to be fall throughs in the block layour")    \
+          "Allow back branches to be fall throughs in the block layout")    \
                                                                             \
   develop(bool, InlineReflectionGetCallerClass, true,                       \
           "inline sun.reflect.Reflection.getCallerClass(), known to be "    \
--- a/hotspot/src/share/vm/opto/c2compiler.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/c2compiler.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -361,6 +361,9 @@
   case vmIntrinsics::_getCallerClass:
     if (SystemDictionary::reflect_CallerSensitive_klass() == NULL) return false;
     break;
+  case vmIntrinsics::_onSpinWait:
+    if (!Matcher::match_rule_supported(Op_OnSpinWait)) return false;
+    break;
   case vmIntrinsics::_hashCode:
   case vmIntrinsics::_identityHashCode:
   case vmIntrinsics::_getClass:
--- a/hotspot/src/share/vm/opto/cfgnode.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/cfgnode.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1703,16 +1703,19 @@
     }
 
     if (uncasted) {
-      // Wait until after parsing for the type information to propagate from the casts
+      // Add a cast node between the phi to be removed and its unique input.
+      // Wait until after parsing for the type information to propagate from the casts.
       assert(can_reshape, "Invalid during parsing");
       const Type* phi_type = bottom_type();
       assert(phi_type->isa_int() || phi_type->isa_ptr(), "bad phi type");
       int opcode;
+      // Determine the type of cast to be added.
       if (phi_type->isa_int()) {
         opcode = Op_CastII;
       } else {
         const Type* uin_type = phase->type(uin);
-        if (phi_type->join(TypePtr::NOTNULL) == uin_type->join(TypePtr::NOTNULL)) {
+        if ((phi_type->join(TypePtr::NOTNULL) == uin_type->join(TypePtr::NOTNULL)) ||
+            (!phi_type->isa_oopptr() && !uin_type->isa_oopptr())) {
           opcode = Op_CastPP;
         } else {
           opcode = Op_CheckCastPP;
--- a/hotspot/src/share/vm/opto/classes.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/classes.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -171,7 +171,6 @@
 macro(LoadRange)
 macro(LoadS)
 macro(Lock)
-macro(Log10D)
 macro(Loop)
 macro(LoopLimit)
 macro(Mach)
@@ -179,6 +178,7 @@
 macro(MaxI)
 macro(MemBarAcquire)
 macro(LoadFence)
+macro(SetVectMaskI)
 macro(MemBarAcquireLock)
 macro(MemBarCPUOrder)
 macro(MemBarRelease)
@@ -205,6 +205,7 @@
 macro(NegD)
 macro(NegF)
 macro(NeverBranch)
+macro(OnSpinWait)
 macro(Opaque1)
 macro(Opaque2)
 macro(Opaque3)
@@ -264,7 +265,6 @@
 macro(SubL)
 macro(TailCall)
 macro(TailJump)
-macro(TanD)
 macro(ThreadLocal)
 macro(Unlock)
 macro(URShiftI)
--- a/hotspot/src/share/vm/opto/graphKit.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/graphKit.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -4467,6 +4467,25 @@
   set_memory(st, TypeAryPtr::BYTES);
 }
 
+Node* GraphKit::make_constant_from_field(ciField* field, Node* obj) {
+  if (!field->is_constant()) {
+    return NULL; // Field not marked as constant.
+  }
+  ciInstance* holder = NULL;
+  if (!field->is_static()) {
+    ciObject* const_oop = obj->bottom_type()->is_oopptr()->const_oop();
+    if (const_oop != NULL && const_oop->is_instance()) {
+      holder = const_oop->as_instance();
+    }
+  }
+  const Type* con_type = Type::make_constant_from_field(field, holder, field->layout_type(),
+                                                        /*is_unsigned_load=*/false);
+  if (con_type != NULL) {
+    return makecon(con_type);
+  }
+  return NULL;
+}
+
 Node* GraphKit::cast_array_to_stable(Node* ary, const TypeAryPtr* ary_type) {
   // Reify the property as a CastPP node in Ideal graph to comply with monotonicity
   // assumption of CCP analysis.
--- a/hotspot/src/share/vm/opto/graphKit.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/graphKit.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -910,6 +910,8 @@
   void add_predicate(int nargs = 0);
   void add_predicate_impl(Deoptimization::DeoptReason reason, int nargs);
 
+  Node* make_constant_from_field(ciField* field, Node* obj);
+
   // Produce new array node of stable type
   Node* cast_array_to_stable(Node* ary, const TypeAryPtr* ary_type);
 };
--- a/hotspot/src/share/vm/opto/library_call.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -281,6 +281,7 @@
   MemNode::MemOrd access_kind_to_memord(AccessKind access_kind);
   bool inline_unsafe_load_store(BasicType type,  LoadStoreKind kind, AccessKind access_kind);
   bool inline_unsafe_fence(vmIntrinsics::ID id);
+  bool inline_onspinwait();
   bool inline_fp_conversions(vmIntrinsics::ID id);
   bool inline_number_methods(vmIntrinsics::ID id);
   bool inline_reference_get();
@@ -696,6 +697,8 @@
   case vmIntrinsics::_storeFence:
   case vmIntrinsics::_fullFence:                return inline_unsafe_fence(intrinsic_id());
 
+  case vmIntrinsics::_onSpinWait:               return inline_onspinwait();
+
   case vmIntrinsics::_currentThread:            return inline_native_currentThread();
   case vmIntrinsics::_isInterrupted:            return inline_native_isInterrupted();
 
@@ -1677,7 +1680,6 @@
   switch (id) {
   case vmIntrinsics::_dabs:   n = new AbsDNode(                arg);  break;
   case vmIntrinsics::_dsqrt:  n = new SqrtDNode(C, control(),  arg);  break;
-  case vmIntrinsics::_dlog10: n = new Log10DNode(C, control(), arg);  break;
   default:  fatal_unexpected_iid(id);  break;
   }
   set_result(_gvn.transform(n));
@@ -1691,10 +1693,6 @@
   Node* arg = round_double_node(argument(0));
   Node* n = NULL;
 
-  switch (id) {
-  case vmIntrinsics::_dtan:  n = new TanDNode(C, control(), arg);  break;
-  default:  fatal_unexpected_iid(id);  break;
-  }
   n = _gvn.transform(n);
 
   // Rounding required?  Check for argument reduction!
@@ -1812,15 +1810,18 @@
     return StubRoutines::dcos() != NULL ?
       runtime_math(OptoRuntime::Math_D_D_Type(), StubRoutines::dcos(), "dcos") :
       runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dcos),   "COS");
-  case vmIntrinsics::_dtan:   return Matcher::has_match_rule(Op_TanD)   ? inline_trig(id) :
-    runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dtan),   "TAN");
-
+  case vmIntrinsics::_dtan:
+    return StubRoutines::dtan() != NULL ?
+      runtime_math(OptoRuntime::Math_D_D_Type(), StubRoutines::dtan(), "dtan") :
+      runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dtan), "TAN");
   case vmIntrinsics::_dlog:
     return StubRoutines::dlog() != NULL ?
       runtime_math(OptoRuntime::Math_D_D_Type(), StubRoutines::dlog(), "dlog") :
       runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dlog),   "LOG");
-  case vmIntrinsics::_dlog10: return Matcher::has_match_rule(Op_Log10D) ? inline_math(id) :
-    runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dlog10), "LOG10");
+  case vmIntrinsics::_dlog10:
+    return StubRoutines::dlog10() != NULL ?
+      runtime_math(OptoRuntime::Math_D_D_Type(), StubRoutines::dlog10(), "dlog10") :
+      runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dlog10), "LOG10");
 
     // These intrinsics are supported on all hardware
   case vmIntrinsics::_dsqrt:  return Matcher::match_rule_supported(Op_SqrtD) ? inline_math(id) : false;
@@ -2550,13 +2551,9 @@
     Node* p = NULL;
     // Try to constant fold a load from a constant field
     ciField* field = alias_type->field();
-    if (heap_base_oop != top() &&
-        field != NULL && field->is_constant() && !mismatched) {
+    if (heap_base_oop != top() && field != NULL && field->is_constant() && !mismatched) {
       // final or stable field
-      const Type* con_type = Type::make_constant(alias_type->field(), heap_base_oop);
-      if (con_type != NULL) {
-        p = makecon(con_type);
-      }
+      p = make_constant_from_field(field, heap_base_oop);
     }
     if (p == NULL) {
       // To be valid, unsafe loads may depend on other conditions than
@@ -3127,6 +3124,11 @@
   }
 }
 
+bool LibraryCallKit::inline_onspinwait() {
+  insert_mem_bar(Op_OnSpinWait);
+  return true;
+}
+
 bool LibraryCallKit::klass_needs_init_guard(Node* kls) {
   if (!kls->is_Con()) {
     return true;
--- a/hotspot/src/share/vm/opto/loopUnswitch.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/loopUnswitch.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -374,10 +374,17 @@
     return false; // skip malformed counted loop
   }
   if (!cl->is_main_loop()) {
-    if (TraceLoopOpts) {
-      tty->print_cr("CountedLoopReserveKit::create_reserve: %d not main loop", cl->_idx);
+    bool loop_not_canonical = true;
+    if (cl->is_post_loop() && (cl->slp_max_unroll() > 0)) {
+      loop_not_canonical = false;
     }
-    return false; // skip normal, pre, and post loops
+    // only reject some loop forms
+    if (loop_not_canonical) {
+      if (TraceLoopOpts) {
+        tty->print_cr("CountedLoopReserveKit::create_reserve: %d not canonical loop", cl->_idx);
+      }
+      return false; // skip normal, pre, and post (conditionally) loops
+    }
   }
 
   _lp = _lpt->_head->as_Loop();
--- a/hotspot/src/share/vm/opto/loopnode.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/loopnode.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2369,11 +2369,13 @@
                   if (multi_version_post_loops(lpt, lpt_next) == false) {
                     // Cause the rce loop to be optimized away if we fail
                     cl->mark_is_multiversioned();
+                    cl->set_slp_max_unroll(0);
                     poison_rce_post_loop(lpt);
                   }
                 }
               }
             }
+            sw.transform_loop(lpt, true);
           }
         } else if (cl->is_main_loop()) {
           sw.transform_loop(lpt, true);
--- a/hotspot/src/share/vm/opto/macro.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/macro.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -860,7 +860,7 @@
       if (basic_elem_type == T_OBJECT || basic_elem_type == T_ARRAY) {
         if (!elem_type->is_loaded()) {
           field_type = TypeInstPtr::BOTTOM;
-        } else if (field != NULL && field->is_constant() && field->is_static()) {
+        } else if (field != NULL && field->is_static_constant()) {
           // This can happen if the constant oop is non-perm.
           ciObject* con = field->constant_value().as_object();
           // Do not "join" in the previous type; it doesn't add value,
--- a/hotspot/src/share/vm/opto/matcher.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/matcher.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -944,6 +944,7 @@
     case Op_MemBarCPUOrder: // %%% these ideals should have narrower adr_type?
     case Op_StrInflatedCopy:
     case Op_StrCompressedCopy:
+    case Op_OnSpinWait:
     case Op_EncodeISOArray:
       nidx = Compile::AliasIdxTop;
       nat = NULL;
--- a/hotspot/src/share/vm/opto/matcher.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/matcher.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -273,6 +273,9 @@
   // e.g. Op_ vector nodes and other intrinsics while guarding with vlen
   static const bool match_rule_supported_vector(int opcode, int vlen);
 
+  // Some microarchitectures have mask registers used on vectors
+  static const bool has_predicated_vectors(void);
+
   // Some uarchs have different sized float register resources
   static const int float_pressure(int default_pressure_threshold);
 
--- a/hotspot/src/share/vm/opto/memnode.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/memnode.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -797,7 +797,7 @@
 #endif
     {
       assert(!adr->bottom_type()->is_ptr_to_narrowoop() && !adr->bottom_type()->is_ptr_to_narrowklass(), "should have got back a narrow oop");
-      load = new LoadPNode(ctl, mem, adr, adr_type, rt->is_oopptr(), mo, control_dependency);
+      load = new LoadPNode(ctl, mem, adr, adr_type, rt->is_ptr(), mo, control_dependency);
     }
     break;
   }
@@ -1621,72 +1621,6 @@
   return NULL;
 }
 
-static ciConstant check_mismatched_access(ciConstant con, BasicType loadbt, bool is_unsigned) {
-  BasicType conbt = con.basic_type();
-  switch (conbt) {
-    case T_BOOLEAN: conbt = T_BYTE;   break;
-    case T_ARRAY:   conbt = T_OBJECT; break;
-  }
-  switch (loadbt) {
-    case T_BOOLEAN:   loadbt = T_BYTE;   break;
-    case T_NARROWOOP: loadbt = T_OBJECT; break;
-    case T_ARRAY:     loadbt = T_OBJECT; break;
-    case T_ADDRESS:   loadbt = T_OBJECT; break;
-  }
-  if (conbt == loadbt) {
-    if (is_unsigned && conbt == T_BYTE) {
-      // LoadB (T_BYTE) with a small mask (<=8-bit) is converted to LoadUB (T_BYTE).
-      return ciConstant(T_INT, con.as_int() & 0xFF);
-    } else {
-      return con;
-    }
-  }
-  if (conbt == T_SHORT && loadbt == T_CHAR) {
-    // LoadS (T_SHORT) with a small mask (<=16-bit) is converted to LoadUS (T_CHAR).
-    return ciConstant(T_INT, con.as_int() & 0xFFFF);
-  }
-  return ciConstant(); // T_ILLEGAL
-}
-
-// Try to constant-fold a stable array element.
-static const Type* fold_stable_ary_elem(const TypeAryPtr* ary, int off, bool is_unsigned_load, BasicType loadbt) {
-  assert(ary->const_oop(), "array should be constant");
-  assert(ary->is_stable(), "array should be stable");
-
-  // Decode the results of GraphKit::array_element_address.
-  ciArray* aobj = ary->const_oop()->as_array();
-  ciConstant element_value = aobj->element_value_by_offset(off);
-  if (element_value.basic_type() == T_ILLEGAL) {
-    return NULL; // wrong offset
-  }
-  ciConstant con = check_mismatched_access(element_value, loadbt, is_unsigned_load);
-  assert(con.basic_type() != T_ILLEGAL, "elembt=%s; loadbt=%s; unsigned=%d",
-         type2name(element_value.basic_type()), type2name(loadbt), is_unsigned_load);
-
-  if (con.basic_type() != T_ILLEGAL && // not a mismatched access
-      !con.is_null_or_zero()) {        // not a default value
-    const Type* con_type = Type::make_from_constant(con);
-    if (con_type != NULL) {
-      if (con_type->isa_aryptr()) {
-        // Join with the array element type, in case it is also stable.
-        int dim = ary->stable_dimension();
-        con_type = con_type->is_aryptr()->cast_to_stable(true, dim-1);
-      }
-      if (loadbt == T_NARROWOOP && con_type->isa_oopptr()) {
-        con_type = con_type->make_narrowoop();
-      }
-#ifndef PRODUCT
-      if (TraceIterativeGVN) {
-        tty->print("FoldStableValues: array element [off=%d]: con_type=", off);
-        con_type->dump(); tty->cr();
-      }
-#endif //PRODUCT
-      return con_type;
-    }
-  }
-  return NULL;
-}
-
 //------------------------------Value-----------------------------------------
 const Type* LoadNode::Value(PhaseGVN* phase) const {
   // Either input is TOP ==> the result is TOP
@@ -1715,10 +1649,14 @@
     const bool off_beyond_header = ((uint)off >= (uint)min_base_off);
 
     // Try to constant-fold a stable array element.
-    if (FoldStableValues && !is_mismatched_access() && ary->is_stable() && ary->const_oop() != NULL) {
+    if (FoldStableValues && !is_mismatched_access() && ary->is_stable()) {
       // Make sure the reference is not into the header and the offset is constant
-      if (off_beyond_header && adr->is_AddP() && off != Type::OffsetBot) {
-        const Type* con_type = fold_stable_ary_elem(ary, off, is_unsigned(), memory_type());
+      ciObject* aobj = ary->const_oop();
+      if (aobj != NULL && off_beyond_header && adr->is_AddP() && off != Type::OffsetBot) {
+        int stable_dimension = (ary->stable_dimension() > 0 ? ary->stable_dimension() - 1 : 0);
+        const Type* con_type = Type::make_constant_from_array_element(aobj->as_array(), off,
+                                                                      stable_dimension,
+                                                                      memory_type(), is_unsigned());
         if (con_type != NULL) {
           return con_type;
         }
@@ -1785,28 +1723,10 @@
     // For oop loads, we expect the _type to be precise.
     // Optimizations for constant objects
     ciObject* const_oop = tinst->const_oop();
-    if (const_oop != NULL) {
-      // For constant CallSites treat the target field as a compile time constant.
-      if (const_oop->is_call_site()) {
-        ciCallSite* call_site = const_oop->as_call_site();
-        ciField* field = call_site->klass()->as_instance_klass()->get_field_by_offset(off, /*is_static=*/ false);
-        if (field != NULL && field->is_call_site_target()) {
-          ciMethodHandle* target = call_site->get_target();
-          if (target != NULL) {  // just in case
-            ciConstant constant(T_OBJECT, target);
-            const Type* t;
-            if (adr->bottom_type()->is_ptr_to_narrowoop()) {
-              t = TypeNarrowOop::make_from_constant(constant.as_object(), true);
-            } else {
-              t = TypeOopPtr::make_from_constant(constant.as_object(), true);
-            }
-            // Add a dependence for invalidation of the optimization.
-            if (!call_site->is_constant_call_site()) {
-              C->dependencies()->assert_call_site_target_value(call_site, target);
-            }
-            return t;
-          }
-        }
+    if (const_oop != NULL && const_oop->is_instance()) {
+      const Type* con_type = Type::make_constant_from_field(const_oop->as_instance(), off, is_unsigned(), memory_type());
+      if (con_type != NULL) {
+        return con_type;
       }
     }
   } else if (tp->base() == Type::KlassPtr) {
@@ -2979,6 +2899,7 @@
   case Op_MemBarReleaseLock: return new MemBarReleaseLockNode(C, atp, pn);
   case Op_MemBarVolatile:    return new MemBarVolatileNode(C, atp, pn);
   case Op_MemBarCPUOrder:    return new MemBarCPUOrderNode(C, atp, pn);
+  case Op_OnSpinWait:        return new OnSpinWaitNode(C, atp, pn);
   case Op_Initialize:        return new InitializeNode(C, atp, pn);
   case Op_MemBarStoreStore:  return new MemBarStoreStoreNode(C, atp, pn);
   default: ShouldNotReachHere(); return NULL;
--- a/hotspot/src/share/vm/opto/memnode.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/memnode.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1186,6 +1186,13 @@
   virtual uint ideal_reg() const { return 0; } // not matched in the AD file
 };
 
+class OnSpinWaitNode: public MemBarNode {
+public:
+  OnSpinWaitNode(Compile* C, int alias_idx, Node* precedent)
+    : MemBarNode(C, alias_idx, precedent) {}
+  virtual int Opcode() const;
+};
+
 // Isolation of object setup after an AllocateNode and before next safepoint.
 // (See comment in memnode.cpp near InitializeNode::InitializeNode for semantics.)
 class InitializeNode: public MemBarNode {
--- a/hotspot/src/share/vm/opto/node.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/node.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -722,8 +722,9 @@
     Flag_avoid_back_to_back_after    = Flag_avoid_back_to_back_before << 1,
     Flag_has_call                    = Flag_avoid_back_to_back_after << 1,
     Flag_is_reduction                = Flag_has_call << 1,
-    Flag_is_scheduled                = Flag_is_reduction,
-    Flag_is_expensive                = Flag_is_scheduled << 1,
+    Flag_is_scheduled                = Flag_is_reduction << 1,
+    Flag_has_vector_mask_set         = Flag_is_scheduled << 1,
+    Flag_is_expensive                = Flag_has_vector_mask_set << 1,
     _max_flags = (Flag_is_expensive << 1) - 1 // allow flags combination
   };
 
@@ -912,6 +913,9 @@
   // It must have the loop's phi as input and provide a def to the phi.
   bool is_reduction() const { return (_flags & Flag_is_reduction) != 0; }
 
+  // The node is a CountedLoopEnd with a mask annotation so as to emit a restore context
+  bool has_vector_mask_set() const { return (_flags & Flag_has_vector_mask_set) != 0; }
+
   // Used in lcm to mark nodes that have scheduled
   bool is_scheduled() const { return (_flags & Flag_is_scheduled) != 0; }
 
--- a/hotspot/src/share/vm/opto/output.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/output.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1483,8 +1483,6 @@
   // Compute the size of the first block
   _first_block_size = blk_labels[1].loc_pos() - blk_labels[0].loc_pos();
 
-  assert(cb->insts_size() < 500000, "method is unreasonably large");
-
 #ifdef ASSERT
   for (uint i = 0; i < nblocks; i++) { // For all blocks
     if (jmp_target[i] != 0) {
--- a/hotspot/src/share/vm/opto/parse3.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/parse3.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -149,9 +149,9 @@
   // Does this field have a constant value?  If so, just push the value.
   if (field->is_constant()) {
     // final or stable field
-    const Type* con_type = Type::make_constant(field, obj);
-    if (con_type != NULL) {
-      push_node(con_type->basic_type(), makecon(con_type));
+    Node* con = make_constant_from_field(field, obj);
+    if (con != NULL) {
+      push_node(field->layout_type(), con);
       return;
     }
   }
@@ -174,12 +174,16 @@
     if (!field->type()->is_loaded()) {
       type = TypeInstPtr::BOTTOM;
       must_assert_null = true;
-    } else if (field->is_constant() && field->is_static()) {
+    } else if (field->is_static_constant()) {
       // This can happen if the constant oop is non-perm.
       ciObject* con = field->constant_value().as_object();
       // Do not "join" in the previous type; it doesn't add value,
       // and may yield a vacuous result if the field is of interface type.
-      type = TypeOopPtr::make_from_constant(con)->isa_oopptr();
+      if (con->is_null_object()) {
+        type = TypePtr::NULL_PTR;
+      } else {
+        type = TypeOopPtr::make_from_constant(con)->isa_oopptr();
+      }
       assert(type != NULL, "field singleton type must be consistent");
     } else {
       type = TypeOopPtr::make_from_klass(field_klass->as_klass());
--- a/hotspot/src/share/vm/opto/regmask.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/regmask.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -389,7 +389,7 @@
 //------------------------------Size-------------------------------------------
 // Compute size of register mask in bits
 uint RegMask::Size() const {
-  extern uint8_t bitsInByte[512];
+  extern uint8_t bitsInByte[BITS_IN_BYTE_ARRAY_SIZE];
   uint sum = 0;
   for( int i = 0; i < RM_SIZE; i++ )
     sum +=
--- a/hotspot/src/share/vm/opto/stringopts.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/stringopts.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1112,7 +1112,7 @@
   if( bt == T_OBJECT ) {
     if (!field->type()->is_loaded()) {
       type = TypeInstPtr::BOTTOM;
-    } else if (field->is_constant()) {
+    } else if (field->is_static_constant()) {
       // This can happen if the constant oop is non-perm.
       ciObject* con = field->constant_value().as_object();
       // Do not "join" in the previous type; it doesn't add value,
--- a/hotspot/src/share/vm/opto/subnode.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/subnode.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1533,25 +1533,3 @@
   if( d < 0.0 ) return Type::DOUBLE;
   return TypeD::make( sqrt( d ) );
 }
-
-//=============================================================================
-//------------------------------Value------------------------------------------
-// Compute tan
-const Type* TanDNode::Value(PhaseGVN* phase) const {
-  const Type *t1 = phase->type( in(1) );
-  if( t1 == Type::TOP ) return Type::TOP;
-  if( t1->base() != Type::DoubleCon ) return Type::DOUBLE;
-  double d = t1->getd();
-  return TypeD::make( StubRoutines::intrinsic_tan( d ) );
-}
-
-//=============================================================================
-//------------------------------Value------------------------------------------
-// Compute log10
-const Type* Log10DNode::Value(PhaseGVN* phase) const {
-  const Type *t1 = phase->type( in(1) );
-  if( t1 == Type::TOP ) return Type::TOP;
-  if( t1->base() != Type::DoubleCon ) return Type::DOUBLE;
-  double d = t1->getd();
-  return TypeD::make( StubRoutines::intrinsic_log10( d ) );
-}
--- a/hotspot/src/share/vm/opto/subnode.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/subnode.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -408,21 +408,6 @@
   virtual uint ideal_reg() const { return Op_RegD; }
 };
 
-//------------------------------TanDNode---------------------------------------
-// tangens of a double
-class TanDNode : public Node {
-public:
-  TanDNode(Compile* C, Node *c,Node *in1) : Node(c, in1) {
-    init_flags(Flag_is_expensive);
-    C->add_expensive_node(this);
-  }
-  virtual int Opcode() const;
-  const Type *bottom_type() const { return Type::DOUBLE; }
-  virtual uint ideal_reg() const { return Op_RegD; }
-  virtual const Type* Value(PhaseGVN* phase) const;
-};
-
-
 //------------------------------AtanDNode--------------------------------------
 // arcus tangens of a double
 class AtanDNode : public Node {
@@ -448,20 +433,6 @@
   virtual const Type* Value(PhaseGVN* phase) const;
 };
 
-//------------------------------Log10DNode---------------------------------------
-// Log_10 of a double
-class Log10DNode : public Node {
-public:
-  Log10DNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
-    init_flags(Flag_is_expensive);
-    C->add_expensive_node(this);
-  }
-  virtual int Opcode() const;
-  const Type *bottom_type() const { return Type::DOUBLE; }
-  virtual uint ideal_reg() const { return Op_RegD; }
-  virtual const Type* Value(PhaseGVN* phase) const;
-};
-
 //-------------------------------ReverseBytesINode--------------------------------
 // reverse bytes of an integer
 class ReverseBytesINode : public Node {
--- a/hotspot/src/share/vm/opto/superword.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/superword.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -52,6 +52,7 @@
   _packset(arena(), 8,  0, NULL),         // packs for the current block
   _bb_idx(arena(), (int)(1.10 * phase->C->unique()), 0, 0), // node idx to index in bb
   _block(arena(), 8,  0, NULL),           // nodes in current block
+  _post_block(arena(), 8, 0, NULL),       // nodes common to current block which are marked as post loop vectorizable
   _data_entry(arena(), 8,  0, NULL),      // nodes with all inputs from outside
   _mem_slice_head(arena(), 8,  0, NULL),  // memory slice heads
   _mem_slice_tail(arena(), 8,  0, NULL),  // memory slice tails
@@ -100,10 +101,30 @@
 
   if (!cl->is_valid_counted_loop()) return; // skip malformed counted loop
 
-  if (!cl->is_main_loop() ) return; // skip normal, pre, and post loops
+  bool post_loop_allowed = (PostLoopMultiversioning && Matcher::has_predicated_vectors() && cl->is_post_loop());
+  if (post_loop_allowed) {
+    if (cl->is_reduction_loop()) return; // no predication mapping
+    Node *limit = cl->limit();
+    if (limit->is_Con()) return; // non constant limits only
+    // Now check the limit for expressions we do not handle
+    if (limit->is_Add()) {
+      Node *in2 = limit->in(2);
+      if (in2->is_Con()) {
+        int val = in2->get_int();
+        // should not try to program these cases
+        if (val < 0) return;
+      }
+    }
+  }
+
+  // skip any loop that has not been assigned max unroll by analysis
+  if (do_optimization) {
+    if (cl->slp_max_unroll() == 0) return;
+  }
+
   // Check for no control flow in body (other than exit)
   Node *cl_exit = cl->loopexit();
-  if (cl_exit->in(0) != lpt->_head) {
+  if (cl->is_main_loop() && (cl_exit->in(0) != lpt->_head)) {
     #ifndef PRODUCT
       if (TraceSuperWord) {
         tty->print_cr("SuperWord::transform_loop: loop too complicated, cl_exit->in(0) != lpt->_head");
@@ -121,15 +142,16 @@
     return;
   }
 
-  // We only re-enter slp when we vector mapped a queried loop and we want to
-  // continue unrolling, in this case, slp is not subsequently done.
-  if (cl->do_unroll_only()) return;
-
-  // Check for pre-loop ending with CountedLoopEnd(Bool(Cmp(x,Opaque1(limit))))
-  CountedLoopEndNode* pre_end = get_pre_loop_end(cl);
-  if (pre_end == NULL) return;
-  Node *pre_opaq1 = pre_end->limit();
-  if (pre_opaq1->Opcode() != Op_Opaque1) return;
+  // Skip any loops already optimized by slp
+  if (cl->is_vectorized_loop()) return;
+
+  if (cl->is_main_loop()) {
+    // Check for pre-loop ending with CountedLoopEnd(Bool(Cmp(x,Opaque1(limit))))
+    CountedLoopEndNode* pre_end = get_pre_loop_end(cl);
+    if (pre_end == NULL) return;
+    Node *pre_opaq1 = pre_end->limit();
+    if (pre_opaq1->Opcode() != Op_Opaque1) return;
+  }
 
   init(); // initialize data structures
 
@@ -142,6 +164,19 @@
   if (do_optimization) {
     assert(_packset.length() == 0, "packset must be empty");
     SLP_extract();
+    if (PostLoopMultiversioning && Matcher::has_predicated_vectors()) {
+      if (cl->is_vectorized_loop() && cl->is_main_loop() && !cl->is_reduction_loop()) {
+        IdealLoopTree *lpt_next = lpt->_next;
+        CountedLoopNode *cl_next = lpt_next->_head->as_CountedLoop();
+        _phase->has_range_checks(lpt_next);
+        if (cl_next->is_post_loop() && !cl_next->range_checks_present()) {
+          if (!cl_next->is_vectorized_loop()) {
+            int slp_max_unroll_factor = cl->slp_max_unroll();
+            cl_next->set_slp_max_unroll(slp_max_unroll_factor);
+          }
+        }
+      }
+    }
   }
 }
 
@@ -154,6 +189,9 @@
   Node_Stack nstack((int)ignored_size);
   CountedLoopNode *cl = lpt()->_head->as_CountedLoop();
   Node *cl_exit = cl->loopexit();
+  int rpo_idx = _post_block.length();
+
+  assert(rpo_idx == 0, "post loop block is empty");
 
   // First clear the entries
   for (uint i = 0; i < lpt()->_body.size(); i++) {
@@ -161,6 +199,7 @@
   }
 
   int max_vector = Matcher::max_vector_size(T_INT);
+  bool post_loop_allowed = (PostLoopMultiversioning && Matcher::has_predicated_vectors() && cl->is_post_loop());
 
   // Process the loop, some/all of the stack entries will not be in order, ergo
   // need to preprocess the ignored initial state before we process the loop
@@ -259,6 +298,7 @@
   if (is_slp) {
     // Now we try to find the maximum supported consistent vector which the machine
     // description can use
+    bool small_basic_type = false;
     for (uint i = 0; i < lpt()->_body.size(); i++) {
       if (ignored_loop_nodes[i] != -1) continue;
 
@@ -269,6 +309,26 @@
       } else {
         bt = n->bottom_type()->basic_type();
       }
+
+      if (post_loop_allowed) {
+        if (!small_basic_type) {
+          switch (bt) {
+          case T_CHAR:
+          case T_BYTE:
+          case T_SHORT:
+            small_basic_type = true;
+            break;
+
+          case T_LONG:
+            // TODO: Remove when support completed for mask context with LONG.
+            //       Support needs to be augmented for logical qword operations, currently we map to dword
+            //       buckets for vectors on logicals as these were legacy.
+            small_basic_type = true;
+            break;
+          }
+        }
+      }
+
       if (is_java_primitive(bt) == false) continue;
 
       int cur_max_vector = Matcher::max_vector_size(bt);
@@ -288,6 +348,12 @@
         if (cur_max_vector < max_vector) {
           max_vector = cur_max_vector;
         }
+
+        // We only process post loops on predicated targets where we want to
+        // mask map the loop to a single iteration
+        if (post_loop_allowed) {
+          _post_block.at_put_grow(rpo_idx++, n);
+        }
       }
     }
     if (is_slp) {
@@ -295,7 +361,14 @@
       cl->mark_passed_slp();
     }
     cl->mark_was_slp();
-    cl->set_slp_max_unroll(local_loop_unroll_factor);
+    if (cl->is_main_loop()) {
+      cl->set_slp_max_unroll(local_loop_unroll_factor);
+    } else if (post_loop_allowed) {
+      if (!small_basic_type) {
+        // avoid replication context for small basic types in programmable masked loops
+        cl->set_slp_max_unroll(local_loop_unroll_factor);
+      }
+    }
   }
 }
 
@@ -350,67 +423,104 @@
   if (!construct_bb()) {
     return; // Exit if no interesting nodes or complex graph.
   }
+
   // build    _dg, _disjoint_ptrs
   dependence_graph();
 
   // compute function depth(Node*)
   compute_max_depth();
 
-  if (_do_vector_loop) {
-    if (mark_generations() != -1) {
-      hoist_loads_in_graph(); // this only rebuild the graph; all basic structs need rebuild explicitly
-
-      if (!construct_bb()) {
-        return; // Exit if no interesting nodes or complex graph.
+  CountedLoopNode *cl = lpt()->_head->as_CountedLoop();
+  bool post_loop_allowed = (PostLoopMultiversioning && Matcher::has_predicated_vectors() && cl->is_post_loop());
+  if (cl->is_main_loop()) {
+    if (_do_vector_loop) {
+      if (mark_generations() != -1) {
+        hoist_loads_in_graph(); // this only rebuild the graph; all basic structs need rebuild explicitly
+
+        if (!construct_bb()) {
+          return; // Exit if no interesting nodes or complex graph.
+        }
+        dependence_graph();
+        compute_max_depth();
       }
-      dependence_graph();
-      compute_max_depth();
-    }
 
 #ifndef PRODUCT
-    if (TraceSuperWord) {
-      tty->print_cr("\nSuperWord::_do_vector_loop: graph after hoist_loads_in_graph");
-      _lpt->dump_head();
-      for (int j = 0; j < _block.length(); j++) {
-        Node* n = _block.at(j);
-        int d = depth(n);
-        for (int i = 0;  i < d; i++) tty->print("%s", "  ");
-        tty->print("%d :", d);
-        n->dump();
+      if (TraceSuperWord) {
+        tty->print_cr("\nSuperWord::_do_vector_loop: graph after hoist_loads_in_graph");
+        _lpt->dump_head();
+        for (int j = 0; j < _block.length(); j++) {
+          Node* n = _block.at(j);
+          int d = depth(n);
+          for (int i = 0; i < d; i++) tty->print("%s", "  ");
+          tty->print("%d :", d);
+          n->dump();
+        }
+      }
+#endif
+    }
+
+    compute_vector_element_type();
+
+    // Attempt vectorization
+
+    find_adjacent_refs();
+
+    extend_packlist();
+
+    if (_do_vector_loop) {
+      if (_packset.length() == 0) {
+        if (TraceSuperWord) {
+          tty->print_cr("\nSuperWord::_do_vector_loop DFA could not build packset, now trying to build anyway");
+        }
+        pack_parallel();
       }
     }
-#endif
-  }
-
-  compute_vector_element_type();
-
-  // Attempt vectorization
-
-  find_adjacent_refs();
-
-  extend_packlist();
-
-  if (_do_vector_loop) {
-    if (_packset.length() == 0) {
-      if (TraceSuperWord) {
-        tty->print_cr("\nSuperWord::_do_vector_loop DFA could not build packset, now trying to build anyway");
+
+    combine_packs();
+
+    construct_my_pack_map();
+
+    if (_do_vector_loop) {
+      merge_packs_to_cmovd();
+    }
+
+    filter_packs();
+
+    schedule();
+  } else if (post_loop_allowed) {
+    int saved_mapped_unroll_factor = cl->slp_max_unroll();
+    if (saved_mapped_unroll_factor) {
+      int vector_mapped_unroll_factor = saved_mapped_unroll_factor;
+
+      // now reset the slp_unroll_factor so that we can check the analysis mapped
+      // what the vector loop was mapped to
+      cl->set_slp_max_unroll(0);
+
+      // do the analysis on the post loop
+      unrolling_analysis(vector_mapped_unroll_factor);
+
+      // if our analyzed loop is a canonical fit, start processing it
+      if (vector_mapped_unroll_factor == saved_mapped_unroll_factor) {
+        // now add the vector nodes to packsets
+        for (int i = 0; i < _post_block.length(); i++) {
+          Node* n = _post_block.at(i);
+          Node_List* singleton = new Node_List();
+          singleton->push(n);
+          _packset.append(singleton);
+          set_my_pack(n, singleton);
+        }
+
+        // map base types for vector usage
+        compute_vector_element_type();
+      } else {
+        return;
       }
-      pack_parallel();
+    } else {
+      // for some reason we could not map the slp analysis state of the vectorized loop
+      return;
     }
   }
 
-  combine_packs();
-
-  construct_my_pack_map();
-
-  if (_do_vector_loop) {
-    merge_packs_to_cmovd();
-  }
-
-  filter_packs();
-
-  schedule();
-
   output();
 }
 
@@ -811,6 +921,7 @@
 // Add dependence edges to load/store nodes for memory dependence
 //    A.out()->DependNode.in(1) and DependNode.out()->B.prec(x)
 void SuperWord::dependence_graph() {
+  CountedLoopNode *cl = lpt()->_head->as_CountedLoop();
   // First, assign a dependence node to each memory node
   for (int i = 0; i < _block.length(); i++ ) {
     Node *n = _block.at(i);
@@ -825,7 +936,9 @@
     Node* n_tail = _mem_slice_tail.at(i);
 
     // Get slice in predecessor order (last is first)
-    mem_slice_preds(n_tail, n, _nlist);
+    if (cl->is_main_loop()) {
+      mem_slice_preds(n_tail, n, _nlist);
+    }
 
 #ifndef PRODUCT
     if(TraceSuperWord && Verbose) {
@@ -2029,20 +2142,23 @@
   }
 #endif
 
-  // MUST ENSURE main loop's initial value is properly aligned:
-  //  (iv_initial_value + min_iv_offset) % vector_width_in_bytes() == 0
-
-  align_initial_loop_index(align_to_ref());
-
-  // Insert extract (unpack) operations for scalar uses
-  for (int i = 0; i < _packset.length(); i++) {
-    insert_extracts(_packset.at(i));
+  CountedLoopNode *cl = lpt()->_head->as_CountedLoop();
+  if (cl->is_main_loop()) {
+    // MUST ENSURE main loop's initial value is properly aligned:
+    //  (iv_initial_value + min_iv_offset) % vector_width_in_bytes() == 0
+
+    align_initial_loop_index(align_to_ref());
+
+    // Insert extract (unpack) operations for scalar uses
+    for (int i = 0; i < _packset.length(); i++) {
+      insert_extracts(_packset.at(i));
+    }
   }
 
   Compile* C = _phase->C;
-  CountedLoopNode *cl = lpt()->_head->as_CountedLoop();
   uint max_vlen_in_bytes = 0;
   uint max_vlen = 0;
+  bool can_process_post_loop = (PostLoopMultiversioning && Matcher::has_predicated_vectors() && cl->is_post_loop());
 
   NOT_PRODUCT(if(is_trace_loop_reverse()) {tty->print_cr("SWPointer::output: print loop before create_reserve_version_of_loop"); print_loop(true);})
 
@@ -2064,6 +2180,10 @@
       Node* vn = NULL;
       Node* low_adr = p->at(0);
       Node* first   = executed_first(p);
+      if (can_process_post_loop) {
+        // override vlen with the main loops vector length
+        vlen = cl->slp_max_unroll();
+      }
       NOT_PRODUCT(if(is_trace_cmov()) {tty->print_cr("SWPointer::output: %d executed first, %d executed last in pack", first->_idx, n->_idx); print_pack(p);})
       int   opc = n->Opcode();
       if (n->is_Load()) {
@@ -2153,6 +2273,10 @@
         vn = VectorNode::make(opc, in, NULL, vlen, velt_basic_type(n));
         vlen_in_bytes = vn->as_Vector()->length_in_bytes();
       } else if (is_cmov_pack(p)) {
+        if (can_process_post_loop) {
+          // do not refactor of flow in post loop context
+          return;
+        }
         if (!n->is_CMove()) {
           continue;
         }
@@ -2217,6 +2341,7 @@
         ShouldNotReachHere();
       }
 
+      _block.at_put(i, vn);
       _igvn.register_new_node_with_optimizer(vn);
       _phase->set_ctrl(vn, _phase->get_ctrl(p->at(0)));
       for (uint j = 0; j < p->size(); j++) {
@@ -2225,6 +2350,14 @@
       }
       _igvn._worklist.push(vn);
 
+      if (can_process_post_loop) {
+        // first check if the vector size if the maximum vector which we can use on the machine,
+        // other vector size have reduced values for predicated data mapping.
+        if (vlen_in_bytes != (uint)MaxVectorSize) {
+          return;
+        }
+      }
+
       if (vlen_in_bytes > max_vlen_in_bytes) {
         max_vlen = vlen;
         max_vlen_in_bytes = vlen_in_bytes;
@@ -2247,15 +2380,38 @@
         if (TraceSuperWordLoopUnrollAnalysis) {
           tty->print_cr("vector loop(unroll=%d, len=%d)\n", max_vlen, max_vlen_in_bytes*BitsPerByte);
         }
-        // For atomic unrolled loops which are vector mapped, instigate more unrolling.
+
+        // For atomic unrolled loops which are vector mapped, instigate more unrolling
         cl->set_notpassed_slp();
-        // if vector resources are limited, do not allow additional unrolling
-        if (FLOATPRESSURE > 8) {
-          C->set_major_progress();
+        if (cl->is_main_loop()) {
+          // if vector resources are limited, do not allow additional unrolling, also
+          // do not unroll more on pure vector loops which were not reduced so that we can
+          // program the post loop to single iteration execution.
+          if (FLOATPRESSURE > 8) {
+            C->set_major_progress();
+            cl->mark_do_unroll_only();
+          }
         }
-        cl->mark_do_unroll_only();
+
         if (do_reserve_copy()) {
           cl->mark_loop_vectorized();
+          if (can_process_post_loop) {
+            // Now create the difference of trip and limit and use it as our mask index.
+            // Note: We limited the unroll of the vectorized loop so that
+            //       only vlen-1 size iterations can remain to be mask programmed.
+            Node *incr = cl->incr();
+            SubINode *index = new SubINode(cl->limit(), cl->init_trip());
+            _igvn.register_new_node_with_optimizer(index);
+            SetVectMaskINode  *mask = new SetVectMaskINode(_phase->get_ctrl(cl->init_trip()), index);
+            _igvn.register_new_node_with_optimizer(mask);
+            // make this a single iteration loop
+            AddINode *new_incr = new AddINode(incr->in(1), mask);
+            _igvn.register_new_node_with_optimizer(new_incr);
+            _phase->set_ctrl(new_incr, _phase->get_ctrl(incr));
+            _igvn.replace_node(incr, new_incr);
+            cl->mark_is_multiversioned();
+            cl->loopexit()->add_flag(Node::Flag_has_vector_mask_set);
+          }
         }
       }
     }
@@ -2274,6 +2430,12 @@
   Node* p0 = p->at(0);
   uint vlen = p->size();
   Node* opd = p0->in(opd_idx);
+  CountedLoopNode *cl = lpt()->_head->as_CountedLoop();
+
+  if (PostLoopMultiversioning && Matcher::has_predicated_vectors() && cl->is_post_loop()) {
+    // override vlen with the main loops vector length
+    vlen = cl->slp_max_unroll();
+  }
 
   if (same_inputs(p, opd_idx)) {
     if (opd->is_Vector() || opd->is_LoadVector()) {
@@ -3090,13 +3252,13 @@
   return pre_end;
 }
 
-
 //------------------------------init---------------------------
 void SuperWord::init() {
   _dg.init();
   _packset.clear();
   _disjoint_ptrs.clear();
   _block.clear();
+  _post_block.clear();
   _data_entry.clear();
   _mem_slice_head.clear();
   _mem_slice_tail.clear();
@@ -3120,6 +3282,7 @@
   _packset.clear();
   _disjoint_ptrs.clear();
   _block.clear();
+  _post_block.clear();
   _data_entry.clear();
   _mem_slice_head.clear();
   _mem_slice_tail.clear();
--- a/hotspot/src/share/vm/opto/superword.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/superword.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -261,6 +261,7 @@
   GrowableArray<int> _bb_idx;            // Map from Node _idx to index within block
 
   GrowableArray<Node*> _block;           // Nodes in current block
+  GrowableArray<Node*> _post_block;      // Nodes in post loop block
   GrowableArray<Node*> _data_entry;      // Nodes with all inputs from outside
   GrowableArray<Node*> _mem_slice_head;  // Memory slice head nodes
   GrowableArray<Node*> _mem_slice_tail;  // Memory slice tail nodes
--- a/hotspot/src/share/vm/opto/type.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/type.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -225,74 +225,156 @@
 
 
 //-----------------------make_from_constant------------------------------------
-const Type* Type::make_from_constant(ciConstant constant, bool require_constant) {
+const Type* Type::make_from_constant(ciConstant constant, bool require_constant,
+                                     int stable_dimension, bool is_narrow_oop,
+                                     bool is_autobox_cache) {
   switch (constant.basic_type()) {
-  case T_BOOLEAN:  return TypeInt::make(constant.as_boolean());
-  case T_CHAR:     return TypeInt::make(constant.as_char());
-  case T_BYTE:     return TypeInt::make(constant.as_byte());
-  case T_SHORT:    return TypeInt::make(constant.as_short());
-  case T_INT:      return TypeInt::make(constant.as_int());
-  case T_LONG:     return TypeLong::make(constant.as_long());
-  case T_FLOAT:    return TypeF::make(constant.as_float());
-  case T_DOUBLE:   return TypeD::make(constant.as_double());
-  case T_ARRAY:
-  case T_OBJECT:
-    {
-      // cases:
-      //   can_be_constant    = (oop not scavengable || ScavengeRootsInCode != 0)
-      //   should_be_constant = (oop not scavengable || ScavengeRootsInCode >= 2)
-      // An oop is not scavengable if it is in the perm gen.
-      ciObject* oop_constant = constant.as_object();
-      if (oop_constant->is_null_object()) {
-        return Type::get_zero_type(T_OBJECT);
-      } else if (require_constant || oop_constant->should_be_constant()) {
-        return TypeOopPtr::make_from_constant(oop_constant, require_constant);
+    case T_BOOLEAN:  return TypeInt::make(constant.as_boolean());
+    case T_CHAR:     return TypeInt::make(constant.as_char());
+    case T_BYTE:     return TypeInt::make(constant.as_byte());
+    case T_SHORT:    return TypeInt::make(constant.as_short());
+    case T_INT:      return TypeInt::make(constant.as_int());
+    case T_LONG:     return TypeLong::make(constant.as_long());
+    case T_FLOAT:    return TypeF::make(constant.as_float());
+    case T_DOUBLE:   return TypeD::make(constant.as_double());
+    case T_ARRAY:
+    case T_OBJECT: {
+        // cases:
+        //   can_be_constant    = (oop not scavengable || ScavengeRootsInCode != 0)
+        //   should_be_constant = (oop not scavengable || ScavengeRootsInCode >= 2)
+        // An oop is not scavengable if it is in the perm gen.
+        const Type* con_type = NULL;
+        ciObject* oop_constant = constant.as_object();
+        if (oop_constant->is_null_object()) {
+          con_type = Type::get_zero_type(T_OBJECT);
+        } else if (require_constant || oop_constant->should_be_constant()) {
+          con_type = TypeOopPtr::make_from_constant(oop_constant, require_constant);
+          if (con_type != NULL) {
+            if (Compile::current()->eliminate_boxing() && is_autobox_cache) {
+              con_type = con_type->is_aryptr()->cast_to_autobox_cache(true);
+            }
+            if (stable_dimension > 0) {
+              assert(FoldStableValues, "sanity");
+              assert(!con_type->is_zero_type(), "default value for stable field");
+              con_type = con_type->is_aryptr()->cast_to_stable(true, stable_dimension);
+            }
+          }
+        }
+        if (is_narrow_oop) {
+          con_type = con_type->make_narrowoop();
+        }
+        return con_type;
       }
-    }
-  case T_ILLEGAL:
-    // Invalid ciConstant returned due to OutOfMemoryError in the CI
-    assert(Compile::current()->env()->failing(), "otherwise should not see this");
-    return NULL;
+    case T_ILLEGAL:
+      // Invalid ciConstant returned due to OutOfMemoryError in the CI
+      assert(Compile::current()->env()->failing(), "otherwise should not see this");
+      return NULL;
   }
   // Fall through to failure
   return NULL;
 }
 
-
-const Type* Type::make_constant(ciField* field, Node* obj) {
-  if (!field->is_constant())  return NULL;
-
-  const Type* con_type = NULL;
+static ciConstant check_mismatched_access(ciConstant con, BasicType loadbt, bool is_unsigned) {
+  BasicType conbt = con.basic_type();
+  switch (conbt) {
+    case T_BOOLEAN: conbt = T_BYTE;   break;
+    case T_ARRAY:   conbt = T_OBJECT; break;
+  }
+  switch (loadbt) {
+    case T_BOOLEAN:   loadbt = T_BYTE;   break;
+    case T_NARROWOOP: loadbt = T_OBJECT; break;
+    case T_ARRAY:     loadbt = T_OBJECT; break;
+    case T_ADDRESS:   loadbt = T_OBJECT; break;
+  }
+  if (conbt == loadbt) {
+    if (is_unsigned && conbt == T_BYTE) {
+      // LoadB (T_BYTE) with a small mask (<=8-bit) is converted to LoadUB (T_BYTE).
+      return ciConstant(T_INT, con.as_int() & 0xFF);
+    } else {
+      return con;
+    }
+  }
+  if (conbt == T_SHORT && loadbt == T_CHAR) {
+    // LoadS (T_SHORT) with a small mask (<=16-bit) is converted to LoadUS (T_CHAR).
+    return ciConstant(T_INT, con.as_int() & 0xFFFF);
+  }
+  return ciConstant(); // T_ILLEGAL
+}
+
+// Try to constant-fold a stable array element.
+const Type* Type::make_constant_from_array_element(ciArray* array, int off, int stable_dimension,
+                                                   BasicType loadbt, bool is_unsigned_load) {
+  // Decode the results of GraphKit::array_element_address.
+  ciConstant element_value = array->element_value_by_offset(off);
+  if (element_value.basic_type() == T_ILLEGAL) {
+    return NULL; // wrong offset
+  }
+  ciConstant con = check_mismatched_access(element_value, loadbt, is_unsigned_load);
+
+  assert(con.basic_type() != T_ILLEGAL, "elembt=%s; loadbt=%s; unsigned=%d",
+         type2name(element_value.basic_type()), type2name(loadbt), is_unsigned_load);
+
+  if (con.is_valid() &&          // not a mismatched access
+      !con.is_null_or_zero()) {  // not a default value
+    bool is_narrow_oop = (loadbt == T_NARROWOOP);
+    return Type::make_from_constant(con, /*require_constant=*/true, stable_dimension, is_narrow_oop, /*is_autobox_cache=*/false);
+  }
+  return NULL;
+}
+
+const Type* Type::make_constant_from_field(ciInstance* holder, int off, bool is_unsigned_load, BasicType loadbt) {
+  ciField* field;
+  ciType* type = holder->java_mirror_type();
+  if (type != NULL && type->is_instance_klass() && off >= InstanceMirrorKlass::offset_of_static_fields()) {
+    // Static field
+    field = type->as_instance_klass()->get_field_by_offset(off, /*is_static=*/true);
+  } else {
+    // Instance field
+    field = holder->klass()->as_instance_klass()->get_field_by_offset(off, /*is_static=*/false);
+  }
+  if (field == NULL) {
+    return NULL; // Wrong offset
+  }
+  return Type::make_constant_from_field(field, holder, loadbt, is_unsigned_load);
+}
+
+const Type* Type::make_constant_from_field(ciField* field, ciInstance* holder,
+                                           BasicType loadbt, bool is_unsigned_load) {
+  if (!field->is_constant()) {
+    return NULL; // Non-constant field
+  }
+  ciConstant field_value;
   if (field->is_static()) {
     // final static field
-    con_type = Type::make_from_constant(field->constant_value(), /*require_const=*/true);
-    if (Compile::current()->eliminate_boxing() && field->is_autobox_cache() && con_type != NULL) {
-      con_type = con_type->is_aryptr()->cast_to_autobox_cache(true);
-    }
-  } else {
+    field_value = field->constant_value();
+  } else if (holder != NULL) {
     // final or stable non-static field
     // Treat final non-static fields of trusted classes (classes in
     // java.lang.invoke and sun.invoke packages and subpackages) as
     // compile time constants.
-    if (obj->is_Con()) {
-      const TypeOopPtr* oop_ptr = obj->bottom_type()->isa_oopptr();
-      ciObject* constant_oop = oop_ptr->const_oop();
-      ciConstant constant = field->constant_value_of(constant_oop);
-      con_type = Type::make_from_constant(constant, /*require_const=*/true);
-    }
+    field_value = field->constant_value_of(holder);
+  }
+  if (!field_value.is_valid()) {
+    return NULL; // Not a constant
   }
-  if (FoldStableValues && field->is_stable() && con_type != NULL) {
-    if (con_type->is_zero_type()) {
-      return NULL; // the field hasn't been initialized yet
-    } else if (con_type->isa_oopptr()) {
-      const Type* stable_type = Type::get_const_type(field->type());
-      if (field->type()->is_array_klass()) {
-        int stable_dimension = field->type()->as_array_klass()->dimension();
-        stable_type = stable_type->is_aryptr()->cast_to_stable(true, stable_dimension);
-      }
-      if (stable_type != NULL) {
-        con_type = con_type->join_speculative(stable_type);
-      }
+
+  ciConstant con = check_mismatched_access(field_value, loadbt, is_unsigned_load);
+
+  assert(con.is_valid(), "elembt=%s; loadbt=%s; unsigned=%d",
+         type2name(field_value.basic_type()), type2name(loadbt), is_unsigned_load);
+
+  bool is_stable_array = FoldStableValues && field->is_stable() && field->type()->is_array_klass();
+  int stable_dimension = (is_stable_array ? field->type()->as_array_klass()->dimension() : 0);
+  bool is_narrow_oop = (loadbt == T_NARROWOOP);
+
+  const Type* con_type = make_from_constant(con, /*require_constant=*/ true,
+                                            stable_dimension, is_narrow_oop,
+                                            field->is_autobox_cache());
+  if (con_type != NULL && field->is_call_site_target()) {
+    ciCallSite* call_site = holder->as_call_site();
+    if (!call_site->is_constant_call_site()) {
+      ciMethodHandle* target = call_site->get_target();
+      Compile::current()->dependencies()->assert_call_site_target_value(call_site, target);
     }
   }
   return con_type;
--- a/hotspot/src/share/vm/opto/type.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/type.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -417,9 +417,26 @@
   static const Type* get_typeflow_type(ciType* type);
 
   static const Type* make_from_constant(ciConstant constant,
-                                        bool require_constant = false);
+                                        bool require_constant = false,
+                                        int stable_dimension = 0,
+                                        bool is_narrow = false,
+                                        bool is_autobox_cache = false);
+
+  static const Type* make_constant_from_field(ciInstance* holder,
+                                              int off,
+                                              bool is_unsigned_load,
+                                              BasicType loadbt);
 
-  static const Type* make_constant(ciField* field, Node* obj);
+  static const Type* make_constant_from_field(ciField* field,
+                                              ciInstance* holder,
+                                              BasicType loadbt,
+                                              bool is_unsigned_load);
+
+  static const Type* make_constant_from_array_element(ciArray* array,
+                                                      int off,
+                                                      int stable_dimension,
+                                                      BasicType loadbt,
+                                                      bool is_unsigned_load);
 
   // Speculative type helper methods. See TypePtr.
   virtual const TypePtr* speculative() const                                  { return NULL; }
--- a/hotspot/src/share/vm/opto/vectornode.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/opto/vectornode.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -529,6 +529,7 @@
                               Node* adr, const TypePtr* atyp,
                               uint vlen, BasicType bt,
                               ControlDependency control_dependency = LoadNode::DependsOnlyOnTest);
+  uint element_size(void) { return type2aelembytes(vect_type()->element_basic_type()); }
 };
 
 //------------------------------StoreVectorNode--------------------------------
@@ -553,6 +554,8 @@
   static StoreVectorNode* make(int opc, Node* ctl, Node* mem,
                                Node* adr, const TypePtr* atyp, Node* val,
                                uint vlen);
+
+  uint element_size(void) { return type2aelembytes(vect_type()->element_basic_type()); }
 };
 
 
@@ -791,4 +794,15 @@
   virtual uint ideal_reg() const { return Op_RegD; }
 };
 
+//------------------------------SetVectMaskINode-------------------------------
+// Provide a mask for a vector predicate machine
+class SetVectMaskINode : public Node {
+public:
+  SetVectMaskINode(Node *c, Node *in1) : Node(c, in1) {}
+  virtual int Opcode() const;
+  const Type *bottom_type() const { return TypeInt::INT; }
+  virtual uint ideal_reg() const { return Op_RegI; }
+  virtual const Type *Value(PhaseGVN *phase) const { return TypeInt::INT; }
+};
+
 #endif // SHARE_VM_OPTO_VECTORNODE_HPP
--- a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, 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
@@ -693,7 +693,7 @@
   if (JvmtiExport::can_maintain_original_method_order()) {
     int index;
     int original_index;
-    intArray method_order(num_methods, 0);
+    intArray method_order(num_methods, num_methods, 0);
 
     // invert the method order mapping
     for (index = 0; index < num_methods; index++) {
--- a/hotspot/src/share/vm/prims/jvmtiEnter.xsl	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiEnter.xsl	Thu Apr 28 14:44:52 2016 -0700
@@ -40,6 +40,7 @@
 # include "memory/resourceArea.hpp"
 # include "utilities/macros.hpp"
 #if INCLUDE_JVMTI
+# include "logging/log.hpp"
 # include "oops/oop.inline.hpp"
 # include "prims/jvmtiEnter.hpp"
 # include "prims/jvmtiRawMonitor.hpp"
@@ -415,7 +416,7 @@
     <xsl:value-of select="$space"/>
     <xsl:text>  if (trace_flags) {</xsl:text>
     <xsl:value-of select="$space"/>
-    <xsl:text>    tty->print_cr("JVMTI [non-attached thread] %s %s",  func_name,</xsl:text>
+    <xsl:text>    log_trace(jvmti)("[non-attached thread] %s %s",  func_name,</xsl:text>
     <xsl:value-of select="$space"/>
     <xsl:text>    JvmtiUtil::error_name(JVMTI_ERROR_UNATTACHED_THREAD));</xsl:text>
     <xsl:value-of select="$space"/>
@@ -452,7 +453,7 @@
 </xsl:text>
     <xsl:if test="$trace='Trace'">
       <xsl:text>    if (trace_flags) {
-          tty->print_cr("JVMTI [%s] %s %s",  curr_thread_name, func_name, 
+          log_trace(jvmti)("[%s] %s %s",  curr_thread_name, func_name, 
                     JvmtiUtil::error_name(JVMTI_ERROR_MUST_POSSESS_CAPABILITY));
     }
 </xsl:text>
@@ -486,7 +487,7 @@
 </xsl:text>
     <xsl:if test="$trace='Trace'">
       <xsl:text>    if (trace_flags) {
-          tty->print_cr("JVMTI [-] %s %s",  func_name, 
+          log_trace(jvmti)("[-] %s %s",  func_name, 
                     JvmtiUtil::error_name(JVMTI_ERROR_WRONG_PHASE));
     }
 </xsl:text>
@@ -509,7 +510,7 @@
 </xsl:text>
     <xsl:if test="$trace='Trace'">
       <xsl:text>    if (trace_flags) {
-          tty->print_cr("JVMTI [-] %s %s",  func_name, 
+          log_trace(jvmti)("[-] %s %s",  func_name, 
                     JvmtiUtil::error_name(JVMTI_ERROR_WRONG_PHASE));
     }
 </xsl:text>
@@ -522,7 +523,7 @@
 </xsl:text>
     <xsl:if test="$trace='Trace'">
       <xsl:text>    if (trace_flags) {
-          tty->print_cr("JVMTI [-] %s %s",  func_name, 
+          log_trace(jvmti)("[-] %s %s",  func_name, 
                     JvmtiUtil::error_name(JVMTI_ERROR_WRONG_PHASE));
     }
 </xsl:text>
@@ -541,7 +542,7 @@
 </xsl:text>
     <xsl:if test="$trace='Trace'">
       <xsl:text>    if (trace_flags) {
-          tty->print_cr("JVMTI [%s] %s %s  env=" PTR_FORMAT,  curr_thread_name, func_name, 
+          log_trace(jvmti)("[%s] %s %s  env=" PTR_FORMAT,  curr_thread_name, func_name, 
                     JvmtiUtil::error_name(JVMTI_ERROR_INVALID_ENVIRONMENT), p2i(env));
     }
 </xsl:text>
@@ -667,7 +668,7 @@
     <xsl:with-param name="endParam" select="."/>
   </xsl:apply-templates>
   <xsl:text>      }
-        tty->print_cr("JVMTI [%s] %s } %s - erroneous arg is </xsl:text>
+        log_error(jvmti)("[%s] %s } %s - erroneous arg is </xsl:text>
     <xsl:value-of select="@id"/>
     <xsl:value-of select="$comment"/>
     <xsl:text>",  curr_thread_name, func_name, 
@@ -692,10 +693,10 @@
 </xsl:text>
     <xsl:apply-templates select="." mode="traceIn"/>
     <xsl:text>    }
-    tty->print_cr("JVMTI [%s] %s } %s",  curr_thread_name, func_name, 
+    log_error(jvmti)("[%s] %s } %s",  curr_thread_name, func_name, 
                   JvmtiUtil::error_name(err));
   } else if ((trace_flags &amp; JvmtiTrace::SHOW_OUT) != 0) {
-    tty->print_cr("JVMTI [%s] %s }",  curr_thread_name, func_name);
+    log_trace(jvmti)("[%s] %s }",  curr_thread_name, func_name);
   }
 </xsl:text>
   </xsl:if>
@@ -703,7 +704,7 @@
 
 <xsl:template match="function" mode="traceIn">
   <xsl:param name="endParam"></xsl:param>
-  <xsl:text>          tty->print_cr("JVMTI [%s] %s { </xsl:text>
+  <xsl:text>          log_trace(jvmti)("[%s] %s { </xsl:text>
   <xsl:apply-templates select="parameters" mode="traceInFormat">
     <xsl:with-param name="endParam" select="$endParam"/>    
   </xsl:apply-templates>
--- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1675,7 +1675,7 @@
   HandleMark hm(thread);
   KlassHandle kh (thread, k_oop);
 
-  TraceTime t("FollowReferences", TraceJVMTIObjectTagging);
+  TraceTime t("FollowReferences", TRACETIME_LOG(Debug, jvmti, objecttagging));
   JvmtiTagMap::tag_map_for(this)->follow_references(heap_filter, kh, initial_object, callbacks, user_data);
   return JVMTI_ERROR_NONE;
 } /* end FollowReferences */
@@ -1706,7 +1706,7 @@
   HandleMark hm(thread);
   KlassHandle kh (thread, k_oop);
 
-  TraceTime t("IterateThroughHeap", TraceJVMTIObjectTagging);
+  TraceTime t("IterateThroughHeap", TRACETIME_LOG(Debug, jvmti, objecttagging));
   JvmtiTagMap::tag_map_for(this)->iterate_through_heap(heap_filter, kh, callbacks, user_data);
   return JVMTI_ERROR_NONE;
 } /* end IterateThroughHeap */
@@ -1738,7 +1738,7 @@
 // tag_result_ptr - NULL is a valid value, must be checked
 jvmtiError
 JvmtiEnv::GetObjectsWithTags(jint tag_count, const jlong* tags, jint* count_ptr, jobject** object_result_ptr, jlong** tag_result_ptr) {
-  TraceTime t("GetObjectsWithTags", TraceJVMTIObjectTagging);
+  TraceTime t("GetObjectsWithTags", TRACETIME_LOG(Debug, jvmti, objecttagging));
   return JvmtiTagMap::tag_map_for(this)->get_objects_with_tags((jlong*)tags, tag_count, count_ptr, object_result_ptr, tag_result_ptr);
 } /* end GetObjectsWithTags */
 
@@ -1771,7 +1771,7 @@
 // user_data - NULL is a valid value, must be checked
 jvmtiError
 JvmtiEnv::IterateOverReachableObjects(jvmtiHeapRootCallback heap_root_callback, jvmtiStackReferenceCallback stack_ref_callback, jvmtiObjectReferenceCallback object_ref_callback, const void* user_data) {
-  TraceTime t("IterateOverReachableObjects", TraceJVMTIObjectTagging);
+  TraceTime t("IterateOverReachableObjects", TRACETIME_LOG(Debug, jvmti, objecttagging));
   JvmtiTagMap::tag_map_for(this)->iterate_over_reachable_objects(heap_root_callback, stack_ref_callback, object_ref_callback, user_data);
   return JVMTI_ERROR_NONE;
 } /* end IterateOverReachableObjects */
@@ -1781,7 +1781,7 @@
 // user_data - NULL is a valid value, must be checked
 jvmtiError
 JvmtiEnv::IterateOverHeap(jvmtiHeapObjectFilter object_filter, jvmtiHeapObjectCallback heap_object_callback, const void* user_data) {
-  TraceTime t("IterateOverHeap", TraceJVMTIObjectTagging);
+  TraceTime t("IterateOverHeap", TRACETIME_LOG(Debug, jvmti, objecttagging));
   Thread *thread = Thread::current();
   HandleMark hm(thread);
   JvmtiTagMap::tag_map_for(this)->iterate_over_heap(object_filter, KlassHandle(), heap_object_callback, user_data);
@@ -1805,7 +1805,7 @@
   Thread *thread = Thread::current();
   HandleMark hm(thread);
   KlassHandle klass (thread, k_oop);
-  TraceTime t("IterateOverInstancesOfClass", TraceJVMTIObjectTagging);
+  TraceTime t("IterateOverInstancesOfClass", TRACETIME_LOG(Debug, jvmti, objecttagging));
   JvmtiTagMap::tag_map_for(this)->iterate_over_heap(object_filter, klass, heap_object_callback, user_data);
   return JVMTI_ERROR_NONE;
 } /* end IterateOverInstancesOfClass */
--- a/hotspot/src/share/vm/prims/jvmtiEventController.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiEventController.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "interpreter/interpreter.hpp"
 #include "jvmtifiles/jvmtiEnv.hpp"
+#include "logging/log.hpp"
 #include "memory/resourceArea.hpp"
 #include "prims/jvmtiEventController.hpp"
 #include "prims/jvmtiEventController.inline.hpp"
@@ -42,7 +43,7 @@
 #define EC_TRACE(out) do { \
   if (JvmtiTrace::trace_event_controller()) { \
     SafeResourceMark rm; \
-    tty->print_cr out; \
+    log_trace(jvmti) out; \
   } \
 } while (0)
 #else
@@ -344,7 +345,7 @@
 
 
 void JvmtiEventControllerPrivate::enter_interp_only_mode(JvmtiThreadState *state) {
-  EC_TRACE(("JVMTI [%s] # Entering interpreter only mode",
+  EC_TRACE(("[%s] # Entering interpreter only mode",
             JvmtiTrace::safe_get_thread_name(state->get_thread())));
 
   VM_EnterInterpOnlyMode op(state);
@@ -354,7 +355,7 @@
 
 void
 JvmtiEventControllerPrivate::leave_interp_only_mode(JvmtiThreadState *state) {
-  EC_TRACE(("JVMTI [%s] # Leaving interpreter only mode",
+  EC_TRACE(("[%s] # Leaving interpreter only mode",
             JvmtiTrace::safe_get_thread_name(state->get_thread())));
   state->leave_interp_only_mode();
 }
@@ -370,7 +371,7 @@
       jlong bit = JvmtiEventEnabled::bit_for((jvmtiEvent)ei);
       if (changed & bit) {
         // it changed, print it
-        tty->print_cr("JVMTI [%s] # %s event %s",
+         log_trace(jvmti)("[%s] # %s event %s",
                       JvmtiTrace::safe_get_thread_name(state->get_thread()),
                       (now_enabled & bit)? "Enabling" : "Disabling", JvmtiTrace::event_name((jvmtiEvent)ei));
       }
@@ -390,7 +391,7 @@
       jlong bit = JvmtiEventEnabled::bit_for((jvmtiEvent)ei);
       if (changed & bit) {
         // it changed, print it
-        tty->print_cr("JVMTI [-] # %s event %s",
+         log_trace(jvmti)("[-] # %s event %s",
                       (now_enabled & bit)? "Enabling" : "Disabling", JvmtiTrace::event_name((jvmtiEvent)ei));
       }
     }
@@ -563,7 +564,7 @@
   jlong was_any_env_thread_enabled = JvmtiEventController::_universal_global_event_enabled.get_bits();
   jlong any_env_thread_enabled = 0;
 
-  EC_TRACE(("JVMTI [-] # recompute enabled - before " UINT64_FORMAT_X, was_any_env_thread_enabled));
+  EC_TRACE(("[-] # recompute enabled - before " UINT64_FORMAT_X, was_any_env_thread_enabled));
 
   // compute non-thread-filters events.
   // This must be done separately from thread-filtered events, since some
@@ -643,7 +644,7 @@
 
   }
 
-  EC_TRACE(("JVMTI [-] # recompute enabled - after " UINT64_FORMAT_X, any_env_thread_enabled));
+  EC_TRACE(("[-] # recompute enabled - after " UINT64_FORMAT_X, any_env_thread_enabled));
 }
 
 
@@ -653,7 +654,7 @@
   assert(thread == Thread::current(), "must be current thread");
   assert(JvmtiEnvBase::environments_might_exist(), "to enter event controller, JVM TI environments must exist");
 
-  EC_TRACE(("JVMTI [%s] # thread started", JvmtiTrace::safe_get_thread_name(thread)));
+  EC_TRACE(("[%s] # thread started", JvmtiTrace::safe_get_thread_name(thread)));
 
   // if we have any thread filtered events globally enabled, create/update the thread state
   if ((JvmtiEventController::_universal_global_event_enabled.get_bits() & THREAD_FILTERED_EVENT_BITS) != 0) {
@@ -673,7 +674,7 @@
   // May be called after all environments have been disposed.
   assert(JvmtiThreadState_lock->is_locked(), "sanity check");
 
-  EC_TRACE(("JVMTI [%s] # thread ended", JvmtiTrace::safe_get_thread_name(thread)));
+  EC_TRACE(("[%s] # thread ended", JvmtiTrace::safe_get_thread_name(thread)));
 
   JvmtiThreadState *state = thread->jvmti_thread_state();
   assert(state != NULL, "else why are we here?");
@@ -684,7 +685,7 @@
                                                       const jvmtiEventCallbacks* callbacks,
                                                       jint size_of_callbacks) {
   assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
-  EC_TRACE(("JVMTI [*] # set event callbacks"));
+  EC_TRACE(("[*] # set event callbacks"));
 
   env->set_event_callbacks(callbacks, size_of_callbacks);
   jlong enabled_bits = 0;
@@ -704,7 +705,7 @@
                                                           jvmtiExtensionEvent callback)
 {
   assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
-  EC_TRACE(("JVMTI [*] # set extension event callback"));
+  EC_TRACE(("[*] # set extension event callback"));
 
   // extension events are allocated below JVMTI_MIN_EVENT_TYPE_VAL
   assert(extension_event_index >= (jint)EXT_MIN_EVENT_TYPE_VAL &&
@@ -750,7 +751,7 @@
 void
 JvmtiEventControllerPrivate::env_initialize(JvmtiEnvBase *env) {
   assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
-  EC_TRACE(("JVMTI [*] # env initialize"));
+  EC_TRACE(("[*] # env initialize"));
 
   if (JvmtiEnvBase::is_vm_live()) {
     // if we didn't initialize event info already (this is a late
@@ -772,7 +773,7 @@
 void
 JvmtiEventControllerPrivate::env_dispose(JvmtiEnvBase *env) {
   assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
-  EC_TRACE(("JVMTI [*] # env dispose"));
+  EC_TRACE(("[*] # env dispose"));
 
   // Before the environment is marked disposed, disable all events on this
   // environment (by zapping the callbacks).  As a result, the disposed
@@ -794,7 +795,7 @@
                                           jvmtiEvent event_type, bool enabled) {
   assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
 
-  EC_TRACE(("JVMTI [%s] # user %s event %s",
+  EC_TRACE(("[%s] # user %s event %s",
             thread==NULL? "ALL": JvmtiTrace::safe_get_thread_name(thread),
             enabled? "enabled" : "disabled", JvmtiTrace::event_name(event_type)));
 
@@ -813,7 +814,7 @@
 
 void
 JvmtiEventControllerPrivate::set_frame_pop(JvmtiEnvThreadState *ets, JvmtiFramePop fpop) {
-  EC_TRACE(("JVMTI [%s] # set frame pop - frame=%d",
+  EC_TRACE(("[%s] # set frame pop - frame=%d",
             JvmtiTrace::safe_get_thread_name(ets->get_thread()),
             fpop.frame_number() ));
 
@@ -824,7 +825,7 @@
 
 void
 JvmtiEventControllerPrivate::clear_frame_pop(JvmtiEnvThreadState *ets, JvmtiFramePop fpop) {
-  EC_TRACE(("JVMTI [%s] # clear frame pop - frame=%d",
+  EC_TRACE(("[%s] # clear frame pop - frame=%d",
             JvmtiTrace::safe_get_thread_name(ets->get_thread()),
             fpop.frame_number() ));
 
@@ -837,7 +838,7 @@
 JvmtiEventControllerPrivate::clear_to_frame_pop(JvmtiEnvThreadState *ets, JvmtiFramePop fpop) {
   int cleared_cnt = ets->get_frame_pops()->clear_to(fpop);
 
-  EC_TRACE(("JVMTI [%s] # clear to frame pop - frame=%d, count=%d",
+  EC_TRACE(("[%s] # clear to frame pop - frame=%d, count=%d",
             JvmtiTrace::safe_get_thread_name(ets->get_thread()),
             fpop.frame_number(),
             cleared_cnt ));
@@ -863,7 +864,7 @@
     return;
   }
 
-  EC_TRACE(("JVMTI [-] # change field watch - %s %s count=%d",
+  EC_TRACE(("[-] # change field watch - %s %s count=%d",
             event_type==JVMTI_EVENT_FIELD_MODIFICATION? "modification" : "access",
             added? "add" : "remove",
             *count_addr));
@@ -893,7 +894,7 @@
     return;
   }
 
-  EC_TRACE(("JVMTI [-] # VM live"));
+  EC_TRACE(("[-] # VM live"));
 
 #ifdef ASSERT
   // check that our idea and the spec's idea of threaded events match
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -29,6 +29,8 @@
 #include "code/scopeDesc.hpp"
 #include "interpreter/interpreter.hpp"
 #include "jvmtifiles/jvmtiEnv.hpp"
+#include "logging/log.hpp"
+#include "logging/logStream.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.hpp"
@@ -60,8 +62,8 @@
 #endif // INCLUDE_ALL_GCS
 
 #ifdef JVMTI_TRACE
-#define EVT_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_SENT) != 0) { SafeResourceMark rm; tty->print_cr out; }
-#define EVT_TRIG_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_TRIGGER) != 0) { SafeResourceMark rm; tty->print_cr out; }
+#define EVT_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_SENT) != 0) { SafeResourceMark rm; log_trace(jvmti) out; }
+#define EVT_TRIG_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_TRIGGER) != 0) { SafeResourceMark rm; log_trace(jvmti) out; }
 #else
 #define EVT_TRIG_TRACE(evt,out)
 #define EVT_TRACE(evt,out)
@@ -423,7 +425,10 @@
                          THREAD);
 
   if (HAS_PENDING_EXCEPTION) {
-    java_lang_Throwable::print(PENDING_EXCEPTION, tty);
+    LogTarget(Trace, jvmti) log;
+    LogStreamCHeap log_stream(log);
+    java_lang_Throwable::print(PENDING_EXCEPTION, &log_stream);
+    log_stream.cr();
     CLEAR_PENDING_EXCEPTION;
     return;
   }
@@ -465,7 +470,7 @@
 //
 
 void JvmtiExport::post_early_vm_start() {
-  EVT_TRIG_TRACE(JVMTI_EVENT_VM_START, ("JVMTI Trg Early VM start event triggered" ));
+  EVT_TRIG_TRACE(JVMTI_EVENT_VM_START, ("Trg Early VM start event triggered" ));
 
   // can now enable some events
   JvmtiEventController::vm_start();
@@ -474,7 +479,7 @@
   for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
     // Only early vmstart envs post early VMStart event
     if (env->early_vmstart_env() && env->is_enabled(JVMTI_EVENT_VM_START)) {
-      EVT_TRACE(JVMTI_EVENT_VM_START, ("JVMTI Evt Early VM start event sent" ));
+      EVT_TRACE(JVMTI_EVENT_VM_START, ("Evt Early VM start event sent" ));
       JavaThread *thread  = JavaThread::current();
       JvmtiThreadEventMark jem(thread);
       JvmtiJavaThreadEventTransition jet(thread);
@@ -487,7 +492,7 @@
 }
 
 void JvmtiExport::post_vm_start() {
-  EVT_TRIG_TRACE(JVMTI_EVENT_VM_START, ("JVMTI Trg VM start event triggered" ));
+  EVT_TRIG_TRACE(JVMTI_EVENT_VM_START, ("Trg VM start event triggered" ));
 
   // can now enable some events
   JvmtiEventController::vm_start();
@@ -496,7 +501,7 @@
   for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
     // Early vmstart envs do not post normal VMStart event
     if (!env->early_vmstart_env() && env->is_enabled(JVMTI_EVENT_VM_START)) {
-      EVT_TRACE(JVMTI_EVENT_VM_START, ("JVMTI Evt VM start event sent" ));
+      EVT_TRACE(JVMTI_EVENT_VM_START, ("Evt VM start event sent" ));
 
       JavaThread *thread  = JavaThread::current();
       JvmtiThreadEventMark jem(thread);
@@ -511,7 +516,7 @@
 
 
 void JvmtiExport::post_vm_initialized() {
-  EVT_TRIG_TRACE(JVMTI_EVENT_VM_INIT, ("JVMTI Trg VM init event triggered" ));
+  EVT_TRIG_TRACE(JVMTI_EVENT_VM_INIT, ("Trg VM init event triggered" ));
 
   // can now enable events
   JvmtiEventController::vm_init();
@@ -519,7 +524,7 @@
   JvmtiEnvIterator it;
   for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
     if (env->is_enabled(JVMTI_EVENT_VM_INIT)) {
-      EVT_TRACE(JVMTI_EVENT_VM_INIT, ("JVMTI Evt VM init event sent" ));
+      EVT_TRACE(JVMTI_EVENT_VM_INIT, ("Evt VM init event sent" ));
 
       JavaThread *thread  = JavaThread::current();
       JvmtiThreadEventMark jem(thread);
@@ -534,12 +539,12 @@
 
 
 void JvmtiExport::post_vm_death() {
-  EVT_TRIG_TRACE(JVMTI_EVENT_VM_DEATH, ("JVMTI Trg VM death event triggered" ));
+  EVT_TRIG_TRACE(JVMTI_EVENT_VM_DEATH, ("Trg VM death event triggered" ));
 
   JvmtiEnvIterator it;
   for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
     if (env->is_enabled(JVMTI_EVENT_VM_DEATH)) {
-      EVT_TRACE(JVMTI_EVENT_VM_DEATH, ("JVMTI Evt VM death event sent" ));
+      EVT_TRACE(JVMTI_EVENT_VM_DEATH, ("Evt VM death event sent" ));
 
       JavaThread *thread  = JavaThread::current();
       JvmtiEventMark jem(thread);
@@ -632,9 +637,6 @@
   }
 
   void post() {
-//    EVT_TRIG_TRACE(JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
-//                   ("JVMTI [%s] class file load hook event triggered",
-//                    JvmtiTrace::safe_get_thread_name(_thread)));
     post_all_envs();
     copy_modified_data();
   }
@@ -670,11 +672,6 @@
     }
     unsigned char *new_data = NULL;
     jint new_len = 0;
-//    EVT_TRACE(JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
-//     ("JVMTI [%s] class file load hook event sent %s  data_ptr = %d, data_len = %d",
-//               JvmtiTrace::safe_get_thread_name(_thread),
-//               _h_name == NULL ? "NULL" : _h_name->as_utf8(),
-//               _curr_data, _curr_len ));
     JvmtiClassFileLoadEventMark jem(_thread, _h_name, _class_loader,
                                     _h_protection_domain,
                                     _h_class_being_redefined);
@@ -840,7 +837,7 @@
   }
   JavaThread* thread = JavaThread::current();
   EVT_TRIG_TRACE(JVMTI_EVENT_COMPILED_METHOD_UNLOAD,
-                 ("JVMTI [%s] method compile unload event triggered",
+                 ("[%s] method compile unload event triggered",
                   JvmtiTrace::safe_get_thread_name(thread)));
 
   // post the event for each environment that has this event enabled.
@@ -851,7 +848,7 @@
         continue;
       }
       EVT_TRACE(JVMTI_EVENT_COMPILED_METHOD_UNLOAD,
-                ("JVMTI [%s] class compile method unload event sent jmethodID " PTR_FORMAT,
+                ("[%s] class compile method unload event sent jmethodID " PTR_FORMAT,
                  JvmtiTrace::safe_get_thread_name(thread), p2i(method)));
 
       ResourceMark rm(thread);
@@ -879,7 +876,7 @@
   if (state == NULL) {
     return;
   }
-  EVT_TRIG_TRACE(JVMTI_EVENT_BREAKPOINT, ("JVMTI [%s] Trg Breakpoint triggered",
+  EVT_TRIG_TRACE(JVMTI_EVENT_BREAKPOINT, ("[%s] Trg Breakpoint triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
   JvmtiEnvThreadStateIterator it(state);
   for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
@@ -887,7 +884,7 @@
     if (!ets->breakpoint_posted() && ets->is_enabled(JVMTI_EVENT_BREAKPOINT)) {
       ThreadState old_os_state = thread->osthread()->get_state();
       thread->osthread()->set_state(BREAKPOINTED);
-      EVT_TRACE(JVMTI_EVENT_BREAKPOINT, ("JVMTI [%s] Evt Breakpoint sent %s.%s @ " INTX_FORMAT,
+      EVT_TRACE(JVMTI_EVENT_BREAKPOINT, ("[%s] Evt Breakpoint sent %s.%s @ " INTX_FORMAT,
                      JvmtiTrace::safe_get_thread_name(thread),
                      (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
                      (mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -965,7 +962,7 @@
   if (state == NULL) {
     return;
   }
-  EVT_TRIG_TRACE(JVMTI_EVENT_SINGLE_STEP, ("JVMTI [%s] Trg Single Step triggered",
+  EVT_TRIG_TRACE(JVMTI_EVENT_SINGLE_STEP, ("[%s] Trg Single Step triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
   if (!state->hide_single_stepping()) {
     if (state->is_pending_step_for_popframe()) {
@@ -1004,7 +1001,7 @@
   HandleMark hm(thread);
   KlassHandle kh(thread, klass);
 
-  EVT_TRIG_TRACE(JVMTI_EVENT_CLASS_LOAD, ("JVMTI [%s] Trg Class Load triggered",
+  EVT_TRIG_TRACE(JVMTI_EVENT_CLASS_LOAD, ("[%s] Trg Class Load triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
   JvmtiThreadState* state = thread->jvmti_thread_state();
   if (state == NULL) {
@@ -1017,7 +1014,7 @@
       if (env->phase() == JVMTI_PHASE_PRIMORDIAL) {
         continue;
       }
-      EVT_TRACE(JVMTI_EVENT_CLASS_LOAD, ("JVMTI [%s] Evt Class Load sent %s",
+      EVT_TRACE(JVMTI_EVENT_CLASS_LOAD, ("[%s] Evt Class Load sent %s",
                                          JvmtiTrace::safe_get_thread_name(thread),
                                          kh()==NULL? "NULL" : kh()->external_name() ));
       JvmtiClassEventMark jem(thread, kh());
@@ -1038,7 +1035,7 @@
   HandleMark hm(thread);
   KlassHandle kh(thread, klass);
 
-  EVT_TRIG_TRACE(JVMTI_EVENT_CLASS_PREPARE, ("JVMTI [%s] Trg Class Prepare triggered",
+  EVT_TRIG_TRACE(JVMTI_EVENT_CLASS_PREPARE, ("[%s] Trg Class Prepare triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
   JvmtiThreadState* state = thread->jvmti_thread_state();
   if (state == NULL) {
@@ -1051,7 +1048,7 @@
       if (env->phase() == JVMTI_PHASE_PRIMORDIAL) {
         continue;
       }
-      EVT_TRACE(JVMTI_EVENT_CLASS_PREPARE, ("JVMTI [%s] Evt Class Prepare sent %s",
+      EVT_TRACE(JVMTI_EVENT_CLASS_PREPARE, ("[%s] Evt Class Prepare sent %s",
                                             JvmtiTrace::safe_get_thread_name(thread),
                                             kh()==NULL? "NULL" : kh()->external_name() ));
       JvmtiClassEventMark jem(thread, kh());
@@ -1072,7 +1069,7 @@
   HandleMark hm(thread);
   KlassHandle kh(thread, klass);
 
-  EVT_TRIG_TRACE(EXT_EVENT_CLASS_UNLOAD, ("JVMTI [?] Trg Class Unload triggered" ));
+  EVT_TRIG_TRACE(EXT_EVENT_CLASS_UNLOAD, ("[?] Trg Class Unload triggered" ));
   if (JvmtiEventController::is_enabled((jvmtiEvent)EXT_EVENT_CLASS_UNLOAD)) {
     assert(thread->is_VM_thread(), "wrong thread");
 
@@ -1086,7 +1083,7 @@
         continue;
       }
       if (env->is_enabled((jvmtiEvent)EXT_EVENT_CLASS_UNLOAD)) {
-        EVT_TRACE(EXT_EVENT_CLASS_UNLOAD, ("JVMTI [?] Evt Class Unload sent %s",
+        EVT_TRACE(EXT_EVENT_CLASS_UNLOAD, ("[?] Evt Class Unload sent %s",
                   kh()==NULL? "NULL" : kh()->external_name() ));
 
         // do everything manually, since this is a proxy - needs special care
@@ -1125,7 +1122,7 @@
   }
   assert(thread->thread_state() == _thread_in_vm, "must be in vm state");
 
-  EVT_TRIG_TRACE(JVMTI_EVENT_THREAD_START, ("JVMTI [%s] Trg Thread Start event triggered",
+  EVT_TRIG_TRACE(JVMTI_EVENT_THREAD_START, ("[%s] Trg Thread Start event triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
 
   // do JVMTI thread initialization (if needed)
@@ -1140,7 +1137,7 @@
         continue;
       }
       if (env->is_enabled(JVMTI_EVENT_THREAD_START)) {
-        EVT_TRACE(JVMTI_EVENT_THREAD_START, ("JVMTI [%s] Evt Thread Start event sent",
+        EVT_TRACE(JVMTI_EVENT_THREAD_START, ("[%s] Evt Thread Start event sent",
                      JvmtiTrace::safe_get_thread_name(thread) ));
 
         JvmtiThreadEventMark jem(thread);
@@ -1159,7 +1156,7 @@
   if (JvmtiEnv::get_phase() < JVMTI_PHASE_PRIMORDIAL) {
     return;
   }
-  EVT_TRIG_TRACE(JVMTI_EVENT_THREAD_END, ("JVMTI [%s] Trg Thread End event triggered",
+  EVT_TRIG_TRACE(JVMTI_EVENT_THREAD_END, ("[%s] Trg Thread End event triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
 
   JvmtiThreadState *state = thread->jvmti_thread_state();
@@ -1178,7 +1175,7 @@
         if (env->phase() == JVMTI_PHASE_PRIMORDIAL) {
           continue;
         }
-        EVT_TRACE(JVMTI_EVENT_THREAD_END, ("JVMTI [%s] Evt Thread End event sent",
+        EVT_TRACE(JVMTI_EVENT_THREAD_END, ("[%s] Evt Thread End event sent",
                      JvmtiTrace::safe_get_thread_name(thread) ));
 
         JvmtiThreadEventMark jem(thread);
@@ -1196,8 +1193,8 @@
   assert(SafepointSynchronize::is_at_safepoint(), "must be executed at safepoint");
   assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE), "checking");
 
-  EVT_TRIG_TRACE(JVMTI_EVENT_OBJECT_FREE, ("JVMTI [?] Trg Object Free triggered" ));
-  EVT_TRACE(JVMTI_EVENT_OBJECT_FREE, ("JVMTI [?] Evt Object Free sent"));
+  EVT_TRIG_TRACE(JVMTI_EVENT_OBJECT_FREE, ("[?] Trg Object Free triggered" ));
+  EVT_TRACE(JVMTI_EVENT_OBJECT_FREE, ("[?] Evt Object Free sent"));
 
   jvmtiEventObjectFree callback = env->callbacks()->ObjectFree;
   if (callback != NULL) {
@@ -1206,12 +1203,12 @@
 }
 
 void JvmtiExport::post_resource_exhausted(jint resource_exhausted_flags, const char* description) {
-  EVT_TRIG_TRACE(JVMTI_EVENT_RESOURCE_EXHAUSTED, ("JVMTI Trg resource exhausted event triggered" ));
+  EVT_TRIG_TRACE(JVMTI_EVENT_RESOURCE_EXHAUSTED, ("Trg resource exhausted event triggered" ));
 
   JvmtiEnvIterator it;
   for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
     if (env->is_enabled(JVMTI_EVENT_RESOURCE_EXHAUSTED)) {
-      EVT_TRACE(JVMTI_EVENT_RESOURCE_EXHAUSTED, ("JVMTI Evt resource exhausted event sent" ));
+      EVT_TRACE(JVMTI_EVENT_RESOURCE_EXHAUSTED, ("Evt resource exhausted event sent" ));
 
       JavaThread *thread  = JavaThread::current();
       JvmtiThreadEventMark jem(thread);
@@ -1229,7 +1226,7 @@
   HandleMark hm(thread);
   methodHandle mh(thread, method);
 
-  EVT_TRIG_TRACE(JVMTI_EVENT_METHOD_ENTRY, ("JVMTI [%s] Trg Method Entry triggered %s.%s",
+  EVT_TRIG_TRACE(JVMTI_EVENT_METHOD_ENTRY, ("[%s] Trg Method Entry triggered %s.%s",
                      JvmtiTrace::safe_get_thread_name(thread),
                      (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
                      (mh() == NULL) ? "NULL" : mh()->name()->as_C_string() ));
@@ -1246,7 +1243,7 @@
     JvmtiEnvThreadStateIterator it(state);
     for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
       if (ets->is_enabled(JVMTI_EVENT_METHOD_ENTRY)) {
-        EVT_TRACE(JVMTI_EVENT_METHOD_ENTRY, ("JVMTI [%s] Evt Method Entry sent %s.%s",
+        EVT_TRACE(JVMTI_EVENT_METHOD_ENTRY, ("[%s] Evt Method Entry sent %s.%s",
                                              JvmtiTrace::safe_get_thread_name(thread),
                                              (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
                                              (mh() == NULL) ? "NULL" : mh()->name()->as_C_string() ));
@@ -1267,7 +1264,7 @@
   HandleMark hm(thread);
   methodHandle mh(thread, method);
 
-  EVT_TRIG_TRACE(JVMTI_EVENT_METHOD_EXIT, ("JVMTI [%s] Trg Method Exit triggered %s.%s",
+  EVT_TRIG_TRACE(JVMTI_EVENT_METHOD_EXIT, ("[%s] Trg Method Exit triggered %s.%s",
                      JvmtiTrace::safe_get_thread_name(thread),
                      (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
                      (mh() == NULL) ? "NULL" : mh()->name()->as_C_string() ));
@@ -1303,7 +1300,7 @@
     JvmtiEnvThreadStateIterator it(state);
     for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
       if (ets->is_enabled(JVMTI_EVENT_METHOD_EXIT)) {
-        EVT_TRACE(JVMTI_EVENT_METHOD_EXIT, ("JVMTI [%s] Evt Method Exit sent %s.%s",
+        EVT_TRACE(JVMTI_EVENT_METHOD_EXIT, ("[%s] Evt Method Exit sent %s.%s",
                                             JvmtiTrace::safe_get_thread_name(thread),
                                             (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
                                             (mh() == NULL) ? "NULL" : mh()->name()->as_C_string() ));
@@ -1332,7 +1329,7 @@
         // we have a NotifyFramePop entry for this frame.
         // now check that this env/thread wants this event
         if (ets->is_enabled(JVMTI_EVENT_FRAME_POP)) {
-          EVT_TRACE(JVMTI_EVENT_FRAME_POP, ("JVMTI [%s] Evt Frame Pop sent %s.%s",
+          EVT_TRACE(JVMTI_EVENT_FRAME_POP, ("[%s] Evt Frame Pop sent %s.%s",
                                             JvmtiTrace::safe_get_thread_name(thread),
                                             (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
                                             (mh() == NULL) ? "NULL" : mh()->name()->as_C_string() ));
@@ -1370,7 +1367,7 @@
   for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
     ets->compare_and_set_current_location(mh(), location, JVMTI_EVENT_SINGLE_STEP);
     if (!ets->single_stepping_posted() && ets->is_enabled(JVMTI_EVENT_SINGLE_STEP)) {
-      EVT_TRACE(JVMTI_EVENT_SINGLE_STEP, ("JVMTI [%s] Evt Single Step sent %s.%s @ " INTX_FORMAT,
+      EVT_TRACE(JVMTI_EVENT_SINGLE_STEP, ("[%s] Evt Single Step sent %s.%s @ " INTX_FORMAT,
                     JvmtiTrace::safe_get_thread_name(thread),
                     (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
                     (mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -1401,7 +1398,7 @@
     return;
   }
 
-  EVT_TRIG_TRACE(JVMTI_EVENT_EXCEPTION, ("JVMTI [%s] Trg Exception thrown triggered",
+  EVT_TRIG_TRACE(JVMTI_EVENT_EXCEPTION, ("[%s] Trg Exception thrown triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
   if (!state->is_exception_detected()) {
     state->set_exception_detected();
@@ -1410,7 +1407,7 @@
       if (ets->is_enabled(JVMTI_EVENT_EXCEPTION) && (exception != NULL)) {
 
         EVT_TRACE(JVMTI_EVENT_EXCEPTION,
-                     ("JVMTI [%s] Evt Exception thrown sent %s.%s @ " INTX_FORMAT,
+                     ("[%s] Evt Exception thrown sent %s.%s @ " INTX_FORMAT,
                       JvmtiTrace::safe_get_thread_name(thread),
                       (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
                       (mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -1486,7 +1483,7 @@
     return;
   }
   EVT_TRIG_TRACE(JVMTI_EVENT_EXCEPTION_CATCH,
-                    ("JVMTI [%s] Trg unwind_due_to_exception triggered %s.%s @ %s" INTX_FORMAT " - %s",
+                    ("[%s] Trg unwind_due_to_exception triggered %s.%s @ %s" INTX_FORMAT " - %s",
                      JvmtiTrace::safe_get_thread_name(thread),
                      (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
                      (mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -1521,7 +1518,7 @@
       for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
         if (ets->is_enabled(JVMTI_EVENT_EXCEPTION_CATCH) && (exception_handle() != NULL)) {
           EVT_TRACE(JVMTI_EVENT_EXCEPTION_CATCH,
-                     ("JVMTI [%s] Evt ExceptionCatch sent %s.%s @ " INTX_FORMAT,
+                     ("[%s] Evt ExceptionCatch sent %s.%s @ " INTX_FORMAT,
                       JvmtiTrace::safe_get_thread_name(thread),
                       (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
                       (mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -1610,12 +1607,12 @@
   if (state == NULL) {
     return;
   }
-  EVT_TRIG_TRACE(JVMTI_EVENT_FIELD_ACCESS, ("JVMTI [%s] Trg Field Access event triggered",
+  EVT_TRIG_TRACE(JVMTI_EVENT_FIELD_ACCESS, ("[%s] Trg Field Access event triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
   JvmtiEnvThreadStateIterator it(state);
   for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
     if (ets->is_enabled(JVMTI_EVENT_FIELD_ACCESS)) {
-      EVT_TRACE(JVMTI_EVENT_FIELD_ACCESS, ("JVMTI [%s] Evt Field Access event sent %s.%s @ " INTX_FORMAT,
+      EVT_TRACE(JVMTI_EVENT_FIELD_ACCESS, ("[%s] Evt Field Access event sent %s.%s @ " INTX_FORMAT,
                      JvmtiTrace::safe_get_thread_name(thread),
                      (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
                      (mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -1772,14 +1769,14 @@
     return;
   }
   EVT_TRIG_TRACE(JVMTI_EVENT_FIELD_MODIFICATION,
-                     ("JVMTI [%s] Trg Field Modification event triggered",
+                     ("[%s] Trg Field Modification event triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
 
   JvmtiEnvThreadStateIterator it(state);
   for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
     if (ets->is_enabled(JVMTI_EVENT_FIELD_MODIFICATION)) {
       EVT_TRACE(JVMTI_EVENT_FIELD_MODIFICATION,
-                   ("JVMTI [%s] Evt Field Modification event sent %s.%s @ " INTX_FORMAT,
+                   ("[%s] Evt Field Modification event sent %s.%s @ " INTX_FORMAT,
                     JvmtiTrace::safe_get_thread_name(thread),
                     (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
                     (mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -1807,14 +1804,14 @@
   HandleMark hm(thread);
   methodHandle mh(thread, method);
 
-  EVT_TRIG_TRACE(JVMTI_EVENT_NATIVE_METHOD_BIND, ("JVMTI [%s] Trg Native Method Bind event triggered",
+  EVT_TRIG_TRACE(JVMTI_EVENT_NATIVE_METHOD_BIND, ("[%s] Trg Native Method Bind event triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
 
   if (JvmtiEventController::is_enabled(JVMTI_EVENT_NATIVE_METHOD_BIND)) {
     JvmtiEnvIterator it;
     for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
       if (env->is_enabled(JVMTI_EVENT_NATIVE_METHOD_BIND)) {
-        EVT_TRACE(JVMTI_EVENT_NATIVE_METHOD_BIND, ("JVMTI [%s] Evt Native Method Bind event sent",
+        EVT_TRACE(JVMTI_EVENT_NATIVE_METHOD_BIND, ("[%s] Evt Native Method Bind event sent",
                      JvmtiTrace::safe_get_thread_name(thread) ));
 
         JvmtiMethodEventMark jem(thread, mh);
@@ -1878,7 +1875,7 @@
   JavaThread* thread = JavaThread::current();
 
   EVT_TRIG_TRACE(JVMTI_EVENT_COMPILED_METHOD_LOAD,
-                 ("JVMTI [%s] method compile load event triggered",
+                 ("[%s] method compile load event triggered",
                  JvmtiTrace::safe_get_thread_name(thread)));
 
   JvmtiEnvIterator it;
@@ -1888,7 +1885,7 @@
         continue;
       }
       EVT_TRACE(JVMTI_EVENT_COMPILED_METHOD_LOAD,
-                ("JVMTI [%s] class compile method load event sent %s.%s  ",
+                ("[%s] class compile method load event sent %s.%s  ",
                 JvmtiTrace::safe_get_thread_name(thread),
                 (nm->method() == NULL) ? "NULL" : nm->method()->klass_name()->as_C_string(),
                 (nm->method() == NULL) ? "NULL" : nm->method()->name()->as_C_string()));
@@ -1921,12 +1918,12 @@
   }
   JavaThread* thread = JavaThread::current();
   EVT_TRIG_TRACE(JVMTI_EVENT_COMPILED_METHOD_LOAD,
-                 ("JVMTI [%s] method compile load event triggered (by GenerateEvents)",
+                 ("[%s] method compile load event triggered (by GenerateEvents)",
                  JvmtiTrace::safe_get_thread_name(thread)));
   if (env->is_enabled(JVMTI_EVENT_COMPILED_METHOD_LOAD)) {
 
     EVT_TRACE(JVMTI_EVENT_COMPILED_METHOD_LOAD,
-              ("JVMTI [%s] class compile method load event sent (by GenerateEvents), jmethodID=" PTR_FORMAT,
+              ("[%s] class compile method load event sent (by GenerateEvents), jmethodID=" PTR_FORMAT,
                JvmtiTrace::safe_get_thread_name(thread), p2i(method)));
 
     JvmtiEventMark jem(thread);
@@ -1949,13 +1946,13 @@
   ThreadInVMfromUnknown __tiv;
 
   EVT_TRIG_TRACE(JVMTI_EVENT_DYNAMIC_CODE_GENERATED,
-                 ("JVMTI [%s] method dynamic code generated event triggered",
+                 ("[%s] method dynamic code generated event triggered",
                  JvmtiTrace::safe_get_thread_name(thread)));
   JvmtiEnvIterator it;
   for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
     if (env->is_enabled(JVMTI_EVENT_DYNAMIC_CODE_GENERATED)) {
       EVT_TRACE(JVMTI_EVENT_DYNAMIC_CODE_GENERATED,
-                ("JVMTI [%s] dynamic code generated event sent for %s",
+                ("[%s] dynamic code generated event sent for %s",
                 JvmtiTrace::safe_get_thread_name(thread), name));
       JvmtiEventMark jem(thread);
       JvmtiJavaThreadEventTransition jet(thread);
@@ -1991,11 +1988,11 @@
 {
   JavaThread* thread = JavaThread::current();
   EVT_TRIG_TRACE(JVMTI_EVENT_DYNAMIC_CODE_GENERATED,
-                 ("JVMTI [%s] dynamic code generated event triggered (by GenerateEvents)",
+                 ("[%s] dynamic code generated event triggered (by GenerateEvents)",
                   JvmtiTrace::safe_get_thread_name(thread)));
   if (env->is_enabled(JVMTI_EVENT_DYNAMIC_CODE_GENERATED)) {
     EVT_TRACE(JVMTI_EVENT_DYNAMIC_CODE_GENERATED,
-              ("JVMTI [%s] dynamic code generated event sent for %s",
+              ("[%s] dynamic code generated event sent for %s",
                JvmtiTrace::safe_get_thread_name(thread), name));
     JvmtiEventMark jem(thread);
     JvmtiJavaThreadEventTransition jet(thread);
@@ -2048,13 +2045,13 @@
 void JvmtiExport::post_garbage_collection_finish() {
   Thread *thread = Thread::current(); // this event is posted from VM-Thread.
   EVT_TRIG_TRACE(JVMTI_EVENT_GARBAGE_COLLECTION_FINISH,
-                 ("JVMTI [%s] garbage collection finish event triggered",
+                 ("[%s] garbage collection finish event triggered",
                   JvmtiTrace::safe_get_thread_name(thread)));
   JvmtiEnvIterator it;
   for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
     if (env->is_enabled(JVMTI_EVENT_GARBAGE_COLLECTION_FINISH)) {
       EVT_TRACE(JVMTI_EVENT_GARBAGE_COLLECTION_FINISH,
-                ("JVMTI [%s] garbage collection finish event sent ",
+                ("[%s] garbage collection finish event sent",
                  JvmtiTrace::safe_get_thread_name(thread)));
       JvmtiThreadEventTransition jet(thread);
       // JNIEnv is NULL here because this event is posted from VM Thread
@@ -2069,13 +2066,13 @@
 void JvmtiExport::post_garbage_collection_start() {
   Thread* thread = Thread::current(); // this event is posted from vm-thread.
   EVT_TRIG_TRACE(JVMTI_EVENT_GARBAGE_COLLECTION_START,
-                 ("JVMTI [%s] garbage collection start event triggered",
+                 ("[%s] garbage collection start event triggered",
                   JvmtiTrace::safe_get_thread_name(thread)));
   JvmtiEnvIterator it;
   for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
     if (env->is_enabled(JVMTI_EVENT_GARBAGE_COLLECTION_START)) {
       EVT_TRACE(JVMTI_EVENT_GARBAGE_COLLECTION_START,
-                ("JVMTI [%s] garbage collection start event sent ",
+                ("[%s] garbage collection start event sent",
                  JvmtiTrace::safe_get_thread_name(thread)));
       JvmtiThreadEventTransition jet(thread);
       // JNIEnv is NULL here because this event is posted from VM Thread
@@ -2090,13 +2087,13 @@
 void JvmtiExport::post_data_dump() {
   Thread *thread = Thread::current();
   EVT_TRIG_TRACE(JVMTI_EVENT_DATA_DUMP_REQUEST,
-                 ("JVMTI [%s] data dump request event triggered",
+                 ("[%s] data dump request event triggered",
                   JvmtiTrace::safe_get_thread_name(thread)));
   JvmtiEnvIterator it;
   for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
     if (env->is_enabled(JVMTI_EVENT_DATA_DUMP_REQUEST)) {
       EVT_TRACE(JVMTI_EVENT_DATA_DUMP_REQUEST,
-                ("JVMTI [%s] data dump request event sent ",
+                ("[%s] data dump request event sent",
                  JvmtiTrace::safe_get_thread_name(thread)));
      JvmtiThreadEventTransition jet(thread);
      // JNIEnv is NULL here because this event is posted from VM Thread
@@ -2123,14 +2120,14 @@
   Handle h(thread, object);
 
   EVT_TRIG_TRACE(JVMTI_EVENT_MONITOR_CONTENDED_ENTER,
-                     ("JVMTI [%s] montior contended enter event triggered",
+                     ("[%s] montior contended enter event triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
 
   JvmtiEnvThreadStateIterator it(state);
   for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
     if (ets->is_enabled(JVMTI_EVENT_MONITOR_CONTENDED_ENTER)) {
       EVT_TRACE(JVMTI_EVENT_MONITOR_CONTENDED_ENTER,
-                   ("JVMTI [%s] monitor contended enter event sent",
+                   ("[%s] monitor contended enter event sent",
                     JvmtiTrace::safe_get_thread_name(thread)));
       JvmtiMonitorEventMark  jem(thread, h());
       JvmtiEnv *env = ets->get_env();
@@ -2158,14 +2155,14 @@
   Handle h(thread, object);
 
   EVT_TRIG_TRACE(JVMTI_EVENT_MONITOR_CONTENDED_ENTERED,
-                     ("JVMTI [%s] montior contended entered event triggered",
+                     ("[%s] montior contended entered event triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
 
   JvmtiEnvThreadStateIterator it(state);
   for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
     if (ets->is_enabled(JVMTI_EVENT_MONITOR_CONTENDED_ENTERED)) {
       EVT_TRACE(JVMTI_EVENT_MONITOR_CONTENDED_ENTERED,
-                   ("JVMTI [%s] monitor contended enter event sent",
+                   ("[%s] monitor contended enter event sent",
                     JvmtiTrace::safe_get_thread_name(thread)));
       JvmtiMonitorEventMark  jem(thread, h());
       JvmtiEnv *env = ets->get_env();
@@ -2189,14 +2186,14 @@
   Handle h(thread, object);
 
   EVT_TRIG_TRACE(JVMTI_EVENT_MONITOR_WAIT,
-                     ("JVMTI [%s] montior wait event triggered",
+                     ("[%s] montior wait event triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
 
   JvmtiEnvThreadStateIterator it(state);
   for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
     if (ets->is_enabled(JVMTI_EVENT_MONITOR_WAIT)) {
       EVT_TRACE(JVMTI_EVENT_MONITOR_WAIT,
-                   ("JVMTI [%s] monitor wait event sent ",
+                   ("[%s] monitor wait event sent",
                     JvmtiTrace::safe_get_thread_name(thread)));
       JvmtiMonitorEventMark  jem(thread, h());
       JvmtiEnv *env = ets->get_env();
@@ -2225,14 +2222,14 @@
   Handle h(thread, object);
 
   EVT_TRIG_TRACE(JVMTI_EVENT_MONITOR_WAITED,
-                     ("JVMTI [%s] montior waited event triggered",
+                     ("[%s] montior waited event triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
 
   JvmtiEnvThreadStateIterator it(state);
   for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
     if (ets->is_enabled(JVMTI_EVENT_MONITOR_WAITED)) {
       EVT_TRACE(JVMTI_EVENT_MONITOR_WAITED,
-                   ("JVMTI [%s] monitor waited event sent ",
+                   ("[%s] monitor waited event sent",
                     JvmtiTrace::safe_get_thread_name(thread)));
       JvmtiMonitorEventMark  jem(thread, h());
       JvmtiEnv *env = ets->get_env();
@@ -2248,7 +2245,7 @@
 
 
 void JvmtiExport::post_vm_object_alloc(JavaThread *thread,  oop object) {
-  EVT_TRIG_TRACE(JVMTI_EVENT_VM_OBJECT_ALLOC, ("JVMTI [%s] Trg vm object alloc triggered",
+  EVT_TRIG_TRACE(JVMTI_EVENT_VM_OBJECT_ALLOC, ("[%s] Trg vm object alloc triggered",
                       JvmtiTrace::safe_get_thread_name(thread)));
   if (object == NULL) {
     return;
@@ -2258,7 +2255,7 @@
   JvmtiEnvIterator it;
   for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
     if (env->is_enabled(JVMTI_EVENT_VM_OBJECT_ALLOC)) {
-      EVT_TRACE(JVMTI_EVENT_VM_OBJECT_ALLOC, ("JVMTI [%s] Evt vmobject alloc sent %s",
+      EVT_TRACE(JVMTI_EVENT_VM_OBJECT_ALLOC, ("[%s] Evt vmobject alloc sent %s",
                                          JvmtiTrace::safe_get_thread_name(thread),
                                          object==NULL? "NULL" : object->klass()->external_name()));
 
--- a/hotspot/src/share/vm/prims/jvmtiImpl.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiImpl.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -27,6 +27,8 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/oopMapCache.hpp"
 #include "jvmtifiles/jvmtiEnv.hpp"
+#include "logging/log.hpp"
+#include "logging/logStream.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/oop.inline.hpp"
@@ -321,12 +323,12 @@
   each_method_version_do(&Method::clear_breakpoint);
 }
 
-void JvmtiBreakpoint::print() {
+void JvmtiBreakpoint::print(outputStream* out) {
 #ifndef PRODUCT
+  ResourceMark rm;
   const char *class_name  = (_method == NULL) ? "NULL" : _method->klass_name()->as_C_string();
   const char *method_name = (_method == NULL) ? "NULL" : _method->name()->as_C_string();
-
-  tty->print("Breakpoint(%s,%s,%d,%p)",class_name, method_name, _bci, getBcp());
+  out->print("Breakpoint(%s,%s,%d,%p)", class_name, method_name, _bci, getBcp());
 #endif
 }
 
@@ -389,16 +391,17 @@
   _bps.gc_epilogue();
 }
 
-void  JvmtiBreakpoints::print() {
+void JvmtiBreakpoints::print() {
 #ifndef PRODUCT
-  ResourceMark rm;
+  LogTarget(Trace, jvmti) log;
+  LogStreamCHeap log_stream(log);
 
   int n = _bps.length();
   for (int i=0; i<n; i++) {
     JvmtiBreakpoint& bp = _bps.at(i);
-    tty->print("%d: ", i);
-    bp.print();
-    tty->cr();
+    log_stream.print("%d: ", i);
+    bp.print(&log_stream);
+    log_stream.cr();
   }
 #endif
 }
@@ -875,22 +878,21 @@
 void JvmtiSuspendControl::print() {
 #ifndef PRODUCT
   MutexLocker mu(Threads_lock);
-  ResourceMark rm;
-
-  tty->print("Suspended Threads: [");
+  LogStreamHandle(Trace, jvmti) log_stream;
+  log_stream.print("Suspended Threads: [");
   for (JavaThread *thread = Threads::first(); thread != NULL; thread = thread->next()) {
 #ifdef JVMTI_TRACE
     const char *name   = JvmtiTrace::safe_get_thread_name(thread);
 #else
     const char *name   = "";
 #endif /*JVMTI_TRACE */
-    tty->print("%s(%c ", name, thread->is_being_ext_suspended() ? 'S' : '_');
+    log_stream.print("%s(%c ", name, thread->is_being_ext_suspended() ? 'S' : '_');
     if (!thread->has_last_Java_frame()) {
-      tty->print("no stack");
+      log_stream.print("no stack");
     }
-    tty->print(") ");
+    log_stream.print(") ");
   }
-  tty->print_cr("]");
+  log_stream.print_cr("]");
 #endif
 }
 
--- a/hotspot/src/share/vm/prims/jvmtiImpl.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiImpl.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -34,6 +34,7 @@
 #include "prims/jvmtiUtil.hpp"
 #include "runtime/stackValueCollection.hpp"
 #include "runtime/vm_operations.hpp"
+#include "utilities/ostream.hpp"
 
 //
 // Forward Declarations
@@ -186,7 +187,7 @@
   void each_method_version_do(method_action meth_act);
   void set();
   void clear();
-  void print();
+  void print(outputStream* out);
 
   Method* method() { return _method; }
 
--- a/hotspot/src/share/vm/prims/jvmtiManageCapabilities.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiManageCapabilities.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -24,8 +24,10 @@
 
 #include "precompiled.hpp"
 #include "jvmtifiles/jvmtiEnv.hpp"
+#include "logging/log.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "prims/jvmtiManageCapabilities.hpp"
+
 static const jint CAPA_SIZE = (JVMTI_INTERNAL_CAPABILITY_COUNT + 7) / 8;
 
   // capabilities which are always potentially available
@@ -373,87 +375,87 @@
 #ifndef PRODUCT
 
 void JvmtiManageCapabilities:: print(const jvmtiCapabilities* cap) {
-  tty->print_cr("----- capabilities -----");
+  log_trace(jvmti)("----- capabilities -----");
   if (cap->can_tag_objects)
-    tty->print_cr("can_tag_objects");
+    log_trace(jvmti)("can_tag_objects");
   if (cap->can_generate_field_modification_events)
-    tty->print_cr("can_generate_field_modification_events");
+    log_trace(jvmti)("can_generate_field_modification_events");
   if (cap->can_generate_field_access_events)
-    tty->print_cr("can_generate_field_access_events");
+    log_trace(jvmti)("can_generate_field_access_events");
   if (cap->can_get_bytecodes)
-    tty->print_cr("can_get_bytecodes");
+    log_trace(jvmti)("can_get_bytecodes");
   if (cap->can_get_synthetic_attribute)
-    tty->print_cr("can_get_synthetic_attribute");
+    log_trace(jvmti)("can_get_synthetic_attribute");
   if (cap->can_get_owned_monitor_info)
-    tty->print_cr("can_get_owned_monitor_info");
+    log_trace(jvmti)("can_get_owned_monitor_info");
   if (cap->can_get_current_contended_monitor)
-    tty->print_cr("can_get_current_contended_monitor");
+    log_trace(jvmti)("can_get_current_contended_monitor");
   if (cap->can_get_monitor_info)
-    tty->print_cr("can_get_monitor_info");
+    log_trace(jvmti)("can_get_monitor_info");
   if (cap->can_get_constant_pool)
-    tty->print_cr("can_get_constant_pool");
+    log_trace(jvmti)("can_get_constant_pool");
   if (cap->can_pop_frame)
-    tty->print_cr("can_pop_frame");
+    log_trace(jvmti)("can_pop_frame");
   if (cap->can_force_early_return)
-    tty->print_cr("can_force_early_return");
+    log_trace(jvmti)("can_force_early_return");
   if (cap->can_redefine_classes)
-    tty->print_cr("can_redefine_classes");
+    log_trace(jvmti)("can_redefine_classes");
   if (cap->can_retransform_classes)
-    tty->print_cr("can_retransform_classes");
+    log_trace(jvmti)("can_retransform_classes");
   if (cap->can_signal_thread)
-    tty->print_cr("can_signal_thread");
+    log_trace(jvmti)("can_signal_thread");
   if (cap->can_get_source_file_name)
-    tty->print_cr("can_get_source_file_name");
+    log_trace(jvmti)("can_get_source_file_name");
   if (cap->can_get_line_numbers)
-    tty->print_cr("can_get_line_numbers");
+    log_trace(jvmti)("can_get_line_numbers");
   if (cap->can_get_source_debug_extension)
-    tty->print_cr("can_get_source_debug_extension");
+    log_trace(jvmti)("can_get_source_debug_extension");
   if (cap->can_access_local_variables)
-    tty->print_cr("can_access_local_variables");
+    log_trace(jvmti)("can_access_local_variables");
   if (cap->can_maintain_original_method_order)
-    tty->print_cr("can_maintain_original_method_order");
+    log_trace(jvmti)("can_maintain_original_method_order");
   if (cap->can_generate_single_step_events)
-    tty->print_cr("can_generate_single_step_events");
+    log_trace(jvmti)("can_generate_single_step_events");
   if (cap->can_generate_exception_events)
-    tty->print_cr("can_generate_exception_events");
+    log_trace(jvmti)("can_generate_exception_events");
   if (cap->can_generate_frame_pop_events)
-    tty->print_cr("can_generate_frame_pop_events");
+    log_trace(jvmti)("can_generate_frame_pop_events");
   if (cap->can_generate_breakpoint_events)
-    tty->print_cr("can_generate_breakpoint_events");
+    log_trace(jvmti)("can_generate_breakpoint_events");
   if (cap->can_suspend)
-    tty->print_cr("can_suspend");
+    log_trace(jvmti)("can_suspend");
   if (cap->can_redefine_any_class )
-    tty->print_cr("can_redefine_any_class");
+    log_trace(jvmti)("can_redefine_any_class");
   if (cap->can_retransform_any_class )
-    tty->print_cr("can_retransform_any_class");
+    log_trace(jvmti)("can_retransform_any_class");
   if (cap->can_get_current_thread_cpu_time)
-    tty->print_cr("can_get_current_thread_cpu_time");
+    log_trace(jvmti)("can_get_current_thread_cpu_time");
   if (cap->can_get_thread_cpu_time)
-    tty->print_cr("can_get_thread_cpu_time");
+    log_trace(jvmti)("can_get_thread_cpu_time");
   if (cap->can_generate_method_entry_events)
-    tty->print_cr("can_generate_method_entry_events");
+    log_trace(jvmti)("can_generate_method_entry_events");
   if (cap->can_generate_method_exit_events)
-    tty->print_cr("can_generate_method_exit_events");
+    log_trace(jvmti)("can_generate_method_exit_events");
   if (cap->can_generate_all_class_hook_events)
-    tty->print_cr("can_generate_all_class_hook_events");
+    log_trace(jvmti)("can_generate_all_class_hook_events");
   if (cap->can_generate_compiled_method_load_events)
-    tty->print_cr("can_generate_compiled_method_load_events");
+    log_trace(jvmti)("can_generate_compiled_method_load_events");
   if (cap->can_generate_monitor_events)
-    tty->print_cr("can_generate_monitor_events");
+    log_trace(jvmti)("can_generate_monitor_events");
   if (cap->can_generate_vm_object_alloc_events)
-    tty->print_cr("can_generate_vm_object_alloc_events");
+    log_trace(jvmti)("can_generate_vm_object_alloc_events");
   if (cap->can_generate_native_method_bind_events)
-    tty->print_cr("can_generate_native_method_bind_events");
+    log_trace(jvmti)("can_generate_native_method_bind_events");
   if (cap->can_generate_garbage_collection_events)
-    tty->print_cr("can_generate_garbage_collection_events");
+    log_trace(jvmti)("can_generate_garbage_collection_events");
   if (cap->can_generate_object_free_events)
-    tty->print_cr("can_generate_object_free_events");
+    log_trace(jvmti)("can_generate_object_free_events");
   if (cap->can_generate_resource_exhaustion_heap_events)
-    tty->print_cr("can_generate_resource_exhaustion_heap_events");
+    log_trace(jvmti)("can_generate_resource_exhaustion_heap_events");
   if (cap->can_generate_resource_exhaustion_threads_events)
-    tty->print_cr("can_generate_resource_exhaustion_threads_events");
+    log_trace(jvmti)("can_generate_resource_exhaustion_threads_events");
   if (cap->can_generate_early_vmstart)
-    tty->print_cr("can_generate_early_vmstart");
+    log_trace(jvmti)("can_generate_early_vmstart");
 }
 
 #endif
--- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1449,12 +1449,12 @@
 
   ResourceMark rm(THREAD);
   _index_map_count = 0;
-  _index_map_p = new intArray(scratch_cp->length(), -1);
+  _index_map_p = new intArray(scratch_cp->length(), scratch_cp->length(), -1);
 
   _operands_cur_length = ConstantPool::operand_array_length(old_cp->operands());
   _operands_index_map_count = 0;
-  _operands_index_map_p = new intArray(
-    ConstantPool::operand_array_length(scratch_cp->operands()), -1);
+  int operands_index_map_len = ConstantPool::operand_array_length(scratch_cp->operands());
+  _operands_index_map_p = new intArray(operands_index_map_len, operands_index_map_len, -1);
 
   // reference to the cp holder is needed for copy_operands()
   merge_cp->set_pool_holder(scratch_class());
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -146,11 +146,7 @@
     _size_index = size_index;
     _size = initial_size;
     _entry_count = 0;
-    if (TraceJVMTIObjectTagging) {
-      _trace_threshold = initial_trace_threshold;
-    } else {
-      _trace_threshold = -1;
-    }
+    _trace_threshold = initial_trace_threshold;
     _load_factor = load_factor;
     _resize_threshold = (int)(_load_factor * _size);
     _resizing_enabled = true;
@@ -329,8 +325,7 @@
     }
 
     _entry_count++;
-    if (trace_threshold() > 0 && entry_count() >= trace_threshold()) {
-      assert(TraceJVMTIObjectTagging, "should only get here when tracing");
+    if (log_is_enabled(Debug, jvmti, objecttagging) && entry_count() >= trace_threshold()) {
       print_memory_usage();
       compute_next_trace_threshold();
     }
@@ -409,6 +404,7 @@
 
 // compute threshold for the next trace message
 void JvmtiTagHashmap::compute_next_trace_threshold() {
+  _trace_threshold = entry_count();
   if (trace_threshold() < medium_trace_threshold) {
     _trace_threshold += small_trace_threshold;
   } else {
@@ -3413,12 +3409,6 @@
     delayed_add = next;
   }
 
-  // stats
-  if (TraceJVMTIObjectTagging) {
-    int post_total = hashmap->_entry_count;
-    int pre_total = post_total + freed;
-
-    tty->print_cr("(%d->%d, %d freed, %d total moves)",
-        pre_total, post_total, freed, moved);
-  }
+  log_debug(jvmti, objecttagging)("(%d->%d, %d freed, %d total moves)",
+                                  hashmap->_entry_count + freed, hashmap->_entry_count, freed, moved);
 }
--- a/hotspot/src/share/vm/prims/jvmtiThreadState.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiThreadState.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -224,18 +224,11 @@
   RegisterMap reg_map(get_thread());
   javaVFrame *jvf = get_thread()->last_java_vframe(&reg_map);
   int n = 0;
-  // tty->print_cr("CSD: counting frames on %s ...",
-  //               JvmtiTrace::safe_get_thread_name(get_thread()));
   while (jvf != NULL) {
     Method* method = jvf->method();
-    // tty->print_cr("CSD: frame - method %s.%s - loc %d",
-    //               method->klass_name()->as_C_string(),
-    //               method->name()->as_C_string(),
-    //               jvf->bci() );
     jvf = jvf->java_sender();
     n++;
   }
-  // tty->print_cr("CSD: frame count: %d", n);
   return n;
 }
 
--- a/hotspot/src/share/vm/prims/jvmtiTrace.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiTrace.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -24,6 +24,8 @@
 
 #include "precompiled.hpp"
 #include "jvmtifiles/jvmtiEnv.hpp"
+#include "logging/log.hpp"
+#include "logging/logConfiguration.hpp"
 #include "memory/resourceArea.hpp"
 #include "prims/jvmtiTrace.hpp"
 
@@ -80,6 +82,17 @@
   } else {
     curr = "";  // hack in fixed tracing here
   }
+
+  // Enable UL for JVMTI tracing
+  if (strlen(curr) > 0) {
+    if (!log_is_enabled(Trace, jvmti)) {
+      log_warning(arguments)("-XX:+TraceJVMTI specified, "
+         "but no log output configured for the 'jvmti' tag on Trace level. "
+         "Defaulting to -Xlog:jvmti=trace");
+      LogConfiguration::configure_stdout(LogLevel::Trace, true, LOG_TAGS(jvmti));
+    }
+  }
+
   very_end = curr + strlen(curr);
   while (curr < very_end) {
     const char *curr_end = strchr(curr, ',');
@@ -127,7 +140,7 @@
         bits |= SHOW_EVENT_SENT;
         break;
       default:
-        tty->print_cr("Invalid trace flag '%c'", *flags);
+        log_warning(jvmti)("Invalid trace flag '%c'", *flags);
         break;
       }
     }
@@ -152,7 +165,7 @@
       domain = ALL_EVENT | EVENT;
     } else if (len==2 && strncmp(curr, "ec", 2)==0) {
       _trace_event_controller = true;
-      tty->print_cr("JVMTI Tracing the event controller");
+      log_trace(jvmti)("Tracing the event controller");
     } else {
       domain = FUNC | EVENT;  // go searching
     }
@@ -161,9 +174,9 @@
     if (domain & FUNC) {
       if (domain & ALL_FUNC) {
         if (domain & EXCLUDE) {
-          tty->print("JVMTI Tracing all significant functions");
+          log_trace(jvmti)("Tracing all significant functions");
         } else {
-          tty->print_cr("JVMTI Tracing all functions");
+          log_trace(jvmti)("Tracing all functions");
         }
       }
       for (int i = 0; i <= _max_function_index; ++i) {
@@ -178,7 +191,7 @@
             if (fname != NULL) {
               size_t fnlen = strlen(fname);
               if (len==fnlen && strncmp(curr, fname, fnlen)==0) {
-                tty->print_cr("JVMTI Tracing the function: %s", fname);
+                log_trace(jvmti)("Tracing the function: %s", fname);
                 do_op = true;
               }
             }
@@ -196,7 +209,7 @@
     }
     if (domain & EVENT) {
       if (domain & ALL_EVENT) {
-        tty->print_cr("JVMTI Tracing all events");
+        log_trace(jvmti)("Tracing all events");
       }
       for (int i = 0; i <= _max_event_index; ++i) {
         bool do_op = false;
@@ -207,7 +220,7 @@
           if (ename != NULL) {
             size_t evtlen = strlen(ename);
             if (len==evtlen && strncmp(curr, ename, evtlen)==0) {
-              tty->print_cr("JVMTI Tracing the event: %s", ename);
+              log_trace(jvmti)("Tracing the event: %s", ename);
               do_op = true;
             }
           }
@@ -223,7 +236,7 @@
       }
     }
     if (!_on && (domain & (FUNC|EVENT))) {
-      tty->print_cr("JVMTI Trace domain not found");
+      log_warning(jvmti)("Trace domain not found");
     }
     curr = curr_end + 1;
   }
--- a/hotspot/src/share/vm/prims/unsafe.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/unsafe.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -943,7 +943,7 @@
   // this point.   The mirror and any instances of this class have to keep
   // it alive afterwards.
   if (anon_klass() != NULL) {
-    anon_klass->class_loader_data()->set_keep_alive(false);
+    anon_klass->class_loader_data()->dec_keep_alive();
   }
 
   // let caller initialize it as needed...
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -38,6 +38,7 @@
 #include "memory/iterator.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
+#include "memory/oopFactory.hpp"
 #include "oops/constantPool.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/wbtestmethods/parserTests.hpp"
@@ -374,6 +375,68 @@
   Handle h = MemoryService::create_MemoryUsage_obj(usage, CHECK_NULL);
   return JNIHandles::make_local(env, h());
 WB_END
+
+class OldRegionsLivenessClosure: public HeapRegionClosure {
+
+ private:
+  const int _liveness;
+  size_t _total_count;
+  size_t _total_memory;
+  size_t _total_memory_to_free;
+
+ public:
+  OldRegionsLivenessClosure(int liveness) :
+    _liveness(liveness),
+    _total_count(0),
+    _total_memory(0),
+    _total_memory_to_free(0) { }
+
+    size_t total_count() { return _total_count; }
+    size_t total_memory() { return _total_memory; }
+    size_t total_memory_to_free() { return _total_memory_to_free; }
+
+  bool doHeapRegion(HeapRegion* r) {
+    if (r->is_old()) {
+      size_t prev_live = r->marked_bytes();
+      size_t live = r->live_bytes();
+      size_t size = r->used();
+      size_t reg_size = HeapRegion::GrainBytes;
+      if (size > 0 && ((int)(live * 100 / size) < _liveness)) {
+        _total_memory += size;
+        ++_total_count;
+        if (size == reg_size) {
+        // we don't include non-full regions since they are unlikely included in mixed gc
+        // for testing purposes it's enough to have lowest estimation of total memory that is expected to be freed
+          _total_memory_to_free += size - prev_live;
+        }
+      }
+    }
+    return false;
+  }
+};
+
+
+WB_ENTRY(jlongArray, WB_G1GetMixedGCInfo(JNIEnv* env, jobject o, jint liveness))
+  if (!UseG1GC) {
+    THROW_MSG_NULL(vmSymbols::java_lang_RuntimeException(), "WB_G1GetMixedGCInfo: G1 is not enabled");
+  }
+  if (liveness < 0) {
+    THROW_MSG_NULL(vmSymbols::java_lang_IllegalArgumentException(), "liveness value should be non-negative");
+  }
+
+  G1CollectedHeap* g1h = G1CollectedHeap::heap();
+  OldRegionsLivenessClosure rli(liveness);
+  g1h->heap_region_iterate(&rli);
+
+  typeArrayOop result = oopFactory::new_longArray(3, CHECK_NULL);
+  result->long_at_put(0, rli.total_count());
+  result->long_at_put(1, rli.total_memory());
+  result->long_at_put(2, rli.total_memory_to_free());
+  return (jlongArray) JNIHandles::make_local(env, result);
+WB_END
+
+
+
 #endif // INCLUDE_ALL_GCS
 
 #if INCLUDE_NMT
@@ -639,17 +702,27 @@
   return result;
 WB_END
 
-WB_ENTRY(jboolean, WB_EnqueueMethodForCompilation(JNIEnv* env, jobject o, jobject method, jint comp_level, jint bci))
-  // Screen for unavailable/bad comp level
-  if (CompileBroker::compiler(comp_level) == NULL) {
+bool WhiteBox::compile_method(Method* method, int comp_level, int bci, Thread* THREAD) {
+  // Screen for unavailable/bad comp level or null method
+  if (method == NULL || comp_level > TieredStopAtLevel ||
+      CompileBroker::compiler(comp_level) == NULL) {
     return false;
   }
-  jmethodID jmid = reflected_method_to_jmid(thread, env, method);
-  CHECK_JNI_EXCEPTION_(env, JNI_FALSE);
-  methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
+  methodHandle mh(THREAD, method);
   nmethod* nm = CompileBroker::compile_method(mh, bci, comp_level, mh, mh->invocation_count(), "WhiteBox", THREAD);
   MutexLockerEx mu(Compile_lock);
   return (mh->queued_for_compilation() || nm != NULL);
+}
+
+WB_ENTRY(jboolean, WB_EnqueueMethodForCompilation(JNIEnv* env, jobject o, jobject method, jint comp_level, jint bci))
+  jmethodID jmid = reflected_method_to_jmid(thread, env, method);
+  CHECK_JNI_EXCEPTION_(env, JNI_FALSE);
+  return WhiteBox::compile_method(Method::checked_resolve_jmethod_id(jmid), comp_level, bci, THREAD);
+WB_END
+
+WB_ENTRY(jboolean, WB_EnqueueInitializerForCompilation(JNIEnv* env, jobject o, jclass klass, jint comp_level))
+  instanceKlassHandle ikh(java_lang_Class::as_Klass(JNIHandles::resolve(klass)));
+  return WhiteBox::compile_method(ikh->class_initializer(), comp_level, InvocationEntryBci, THREAD);
 WB_END
 
 WB_ENTRY(jboolean, WB_ShouldPrintAssembly(JNIEnv* env, jobject o, jobject method, jint comp_level))
@@ -1601,6 +1674,7 @@
                                                       (void*)&WB_G1AuxiliaryMemoryUsage  },
   {CC"psVirtualSpaceAlignment",CC"()J",               (void*)&WB_PSVirtualSpaceAlignment},
   {CC"psHeapGenerationAlignment",CC"()J",             (void*)&WB_PSHeapGenerationAlignment},
+  {CC"g1GetMixedGCInfo",   CC"(I)[J",                 (void*)&WB_G1GetMixedGCInfo },
 #endif // INCLUDE_ALL_GCS
 #if INCLUDE_NMT
   {CC"NMTMalloc",           CC"(J)J",                 (void*)&WB_NMTMalloc          },
@@ -1640,6 +1714,8 @@
       CC"(Ljava/lang/reflect/Executable;Z)Z",         (void*)&WB_TestSetForceInlineMethod},
   {CC"enqueueMethodForCompilation0",
       CC"(Ljava/lang/reflect/Executable;II)Z",        (void*)&WB_EnqueueMethodForCompilation},
+  {CC"enqueueInitializerForCompilation0",
+      CC"(Ljava/lang/Class;I)Z",                      (void*)&WB_EnqueueInitializerForCompilation},
   {CC"clearMethodState0",
       CC"(Ljava/lang/reflect/Executable;)V",          (void*)&WB_ClearMethodState},
   {CC"lockCompilation",    CC"()V",                   (void*)&WB_LockCompilation},
--- a/hotspot/src/share/vm/prims/whitebox.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/prims/whitebox.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -77,6 +77,7 @@
   static void register_methods(JNIEnv* env, jclass wbclass, JavaThread* thread,
     JNINativeMethod* method_array, int method_count);
   static void register_extended(JNIEnv* env, jclass wbclass, JavaThread* thread);
+  static bool compile_method(Method* method, int comp_level, int bci, Thread* THREAD);
 };
 
 
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -420,6 +420,7 @@
   { "TraceLoaderConstraints",    LogLevel::Info,  true,  LOG_TAGS(classload, constraints) },
   { "TraceMonitorInflation",     LogLevel::Debug, true,  LOG_TAGS(monitorinflation) },
   { "TraceSafepointCleanupTime", LogLevel::Info,  true,  LOG_TAGS(safepointcleanup) },
+  { "TraceJVMTIObjectTagging",   LogLevel::Debug, true,  LOG_TAGS(jvmti, objecttagging) },
   { NULL,                        LogLevel::Off,   false, LOG_TAGS(_NO_TAG) }
 };
 
@@ -998,7 +999,7 @@
   int max_tags = sizeof(tagSet)/sizeof(tagSet[0]);
   for (int i = 0; i < max_tags && tagSet[i] != LogTag::__NO_TAG; i++) {
     if (i > 0) {
-      strncat(tagset_buffer, ",", max_tagset_len - strlen(tagset_buffer));
+      strncat(tagset_buffer, "+", max_tagset_len - strlen(tagset_buffer));
     }
     strncat(tagset_buffer, LogTag::name(tagSet[i]), max_tagset_len - strlen(tagset_buffer));
   }
@@ -2115,6 +2116,28 @@
     FLAG_SET_DEFAULT(GCTimeRatio, 12);
   }
 
+  // Below, we might need to calculate the pause time interval based on
+  // the pause target. When we do so we are going to give G1 maximum
+  // flexibility and allow it to do pauses when it needs to. So, we'll
+  // arrange that the pause interval to be pause time target + 1 to
+  // ensure that a) the pause time target is maximized with respect to
+  // the pause interval and b) we maintain the invariant that pause
+  // time target < pause interval. If the user does not want this
+  // maximum flexibility, they will have to set the pause interval
+  // explicitly.
+
+  if (FLAG_IS_DEFAULT(MaxGCPauseMillis)) {
+    // The default pause time target in G1 is 200ms
+    FLAG_SET_DEFAULT(MaxGCPauseMillis, 200);
+  }
+
+  // Then, if the interval parameter was not set, set it according to
+  // the pause time target (this will also deal with the case when the
+  // pause time target is the default value).
+  if (FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
+    FLAG_SET_DEFAULT(GCPauseIntervalMillis, MaxGCPauseMillis + 1);
+  }
+
   log_trace(gc)("MarkStackSize: %uk  MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
   log_trace(gc)("ConcGCThreads: %u", ConcGCThreads);
 }
@@ -2619,6 +2642,12 @@
     }
     FLAG_SET_CMDLINE(bool, BackgroundCompilation, false);
   }
+  if (UseCompiler && is_interpreter_only()) {
+    if (!FLAG_IS_DEFAULT(UseCompiler)) {
+      warning("UseCompiler disabled due to -Xint.");
+    }
+    FLAG_SET_CMDLINE(bool, UseCompiler, false);
+  }
   return status;
 }
 
@@ -4512,6 +4541,11 @@
     warning("Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used");
   }
 
+  if (UseOnStackReplacement && !UseLoopCounter) {
+    warning("On-stack-replacement requires loop counters; enabling loop counters");
+    FLAG_SET_DEFAULT(UseLoopCounter, true);
+  }
+
 #ifndef PRODUCT
   if (!LogVMOutput && FLAG_IS_DEFAULT(LogVMOutput)) {
     if (use_vm_log()) {
--- a/hotspot/src/share/vm/runtime/commandLineFlagConstraintsGC.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/commandLineFlagConstraintsGC.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -599,6 +599,14 @@
                                 value);
         return Flag::VIOLATES_CONSTRAINT;
       }
+
+      if (FLAG_IS_DEFAULT(MaxGCPauseMillis)) {
+        CommandLineError::print(verbose,
+                                "GCPauseIntervalMillis cannot be set "
+                                "without setting MaxGCPauseMillis\n");
+        return Flag::VIOLATES_CONSTRAINT;
+      }
+
       if (value <= MaxGCPauseMillis) {
         CommandLineError::print(verbose,
                                 "GCPauseIntervalMillis (" UINTX_FORMAT ") must be "
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -762,7 +762,7 @@
         guarantee(false, "wrong number of expression stack elements during deopt");
       }
       VerifyOopClosure verify;
-      iframe->oops_interpreted_do(&verify, NULL, &rm, false);
+      iframe->oops_interpreted_do(&verify, &rm, false);
       callee_size_of_parameters = mh->size_of_parameters();
       callee_max_locals = mh->max_locals();
       is_top_frame = false;
--- a/hotspot/src/share/vm/runtime/frame.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/frame.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -396,6 +396,11 @@
   *interpreter_frame_method_addr() = method;
 }
 
+void frame::interpreter_frame_set_mirror(oop mirror) {
+  assert(is_interpreted_frame(), "interpreted frame expected");
+  *interpreter_frame_mirror_addr() = mirror;
+}
+
 jint frame::interpreter_frame_bci() const {
   assert(is_interpreted_frame(), "interpreted frame expected");
   address bcp = interpreter_frame_bcp();
@@ -665,10 +670,12 @@
       nmethod* nm = (nmethod*)_cb;
       Method* m = nm->method();
       if (m != NULL) {
+        st->print("J %d%s", nm->compile_id(), (nm->is_osr_method() ? "%" : ""));
+        if (nm->compiler() != NULL) {
+          st->print(" %s", nm->compiler()->name());
+        }
         m->name_and_sig_as_C_string(buf, buflen);
-        st->print("J %d%s %s ",
-                  nm->compile_id(), (nm->is_osr_method() ? "%" : ""),
-                  ((nm->compiler() != NULL) ? nm->compiler()->name() : ""));
+        st->print(" %s", buf);
         ModuleEntry* module = m->method_holder()->module();
         if (module->is_named()) {
           module->name()->as_C_string(buf, buflen);
@@ -676,8 +683,8 @@
           module->version()->as_C_string(buf, buflen);
           st->print("@%s", buf);
         }
-        st->print("%s (%d bytes) @ " PTR_FORMAT " [" PTR_FORMAT "+" INTPTR_FORMAT "]",
-                  buf, m->code_size(), p2i(_pc), p2i(_cb->code_begin()), _pc - _cb->code_begin());
+        st->print(" (%d bytes) @ " PTR_FORMAT " [" PTR_FORMAT "+" INTPTR_FORMAT "]",
+                  m->code_size(), p2i(_pc), p2i(_cb->code_begin()), _pc - _cb->code_begin());
 #if INCLUDE_JVMCI
         char* jvmciName = nm->jvmci_installed_code_name(buf, buflen);
         if (jvmciName != NULL) {
@@ -850,8 +857,7 @@
 }
 
 
-void frame::oops_interpreted_do(OopClosure* f, CLDClosure* cld_f,
-    const RegisterMap* map, bool query_oop_map_cache) {
+void frame::oops_interpreted_do(OopClosure* f, const RegisterMap* map, bool query_oop_map_cache) {
   assert(is_interpreted_frame(), "Not an interpreted frame");
   assert(map != NULL, "map must be set");
   Thread *thread = Thread::current();
@@ -877,20 +883,15 @@
     current->oops_do(f);
   }
 
-  // process fixed part
-  if (cld_f != NULL) {
-    // The method pointer in the frame might be the only path to the method's
-    // klass, and the klass needs to be kept alive while executing. The GCs
-    // don't trace through method pointers, so typically in similar situations
-    // the mirror or the class loader of the klass are installed as a GC root.
-    // To minimize the overhead of doing that here, we ask the GC to pass down a
-    // closure that knows how to keep klasses alive given a ClassLoaderData.
-    cld_f->do_cld(m->method_holder()->class_loader_data());
+  if (m->is_native()) {
+    f->do_oop(interpreter_frame_temp_oop_addr());
   }
 
-  if (m->is_native() PPC32_ONLY(&& m->is_static())) {
-    f->do_oop(interpreter_frame_temp_oop_addr());
-  }
+  // The method pointer in the frame might be the only path to the method's
+  // klass, and the klass needs to be kept alive while executing. The GCs
+  // don't trace through method pointers, so the mirror of the method's klass
+  // is installed as a GC root.
+  f->do_oop(interpreter_frame_mirror_addr());
 
   int max_locals = m->is_native() ? m->size_of_parameters() : m->max_locals();
 
@@ -1091,7 +1092,7 @@
 }
 
 
-void frame::oops_do_internal(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache) {
+void frame::oops_do_internal(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache) {
 #ifndef PRODUCT
   // simulate GC crash here to dump java thread in error report
   if (CrashGCForDumpingJavaThread) {
@@ -1100,7 +1101,7 @@
   }
 #endif
   if (is_interpreted_frame()) {
-    oops_interpreted_do(f, cld_f, map, use_interpreter_oop_map_cache);
+    oops_interpreted_do(f, map, use_interpreter_oop_map_cache);
   } else if (is_entry_frame()) {
     oops_entry_do(f, map);
   } else if (CodeCache::contains(pc())) {
@@ -1145,7 +1146,7 @@
 #if defined(COMPILER2) || INCLUDE_JVMCI
   assert(DerivedPointerTable::is_empty(), "must be empty before verify");
 #endif
-  oops_do_internal(&VerifyOopClosure::verify_oop, NULL, NULL, (RegisterMap*)map, false);
+  oops_do_internal(&VerifyOopClosure::verify_oop, NULL, (RegisterMap*)map, false);
 }
 
 
--- a/hotspot/src/share/vm/runtime/frame.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/frame.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -320,6 +320,9 @@
   void interpreter_frame_set_method(Method* method);
   Method** interpreter_frame_method_addr() const;
   ConstantPoolCache** interpreter_frame_cache_addr() const;
+  oop* interpreter_frame_mirror_addr() const;
+
+  void interpreter_frame_set_mirror(oop mirror);
 
  public:
   // Entry frames
@@ -386,19 +389,19 @@
 
   // Oops-do's
   void oops_compiled_arguments_do(Symbol* signature, bool has_receiver, bool has_appendix, const RegisterMap* reg_map, OopClosure* f);
-  void oops_interpreted_do(OopClosure* f, CLDClosure* cld_f, const RegisterMap* map, bool query_oop_map_cache = true);
+  void oops_interpreted_do(OopClosure* f, const RegisterMap* map, bool query_oop_map_cache = true);
 
  private:
   void oops_interpreted_arguments_do(Symbol* signature, bool has_receiver, OopClosure* f);
 
   // Iteration of oops
-  void oops_do_internal(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache);
+  void oops_do_internal(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache);
   void oops_entry_do(OopClosure* f, const RegisterMap* map);
   void oops_code_blob_do(OopClosure* f, CodeBlobClosure* cf, const RegisterMap* map);
   int adjust_offset(Method* method, int index); // helper for above fn
  public:
   // Memory management
-  void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf, RegisterMap* map) { oops_do_internal(f, cld_f, cf, map, true); }
+  void oops_do(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map) { oops_do_internal(f, cf, map, true); }
   void nmethods_do(CodeBlobClosure* cf);
 
   // RedefineClasses support for finding live interpreted methods on the stack
--- a/hotspot/src/share/vm/runtime/globals.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -2221,11 +2221,11 @@
           "Adaptive size policy maximum GC pause time goal in millisecond, "\
           "or (G1 Only) the maximum GC time per MMU time slice")            \
           range(1, max_uintx - 1)                                           \
-          constraint(MaxGCPauseMillisConstraintFunc,AfterMemoryInit)        \
+          constraint(MaxGCPauseMillisConstraintFunc,AfterErgo)              \
                                                                             \
   product(uintx, GCPauseIntervalMillis, 0,                                  \
           "Time slice for MMU specification")                               \
-          constraint(GCPauseIntervalMillisConstraintFunc,AfterMemoryInit)   \
+          constraint(GCPauseIntervalMillisConstraintFunc,AfterErgo)         \
                                                                             \
   product(uintx, MaxGCMinorPauseMillis, max_uintx,                          \
           "Adaptive size policy maximum GC minor pause time goal "          \
--- a/hotspot/src/share/vm/runtime/os.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/os.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -520,7 +520,7 @@
   static int ftruncate(int fd, jlong length);
   static int fsync(int fd);
   static int available(int fd, jlong *bytes);
-  static int fileno(FILE* fp);
+  static int get_fileno(FILE* fp);
 
   static int compare_file_modified_times(const char* file1, const char* file2);
 
--- a/hotspot/src/share/vm/runtime/stubRoutines.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/stubRoutines.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -154,11 +154,14 @@
 
 address StubRoutines::_dexp = NULL;
 address StubRoutines::_dlog = NULL;
+address StubRoutines::_dlog10 = NULL;
 address StubRoutines::_dpow = NULL;
 address StubRoutines::_dsin = NULL;
 address StubRoutines::_dcos = NULL;
 address StubRoutines::_dlibm_sin_cos_huge = NULL;
 address StubRoutines::_dlibm_reduce_pi04l = NULL;
+address StubRoutines::_dlibm_tan_cot_huge = NULL;
+address StubRoutines::_dtan = NULL;
 
 double (* StubRoutines::_intrinsic_log10 )(double) = NULL;
 double (* StubRoutines::_intrinsic_sin   )(double) = NULL;
--- a/hotspot/src/share/vm/runtime/stubRoutines.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/stubRoutines.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -212,11 +212,14 @@
 
   static address _dexp;
   static address _dlog;
+  static address _dlog10;
   static address _dpow;
   static address _dsin;
   static address _dcos;
   static address _dlibm_sin_cos_huge;
   static address _dlibm_reduce_pi04l;
+  static address _dlibm_tan_cot_huge;
+  static address _dtan;
 
   // These are versions of the java.lang.Math methods which perform
   // the same operations as the intrinsic version.  They are used for
@@ -390,11 +393,14 @@
 
   static address dexp()                { return _dexp; }
   static address dlog()                { return _dlog; }
+  static address dlog10()                { return _dlog10; }
   static address dpow()                { return _dpow; }
   static address dsin()                { return _dsin; }
   static address dcos()                { return _dcos; }
   static address dlibm_reduce_pi04l()  { return _dlibm_reduce_pi04l; }
   static address dlibm_sin_cos_huge()  { return _dlibm_sin_cos_huge; }
+  static address dlibm_tan_cot_huge()  { return _dlibm_tan_cot_huge; }
+  static address dtan()                { return _dtan; }
 
   static address select_fill_function(BasicType t, bool aligned, const char* &name);
 
--- a/hotspot/src/share/vm/runtime/thread.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -785,7 +785,7 @@
   return false;
 }
 
-void Thread::oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) {
+void Thread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
   active_handles()->oops_do(f);
   // Do oop for ThreadShadow
   f->do_oop((oop*)&_pending_exception);
@@ -2758,7 +2758,7 @@
   }
 };
 
-void JavaThread::oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) {
+void JavaThread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
   // Verify that the deferred card marks have been flushed.
   assert(deferred_card_mark().is_empty(), "Should be empty during GC");
 
@@ -2766,7 +2766,7 @@
   // since there may be more than one thread using each ThreadProfiler.
 
   // Traverse the GCHandles
-  Thread::oops_do(f, cld_f, cf);
+  Thread::oops_do(f, cf);
 
   JVMCI_ONLY(f->do_oop((oop*)&_pending_failed_speculation);)
 
@@ -2796,7 +2796,7 @@
 
     // Traverse the execution stack
     for (StackFrameStream fst(this); !fst.is_done(); fst.next()) {
-      fst.current()->oops_do(f, cld_f, cf, fst.register_map());
+      fst.current()->oops_do(f, cf, fst.register_map());
     }
   }
 
@@ -2946,7 +2946,7 @@
 
 void JavaThread::verify() {
   // Verify oops in the thread.
-  oops_do(&VerifyOopClosure::verify_oop, NULL, NULL);
+  oops_do(&VerifyOopClosure::verify_oop, NULL);
 
   // Verify the stack frames.
   frames_do(frame_verify);
@@ -3186,7 +3186,7 @@
 static void oops_print(frame* f, const RegisterMap *map) {
   PrintAndVerifyOopClosure print;
   f->print_value();
-  f->oops_do(&print, NULL, NULL, (RegisterMap*)map);
+  f->oops_do(&print, NULL, (RegisterMap*)map);
 }
 
 // Print our all the locations that contain oops and whether they are
@@ -3303,8 +3303,8 @@
   _scanned_nmethod = NULL;
 }
 
-void CodeCacheSweeperThread::oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) {
-  JavaThread::oops_do(f, cld_f, cf);
+void CodeCacheSweeperThread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
+  JavaThread::oops_do(f, cf);
   if (_scanned_nmethod != NULL && cf != NULL) {
     // Safepoints can occur when the sweeper is scanning an nmethod so
     // process it here to make sure it isn't unloaded in the middle of
@@ -4291,11 +4291,11 @@
 // uses the Threads_lock to guarantee this property. It also makes sure that
 // all threads gets blocked when exiting or starting).
 
-void Threads::oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) {
+void Threads::oops_do(OopClosure* f, CodeBlobClosure* cf) {
   ALL_JAVA_THREADS(p) {
-    p->oops_do(f, cld_f, cf);
-  }
-  VMThread::vm_thread()->oops_do(f, cld_f, cf);
+    p->oops_do(f, cf);
+  }
+  VMThread::vm_thread()->oops_do(f, cf);
 }
 
 void Threads::change_thread_claim_parity() {
@@ -4318,16 +4318,16 @@
 }
 #endif // ASSERT
 
-void Threads::possibly_parallel_oops_do(bool is_par, OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) {
+void Threads::possibly_parallel_oops_do(bool is_par, OopClosure* f, CodeBlobClosure* cf) {
   int cp = Threads::thread_claim_parity();
   ALL_JAVA_THREADS(p) {
     if (p->claim_oops_do(is_par, cp)) {
-      p->oops_do(f, cld_f, cf);
+      p->oops_do(f, cf);
     }
   }
   VMThread* vmt = VMThread::vm_thread();
   if (vmt->claim_oops_do(is_par, cp)) {
-    vmt->oops_do(f, cld_f, cf);
+    vmt->oops_do(f, cf);
   }
 }
 
--- a/hotspot/src/share/vm/runtime/thread.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/thread.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -482,10 +482,9 @@
 
   // GC support
   // Apply "f->do_oop" to all root oops in "this".
-  // Apply "cld_f->do_cld" to CLDs that are otherwise not kept alive.
   //   Used by JavaThread::oops_do.
   // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames
-  virtual void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
+  virtual void oops_do(OopClosure* f, CodeBlobClosure* cf);
 
   // Handles the parallel case for the method below.
  private:
@@ -1642,7 +1641,7 @@
   void frames_do(void f(frame*, const RegisterMap*));
 
   // Memory operations
-  void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
+  void oops_do(OopClosure* f, CodeBlobClosure* cf);
 
   // Sweeper operations
   virtual void nmethods_do(CodeBlobClosure* cf);
@@ -1995,7 +1994,7 @@
   bool is_Code_cache_sweeper_thread() const { return true; }
 
   // Prevent GC from unloading _scanned_nmethod
-  void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
+  void oops_do(OopClosure* f, CodeBlobClosure* cf);
   void nmethods_do(CodeBlobClosure* cf);
 };
 
@@ -2122,9 +2121,9 @@
 
   // Apply "f->do_oop" to all root oops in all threads.
   // This version may only be called by sequential code.
-  static void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
+  static void oops_do(OopClosure* f, CodeBlobClosure* cf);
   // This version may be called by sequential or parallel code.
-  static void possibly_parallel_oops_do(bool is_par, OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
+  static void possibly_parallel_oops_do(bool is_par, OopClosure* f, CodeBlobClosure* cf);
   // This creates a list of GCTasks, one per thread.
   static void create_thread_roots_tasks(GCTaskQueue* q);
   // This creates a list of GCTasks, one per thread, for marking objects.
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -337,7 +337,7 @@
   volatile_nonstatic_field(InstanceKlass,      _oop_map_cache,                                OopMapCache*)                          \
   nonstatic_field(InstanceKlass,               _jni_ids,                                      JNIid*)                                \
   nonstatic_field(InstanceKlass,               _osr_nmethods_head,                            nmethod*)                              \
-  nonstatic_field(InstanceKlass,               _breakpoints,                                  BreakpointInfo*)                       \
+  JVMTI_ONLY(nonstatic_field(InstanceKlass,    _breakpoints,                                  BreakpointInfo*))                      \
   nonstatic_field(InstanceKlass,               _generic_signature_index,                      u2)                                    \
   nonstatic_field(InstanceKlass,               _methods_jmethod_ids,                          jmethodID*)                            \
   volatile_nonstatic_field(InstanceKlass,      _idnum_allocated_count,                        u2)                                    \
@@ -387,7 +387,7 @@
   nonstatic_field(MethodCounters,              _backedge_mask,                                int)                                   \
   COMPILER2_OR_JVMCI_PRESENT(nonstatic_field(MethodCounters, _interpreter_invocation_count,   int))                                  \
   COMPILER2_OR_JVMCI_PRESENT(nonstatic_field(MethodCounters, _interpreter_throwout_count,     u2))                                   \
-  nonstatic_field(MethodCounters,              _number_of_breakpoints,                        u2)                                    \
+  JVMTI_ONLY(nonstatic_field(MethodCounters,   _number_of_breakpoints,                        u2))                                   \
   nonstatic_field(MethodCounters,              _invocation_counter,                           InvocationCounter)                     \
   nonstatic_field(MethodCounters,              _backedge_counter,                             InvocationCounter)                     \
   nonstatic_field(Method,                      _constMethod,                                  ConstMethod*)                          \
@@ -447,11 +447,11 @@
   nonstatic_field(ExceptionTableElement,       end_pc,                                        u2)                                    \
   nonstatic_field(ExceptionTableElement,       handler_pc,                                    u2)                                    \
   nonstatic_field(ExceptionTableElement,       catch_type_index,                              u2)                                    \
-  nonstatic_field(BreakpointInfo,              _orig_bytecode,                                Bytecodes::Code)                       \
-  nonstatic_field(BreakpointInfo,              _bci,                                          int)                                   \
-  nonstatic_field(BreakpointInfo,              _name_index,                                   u2)                                    \
-  nonstatic_field(BreakpointInfo,              _signature_index,                              u2)                                    \
-  nonstatic_field(BreakpointInfo,              _next,                                         BreakpointInfo*)                       \
+  JVMTI_ONLY(nonstatic_field(BreakpointInfo,   _orig_bytecode,                                Bytecodes::Code))                      \
+  JVMTI_ONLY(nonstatic_field(BreakpointInfo,   _bci,                                          int))                                  \
+  JVMTI_ONLY(nonstatic_field(BreakpointInfo,   _name_index,                                   u2))                                   \
+  JVMTI_ONLY(nonstatic_field(BreakpointInfo,   _signature_index,                              u2))                                   \
+  JVMTI_ONLY(nonstatic_field(BreakpointInfo,   _next,                                         BreakpointInfo*))                      \
   /***********/                                                                                                                      \
   /* JNI IDs */                                                                                                                      \
   /***********/                                                                                                                      \
@@ -662,11 +662,11 @@
   /* CompactHashTable */                                                                                                             \
   /********************/                                                                                                             \
                                                                                                                                      \
-  nonstatic_field(SymbolCompactHashTable,      _base_address,                                 uintx)                                 \
-  nonstatic_field(SymbolCompactHashTable,      _entry_count,                                  juint)                                 \
-  nonstatic_field(SymbolCompactHashTable,      _bucket_count,                                 juint)                                 \
-  nonstatic_field(SymbolCompactHashTable,      _table_end_offset,                             juint)                                 \
-  nonstatic_field(SymbolCompactHashTable,      _buckets,                                      juint*)                                \
+  nonstatic_field(SymbolCompactHashTable,      _base_address,                                 address)                               \
+  nonstatic_field(SymbolCompactHashTable,      _entry_count,                                  u4)                                    \
+  nonstatic_field(SymbolCompactHashTable,      _bucket_count,                                 u4)                                    \
+  nonstatic_field(SymbolCompactHashTable,      _buckets,                                      u4*)                                   \
+  nonstatic_field(SymbolCompactHashTable,      _entries,                                      u4*)                                   \
                                                                                                                                      \
   /********************/                                                                                                             \
   /* SystemDictionary */                                                                                                             \
@@ -859,9 +859,11 @@
      static_field(StubRoutines,                _mulAdd,                                       address)                               \
      static_field(StubRoutines,                _dexp,                                         address)                               \
      static_field(StubRoutines,                _dlog,                                         address)                               \
+     static_field(StubRoutines,                _dlog10,                                       address)                               \
      static_field(StubRoutines,                _dpow,                                         address)                               \
      static_field(StubRoutines,                _dsin,                                         address)                               \
      static_field(StubRoutines,                _dcos,                                         address)                               \
+     static_field(StubRoutines,                _dtan,                                         address)                               \
      static_field(StubRoutines,                _vectorizedMismatch,                           address)                               \
      static_field(StubRoutines,                _jbyte_arraycopy,                              address)                               \
      static_field(StubRoutines,                _jshort_arraycopy,                             address)                               \
@@ -959,7 +961,7 @@
   nonstatic_field(nmethod,                     _stack_traversal_mark,                         long)                                  \
   nonstatic_field(nmethod,                     _compile_id,                                   int)                                   \
   nonstatic_field(nmethod,                     _comp_level,                                   int)                                   \
-  nonstatic_field(nmethod,                     _exception_cache,                              ExceptionCache*)                       \
+  volatile_nonstatic_field(nmethod,            _exception_cache,                              ExceptionCache*)                       \
                                                                                                                                      \
   unchecked_c2_static_field(Deoptimization,    _trap_reason_name,                             void*)                                 \
                                                                                                                                      \
@@ -1920,6 +1922,7 @@
   declare_c2_type(ConvL2INode, Node)                                      \
   declare_c2_type(CastX2PNode, Node)                                      \
   declare_c2_type(CastP2XNode, Node)                                      \
+  declare_c2_type(SetVectMaskINode, Node)                                 \
   declare_c2_type(MemBarNode, MultiNode)                                  \
   declare_c2_type(MemBarAcquireNode, MemBarNode)                          \
   declare_c2_type(MemBarReleaseNode, MemBarNode)                          \
@@ -1927,6 +1930,7 @@
   declare_c2_type(StoreFenceNode, MemBarNode)                             \
   declare_c2_type(MemBarVolatileNode, MemBarNode)                         \
   declare_c2_type(MemBarCPUOrderNode, MemBarNode)                         \
+  declare_c2_type(OnSpinWaitNode, MemBarNode)                             \
   declare_c2_type(InitializeNode, MemBarNode)                             \
   declare_c2_type(ThreadLocalNode, Node)                                  \
   declare_c2_type(Opaque1Node, Node)                                      \
@@ -2066,10 +2070,8 @@
   declare_c2_type(NegNode, Node)                                          \
   declare_c2_type(NegFNode, NegNode)                                      \
   declare_c2_type(NegDNode, NegNode)                                      \
-  declare_c2_type(TanDNode, Node)                                         \
   declare_c2_type(AtanDNode, Node)                                        \
   declare_c2_type(SqrtDNode, Node)                                        \
-  declare_c2_type(Log10DNode, Node)                                       \
   declare_c2_type(ReverseBytesINode, Node)                                \
   declare_c2_type(ReverseBytesLNode, Node)                                \
   declare_c2_type(ReductionNode, Node)                                    \
--- a/hotspot/src/share/vm/runtime/vmThread.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/vmThread.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -655,8 +655,8 @@
 }
 
 
-void VMThread::oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) {
-  Thread::oops_do(f, cld_f, cf);
+void VMThread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
+  Thread::oops_do(f, cf);
   _vm_queue->oops_do(f);
 }
 
@@ -688,5 +688,5 @@
 #endif
 
 void VMThread::verify() {
-  oops_do(&VerifyOopClosure::verify_oop, NULL, NULL);
+  oops_do(&VerifyOopClosure::verify_oop, NULL);
 }
--- a/hotspot/src/share/vm/runtime/vmThread.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/vmThread.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, 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
@@ -126,7 +126,7 @@
   static VMThread* vm_thread()                    { return _vm_thread; }
 
   // GC support
-  void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
+  void oops_do(OopClosure* f, CodeBlobClosure* cf);
 
   void verify();
 
--- a/hotspot/src/share/vm/runtime/vm_version.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/runtime/vm_version.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -162,6 +162,9 @@
   // Calculates and returns the number of parallel threads.  May
   // be VM version specific.
   static unsigned int calc_parallel_worker_threads();
+
+  // Does this CPU support spin wait instruction?
+  static bool supports_on_spin_wait() { return false; }
 };
 
 #ifdef TARGET_ARCH_x86
--- a/hotspot/src/share/vm/services/g1MemoryPool.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/services/g1MemoryPool.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -24,8 +24,6 @@
 
 #include "precompiled.hpp"
 #include "gc/g1/g1CollectedHeap.hpp"
-#include "gc/g1/g1CollectedHeap.inline.hpp"
-#include "gc/g1/g1CollectorPolicy.hpp"
 #include "gc/g1/heapRegion.hpp"
 #include "services/g1MemoryPool.hpp"
 
--- a/hotspot/src/share/vm/utilities/array.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * 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
- * 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.
- *
- */
-
-#include "precompiled.hpp"
-#include "memory/resourceArea.hpp"
-#include "runtime/thread.inline.hpp"
-#include "utilities/array.hpp"
-
-
-#ifdef ASSERT
-void ResourceArray::init_nesting() {
-  _nesting = Thread::current()->resource_area()->nesting();
-}
-#endif
-
-
-void ResourceArray::sort(size_t esize, ftype f) {
-  if (!is_empty()) qsort(_data, length(), esize, f);
-}
-template <MEMFLAGS F> void CHeapArray<F>::sort(size_t esize, ftype f) {
-  if (!is_empty()) qsort(_data, length(), esize, f);
-}
-
-
-void ResourceArray::expand(size_t esize, int i, int& size) {
-  // make sure we are expanding within the original resource mark
-  assert(
-    _nesting == Thread::current()->resource_area()->nesting(),
-    "allocating outside original resource mark"
-  );
-  // determine new size
-  if (size == 0) size = 4; // prevent endless loop
-  while (i >= size) size *= 2;
-  // allocate and initialize new data section
-  void* data = resource_allocate_bytes(esize * size);
-  memcpy(data, _data, esize * length());
-  _data = data;
-}
-
-
-template <MEMFLAGS F> void CHeapArray<F>::expand(size_t esize, int i, int& size) {
-  // determine new size
-  if (size == 0) size = 4; // prevent endless loop
-  while (i >= size) size *= 2;
-  // allocate and initialize new data section
-  void* data = NEW_C_HEAP_ARRAY(char*, esize * size, F);
-  memcpy(data, _data, esize * length());
-  FREE_C_HEAP_ARRAY(char*, _data);
-  _data = data;
-}
-
-
-void ResourceArray::remove_at(size_t esize, int i) {
-  assert(0 <= i && i < length(), "index out of bounds");
-  _length--;
-  void* dst = (char*)_data + i*esize;
-  void* src = (char*)dst + esize;
-  size_t cnt = (length() - i)*esize;
-  memmove(dst, src, cnt);
-}
-
-template <MEMFLAGS F> void CHeapArray<F>::remove_at(size_t esize, int i) {
-  assert(0 <= i && i < length(), "index out of bounds");
-  _length--;
-  void* dst = (char*)_data + i*esize;
-  void* src = (char*)dst + esize;
-  size_t cnt = (length() - i)*esize;
-  memmove(dst, src, cnt);
-}
--- a/hotspot/src/share/vm/utilities/array.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/utilities/array.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, 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,273 +30,11 @@
 #include "memory/metaspace.hpp"
 #include "runtime/orderAccess.hpp"
 
-// correct linkage required to compile w/o warnings
-// (must be on file level - cannot be local)
-extern "C" { typedef int (*ftype)(const void*, const void*); }
-
-
-class ResourceArray: public ResourceObj {
- protected:
-  int   _length;                                 // the number of array elements
-  void* _data;                                   // the array memory
-#ifdef ASSERT
-  int   _nesting;                                // the resource area nesting level
-#endif
-
-  // creation
-  ResourceArray() {
-    _length  = 0;
-    _data    = NULL;
-    DEBUG_ONLY(init_nesting();)
-    // client may call initialize, at most once
-  }
-
-
-  ResourceArray(size_t esize, int length) {
-    DEBUG_ONLY(_data = NULL);
-    initialize(esize, length);
-  }
-
-  void initialize(size_t esize, int length) {
-    assert(length >= 0, "illegal length");
-    assert(StressRewriter || _data == NULL, "must be new object");
-    _length  = length;
-    _data    = resource_allocate_bytes(esize * length);
-    DEBUG_ONLY(init_nesting();)
-  }
-
-#ifdef ASSERT
-  void init_nesting();
-#endif
-
-  // helper functions
-  void sort     (size_t esize, ftype f);         // sort the array
-  void expand   (size_t esize, int i, int& size);// expand the array to include slot i
-  void remove_at(size_t esize, int i);           // remove the element in slot i
-
- public:
-  // standard operations
-  int  length() const                            { return _length; }
-  bool is_empty() const                          { return length() == 0; }
-};
-
-
-template <MEMFLAGS F>class CHeapArray: public CHeapObj<F> {
- protected:
-  int   _length;                                 // the number of array elements
-  void* _data;                                   // the array memory
-
-  // creation
-  CHeapArray() {
-    _length  = 0;
-    _data    = NULL;
-  }
-
-
-  CHeapArray(size_t esize, int length) {
-    assert(length >= 0, "illegal length");
-    _length  = length;
-    _data    = (void*) NEW_C_HEAP_ARRAY(char *, esize * length, F);
-  }
-
-  void initialize(size_t esize, int length) {
-    // In debug set array to 0?
-  }
-
-#ifdef ASSERT
-  void init_nesting();
-#endif
-
-  // helper functions
-  void sort     (size_t esize, ftype f);         // sort the array
-  void expand   (size_t esize, int i, int& size);// expand the array to include slot i
-  void remove_at(size_t esize, int i);           // remove the element in slot i
-
- public:
-  // standard operations
-  int  length() const                            { return _length; }
-  bool is_empty() const                          { return length() == 0; }
-};
-
-#define define_generic_array(array_name,element_type, base_class)                        \
-  class array_name: public base_class {                                                  \
-   protected:                                                                            \
-    typedef element_type etype;                                                          \
-    enum { esize = sizeof(etype) };                                                      \
-                                                                                         \
-    void base_remove_at(size_t size, int i) { base_class::remove_at(size, i); }          \
-                                                                                         \
-   public:                                                                               \
-    /* creation */                                                                       \
-    array_name() : base_class()                       {}                                 \
-    explicit array_name(const int length) : base_class(esize, length) {}                          \
-    array_name(const int length, const etype fx)      { initialize(length, fx); }        \
-    void initialize(const int length)     { base_class::initialize(esize, length); }     \
-    void initialize(const int length, const etype fx) {                                  \
-      initialize(length);                                                                \
-      for (int i = 0; i < length; i++) ((etype*)_data)[i] = fx;                          \
-    }                                                                                    \
-                                                                                         \
-    /* standard operations */                                                            \
-    etype& operator [] (const int i) const {                                             \
-      assert(0 <= i && i < length(), "index out of bounds");                             \
-      return ((etype*)_data)[i];                                                         \
-    }                                                                                    \
-                                                                                         \
-    int index_of(const etype x) const {                                                  \
-      int i = length();                                                                  \
-      while (i-- > 0 && ((etype*)_data)[i] != x) ;                                       \
-      /* i < 0 || ((etype*)_data)_data[i] == x */                                        \
-      return i;                                                                          \
-    }                                                                                    \
-                                                                                         \
-    void sort(int f(etype*, etype*))             { base_class::sort(esize, (ftype)f); }  \
-    bool contains(const etype x) const           { return index_of(x) >= 0; }            \
-                                                                                         \
-    /* deprecated operations - for compatibility with GrowableArray only */              \
-    etype  at(const int i) const                 { return (*this)[i]; }                  \
-    void   at_put(const int i, const etype x)    { (*this)[i] = x; }                     \
-    etype* adr_at(const int i)                   { return &(*this)[i]; }                 \
-    int    find(const etype x)                   { return index_of(x); }                 \
-  };                                                                                     \
-
-
-#define define_array(array_name,element_type)                                            \
-  define_generic_array(array_name, element_type, ResourceArray)
-
-
-#define define_stack(stack_name,array_name)                                              \
-  class stack_name: public array_name {                                                  \
-   protected:                                                                            \
-    int _size;                                                                           \
-                                                                                         \
-    void grow(const int i, const etype fx) {                                             \
-      assert(i >= length(), "index too small");                                          \
-      if (i >= size()) expand(esize, i, _size);                                          \
-      for (int j = length(); j <= i; j++) ((etype*)_data)[j] = fx;                       \
-      _length = i+1;                                                                     \
-    }                                                                                    \
-                                                                                         \
-   public:                                                                               \
-    /* creation */                                                                       \
-    stack_name() : array_name()                     { _size = 0; }                       \
-    stack_name(const int size)                      { initialize(size); }                \
-    stack_name(const int size, const etype fx)      { initialize(size, fx); }            \
-    void initialize(const int size, const etype fx) {                                    \
-      _size = size;                                                                      \
-      array_name::initialize(size, fx);                                                  \
-      /* _length == size, allocation and size are the same */                            \
-    }                                                                                    \
-    void initialize(const int size) {                                                    \
-      _size = size;                                                                      \
-      array_name::initialize(size);                                                      \
-      _length = 0;          /* reset length to zero; _size records the allocation */     \
-    }                                                                                    \
-                                                                                         \
-    /* standard operations */                                                            \
-    int size() const                             { return _size; }                       \
-                                                                                         \
-    int push(const etype x) {                                                            \
-      int len = length();                                                                \
-      if (len >= size()) expand(esize, len, _size);                                      \
-      ((etype*)_data)[len] = x;                                                          \
-      _length = len+1;                                                                   \
-      return len;                                                                        \
-    }                                                                                    \
-                                                                                         \
-    etype pop() {                                                                        \
-      assert(!is_empty(), "stack is empty");                                             \
-      return ((etype*)_data)[--_length];                                                 \
-    }                                                                                    \
-                                                                                         \
-    etype top() const {                                                                  \
-      assert(!is_empty(), "stack is empty");                                             \
-      return ((etype*)_data)[length() - 1];                                              \
-    }                                                                                    \
-                                                                                         \
-    void push_all(const stack_name* stack) {                                             \
-      const int l = stack->length();                                                     \
-      for (int i = 0; i < l; i++) push(((etype*)(stack->_data))[i]);                     \
-    }                                                                                    \
-                                                                                         \
-    etype at_grow(const int i, const etype fx) {                                         \
-      if (i >= length()) grow(i, fx);                                                    \
-      return ((etype*)_data)[i];                                                         \
-    }                                                                                    \
-                                                                                         \
-    void at_put_grow(const int i, const etype x, const etype fx) {                       \
-      if (i >= length()) grow(i, fx);                                                    \
-      ((etype*)_data)[i] = x;                                                            \
-    }                                                                                    \
-                                                                                         \
-    void truncate(const int length) {                                                    \
-      assert(0 <= length && length <= this->length(), "illegal length");                 \
-      _length = length;                                                                  \
-    }                                                                                    \
-                                                                                         \
-    void remove_at(int i)                        { base_remove_at(esize, i); }           \
-    void remove(etype x)                         { remove_at(index_of(x)); }             \
-                                                                                         \
-    /* inserts the given element before the element at index i */                        \
-    void insert_before(const int i, const etype el)  {                                   \
-      int len = length();                                                                \
-      int new_length = len + 1;                                                          \
-      if (new_length >= size()) expand(esize, new_length, _size);                        \
-      for (int j = len - 1; j >= i; j--) {                                               \
-        ((etype*)_data)[j + 1] = ((etype*)_data)[j];                                     \
-      }                                                                                  \
-      _length = new_length;                                                              \
-      at_put(i, el);                                                                     \
-    }                                                                                    \
-                                                                                         \
-    /* inserts contents of the given stack before the element at index i */              \
-    void insert_before(const int i, const stack_name *st) {                              \
-      if (st->length() == 0) return;                                                     \
-      int len = length();                                                                \
-      int st_len = st->length();                                                         \
-      int new_length = len + st_len;                                                     \
-      if (new_length >= size()) expand(esize, new_length, _size);                        \
-      int j;                                                                             \
-      for (j = len - 1; j >= i; j--) {                                                   \
-        ((etype*)_data)[j + st_len] = ((etype*)_data)[j];                                \
-      }                                                                                  \
-      for (j = 0; j < st_len; j++) {                                                     \
-        ((etype*)_data)[i + j] = ((etype*)st->_data)[j];                                 \
-      }                                                                                  \
-      _length = new_length;                                                              \
-    }                                                                                    \
-                                                                                         \
-    /* deprecated operations - for compatibility with GrowableArray only */              \
-    int  capacity() const                        { return size(); }                      \
-    void clear()                                 { truncate(0); }                        \
-    void trunc_to(const int length)              { truncate(length); }                   \
-    int  append(const etype x)                   { return push(x); }                     \
-    void appendAll(const stack_name* stack)      { push_all(stack); }                    \
-    etype last() const                           { return top(); }                       \
-  };                                                                                     \
-
-
-#define define_resource_list(element_type)                                               \
-  define_generic_array(element_type##Array, element_type, ResourceArray)                 \
-  define_stack(element_type##List, element_type##Array)
-
-#define define_resource_pointer_list(element_type)                                       \
-  define_generic_array(element_type##Array, element_type *, ResourceArray)               \
-  define_stack(element_type##List, element_type##Array)
-
-#define define_c_heap_list(element_type)                                                 \
-  define_generic_array(element_type##Array, element_type, CHeapArray)                    \
-  define_stack(element_type##List, element_type##Array)
-
-#define define_c_heap_pointer_list(element_type)                                         \
-  define_generic_array(element_type##Array, element_type *, CHeapArray)                  \
-  define_stack(element_type##List, element_type##Array)
-
-
 // Arrays for basic types
-
-define_array(boolArray, bool)          define_stack(boolStack, boolArray)
-define_array(intArray , int )          define_stack(intStack , intArray )
+typedef GrowableArray<int> intArray;
+typedef GrowableArray<int> intStack;
+typedef GrowableArray<bool> boolArray;
+typedef GrowableArray<bool> boolStack;
 
 // Array for metadata allocation
 
--- a/hotspot/src/share/vm/utilities/growableArray.hpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/utilities/growableArray.hpp	Thu Apr 28 14:44:52 2016 -0700
@@ -249,6 +249,10 @@
     return _data[_len-1];
   }
 
+  E last() const {
+    return top();
+  }
+
   GrowableArrayIterator<E> begin() const {
     return GrowableArrayIterator<E>(this, 0);
   }
@@ -362,6 +366,24 @@
     _data[idx] = elem;
   }
 
+  void insert_before(const int idx, const GrowableArray<E>* array) {
+    assert(0 <= idx && idx <= _len, "illegal index");
+    check_nesting();
+    int array_len = array->length();
+    int new_len = _len + array_len;
+    if (new_len >= _max) grow(new_len);
+
+    for (int j = _len - 1; j >= idx; j--) {
+      _data[j + array_len] = _data[j];
+    }
+
+    for (int j = 0; j < array_len; j++) {
+      _data[idx + j] = array->_data[j];
+    }
+
+    _len += array_len;
+  }
+
   void appendAll(const GrowableArray<E>* l) {
     for (int i = 0; i < l->_len; i++) {
       raw_at_put_grow(_len, l->_data[i], E());
--- a/hotspot/src/share/vm/utilities/vmError.cpp	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/src/share/vm/utilities/vmError.cpp	Thu Apr 28 14:44:52 2016 -0700
@@ -28,6 +28,7 @@
 #include "compiler/compileBroker.hpp"
 #include "compiler/disassembler.hpp"
 #include "gc/shared/collectedHeap.hpp"
+#include "logging/logConfiguration.hpp"
 #include "prims/whitebox.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/atomic.inline.hpp"
@@ -774,6 +775,13 @@
        st->cr();
      }
 
+  STEP(395, "(printing log configuration)")
+    if (_verbose){
+      st->print_cr("Logging:");
+      LogConfiguration::describe_current_configuration(st);
+      st->cr();
+    }
+
   STEP(400, "(printing all environment variables)" )
 
      if (_verbose) {
@@ -937,6 +945,11 @@
     st->cr();
   }
 
+  // STEP("(printing log configuration)")
+  st->print_cr("Logging:");
+  LogConfiguration::describe(st);
+  st->cr();
+
   // STEP("(printing all environment variables)")
 
   os::print_environment_variables(st, env_list);
--- a/hotspot/test/TEST.groups	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/TEST.groups	Thu Apr 28 14:44:52 2016 -0700
@@ -353,7 +353,7 @@
   runtime/ \
  -runtime/ErrorHandling/ErrorHandler.java \
  -runtime/RedefineObject/TestRedefineObject.java \
- -runtime/8003720/Test8003720.java \
+ -runtime/MirrorFrame/Test8003720.java \
  -runtime/Metaspace/FragmentMetaspace.java \
  -runtime/Metaspace/FragmentMetaspaceSimple.java \
  -runtime/Thread/TestThreadDumpMonitorContention.java \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/arguments/TestUseCompiler.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+/**
+ * @test TestUseCompiler
+ * @bug 8086068
+ * @summary Tests execution with inconsistent UseCompiler flag combination.
+ * @run main/othervm -Xint -XX:+UseCompiler TestUseCompiler
+ * @run main/othervm -XX:+UseCompiler -Xint TestUseCompiler
+ */
+
+public class TestUseCompiler {
+
+    public static void main(String args[]) {
+        System.out.println("Passed");
+    }
+}
+
--- a/hotspot/test/compiler/arraycopy/TestArrayCopyNoInitDeopt.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/arraycopy/TestArrayCopyNoInitDeopt.java	Thu Apr 28 14:44:52 2016 -0700
@@ -72,6 +72,7 @@
     }
 
     private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
+    private static final int TIERED_STOP_AT_LEVEL = WHITE_BOX.getIntxVMFlag("TieredStopAtLevel").intValue();
 
     static boolean deoptimize(Method method, Object src_obj) throws Exception {
         for (int i = 0; i < 10; i++) {
@@ -84,7 +85,9 @@
     }
 
     static public void main(String[] args) throws Exception {
-        if (Platform.isServer()) {
+        // Only execute if C2 is available
+        if (Platform.isServer() &&
+            TIERED_STOP_AT_LEVEL == CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION) {
             int[] src = new int[10];
             Object src_obj = new Object();
             Method method_m1 = TestArrayCopyNoInitDeopt.class.getMethod("m1", Object.class);
--- a/hotspot/test/compiler/codegen/IntRotateWithImmediate.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/codegen/IntRotateWithImmediate.java	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2015 SAP SE. All rights reserved.
+ * Copyright (c) 2016, Red Hat, Inc. 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 +25,7 @@
 /*
  * @test
  * @bug 8080190
+ * @bug 8154537
  * @key regression
  * @summary Test that the rotate distance used in the rotate instruction is properly masked with 0x1f
  * @run main/othervm -Xbatch -XX:-UseOnStackReplacement IntRotateWithImmediate
@@ -33,7 +35,7 @@
 public class IntRotateWithImmediate {
 
   // This is currently the same as Integer.rotateRight()
-  static int rotateRight(int i, int distance) {
+  static int rotateRight1(int i, int distance) {
     // On some architectures (i.e. x86_64 and ppc64) the following computation is
     // matched in the .ad file into a single MachNode which emmits a single rotate
     // machine instruction. It is important that the shift amount is masked to match
@@ -43,17 +45,29 @@
     return ((i >>> distance) | (i << -distance));
   }
 
-  static int compute(int x) {
-    return rotateRight(x, 3);
+  static int rotateRight2(int i, int distance) {
+      return ((i >>> distance) | (i << (32-distance)));
+  }
+
+  static int compute1(int x) {
+    return rotateRight1(x, 3);
+  }
+
+  static int compute2(int x) {
+    return rotateRight2(x, 3);
   }
 
   public static void main(String args[]) {
     int val = 4096;
 
-    int firstResult = compute(val);
+    int firstResult = compute1(val);
 
     for (int i = 0; i < 100000; i++) {
-      int newResult = compute(val);
+      int newResult = compute1(val);
+      if (firstResult != newResult) {
+        throw new InternalError(firstResult + " != " + newResult);
+      }
+      newResult = compute2(val);
       if (firstResult != newResult) {
         throw new InternalError(firstResult + " != " + newResult);
       }
--- a/hotspot/test/compiler/compilercontrol/commandfile/PrintTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/compilercontrol/commandfile/PrintTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -26,7 +26,6 @@
  * @bug 8137167
  * @summary Tests CompileCommand=print
  * @library /testlibrary /test/lib /compiler/testlibrary ../share /
- * @ignore 8140354
  * @build compiler.compilercontrol.commandfile.PrintTest
  *        pool.sub.* pool.subpack.* sun.hotspot.WhiteBox
  *        compiler.testlibrary.CompilerUtils compiler.compilercontrol.share.actions.*
--- a/hotspot/test/compiler/compilercontrol/commands/PrintTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/compilercontrol/commands/PrintTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -26,7 +26,6 @@
  * @bug 8137167
  * @summary Tests CompileCommand=print
  * @library /testlibrary /test/lib /compiler/testlibrary ../share /
- * @ignore 8140354
  * @build compiler.compilercontrol.commands.PrintTest
  *        pool.sub.* pool.subpack.* sun.hotspot.WhiteBox
  *        compiler.testlibrary.CompilerUtils compiler.compilercontrol.share.actions.*
--- a/hotspot/test/compiler/compilercontrol/directives/PrintTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/compilercontrol/directives/PrintTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -26,7 +26,6 @@
  * @bug 8137167
  * @summary Tests directives to be able to turn on print_assembly
  * @library /testlibrary /test/lib /compiler/testlibrary ../share /
- * @ignore 8140354
  * @build compiler.compilercontrol.directives.PrintTest
  *        pool.sub.* pool.subpack.* sun.hotspot.WhiteBox
  *        compiler.testlibrary.CompilerUtils compiler.compilercontrol.share.actions.*
--- a/hotspot/test/compiler/compilercontrol/jcmd/PrintDirectivesTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/compilercontrol/jcmd/PrintDirectivesTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -26,7 +26,6 @@
  * @bug 8137167
  * @summary Tests jcmd to be able to add a directive to compile only specified methods
  * @library /testlibrary /test/lib /compiler/testlibrary ../share /
- * @ignore 8140354
  * @build compiler.compilercontrol.jcmd.PrintDirectivesTest
  *        pool.sub.* pool.subpack.* sun.hotspot.WhiteBox
  *        compiler.testlibrary.CompilerUtils compiler.compilercontrol.share.actions.*
--- a/hotspot/test/compiler/compilercontrol/mixed/RandomValidCommandsTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/compilercontrol/mixed/RandomValidCommandsTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -26,7 +26,6 @@
  * @bug 8137167
  * @summary Randomly generates valid commands with random types
  * @library /testlibrary /test/lib /compiler/testlibrary ../share /
- * @ignore 8140354
  * @build compiler.compilercontrol.mixed.RandomValidCommandsTest
  *        pool.sub.* pool.subpack.* sun.hotspot.WhiteBox
  *        compiler.testlibrary.CompilerUtils compiler.compilercontrol.share.actions.*
--- a/hotspot/test/compiler/jvmci/code/CodeInstallationTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2015, 2016, 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.
- */
-package compiler.jvmci.code;
-
-import java.lang.reflect.Method;
-
-import jdk.vm.ci.amd64.AMD64;
-import jdk.vm.ci.code.Architecture;
-import jdk.vm.ci.code.CodeCacheProvider;
-import jdk.vm.ci.code.InstalledCode;
-import jdk.vm.ci.code.TargetDescription;
-import jdk.vm.ci.hotspot.HotSpotCompiledCode;
-import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
-import jdk.vm.ci.meta.ConstantReflectionProvider;
-import jdk.vm.ci.meta.MetaAccessProvider;
-import jdk.vm.ci.runtime.JVMCI;
-import jdk.vm.ci.runtime.JVMCIBackend;
-import jdk.vm.ci.sparc.SPARC;
-
-import org.junit.Assert;
-
-import compiler.jvmci.code.amd64.AMD64TestAssembler;
-import compiler.jvmci.code.sparc.SPARCTestAssembler;
-
-/**
- * Base class for code installation tests.
- */
-public class CodeInstallationTest {
-
-    protected final MetaAccessProvider metaAccess;
-    protected final CodeCacheProvider codeCache;
-    protected final TargetDescription target;
-    protected final ConstantReflectionProvider constantReflection;
-
-    public CodeInstallationTest() {
-        JVMCIBackend backend = JVMCI.getRuntime().getHostJVMCIBackend();
-        metaAccess = backend.getMetaAccess();
-        codeCache = backend.getCodeCache();
-        target = backend.getTarget();
-        constantReflection = backend.getConstantReflection();
-    }
-
-    protected interface TestCompiler {
-
-        void compile(TestAssembler asm);
-    }
-
-    private TestAssembler createAssembler() {
-        Architecture arch = codeCache.getTarget().arch;
-        if (arch instanceof AMD64) {
-            return new AMD64TestAssembler(codeCache);
-        } else if (arch instanceof SPARC) {
-            return new SPARCTestAssembler(codeCache);
-        } else {
-            Assert.fail("unsupported architecture");
-            return null;
-        }
-    }
-
-    protected Method getMethod(String name, Class<?>... args) {
-        try {
-            return getClass().getMethod(name, args);
-        } catch (NoSuchMethodException e) {
-            Assert.fail("method not found");
-            return null;
-        }
-    }
-
-    protected void test(TestCompiler compiler, Method method, Object... args) {
-        HotSpotResolvedJavaMethod resolvedMethod = (HotSpotResolvedJavaMethod) metaAccess.lookupJavaMethod(method);
-        TestAssembler asm = createAssembler();
-
-        asm.emitPrologue();
-        compiler.compile(asm);
-        asm.emitEpilogue();
-
-        HotSpotCompiledCode code = asm.finish(resolvedMethod);
-        InstalledCode installed = codeCache.addCode(resolvedMethod, code, null, null);
-
-        try {
-            Object expected = method.invoke(null, args);
-            Object actual = installed.executeVarargs(args);
-            Assert.assertEquals(expected, actual);
-        } catch (Exception e) {
-            e.printStackTrace();
-            Assert.fail(e.toString());
-        }
-    }
-}
--- a/hotspot/test/compiler/jvmci/code/DataPatchTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,189 +0,0 @@
-/*
- * Copyright (c) 2015, 2016, 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.
- */
-
-/**
- * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
- * @library /
- * @modules jdk.vm.ci/jdk.vm.ci.hotspot
- *          jdk.vm.ci/jdk.vm.ci.meta
- *          jdk.vm.ci/jdk.vm.ci.code
- *          jdk.vm.ci/jdk.vm.ci.code.site
- *          jdk.vm.ci/jdk.vm.ci.runtime
- *          jdk.vm.ci/jdk.vm.ci.amd64
- *          jdk.vm.ci/jdk.vm.ci.sparc
- * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.code.DataPatchTest
- */
-
-package compiler.jvmci.code;
-
-import jdk.vm.ci.code.Register;
-import jdk.vm.ci.code.site.DataSectionReference;
-import jdk.vm.ci.hotspot.HotSpotConstant;
-import jdk.vm.ci.hotspot.HotSpotMetaAccessProvider;
-import jdk.vm.ci.hotspot.HotSpotSymbol;
-import jdk.vm.ci.hotspot.HotSpotVMConfig;
-import jdk.vm.ci.meta.ResolvedJavaType;
-
-import org.junit.Assume;
-import org.junit.Test;
-
-/**
- * Test code installation with data patches.
- */
-public class DataPatchTest extends CodeInstallationTest {
-
-    public static Class<?> getConstClass() {
-        return DataPatchTest.class;
-    }
-
-    private void test(TestCompiler compiler) {
-        test(compiler, getMethod("getConstClass"));
-    }
-
-    @Test
-    public void testInlineObject() {
-        test(asm -> {
-            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
-            HotSpotConstant c = (HotSpotConstant) constantReflection.asJavaClass(type);
-            Register ret = asm.emitLoadPointer(c);
-            asm.emitPointerRet(ret);
-        });
-    }
-
-    @Test
-    public void testInlineNarrowObject() {
-        Assume.assumeTrue(HotSpotVMConfig.config().useCompressedOops);
-        test(asm -> {
-            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
-            HotSpotConstant c = (HotSpotConstant) constantReflection.asJavaClass(type);
-            Register compressed = asm.emitLoadPointer((HotSpotConstant) c.compress());
-            Register ret = asm.emitUncompressPointer(compressed, HotSpotVMConfig.config().narrowOopBase, HotSpotVMConfig.config().narrowOopShift);
-            asm.emitPointerRet(ret);
-        });
-    }
-
-    @Test
-    public void testDataSectionReference() {
-        test(asm -> {
-            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
-            HotSpotConstant c = (HotSpotConstant) constantReflection.asJavaClass(type);
-            DataSectionReference ref = asm.emitDataItem(c);
-            Register ret = asm.emitLoadPointer(ref);
-            asm.emitPointerRet(ret);
-        });
-    }
-
-    @Test
-    public void testNarrowDataSectionReference() {
-        Assume.assumeTrue(HotSpotVMConfig.config().useCompressedOops);
-        test(asm -> {
-            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
-            HotSpotConstant c = (HotSpotConstant) constantReflection.asJavaClass(type);
-            HotSpotConstant cCompressed = (HotSpotConstant) c.compress();
-            DataSectionReference ref = asm.emitDataItem(cCompressed);
-            Register compressed = asm.emitLoadNarrowPointer(ref);
-            Register ret = asm.emitUncompressPointer(compressed, HotSpotVMConfig.config().narrowOopBase, HotSpotVMConfig.config().narrowOopShift);
-            asm.emitPointerRet(ret);
-        });
-    }
-
-    @Test
-    public void testInlineMetadata() {
-        test(asm -> {
-            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
-            Register klass = asm.emitLoadPointer((HotSpotConstant) constantReflection.asObjectHub(type));
-            Register ret = asm.emitLoadPointer(klass, HotSpotVMConfig.config().classMirrorOffset);
-            asm.emitPointerRet(ret);
-        });
-    }
-
-    @Test
-    public void testInlineNarrowMetadata() {
-        Assume.assumeTrue(HotSpotVMConfig.config().useCompressedClassPointers);
-        test(asm -> {
-            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
-            HotSpotConstant hub = (HotSpotConstant) constantReflection.asObjectHub(type);
-            Register narrowKlass = asm.emitLoadPointer((HotSpotConstant) hub.compress());
-            Register klass = asm.emitUncompressPointer(narrowKlass, HotSpotVMConfig.config().narrowKlassBase, HotSpotVMConfig.config().narrowKlassShift);
-            Register ret = asm.emitLoadPointer(klass, HotSpotVMConfig.config().classMirrorOffset);
-            asm.emitPointerRet(ret);
-        });
-    }
-
-    @Test
-    public void testMetadataInDataSection() {
-        test(asm -> {
-            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
-            HotSpotConstant hub = (HotSpotConstant) constantReflection.asObjectHub(type);
-            DataSectionReference ref = asm.emitDataItem(hub);
-            Register klass = asm.emitLoadPointer(ref);
-            Register ret = asm.emitLoadPointer(klass, HotSpotVMConfig.config().classMirrorOffset);
-            asm.emitPointerRet(ret);
-        });
-    }
-
-    @Test
-    public void testNarrowMetadataInDataSection() {
-        Assume.assumeTrue(HotSpotVMConfig.config().useCompressedClassPointers);
-        test(asm -> {
-            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
-            HotSpotConstant hub = (HotSpotConstant) constantReflection.asObjectHub(type);
-            HotSpotConstant narrowHub = (HotSpotConstant) hub.compress();
-            DataSectionReference ref = asm.emitDataItem(narrowHub);
-            Register narrowKlass = asm.emitLoadNarrowPointer(ref);
-            Register klass = asm.emitUncompressPointer(narrowKlass, HotSpotVMConfig.config().narrowKlassBase, HotSpotVMConfig.config().narrowKlassShift);
-            Register ret = asm.emitLoadPointer(klass, HotSpotVMConfig.config().classMirrorOffset);
-            asm.emitPointerRet(ret);
-        });
-    }
-
-
-    public static long getConstSymbol(HotSpotMetaAccessProvider meta) {
-        HotSpotSymbol symbol = meta.lookupSymbol("java/lang/Object");
-        return symbol.getMetaspacePointer();
-    }
-
-    private void testSymbol(TestCompiler compiler) {
-        test(compiler, getMethod("getConstSymbol", HotSpotMetaAccessProvider.class), (HotSpotMetaAccessProvider) metaAccess);
-    }
-
-    @Test
-    public void testInlineSymbol() {
-        testSymbol(asm -> {
-            HotSpotSymbol symbol = ((HotSpotMetaAccessProvider) metaAccess).lookupSymbol("java/lang/Object");
-            Register ret = asm.emitLoadPointer((HotSpotConstant) symbol.asConstant());
-            asm.emitPointerRet(ret);
-        });
-    }
-
-    @Test
-    public void testSymbolInDataSection() {
-        testSymbol(asm -> {
-            HotSpotSymbol symbol = ((HotSpotMetaAccessProvider) metaAccess).lookupSymbol("java/lang/Object");
-            DataSectionReference ref = asm.emitDataItem((HotSpotConstant) symbol.asConstant());
-            Register ret = asm.emitLoadPointer(ref);
-            asm.emitPointerRet(ret);
-        });
-    }
-}
--- a/hotspot/test/compiler/jvmci/code/DebugInfoTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-package compiler.jvmci.code;
-
-import java.lang.reflect.Method;
-
-import jdk.vm.ci.code.BytecodeFrame;
-import jdk.vm.ci.code.DebugInfo;
-import jdk.vm.ci.code.Location;
-import jdk.vm.ci.code.VirtualObject;
-import jdk.vm.ci.hotspot.HotSpotReferenceMap;
-import jdk.vm.ci.meta.JavaKind;
-import jdk.vm.ci.meta.JavaValue;
-import jdk.vm.ci.meta.ResolvedJavaMethod;
-
-/**
- * Test code installation with debug information.
- */
-public class DebugInfoTest extends CodeInstallationTest {
-
-    protected interface DebugInfoCompiler {
-
-        VirtualObject[] compile(TestAssembler asm, JavaValue[] frameValues);
-    }
-
-    protected void test(DebugInfoCompiler compiler, Method method, int bci, JavaKind... slotKinds) {
-        ResolvedJavaMethod resolvedMethod = metaAccess.lookupJavaMethod(method);
-
-        int numLocals = resolvedMethod.getMaxLocals();
-        int numStack = slotKinds.length - numLocals;
-        JavaValue[] values = new JavaValue[slotKinds.length];
-        test(asm -> {
-            VirtualObject[] vobjs = compiler.compile(asm, values);
-
-            BytecodeFrame frame = new BytecodeFrame(null, resolvedMethod, bci, false, false, values, slotKinds, numLocals, numStack, 0);
-            DebugInfo info = new DebugInfo(frame, vobjs);
-            info.setReferenceMap(new HotSpotReferenceMap(new Location[0], new Location[0], new int[0], 8));
-
-            asm.emitTrap(info);
-        }, method);
-    }
-}
--- a/hotspot/test/compiler/jvmci/code/InterpreterFrameSizeTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2016, 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.
- */
-
-/**
- * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
- * @modules jdk.vm.ci/jdk.vm.ci.hotspot
- *          jdk.vm.ci/jdk.vm.ci.code
- *          jdk.vm.ci/jdk.vm.ci.code.site
- *          jdk.vm.ci/jdk.vm.ci.meta
- *          jdk.vm.ci/jdk.vm.ci.runtime
- *          jdk.vm.ci/jdk.vm.ci.common
- *          jdk.vm.ci/jdk.vm.ci.amd64
- *          jdk.vm.ci/jdk.vm.ci.sparc
- * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java
- * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.code.InterpreterFrameSizeTest
- */
-
-package compiler.jvmci.code;
-
-import java.lang.reflect.Method;
-
-import jdk.vm.ci.code.BytecodeFrame;
-import jdk.vm.ci.meta.JavaKind;
-import jdk.vm.ci.meta.JavaValue;
-import jdk.vm.ci.meta.ResolvedJavaMethod;
-
-import jdk.vm.ci.hotspot.HotSpotCodeCacheProvider;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class InterpreterFrameSizeTest extends CodeInstallationTest {
-
-    HotSpotCodeCacheProvider hotspotCodeCache() {
-        return (HotSpotCodeCacheProvider) codeCache;
-    }
-
-    @Test
-    public void testNull() {
-        try {
-            hotspotCodeCache().interpreterFrameSize(null);
-        } catch (NullPointerException npe) {
-            System.out.println("threw NPE as expected");
-            return;
-        }
-        Assert.fail("expected NullPointerException");
-    }
-
-    @Test
-    public void test() {
-        ResolvedJavaMethod resolvedMethod = metaAccess.lookupJavaMethod(getMethod("testNull"));
-
-        int bci = 0;
-        int numLocals = resolvedMethod.getMaxLocals();
-        int numStack = 0;
-        JavaValue[] values = new JavaValue[numLocals];
-        JavaKind[] slotKinds = new JavaKind[numLocals];
-        BytecodeFrame frame = new BytecodeFrame(null, resolvedMethod, bci, false, false, values, slotKinds, numLocals, numStack, 0);
-        int size = hotspotCodeCache().interpreterFrameSize(frame);
-        System.out.println("Frame size is " + size + " bytes");
-        if (size <= 0) {
-            Assert.fail("expected non-zero result");
-        }
-    }
-}
--- a/hotspot/test/compiler/jvmci/code/SimpleCodeInstallationTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-/**
- * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
- * @library /
- * @modules jdk.vm.ci/jdk.vm.ci.hotspot
- *          jdk.vm.ci/jdk.vm.ci.meta
- *          jdk.vm.ci/jdk.vm.ci.code
- *          jdk.vm.ci/jdk.vm.ci.code.site
- *          jdk.vm.ci/jdk.vm.ci.runtime
- *          jdk.vm.ci/jdk.vm.ci.amd64
- *          jdk.vm.ci/jdk.vm.ci.sparc
- * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.code.SimpleCodeInstallationTest
- */
-
-package compiler.jvmci.code;
-
-import jdk.vm.ci.code.Register;
-
-import org.junit.Test;
-
-/**
- * Test simple code installation.
- */
-public class SimpleCodeInstallationTest extends CodeInstallationTest {
-
-    public static int add(int a, int b) {
-        return a + b;
-    }
-
-    private static void compileAdd(TestAssembler asm) {
-        Register arg0 = asm.emitIntArg0();
-        Register arg1 = asm.emitIntArg1();
-        Register ret = asm.emitIntAdd(arg0, arg1);
-        asm.emitIntRet(ret);
-    }
-
-    @Test
-    public void test() {
-        test(SimpleCodeInstallationTest::compileAdd, getMethod("add", int.class, int.class), 5, 7);
-    }
-}
--- a/hotspot/test/compiler/jvmci/code/SimpleDebugInfoTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,285 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-/**
- * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
- * @library /
- * @modules jdk.vm.ci/jdk.vm.ci.hotspot
- *          jdk.vm.ci/jdk.vm.ci.meta
- *          jdk.vm.ci/jdk.vm.ci.code
- *          jdk.vm.ci/jdk.vm.ci.code.site
- *          jdk.vm.ci/jdk.vm.ci.runtime
- *          jdk.vm.ci/jdk.vm.ci.amd64
- *          jdk.vm.ci/jdk.vm.ci.sparc
- * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.code.SimpleDebugInfoTest
- */
-
-package compiler.jvmci.code;
-
-import jdk.vm.ci.code.Register;
-import jdk.vm.ci.hotspot.HotSpotConstant;
-import jdk.vm.ci.hotspot.HotSpotVMConfig;
-import jdk.vm.ci.meta.JavaConstant;
-import jdk.vm.ci.meta.JavaKind;
-import jdk.vm.ci.meta.ResolvedJavaType;
-import jdk.vm.ci.meta.Value;
-
-import org.junit.Assume;
-import org.junit.Test;
-
-public class SimpleDebugInfoTest extends DebugInfoTest {
-
-    public static int intOnStack() {
-        return 42;
-    }
-
-    private void testIntOnStack(DebugInfoCompiler compiler) {
-        test(compiler, getMethod("intOnStack"), 2, JavaKind.Int);
-    }
-
-    public static int intInLocal() {
-        int local = 42;
-        return local;
-    }
-
-    public void testIntInLocal(DebugInfoCompiler compiler) {
-        test(compiler, getMethod("intInLocal"), 3, JavaKind.Int);
-    }
-
-    @Test
-    public void testConstInt() {
-        DebugInfoCompiler compiler = (asm, values) -> {
-            values[0] = JavaConstant.forInt(42);
-            return null;
-        };
-        testIntOnStack(compiler);
-        testIntInLocal(compiler);
-    }
-
-    @Test
-    public void testRegInt() {
-        DebugInfoCompiler compiler = (asm, values) -> {
-            Register reg = asm.emitLoadInt(42);
-            values[0] = reg.asValue(target.getLIRKind(JavaKind.Int));
-            return null;
-        };
-        testIntOnStack(compiler);
-        testIntInLocal(compiler);
-    }
-
-    @Test
-    public void testStackInt() {
-        DebugInfoCompiler compiler = (asm, values) -> {
-            Register reg = asm.emitLoadInt(42);
-            values[0] = asm.emitIntToStack(reg);
-            return null;
-        };
-        testIntOnStack(compiler);
-        testIntInLocal(compiler);
-    }
-
-
-    public static float floatOnStack() {
-        return 42.0f;
-    }
-
-    private void testFloatOnStack(DebugInfoCompiler compiler) {
-        test(compiler, getMethod("floatOnStack"), 2, JavaKind.Float);
-    }
-
-    public static float floatInLocal() {
-        float local = 42.0f;
-        return local;
-    }
-
-    private void testFloatInLocal(DebugInfoCompiler compiler) {
-        test(compiler, getMethod("floatInLocal"), 3, JavaKind.Float);
-    }
-
-    @Test
-    public void testConstFloat() {
-        DebugInfoCompiler compiler = (asm, values) -> {
-            values[0] = JavaConstant.forFloat(42.0f);
-            return null;
-        };
-        testFloatOnStack(compiler);
-        testFloatInLocal(compiler);
-    }
-
-    @Test
-    public void testRegFloat() {
-        DebugInfoCompiler compiler = (asm, values) -> {
-            Register reg = asm.emitLoadFloat(42.0f);
-            values[0] = reg.asValue(target.getLIRKind(JavaKind.Float));
-            return null;
-        };
-        testFloatOnStack(compiler);
-        testFloatInLocal(compiler);
-    }
-
-    @Test
-    public void testStackFloat() {
-        DebugInfoCompiler compiler = (asm, values) -> {
-            Register reg = asm.emitLoadFloat(42.0f);
-            values[0] = asm.emitFloatToStack(reg);
-            return null;
-        };
-        testFloatOnStack(compiler);
-        testFloatInLocal(compiler);
-    }
-
-
-    public static long longOnStack() {
-        return 42;
-    }
-
-    private void testLongOnStack(DebugInfoCompiler compiler) {
-        test(compiler, getMethod("longOnStack"), 3, JavaKind.Long, JavaKind.Illegal);
-    }
-
-    public static long longInLocal() {
-        long local = 42;
-        return local;
-    }
-
-    private void testLongInLocal(DebugInfoCompiler compiler) {
-        test(compiler, getMethod("longInLocal"), 4, JavaKind.Long, JavaKind.Illegal);
-    }
-
-    @Test
-    public void testConstLong() {
-        DebugInfoCompiler compiler = (asm, values) -> {
-            values[0] = JavaConstant.forLong(42);
-            values[1] = Value.ILLEGAL;
-            return null;
-        };
-        testLongOnStack(compiler);
-        testLongInLocal(compiler);
-    }
-
-    @Test
-    public void testRegLong() {
-        DebugInfoCompiler compiler = (asm, values) -> {
-            Register reg = asm.emitLoadLong(42);
-            values[0] = reg.asValue(target.getLIRKind(JavaKind.Long));
-            values[1] = Value.ILLEGAL;
-            return null;
-        };
-        testLongOnStack(compiler);
-        testLongInLocal(compiler);
-    }
-
-    @Test
-    public void testStackLong() {
-        DebugInfoCompiler compiler = (asm, values) -> {
-            Register reg = asm.emitLoadLong(42);
-            values[0] = asm.emitLongToStack(reg);
-            values[1] = Value.ILLEGAL;
-            return null;
-        };
-        testLongOnStack(compiler);
-        testLongInLocal(compiler);
-    }
-
-
-    public static Class<?> objectOnStack() {
-        return SimpleDebugInfoTest.class;
-    }
-
-    private void testObjectOnStack(DebugInfoCompiler compiler) {
-        test(compiler, getMethod("objectOnStack"), 2, JavaKind.Object);
-    }
-
-    public static Class<?> objectInLocal() {
-        Class<?> local = SimpleDebugInfoTest.class;
-        return local;
-    }
-
-    private void testObjectInLocal(DebugInfoCompiler compiler) {
-        test(compiler, getMethod("objectInLocal"), 3, JavaKind.Object);
-    }
-
-    @Test
-    public void testConstObject() {
-        ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
-        DebugInfoCompiler compiler = (asm, values) -> {
-            values[0] = constantReflection.asJavaClass(type);
-            return null;
-        };
-        testObjectOnStack(compiler);
-        testObjectInLocal(compiler);
-    }
-
-    @Test
-    public void testRegObject() {
-        ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
-        DebugInfoCompiler compiler = (asm, values) -> {
-            Register reg = asm.emitLoadPointer((HotSpotConstant) constantReflection.asJavaClass(type));
-            values[0] = reg.asValue(target.getLIRKind(JavaKind.Object));
-            return null;
-        };
-        testObjectOnStack(compiler);
-        testObjectInLocal(compiler);
-    }
-
-    @Test
-    public void testStackObject() {
-        ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
-        DebugInfoCompiler compiler = (asm, values) -> {
-            Register reg = asm.emitLoadPointer((HotSpotConstant) constantReflection.asJavaClass(type));
-            values[0] = asm.emitPointerToStack(reg);
-            return null;
-        };
-        testObjectOnStack(compiler);
-        testObjectInLocal(compiler);
-    }
-
-    @Test
-    public void testRegNarrowObject() {
-        Assume.assumeTrue(HotSpotVMConfig.config().useCompressedOops);
-        ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
-        DebugInfoCompiler compiler = (asm, values) -> {
-            HotSpotConstant wide = (HotSpotConstant) constantReflection.asJavaClass(type);
-            Register reg = asm.emitLoadPointer((HotSpotConstant) wide.compress());
-            values[0] = reg.asValue(asm.narrowOopKind);
-            return null;
-        };
-        testObjectOnStack(compiler);
-        testObjectInLocal(compiler);
-    }
-
-    @Test
-    public void testStackNarrowObject() {
-        Assume.assumeTrue(HotSpotVMConfig.config().useCompressedOops);
-        ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
-        DebugInfoCompiler compiler = (asm, values) -> {
-            HotSpotConstant wide = (HotSpotConstant) constantReflection.asJavaClass(type);
-            Register reg = asm.emitLoadPointer((HotSpotConstant) wide.compress());
-            values[0] = asm.emitNarrowPointerToStack(reg);
-            return null;
-        };
-        testObjectOnStack(compiler);
-        testObjectInLocal(compiler);
-    }
-}
--- a/hotspot/test/compiler/jvmci/code/TestAssembler.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,333 +0,0 @@
-/*
- * Copyright (c) 2015, 2016, 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.
- */
-
-package compiler.jvmci.code;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import jdk.vm.ci.code.CodeCacheProvider;
-import jdk.vm.ci.code.DebugInfo;
-import jdk.vm.ci.code.Register;
-import jdk.vm.ci.code.StackSlot;
-import jdk.vm.ci.code.site.Call;
-import jdk.vm.ci.code.site.ConstantReference;
-import jdk.vm.ci.code.site.DataPatch;
-import jdk.vm.ci.code.site.DataSectionReference;
-import jdk.vm.ci.code.site.Infopoint;
-import jdk.vm.ci.code.site.InfopointReason;
-import jdk.vm.ci.code.site.Mark;
-import jdk.vm.ci.code.site.Reference;
-import jdk.vm.ci.code.site.Site;
-import jdk.vm.ci.hotspot.HotSpotCompiledCode;
-import jdk.vm.ci.hotspot.HotSpotCompiledCode.Comment;
-import jdk.vm.ci.hotspot.HotSpotCompiledNmethod;
-import jdk.vm.ci.hotspot.HotSpotConstant;
-import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
-import jdk.vm.ci.meta.Assumptions.Assumption;
-import jdk.vm.ci.meta.InvokeTarget;
-import jdk.vm.ci.meta.LIRKind;
-import jdk.vm.ci.meta.PlatformKind;
-import jdk.vm.ci.meta.ResolvedJavaMethod;
-import jdk.vm.ci.meta.VMConstant;
-
-/**
- * Simple assembler used by the code installation tests.
- */
-public abstract class TestAssembler {
-
-    /**
-     * Emit the method prologue code (e.g. building the new stack frame).
-     */
-    public abstract void emitPrologue();
-
-    /**
-     * Emit the method epilogue code (e.g. the deopt handler).
-     */
-    public abstract void emitEpilogue();
-
-    /**
-     * Emit code to grow the stack frame.
-     *
-     * @param size the size in bytes that the stack should grow
-     */
-    public abstract void emitGrowStack(int size);
-
-    /**
-     * Get the register containing the first 32-bit integer argument.
-     */
-    public abstract Register emitIntArg0();
-
-    /**
-     * Get the register containing the second 32-bit integer argument.
-     */
-    public abstract Register emitIntArg1();
-
-    /**
-     * Emit code to add two 32-bit integer registers. May reuse one of the argument registers.
-     */
-    public abstract Register emitIntAdd(Register a, Register b);
-
-    /**
-     * Emit code to load a constant 32-bit integer to a register.
-     */
-    public abstract Register emitLoadInt(int value);
-
-    /**
-     * Emit code to load a constant 64-bit integer to a register.
-     */
-    public abstract Register emitLoadLong(long value);
-
-    /**
-     * Emit code to load a constant single-precision float to a register.
-     */
-    public abstract Register emitLoadFloat(float value);
-
-    /**
-     * Emit code to load a constant oop or metaspace pointer to a register. The pointer may be wide
-     * or narrow, depending on {@link HotSpotConstant#isCompressed() c.isCompressed()}.
-     */
-    public abstract Register emitLoadPointer(HotSpotConstant c);
-
-    /**
-     * Emit code to load a wide pointer from the {@link HotSpotCompiledCode#dataSection} to a
-     * register.
-     */
-    public abstract Register emitLoadPointer(DataSectionReference ref);
-
-    /**
-     * Emit code to load a narrow pointer from the {@link HotSpotCompiledCode#dataSection} to a
-     * register.
-     */
-    public abstract Register emitLoadNarrowPointer(DataSectionReference ref);
-
-    /**
-     * Emit code to load a (wide) pointer from a memory location to a register.
-     */
-    public abstract Register emitLoadPointer(Register base, int offset);
-
-    /**
-     * Emit code to store a 32-bit integer from a register to a new stack slot.
-     */
-    public abstract StackSlot emitIntToStack(Register a);
-
-    /**
-     * Emit code to store a 64-bit integer from a register to a new stack slot.
-     */
-    public abstract StackSlot emitLongToStack(Register a);
-
-    /**
-     * Emit code to store a single-precision float from a register to a new stack slot.
-     */
-    public abstract StackSlot emitFloatToStack(Register a);
-
-    /**
-     * Emit code to store a wide pointer from a register to a new stack slot.
-     */
-    public abstract StackSlot emitPointerToStack(Register a);
-
-    /**
-     * Emit code to store a narrow pointer from a register to a new stack slot.
-     */
-    public abstract StackSlot emitNarrowPointerToStack(Register a);
-
-    /**
-     * Emit code to uncompress a narrow pointer. The input pointer is guaranteed to be non-null.
-     */
-    public abstract Register emitUncompressPointer(Register compressed, long base, int shift);
-
-    /**
-     * Emit code to return from a function, returning a 32-bit integer.
-     */
-    public abstract void emitIntRet(Register a);
-
-    /**
-     * Emit code to return from a function, returning a wide oop pointer.
-     */
-    public abstract void emitPointerRet(Register a);
-
-    /**
-     * Emit code that traps, forcing a deoptimization.
-     */
-    public abstract void emitTrap(DebugInfo info);
-
-    public final LIRKind narrowOopKind;
-
-    protected final Buffer code;
-    protected final Buffer data;
-    private final ArrayList<Site> sites;
-    private final ArrayList<DataPatch> dataPatches;
-
-    protected final CodeCacheProvider codeCache;
-
-    private final Register[] registers;
-    private int nextRegister;
-
-    protected int frameSize;
-    private int stackAlignment;
-    private int curStackSlot;
-
-    private StackSlot deoptRescue;
-
-    protected TestAssembler(CodeCacheProvider codeCache, int initialFrameSize, int stackAlignment, PlatformKind narrowOopKind, Register... registers) {
-        this.narrowOopKind = LIRKind.reference(narrowOopKind);
-
-        this.code = new Buffer();
-        this.data = new Buffer();
-        this.sites = new ArrayList<>();
-        this.dataPatches = new ArrayList<>();
-
-        this.codeCache = codeCache;
-
-        this.registers = registers;
-        this.nextRegister = 0;
-
-        this.frameSize = initialFrameSize;
-        this.stackAlignment = stackAlignment;
-        this.curStackSlot = initialFrameSize;
-    }
-
-    protected Register newRegister() {
-        return registers[nextRegister++];
-    }
-
-    protected StackSlot newStackSlot(LIRKind kind) {
-        curStackSlot += kind.getPlatformKind().getSizeInBytes();
-        if (curStackSlot > frameSize) {
-            int newFrameSize = curStackSlot;
-            if (newFrameSize % stackAlignment != 0) {
-                newFrameSize += stackAlignment - (newFrameSize % stackAlignment);
-            }
-            emitGrowStack(newFrameSize - frameSize);
-            frameSize = newFrameSize;
-        }
-        return StackSlot.get(kind, -curStackSlot, true);
-    }
-
-    protected void setDeoptRescueSlot(StackSlot deoptRescue) {
-        this.deoptRescue = deoptRescue;
-    }
-
-    protected void recordCall(InvokeTarget target, int size, boolean direct, DebugInfo debugInfo) {
-        sites.add(new Call(target, code.position(), size, direct, debugInfo));
-    }
-
-    protected void recordMark(Object id) {
-        sites.add(new Mark(code.position(), id));
-    }
-
-    protected void recordImplicitException(DebugInfo info) {
-        sites.add(new Infopoint(code.position(), info, InfopointReason.IMPLICIT_EXCEPTION));
-    }
-
-    protected void recordDataPatchInCode(Reference ref) {
-        sites.add(new DataPatch(code.position(), ref));
-    }
-
-    protected void recordDataPatchInData(Reference ref) {
-        dataPatches.add(new DataPatch(data.position(), ref));
-    }
-
-    public DataSectionReference emitDataItem(HotSpotConstant c) {
-        DataSectionReference ref = new DataSectionReference();
-        ref.setOffset(data.position());
-
-        recordDataPatchInData(new ConstantReference((VMConstant) c));
-        if (c.isCompressed()) {
-            data.emitInt(0xDEADDEAD);
-        } else {
-            data.emitLong(0xDEADDEADDEADDEADL);
-        }
-
-        return ref;
-    }
-
-    public HotSpotCompiledCode finish(HotSpotResolvedJavaMethod method) {
-        int id = method.allocateCompileId(0);
-        byte[] finishedCode = code.finish();
-        Site[] finishedSites = sites.toArray(new Site[0]);
-        byte[] finishedData = data.finish();
-        DataPatch[] finishedDataPatches = dataPatches.toArray(new DataPatch[0]);
-        return new HotSpotCompiledNmethod(method.getName(), finishedCode, finishedCode.length, finishedSites, new Assumption[0], new ResolvedJavaMethod[]{method}, new Comment[0], finishedData, 16,
-                        finishedDataPatches, false, frameSize, deoptRescue, method, 0, id, 0L, false);
-    }
-
-    protected static class Buffer {
-
-        private ByteBuffer data = ByteBuffer.allocate(32).order(ByteOrder.nativeOrder());
-
-        private void ensureSize(int length) {
-            if (length >= data.limit()) {
-                byte[] newBuf = Arrays.copyOf(data.array(), length * 4);
-                ByteBuffer newData = ByteBuffer.wrap(newBuf);
-                newData.order(data.order());
-                newData.position(data.position());
-                data = newData;
-            }
-        }
-
-        public int position() {
-            return data.position();
-        }
-
-        public void emitByte(int b) {
-            ensureSize(data.position() + 1);
-            data.put((byte) (b & 0xFF));
-        }
-
-        public void emitShort(int b) {
-            ensureSize(data.position() + 2);
-            data.putShort((short) b);
-        }
-
-        public void emitInt(int b) {
-            ensureSize(data.position() + 4);
-            data.putInt(b);
-        }
-
-        public void emitLong(long b) {
-            ensureSize(data.position() + 8);
-            data.putLong(b);
-        }
-
-        public void emitFloat(float f) {
-            ensureSize(data.position() + 4);
-            data.putFloat(f);
-        }
-
-        public void align(int alignment) {
-            int pos = data.position();
-            int misaligned = pos % alignment;
-            if (misaligned != 0) {
-                pos += alignment - misaligned;
-                data.position(pos);
-            }
-        }
-
-        private byte[] finish() {
-            return Arrays.copyOf(data.array(), data.position());
-        }
-    }
-}
--- a/hotspot/test/compiler/jvmci/code/VirtualObjectDebugInfoTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-/**
- * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
- * @library /
- * @modules jdk.vm.ci/jdk.vm.ci.hotspot
- *          jdk.vm.ci/jdk.vm.ci.meta
- *          jdk.vm.ci/jdk.vm.ci.code
- *          jdk.vm.ci/jdk.vm.ci.code.site
- *          jdk.vm.ci/jdk.vm.ci.runtime
- *          jdk.vm.ci/jdk.vm.ci.amd64
- *          jdk.vm.ci/jdk.vm.ci.sparc
- * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.code.VirtualObjectDebugInfoTest
- */
-
-package compiler.jvmci.code;
-
-import java.util.ArrayList;
-import java.util.Objects;
-
-import jdk.vm.ci.code.Register;
-import jdk.vm.ci.code.VirtualObject;
-import jdk.vm.ci.hotspot.HotSpotConstant;
-import jdk.vm.ci.meta.JavaConstant;
-import jdk.vm.ci.meta.JavaKind;
-import jdk.vm.ci.meta.JavaValue;
-import jdk.vm.ci.meta.ResolvedJavaField;
-import jdk.vm.ci.meta.ResolvedJavaType;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class VirtualObjectDebugInfoTest extends DebugInfoTest {
-
-    private static class TestClass {
-
-        private long longField;
-        private int intField;
-        private float floatField;
-        private Object[] arrayField;
-
-        public TestClass() {
-            this.longField = 8472;
-            this.intField = 42;
-            this.floatField = 3.14f;
-            this.arrayField = new Object[] { Integer.valueOf(58), this, null, Integer.valueOf(17), "Hello, World!" };
-        }
-
-        @Override
-        public boolean equals(Object o) {
-            if (!(o instanceof TestClass)) {
-                return false;
-            }
-
-            TestClass other = (TestClass) o;
-            if (this.longField != other.longField
-                || this.intField != other.intField
-                || this.floatField != other.floatField
-                || this.arrayField.length != other.arrayField.length) {
-                return false;
-            }
-
-            for (int i = 0; i < this.arrayField.length; i++) {
-                // break cycle
-                if (this.arrayField[i] == this && other.arrayField[i] == other) {
-                    continue;
-                }
-
-                if (!Objects.equals(this.arrayField[i], other.arrayField[i])) {
-                    return false;
-                }
-            }
-
-            return true;
-        }
-    }
-
-    public static TestClass buildObject() {
-        return new TestClass();
-    }
-
-    private VirtualObject[] compileBuildObject(TestAssembler asm, JavaValue[] values) {
-        TestClass template = new TestClass();
-        ArrayList<VirtualObject> vobjs = new ArrayList<>();
-
-        ResolvedJavaType retType = metaAccess.lookupJavaType(TestClass.class);
-        VirtualObject ret = VirtualObject.get(retType, vobjs.size());
-        vobjs.add(ret);
-        values[0] = ret;
-
-        ResolvedJavaType arrayType = metaAccess.lookupJavaType(Object[].class);
-        VirtualObject array = VirtualObject.get(arrayType, vobjs.size());
-        vobjs.add(array);
-
-        // build array for ret.arrayField
-        ResolvedJavaType integerType = metaAccess.lookupJavaType(Integer.class);
-        JavaValue[] arrayContent = new JavaValue[template.arrayField.length];
-        JavaKind[] arrayKind = new JavaKind[template.arrayField.length];
-        for (int i = 0; i < arrayContent.length; i++) {
-            arrayKind[i] = JavaKind.Object;
-            if (template.arrayField[i] == null) {
-                arrayContent[i] = JavaConstant.NULL_POINTER;
-            } else if (template.arrayField[i] == template) {
-                arrayContent[i] = ret;
-            } else if (template.arrayField[i] instanceof Integer) {
-                int value = (Integer) template.arrayField[i];
-                VirtualObject boxed = VirtualObject.get(integerType, vobjs.size());
-                vobjs.add(boxed);
-                arrayContent[i] = boxed;
-                boxed.setValues(new JavaValue[]{JavaConstant.forInt(value)}, new JavaKind[]{JavaKind.Int});
-            } else if (template.arrayField[i] instanceof String) {
-                String value = (String) template.arrayField[i];
-                Register reg = asm.emitLoadPointer((HotSpotConstant) constantReflection.forString(value));
-                arrayContent[i] = reg.asValue(target.getLIRKind(JavaKind.Object));
-            } else {
-                Assert.fail("unexpected value");
-            }
-        }
-        array.setValues(arrayContent, arrayKind);
-
-        // build return object
-        ResolvedJavaField[] fields = retType.getInstanceFields(true);
-        JavaValue[] retContent = new JavaValue[fields.length];
-        JavaKind[] retKind = new JavaKind[fields.length];
-        for (int i = 0; i < fields.length; i++) {
-            retKind[i] = fields[i].getJavaKind();
-            switch (retKind[i]) {
-                case Long: // template.longField
-                    retContent[i] = JavaConstant.forLong(template.longField);
-                    break;
-                case Int: // template.intField
-                    Register intReg = asm.emitLoadInt(template.intField);
-                    retContent[i] = asm.emitIntToStack(intReg);
-                    break;
-                case Float: // template.floatField
-                    Register fReg = asm.emitLoadFloat(template.floatField);
-                    retContent[i] = fReg.asValue(target.getLIRKind(JavaKind.Float));
-                    break;
-                case Object: // template.arrayField
-                    retContent[i] = array;
-                    break;
-                default:
-                    Assert.fail("unexpected field");
-            }
-        }
-        ret.setValues(retContent, retKind);
-
-        return vobjs.toArray(new VirtualObject[0]);
-    }
-
-    @Test
-    public void testBuildObject() {
-        test(this::compileBuildObject, getMethod("buildObject"), 7, JavaKind.Object);
-    }
-}
--- a/hotspot/test/compiler/jvmci/code/amd64/AMD64TestAssembler.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,287 +0,0 @@
-/*
- * Copyright (c) 2015, 2016, 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.
- */
-
-package compiler.jvmci.code.amd64;
-
-import jdk.vm.ci.amd64.AMD64;
-import jdk.vm.ci.amd64.AMD64Kind;
-import jdk.vm.ci.code.CodeCacheProvider;
-import jdk.vm.ci.code.DebugInfo;
-import jdk.vm.ci.code.Register;
-import jdk.vm.ci.code.StackSlot;
-import jdk.vm.ci.code.site.ConstantReference;
-import jdk.vm.ci.code.site.DataSectionReference;
-import jdk.vm.ci.hotspot.HotSpotCallingConventionType;
-import jdk.vm.ci.hotspot.HotSpotConstant;
-import jdk.vm.ci.hotspot.HotSpotForeignCallTarget;
-import jdk.vm.ci.hotspot.HotSpotVMConfig;
-import jdk.vm.ci.meta.JavaKind;
-import jdk.vm.ci.meta.LIRKind;
-import jdk.vm.ci.meta.VMConstant;
-
-import compiler.jvmci.code.TestAssembler;
-
-public class AMD64TestAssembler extends TestAssembler {
-
-    public AMD64TestAssembler(CodeCacheProvider codeCache) {
-        super(codeCache, 16, 16, AMD64Kind.DWORD, AMD64.rax, AMD64.rcx, AMD64.rdi, AMD64.r8, AMD64.r9, AMD64.r10);
-    }
-
-    private void emitFatNop() {
-        // 5 byte NOP:
-        // NOP DWORD ptr [EAX + EAX*1 + 00H]
-        code.emitByte(0x0F);
-        code.emitByte(0x1F);
-        code.emitByte(0x44);
-        code.emitByte(0x00);
-        code.emitByte(0x00);
-    }
-
-    @Override
-    public void emitPrologue() {
-        // WARNING: Initial instruction MUST be 5 bytes or longer so that
-        // NativeJump::patch_verified_entry will be able to patch out the entry
-        // code safely.
-        emitFatNop();
-        code.emitByte(0x50 | AMD64.rbp.encoding);  // PUSH rbp
-        emitMove(true, AMD64.rbp, AMD64.rsp);      // MOV rbp, rsp
-        setDeoptRescueSlot(newStackSlot(LIRKind.value(AMD64Kind.QWORD)));
-    }
-
-    @Override
-    public void emitEpilogue() {
-        HotSpotVMConfig config = HotSpotVMConfig.config();
-        recordMark(config.MARKID_DEOPT_HANDLER_ENTRY);
-        recordCall(new HotSpotForeignCallTarget(config.handleDeoptStub), 5, true, null);
-        code.emitByte(0xE8); // CALL rel32
-        code.emitInt(0xDEADDEAD);
-    }
-
-    @Override
-    public void emitGrowStack(int size) {
-        // SUB rsp, size
-        code.emitByte(0x48);
-        code.emitByte(0x81);
-        code.emitByte(0xEC);
-        code.emitInt(size);
-    }
-
-    @Override
-    public Register emitIntArg0() {
-        return codeCache.getRegisterConfig().getCallingConventionRegisters(HotSpotCallingConventionType.JavaCall, JavaKind.Int)[0];
-    }
-
-    @Override
-    public Register emitIntArg1() {
-        return codeCache.getRegisterConfig().getCallingConventionRegisters(HotSpotCallingConventionType.JavaCall, JavaKind.Int)[1];
-    }
-
-    private void emitREX(boolean w, int r, int x, int b) {
-        int wrxb = (w ? 0x08 : 0) | ((r >> 3) << 2) | ((x >> 3) << 1) | (b >> 3);
-        if (wrxb != 0) {
-            code.emitByte(0x40 | wrxb);
-        }
-    }
-
-    private void emitModRMReg(boolean w, int opcode, int r, int m) {
-        emitREX(w, r, 0, m);
-        code.emitByte((byte) opcode);
-        code.emitByte((byte) 0xC0 | ((r & 0x7) << 3) | (m & 0x7));
-    }
-
-    private void emitModRMMemory(boolean w, int opcode, int r, int b, int offset) {
-        emitREX(w, r, 0, b);
-        code.emitByte((byte) opcode);
-        code.emitByte((byte) 0x80 | ((r & 0x7) << 3) | (b & 0x7));
-        code.emitInt(offset);
-    }
-
-    @Override
-    public Register emitLoadInt(int c) {
-        Register ret = newRegister();
-        emitREX(false, 0, 0, ret.encoding);
-        code.emitByte(0xB8 | (ret.encoding & 0x7)); // MOV r32, imm32
-        code.emitInt(c);
-        return ret;
-    }
-
-    @Override
-    public Register emitLoadLong(long c) {
-        Register ret = newRegister();
-        emitREX(true, 0, 0, ret.encoding);
-        code.emitByte(0xB8 | (ret.encoding & 0x7)); // MOV r64, imm64
-        code.emitLong(c);
-        return ret;
-    }
-
-    @Override
-    public Register emitLoadFloat(float c) {
-        DataSectionReference ref = new DataSectionReference();
-        ref.setOffset(data.position());
-        data.emitFloat(c);
-
-        recordDataPatchInCode(ref);
-        Register ret = AMD64.xmm0;
-        emitREX(false, ret.encoding, 0, 0);
-        code.emitByte(0xF3);
-        code.emitByte(0x0F);
-        code.emitByte(0x10);                               // MOVSS xmm1, xmm2/m32
-        code.emitByte(0x05 | ((ret.encoding & 0x7) << 3)); // xmm, [rip+offset]
-        code.emitInt(0xDEADDEAD);
-        return ret;
-    }
-
-    @Override
-    public Register emitLoadPointer(HotSpotConstant c) {
-        recordDataPatchInCode(new ConstantReference((VMConstant) c));
-        if (c.isCompressed()) {
-            Register ret = newRegister();
-            emitREX(false, 0, 0, ret.encoding);
-            code.emitByte(0xB8 | (ret.encoding & 0x7)); // MOV r32, imm32
-            code.emitInt(0xDEADDEAD);
-            return ret;
-        } else {
-            return emitLoadLong(0xDEADDEADDEADDEADl);
-        }
-    }
-
-    private Register emitLoadPointer(DataSectionReference ref, boolean narrow) {
-        recordDataPatchInCode(ref);
-        Register ret = newRegister();
-        emitREX(!narrow, ret.encoding, 0, 0);
-        code.emitByte(0x8B);                               // MOV r64,r/m64
-        code.emitByte(0x05 | ((ret.encoding & 0x7) << 3)); // r64, [rip+offset]
-        code.emitInt(0xDEADDEAD);
-        return ret;
-    }
-
-    @Override
-    public Register emitLoadPointer(DataSectionReference ref) {
-        return emitLoadPointer(ref, false);
-    }
-
-    @Override
-    public Register emitLoadNarrowPointer(DataSectionReference ref) {
-        return emitLoadPointer(ref, true);
-    }
-
-    @Override
-    public Register emitLoadPointer(Register b, int offset) {
-        Register ret = newRegister();
-        emitModRMMemory(true, 0x8B, ret.encoding, b.encoding, offset); // MOV r64,r/m64
-        return ret;
-    }
-
-    @Override
-    public StackSlot emitIntToStack(Register a) {
-        StackSlot ret = newStackSlot(LIRKind.value(AMD64Kind.DWORD));
-        emitModRMMemory(false, 0x89, a.encoding, AMD64.rbp.encoding, ret.getRawOffset() + 16); // MOV r/m32,r32
-        return ret;
-    }
-
-    @Override
-    public StackSlot emitLongToStack(Register a) {
-        StackSlot ret = newStackSlot(LIRKind.value(AMD64Kind.QWORD));
-        emitModRMMemory(true, 0x89, a.encoding, AMD64.rbp.encoding, ret.getRawOffset() + 16); // MOV r/m64,r64
-        return ret;
-    }
-
-    @Override
-    public StackSlot emitFloatToStack(Register a) {
-        StackSlot ret = newStackSlot(LIRKind.value(AMD64Kind.SINGLE));
-        emitREX(false, a.encoding, 0, 0);
-        code.emitByte(0xF3);
-        code.emitByte(0x0F);
-        code.emitByte(0x11);                               // MOVSS xmm2/m32, xmm1
-        code.emitByte(0x85 | ((a.encoding & 0x7) << 3));   // [rbp+offset]
-        code.emitInt(ret.getRawOffset() + 16);
-        return ret;
-    }
-
-    @Override
-    public StackSlot emitPointerToStack(Register a) {
-        StackSlot ret = newStackSlot(LIRKind.reference(AMD64Kind.QWORD));
-        emitModRMMemory(true, 0x89, a.encoding, AMD64.rbp.encoding, ret.getRawOffset() + 16); // MOV r/m64,r64
-        return ret;
-    }
-
-    @Override
-    public StackSlot emitNarrowPointerToStack(Register a) {
-        StackSlot ret = newStackSlot(LIRKind.reference(AMD64Kind.DWORD));
-        emitModRMMemory(false, 0x89, a.encoding, AMD64.rbp.encoding, ret.getRawOffset() + 16); // MOV r/m32,r32
-        return ret;
-    }
-
-    @Override
-    public Register emitUncompressPointer(Register compressed, long base, int shift) {
-        if (shift > 0) {
-            emitModRMReg(true, 0xC1, 4, compressed.encoding);
-            code.emitByte(shift);
-        }
-        if (base == 0) {
-            return compressed;
-        } else {
-            Register tmp = emitLoadLong(base);
-            emitModRMReg(true, 0x03, tmp.encoding, compressed.encoding);
-            return tmp;
-        }
-    }
-
-    @Override
-    public Register emitIntAdd(Register a, Register b) {
-        emitModRMReg(false, 0x03, a.encoding, b.encoding);
-        return a;
-    }
-
-    private void emitMove(boolean w, Register to, Register from) {
-        if (to != from) {
-            emitModRMReg(w, 0x8B, to.encoding, from.encoding);
-        }
-    }
-
-    @Override
-    public void emitIntRet(Register a) {
-        emitMove(false, AMD64.rax, a);             // MOV eax, ...
-        emitMove(true, AMD64.rsp, AMD64.rbp);      // MOV rsp, rbp
-        code.emitByte(0x58 | AMD64.rbp.encoding);  // POP rbp
-        code.emitByte(0xC3);                       // RET
-    }
-
-    @Override
-    public void emitPointerRet(Register a) {
-        emitMove(true, AMD64.rax, a);              // MOV rax, ...
-        emitMove(true, AMD64.rsp, AMD64.rbp);      // MOV rsp, rbp
-        code.emitByte(0x58 | AMD64.rbp.encoding);  // POP rbp
-        code.emitByte(0xC3);                       // RET
-    }
-
-    @Override
-    public void emitTrap(DebugInfo info) {
-        recordImplicitException(info);
-        // MOV rax, [0]
-        code.emitByte(0x8B);
-        code.emitByte(0x04);
-        code.emitByte(0x25);
-        code.emitInt(0);
-    }
-}
--- a/hotspot/test/compiler/jvmci/code/sparc/SPARCTestAssembler.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,288 +0,0 @@
-/*
- * Copyright (c) 2015, 2016, 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.
- */
-
-package compiler.jvmci.code.sparc;
-
-import jdk.vm.ci.code.CodeCacheProvider;
-import jdk.vm.ci.code.DebugInfo;
-import jdk.vm.ci.code.Register;
-import jdk.vm.ci.code.StackSlot;
-import jdk.vm.ci.code.site.ConstantReference;
-import jdk.vm.ci.code.site.DataSectionReference;
-import jdk.vm.ci.hotspot.HotSpotCallingConventionType;
-import jdk.vm.ci.hotspot.HotSpotCompiledCode;
-import jdk.vm.ci.hotspot.HotSpotConstant;
-import jdk.vm.ci.hotspot.HotSpotForeignCallTarget;
-import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
-import jdk.vm.ci.hotspot.HotSpotVMConfig;
-import jdk.vm.ci.meta.JavaKind;
-import jdk.vm.ci.meta.LIRKind;
-import jdk.vm.ci.meta.VMConstant;
-import jdk.vm.ci.sparc.SPARC;
-import jdk.vm.ci.sparc.SPARCKind;
-
-import compiler.jvmci.code.TestAssembler;
-
-public class SPARCTestAssembler extends TestAssembler {
-
-    private static final int MASK13 = (1 << 13) - 1;
-
-    public SPARCTestAssembler(CodeCacheProvider codeCache) {
-        super(codeCache, 0, 16, SPARCKind.WORD, SPARC.l0, SPARC.l1, SPARC.l2, SPARC.l3, SPARC.l4, SPARC.l5, SPARC.l6, SPARC.l7);
-    }
-
-    private void emitOp2(Register rd, int op2, int imm22) {
-        code.emitInt((0b00 << 30) | (rd.encoding << 25) | (op2 << 22) | imm22);
-    }
-
-    private void emitOp3(int op, Register rd, int op3, Register rs1, Register rs2) {
-        code.emitInt((op << 30) | (rd.encoding << 25) | (op3 << 19) | (rs1.encoding << 14) | rs2.encoding);
-    }
-
-    private void emitOp3(int op, Register rd, int op3, Register rs1, int simm13) {
-        code.emitInt((op << 30) | (rd.encoding << 25) | (op3 << 19) | (rs1.encoding << 14) | (1 << 13) | (simm13 & MASK13));
-    }
-
-    private void emitNop() {
-        code.emitInt(1 << 24);
-    }
-
-    @Override
-    public void emitPrologue() {
-        emitOp3(0b10, SPARC.sp, 0b111100, SPARC.sp, -SPARC.REGISTER_SAFE_AREA_SIZE); // SAVE sp, -128, sp
-        setDeoptRescueSlot(newStackSlot(LIRKind.value(SPARCKind.XWORD)));
-    }
-
-    @Override
-    public void emitEpilogue() {
-        HotSpotVMConfig config = HotSpotVMConfig.config();
-        recordMark(config.MARKID_DEOPT_HANDLER_ENTRY);
-        recordCall(new HotSpotForeignCallTarget(config.handleDeoptStub), 4, true, null);
-        code.emitInt(1 << 30); // CALL
-    }
-
-    @Override
-    public HotSpotCompiledCode finish(HotSpotResolvedJavaMethod method) {
-        frameSize += SPARC.REGISTER_SAFE_AREA_SIZE;
-        return super.finish(method);
-    }
-
-    @Override
-    public void emitGrowStack(int size) {
-        emitOp3(0b10, SPARC.sp, 0b000100, SPARC.sp, size); // SUB sp, size, sp
-    }
-
-    @Override
-    public Register emitIntArg0() {
-        return codeCache.getRegisterConfig().getCallingConventionRegisters(HotSpotCallingConventionType.JavaCallee, JavaKind.Int)[0];
-    }
-
-    @Override
-    public Register emitIntArg1() {
-        return codeCache.getRegisterConfig().getCallingConventionRegisters(HotSpotCallingConventionType.JavaCallee, JavaKind.Int)[1];
-    }
-
-    @Override
-    public Register emitLoadInt(int c) {
-        Register ret = newRegister();
-        int hi = c >>> 10;
-        int lo = c & ((1 << 10) - 1);
-        if (hi == 0) {
-            emitOp3(0b10, ret, 0b000010, SPARC.g0, lo); // OR g0, lo, ret
-        } else {
-            emitOp2(ret, 0b100, hi);                    // SETHI hi, ret
-            if (lo != 0) {
-                emitOp3(0b10, ret, 0b000010, ret, lo);  // OR ret, lo, ret
-            }
-        }
-        return ret;
-    }
-
-    @Override
-    public Register emitLoadLong(long c) {
-        if ((c & 0xFFFF_FFFFL) == c) {
-            return emitLoadInt((int) c);
-        } else {
-            DataSectionReference ref = new DataSectionReference();
-            data.align(8);
-            ref.setOffset(data.position());
-            data.emitLong(c);
-            return emitLoadPointer(ref);
-        }
-    }
-
-    private void emitPatchableSethi(Register ret, boolean wide) {
-        int startPos = code.position();
-        emitOp2(ret, 0b100, 0);              // SETHI 0, ret
-        if (wide) {
-            // pad for later patching
-            while (code.position() < (startPos + 28)) {
-                emitNop();
-            }
-        }
-    }
-
-    @Override
-    public Register emitLoadFloat(float c) {
-        DataSectionReference ref = new DataSectionReference();
-        data.align(4);
-        ref.setOffset(data.position());
-        data.emitFloat(c);
-
-        Register ptr = newRegister();
-        recordDataPatchInCode(ref);
-        emitPatchableSethi(ptr, true);
-        emitOp3(0b11, SPARC.f0, 0b100000, ptr, 0); // LDF [ptr+0], f0
-        return SPARC.f0;
-    }
-
-    @Override
-    public Register emitLoadPointer(HotSpotConstant c) {
-        Register ret = newRegister();
-        recordDataPatchInCode(new ConstantReference((VMConstant) c));
-
-        emitPatchableSethi(ret, !c.isCompressed());
-        emitOp3(0b10, ret, 0b000010, ret, 0); // OR ret, 0, ret
-
-        return ret;
-    }
-
-    @Override
-    public Register emitLoadPointer(DataSectionReference ref) {
-        Register ret = newRegister();
-        recordDataPatchInCode(ref);
-        emitPatchableSethi(ret, true);
-        emitOp3(0b11, ret, 0b001011, ret, 0); // LDX [ret+0], ret
-        return ret;
-    }
-
-    @Override
-    public Register emitLoadNarrowPointer(DataSectionReference ref) {
-        Register ret = newRegister();
-        recordDataPatchInCode(ref);
-        emitPatchableSethi(ret, true);
-        emitOp3(0b11, ret, 0b000000, ret, 0); // LDUW [ret+0], ret
-        return ret;
-    }
-
-    @Override
-    public Register emitLoadPointer(Register b, int offset) {
-        Register ret = newRegister();
-        emitOp3(0b11, ret, 0b001011, b, offset); // LDX [b+offset], ret
-        return ret;
-    }
-
-    @Override
-    public StackSlot emitIntToStack(Register a) {
-        StackSlot ret = newStackSlot(LIRKind.value(SPARCKind.WORD));
-        emitOp3(0b11, a, 0b000100, SPARC.fp, ret.getRawOffset() + SPARC.STACK_BIAS); // STW a, [fp+offset]
-        return ret;
-    }
-
-    @Override
-    public StackSlot emitLongToStack(Register a) {
-        StackSlot ret = newStackSlot(LIRKind.value(SPARCKind.XWORD));
-        emitOp3(0b11, a, 0b001110, SPARC.fp, ret.getRawOffset() + SPARC.STACK_BIAS); // STX a, [fp+offset]
-        return ret;
-    }
-
-    @Override
-    public StackSlot emitFloatToStack(Register a) {
-        StackSlot ret = newStackSlot(LIRKind.value(SPARCKind.SINGLE));
-        emitOp3(0b11, a, 0b100100, SPARC.fp, ret.getRawOffset() + SPARC.STACK_BIAS); // STF a, [fp+offset]
-        return ret;
-    }
-
-    @Override
-    public StackSlot emitPointerToStack(Register a) {
-        StackSlot ret = newStackSlot(LIRKind.reference(SPARCKind.XWORD));
-        emitOp3(0b11, a, 0b001110, SPARC.fp, ret.getRawOffset() + SPARC.STACK_BIAS); // STX a, [fp+offset]
-        return ret;
-    }
-
-    @Override
-    public StackSlot emitNarrowPointerToStack(Register a) {
-        StackSlot ret = newStackSlot(LIRKind.reference(SPARCKind.WORD));
-        emitOp3(0b11, a, 0b000100, SPARC.fp, ret.getRawOffset() + SPARC.STACK_BIAS); // STW a, [fp+offset]
-        return ret;
-    }
-
-    @Override
-    public Register emitUncompressPointer(Register compressed, long base, int shift) {
-        Register ret;
-        if (shift > 0) {
-            ret = newRegister();
-            emitOp3(0b10, ret, 0b100101, compressed, shift); // SLL compressed, shift, ret
-        } else {
-            ret = compressed;
-        }
-        if (base == 0) {
-            return ret;
-        } else {
-            Register b = emitLoadLong(base);
-            emitOp3(0b10, b, 0b00000, ret, b); // ADD b, ret, b
-            return b;
-        }
-    }
-
-    @Override
-    public Register emitIntAdd(Register a, Register b) {
-        Register ret = newRegister();
-        emitOp3(0b10, ret, 0b00000, a, b); // ADD a, b, ret
-        return ret;
-    }
-
-    private void emitMove(Register to, Register from) {
-        if (to != from) {
-            emitOp3(0b10, to, 0b000010, from, SPARC.g0); // OR from, g0, to
-        }
-    }
-
-    @Override
-    public void emitIntRet(Register a) {
-        emitPointerRet(a);
-    }
-
-    @Override
-    public void emitPointerRet(Register a) {
-        emitMove(SPARC.i0, a);
-        emitOp3(0b10, SPARC.g0, 0b111000, SPARC.i7, 8);        // JMPL [i7+8], g0
-        emitOp3(0b10, SPARC.g0, 0b111101, SPARC.g0, SPARC.g0); // RESTORE g0, g0, g0
-    }
-
-    @Override
-    public void emitTrap(DebugInfo info) {
-        recordImplicitException(info);
-        emitOp3(0b11, SPARC.g0, 0b001011, SPARC.g0, 0); // LDX [g0+0], g0
-    }
-
-    @Override
-    public DataSectionReference emitDataItem(HotSpotConstant c) {
-        if (c.isCompressed()) {
-            data.align(4);
-        } else {
-            data.align(8);
-        }
-        return super.emitDataItem(c);
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/CodeInstallationTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2015, 2016, 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.
+ */
+package jdk.vm.ci.code.test;
+
+import java.lang.reflect.Method;
+
+import org.junit.Assert;
+
+import jdk.vm.ci.amd64.AMD64;
+import jdk.vm.ci.code.Architecture;
+import jdk.vm.ci.code.CodeCacheProvider;
+import jdk.vm.ci.code.InstalledCode;
+import jdk.vm.ci.code.TargetDescription;
+import jdk.vm.ci.code.test.amd64.AMD64TestAssembler;
+import jdk.vm.ci.code.test.sparc.SPARCTestAssembler;
+import jdk.vm.ci.hotspot.HotSpotCompiledCode;
+import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
+import jdk.vm.ci.meta.ConstantReflectionProvider;
+import jdk.vm.ci.meta.MetaAccessProvider;
+import jdk.vm.ci.runtime.JVMCI;
+import jdk.vm.ci.runtime.JVMCIBackend;
+import jdk.vm.ci.sparc.SPARC;
+
+/**
+ * Base class for code installation tests.
+ */
+public class CodeInstallationTest {
+
+    protected final MetaAccessProvider metaAccess;
+    protected final CodeCacheProvider codeCache;
+    protected final TargetDescription target;
+    protected final ConstantReflectionProvider constantReflection;
+
+    public CodeInstallationTest() {
+        JVMCIBackend backend = JVMCI.getRuntime().getHostJVMCIBackend();
+        metaAccess = backend.getMetaAccess();
+        codeCache = backend.getCodeCache();
+        target = backend.getTarget();
+        constantReflection = backend.getConstantReflection();
+    }
+
+    protected interface TestCompiler {
+
+        void compile(TestAssembler asm);
+    }
+
+    private TestAssembler createAssembler() {
+        Architecture arch = codeCache.getTarget().arch;
+        if (arch instanceof AMD64) {
+            return new AMD64TestAssembler(codeCache);
+        } else if (arch instanceof SPARC) {
+            return new SPARCTestAssembler(codeCache);
+        } else {
+            Assert.fail("unsupported architecture");
+            return null;
+        }
+    }
+
+    protected Method getMethod(String name, Class<?>... args) {
+        try {
+            return getClass().getMethod(name, args);
+        } catch (NoSuchMethodException e) {
+            Assert.fail("method not found");
+            return null;
+        }
+    }
+
+    protected void test(TestCompiler compiler, Method method, Object... args) {
+        HotSpotResolvedJavaMethod resolvedMethod = (HotSpotResolvedJavaMethod) metaAccess.lookupJavaMethod(method);
+        TestAssembler asm = createAssembler();
+
+        asm.emitPrologue();
+        compiler.compile(asm);
+        asm.emitEpilogue();
+
+        HotSpotCompiledCode code = asm.finish(resolvedMethod);
+        InstalledCode installed = codeCache.addCode(resolvedMethod, code, null, null);
+
+        try {
+            Object expected = method.invoke(null, args);
+            Object actual = installed.executeVarargs(args);
+            Assert.assertEquals(expected, actual);
+        } catch (Exception e) {
+            e.printStackTrace();
+            Assert.fail(e.toString());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,189 @@
+/*
+ * Copyright (c) 2015, 2016, 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.
+ */
+
+/**
+ * @test
+ * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
+ * @library /
+ * @modules jdk.vm.ci/jdk.vm.ci.hotspot
+ *          jdk.vm.ci/jdk.vm.ci.meta
+ *          jdk.vm.ci/jdk.vm.ci.code
+ *          jdk.vm.ci/jdk.vm.ci.code.site
+ *          jdk.vm.ci/jdk.vm.ci.runtime
+ *          jdk.vm.ci/jdk.vm.ci.amd64
+ *          jdk.vm.ci/jdk.vm.ci.sparc
+ * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java
+ * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.DataPatchTest
+ */
+
+package jdk.vm.ci.code.test;
+
+import jdk.vm.ci.code.Register;
+import jdk.vm.ci.code.site.DataSectionReference;
+import jdk.vm.ci.hotspot.HotSpotConstant;
+import jdk.vm.ci.hotspot.HotSpotMetaAccessProvider;
+import jdk.vm.ci.hotspot.HotSpotSymbol;
+import jdk.vm.ci.hotspot.HotSpotVMConfig;
+import jdk.vm.ci.meta.ResolvedJavaType;
+
+import org.junit.Assume;
+import org.junit.Test;
+
+/**
+ * Test code installation with data patches.
+ */
+public class DataPatchTest extends CodeInstallationTest {
+
+    public static Class<?> getConstClass() {
+        return DataPatchTest.class;
+    }
+
+    private void test(TestCompiler compiler) {
+        test(compiler, getMethod("getConstClass"));
+    }
+
+    @Test
+    public void testInlineObject() {
+        test(asm -> {
+            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
+            HotSpotConstant c = (HotSpotConstant) constantReflection.asJavaClass(type);
+            Register ret = asm.emitLoadPointer(c);
+            asm.emitPointerRet(ret);
+        });
+    }
+
+    @Test
+    public void testInlineNarrowObject() {
+        Assume.assumeTrue(HotSpotVMConfig.config().useCompressedOops);
+        test(asm -> {
+            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
+            HotSpotConstant c = (HotSpotConstant) constantReflection.asJavaClass(type);
+            Register compressed = asm.emitLoadPointer((HotSpotConstant) c.compress());
+            Register ret = asm.emitUncompressPointer(compressed, HotSpotVMConfig.config().narrowOopBase, HotSpotVMConfig.config().narrowOopShift);
+            asm.emitPointerRet(ret);
+        });
+    }
+
+    @Test
+    public void testDataSectionReference() {
+        test(asm -> {
+            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
+            HotSpotConstant c = (HotSpotConstant) constantReflection.asJavaClass(type);
+            DataSectionReference ref = asm.emitDataItem(c);
+            Register ret = asm.emitLoadPointer(ref);
+            asm.emitPointerRet(ret);
+        });
+    }
+
+    @Test
+    public void testNarrowDataSectionReference() {
+        Assume.assumeTrue(HotSpotVMConfig.config().useCompressedOops);
+        test(asm -> {
+            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
+            HotSpotConstant c = (HotSpotConstant) constantReflection.asJavaClass(type);
+            HotSpotConstant cCompressed = (HotSpotConstant) c.compress();
+            DataSectionReference ref = asm.emitDataItem(cCompressed);
+            Register compressed = asm.emitLoadNarrowPointer(ref);
+            Register ret = asm.emitUncompressPointer(compressed, HotSpotVMConfig.config().narrowOopBase, HotSpotVMConfig.config().narrowOopShift);
+            asm.emitPointerRet(ret);
+        });
+    }
+
+    @Test
+    public void testInlineMetadata() {
+        test(asm -> {
+            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
+            Register klass = asm.emitLoadPointer((HotSpotConstant) constantReflection.asObjectHub(type));
+            Register ret = asm.emitLoadPointer(klass, HotSpotVMConfig.config().classMirrorOffset);
+            asm.emitPointerRet(ret);
+        });
+    }
+
+    @Test
+    public void testInlineNarrowMetadata() {
+        Assume.assumeTrue(HotSpotVMConfig.config().useCompressedClassPointers);
+        test(asm -> {
+            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
+            HotSpotConstant hub = (HotSpotConstant) constantReflection.asObjectHub(type);
+            Register narrowKlass = asm.emitLoadPointer((HotSpotConstant) hub.compress());
+            Register klass = asm.emitUncompressPointer(narrowKlass, HotSpotVMConfig.config().narrowKlassBase, HotSpotVMConfig.config().narrowKlassShift);
+            Register ret = asm.emitLoadPointer(klass, HotSpotVMConfig.config().classMirrorOffset);
+            asm.emitPointerRet(ret);
+        });
+    }
+
+    @Test
+    public void testMetadataInDataSection() {
+        test(asm -> {
+            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
+            HotSpotConstant hub = (HotSpotConstant) constantReflection.asObjectHub(type);
+            DataSectionReference ref = asm.emitDataItem(hub);
+            Register klass = asm.emitLoadPointer(ref);
+            Register ret = asm.emitLoadPointer(klass, HotSpotVMConfig.config().classMirrorOffset);
+            asm.emitPointerRet(ret);
+        });
+    }
+
+    @Test
+    public void testNarrowMetadataInDataSection() {
+        Assume.assumeTrue(HotSpotVMConfig.config().useCompressedClassPointers);
+        test(asm -> {
+            ResolvedJavaType type = metaAccess.lookupJavaType(getConstClass());
+            HotSpotConstant hub = (HotSpotConstant) constantReflection.asObjectHub(type);
+            HotSpotConstant narrowHub = (HotSpotConstant) hub.compress();
+            DataSectionReference ref = asm.emitDataItem(narrowHub);
+            Register narrowKlass = asm.emitLoadNarrowPointer(ref);
+            Register klass = asm.emitUncompressPointer(narrowKlass, HotSpotVMConfig.config().narrowKlassBase, HotSpotVMConfig.config().narrowKlassShift);
+            Register ret = asm.emitLoadPointer(klass, HotSpotVMConfig.config().classMirrorOffset);
+            asm.emitPointerRet(ret);
+        });
+    }
+
+    public static long getConstSymbol(HotSpotMetaAccessProvider meta) {
+        HotSpotSymbol symbol = meta.lookupSymbol("java/lang/Object");
+        return symbol.getMetaspacePointer();
+    }
+
+    private void testSymbol(TestCompiler compiler) {
+        test(compiler, getMethod("getConstSymbol", HotSpotMetaAccessProvider.class), (HotSpotMetaAccessProvider) metaAccess);
+    }
+
+    @Test
+    public void testInlineSymbol() {
+        testSymbol(asm -> {
+            HotSpotSymbol symbol = ((HotSpotMetaAccessProvider) metaAccess).lookupSymbol("java/lang/Object");
+            Register ret = asm.emitLoadPointer((HotSpotConstant) symbol.asConstant());
+            asm.emitPointerRet(ret);
+        });
+    }
+
+    @Test
+    public void testSymbolInDataSection() {
+        testSymbol(asm -> {
+            HotSpotSymbol symbol = ((HotSpotMetaAccessProvider) metaAccess).lookupSymbol("java/lang/Object");
+            DataSectionReference ref = asm.emitDataItem((HotSpotConstant) symbol.asConstant());
+            Register ret = asm.emitLoadPointer(ref);
+            asm.emitPointerRet(ret);
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DebugInfoTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2015, 2016, 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.
+ */
+package jdk.vm.ci.code.test;
+
+import java.lang.reflect.Method;
+
+import jdk.vm.ci.code.BytecodeFrame;
+import jdk.vm.ci.code.DebugInfo;
+import jdk.vm.ci.code.Location;
+import jdk.vm.ci.code.VirtualObject;
+import jdk.vm.ci.hotspot.HotSpotReferenceMap;
+import jdk.vm.ci.meta.JavaKind;
+import jdk.vm.ci.meta.JavaValue;
+import jdk.vm.ci.meta.ResolvedJavaMethod;
+
+/**
+ * Test code installation with debug information.
+ */
+public class DebugInfoTest extends CodeInstallationTest {
+
+    protected interface DebugInfoCompiler {
+
+        VirtualObject[] compile(TestAssembler asm, JavaValue[] frameValues);
+    }
+
+    protected void test(DebugInfoCompiler compiler, Method method, int bci, JavaKind... slotKinds) {
+        ResolvedJavaMethod resolvedMethod = metaAccess.lookupJavaMethod(method);
+
+        int numLocals = resolvedMethod.getMaxLocals();
+        int numStack = slotKinds.length - numLocals;
+        JavaValue[] values = new JavaValue[slotKinds.length];
+        test(asm -> {
+            VirtualObject[] vobjs = compiler.compile(asm, values);
+
+            BytecodeFrame frame = new BytecodeFrame(null, resolvedMethod, bci, false, false, values, slotKinds, numLocals, numStack, 0);
+            DebugInfo info = new DebugInfo(frame, vobjs);
+            info.setReferenceMap(new HotSpotReferenceMap(new Location[0], new Location[0], new int[0], 8));
+
+            asm.emitTrap(info);
+        }, method);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+/**
+ * @test
+ * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
+ * @modules jdk.vm.ci/jdk.vm.ci.hotspot
+ *          jdk.vm.ci/jdk.vm.ci.code
+ *          jdk.vm.ci/jdk.vm.ci.code.site
+ *          jdk.vm.ci/jdk.vm.ci.meta
+ *          jdk.vm.ci/jdk.vm.ci.runtime
+ *          jdk.vm.ci/jdk.vm.ci.common
+ *          jdk.vm.ci/jdk.vm.ci.amd64
+ *          jdk.vm.ci/jdk.vm.ci.sparc
+ * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java
+ * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.InterpreterFrameSizeTest
+ */
+
+package jdk.vm.ci.code.test;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import jdk.vm.ci.code.BytecodeFrame;
+import jdk.vm.ci.hotspot.HotSpotCodeCacheProvider;
+import jdk.vm.ci.meta.JavaKind;
+import jdk.vm.ci.meta.JavaValue;
+import jdk.vm.ci.meta.ResolvedJavaMethod;
+
+public class InterpreterFrameSizeTest extends CodeInstallationTest {
+
+    HotSpotCodeCacheProvider hotspotCodeCache() {
+        return (HotSpotCodeCacheProvider) codeCache;
+    }
+
+    @Test
+    public void testNull() {
+        try {
+            hotspotCodeCache().interpreterFrameSize(null);
+        } catch (NullPointerException npe) {
+            // Threw NPE as expected.
+            return;
+        }
+        Assert.fail("expected NullPointerException");
+    }
+
+    @Test
+    public void test() {
+        ResolvedJavaMethod resolvedMethod = metaAccess.lookupJavaMethod(getMethod("testNull"));
+
+        int bci = 0;
+        int numLocals = resolvedMethod.getMaxLocals();
+        int numStack = 0;
+        JavaValue[] values = new JavaValue[numLocals];
+        JavaKind[] slotKinds = new JavaKind[numLocals];
+        BytecodeFrame frame = new BytecodeFrame(null, resolvedMethod, bci, false, false, values, slotKinds, numLocals, numStack, 0);
+        int size = hotspotCodeCache().interpreterFrameSize(frame);
+        if (size <= 0) {
+            Assert.fail("expected non-zero result");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2015, 2016, 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.
+ */
+
+/**
+ * @test
+ * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
+ * @library /
+ * @modules jdk.vm.ci/jdk.vm.ci.hotspot
+ *          jdk.vm.ci/jdk.vm.ci.meta
+ *          jdk.vm.ci/jdk.vm.ci.code
+ *          jdk.vm.ci/jdk.vm.ci.code.site
+ *          jdk.vm.ci/jdk.vm.ci.runtime
+ *          jdk.vm.ci/jdk.vm.ci.amd64
+ *          jdk.vm.ci/jdk.vm.ci.sparc
+ * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java
+ * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.SimpleCodeInstallationTest
+ */
+
+package jdk.vm.ci.code.test;
+
+import org.junit.Test;
+
+import jdk.vm.ci.code.Register;
+
+/**
+ * Test simple code installation.
+ */
+public class SimpleCodeInstallationTest extends CodeInstallationTest {
+
+    public static int add(int a, int b) {
+        return a + b;
+    }
+
+    private static void compileAdd(TestAssembler asm) {
+        Register arg0 = asm.emitIntArg0();
+        Register arg1 = asm.emitIntArg1();
+        Register ret = asm.emitIntAdd(arg0, arg1);
+        asm.emitIntRet(ret);
+    }
+
+    @Test
+    public void test() {
+        test(SimpleCodeInstallationTest::compileAdd, getMethod("add", int.class, int.class), 5, 7);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,283 @@
+/*
+ * Copyright (c) 2015, 2016, 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.
+ */
+
+/**
+ * @test
+ * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
+ * @library /
+ * @modules jdk.vm.ci/jdk.vm.ci.hotspot
+ *          jdk.vm.ci/jdk.vm.ci.meta
+ *          jdk.vm.ci/jdk.vm.ci.code
+ *          jdk.vm.ci/jdk.vm.ci.code.site
+ *          jdk.vm.ci/jdk.vm.ci.runtime
+ *          jdk.vm.ci/jdk.vm.ci.amd64
+ *          jdk.vm.ci/jdk.vm.ci.sparc
+ * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java
+ * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.SimpleDebugInfoTest
+ */
+
+package jdk.vm.ci.code.test;
+
+import org.junit.Assume;
+import org.junit.Test;
+
+import jdk.vm.ci.code.Register;
+import jdk.vm.ci.hotspot.HotSpotConstant;
+import jdk.vm.ci.hotspot.HotSpotVMConfig;
+import jdk.vm.ci.meta.JavaConstant;
+import jdk.vm.ci.meta.JavaKind;
+import jdk.vm.ci.meta.ResolvedJavaType;
+import jdk.vm.ci.meta.Value;
+
+public class SimpleDebugInfoTest extends DebugInfoTest {
+
+    public static int intOnStack() {
+        return 42;
+    }
+
+    private void testIntOnStack(DebugInfoCompiler compiler) {
+        test(compiler, getMethod("intOnStack"), 2, JavaKind.Int);
+    }
+
+    public static int intInLocal() {
+        int local = 42;
+        return local;
+    }
+
+    public void testIntInLocal(DebugInfoCompiler compiler) {
+        test(compiler, getMethod("intInLocal"), 3, JavaKind.Int);
+    }
+
+    @Test
+    public void testConstInt() {
+        DebugInfoCompiler compiler = (asm, values) -> {
+            values[0] = JavaConstant.forInt(42);
+            return null;
+        };
+        testIntOnStack(compiler);
+        testIntInLocal(compiler);
+    }
+
+    @Test
+    public void testRegInt() {
+        DebugInfoCompiler compiler = (asm, values) -> {
+            Register reg = asm.emitLoadInt(42);
+            values[0] = reg.asValue(target.getLIRKind(JavaKind.Int));
+            return null;
+        };
+        testIntOnStack(compiler);
+        testIntInLocal(compiler);
+    }
+
+    @Test
+    public void testStackInt() {
+        DebugInfoCompiler compiler = (asm, values) -> {
+            Register reg = asm.emitLoadInt(42);
+            values[0] = asm.emitIntToStack(reg);
+            return null;
+        };
+        testIntOnStack(compiler);
+        testIntInLocal(compiler);
+    }
+
+    public static float floatOnStack() {
+        return 42.0f;
+    }
+
+    private void testFloatOnStack(DebugInfoCompiler compiler) {
+        test(compiler, getMethod("floatOnStack"), 2, JavaKind.Float);
+    }
+
+    public static float floatInLocal() {
+        float local = 42.0f;
+        return local;
+    }
+
+    private void testFloatInLocal(DebugInfoCompiler compiler) {
+        test(compiler, getMethod("floatInLocal"), 3, JavaKind.Float);
+    }
+
+    @Test
+    public void testConstFloat() {
+        DebugInfoCompiler compiler = (asm, values) -> {
+            values[0] = JavaConstant.forFloat(42.0f);
+            return null;
+        };
+        testFloatOnStack(compiler);
+        testFloatInLocal(compiler);
+    }
+
+    @Test
+    public void testRegFloat() {
+        DebugInfoCompiler compiler = (asm, values) -> {
+            Register reg = asm.emitLoadFloat(42.0f);
+            values[0] = reg.asValue(target.getLIRKind(JavaKind.Float));
+            return null;
+        };
+        testFloatOnStack(compiler);
+        testFloatInLocal(compiler);
+    }
+
+    @Test
+    public void testStackFloat() {
+        DebugInfoCompiler compiler = (asm, values) -> {
+            Register reg = asm.emitLoadFloat(42.0f);
+            values[0] = asm.emitFloatToStack(reg);
+            return null;
+        };
+        testFloatOnStack(compiler);
+        testFloatInLocal(compiler);
+    }
+
+    public static long longOnStack() {
+        return 42;
+    }
+
+    private void testLongOnStack(DebugInfoCompiler compiler) {
+        test(compiler, getMethod("longOnStack"), 3, JavaKind.Long, JavaKind.Illegal);
+    }
+
+    public static long longInLocal() {
+        long local = 42;
+        return local;
+    }
+
+    private void testLongInLocal(DebugInfoCompiler compiler) {
+        test(compiler, getMethod("longInLocal"), 4, JavaKind.Long, JavaKind.Illegal);
+    }
+
+    @Test
+    public void testConstLong() {
+        DebugInfoCompiler compiler = (asm, values) -> {
+            values[0] = JavaConstant.forLong(42);
+            values[1] = Value.ILLEGAL;
+            return null;
+        };
+        testLongOnStack(compiler);
+        testLongInLocal(compiler);
+    }
+
+    @Test
+    public void testRegLong() {
+        DebugInfoCompiler compiler = (asm, values) -> {
+            Register reg = asm.emitLoadLong(42);
+            values[0] = reg.asValue(target.getLIRKind(JavaKind.Long));
+            values[1] = Value.ILLEGAL;
+            return null;
+        };
+        testLongOnStack(compiler);
+        testLongInLocal(compiler);
+    }
+
+    @Test
+    public void testStackLong() {
+        DebugInfoCompiler compiler = (asm, values) -> {
+            Register reg = asm.emitLoadLong(42);
+            values[0] = asm.emitLongToStack(reg);
+            values[1] = Value.ILLEGAL;
+            return null;
+        };
+        testLongOnStack(compiler);
+        testLongInLocal(compiler);
+    }
+
+    public static Class<?> objectOnStack() {
+        return SimpleDebugInfoTest.class;
+    }
+
+    private void testObjectOnStack(DebugInfoCompiler compiler) {
+        test(compiler, getMethod("objectOnStack"), 2, JavaKind.Object);
+    }
+
+    public static Class<?> objectInLocal() {
+        Class<?> local = SimpleDebugInfoTest.class;
+        return local;
+    }
+
+    private void testObjectInLocal(DebugInfoCompiler compiler) {
+        test(compiler, getMethod("objectInLocal"), 3, JavaKind.Object);
+    }
+
+    @Test
+    public void testConstObject() {
+        ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
+        DebugInfoCompiler compiler = (asm, values) -> {
+            values[0] = constantReflection.asJavaClass(type);
+            return null;
+        };
+        testObjectOnStack(compiler);
+        testObjectInLocal(compiler);
+    }
+
+    @Test
+    public void testRegObject() {
+        ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
+        DebugInfoCompiler compiler = (asm, values) -> {
+            Register reg = asm.emitLoadPointer((HotSpotConstant) constantReflection.asJavaClass(type));
+            values[0] = reg.asValue(target.getLIRKind(JavaKind.Object));
+            return null;
+        };
+        testObjectOnStack(compiler);
+        testObjectInLocal(compiler);
+    }
+
+    @Test
+    public void testStackObject() {
+        ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
+        DebugInfoCompiler compiler = (asm, values) -> {
+            Register reg = asm.emitLoadPointer((HotSpotConstant) constantReflection.asJavaClass(type));
+            values[0] = asm.emitPointerToStack(reg);
+            return null;
+        };
+        testObjectOnStack(compiler);
+        testObjectInLocal(compiler);
+    }
+
+    @Test
+    public void testRegNarrowObject() {
+        Assume.assumeTrue(HotSpotVMConfig.config().useCompressedOops);
+        ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
+        DebugInfoCompiler compiler = (asm, values) -> {
+            HotSpotConstant wide = (HotSpotConstant) constantReflection.asJavaClass(type);
+            Register reg = asm.emitLoadPointer((HotSpotConstant) wide.compress());
+            values[0] = reg.asValue(asm.narrowOopKind);
+            return null;
+        };
+        testObjectOnStack(compiler);
+        testObjectInLocal(compiler);
+    }
+
+    @Test
+    public void testStackNarrowObject() {
+        Assume.assumeTrue(HotSpotVMConfig.config().useCompressedOops);
+        ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
+        DebugInfoCompiler compiler = (asm, values) -> {
+            HotSpotConstant wide = (HotSpotConstant) constantReflection.asJavaClass(type);
+            Register reg = asm.emitLoadPointer((HotSpotConstant) wide.compress());
+            values[0] = asm.emitNarrowPointerToStack(reg);
+            return null;
+        };
+        testObjectOnStack(compiler);
+        testObjectInLocal(compiler);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/TestAssembler.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,333 @@
+/*
+ * Copyright (c) 2015, 2016, 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.
+ */
+
+package jdk.vm.ci.code.test;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import jdk.vm.ci.code.CodeCacheProvider;
+import jdk.vm.ci.code.DebugInfo;
+import jdk.vm.ci.code.Register;
+import jdk.vm.ci.code.StackSlot;
+import jdk.vm.ci.code.site.Call;
+import jdk.vm.ci.code.site.ConstantReference;
+import jdk.vm.ci.code.site.DataPatch;
+import jdk.vm.ci.code.site.DataSectionReference;
+import jdk.vm.ci.code.site.Infopoint;
+import jdk.vm.ci.code.site.InfopointReason;
+import jdk.vm.ci.code.site.Mark;
+import jdk.vm.ci.code.site.Reference;
+import jdk.vm.ci.code.site.Site;
+import jdk.vm.ci.hotspot.HotSpotCompiledCode;
+import jdk.vm.ci.hotspot.HotSpotCompiledCode.Comment;
+import jdk.vm.ci.hotspot.HotSpotCompiledNmethod;
+import jdk.vm.ci.hotspot.HotSpotConstant;
+import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
+import jdk.vm.ci.meta.Assumptions.Assumption;
+import jdk.vm.ci.meta.InvokeTarget;
+import jdk.vm.ci.meta.LIRKind;
+import jdk.vm.ci.meta.PlatformKind;
+import jdk.vm.ci.meta.ResolvedJavaMethod;
+import jdk.vm.ci.meta.VMConstant;
+
+/**
+ * Simple assembler used by the code installation tests.
+ */
+public abstract class TestAssembler {
+
+    /**
+     * Emit the method prologue code (e.g. building the new stack frame).
+     */
+    public abstract void emitPrologue();
+
+    /**
+     * Emit the method epilogue code (e.g. the deopt handler).
+     */
+    public abstract void emitEpilogue();
+
+    /**
+     * Emit code to grow the stack frame.
+     *
+     * @param size the size in bytes that the stack should grow
+     */
+    public abstract void emitGrowStack(int size);
+
+    /**
+     * Get the register containing the first 32-bit integer argument.
+     */
+    public abstract Register emitIntArg0();
+
+    /**
+     * Get the register containing the second 32-bit integer argument.
+     */
+    public abstract Register emitIntArg1();
+
+    /**
+     * Emit code to add two 32-bit integer registers. May reuse one of the argument registers.
+     */
+    public abstract Register emitIntAdd(Register a, Register b);
+
+    /**
+     * Emit code to load a constant 32-bit integer to a register.
+     */
+    public abstract Register emitLoadInt(int value);
+
+    /**
+     * Emit code to load a constant 64-bit integer to a register.
+     */
+    public abstract Register emitLoadLong(long value);
+
+    /**
+     * Emit code to load a constant single-precision float to a register.
+     */
+    public abstract Register emitLoadFloat(float value);
+
+    /**
+     * Emit code to load a constant oop or metaspace pointer to a register. The pointer may be wide
+     * or narrow, depending on {@link HotSpotConstant#isCompressed() c.isCompressed()}.
+     */
+    public abstract Register emitLoadPointer(HotSpotConstant c);
+
+    /**
+     * Emit code to load a wide pointer from the {@link HotSpotCompiledCode#dataSection} to a
+     * register.
+     */
+    public abstract Register emitLoadPointer(DataSectionReference ref);
+
+    /**
+     * Emit code to load a narrow pointer from the {@link HotSpotCompiledCode#dataSection} to a
+     * register.
+     */
+    public abstract Register emitLoadNarrowPointer(DataSectionReference ref);
+
+    /**
+     * Emit code to load a (wide) pointer from a memory location to a register.
+     */
+    public abstract Register emitLoadPointer(Register base, int offset);
+
+    /**
+     * Emit code to store a 32-bit integer from a register to a new stack slot.
+     */
+    public abstract StackSlot emitIntToStack(Register a);
+
+    /**
+     * Emit code to store a 64-bit integer from a register to a new stack slot.
+     */
+    public abstract StackSlot emitLongToStack(Register a);
+
+    /**
+     * Emit code to store a single-precision float from a register to a new stack slot.
+     */
+    public abstract StackSlot emitFloatToStack(Register a);
+
+    /**
+     * Emit code to store a wide pointer from a register to a new stack slot.
+     */
+    public abstract StackSlot emitPointerToStack(Register a);
+
+    /**
+     * Emit code to store a narrow pointer from a register to a new stack slot.
+     */
+    public abstract StackSlot emitNarrowPointerToStack(Register a);
+
+    /**
+     * Emit code to uncompress a narrow pointer. The input pointer is guaranteed to be non-null.
+     */
+    public abstract Register emitUncompressPointer(Register compressed, long base, int shift);
+
+    /**
+     * Emit code to return from a function, returning a 32-bit integer.
+     */
+    public abstract void emitIntRet(Register a);
+
+    /**
+     * Emit code to return from a function, returning a wide oop pointer.
+     */
+    public abstract void emitPointerRet(Register a);
+
+    /**
+     * Emit code that traps, forcing a deoptimization.
+     */
+    public abstract void emitTrap(DebugInfo info);
+
+    public final LIRKind narrowOopKind;
+
+    protected final Buffer code;
+    protected final Buffer data;
+    private final ArrayList<Site> sites;
+    private final ArrayList<DataPatch> dataPatches;
+
+    protected final CodeCacheProvider codeCache;
+
+    private final Register[] registers;
+    private int nextRegister;
+
+    protected int frameSize;
+    private int stackAlignment;
+    private int curStackSlot;
+
+    private StackSlot deoptRescue;
+
+    protected TestAssembler(CodeCacheProvider codeCache, int initialFrameSize, int stackAlignment, PlatformKind narrowOopKind, Register... registers) {
+        this.narrowOopKind = LIRKind.reference(narrowOopKind);
+
+        this.code = new Buffer();
+        this.data = new Buffer();
+        this.sites = new ArrayList<>();
+        this.dataPatches = new ArrayList<>();
+
+        this.codeCache = codeCache;
+
+        this.registers = registers;
+        this.nextRegister = 0;
+
+        this.frameSize = initialFrameSize;
+        this.stackAlignment = stackAlignment;
+        this.curStackSlot = initialFrameSize;
+    }
+
+    protected Register newRegister() {
+        return registers[nextRegister++];
+    }
+
+    protected StackSlot newStackSlot(LIRKind kind) {
+        curStackSlot += kind.getPlatformKind().getSizeInBytes();
+        if (curStackSlot > frameSize) {
+            int newFrameSize = curStackSlot;
+            if (newFrameSize % stackAlignment != 0) {
+                newFrameSize += stackAlignment - (newFrameSize % stackAlignment);
+            }
+            emitGrowStack(newFrameSize - frameSize);
+            frameSize = newFrameSize;
+        }
+        return StackSlot.get(kind, -curStackSlot, true);
+    }
+
+    protected void setDeoptRescueSlot(StackSlot deoptRescue) {
+        this.deoptRescue = deoptRescue;
+    }
+
+    protected void recordCall(InvokeTarget target, int size, boolean direct, DebugInfo debugInfo) {
+        sites.add(new Call(target, code.position(), size, direct, debugInfo));
+    }
+
+    protected void recordMark(Object id) {
+        sites.add(new Mark(code.position(), id));
+    }
+
+    protected void recordImplicitException(DebugInfo info) {
+        sites.add(new Infopoint(code.position(), info, InfopointReason.IMPLICIT_EXCEPTION));
+    }
+
+    protected void recordDataPatchInCode(Reference ref) {
+        sites.add(new DataPatch(code.position(), ref));
+    }
+
+    protected void recordDataPatchInData(Reference ref) {
+        dataPatches.add(new DataPatch(data.position(), ref));
+    }
+
+    public DataSectionReference emitDataItem(HotSpotConstant c) {
+        DataSectionReference ref = new DataSectionReference();
+        ref.setOffset(data.position());
+
+        recordDataPatchInData(new ConstantReference((VMConstant) c));
+        if (c.isCompressed()) {
+            data.emitInt(0xDEADDEAD);
+        } else {
+            data.emitLong(0xDEADDEADDEADDEADL);
+        }
+
+        return ref;
+    }
+
+    public HotSpotCompiledCode finish(HotSpotResolvedJavaMethod method) {
+        int id = method.allocateCompileId(0);
+        byte[] finishedCode = code.finish();
+        Site[] finishedSites = sites.toArray(new Site[0]);
+        byte[] finishedData = data.finish();
+        DataPatch[] finishedDataPatches = dataPatches.toArray(new DataPatch[0]);
+        return new HotSpotCompiledNmethod(method.getName(), finishedCode, finishedCode.length, finishedSites, new Assumption[0], new ResolvedJavaMethod[]{method}, new Comment[0], finishedData, 16,
+                        finishedDataPatches, false, frameSize, deoptRescue, method, 0, id, 0L, false);
+    }
+
+    protected static class Buffer {
+
+        private ByteBuffer data = ByteBuffer.allocate(32).order(ByteOrder.nativeOrder());
+
+        private void ensureSize(int length) {
+            if (length >= data.limit()) {
+                byte[] newBuf = Arrays.copyOf(data.array(), length * 4);
+                ByteBuffer newData = ByteBuffer.wrap(newBuf);
+                newData.order(data.order());
+                newData.position(data.position());
+                data = newData;
+            }
+        }
+
+        public int position() {
+            return data.position();
+        }
+
+        public void emitByte(int b) {
+            ensureSize(data.position() + 1);
+            data.put((byte) (b & 0xFF));
+        }
+
+        public void emitShort(int b) {
+            ensureSize(data.position() + 2);
+            data.putShort((short) b);
+        }
+
+        public void emitInt(int b) {
+            ensureSize(data.position() + 4);
+            data.putInt(b);
+        }
+
+        public void emitLong(long b) {
+            ensureSize(data.position() + 8);
+            data.putLong(b);
+        }
+
+        public void emitFloat(float f) {
+            ensureSize(data.position() + 4);
+            data.putFloat(f);
+        }
+
+        public void align(int alignment) {
+            int pos = data.position();
+            int misaligned = pos % alignment;
+            if (misaligned != 0) {
+                pos += alignment - misaligned;
+                data.position(pos);
+            }
+        }
+
+        private byte[] finish() {
+            return Arrays.copyOf(data.array(), data.position());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2015, 2016, 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.
+ */
+
+/**
+ * @test
+ * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
+ * @library /
+ * @modules jdk.vm.ci/jdk.vm.ci.hotspot
+ *          jdk.vm.ci/jdk.vm.ci.meta
+ *          jdk.vm.ci/jdk.vm.ci.code
+ *          jdk.vm.ci/jdk.vm.ci.code.site
+ *          jdk.vm.ci/jdk.vm.ci.runtime
+ *          jdk.vm.ci/jdk.vm.ci.amd64
+ *          jdk.vm.ci/jdk.vm.ci.sparc
+ * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java
+ * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.VirtualObjectDebugInfoTest
+ */
+
+package jdk.vm.ci.code.test;
+
+import java.util.ArrayList;
+import java.util.Objects;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import jdk.vm.ci.code.Register;
+import jdk.vm.ci.code.VirtualObject;
+import jdk.vm.ci.hotspot.HotSpotConstant;
+import jdk.vm.ci.meta.JavaConstant;
+import jdk.vm.ci.meta.JavaKind;
+import jdk.vm.ci.meta.JavaValue;
+import jdk.vm.ci.meta.ResolvedJavaField;
+import jdk.vm.ci.meta.ResolvedJavaType;
+
+public class VirtualObjectDebugInfoTest extends DebugInfoTest {
+
+    private static class TestClass {
+
+        private long longField;
+        private int intField;
+        private float floatField;
+        private Object[] arrayField;
+
+        TestClass() {
+            this.longField = 8472;
+            this.intField = 42;
+            this.floatField = 3.14f;
+            this.arrayField = new Object[]{Integer.valueOf(58), this, null, Integer.valueOf(17), "Hello, World!"};
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (!(o instanceof TestClass)) {
+                return false;
+            }
+
+            TestClass other = (TestClass) o;
+            if (this.longField != other.longField || this.intField != other.intField || this.floatField != other.floatField || this.arrayField.length != other.arrayField.length) {
+                return false;
+            }
+
+            for (int i = 0; i < this.arrayField.length; i++) {
+                // break cycle
+                if (this.arrayField[i] == this && other.arrayField[i] == other) {
+                    continue;
+                }
+
+                if (!Objects.equals(this.arrayField[i], other.arrayField[i])) {
+                    return false;
+                }
+            }
+
+            return true;
+        }
+
+        @Override
+        public int hashCode() {
+            return super.hashCode();
+        }
+    }
+
+    public static TestClass buildObject() {
+        return new TestClass();
+    }
+
+    private VirtualObject[] compileBuildObject(TestAssembler asm, JavaValue[] values) {
+        TestClass template = new TestClass();
+        ArrayList<VirtualObject> vobjs = new ArrayList<>();
+
+        ResolvedJavaType retType = metaAccess.lookupJavaType(TestClass.class);
+        VirtualObject ret = VirtualObject.get(retType, vobjs.size());
+        vobjs.add(ret);
+        values[0] = ret;
+
+        ResolvedJavaType arrayType = metaAccess.lookupJavaType(Object[].class);
+        VirtualObject array = VirtualObject.get(arrayType, vobjs.size());
+        vobjs.add(array);
+
+        // build array for ret.arrayField
+        ResolvedJavaType integerType = metaAccess.lookupJavaType(Integer.class);
+        JavaValue[] arrayContent = new JavaValue[template.arrayField.length];
+        JavaKind[] arrayKind = new JavaKind[template.arrayField.length];
+        for (int i = 0; i < arrayContent.length; i++) {
+            arrayKind[i] = JavaKind.Object;
+            if (template.arrayField[i] == null) {
+                arrayContent[i] = JavaConstant.NULL_POINTER;
+            } else if (template.arrayField[i] == template) {
+                arrayContent[i] = ret;
+            } else if (template.arrayField[i] instanceof Integer) {
+                int value = (Integer) template.arrayField[i];
+                VirtualObject boxed = VirtualObject.get(integerType, vobjs.size());
+                vobjs.add(boxed);
+                arrayContent[i] = boxed;
+                boxed.setValues(new JavaValue[]{JavaConstant.forInt(value)}, new JavaKind[]{JavaKind.Int});
+            } else if (template.arrayField[i] instanceof String) {
+                String value = (String) template.arrayField[i];
+                Register reg = asm.emitLoadPointer((HotSpotConstant) constantReflection.forString(value));
+                arrayContent[i] = reg.asValue(target.getLIRKind(JavaKind.Object));
+            } else {
+                Assert.fail("unexpected value");
+            }
+        }
+        array.setValues(arrayContent, arrayKind);
+
+        // build return object
+        ResolvedJavaField[] fields = retType.getInstanceFields(true);
+        JavaValue[] retContent = new JavaValue[fields.length];
+        JavaKind[] retKind = new JavaKind[fields.length];
+        for (int i = 0; i < fields.length; i++) {
+            retKind[i] = fields[i].getJavaKind();
+            switch (retKind[i]) {
+                case Long: // template.longField
+                    retContent[i] = JavaConstant.forLong(template.longField);
+                    break;
+                case Int: // template.intField
+                    Register intReg = asm.emitLoadInt(template.intField);
+                    retContent[i] = asm.emitIntToStack(intReg);
+                    break;
+                case Float: // template.floatField
+                    Register fReg = asm.emitLoadFloat(template.floatField);
+                    retContent[i] = fReg.asValue(target.getLIRKind(JavaKind.Float));
+                    break;
+                case Object: // template.arrayField
+                    retContent[i] = array;
+                    break;
+                default:
+                    Assert.fail("unexpected field");
+            }
+        }
+        ret.setValues(retContent, retKind);
+
+        return vobjs.toArray(new VirtualObject[0]);
+    }
+
+    @Test
+    public void testBuildObject() {
+        test(this::compileBuildObject, getMethod("buildObject"), 7, JavaKind.Object);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/amd64/AMD64TestAssembler.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,290 @@
+/*
+ * Copyright (c) 2015, 2016, 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.
+ */
+
+package jdk.vm.ci.code.test.amd64;
+
+import jdk.vm.ci.amd64.AMD64;
+import jdk.vm.ci.amd64.AMD64Kind;
+import jdk.vm.ci.code.CodeCacheProvider;
+import jdk.vm.ci.code.DebugInfo;
+import jdk.vm.ci.code.Register;
+import jdk.vm.ci.code.StackSlot;
+import jdk.vm.ci.code.site.ConstantReference;
+import jdk.vm.ci.code.site.DataSectionReference;
+import jdk.vm.ci.code.test.TestAssembler;
+import jdk.vm.ci.hotspot.HotSpotCallingConventionType;
+import jdk.vm.ci.hotspot.HotSpotConstant;
+import jdk.vm.ci.hotspot.HotSpotForeignCallTarget;
+import jdk.vm.ci.hotspot.HotSpotVMConfig;
+import jdk.vm.ci.meta.JavaKind;
+import jdk.vm.ci.meta.LIRKind;
+import jdk.vm.ci.meta.VMConstant;
+
+public class AMD64TestAssembler extends TestAssembler {
+
+    public AMD64TestAssembler(CodeCacheProvider codeCache) {
+        super(codeCache, 16, 16, AMD64Kind.DWORD, AMD64.rax, AMD64.rcx, AMD64.rdi, AMD64.r8, AMD64.r9, AMD64.r10);
+    }
+
+    private void emitFatNop() {
+        // 5 byte NOP:
+        // NOP DWORD ptr [EAX + EAX*1 + 00H]
+        code.emitByte(0x0F);
+        code.emitByte(0x1F);
+        code.emitByte(0x44);
+        code.emitByte(0x00);
+        code.emitByte(0x00);
+    }
+
+    @Override
+    public void emitPrologue() {
+        // WARNING: Initial instruction MUST be 5 bytes or longer so that
+        // NativeJump::patch_verified_entry will be able to patch out the entry
+        // code safely.
+        emitFatNop();
+        code.emitByte(0x50 | AMD64.rbp.encoding);  // PUSH rbp
+        emitMove(true, AMD64.rbp, AMD64.rsp);      // MOV rbp, rsp
+        setDeoptRescueSlot(newStackSlot(LIRKind.value(AMD64Kind.QWORD)));
+    }
+
+    @Override
+    public void emitEpilogue() {
+        HotSpotVMConfig config = HotSpotVMConfig.config();
+        recordMark(config.MARKID_DEOPT_HANDLER_ENTRY);
+        recordCall(new HotSpotForeignCallTarget(config.handleDeoptStub), 5, true, null);
+        code.emitByte(0xE8); // CALL rel32
+        code.emitInt(0xDEADDEAD);
+    }
+
+    @Override
+    public void emitGrowStack(int size) {
+        // SUB rsp, size
+        code.emitByte(0x48);
+        code.emitByte(0x81);
+        code.emitByte(0xEC);
+        code.emitInt(size);
+    }
+
+    @Override
+    public Register emitIntArg0() {
+        return codeCache.getRegisterConfig().getCallingConventionRegisters(HotSpotCallingConventionType.JavaCall, JavaKind.Int)[0];
+    }
+
+    @Override
+    public Register emitIntArg1() {
+        return codeCache.getRegisterConfig().getCallingConventionRegisters(HotSpotCallingConventionType.JavaCall, JavaKind.Int)[1];
+    }
+
+    private void emitREX(boolean w, int r, int x, int b) {
+        int wrxb = (w ? 0x08 : 0) | ((r >> 3) << 2) | ((x >> 3) << 1) | (b >> 3);
+        if (wrxb != 0) {
+            code.emitByte(0x40 | wrxb);
+        }
+    }
+
+    private void emitModRMReg(boolean w, int opcode, int r, int m) {
+        emitREX(w, r, 0, m);
+        code.emitByte((byte) opcode);
+        code.emitByte((byte) 0xC0 | ((r & 0x7) << 3) | (m & 0x7));
+    }
+
+    private void emitModRMMemory(boolean w, int opcode, int r, int b, int offset) {
+        emitREX(w, r, 0, b);
+        code.emitByte((byte) opcode);
+        code.emitByte((byte) 0x80 | ((r & 0x7) << 3) | (b & 0x7));
+        code.emitInt(offset);
+    }
+
+    @Override
+    public Register emitLoadInt(int c) {
+        Register ret = newRegister();
+        emitREX(false, 0, 0, ret.encoding);
+        code.emitByte(0xB8 | (ret.encoding & 0x7)); // MOV r32, imm32
+        code.emitInt(c);
+        return ret;
+    }
+
+    @Override
+    public Register emitLoadLong(long c) {
+        Register ret = newRegister();
+        emitREX(true, 0, 0, ret.encoding);
+        code.emitByte(0xB8 | (ret.encoding & 0x7)); // MOV r64, imm64
+        code.emitLong(c);
+        return ret;
+    }
+
+    @Override
+    public Register emitLoadFloat(float c) {
+        DataSectionReference ref = new DataSectionReference();
+        ref.setOffset(data.position());
+        data.emitFloat(c);
+
+        recordDataPatchInCode(ref);
+        Register ret = AMD64.xmm0;
+        emitREX(false, ret.encoding, 0, 0);
+        code.emitByte(0xF3);
+        code.emitByte(0x0F);
+        code.emitByte(0x10);                               // MOVSS xmm1, xmm2/m32
+        code.emitByte(0x05 | ((ret.encoding & 0x7) << 3)); // xmm, [rip+offset]
+        code.emitInt(0xDEADDEAD);
+        return ret;
+    }
+
+    @Override
+    public Register emitLoadPointer(HotSpotConstant c) {
+        recordDataPatchInCode(new ConstantReference((VMConstant) c));
+        if (c.isCompressed()) {
+            Register ret = newRegister();
+            emitREX(false, 0, 0, ret.encoding);
+            code.emitByte(0xB8 | (ret.encoding & 0x7)); // MOV r32, imm32
+            code.emitInt(0xDEADDEAD);
+            return ret;
+        } else {
+            return emitLoadLong(0xDEADDEADDEADDEADL);
+        }
+    }
+
+    private Register emitLoadPointer(DataSectionReference ref, boolean narrow) {
+        recordDataPatchInCode(ref);
+        Register ret = newRegister();
+        emitREX(!narrow, ret.encoding, 0, 0);
+        code.emitByte(0x8B);                               // MOV r64,r/m64
+        code.emitByte(0x05 | ((ret.encoding & 0x7) << 3)); // r64, [rip+offset]
+        code.emitInt(0xDEADDEAD);
+        return ret;
+    }
+
+    @Override
+    public Register emitLoadPointer(DataSectionReference ref) {
+        return emitLoadPointer(ref, false);
+    }
+
+    @Override
+    public Register emitLoadNarrowPointer(DataSectionReference ref) {
+        return emitLoadPointer(ref, true);
+    }
+
+    @Override
+    public Register emitLoadPointer(Register b, int offset) {
+        Register ret = newRegister();
+        emitModRMMemory(true, 0x8B, ret.encoding, b.encoding, offset); // MOV r64,r/m64
+        return ret;
+    }
+
+    @Override
+    public StackSlot emitIntToStack(Register a) {
+        StackSlot ret = newStackSlot(LIRKind.value(AMD64Kind.DWORD));
+        // MOV r/m32,r32
+        emitModRMMemory(false, 0x89, a.encoding, AMD64.rbp.encoding, ret.getRawOffset() + 16);
+        return ret;
+    }
+
+    @Override
+    public StackSlot emitLongToStack(Register a) {
+        StackSlot ret = newStackSlot(LIRKind.value(AMD64Kind.QWORD));
+        // MOV r/m64,r64
+        emitModRMMemory(true, 0x89, a.encoding, AMD64.rbp.encoding, ret.getRawOffset() + 16);
+        return ret;
+    }
+
+    @Override
+    public StackSlot emitFloatToStack(Register a) {
+        StackSlot ret = newStackSlot(LIRKind.value(AMD64Kind.SINGLE));
+        emitREX(false, a.encoding, 0, 0);
+        code.emitByte(0xF3);
+        code.emitByte(0x0F);
+        code.emitByte(0x11);                               // MOVSS xmm2/m32, xmm1
+        code.emitByte(0x85 | ((a.encoding & 0x7) << 3));   // [rbp+offset]
+        code.emitInt(ret.getRawOffset() + 16);
+        return ret;
+    }
+
+    @Override
+    public StackSlot emitPointerToStack(Register a) {
+        StackSlot ret = newStackSlot(LIRKind.reference(AMD64Kind.QWORD));
+        // MOV r/m64,r64
+        emitModRMMemory(true, 0x89, a.encoding, AMD64.rbp.encoding, ret.getRawOffset() + 16);
+        return ret;
+    }
+
+    @Override
+    public StackSlot emitNarrowPointerToStack(Register a) {
+        StackSlot ret = newStackSlot(LIRKind.reference(AMD64Kind.DWORD));
+        // MOV r/m32,r32
+        emitModRMMemory(false, 0x89, a.encoding, AMD64.rbp.encoding, ret.getRawOffset() + 16);
+        return ret;
+    }
+
+    @Override
+    public Register emitUncompressPointer(Register compressed, long base, int shift) {
+        if (shift > 0) {
+            emitModRMReg(true, 0xC1, 4, compressed.encoding);
+            code.emitByte(shift);
+        }
+        if (base == 0) {
+            return compressed;
+        } else {
+            Register tmp = emitLoadLong(base);
+            emitModRMReg(true, 0x03, tmp.encoding, compressed.encoding);
+            return tmp;
+        }
+    }
+
+    @Override
+    public Register emitIntAdd(Register a, Register b) {
+        emitModRMReg(false, 0x03, a.encoding, b.encoding);
+        return a;
+    }
+
+    private void emitMove(boolean w, Register to, Register from) {
+        if (to != from) {
+            emitModRMReg(w, 0x8B, to.encoding, from.encoding);
+        }
+    }
+
+    @Override
+    public void emitIntRet(Register a) {
+        emitMove(false, AMD64.rax, a);             // MOV eax, ...
+        emitMove(true, AMD64.rsp, AMD64.rbp);      // MOV rsp, rbp
+        code.emitByte(0x58 | AMD64.rbp.encoding);  // POP rbp
+        code.emitByte(0xC3);                       // RET
+    }
+
+    @Override
+    public void emitPointerRet(Register a) {
+        emitMove(true, AMD64.rax, a);              // MOV rax, ...
+        emitMove(true, AMD64.rsp, AMD64.rbp);      // MOV rsp, rbp
+        code.emitByte(0x58 | AMD64.rbp.encoding);  // POP rbp
+        code.emitByte(0xC3);                       // RET
+    }
+
+    @Override
+    public void emitTrap(DebugInfo info) {
+        recordImplicitException(info);
+        // MOV rax, [0]
+        code.emitByte(0x8B);
+        code.emitByte(0x04);
+        code.emitByte(0x25);
+        code.emitInt(0);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/sparc/SPARCTestAssembler.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,293 @@
+/*
+ * Copyright (c) 2015, 2016, 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.
+ */
+
+package jdk.vm.ci.code.test.sparc;
+
+import jdk.vm.ci.code.CodeCacheProvider;
+import jdk.vm.ci.code.DebugInfo;
+import jdk.vm.ci.code.Register;
+import jdk.vm.ci.code.StackSlot;
+import jdk.vm.ci.code.site.ConstantReference;
+import jdk.vm.ci.code.site.DataSectionReference;
+import jdk.vm.ci.code.test.TestAssembler;
+import jdk.vm.ci.hotspot.HotSpotCallingConventionType;
+import jdk.vm.ci.hotspot.HotSpotCompiledCode;
+import jdk.vm.ci.hotspot.HotSpotConstant;
+import jdk.vm.ci.hotspot.HotSpotForeignCallTarget;
+import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
+import jdk.vm.ci.hotspot.HotSpotVMConfig;
+import jdk.vm.ci.meta.JavaKind;
+import jdk.vm.ci.meta.LIRKind;
+import jdk.vm.ci.meta.VMConstant;
+import jdk.vm.ci.sparc.SPARC;
+import jdk.vm.ci.sparc.SPARCKind;
+
+public class SPARCTestAssembler extends TestAssembler {
+
+    private static final int MASK13 = (1 << 13) - 1;
+
+    public SPARCTestAssembler(CodeCacheProvider codeCache) {
+        super(codeCache, 0, 16, SPARCKind.WORD, SPARC.l0, SPARC.l1, SPARC.l2, SPARC.l3, SPARC.l4, SPARC.l5, SPARC.l6, SPARC.l7);
+    }
+
+    private void emitOp2(Register rd, int op2, int imm22) {
+        code.emitInt((0b00 << 30) | (rd.encoding << 25) | (op2 << 22) | imm22);
+    }
+
+    private void emitOp3(int op, Register rd, int op3, Register rs1, Register rs2) {
+        code.emitInt((op << 30) | (rd.encoding << 25) | (op3 << 19) | (rs1.encoding << 14) | rs2.encoding);
+    }
+
+    private void emitOp3(int op, Register rd, int op3, Register rs1, int simm13) {
+        code.emitInt((op << 30) | (rd.encoding << 25) | (op3 << 19) | (rs1.encoding << 14) | (1 << 13) | (simm13 & MASK13));
+    }
+
+    private void emitNop() {
+        code.emitInt(1 << 24);
+    }
+
+    @Override
+    public void emitPrologue() {
+        // SAVE sp, -128, sp
+        emitOp3(0b10, SPARC.sp, 0b111100, SPARC.sp, -SPARC.REGISTER_SAFE_AREA_SIZE);
+        setDeoptRescueSlot(newStackSlot(LIRKind.value(SPARCKind.XWORD)));
+    }
+
+    @Override
+    public void emitEpilogue() {
+        HotSpotVMConfig config = HotSpotVMConfig.config();
+        recordMark(config.MARKID_DEOPT_HANDLER_ENTRY);
+        recordCall(new HotSpotForeignCallTarget(config.handleDeoptStub), 4, true, null);
+        code.emitInt(1 << 30); // CALL
+    }
+
+    @Override
+    public HotSpotCompiledCode finish(HotSpotResolvedJavaMethod method) {
+        frameSize += SPARC.REGISTER_SAFE_AREA_SIZE;
+        return super.finish(method);
+    }
+
+    @Override
+    public void emitGrowStack(int size) {
+        emitOp3(0b10, SPARC.sp, 0b000100, SPARC.sp, size); // SUB sp, size, sp
+    }
+
+    @Override
+    public Register emitIntArg0() {
+        return codeCache.getRegisterConfig().getCallingConventionRegisters(HotSpotCallingConventionType.JavaCallee, JavaKind.Int)[0];
+    }
+
+    @Override
+    public Register emitIntArg1() {
+        return codeCache.getRegisterConfig().getCallingConventionRegisters(HotSpotCallingConventionType.JavaCallee, JavaKind.Int)[1];
+    }
+
+    @Override
+    public Register emitLoadInt(int c) {
+        Register ret = newRegister();
+        int hi = c >>> 10;
+        int lo = c & ((1 << 10) - 1);
+        if (hi == 0) {
+            emitOp3(0b10, ret, 0b000010, SPARC.g0, lo); // OR g0, lo, ret
+        } else {
+            emitOp2(ret, 0b100, hi);                    // SETHI hi, ret
+            if (lo != 0) {
+                emitOp3(0b10, ret, 0b000010, ret, lo);  // OR ret, lo, ret
+            }
+        }
+        return ret;
+    }
+
+    @Override
+    public Register emitLoadLong(long c) {
+        if ((c & 0xFFFF_FFFFL) == c) {
+            return emitLoadInt((int) c);
+        } else {
+            DataSectionReference ref = new DataSectionReference();
+            data.align(8);
+            ref.setOffset(data.position());
+            data.emitLong(c);
+            return emitLoadPointer(ref);
+        }
+    }
+
+    private void emitPatchableSethi(Register ret, boolean wide) {
+        int startPos = code.position();
+        emitOp2(ret, 0b100, 0);              // SETHI 0, ret
+        if (wide) {
+            // pad for later patching
+            while (code.position() < (startPos + 28)) {
+                emitNop();
+            }
+        }
+    }
+
+    @Override
+    public Register emitLoadFloat(float c) {
+        DataSectionReference ref = new DataSectionReference();
+        data.align(4);
+        ref.setOffset(data.position());
+        data.emitFloat(c);
+
+        Register ptr = newRegister();
+        recordDataPatchInCode(ref);
+        emitPatchableSethi(ptr, true);
+        emitOp3(0b11, SPARC.f0, 0b100000, ptr, 0); // LDF [ptr+0], f0
+        return SPARC.f0;
+    }
+
+    @Override
+    public Register emitLoadPointer(HotSpotConstant c) {
+        Register ret = newRegister();
+        recordDataPatchInCode(new ConstantReference((VMConstant) c));
+
+        emitPatchableSethi(ret, !c.isCompressed());
+        emitOp3(0b10, ret, 0b000010, ret, 0); // OR ret, 0, ret
+
+        return ret;
+    }
+
+    @Override
+    public Register emitLoadPointer(DataSectionReference ref) {
+        Register ret = newRegister();
+        recordDataPatchInCode(ref);
+        emitPatchableSethi(ret, true);
+        emitOp3(0b11, ret, 0b001011, ret, 0); // LDX [ret+0], ret
+        return ret;
+    }
+
+    @Override
+    public Register emitLoadNarrowPointer(DataSectionReference ref) {
+        Register ret = newRegister();
+        recordDataPatchInCode(ref);
+        emitPatchableSethi(ret, true);
+        emitOp3(0b11, ret, 0b000000, ret, 0); // LDUW [ret+0], ret
+        return ret;
+    }
+
+    @Override
+    public Register emitLoadPointer(Register b, int offset) {
+        Register ret = newRegister();
+        emitOp3(0b11, ret, 0b001011, b, offset); // LDX [b+offset], ret
+        return ret;
+    }
+
+    @Override
+    public StackSlot emitIntToStack(Register a) {
+        StackSlot ret = newStackSlot(LIRKind.value(SPARCKind.WORD));
+        // STW a, [fp+offset]
+        emitOp3(0b11, a, 0b000100, SPARC.fp, ret.getRawOffset() + SPARC.STACK_BIAS);
+        return ret;
+    }
+
+    @Override
+    public StackSlot emitLongToStack(Register a) {
+        StackSlot ret = newStackSlot(LIRKind.value(SPARCKind.XWORD));
+        // STX a, [fp+offset]
+        emitOp3(0b11, a, 0b001110, SPARC.fp, ret.getRawOffset() + SPARC.STACK_BIAS);
+        return ret;
+    }
+
+    @Override
+    public StackSlot emitFloatToStack(Register a) {
+        StackSlot ret = newStackSlot(LIRKind.value(SPARCKind.SINGLE));
+        // STF a, [fp+offset]
+        emitOp3(0b11, a, 0b100100, SPARC.fp, ret.getRawOffset() + SPARC.STACK_BIAS);
+        return ret;
+    }
+
+    @Override
+    public StackSlot emitPointerToStack(Register a) {
+        StackSlot ret = newStackSlot(LIRKind.reference(SPARCKind.XWORD));
+        // STX a, [fp+offset]
+        emitOp3(0b11, a, 0b001110, SPARC.fp, ret.getRawOffset() + SPARC.STACK_BIAS);
+        return ret;
+    }
+
+    @Override
+    public StackSlot emitNarrowPointerToStack(Register a) {
+        StackSlot ret = newStackSlot(LIRKind.reference(SPARCKind.WORD));
+        // STW a, [fp+offset]
+        emitOp3(0b11, a, 0b000100, SPARC.fp, ret.getRawOffset() + SPARC.STACK_BIAS);
+        return ret;
+    }
+
+    @Override
+    public Register emitUncompressPointer(Register compressed, long base, int shift) {
+        Register ret;
+        if (shift > 0) {
+            ret = newRegister();
+            emitOp3(0b10, ret, 0b100101, compressed, shift); // SLL compressed, shift, ret
+        } else {
+            ret = compressed;
+        }
+        if (base == 0) {
+            return ret;
+        } else {
+            Register b = emitLoadLong(base);
+            emitOp3(0b10, b, 0b00000, ret, b); // ADD b, ret, b
+            return b;
+        }
+    }
+
+    @Override
+    public Register emitIntAdd(Register a, Register b) {
+        Register ret = newRegister();
+        emitOp3(0b10, ret, 0b00000, a, b); // ADD a, b, ret
+        return ret;
+    }
+
+    private void emitMove(Register to, Register from) {
+        if (to != from) {
+            emitOp3(0b10, to, 0b000010, from, SPARC.g0); // OR from, g0, to
+        }
+    }
+
+    @Override
+    public void emitIntRet(Register a) {
+        emitPointerRet(a);
+    }
+
+    @Override
+    public void emitPointerRet(Register a) {
+        emitMove(SPARC.i0, a);
+        emitOp3(0b10, SPARC.g0, 0b111000, SPARC.i7, 8);        // JMPL [i7+8], g0
+        emitOp3(0b10, SPARC.g0, 0b111101, SPARC.g0, SPARC.g0); // RESTORE g0, g0, g0
+    }
+
+    @Override
+    public void emitTrap(DebugInfo info) {
+        recordImplicitException(info);
+        emitOp3(0b11, SPARC.g0, 0b001011, SPARC.g0, 0); // LDX [g0+0], g0
+    }
+
+    @Override
+    public DataSectionReference emitDataItem(HotSpotConstant c) {
+        if (c.isCompressed()) {
+            data.align(4);
+        } else {
+            data.align(8);
+        }
+        return super.emitDataItem(c);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/onSpinWait/TestOnSpinWait.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2016 Azul Systems, Inc.  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.
+ */
+
+/**
+ * @test TestOnSpinWait
+ * @summary (x86 only) checks that java.lang.Thread.onSpinWait is intrinsified
+ * @bug 8147844
+ * @library /testlibrary
+ * @requires os.arch=="x86" | os.arch=="amd64" | os.arch=="x86_64"
+ * @run main TestOnSpinWait
+ */
+
+import java.lang.invoke.*;
+import jdk.test.lib.*;
+import static jdk.test.lib.Asserts.*;
+
+public class TestOnSpinWait {
+
+    public static void main(String[] args) throws Exception {
+
+        // Test C1 compiler
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+          "-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
+          "-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", "-Xbatch",
+          "-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions",
+          "-XX:+PrintInlining", "TestOnSpinWait$Launcher");
+
+        OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
+
+        analyzer.shouldHaveExitValue(0);
+
+        // The test is applicable only to C1 (present in Server VM).
+        analyzer.shouldContain("java.lang.Thread::onSpinWait (1 bytes)   intrinsic");
+
+        // Test C2 compiler
+        pb = ProcessTools.createJavaProcessBuilder(
+          "-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
+          "-XX:-TieredCompilation", "-Xbatch",
+          "-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions",
+          "-XX:+PrintInlining", "TestOnSpinWait$Launcher");
+
+        analyzer = new OutputAnalyzer(pb.start());
+
+        analyzer.shouldHaveExitValue(0);
+
+        // The test is applicable only to C2 (present in Server VM).
+        if (analyzer.getStderr().contains("Server VM")) {
+            analyzer.shouldContain("java.lang.Thread::onSpinWait (1 bytes)   (intrinsic)");
+        }
+    }
+
+    static class Launcher {
+
+        public static void main(final String[] args) throws Exception {
+            int end = 20_000;
+
+            for (int i=0; i < end; i++) {
+                test();
+            }
+        }
+        static void test() {
+            java.lang.Thread.onSpinWait();
+        }
+    }
+}
--- a/hotspot/test/compiler/rangechecks/TestExplicitRangeChecks.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/rangechecks/TestExplicitRangeChecks.java	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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,7 @@
  * @bug 8073480
  * @summary explicit range checks should be recognized by C2
  * @library /testlibrary /test/lib /compiler/whitebox /
- * @build  TestExplicitRangeChecks
+ * @build TestExplicitRangeChecks
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main ClassFileInstaller jdk.test.lib.Platform
  * @run main/othervm -ea -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
@@ -44,8 +44,10 @@
 import compiler.whitebox.CompilerWhiteBoxTest;
 
 public class TestExplicitRangeChecks {
-
-    static int[] array = new int[10];
+    private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
+    private static final int TIERED_STOP_AT_LEVEL = WHITE_BOX.getIntxVMFlag("TieredStopAtLevel").intValue();
+    private static int[] array = new int[10];
+    private static boolean success = true;
 
     @Retention(RetentionPolicy.RUNTIME)
     @interface Args {
@@ -366,10 +368,6 @@
         return true;
     }
 
-    static boolean success = true;
-
-    private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
-
     final HashMap<String,Method> tests = new HashMap<>();
     {
         for (Method m : this.getClass().getDeclaredMethods()) {
@@ -439,7 +437,9 @@
                 System.out.println(name + " bad result for bad input " + bad[i]);
                 success = false;
             }
-            if (Platform.isServer()) {
+            // Only perform these additional checks if C2 is available
+            if (Platform.isServer() &&
+                TIERED_STOP_AT_LEVEL == CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION) {
                 if (deoptimize && WHITE_BOX.isMethodCompiled(m)) {
                     System.out.println(name + " not deoptimized on invalid access");
                     success = false;
--- a/hotspot/test/compiler/tiered/ConstantGettersTransitionsTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/tiered/ConstantGettersTransitionsTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -31,9 +31,9 @@
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @build TransitionsTestExecutor ConstantGettersTransitionsTest
- * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
- *                   -XX:+WhiteBoxAPI -XX:+TieredCompilation
+ *                   -XX:+WhiteBoxAPI -XX:+TieredCompilation -XX:-UseCounterDecay
  *                   -XX:CompileCommand=compileonly,ConstantGettersTestCase$TrivialMethods::*
  *                   TransitionsTestExecutor ConstantGettersTransitionsTest
  * @summary Test the correctness of compilation level transitions for constant getters methods
--- a/hotspot/test/compiler/tiered/LevelTransitionTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/tiered/LevelTransitionTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -38,7 +38,7 @@
  * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+WhiteBoxAPI -XX:+TieredCompilation
- *                   -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCase$Helper::*
+ *                   -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
  *                   -XX:CompileCommand=compileonly,ExtendedTestCase$CompileMethodHolder::*
  *                   TransitionsTestExecutor LevelTransitionTest
  * @summary Test the correctness of compilation level transitions for different methods
@@ -80,7 +80,7 @@
     /**
      * Makes and verifies transitions between compilation levels
      */
-    protected void checkTransitions() {
+    protected void checkTransitions() throws Exception {
         checkNotCompiled();
         boolean finish = false;
         while (!finish) {
--- a/hotspot/test/compiler/tiered/NonTieredLevelsTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/tiered/NonTieredLevelsTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -29,11 +29,11 @@
  * @library /testlibrary /test/lib /compiler/whitebox /
  * @modules java.management
  * @build NonTieredLevelsTest
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
- *                              sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:-TieredCompilation
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
- *                   -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCase$Helper::*
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseCounterDecay
+ *                   -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
  *                   NonTieredLevelsTest
  * @summary Verify that only one level can be used
  * @author igor.ignatyev@oracle.com
--- a/hotspot/test/compiler/tiered/TieredLevelsTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/tiered/TieredLevelsTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -28,11 +28,11 @@
  * @library /testlibrary /test/lib /compiler/whitebox /
  * @modules java.management
  * @build TieredLevelsTest
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+TieredCompilation
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
- *                   -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCase$Helper::*
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseCounterDecay
+ *                   -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
  *                   TieredLevelsTest
  * @summary Verify that all levels &lt; 'TieredStopAtLevel' can be used
  * @author igor.ignatyev@oracle.com
--- a/hotspot/test/compiler/unsafe/UnsafeGetConstantField.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/unsafe/UnsafeGetConstantField.java	Thu Apr 28 14:44:52 2016 -0700
@@ -33,6 +33,7 @@
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.base/jdk.internal.vm.annotation
  *          java.base/jdk.internal.misc
+ *
  * @run main/bootclasspath -XX:+UnlockDiagnosticVMOptions
  *                         -Xbatch -XX:-TieredCompilation
  *                         -XX:+FoldStableValues
@@ -63,7 +64,6 @@
 import jdk.internal.misc.Unsafe;
 
 import java.io.IOException;
-import java.lang.reflect.Field;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
--- a/hotspot/test/compiler/unsafe/UnsafeGetStableArrayElement.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/unsafe/UnsafeGetStableArrayElement.java	Thu Apr 28 14:44:52 2016 -0700
@@ -26,24 +26,28 @@
 /*
  * @test
  * @summary tests on constant folding of unsafe get operations from stable arrays
- * @library /testlibrary /test/lib
- * @ignore 8151137
+ * @library /testlibrary
  *
  * @requires vm.flavor != "client"
  *
+ * @modules java.base/jdk.internal.vm.annotation
+ *          java.base/jdk.internal.misc
+
  * @run main/bootclasspath -XX:+UnlockDiagnosticVMOptions
  *                   -Xbatch -XX:-TieredCompilation
  *                   -XX:+FoldStableValues
  *                   -XX:CompileCommand=dontinline,*Test::test*
- *                   UnsafeGetStableArrayElement
+ *                   compiler.unsafe.UnsafeGetStableArrayElement
  */
+package compiler.unsafe;
+
 import jdk.internal.misc.Unsafe;
 import jdk.internal.vm.annotation.Stable;
 import java.util.concurrent.Callable;
+import jdk.test.lib.Platform;
 
 import static jdk.internal.misc.Unsafe.*;
 import static jdk.test.lib.Asserts.*;
-import static jdk.test.lib.Platform;
 
 public class UnsafeGetStableArrayElement {
     @Stable static final boolean[] STABLE_BOOLEAN_ARRAY = new boolean[16];
@@ -219,13 +223,7 @@
         Setter.reset();
     }
 
-    public static void main(String[] args) throws Exception {
-        if (Platform.isServer()) {
-            test();
-        }
-    }
-
-    static void test() throws Exception {
+    static void testUnsafeAccess() throws Exception {
         // boolean[], aligned accesses
         testMatched(   Test::testZ_Z, Test::changeZ);
         testMismatched(Test::testZ_B, Test::changeZ);
@@ -329,4 +327,11 @@
         run(Test::testL_I);
         run(Test::testL_F);
     }
+
+    public static void main(String[] args) throws Exception {
+        if (Platform.isServer()) {
+            testUnsafeAccess();
+        }
+        System.out.println("TEST PASSED");
+    }
 }
--- a/hotspot/test/compiler/whitebox/ClearMethodStateTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/ClearMethodStateTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -31,9 +31,9 @@
  * @library /testlibrary /test/lib /
  * @modules java.management
  * @build ClearMethodStateTest
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
- *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI ClearMethodStateTest
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+PrintCompilation -XX:-UseCounterDecay ClearMethodStateTest
  * @summary testing of WB::clearMethodState()
  * @author igor.ignatyev@oracle.com
  */
@@ -41,8 +41,8 @@
 
     public static void main(String[] args) throws Exception {
         String directive =
-                "[{ match:\"*SimpleTestCase$Helper.*\", BackgroundCompilation: false }, " +
-                " { match:\"*.*\", inline:\"-*SimpleTestCase$Helper.*\"}]";
+                "[{ match:\"*SimpleTestCaseHelper.*\", BackgroundCompilation: false }, " +
+                " { match:\"*.*\", inline:\"-*SimpleTestCaseHelper.*\"}]";
         if (WHITE_BOX.addCompilerDirective(directive) != 2) {
             throw new RuntimeException("Could not add directive");
         }
--- a/hotspot/test/compiler/whitebox/CompilerWhiteBoxTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/CompilerWhiteBoxTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -24,6 +24,7 @@
 
 import sun.hotspot.WhiteBox;
 import sun.hotspot.code.NMethod;
+
 import java.lang.reflect.Executable;
 import java.util.Objects;
 import java.util.concurrent.Callable;
@@ -58,6 +59,8 @@
     /** Value of {@code -XX:BackgroundCompilation} */
     protected static final boolean BACKGROUND_COMPILATION
             = Boolean.valueOf(getVMOption("BackgroundCompilation", "true"));
+    protected static final boolean USE_COUNTER_DECAY
+            = Boolean.valueOf(getVMOption("UseCounterDecay", "true"));
     /** Value of {@code -XX:TieredCompilation} */
     protected static final boolean TIERED_COMPILATION
             = Boolean.valueOf(getVMOption("TieredCompilation", "false"));
@@ -370,7 +373,10 @@
      * @return accumulated result
      * @see #compile(int)
      */
-    protected final int compile() {
+    protected final int compile() throws Exception {
+        if (USE_COUNTER_DECAY) {
+            throw new Exception("Tests using compile method must turn off counter decay for reliability");
+        }
         if (testCase.isOsr()) {
             return compile(1);
         } else {
--- a/hotspot/test/compiler/whitebox/DeoptimizeAllTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/DeoptimizeAllTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -29,9 +29,9 @@
  * @library /testlibrary /test/lib /
  * @modules java.management
  * @build DeoptimizeAllTest
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCase$Helper::* DeoptimizeAllTest
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseCounterDecay -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* DeoptimizeAllTest
  * @summary testing of WB::deoptimizeAll()
  * @author igor.ignatyev@oracle.com
  */
--- a/hotspot/test/compiler/whitebox/DeoptimizeFramesTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/DeoptimizeFramesTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -29,15 +29,15 @@
  * @library /testlibrary /test/lib /
  * @modules java.management
  * @build DeoptimizeFramesTest
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
- *                   -XX:+WhiteBoxAPI -Xmixed
+ *                   -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay
  *                   -XX:CompileCommand=compileonly,DeoptimizeFramesTest$TestCaseImpl::method
  *                   -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom -XX:-DeoptimizeALot
  *                   DeoptimizeFramesTest true
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
- *                   -XX:+WhiteBoxAPI -Xmixed
+ *                   -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay
  *                   -XX:CompileCommand=compileonly,DeoptimizeFramesTest$TestCaseImpl::method
  *                   -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom -XX:-DeoptimizeALot
  *                   DeoptimizeFramesTest false
--- a/hotspot/test/compiler/whitebox/DeoptimizeMethodTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/DeoptimizeMethodTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -29,9 +29,9 @@
  * @library /testlibrary /test/lib /
  * @modules java.management
  * @build DeoptimizeMethodTest
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
- *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCase$Helper::* DeoptimizeMethodTest
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseCounterDecay -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* DeoptimizeMethodTest
  * @summary testing of WB::deoptimizeMethod()
  * @author igor.ignatyev@oracle.com
  */
--- a/hotspot/test/compiler/whitebox/EnqueueMethodForCompilationTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/EnqueueMethodForCompilationTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -29,9 +29,9 @@
  * @library /testlibrary /test/lib /
  * @modules java.management
  * @build EnqueueMethodForCompilationTest
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI EnqueueMethodForCompilationTest
+ * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+PrintCompilation -XX:-UseCounterDecay EnqueueMethodForCompilationTest
  * @summary testing of WB::enqueueMethodForCompilation()
  * @author igor.ignatyev@oracle.com
  */
@@ -39,8 +39,8 @@
 
     public static void main(String[] args) throws Exception {
         String directive =
-                "[{ match:\"*SimpleTestCase$Helper.*\", BackgroundCompilation: false }, " +
-                " { match:\"*.*\", inline:\"-*SimpleTestCase$Helper.*\"}]";
+                "[{ match:\"*SimpleTestCaseHelper.*\", BackgroundCompilation: false }, " +
+                " { match:\"*.*\", inline:\"-*SimpleTestCaseHelper.*\"}]";
         if (WHITE_BOX.addCompilerDirective(directive) != 2) {
             throw new RuntimeException("Could not add directive");
         }
@@ -86,7 +86,10 @@
         checkNotCompiled();
         WHITE_BOX.clearMethodState(method);
 
-        WHITE_BOX.enqueueMethodForCompilation(method, compLevel, bci);
+        if (!WHITE_BOX.enqueueMethodForCompilation(method, compLevel, bci)) {
+           throw new RuntimeException(method
+                    + " could not be enqueued for compilation");
+        }
         checkCompiled();
         deoptimize();
         checkNotCompiled();
--- a/hotspot/test/compiler/whitebox/ForceNMethodSweepTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/ForceNMethodSweepTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -34,16 +34,16 @@
 
 /*
  * @test
- * @bug 8059624 8064669
+ * @bug 8059624 8064669 8153265
  * @library /testlibrary /test/lib /
  * @modules java.management
  * @build ForceNMethodSweepTest
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
- *                              sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
  *                   -XX:-TieredCompilation -XX:+WhiteBoxAPI
- *                   -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCase$Helper::*
- *                   -XX:-BackgroundCompilation ForceNMethodSweepTest
+ *                   -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
+ *                   -XX:-BackgroundCompilation -XX:-UseCounterDecay ForceNMethodSweepTest
  * @summary testing of WB::forceNMethodSweep
  */
 public class ForceNMethodSweepTest extends CompilerWhiteBoxTest {
@@ -60,6 +60,12 @@
 
     @Override
     protected void test() throws Exception {
+        // prime the asserts: get their bytecodes loaded, any lazy computation
+        // resolved, and executed once
+        Asserts.assertGT(1, 0, "message");
+        Asserts.assertLTE(0, 0, "message");
+        Asserts.assertLT(-1, 0, "message");
+
         checkNotCompiled();
         guaranteedSweep();
         int usage = getTotalUsage();
--- a/hotspot/test/compiler/whitebox/GetNMethodTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/GetNMethodTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -33,9 +33,9 @@
  * @library /testlibrary /test/lib /
  * @modules java.management
  * @build GetNMethodTest
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
- *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCase$Helper::* GetNMethodTest
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseCounterDecay -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* GetNMethodTest
  * @summary testing of WB::getNMethod()
  * @author igor.ignatyev@oracle.com
  */
--- a/hotspot/test/compiler/whitebox/IsMethodCompilableTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/IsMethodCompilableTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -27,12 +27,13 @@
  * @library /testlibrary /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.* sun.hotspot.WhiteBox
+ * @build jdk.test.lib.*
+ *        sun.hotspot.WhiteBox
  * @build IsMethodCompilableTest
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
- *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main ClassFileInstaller jdk.test.lib.Platform
- * @run main/othervm/timeout=2400 -Xbootclasspath/a:. -Xmixed -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:PerMethodRecompilationCutoff=3 -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCase$Helper::* IsMethodCompilableTest
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ *                                jdk.test.lib.Platform
+ * @run main/othervm/timeout=2400 -Xbootclasspath/a:. -Xmixed -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:PerMethodRecompilationCutoff=3 -XX:-UseCounterDecay -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* IsMethodCompilableTest
  * @summary testing of WB::isMethodCompilable()
  * @author igor.ignatyev@oracle.com
  */
--- a/hotspot/test/compiler/whitebox/LockCompilationTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/LockCompilationTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -29,7 +29,7 @@
  * @build LockCompilationTest
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI LockCompilationTest
+ * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseCounterDecay LockCompilationTest
  * @summary testing of WB::lock/unlockCompilation()
  */
 
@@ -47,10 +47,10 @@
         // This case waits for 5 seconds and verifies that the method hasn't been
         // compiled during that time. Only do that for one of the test cases.
 
-        // Only compile SimpleTestCase$Helper.method and exclude all other to ensure no
+        // Only compile SimpleTestCaseHelper.method and exclude all other to ensure no
         // contention on the compile queue causes problems.
         String directive =
-                "[{ match:\"*SimpleTestCase$Helper.method\", Exclude:false}, " +
+                "[{ match:\"*SimpleTestCaseHelper.method\", Exclude:false}, " +
                 " { match:\"*.*\", Exclude:true}]";
         if (WHITE_BOX.addCompilerDirective(directive) != 2) {
             throw new RuntimeException("Could not add directive");
--- a/hotspot/test/compiler/whitebox/MakeMethodNotCompilableTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/MakeMethodNotCompilableTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -29,9 +29,9 @@
  * @library /testlibrary /test/lib /
  * @modules java.management
  * @build MakeMethodNotCompilableTest
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
- *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI  -Xmixed MakeMethodNotCompilableTest
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay MakeMethodNotCompilableTest
  * @summary testing of WB::makeMethodNotCompilable()
  * @author igor.ignatyev@oracle.com
  */
@@ -39,8 +39,8 @@
     private int bci;
     public static void main(String[] args) throws Exception {
         String directive =
-                "[{ match:\"*SimpleTestCase$Helper.*\", BackgroundCompilation: false }, " +
-                " { match:\"*.*\", inline:\"-*SimpleTestCase$Helper.*\"}]";
+                "[{ match:\"*SimpleTestCaseHelper.*\", BackgroundCompilation: false }, " +
+                " { match:\"*.*\", inline:\"-*SimpleTestCaseHelper.*\"}]";
         if (WHITE_BOX.addCompilerDirective(directive) != 2) {
             throw new RuntimeException("Could not add directive");
         }
@@ -227,7 +227,7 @@
         return false;
     }
 
-    private int getBci() {
+    private int getBci() throws Exception {
         compile();
         checkCompiled();
         int result = WHITE_BOX.getMethodEntryBci(method);
--- a/hotspot/test/compiler/whitebox/SetDontInlineMethodTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/SetDontInlineMethodTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -31,7 +31,7 @@
  * @build SetDontInlineMethodTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCase$Helper::* SetDontInlineMethodTest
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* SetDontInlineMethodTest
  * @summary testing of WB::testSetDontInlineMethod()
  * @author igor.ignatyev@oracle.com
  */
--- a/hotspot/test/compiler/whitebox/SetForceInlineMethodTest.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/SetForceInlineMethodTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -31,7 +31,7 @@
  * @build SetForceInlineMethodTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCase$Helper::* SetForceInlineMethodTest
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* SetForceInlineMethodTest
  * @summary testing of WB::testSetForceInlineMethod()
  * @author igor.ignatyev@oracle.com
  */
--- a/hotspot/test/compiler/whitebox/SimpleTestCase.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/compiler/whitebox/SimpleTestCase.java	Thu Apr 28 14:44:52 2016 -0700
@@ -31,18 +31,17 @@
 
 public enum SimpleTestCase implements CompilerWhiteBoxTest.TestCase {
     /** constructor test case */
-    CONSTRUCTOR_TEST(Helper.CONSTRUCTOR, Helper.CONSTRUCTOR_CALLABLE, false),
+    CONSTRUCTOR_TEST(SimpleTestCaseHelper.CONSTRUCTOR, SimpleTestCaseHelper.CONSTRUCTOR_CALLABLE, false),
     /** method test case */
-    METHOD_TEST(Helper.METHOD, Helper.METHOD_CALLABLE, false),
+    METHOD_TEST(SimpleTestCaseHelper.METHOD, SimpleTestCaseHelper.METHOD_CALLABLE, false),
     /** static method test case */
-    STATIC_TEST(Helper.STATIC, Helper.STATIC_CALLABLE, false),
+    STATIC_TEST(SimpleTestCaseHelper.STATIC, SimpleTestCaseHelper.STATIC_CALLABLE, false),
     /** OSR constructor test case */
-    OSR_CONSTRUCTOR_TEST(Helper.OSR_CONSTRUCTOR,
-            Helper.OSR_CONSTRUCTOR_CALLABLE, true),
+    OSR_CONSTRUCTOR_TEST(SimpleTestCaseHelper.OSR_CONSTRUCTOR, SimpleTestCaseHelper.OSR_CONSTRUCTOR_CALLABLE, true),
     /** OSR method test case */
-    OSR_METHOD_TEST(Helper.OSR_METHOD, Helper.OSR_METHOD_CALLABLE, true),
+    OSR_METHOD_TEST(SimpleTestCaseHelper.OSR_METHOD, SimpleTestCaseHelper.OSR_METHOD_CALLABLE, true),
     /** OSR static method test case */
-    OSR_STATIC_TEST(Helper.OSR_STATIC, Helper.OSR_STATIC_CALLABLE, true);
+    OSR_STATIC_TEST(SimpleTestCaseHelper.OSR_STATIC, SimpleTestCaseHelper.OSR_STATIC_CALLABLE, true);
 
     private final Executable executable;
     private final Callable<Integer> callable;
@@ -69,20 +68,21 @@
     public boolean isOsr() {
         return isOsr;
     }
+}
 
-    private static class Helper {
+    class SimpleTestCaseHelper {
 
-        private static final Callable<Integer> CONSTRUCTOR_CALLABLE
+        public static final Callable<Integer> CONSTRUCTOR_CALLABLE
                 = new Callable<Integer>() {
             @Override
             public Integer call() throws Exception {
-                return new Helper(1337).hashCode();
+                return new SimpleTestCaseHelper(1337).hashCode();
             }
         };
 
-        private static final Callable<Integer> METHOD_CALLABLE
+        public static final Callable<Integer> METHOD_CALLABLE
                 = new Callable<Integer>() {
-            private final Helper helper = new Helper();
+            private final SimpleTestCaseHelper helper = new SimpleTestCaseHelper();
 
             @Override
             public Integer call() throws Exception {
@@ -90,7 +90,7 @@
             }
         };
 
-        private static final Callable<Integer> STATIC_CALLABLE
+        public static final Callable<Integer> STATIC_CALLABLE
                 = new Callable<Integer>() {
             @Override
             public Integer call() throws Exception {
@@ -98,17 +98,17 @@
             }
         };
 
-        private static final Callable<Integer> OSR_CONSTRUCTOR_CALLABLE
+        public static final Callable<Integer> OSR_CONSTRUCTOR_CALLABLE
                 = new Callable<Integer>() {
             @Override
             public Integer call() throws Exception {
-                return new Helper(null, CompilerWhiteBoxTest.BACKEDGE_THRESHOLD).hashCode();
+                return new SimpleTestCaseHelper(null, CompilerWhiteBoxTest.BACKEDGE_THRESHOLD).hashCode();
             }
         };
 
-        private static final Callable<Integer> OSR_METHOD_CALLABLE
+        public static final Callable<Integer> OSR_METHOD_CALLABLE
                 = new Callable<Integer>() {
-            private final Helper helper = new Helper();
+            private final SimpleTestCaseHelper helper = new SimpleTestCaseHelper();
 
             @Override
             public Integer call() throws Exception {
@@ -116,7 +116,7 @@
             }
         };
 
-        private static final Callable<Integer> OSR_STATIC_CALLABLE
+        public static final Callable<Integer> OSR_STATIC_CALLABLE
                 = new Callable<Integer>() {
             @Override
             public Integer call() throws Exception {
@@ -124,22 +124,22 @@
             }
         };
 
-        private static final Constructor CONSTRUCTOR;
-        private static final Constructor OSR_CONSTRUCTOR;
-        private static final Method METHOD;
-        private static final Method STATIC;
-        private static final Method OSR_METHOD;
-        private static final Method OSR_STATIC;
+        public static final Constructor CONSTRUCTOR;
+        public static final Constructor OSR_CONSTRUCTOR;
+        public static final Method METHOD;
+        public static final Method STATIC;
+        public static final Method OSR_METHOD;
+        public static final Method OSR_STATIC;
 
         static {
             try {
-                CONSTRUCTOR = Helper.class.getDeclaredConstructor(int.class);
+                CONSTRUCTOR = SimpleTestCaseHelper.class.getDeclaredConstructor(int.class);
             } catch (NoSuchMethodException | SecurityException e) {
                 throw new RuntimeException(
                         "exception on getting method Helper.<init>(int)", e);
             }
             try {
-                OSR_CONSTRUCTOR = Helper.class.getDeclaredConstructor(
+                OSR_CONSTRUCTOR = SimpleTestCaseHelper.class.getDeclaredConstructor(
                         Object.class, long.class);
             } catch (NoSuchMethodException | SecurityException e) {
                 throw new RuntimeException(
@@ -153,7 +153,7 @@
 
         private static Method getMethod(String name, Class<?>... parameterTypes) {
             try {
-                return Helper.class.getDeclaredMethod(name, parameterTypes);
+                return SimpleTestCaseHelper.class.getDeclaredMethod(name, parameterTypes);
             } catch (NoSuchMethodException | SecurityException e) {
                 throw new RuntimeException(
                         "exception on getting method Helper." + name, e);
@@ -195,7 +195,7 @@
          */
         private static int warmup(Method m) throws Exception {
             waitAndDeoptimize(m);
-            Helper helper = new Helper();
+            SimpleTestCaseHelper helper = new SimpleTestCaseHelper();
             int result = 0;
             for (long i = 0; i < CompilerWhiteBoxTest.THRESHOLD; ++i) {
                 result += (int)m.invoke(helper, 1);
@@ -254,12 +254,12 @@
         private final int x;
 
         // for method and OSR method test case
-        public Helper() {
+        public SimpleTestCaseHelper() {
             x = 0;
         }
 
         // for OSR constructor test case
-        private Helper(Object o, long limit) throws Exception {
+        private SimpleTestCaseHelper(Object o, long limit) throws Exception {
             int result = 0;
             if (limit != 1) {
                 result = warmup(OSR_CONSTRUCTOR);
@@ -272,7 +272,7 @@
         }
 
         // for constructor test case
-        private Helper(int x) {
+        private SimpleTestCaseHelper(int x) {
             this.x = x;
         }
 
@@ -281,4 +281,4 @@
             return x;
         }
     }
-}
+
--- a/hotspot/test/gc/g1/TestRegionLivenessPrint.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/gc/g1/TestRegionLivenessPrint.java	Thu Apr 28 14:44:52 2016 -0700
@@ -32,7 +32,7 @@
  * @build TestRegionLivenessPrint
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -XX:+WhiteBoxAPI -XX:+UseG1GC -Xmx128M -XX:G1HeapRegionSize=1m -Xlog:gc+liveness=trace TestRegionLivenessPrint
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UseG1GC -Xmx128M -XX:G1HeapRegionSize=1m -Xlog:gc+liveness=trace TestRegionLivenessPrint
  */
 
 import sun.hotspot.WhiteBox;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/gc/g1/humongousObjects/ClassLoaderGenerator.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2016, 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.
+ *
+ */
+package gc.g1.humongousObjects;
+
+import gc.testlibrary.Helpers;
+
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+/**
+ * Generates non-humongous and humongous class loaders.
+ * Since the generation depends on current host architecture it cannot be done as part of pre-compilation step
+ */
+public class ClassLoaderGenerator {
+    public static void main(String[] args) throws IOException {
+
+        if (args.length != 1) {
+            throw new Error("Test Bug: Expected region size wasn't provided as command line argument");
+        }
+
+        long regionSize = Long.parseLong(args[0]) * 1024 * 1024;
+
+        Path wrkDir = Paths.get("");
+        generateClassLoader(regionSize, wrkDir);
+
+    }
+
+    public static void generateClassLoader(long regionSize, Path wrkDir) throws IOException {
+        // Generating simple classloader
+        String finalSimpleClassLoaderPrototype = TestHumongousClassLoader.GENERIC_PROTOTYPE
+                .replace("${Methods}",
+                        TestHumongousClassLoader.LOAD_CLASS_METHOD_PROTOTYPE
+                                .replace("${ClassLoadFilter}",
+                                        "fileName.equals(\"" + TestHumongousClassLoader.HUMONGOUS_CLASSLOADER_NAME
+                                                + "\")"))
+                .replace("${ClassHeader}", TestHumongousClassLoader.CLASS_HEADER)
+                .replace("${ConstructorClause}", TestHumongousClassLoader.CONSTUCTOR_PROTOTYPE);
+
+        Helpers.generateByTemplateAndCompile(TestHumongousClassLoader.SIMPLE_CLASSLOADER_NAME, "ClassLoader",
+                finalSimpleClassLoaderPrototype, TestHumongousClassLoader.CONSTUCTOR_PROTOTYPE, regionSize / 4,
+                wrkDir, TestHumongousClassLoader.SIMPLE_CLASSLOADER_NAME + "Base");
+
+
+        // Preparations for generating humongous classloader
+
+        // Generating condition for loadClass method of generated class loader
+        // We want the generated class loader to load only classes from G1SampleClass enum
+        // All other classes should be loaded by parent classloader
+        // As result we get full loadClass method
+        StringBuilder classesToLoadBuilder = new StringBuilder();
+        for (G1SampleClass g1SampleClass : G1SampleClass.values()) {
+            if (classesToLoadBuilder.length() != 0) {
+                classesToLoadBuilder.append(" || ");
+            }
+            classesToLoadBuilder.append("fileName.startsWith(\"" + Helpers.enumNameToClassName(g1SampleClass.name())
+                    + "\")");
+        }
+
+        // Generating final class loader prototype - with specified methods,header and constructor
+        String finalHumongousClassLoaderPrototype = TestHumongousClassLoader.GENERIC_PROTOTYPE
+                .replace("${Methods}",
+                        TestHumongousClassLoader.LOAD_CLASS_METHOD_PROTOTYPE
+                                .replace("${ClassLoadFilter}", classesToLoadBuilder))
+                .replace("${ClassHeader}", TestHumongousClassLoader.CLASS_HEADER)
+                .replace("${ConstructorClause}", TestHumongousClassLoader.CONSTUCTOR_PROTOTYPE);
+
+
+        // Generating humongous classloader with specified name, base class, final class prototype and
+        // constructor prototype for filler classes
+        // Generated class instance should be humongous since we specify size of (regionSize * 3 / 4)
+        Helpers.generateByTemplateAndCompile(TestHumongousClassLoader.HUMONGOUS_CLASSLOADER_NAME, "ClassLoader",
+                finalHumongousClassLoaderPrototype, TestHumongousClassLoader.CONSTUCTOR_PROTOTYPE,
+                regionSize * 3 / 4,
+                wrkDir, TestHumongousClassLoader.HUMONGOUS_CLASSLOADER_NAME + "Base");
+
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/gc/g1/humongousObjects/TestHumongousClassLoader.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2016, 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.
+ *
+ */
+
+package gc.g1.humongousObjects;
+
+import gc.testlibrary.Helpers;
+import jdk.test.lib.Asserts;
+import sun.hotspot.WhiteBox;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+/**
+ * @test gc.g1.humongousObjects.TestHumongousClassLoader
+ * @summary Checks that unreachable classes and unreachable humongous class loader are unloaded after GC
+ * @requires vm.gc=="G1" | vm.gc=="null"
+ * @requires vm.opt.G1HeapRegionSize == "null" | vm.opt.G1HeapRegionSize == "1M"
+ * @library /testlibrary /test/lib /
+ * @modules java.management
+ * @build sun.hotspot.WhiteBox
+ *        gc.testlibrary.Helpers
+ *        gc.g1.humongousObjects.G1SampleClass
+ *        gc.g1.humongousObjects.ClassLoaderGenerator
+ *        gc.g1.humongousObjects.TestHumongousClassLoader
+ *
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ *
+ * @run main/othervm/timeout=240  -Xms256M -Xmx256M -XX:+WhiteBoxAPI -Xbootclasspath/a:.
+ *                                gc.g1.humongousObjects.ClassLoaderGenerator 1
+ *
+ * @run main/othervm -Xms256M -Xmx256M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
+ *                   -Xlog:classload,classunload=debug:file=TestHumongousClassLoader_Full_GC.log
+ *                   -XX:G1HeapRegionSize=1M
+ *                   gc.g1.humongousObjects.TestHumongousClassLoader FULL_GC
+ *
+ * @run main/othervm -Xms256M -Xmx256M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
+ *                   -Xlog:classload,classunload=debug:file=TestHumongousClassLoader_Full_GC_Mem_Pressure.log
+ *                   -XX:G1HeapRegionSize=1M
+ *                   gc.g1.humongousObjects.TestHumongousClassLoader FULL_GC_MEMORY_PRESSURE
+ *
+ *@run main/othervm -Xms256M -Xmx256M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
+ *                   -Xlog:classload,classunload=debug:file=TestHumongousClassLoader_CMC.log
+ *                   -XX:G1HeapRegionSize=1M -XX:MaxTenuringThreshold=1
+ *                   gc.g1.humongousObjects.TestHumongousClassLoader CMC
+ *
+ */
+
+public class TestHumongousClassLoader {
+
+    private static final WhiteBox WB = WhiteBox.getWhiteBox();
+    private static final String SAMPLE_CLASS_NAME_PREFIX = "SampleClassFiller";
+    public static final String SIMPLE_CLASSLOADER_NAME = "SimpleClassLoader";
+    public static final String HUMONGOUS_CLASSLOADER_NAME = "HumongousClassLoader";
+
+
+    public static final String LOAD_CLASS_METHOD_PROTOTYPE =
+            "    @Override\n"
+                    + "    public Class loadClass(String fileName) throws ClassNotFoundException {\n"
+                    + "        if (${ClassLoadFilter}) {\n"
+                    + "            System.out.println(\"Loading class \" + fileName);\n"
+                    + "            byte[] b = null;\n"
+                    + "            try {\n"
+                    + "                b = Files.readAllBytes(new File(fileName + \".class\").toPath());\n"
+                    + "            } catch (IOException e) {\n"
+                    + "                e.printStackTrace();\n"
+                    + "            }\n"
+                    + "            Class c = defineClass(fileName, b, 0, b.length);\n"
+                    + "            resolveClass(c);\n"
+                    + "            return c;\n"
+                    + "        } else {\n"
+                    + "            return super.loadClass(fileName);\n"
+                    + "        }\n"
+                    + "\n"
+                    + "\n"
+                    + "    }\n";
+
+    public static final String CLASS_HEADER = "import java.io.File;\n"
+            + "import java.io.IOException;\n"
+            + "import java.nio.file.Files;\n"
+            + "import java.nio.file.Paths;\n";
+
+    public static final String GENERIC_PROTOTYPE = "${ClassHeader}\n"
+            + "public class ${ClassName} extends ${BaseClass}{\n"
+            + "    ${ConstructorClause}\n"
+            + "    ${Methods}\n"
+            + "    ${Fields}\n"
+            + "}\n";
+
+    public static final String CONSTUCTOR_PROTOTYPE = "public ${ClassName}(ClassLoader parent) { super(parent);}\n";
+
+    private enum GC {
+        FULL_GC {
+            @Override
+            public void provoke() {
+                System.gc();
+            }
+        },
+        CMC {
+            @Override
+            public void provoke() {
+                // We need 2 young gc to promote class loader to old gen
+                // Otherwise it will not be unloaded after CMC
+                WHITE_BOX.youngGC();
+                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
+                WHITE_BOX.youngGC();
+                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
+                WHITE_BOX.g1StartConcMarkCycle();
+                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
+            }
+        },
+        FULL_GC_MEMORY_PRESSURE {
+            @Override
+            public void provoke() {
+                WHITE_BOX.fullGC();
+            }
+        };
+        private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
+
+        public abstract void provoke();
+    }
+
+    public static void main(String[] args) throws ClassNotFoundException, InstantiationException,
+            IllegalAccessException, IOException, NoSuchMethodException, InvocationTargetException {
+
+        if (args.length != 1) {
+            throw new Error("Test Bug: Expected GC type wasn't provided as command line argument");
+        }
+        GC gc = GC.valueOf(args[0]);
+
+        Path wrkDir = Paths.get("");
+        URL[] url = {wrkDir.toUri().toURL()};
+        URLClassLoader urlLoader = new URLClassLoader(url);
+
+        Class<?> simpleClassLoaderClass = urlLoader.loadClass(SIMPLE_CLASSLOADER_NAME);
+
+        ClassLoader simpleClassLoader = (ClassLoader) simpleClassLoaderClass
+                .getConstructor(java.lang.ClassLoader.class)
+                .newInstance(TestHumongousClassLoader.class.getClassLoader());
+
+        // Sanity check
+        Asserts.assertEquals(WB.g1IsHumongous(simpleClassLoader), false,
+                "Test Bug: simpleClassLoader is expected to be non-humongous but it's humongous");
+
+
+        Class<?> humongousClassLoaderClass = simpleClassLoader.loadClass(HUMONGOUS_CLASSLOADER_NAME);
+
+        ClassLoader humongousClassLoader = (ClassLoader) humongousClassLoaderClass
+                .getConstructor(java.lang.ClassLoader.class)
+                .newInstance(simpleClassLoader);
+
+        // Sanity check
+        Asserts.assertEquals(WB.g1IsHumongous(humongousClassLoader), true,
+                "Test Bug: humongousClassLoader is expected to be humongous but it's non-humongous");
+
+        //Asserts.assertEquals(1,0);
+
+        Object[] loadedClasses = new Object[]{
+                G1SampleClass.LARGEST_NON_HUMONGOUS.getCls(humongousClassLoader, wrkDir, SAMPLE_CLASS_NAME_PREFIX)
+                        .newInstance(),
+                G1SampleClass.SMALLEST_HUMONGOUS.getCls(humongousClassLoader, wrkDir, SAMPLE_CLASS_NAME_PREFIX)
+                        .newInstance(),
+                G1SampleClass.ONE_REGION_HUMONGOUS.getCls(humongousClassLoader, wrkDir, SAMPLE_CLASS_NAME_PREFIX)
+                        .newInstance(),
+                G1SampleClass.TWO_REGION_HUMONGOUS.getCls(humongousClassLoader, wrkDir, SAMPLE_CLASS_NAME_PREFIX)
+                        .newInstance(),
+        };
+
+        // forgetting references to loaded classes
+        for (int i = 0; i < loadedClasses.length; ++i) {
+            loadedClasses[i] = null;
+        }
+
+        // forgetting referencies to classloaders
+        humongousClassLoader = null;
+        humongousClassLoaderClass = null;
+
+        simpleClassLoader = null;
+        simpleClassLoaderClass = null;
+
+        gc.provoke();
+
+        // Test checks
+        Asserts.assertEquals(WB.isClassAlive(HUMONGOUS_CLASSLOADER_NAME), false,
+                String.format("Classloader class %s is loaded after we forget all references to it",
+                        HUMONGOUS_CLASSLOADER_NAME));
+
+        for (G1SampleClass sampleClass : G1SampleClass.values()) {
+            String className = Helpers.enumNameToClassName(sampleClass.name()) + "Class";
+            Asserts.assertEquals(WB.isClassAlive(className), false,
+                    String.format("Class %s is loaded after we forget all references to it", className));
+        }
+    }
+
+}
--- a/hotspot/test/gc/g1/mixedgc/TestLogging.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/gc/g1/mixedgc/TestLogging.java	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, 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 @@
  * @summary Check that a mixed GC is reflected in the gc logs
  * @requires vm.gc=="G1" | vm.gc=="null"
  * @library /testlibrary /test/lib
- * @ignore 8138607
  * @modules java.management
  * @build sun.hotspot.WhiteBox gc.g1.mixedgc.TestLogging
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
@@ -57,8 +56,8 @@
             "-XX:SurvivorRatio=1", // Survivor-to-eden ratio is 1:1
             "-Xms10M", "-Xmx10M",
             "-XX:MaxTenuringThreshold=1", // promote objects after first gc
-            "-XX:InitiatingHeapOccupancyPercent=0", // marking cycle happens
-            // each time
+            "-XX:InitiatingHeapOccupancyPercent=100", // set initial CMC threshold and disable adaptive IHOP
+            "-XX:-G1UseAdaptiveIHOP",                 // to avoid additional concurrent cycles caused by ergonomics
             "-XX:G1MixedGCCountTarget=4",
             "-XX:MaxGCPauseMillis=30000", // to have enough time
             "-XX:G1HeapRegionSize=1m", "-XX:G1HeapWastePercent=0",
@@ -120,8 +119,8 @@
         // Allocates buffer and promotes it to the old gen. Mix live and dead old
         // objects
         for (int i = 0; i < TestLogging.ALLOCATION_COUNT; ++i) {
-            liveOldObjects.add(new byte[TestLogging.ALLOCATION_SIZE * 10]);
-            deadOldObjects.add(new byte[TestLogging.ALLOCATION_SIZE * 10]);
+            liveOldObjects.add(new byte[TestLogging.ALLOCATION_SIZE * 5]);
+            deadOldObjects.add(new byte[TestLogging.ALLOCATION_SIZE * 5]);
         }
 
         // need only 2 promotions to promote objects to the old gen
--- a/hotspot/test/gc/testlibrary/Helpers.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/gc/testlibrary/Helpers.java	Thu Apr 28 14:44:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016 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,6 +32,7 @@
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
+import java.nio.file.Paths;
 
 public class Helpers {
 
@@ -45,14 +46,14 @@
 
     /**
      * According class file format theoretical amount of fields in class is u2 which is (256 * 256 - 1).
-     * Some service info takes place in constant pool and we really could make a class with only (256 * 256 - 29)
-     * fields.
+     * Some service info takes place in constant pool and we really could make a class with lesser amount of fields.
+     *
      * Since the exact value is not so important and I would like to avoid issues that may be caused by future changes/
-     * different archs etc I selected (256 * 256 - 32) for this constant.
+     * different archs etc I selected (256 * 256 - 1024) for this constant.
      * The test works with other values too but the smaller the number the more classes we need to generate and it takes
      * more time
      */
-    private static final int MAXIMUM_AMOUNT_OF_FIELDS_IN_CLASS = 256 * 256 - 32;
+    private static final int MAXIMUM_AMOUNT_OF_FIELDS_IN_CLASS = 256 * 256 - 1024;
 
     /**
      * Detects amount of extra bytes required to allocate a byte array.
@@ -140,6 +141,28 @@
     }
 
     /**
+     * Generates specified amount of long fields
+     * Result string will looks like this:
+     * <p>
+     * long f0;
+     * ...
+     * long fNNN;
+     *
+     * @param fieldCount count of long fields
+     * @return generated fields
+     */
+    private static String fieldsGenerator(long fieldCount) {
+        StringBuilder fieldsBuilder = new StringBuilder();
+
+        for (int i = 0; i < fieldCount; ++i) {
+            fieldsBuilder.append(String.format("long f%d;\n", i));
+        }
+
+        return fieldsBuilder.toString();
+    }
+
+
+    /**
      * Changes string from enum notation to class notation - i.e. "VERY_SMALL_CAT" to "VerySmallCat"
      *
      * @param enumName string in enum notation
@@ -216,22 +239,121 @@
             // for the last generated class we use specified class name
             String clsName = (i == generatedClassesCount - 1) ? className : prefix + i;
 
-            Helpers.compileClass(clsName, workDir,
-                    Helpers.generate(
-                            clsName,
-                            // for first generated class we don't have 'extends'
-                            (i == 0 ? null : prefix + (i - 1)),
-                            null,
-                            // for the last generated class we use different field count
-                            (i == generatedClassesCount - 1) ? fieldsInLastClassCount
-                                    : MAXIMUM_AMOUNT_OF_FIELDS_IN_CLASS));
+            // If we already have a file with the same name we do not create it again
+            if (Files.notExists(Paths.get(clsName + ".java"))) {
+                Helpers.compileClass(clsName, workDir,
+                        Helpers.generate(
+                                clsName,
+                                // for first generated class we don't have 'extends'
+                                (i == 0 ? null : prefix + (i - 1)),
+                                null,
+                                // for the last generated class we use different field count
+                                (i == generatedClassesCount - 1) ? fieldsInLastClassCount
+                                        : MAXIMUM_AMOUNT_OF_FIELDS_IN_CLASS));
+            } else {
+                System.out.println("Class " + clsName +
+                        ".java already exists, skipping class' generation and compilation");
+            }
+
         }
         return classLoader.loadClass(className);
     }
 
     /**
+     * Creates a class which instances will be approximately of the requested size.
+     * This method produces a java source from a class template by substituting values instead of parameters.
+     * Then the obtained source is compiled.
+     * Generated class will looks like this:
+     * classTemplate
+     * constructorTemplate
+     * long f0;
+     * ...
+     * long fNNN;
+     * <p>
+     * }
+     *
+     * @param className    generated class name
+     * @param baseClass    base class
+     * @param classTemplate class template - the first part of class. ${ClassName} and ${BaseClass} will be replaced
+     *                      with values from className and baseClass,one entry of ${Fields} will be replaced with
+     *                      generated long fields. Class template should look like this:
+     *                      imports;
+     *                      public class ${ClassName} extends ${BaseClass} {
+     *                         public ${ClassName}  { some code here;}
+     *                         some methods
+     *                         ${Fields}
+     *
+     *                      }
+     * @param constructorTemplate constructor template, ${ClassName} would be replaced on actual class name
+     * @param instanceSize size of generated class' instance. Size should be aligned by 8 bytes
+     * @param workDir      working dir where generated classes are put and compiled
+     * @param prefix       prefix for service classes (ones we use to create chain of inheritance).
+     *                     The names will be prefix_1, prefix_2,.., prefix_n
+     * @return Class object of generated and compiled class loaded in specified class loader
+     * @throws IOException if cannot write or read to workDir
+     */
+    public static void generateByTemplateAndCompile(String className, String baseClass, String classTemplate,
+                                                    String constructorTemplate, long instanceSize, Path workDir,
+                                                    String prefix) throws IOException {
+
+        if (instanceSize % SIZE_OF_LONG != 0L) {
+            throw new Error(String.format("Test bug: only sizes aligned by %d bytes are supported and %d was specified",
+                    SIZE_OF_LONG, instanceSize));
+        }
+
+        int instanceSizeWithoutObjectHeaderInWords =
+                (int) (instanceSize - WhiteBox.getWhiteBox().getObjectSize(new Object())) / SIZE_OF_LONG;
+
+        if (instanceSizeWithoutObjectHeaderInWords <= 0) {
+            throw new Error(String.format("Test bug: specified instance size is too small - %d."
+                    + " Cannot generate any classes", instanceSize));
+        }
+
+        int sizeOfLastFile = instanceSizeWithoutObjectHeaderInWords % MAXIMUM_AMOUNT_OF_FIELDS_IN_CLASS;
+        int generatedClassesCount = instanceSizeWithoutObjectHeaderInWords / MAXIMUM_AMOUNT_OF_FIELDS_IN_CLASS;
+
+        // Do all the classes have the maximum number of fields?
+        int fieldsInLastClassCount;
+
+        if (sizeOfLastFile == 0) {
+            fieldsInLastClassCount = MAXIMUM_AMOUNT_OF_FIELDS_IN_CLASS;
+        } else {
+            generatedClassesCount++;
+            fieldsInLastClassCount = sizeOfLastFile;
+        }
+
+        // first (generatedClassesCount - 1) classes are just fillers - just long fields and constructor
+        for (int i = 0; i < generatedClassesCount - 1; i++) {
+            String clsName = prefix + i;
+
+            Helpers.compileClass(clsName, workDir,
+                    Helpers.generate(
+                            clsName,
+                            // first generated class extends base class
+                            (i == 0 ? baseClass : prefix + (i - 1)),
+                            constructorTemplate.replace("${ClassName}", clsName),
+                            MAXIMUM_AMOUNT_OF_FIELDS_IN_CLASS));
+        }
+
+        // generating last class - the one with specified className
+        Helpers.compileClass(className, workDir,
+                classTemplate.replaceAll("\\$\\{ClassName\\}", className)
+                        // if no fillers were generated (generatedClassesCount == 1)
+                        // the last class should extends baseClass
+                        // otherwise it should extend last generated filler class which name is
+                        // prefix + (generatedClassesCount - 2)
+                        // generatedClassesCount is always not smaller than 1
+                        .replace("${BaseClass}",
+                                generatedClassesCount == 1 ? baseClass :
+                                        prefix + (generatedClassesCount - 2))
+                        .replace("${Fields}", fieldsGenerator(fieldsInLastClassCount))
+        );
+    }
+
+    /**
      * Waits until Concurent Mark Cycle finishes
-     * @param wb  Whitebox instance
+     *
+     * @param wb        Whitebox instance
      * @param sleepTime sleep time
      */
     public static void waitTillCMCFinished(WhiteBox wb, int sleepTime) {
--- a/hotspot/test/runtime/8003720/Asmator.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2012, 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.
- *
- */
-
-import jdk.internal.org.objectweb.asm.*;
-
-class Asmator {
-    static byte[] fixup(byte[] buf) throws java.io.IOException {
-        ClassReader cr = new ClassReader(buf);
-        ClassWriter cw = new ClassWriter(0);
-        ClassVisitor cv = new ClassVisitor(Opcodes.ASM4, cw) {
-            public MethodVisitor visitMethod(
-                final int access,
-                final String name,
-                final String desc,
-                final String signature,
-                final String[] exceptions)
-            {
-                MethodVisitor mv = super.visitMethod(access,
-                        name,
-                        desc,
-                        signature,
-                        exceptions);
-                if (mv == null)  return null;
-                if (name.equals("callme")) {
-                    // make receiver go dead!
-                    mv.visitInsn(Opcodes.ACONST_NULL);
-                    mv.visitVarInsn(Opcodes.ASTORE, 0);
-                }
-                return mv;
-            }
-        };
-        cr.accept(cv, 0);
-        return cw.toByteArray();
-    }
-}
--- a/hotspot/test/runtime/8003720/Test8003720.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- *
- */
-
-/*
- * @test
- * @bug 8003720
- * @summary Method in interpreter stack frame can be deallocated
- * @modules java.base/jdk.internal.org.objectweb.asm
- *          java.base/jdk.internal.misc
- * @compile -XDignore.symbol.file Victim.java
- * @run main/othervm -Xverify:all -Xint Test8003720
- */
-
-// Attempts to make the JVM unload a class while still executing one of its methods.
-public class Test8003720 {
-    final static String VICTIM_CLASS_NAME = "Victim";
-    final static boolean QUIET = true;
-    final static long DURATION = 30000;
-
-    public interface CallMe { void callme(); }
-
-    public static void main(String... av) throws Throwable {
-        newVictimClassLoader();
-        System.gc();
-
-        newVictimClass();
-        System.gc();
-
-        newVictimInstance();
-        System.gc();
-
-        ((CallMe)newVictimInstance()).callme();
-    }
-
-    public static Object newVictimInstance() throws Throwable {
-        return newVictimClass().newInstance();
-    }
-
-    public static Class<?> newVictimClass() throws Throwable {
-        return Class.forName(VICTIM_CLASS_NAME, true, new VictimClassLoader());
-    }
-
-    public static ClassLoader newVictimClassLoader() throws Throwable {
-        return new VictimClassLoader();
-    }
-
-    public static void println(String line) {
-        if (!QUIET) {
-            System.out.println(line);
-        }
-    }
-}
--- a/hotspot/test/runtime/8003720/Victim.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2012, 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 Victim implements Test8003720.CallMe {
-    public void callme() {
-        // note: Victim.this is dead here
-        Test8003720.println("executing in loader=" + Victim.class.getClassLoader());
-
-        long now = System.currentTimeMillis();
-
-        while ((System.currentTimeMillis() - now) < Test8003720.DURATION) {
-            long count = VictimClassLoader.counter++;
-            if (count %  1000000 == 0)  System.gc();
-            if (count % 16180000 == 0)  blurb();
-            new Object[1].clone();
-        }
-    }
-    static void blurb() {
-        Test8003720.println("count=" + VictimClassLoader.counter);
-    }
-    static {
-        blather();
-    }
-    static void blather() {
-        new java.util.ArrayList<Object>(1000000);
-        Class<Victim> c = Victim.class;
-        Test8003720.println("initializing " + c + "#" + System.identityHashCode(c) + " in " + c.getClassLoader());
-    }
-}
--- a/hotspot/test/runtime/8003720/VictimClassLoader.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2012, 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 VictimClassLoader extends ClassLoader {
-    public static long counter = 0;
-
-    private int which = (int) ++counter;
-
-    protected VictimClassLoader() {
-        super(VictimClassLoader.class.getClassLoader());
-    }
-
-    protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException {
-        Class c;
-        if (!name.endsWith("Victim")) {
-            c = super.loadClass(name, resolve);
-            return c;
-        }
-
-        c = findLoadedClass(name);
-        if (c != null) {
-            return c;
-        }
-
-        byte[] buf = readClassFile(name);
-        c = defineClass(name, buf, 0, buf.length);
-        resolveClass(c);
-
-        if (c.getClassLoader() != this) {
-            throw new AssertionError();
-        }
-
-        Test8003720.println("loaded " + c + "#" + System.identityHashCode(c) + " in " + c.getClassLoader());
-        return c;
-    }
-
-    static byte[] readClassFile(String name) {
-        try {
-            String rname = name.substring(name.lastIndexOf('.') + 1) + ".class";
-            java.net.URL url = VictimClassLoader.class.getResource(rname);
-            Test8003720.println("found " + rname + " = " + url);
-
-            java.net.URLConnection connection = url.openConnection();
-            int contentLength = connection.getContentLength();
-            byte[] buf = readFully(connection.getInputStream(), contentLength);
-
-            return Asmator.fixup(buf);
-        } catch (java.io.IOException ex) {
-            throw new Error(ex);
-        }
-    }
-
-    static byte[] readFully(java.io.InputStream in, int len) throws java.io.IOException {
-        byte[] b = in.readAllBytes();
-        if (len != -1 && b.length != len)
-            throw new java.io.IOException("Expected:" + len + ", actual:" + b.length);
-        return b;
-    }
-
-    public void finalize() {
-        Test8003720.println("Goodbye from " + this);
-    }
-
-    public String toString() {
-        return "VictimClassLoader#" + which;
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/MirrorFrame/Asmator.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ */
+
+import jdk.internal.org.objectweb.asm.*;
+
+class Asmator {
+    static byte[] fixup(byte[] buf) throws java.io.IOException {
+        ClassReader cr = new ClassReader(buf);
+        ClassWriter cw = new ClassWriter(0);
+        ClassVisitor cv = new ClassVisitor(Opcodes.ASM4, cw) {
+            public MethodVisitor visitMethod(
+                final int access,
+                final String name,
+                final String desc,
+                final String signature,
+                final String[] exceptions)
+            {
+                MethodVisitor mv = super.visitMethod(access,
+                        name,
+                        desc,
+                        signature,
+                        exceptions);
+                if (mv == null)  return null;
+                if (name.equals("callme")) {
+                    // make receiver go dead!
+                    mv.visitInsn(Opcodes.ACONST_NULL);
+                    mv.visitVarInsn(Opcodes.ASTORE, 0);
+                }
+                return mv;
+            }
+        };
+        cr.accept(cv, 0);
+        return cw.toByteArray();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/MirrorFrame/Test8003720.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ *
+ */
+
+/*
+ * @test
+ * @bug 8003720
+ * @summary Method in interpreter stack frame can be deallocated
+ * @modules java.base/jdk.internal.org.objectweb.asm
+ *          java.base/jdk.internal.misc
+ * @compile -XDignore.symbol.file Victim.java
+ * @run main/othervm -Xverify:all -Xint Test8003720
+ */
+
+// Attempts to make the JVM unload a class while still executing one of its methods.
+public class Test8003720 {
+    final static String VICTIM_CLASS_NAME = "Victim";
+    final static boolean QUIET = true;
+    final static long DURATION = 30000;
+
+    public interface CallMe { void callme(); }
+
+    public static void main(String... av) throws Throwable {
+        newVictimClassLoader();
+        System.gc();
+
+        newVictimClass();
+        System.gc();
+
+        newVictimInstance();
+        System.gc();
+
+        ((CallMe)newVictimInstance()).callme();
+    }
+
+    public static Object newVictimInstance() throws Throwable {
+        return newVictimClass().newInstance();
+    }
+
+    public static Class<?> newVictimClass() throws Throwable {
+        return Class.forName(VICTIM_CLASS_NAME, true, new VictimClassLoader());
+    }
+
+    public static ClassLoader newVictimClassLoader() throws Throwable {
+        return new VictimClassLoader();
+    }
+
+    public static void println(String line) {
+        if (!QUIET) {
+            System.out.println(line);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/MirrorFrame/Victim.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2012, 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 Victim implements Test8003720.CallMe {
+    public void callme() {
+        // note: Victim.this is dead here
+        Test8003720.println("executing in loader=" + Victim.class.getClassLoader());
+
+        long now = System.currentTimeMillis();
+
+        while ((System.currentTimeMillis() - now) < Test8003720.DURATION) {
+            long count = VictimClassLoader.counter++;
+            if (count %  1000000 == 0)  System.gc();
+            if (count % 16180000 == 0)  blurb();
+            new Object[1].clone();
+        }
+    }
+    static void blurb() {
+        Test8003720.println("count=" + VictimClassLoader.counter);
+    }
+    static {
+        blather();
+    }
+    static void blather() {
+        new java.util.ArrayList<Object>(1000000);
+        Class<Victim> c = Victim.class;
+        Test8003720.println("initializing " + c + "#" + System.identityHashCode(c) + " in " + c.getClassLoader());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/MirrorFrame/VictimClassLoader.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2012, 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 VictimClassLoader extends ClassLoader {
+    public static long counter = 0;
+
+    private int which = (int) ++counter;
+
+    protected VictimClassLoader() {
+        super(VictimClassLoader.class.getClassLoader());
+    }
+
+    protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException {
+        Class c;
+        if (!name.endsWith("Victim")) {
+            c = super.loadClass(name, resolve);
+            return c;
+        }
+
+        c = findLoadedClass(name);
+        if (c != null) {
+            return c;
+        }
+
+        byte[] buf = readClassFile(name);
+        c = defineClass(name, buf, 0, buf.length);
+        resolveClass(c);
+
+        if (c.getClassLoader() != this) {
+            throw new AssertionError();
+        }
+
+        Test8003720.println("loaded " + c + "#" + System.identityHashCode(c) + " in " + c.getClassLoader());
+        return c;
+    }
+
+    static byte[] readClassFile(String name) {
+        try {
+            String rname = name.substring(name.lastIndexOf('.') + 1) + ".class";
+            java.net.URL url = VictimClassLoader.class.getResource(rname);
+            Test8003720.println("found " + rname + " = " + url);
+
+            java.net.URLConnection connection = url.openConnection();
+            int contentLength = connection.getContentLength();
+            byte[] buf = readFully(connection.getInputStream(), contentLength);
+
+            return Asmator.fixup(buf);
+        } catch (java.io.IOException ex) {
+            throw new Error(ex);
+        }
+    }
+
+    static byte[] readFully(java.io.InputStream in, int len) throws java.io.IOException {
+        byte[] b = in.readAllBytes();
+        if (len != -1 && b.length != len)
+            throw new java.io.IOException("Expected:" + len + ", actual:" + b.length);
+        return b;
+    }
+
+    public void finalize() {
+        Test8003720.println("Goodbye from " + this);
+    }
+
+    public String toString() {
+        return "VictimClassLoader#" + which;
+    }
+}
--- a/hotspot/test/runtime/SharedArchiveFile/BasicJarBuilder.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2015, 2016, 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.
- */
-
-/*
- * @summary Simple jar builder
- *   Input: jarName className1 className2 ...
- *     do not specify extensions, just the names
- *     E.g. prot_domain ProtDomainA ProtDomainB
- *   Output: A jar containing compiled classes, placed in a test classes folder
- */
-
-import jdk.test.lib.*;
-
-import java.io.File;
-import java.util.ArrayList;
-import sun.tools.jar.Main;
-
-// Using JarBuilder requires that all to-be-jarred classes should be placed
-// in the current working directory, aka "."
-public class BasicJarBuilder {
-    private static final String classDir = System.getProperty("test.classes");
-
-    public static void build(boolean classesInWorkDir, String jarName,
-        String ...classNames) throws Exception {
-
-        if (classesInWorkDir) {
-            createSimpleJar(".", classDir + File.separator + jarName + ".jar", classNames);
-        } else {
-            build(jarName, classNames);
-        }
-    }
-
-    public static void build(String jarName, String ...classNames) throws Exception {
-        createSimpleJar(classDir, classDir + File.separator + jarName + ".jar",
-            classNames);
-    }
-
-    private static void createSimpleJar(String jarclassDir, String jarName,
-        String[] classNames) throws Exception {
-        ArrayList<String> args = new ArrayList<String>();
-        args.add("cf");
-        args.add(jarName);
-        addClassArgs(args, jarclassDir, classNames);
-        createJar(args);
-    }
-
-    private static void addClassArgs(ArrayList<String> args, String jarclassDir,
-        String[] classNames) {
-
-        for (String name : classNames) {
-            args.add("-C");
-            args.add(jarclassDir);
-            args.add(name + ".class");
-        }
-    }
-
-    private static void createJar(ArrayList<String> args) {
-        Main jarTool = new Main(System.out, System.err, "jar");
-        if (!jarTool.run(args.toArray(new String[1]))) {
-            throw new RuntimeException("jar operation failed");
-        }
-    }
-
-    // Get full path to the test jar
-    public static String getTestJar(String jar) {
-        File dir = new File(System.getProperty("test.classes", "."));
-        File jarFile = new File(dir, jar);
-        if (!jarFile.exists()) {
-            throw new RuntimeException("Cannot find " + jarFile.getPath());
-        }
-        if (!jarFile.isFile()) {
-            throw new RuntimeException("Not a regular file: " + jarFile.getPath());
-        }
-        return jarFile.getPath();
-    }
-}
--- a/hotspot/test/runtime/SharedArchiveFile/LimitSharedSizes.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/LimitSharedSizes.java	Thu Apr 28 14:44:52 2016 -0700
@@ -125,7 +125,7 @@
 
         // test with sizes which just meet the minimum required sizes
         // the following tests also attempt to use the shared archive
-        new SharedSizeTestData(Region.RO, Platform.is64bit() ? "9M":"8M", Result.VALID_ARCHIVE),
+        new SharedSizeTestData(Region.RO, Platform.is64bit() ? "10M":"9M", Result.VALID_ARCHIVE),
         new SharedSizeTestData(Region.RW, Platform.is64bit() ? "12M":"7M", Result.VALID_ARCHIVE),
         new SharedSizeTestData(Region.MD, Platform.is64bit() ? "4M":"2M", Result.VALID_ARCHIVE),
         new SharedSizeTestData(Region.MC, "120k", Result.VALID_ARCHIVE),
@@ -176,7 +176,7 @@
                                output.getOutput().contains("Unable to reserve shared space at required address")) &&
                                output.getExitValue() == 1) {
                                System.out.println("Unable to use shared archive: test not executed; assumed passed");
-                               return;
+                               continue;
                           }
                       }
                       output.shouldHaveExitValue(0);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/SharedArchiveFile/SASymbolTableTest.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+/*
+ * @test SASymbolTableTest
+ * @summary Walk symbol table using SA, with and without CDS.
+ * @library /testlibrary
+ * @modules java.base/jdk.internal.misc
+ *          jdk.hotspot.agent/sun.jvm.hotspot.oops
+ *          jdk.hotspot.agent/sun.jvm.hotspot.memory
+ *          jdk.hotspot.agent/sun.jvm.hotspot.runtime
+ *          jdk.hotspot.agent/sun.jvm.hotspot.tools
+ *          java.management
+ * @build SASymbolTableTestAgent SASymbolTableTestAttachee jdk.test.lib.*
+ * @run main SASymbolTableTest
+ */
+
+import jdk.test.lib.*;
+
+/*
+ * The purpose of this test is to validate that we can use SA to
+ * attach a process and walk its SymbolTable, regardless whether
+ * the attachee process runs in CDS mode or not.
+ *
+ * SASymbolTableTest Just sets up the agent and attachee processes.
+ * The SymbolTable walking is done in the SASymbolTableTestAgent class.
+ */
+public class SASymbolTableTest {
+    static String jsaName = "./SASymbolTableTest.jsa";
+
+    public static void main(String[] args) throws Exception {
+        if (!Platform.shouldSAAttach()) {
+            System.out.println("SA attach not expected to work - test skipped.");
+            return;
+        }
+        createArchive();
+        run(true);
+        run(false);
+    }
+
+    private static void createArchive()  throws Exception {
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+            "-XX:+UnlockDiagnosticVMOptions",
+            "-XX:SharedArchiveFile=" + jsaName,
+            "-Xshare:dump");
+
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldContain("Loading classes to share");
+        output.shouldHaveExitValue(0);
+    }
+
+    private static void run(boolean useArchive) throws Exception {
+        String flag = useArchive ? "auto" : "off";
+
+        // (1) Launch the attachee process
+        ProcessBuilder attachee = ProcessTools.createJavaProcessBuilder(
+            "-XX:+UnlockDiagnosticVMOptions",
+            "-XX:SharedArchiveFile=" + jsaName,
+            "-Xshare:" + flag,
+            "-showversion",                // so we can see "sharing" in the output
+            "SASymbolTableTestAttachee");
+
+        final Process p = attachee.start();
+
+        // (2) Launch the agent process
+        long pid = p.getPid();
+        System.out.println("Attaching agent " + pid);
+        ProcessBuilder tool = ProcessTools.createJavaProcessBuilder(
+            "-XaddExports:jdk.hotspot.agent/sun.jvm.hotspot.oops=ALL-UNNAMED",
+            "-XaddExports:jdk.hotspot.agent/sun.jvm.hotspot.memory=ALL-UNNAMED",
+            "-XaddExports:jdk.hotspot.agent/sun.jvm.hotspot.runtime=ALL-UNNAMED",
+            "-XaddExports:jdk.hotspot.agent/sun.jvm.hotspot.tools=ALL-UNNAMED",
+            "SASymbolTableTestAgent",
+            Long.toString(pid));
+        OutputAnalyzer output = ProcessTools.executeProcess(tool);
+        System.out.println(output.getOutput());
+        output.shouldHaveExitValue(0);
+
+        Thread t = new Thread() {
+                public void run() {
+                    try {
+                        OutputAnalyzer output = new OutputAnalyzer(p);
+                        System.out.println("STDOUT[");
+                        System.out.print(output.getStdout());
+                        System.out.println("]");
+                        System.out.println("STDERR[");
+                        System.out.print(output.getStderr());
+                        System.out.println("]");
+                    } catch (Throwable t) {
+                        t.printStackTrace();
+                    }
+                }
+            };
+        t.start();
+
+        Thread.sleep(2 * 1000);
+        p.destroy();
+        t.join();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/SharedArchiveFile/SASymbolTableTestAgent.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+import sun.jvm.hotspot.memory.SymbolTable;
+import sun.jvm.hotspot.oops.Symbol;
+import sun.jvm.hotspot.runtime.VM;
+import sun.jvm.hotspot.tools.Tool;
+
+/**
+ * This class is launched in a sub-process by the main test,
+ * SASymbolTableTest.java.
+ *
+ * It uses SA to connect to another JVM process, whose PID is specified in args[].
+ * The purpose of the test is to validate that we can walk the SymbolTable
+ * and CompactHashTable of the other process. Everything should work regardless
+ * of whether the other process runs in CDS mode or not.
+ *
+ * Note: CompactHashTable is used only when CDS is enabled.
+ */
+public class SASymbolTableTestAgent extends Tool {
+    public SASymbolTableTestAgent() {
+        super();
+    }
+    public static void main(String args[]) {
+        SASymbolTableTestAgent tool = new SASymbolTableTestAgent();
+        tool.execute(args);
+    }
+
+    static String[] commonNames = {
+        "java/lang/Object",
+        "java/lang/String",
+        "java/lang/Class",
+        "java/lang/Cloneable",
+        "java/lang/ClassLoader",
+        "java/io/Serializable",
+        "java/lang/System",
+        "java/lang/Throwable",
+        "java/lang/Error",
+        "java/lang/ThreadDeath",
+        "java/lang/Exception",
+        "java/lang/RuntimeException",
+        "java/lang/SecurityManager",
+        "java/security/ProtectionDomain",
+        "java/security/AccessControlContext",
+        "java/security/SecureClassLoader",
+        "java/lang/ClassNotFoundException",
+        "java/lang/NoClassDefFoundError",
+        "java/lang/LinkageError",
+        "java/lang/ClassCastException",
+        "java/lang/ArrayStoreException",
+        "java/lang/VirtualMachineError",
+        "java/lang/OutOfMemoryError",
+        "java/lang/StackOverflowError",
+        "java/lang/IllegalMonitorStateException",
+        "java/lang/ref/Reference",
+        "java/lang/ref/SoftReference",
+        "java/lang/ref/WeakReference",
+        "java/lang/ref/FinalReference",
+        "java/lang/ref/PhantomReference",
+        "java/lang/ref/Finalizer",
+        "java/lang/Thread",
+        "java/lang/ThreadGroup",
+        "java/util/Properties",
+        "java/lang/reflect/AccessibleObject",
+        "java/lang/reflect/Field",
+        "java/lang/reflect/Method",
+        "java/lang/reflect/Constructor",
+        "java/lang/invoke/MethodHandle",
+        "java/lang/invoke/MemberName",
+        "java/lang/invoke/MethodHandleNatives",
+        "java/lang/invoke/MethodType",
+        "java/lang/BootstrapMethodError",
+        "java/lang/invoke/CallSite",
+        "java/lang/invoke/ConstantCallSite",
+        "java/lang/invoke/MutableCallSite",
+        "java/lang/invoke/VolatileCallSite",
+        "java/lang/StringBuffer",
+        "java/lang/StringBuilder",
+        "java/io/ByteArrayInputStream",
+        "java/io/File",
+        "java/net/URLClassLoader",
+        "java/net/URL",
+        "java/util/jar/Manifest",
+        "java/security/CodeSource",
+    };
+
+    static String[] badNames = {
+        "java/lang/badbadbad",
+        "java/io/badbadbadbad",
+        "this*symbol*must*not*exist"
+    };
+
+    public void run() {
+        System.out.println("SASymbolTableTestAgent: starting");
+        VM vm = VM.getVM();
+        SymbolTable table = vm.getSymbolTable();
+
+        // (a) These are names that are likely to exist in the symbol table
+        //     of a JVM after start-up. They were taken from vmSymbols.hpp
+        //     during the middle of JDK9 development.
+        //
+        //     The purpose is not to check that each name must exist (a future
+        //     version of JDK may not preload some of the classes).
+        //
+        //     The purpose of this loops is to ensure that we check a lot of symbols,
+        //     so we will (most likely) hit on both VALUE_ONLY_BUCKET_TYPE and normal bucket type
+        //     in CompactHashTable.probe().
+        for (String n : commonNames) {
+            Symbol s = table.probe(n);
+            System.out.format("%-40s = %s\n", n, s);
+        }
+
+        System.out.println("======================================================================");
+
+        // (b) Also test a few strings that are known to not exist in the table. This will
+        //     both the compact table (if it exists) and the regular table to be walked.
+        for (String n : badNames) {
+            Symbol s = table.probe(n);
+            System.out.format("%-40s = %s\n", n, s);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/SharedArchiveFile/SASymbolTableTestAttachee.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * This class is launched in a sub-process by the main test,
+ * SASymbolTableTest.java.
+ *
+ * This class does nothing in particular. It just sleeps for 120
+ * seconds so SASymbolTableTestAgent can have a chance to examine its
+ * SymbolTable. This process should be killed by the parent process
+ * after SASymbolTableTestAgent has completed testing.
+ */
+public class SASymbolTableTestAttachee {
+    public static void main(String args[]) throws Throwable {
+        System.out.println("SASymbolTableTestAttachee: sleeping to wait for SA tool to attach ...");
+        Thread.sleep(120 * 1000);
+    }
+}
--- a/hotspot/test/runtime/SharedArchiveFile/SharedStrings.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedStrings.java	Thu Apr 28 14:44:52 2016 -0700
@@ -40,37 +40,51 @@
 
 public class SharedStrings {
     public static void main(String[] args) throws Exception {
+        boolean test_runtime = true;
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
             "-XX:+UnlockDiagnosticVMOptions",
             "-XX:SharedArchiveFile=./SharedStrings.jsa",
+            "-XX:+UseG1GC",
+            "-XX:+UseCompressedOops",
             "-XX:+PrintSharedSpaces",
             // Needed for bootclasspath match, for CDS to work with WhiteBox API
             "-Xbootclasspath/a:" + ClassFileInstaller.getJarPath("whitebox.jar"),
             "-Xshare:dump");
 
-        new OutputAnalyzer(pb.start())
-            .shouldContain("Loading classes to share")
-            .shouldContain("Shared string table stats")
-            .shouldHaveExitValue(0);
+        OutputAnalyzer dumpOutput = new OutputAnalyzer(pb.start());
+        try {
+            dumpOutput.shouldContain("Loading classes to share");
+            dumpOutput.shouldContain("Shared string table stats");
+            dumpOutput.shouldHaveExitValue(0);
+        } catch (RuntimeException e) {
+            if (dumpOutput.getOutput().indexOf("Shared strings are excluded") != -1 ||
+                dumpOutput.getOutput().indexOf("Cannot dump shared archive") != -1) {
+                test_runtime = false;
+            } else {
+                throw new RuntimeException("Unexpected failure");
+            }
+        }
 
-        pb = ProcessTools.createJavaProcessBuilder(
-            "-XX:+UnlockDiagnosticVMOptions",
-            "-XX:SharedArchiveFile=./SharedStrings.jsa",
-            // these are required modes for shared strings
-            "-XX:+UseCompressedOops", "-XX:+UseG1GC",
-            // needed for access to white box test API
-            "-Xbootclasspath/a:" + ClassFileInstaller.getJarPath("whitebox.jar"),
-            "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI",
-            "-Xshare:on", "-showversion", "SharedStringsWb");
+        if (test_runtime) {
+            pb = ProcessTools.createJavaProcessBuilder(
+                "-XX:+UnlockDiagnosticVMOptions",
+                "-XX:SharedArchiveFile=./SharedStrings.jsa",
+                // these are required modes for shared strings
+                "-XX:+UseCompressedOops", "-XX:+UseG1GC",
+                // needed for access to white box test API
+                "-Xbootclasspath/a:" + ClassFileInstaller.getJarPath("whitebox.jar"),
+                "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI",
+                "-Xshare:on", "-showversion", "SharedStringsWb");
 
-        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+            OutputAnalyzer output = new OutputAnalyzer(pb.start());
 
-        try {
-            output.shouldContain("sharing");
-            output.shouldHaveExitValue(0);
-        } catch (RuntimeException e) {
-            output.shouldContain("Unable to use shared archive");
-            output.shouldHaveExitValue(1);
+            try {
+                output.shouldContain("sharing");
+                output.shouldHaveExitValue(0);
+            } catch (RuntimeException e) {
+                output.shouldContain("Unable to use shared archive");
+                output.shouldHaveExitValue(1);
+            }
         }
     }
 }
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/ProductionFailedException.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/ProductionFailedException.java	Thu Apr 28 14:44:52 2016 -0700
@@ -27,10 +27,10 @@
     static final long serialVersionUID = -2325617203741536725L;
 
     public ProductionFailedException(String msg) {
-        super(msg);
+        super(msg, null, false, false);
     }
 
     public ProductionFailedException() {
-        super();
+        super(null, null, false, false);
     }
 }
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/SymbolTable.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/SymbolTable.java	Thu Apr 28 14:44:52 2016 -0700
@@ -26,6 +26,7 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.Map;
 import java.util.Stack;
 import jdk.test.lib.jittester.types.TypeKlass;
 
@@ -37,7 +38,7 @@
     private static int VARIABLE_NUMBER = 0;
     private static int FUNCTION_NUMBER = 0;
 
-    static private void initExternalSymbols() {
+    private static void initExternalSymbols() {
 
         String classList = ProductionParams.addExternalSymbols.value();
         if (classList.equals("all")) {
@@ -254,12 +255,12 @@
     public static void push() {
         // Do deep cloning..
         HashMap<Type, ArrayList<Symbol>> prev = SYMBOL_STACK.peek();
-        SYMBOL_STACK.push(new HashMap<>());
-        HashMap<Type, ArrayList<Symbol>> top = SYMBOL_STACK.peek();
-        for (Type type : prev.keySet()) {
-            ArrayList<Symbol> prevArray = prev.get(type);
-            top.put(type, new ArrayList<>(prevArray.size()));
-            ArrayList<Symbol> topArray = top.get(type);
+        HashMap<Type, ArrayList<Symbol>> top = new HashMap<>(prev.size());
+        SYMBOL_STACK.push(top);
+        for (Map.Entry<Type, ArrayList<Symbol>> entry : prev.entrySet()) {
+            ArrayList<Symbol> prevArray = entry.getValue();
+            ArrayList<Symbol> topArray = new ArrayList<>(prevArray.size());
+            top.put(entry.getKey(), topArray);
             for (Symbol symbol : prevArray) {
                 topArray.add(symbol.copy());
             }
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/TypeUtil.java	Wed Jul 05 21:39:33 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-package jdk.test.lib.jittester;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-
-public class TypeUtil {
-
-    public static Collection<Type> getImplicitlyCastable(Collection<Type> types, Type type) {
-        ArrayList<Type> result = new ArrayList<>(types);
-        Iterator<Type> iterator = result.iterator();
-        while (iterator.hasNext()) {
-            if (!iterator.next().canImplicitlyCastTo(type)) {
-                iterator.remove();
-            }
-        }
-        return result;
-    }
-
-    public static Collection<Type> getExplicitlyCastable(Collection<Type> types, Type type) {
-        ArrayList<Type> result = new ArrayList<>(types);
-        Iterator<Type> iterator = result.iterator();
-        while (iterator.hasNext()) {
-            if (!iterator.next().canExplicitlyCastTo(type)) {
-                iterator.remove();
-            }
-        }
-        return result;
-    }
-
-    public static List<Type> getMoreCapatiousThan(Collection<Type> types, BuiltInType type) {
-        ArrayList<Type> result = new ArrayList<>();
-        Iterator<Type> iterator = types.iterator();
-        while (iterator.hasNext()) {
-            try {
-                BuiltInType builtInType = (BuiltInType) iterator.next();
-                if (builtInType.isMoreCapaciousThan(type)) {
-                    result.add(builtInType);
-                }
-            } catch (Exception e) {
-            }
-        }
-        return result;
-    }
-
-    public static List<Type> getLessCapatiousOrEqualThan(Collection<Type> types, BuiltInType type) {
-        ArrayList<Type> result = new ArrayList<>();
-        Iterator<Type> iterator = types.iterator();
-        while (iterator.hasNext()) {
-            try {
-                BuiltInType builtInType = (BuiltInType) iterator.next();
-                if (!builtInType.isMoreCapaciousThan(type) || builtInType.equals(type)) {
-                    result.add(builtInType);
-                }
-            } catch (Exception e) {
-            }
-        }
-        return result;
-    }
-}
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/AssignmentOperatorImplFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/AssignmentOperatorImplFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -31,7 +31,7 @@
 import jdk.test.lib.jittester.Rule;
 import jdk.test.lib.jittester.Type;
 import jdk.test.lib.jittester.TypeList;
-import jdk.test.lib.jittester.TypeUtil;
+import jdk.test.lib.jittester.utils.TypeUtil;
 import jdk.test.lib.jittester.VariableBase;
 import jdk.test.lib.jittester.VariableInfo;
 import jdk.test.lib.jittester.types.TypeKlass;
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryArithmeticOperatorFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryArithmeticOperatorFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -29,7 +29,7 @@
 import jdk.test.lib.jittester.ProductionFailedException;
 import jdk.test.lib.jittester.Type;
 import jdk.test.lib.jittester.TypeList;
-import jdk.test.lib.jittester.TypeUtil;
+import jdk.test.lib.jittester.utils.TypeUtil;
 import jdk.test.lib.jittester.types.TypeInt;
 import jdk.test.lib.jittester.types.TypeKlass;
 import jdk.test.lib.jittester.utils.PseudoRandom;
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryBitwiseOperatorFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryBitwiseOperatorFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -28,7 +28,7 @@
 import jdk.test.lib.jittester.ProductionFailedException;
 import jdk.test.lib.jittester.Type;
 import jdk.test.lib.jittester.TypeList;
-import jdk.test.lib.jittester.TypeUtil;
+import jdk.test.lib.jittester.utils.TypeUtil;
 import jdk.test.lib.jittester.types.TypeBoolean;
 import jdk.test.lib.jittester.types.TypeInt;
 import jdk.test.lib.jittester.types.TypeKlass;
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryShiftOperatorFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryShiftOperatorFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -28,11 +28,11 @@
 import jdk.test.lib.jittester.ProductionFailedException;
 import jdk.test.lib.jittester.Type;
 import jdk.test.lib.jittester.TypeList;
-import jdk.test.lib.jittester.TypeUtil;
 import jdk.test.lib.jittester.types.TypeInt;
 import jdk.test.lib.jittester.types.TypeKlass;
 import jdk.test.lib.jittester.types.TypeLong;
 import jdk.test.lib.jittester.utils.PseudoRandom;
+import jdk.test.lib.jittester.utils.TypeUtil;
 
 class BinaryShiftOperatorFactory extends BinaryOperatorFactory {
     BinaryShiftOperatorFactory(OperatorKind opKind, long complexityLimit, int operatorLimit,
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BitwiseInversionOperatorFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BitwiseInversionOperatorFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -28,7 +28,7 @@
 import jdk.test.lib.jittester.ProductionFailedException;
 import jdk.test.lib.jittester.Type;
 import jdk.test.lib.jittester.TypeList;
-import jdk.test.lib.jittester.TypeUtil;
+import jdk.test.lib.jittester.utils.TypeUtil;
 import jdk.test.lib.jittester.UnaryOperator;
 import jdk.test.lib.jittester.types.TypeKlass;
 import jdk.test.lib.jittester.types.TypeInt;
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BlockFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BlockFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -33,7 +33,7 @@
 import jdk.test.lib.jittester.SymbolTable;
 import jdk.test.lib.jittester.Type;
 import jdk.test.lib.jittester.TypeList;
-import jdk.test.lib.jittester.TypeUtil;
+import jdk.test.lib.jittester.utils.TypeUtil;
 import jdk.test.lib.jittester.loops.DoWhile;
 import jdk.test.lib.jittester.loops.For;
 import jdk.test.lib.jittester.loops.While;
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundArithmeticAssignmentOperatorFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundArithmeticAssignmentOperatorFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -30,7 +30,7 @@
 import jdk.test.lib.jittester.ProductionFailedException;
 import jdk.test.lib.jittester.Type;
 import jdk.test.lib.jittester.TypeList;
-import jdk.test.lib.jittester.TypeUtil;
+import jdk.test.lib.jittester.utils.TypeUtil;
 import jdk.test.lib.jittester.types.TypeBoolean;
 import jdk.test.lib.jittester.types.TypeKlass;
 import jdk.test.lib.jittester.utils.PseudoRandom;
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundBitwiseAssignmentOperatorFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundBitwiseAssignmentOperatorFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -30,7 +30,7 @@
 import jdk.test.lib.jittester.ProductionFailedException;
 import jdk.test.lib.jittester.Type;
 import jdk.test.lib.jittester.TypeList;
-import jdk.test.lib.jittester.TypeUtil;
+import jdk.test.lib.jittester.utils.TypeUtil;
 import jdk.test.lib.jittester.types.TypeKlass;
 import jdk.test.lib.jittester.utils.PseudoRandom;
 
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundShiftAssignmentOperatorFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundShiftAssignmentOperatorFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -30,7 +30,7 @@
 import jdk.test.lib.jittester.ProductionFailedException;
 import jdk.test.lib.jittester.Type;
 import jdk.test.lib.jittester.TypeList;
-import jdk.test.lib.jittester.TypeUtil;
+import jdk.test.lib.jittester.utils.TypeUtil;
 import jdk.test.lib.jittester.types.TypeKlass;
 import jdk.test.lib.jittester.types.TypeBoolean;
 import jdk.test.lib.jittester.utils.PseudoRandom;
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CounterInitializerFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CounterInitializerFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -30,7 +30,7 @@
 import jdk.test.lib.jittester.SymbolTable;
 import jdk.test.lib.jittester.Type;
 import jdk.test.lib.jittester.TypeList;
-import jdk.test.lib.jittester.TypeUtil;
+import jdk.test.lib.jittester.utils.TypeUtil;
 import jdk.test.lib.jittester.VariableInfo;
 import jdk.test.lib.jittester.loops.CounterInitializer;
 import jdk.test.lib.jittester.types.TypeKlass;
@@ -48,7 +48,7 @@
 
     @Override
     protected IRNode sproduce() throws ProductionFailedException {
-        List<Type> types = TypeUtil.getMoreCapatiousThan(TypeList.getBuiltIn(), new TypeInt());
+        List<Type> types = TypeUtil.getMoreCapaciousThan(TypeList.getBuiltIn(), new TypeInt());
         types.add(new TypeInt());
         final Type selectedType = PseudoRandom.randomElement(types);
         IRNode init = new LiteralInitializer(counterValue, selectedType);
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/SwitchFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/SwitchFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -34,7 +34,7 @@
 import jdk.test.lib.jittester.Rule;
 import jdk.test.lib.jittester.Switch;
 import jdk.test.lib.jittester.Type;
-import jdk.test.lib.jittester.TypeUtil;
+import jdk.test.lib.jittester.utils.TypeUtil;
 import jdk.test.lib.jittester.types.TypeKlass;
 import jdk.test.lib.jittester.types.TypeByte;
 import jdk.test.lib.jittester.types.TypeChar;
@@ -63,7 +63,7 @@
     @Override
     protected IRNode sproduce() throws ProductionFailedException {
         if (statementLimit > 0 && complexityLimit > 0) {
-            ArrayList<Type> switchTypes = new ArrayList<>();
+            List<Type> switchTypes = new ArrayList<>();
             switchTypes.add(new TypeChar());
             switchTypes.add(new TypeByte());
             switchTypes.add(new TypeShort());
@@ -78,8 +78,8 @@
                     .setCanHaveReturn(canHaveReturn);
             MAIN_LOOP:
             for (Type type : switchTypes) {
-                ArrayList<IRNode> caseConsts = new ArrayList<>();
-                ArrayList<IRNode> caseBlocks = new ArrayList<>();
+                List<IRNode> caseConsts = new ArrayList<>();
+                List<IRNode> caseBlocks = new ArrayList<>();
                 try {
                     int accumulatedStatements = 0;
                     int currentStatementsLimit = 0;
@@ -94,10 +94,10 @@
                             .getLimitedExpressionFactory()
                             .produce();
                     accumulatedComplexity += currentComplexityLimit;
-                    ArrayList<Type> caseTypes = new ArrayList<>();
+                    List<Type> caseTypes = new ArrayList<>();
                     caseTypes.add(new TypeByte());
                     caseTypes.add(new TypeChar());
-                    caseTypes = new ArrayList<>(TypeUtil.getLessCapatiousOrEqualThan(caseTypes,
+                    caseTypes = new ArrayList<>(TypeUtil.getLessCapaciousOrEqualThan(caseTypes,
                             (BuiltInType) type));
                     if (PseudoRandom.randomBoolean()) { // "default"
                         currentStatementsLimit = (int) (PseudoRandom.random()
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/TernaryOperatorFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/TernaryOperatorFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -30,7 +30,7 @@
 import jdk.test.lib.jittester.TernaryOperator;
 import jdk.test.lib.jittester.Type;
 import jdk.test.lib.jittester.TypeList;
-import jdk.test.lib.jittester.TypeUtil;
+import jdk.test.lib.jittester.utils.TypeUtil;
 import jdk.test.lib.jittester.types.TypeKlass;
 import jdk.test.lib.jittester.types.TypeBoolean;
 import jdk.test.lib.jittester.utils.PseudoRandom;
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/TryCatchBlockFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/TryCatchBlockFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -31,7 +31,7 @@
 import jdk.test.lib.jittester.TryCatchBlock;
 import jdk.test.lib.jittester.Type;
 import jdk.test.lib.jittester.TypeList;
-import jdk.test.lib.jittester.TypeUtil;
+import jdk.test.lib.jittester.utils.TypeUtil;
 import jdk.test.lib.jittester.types.TypeKlass;
 import jdk.test.lib.jittester.utils.PseudoRandom;
 
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/UnaryPlusMinusOperatorFactory.java	Wed Jul 05 21:39:33 2017 +0200
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/UnaryPlusMinusOperatorFactory.java	Thu Apr 28 14:44:52 2016 -0700
@@ -29,7 +29,7 @@
 import jdk.test.lib.jittester.ProductionFailedException;
 import jdk.test.lib.jittester.Type;
 import jdk.test.lib.jittester.TypeList;
-import jdk.test.lib.jittester.TypeUtil;
+import jdk.test.lib.jittester.utils.TypeUtil;
 import jdk.test.lib.jittester.UnaryOperator;
 import jdk.test.lib.jittester.types.TypeBoolean;
 import jdk.test.lib.jittester.types.TypeInt;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/utils/TypeUtil.java	Thu Apr 28 14:44:52 2016 -0700
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+package jdk.test.lib.jittester.utils;
+
+import jdk.test.lib.jittester.BuiltInType;
+import jdk.test.lib.jittester.Type;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * Utility functions for type system
+ */
+public class TypeUtil {
+    /**
+     * Gets a list of implicitly castable types to a given one from the collection of types
+     *
+     * @param types a collection to get types from
+     * @param type  a target type which result type could be implicitly cast to
+     * @return      a result collection of types that match given conditions
+     */
+    public static Collection<Type> getImplicitlyCastable(Collection<Type> types, Type type) {
+        return types.stream()
+                .filter(t -> t.canImplicitlyCastTo(type))
+                .collect(Collectors.toList());
+    }
+
+    /**
+     * Gets a list of explicitly castable types to a given one from the collection of types
+     *
+     * @param types a collection to get types from
+     * @param type  a target type which result type could be explicitly cast to
+     * @return      a result collection of types that match given conditions
+     */
+    public static Collection<Type> getExplicitlyCastable(Collection<Type> types, Type type) {
+        return types.stream()
+                .filter(t -> t.canExplicitlyCastTo(type))
+                .collect(Collectors.toList());
+    }
+
+    /**
+     * Gets a list of more capacious types than a given one from the collection of types
+     *
+     * @param types a collection to get types from
+     * @param type  a type to filter given types by capacity
+     * @return      a result collection of types that match given conditions
+     */
+    public static List<Type> getMoreCapaciousThan(Collection<Type> types, BuiltInType type) {
+        return types.stream()
+                .filter(t -> ((BuiltInType) t).isMoreCapaciousThan(type))
+                .collect(Collectors.toList());
+    }
+
+    /**
+     * Gets a list of less or equal capacious types than a given one from the collection of types
+     *
+     * @param types a collection to get types from
+     * @param type  a type to filter given types by capacity
+     * @return      a result collection of types that match given conditions
+     */
+    public static List<Type> getLessCapaciousOrEqualThan(Collection<Type> types, BuiltInType type) {
+        return types.stream()
+                .filter(t -> !((BuiltInType) t).isMoreCapaciousThan(type) || t.equals(type))
+                .collect(Collectors.toList());
+    }
+}