[compiler-rt] 2bfb0fc - [MIPS][compiler-rt] Fix stat struct's size for O32 ABI

Djordje Todorovic via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 23 03:05:06 PDT 2022


Author: Dimitrije Milosevic
Date: 2022-07-23T11:53:00+02:00
New Revision: 2bfb0fcb51510f22723c8cdfefe2a796a0a5ab25

URL: https://github.com/llvm/llvm-project/commit/2bfb0fcb51510f22723c8cdfefe2a796a0a5ab25
DIFF: https://github.com/llvm/llvm-project/commit/2bfb0fcb51510f22723c8cdfefe2a796a0a5ab25.diff

LOG: [MIPS][compiler-rt] Fix stat struct's size for O32 ABI

Add the MIPS O32 ABI value for the stat struct's size.

Differential Revision: https://reviews.llvm.org/D129749.

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
index a6091307bdce..bd5692ed511b 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -98,9 +98,10 @@ const unsigned struct_kernel_stat64_sz = 104;
 const unsigned struct_kernel_stat_sz = 144;
 const unsigned struct_kernel_stat64_sz = 104;
 #elif defined(__mips__)
-const unsigned struct_kernel_stat_sz = SANITIZER_ANDROID
-                                           ? FIRST_32_SECOND_64(104, 128)
-                                           : FIRST_32_SECOND_64(160, 216);
+const unsigned struct_kernel_stat_sz =
+    SANITIZER_ANDROID
+        ? FIRST_32_SECOND_64(104, 128)
+        : FIRST_32_SECOND_64((_MIPS_SIM == _ABIN32) ? 160 : 144, 216);
 const unsigned struct_kernel_stat64_sz = 104;
 #elif defined(__s390__) && !defined(__s390x__)
 const unsigned struct_kernel_stat_sz = 64;


        


More information about the llvm-commits mailing list