< prev index next >

src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp

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

@@ -1682,11 +1682,11 @@
  }
  
  //
  // Generic interpreted method entry to template interpreter.
  //
- address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
+ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized, bool object_init) {
    address entry_point = __ pc();
  
    bool inc_counter = UseCompiler || CountCompiledCalls;
  
    // Interpreter entry for ordinary Java methods.

@@ -1803,10 +1803,16 @@
        __ bind(L);
      }
  #endif // ASSERT
    }
  
+   // If object_init == true, we should insert a StoreStore barrier here to
+   // prevent strict fields initial default values from being observable.
+   // However, s390 is a TSO platform, so if `this` escapes, strict fields
+   // initialized values are guaranteed to be the ones observed, so the
+   // barrier can be elided.
+ 
    // start execution
  
  #ifdef ASSERT
    __ verify_esp(Z_esp, Z_R1_scratch);
  #endif
< prev index next >