< prev index next >

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+  * Copyright (c) 2016, 2023, 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.

@@ -294,10 +294,17 @@
              outCppType[0] = entry.type;
          }
          return type.cast(convertValue(name, type, entry.value, inCppType));
      }
  
+     private boolean typeEquals(String t1, String t2) {
+         if (t1.equals("int64_t") && t2.equals("intx")) {
+             return true;
+         }
+         return t1.equals(t2);
+     }
+ 
      /**
       * Gets a C++ field.
       *
       * @param name fully qualified name of the field
       * @param cppType if non-null, the expected C++ type of the field (e.g., {@code "HeapWord*"})

@@ -313,11 +320,11 @@
              }
              throw missingEntry("field", name, store.vmFields.keySet());
          }
  
          // Make sure the native type is still the type we expect.
-         if (cppType != null && !cppType.equals(entry.type)) {
+         if (cppType != null && !typeEquals(cppType, entry.type)) {
              throw new JVMCIError("expected type " + cppType + " but VM field " + name + " is of type " + entry.type);
          }
          return entry;
      }
  
< prev index next >