$OpenBSD: patch-src_hotspot_cpu_aarch64_macroAssembler_aarch64_hpp,v 1.2 2021/11/02 16:03:06 kurt Exp $

Backport MacroAssembler::mov methods to support varying definitions
of uint64_t, int64_t, uintptr_t and intptr_t without causing
implicit conversion errors or ambiguous call to overloaded function
errors.

Index: src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
--- src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp.orig
+++ src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
@@ -475,24 +475,16 @@ class MacroAssembler: public Assembler { (public)
     mov_immediate64(dst, (uint64_t)addr);
   }
 
-  inline void mov(Register dst, uint64_t imm64)
-  {
-    mov_immediate64(dst, imm64);
-  }
+  inline void mov(Register dst, int imm64)                { mov_immediate64(dst, (uint64_t)imm64); }
+  inline void mov(Register dst, long imm64)               { mov_immediate64(dst, (uint64_t)imm64); }
+  inline void mov(Register dst, long long imm64)          { mov_immediate64(dst, (uint64_t)imm64); }
+  inline void mov(Register dst, unsigned int imm64)       { mov_immediate64(dst, (uint64_t)imm64); }
+  inline void mov(Register dst, unsigned long imm64)      { mov_immediate64(dst, (uint64_t)imm64); }
+  inline void mov(Register dst, unsigned long long imm64) { mov_immediate64(dst, (uint64_t)imm64); }
 
   inline void movw(Register dst, uint32_t imm32)
   {
     mov_immediate32(dst, imm32);
-  }
-
-  inline void mov(Register dst, int64_t l)
-  {
-    mov(dst, (uint64_t)l);
-  }
-
-  inline void mov(Register dst, int i)
-  {
-    mov(dst, (int64_t)i);
   }
 
   void mov(Register dst, RegisterOrConstant src) {
