< prev index next >

test/jdk/java/foreign/callarranger/TestWindowsCallArranger.java

Print this page
@@ -154,12 +154,11 @@
          checkArgumentBindings(callingSequence, new Binding[][]{
              { vmStore(rcx, int.class) },
              { vmStore(rdx, int.class) },
              {
                  copy(structLayout),
-                 baseAddress(),
-                 unboxAddress(),
+                 unboxAddress(MemorySegment.class),
                  vmStore(r8, long.class)
              },
              { vmStore(r9, int.class) },
              { vmStore(stackStorage(0), int.class) },
              { vmStore(stackStorage(1), double.class) },

@@ -176,11 +175,11 @@
      @Test
      public void testAbiExampleVarargs() {
          MethodType mt = MethodType.methodType(void.class,
                  int.class, double.class, int.class, double.class, double.class);
          FunctionDescriptor fd = FunctionDescriptor.ofVoid(
-                 C_INT, C_DOUBLE, asVarArg(C_INT), asVarArg(C_DOUBLE), asVarArg(C_DOUBLE));
+                 C_INT, C_DOUBLE).asVariadic(C_INT, C_DOUBLE, C_DOUBLE);
          CallArranger.Bindings bindings = CallArranger.getBindings(mt, fd, false);
  
          assertFalse(bindings.isInMemoryReturn);
          CallingSequence callingSequence = bindings.callingSequence;
          assertEquals(callingSequence.methodType(), mt);

@@ -249,12 +248,11 @@
          assertEquals(callingSequence.functionDesc(), fd);
  
          checkArgumentBindings(callingSequence, new Binding[][]{
              {
                  copy(struct),
-                 baseAddress(),
-                 unboxAddress(),
+                 unboxAddress(MemorySegment.class),
                  vmStore(rcx, long.class)
              }
          });
  
          checkReturnBindings(callingSequence, new Binding[]{});

@@ -348,23 +346,23 @@
          CallingSequence callingSequence = bindings.callingSequence;
          assertEquals(callingSequence.methodType(), mt);
          assertEquals(callingSequence.functionDesc(), fd);
  
          checkArgumentBindings(callingSequence, new Binding[][]{
-             { copy(struct), baseAddress(), unboxAddress(), vmStore(rcx, long.class) },
+             { copy(struct), unboxAddress(MemorySegment.class), vmStore(rcx, long.class) },
              { vmStore(rdx, int.class) },
              { vmStore(xmm2, double.class) },
              { unboxAddress(), vmStore(r9, long.class) },
-             { copy(struct), baseAddress(), unboxAddress(), vmStore(stackStorage(0), long.class) },
+             { copy(struct), unboxAddress(MemorySegment.class), vmStore(stackStorage(0), long.class) },
              { vmStore(stackStorage(1), int.class) },
              { vmStore(stackStorage(2), double.class) },
              { unboxAddress(), vmStore(stackStorage(3), long.class) },
-             { copy(struct), baseAddress(), unboxAddress(), vmStore(stackStorage(4), long.class) },
+             { copy(struct), unboxAddress(MemorySegment.class), vmStore(stackStorage(4), long.class) },
              { vmStore(stackStorage(5), int.class) },
              { vmStore(stackStorage(6), double.class) },
              { unboxAddress(), vmStore(stackStorage(7), long.class) },
-             { copy(struct), baseAddress(), unboxAddress(), vmStore(stackStorage(8), long.class) },
+             { copy(struct), unboxAddress(MemorySegment.class), vmStore(stackStorage(8), long.class) },
              { vmStore(stackStorage(9), int.class) },
              { vmStore(stackStorage(10), double.class) },
              { unboxAddress(), vmStore(stackStorage(11), long.class) },
          });
  
< prev index next >