8211168: Solaris-X64 build failure with error nreg hides the same name in an outer scope
authorrraghavan
Wed, 03 Oct 2018 08:03:13 -0700
changeset 51999 7d036fb69443
parent 51998 27b48d82272c
child 52000 dac71e2465ca
child 52001 0b36afd411ec
8211168: Solaris-X64 build failure with error nreg hides the same name in an outer scope Summary: Corrected nreg definition Reviewed-by: dcubed, kvn, shade
src/hotspot/cpu/x86/vm_version_x86.hpp
--- a/src/hotspot/cpu/x86/vm_version_x86.hpp	Wed Oct 03 15:05:46 2018 +0200
+++ b/src/hotspot/cpu/x86/vm_version_x86.hpp	Wed Oct 03 08:03:13 2018 -0700
@@ -608,10 +608,10 @@
 
   static bool os_supports_avx_vectors() {
     bool retVal = false;
+    int nreg = 2 LP64_ONLY(+2);
     if (supports_evex()) {
       // Verify that OS save/restore all bits of EVEX registers
       // during signal processing.
-      int nreg = 2 LP64_ONLY(+2);
       retVal = true;
       for (int i = 0; i < 16 * nreg; i++) { // 64 bytes per zmm register
         if (_cpuid_info.zmm_save[i] != ymm_test_value()) {
@@ -622,7 +622,6 @@
     } else if (supports_avx()) {
       // Verify that OS save/restore all bits of AVX registers
       // during signal processing.
-      int nreg = 2 LP64_ONLY(+2);
       retVal = true;
       for (int i = 0; i < 8 * nreg; i++) { // 32 bytes per ymm register
         if (_cpuid_info.ymm_save[i] != ymm_test_value()) {
@@ -634,7 +633,6 @@
       if (retVal == false) {
         // Verify that OS save/restore all bits of EVEX registers
         // during signal processing.
-        int nreg = 2 LP64_ONLY(+2);
         retVal = true;
         for (int i = 0; i < 16 * nreg; i++) { // 64 bytes per zmm register
           if (_cpuid_info.zmm_save[i] != ymm_test_value()) {