< prev index next >

src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 2018, 2023, Red Hat, Inc. All rights reserved.
+  * Copyright (c) 2018, 2026, Red Hat, Inc. All rights reserved.
   * Copyright Amazon.com Inc. 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

@@ -953,10 +953,19 @@
  
      // Wire up the actual arraycopy stub now
      ctrl = phase->transform_later(region);
      mem = phase->transform_later(mem_phi);
  
+     if (should_copy_int_prefix(phase, ac)) {
+       mem = arraycopy_copy_int_prefix(phase, ctrl, mem, src, dest);
+ 
+       // We've copied the prefix, bump the pointers.
+       src = phase->basic_plus_adr(src_base, src, BytesPerInt);
+       dest = phase->basic_plus_adr(dest_base, dest, BytesPerInt);
+     }
+ 
+     // Bulk copy.
      const char* name = "arraycopy";
      call = phase->make_leaf_call(ctrl, mem,
                                   OptoRuntime::fast_arraycopy_Type(),
                                   phase->basictype2arraycopy(T_LONG, nullptr, nullptr, true, name, true),
                                   name, TypeRawPtr::BOTTOM,
< prev index next >