File jdk-8354941.patch of Package java-19-openjdk

--- a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp	2025-08-25 14:14:26.293105507 +0200
+++ b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp	2025-08-25 14:15:03.280688694 +0200
@@ -437,7 +437,7 @@
 
 bool asm_util::operand_valid_for_immediate_bits(int64_t imm, unsigned nbits) {
   guarantee(nbits == 8 || nbits == 12, "invalid nbits value");
-  uint64_t uimm = (uint64_t)uabs((jlong)imm);
+  uint64_t uimm = (uint64_t)g_uabs((jlong)imm);
   if (uimm < (UCONST64(1) << nbits))
     return true;
   if (uimm < (UCONST64(1) << (2 * nbits))
--- a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp	2025-08-25 14:14:26.293143112 +0200
+++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp	2025-08-25 14:15:03.281611242 +0200
@@ -845,7 +845,7 @@
   static const uint64_t branch_range = NOT_DEBUG(128 * M) DEBUG_ONLY(2 * M);
 
   static bool reachable_from_branch_at(address branch, address target) {
-    return uabs(target - branch) < branch_range;
+    return g_uabs(target - branch) < branch_range;
   }
 
   // Unconditional branch (immediate)
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp	2025-08-25 14:14:26.296334459 +0200
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp	2025-08-25 14:15:03.282515831 +0200
@@ -2289,7 +2289,7 @@
   if (fits) {
     (this->*insn1)(Rd, Rn, imm);
   } else {
-    if (uabs(imm) < (1 << 24)) {
+    if (g_uabs(imm) < (1 << 24)) {
        (this->*insn1)(Rd, Rn, imm & -(1 << 12));
        (this->*insn1)(Rd, Rd, imm & ((1 << 12)-1));
     } else {
--- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp	2025-08-25 14:14:26.297425715 +0200
+++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp	2025-08-25 14:15:03.283535917 +0200
@@ -1052,7 +1052,7 @@
 
   void copy_memory_small(Register s, Register d, Register count, Register tmp, int step) {
     bool is_backwards = step < 0;
-    size_t granularity = uabs(step);
+    size_t granularity = g_uabs(step);
     int direction = is_backwards ? -1 : 1;
     int unit = wordSize * direction;
 
@@ -1108,7 +1108,7 @@
                    Register count, Register tmp, int step) {
     copy_direction direction = step < 0 ? copy_backwards : copy_forwards;
     bool is_backwards = step < 0;
-    unsigned int granularity = uabs(step);
+    unsigned int granularity = g_uabs(step);
     const Register t0 = r3, t1 = r4;
 
     // <= 80 (or 96 for SIMD) bytes do inline. Direction doesn't matter because we always
--- a/src/hotspot/cpu/riscv/assembler_riscv.hpp	2025-08-25 14:14:26.307567897 +0200
+++ b/src/hotspot/cpu/riscv/assembler_riscv.hpp	2025-08-25 14:15:03.284640851 +0200
@@ -3088,7 +3088,7 @@
   static const unsigned long branch_range = 1 * M;
 
   static bool reachable_from_branch_at(address branch, address target) {
-    return uabs(target - branch) < branch_range;
+    return g_uabs(target - branch) < branch_range;
   }
 
   virtual ~Assembler() {}
--- a/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp	2025-08-25 14:14:26.311630810 +0200
+++ b/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp	2025-08-25 14:15:03.285188287 +0200
@@ -906,7 +906,7 @@
 
   void copy_memory_v(Register s, Register d, Register count, Register tmp, int step) {
     bool is_backward = step < 0;
-    int granularity = uabs(step);
+    int granularity = g_uabs(step);
 
     const Register src = x30, dst = x31, vl = x14, cnt = x15, tmp1 = x16, tmp2 = x17;
     assert_different_registers(s, d, cnt, vl, tmp, tmp1, tmp2);
@@ -955,7 +955,7 @@
     }
 
     bool is_backwards = step < 0;
-    int granularity = uabs(step);
+    int granularity = g_uabs(step);
 
     const Register src = x30, dst = x31, cnt = x15, tmp3 = x16, tmp4 = x17, tmp5 = x14, tmp6 = x13;
 
--- a/src/hotspot/share/opto/mulnode.cpp	2025-08-25 14:14:26.433668011 +0200
+++ b/src/hotspot/share/opto/mulnode.cpp	2025-08-25 14:15:03.285714657 +0200
@@ -255,7 +255,7 @@
   // Check for negative constant; if so negate the final result
   bool sign_flip = false;
 
-  unsigned int abs_con = uabs(con);
+  unsigned int abs_con = g_uabs(con);
   if (abs_con != (unsigned int)con) {
     sign_flip = true;
   }
@@ -349,7 +349,7 @@
 
   // Check for negative constant; if so negate the final result
   bool sign_flip = false;
-  julong abs_con = uabs(con);
+  julong abs_con = g_uabs(con);
   if (abs_con != (julong)con) {
     sign_flip = true;
   }
--- a/src/hotspot/share/opto/subnode.cpp	2025-08-25 14:14:26.435910276 +0200
+++ b/src/hotspot/share/opto/subnode.cpp	2025-08-25 14:15:03.286133051 +0200
@@ -1828,14 +1828,14 @@
   case Type::Int: {
     const TypeInt* ti = t1->is_int();
     if (ti->is_con()) {
-      return TypeInt::make(uabs(ti->get_con()));
+      return TypeInt::make(g_uabs(ti->get_con()));
     }
     break;
   }
   case Type::Long: {
     const TypeLong* tl = t1->is_long();
     if (tl->is_con()) {
-      return TypeLong::make(uabs(tl->get_con()));
+      return TypeLong::make(g_uabs(tl->get_con()));
     }
     break;
   }
--- a/src/hotspot/share/utilities/globalDefinitions.hpp	2025-08-25 14:14:26.456747826 +0200
+++ b/src/hotspot/share/utilities/globalDefinitions.hpp	2025-08-25 14:15:03.286503560 +0200
@@ -1087,7 +1087,7 @@
 
 // abs methods which cannot overflow and so are well-defined across
 // the entire domain of integer types.
-static inline unsigned int uabs(unsigned int n) {
+static inline unsigned int g_uabs(unsigned int n) {
   union {
     unsigned int result;
     int value;
@@ -1096,7 +1096,7 @@
   if (value < 0) result = 0-result;
   return result;
 }
-static inline julong uabs(julong n) {
+static inline julong g_uabs(julong n) {
   union {
     julong result;
     jlong value;
@@ -1105,8 +1105,8 @@
   if (value < 0) result = 0-result;
   return result;
 }
-static inline julong uabs(jlong n) { return uabs((julong)n); }
-static inline unsigned int uabs(int n) { return uabs((unsigned int)n); }
+static inline julong g_uabs(jlong n) { return g_uabs((julong)n); }
+static inline unsigned int g_uabs(int n) { return g_uabs((unsigned int)n); }
 
 // "to" should be greater than "from."
 inline intx byte_size(void* from, void* to) {
openSUSE Build Service is sponsored by