8198571: [JVMCI] must not install wide vector code unless runtime supports it
authordnsimon
Fri, 23 Feb 2018 21:38:12 +0100
changeset 49342 9597f957122e
parent 49341 4ad0085ad6d2
child 49343 d3b6dd4bd7b8
8198571: [JVMCI] must not install wide vector code unless runtime supports it Reviewed-by: kvn
src/hotspot/share/jvmci/jvmciCodeInstaller.cpp
--- a/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp	Mon Mar 05 14:24:45 2018 -0500
+++ b/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp	Fri Feb 23 21:38:12 2018 +0100
@@ -133,7 +133,10 @@
   if (!reference_map->is_a(HotSpotReferenceMap::klass())) {
     JVMCI_ERROR_NULL("unknown reference map: %s", reference_map->klass()->signature_name());
   }
-  if (HotSpotReferenceMap::maxRegisterSize(reference_map) > 16) {
+  if (!_has_wide_vector && SharedRuntime::is_wide_vector(HotSpotReferenceMap::maxRegisterSize(reference_map))) {
+    if (SharedRuntime::polling_page_vectors_safepoint_handler_blob() == NULL) {
+      JVMCI_ERROR_NULL("JVMCI is producing code using vectors larger than the runtime supports");
+    }
     _has_wide_vector = true;
   }
   OopMap* map = new OopMap(_total_frame_size, _parameter_count);