]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
linux arm64: fix a couple of clang warnings about word length
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 24 Feb 2024 12:57:58 +0000 (13:57 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 24 Feb 2024 12:57:58 +0000 (13:57 +0100)
coregrind/m_debuglog.c
coregrind/m_libcproc.c

index fd6db4beb4d591c8402cf5a693caa58220691aab..e4ab846f54c1b25a3ad833caf7d419a0cda6b448 100644 (file)
@@ -300,7 +300,7 @@ static UInt local_sys_write_stderr ( const HChar* buf, Int n )
 
 static UInt local_sys_getpid ( void )
 {
-   UInt __res;
+   ULong __res;
    __asm__ volatile (
       "mov  x8, #"VG_STRINGIFY(__NR_getpid)"\n"
       "svc  0x0\n"      /* getpid() */
index 592d69bf139f8f0e2e9dafc5e85114d40d8e157e..02f636748b867ce620f55d8107a8ed88ce1ccbb3 100644 (file)
@@ -1332,11 +1332,12 @@ void VG_(invalidate_icache) ( void *ptr, SizeT nbytes )
    */
 
    // Ask what the I and D line sizes are
-   UInt cache_type_register;
+   ULong read_mrs;
    // Copy the content of the cache type register to a core register.
    __asm__ __volatile__ ("mrs %[ctr], ctr_el0" // NOLINT
-                         : [ctr] "=r" (cache_type_register));
+                         : [ctr] "=r" (read_mrs));
 
+   UInt cache_type_register = read_mrs;
    const Int kDCacheLineSizeShift = 16;
    const Int kICacheLineSizeShift = 0;
    const UInt kDCacheLineSizeMask = 0xf << kDCacheLineSizeShift;