[libc-commits] [libc] 0e3ff29 - [libc][Obvious] Restore static keyword of a few static methods.

Siva Chandra via libc-commits libc-commits at lists.llvm.org
Fri Jan 20 17:00:07 PST 2023


Author: Siva Chandra
Date: 2023-01-20T16:57:12-08:00
New Revision: 0e3ff29b95667ca1bacc653b94a94a9b34ecdc93

URL: https://github.com/llvm/llvm-project/commit/0e3ff29b95667ca1bacc653b94a94a9b34ecdc93
DIFF: https://github.com/llvm/llvm-project/commit/0e3ff29b95667ca1bacc653b94a94a9b34ecdc93.diff

LOG: [libc][Obvious] Restore static keyword of a few static methods.

The static keyword of the concerned methods was accidentally lost in a
previous commit.

Added: 
    

Modified: 
    libc/src/__support/FPUtil/aarch64/FEnvImpl.h
    libc/src/string/memory_utils/op_aarch64.h

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/FPUtil/aarch64/FEnvImpl.h b/libc/src/__support/FPUtil/aarch64/FEnvImpl.h
index 213966ab98f4f..c82d1be3eb564 100644
--- a/libc/src/__support/FPUtil/aarch64/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/aarch64/FEnvImpl.h
@@ -51,7 +51,7 @@ struct FEnv {
   static constexpr uint32_t ExceptionStatusFlagsBitPosition = 0;
   static constexpr uint32_t ExceptionControlFlagsBitPosition = 8;
 
-  LIBC_INLINE uint32_t getStatusValueForExcept(int excepts) {
+  LIBC_INLINE static uint32_t getStatusValueForExcept(int excepts) {
     return (excepts & FE_INVALID ? INVALID : 0) |
            (excepts & FE_DIVBYZERO ? DIVBYZERO : 0) |
            (excepts & FE_OVERFLOW ? OVERFLOW : 0) |
@@ -59,7 +59,7 @@ struct FEnv {
            (excepts & FE_INEXACT ? INEXACT : 0);
   }
 
-  LIBC_INLINE int exceptionStatusToMacro(uint32_t status) {
+  LIBC_INLINE static int exceptionStatusToMacro(uint32_t status) {
     return (status & INVALID ? FE_INVALID : 0) |
            (status & DIVBYZERO ? FE_DIVBYZERO : 0) |
            (status & OVERFLOW ? FE_OVERFLOW : 0) |

diff  --git a/libc/src/string/memory_utils/op_aarch64.h b/libc/src/string/memory_utils/op_aarch64.h
index d94e7f4b2b612..cd64905f36f15 100644
--- a/libc/src/string/memory_utils/op_aarch64.h
+++ b/libc/src/string/memory_utils/op_aarch64.h
@@ -33,7 +33,7 @@ namespace neon {
 template <size_t Size> struct BzeroCacheLine {
   static constexpr size_t SIZE = Size;
 
-  LIBC_INLINE void block(Ptr dst, uint8_t) {
+  LIBC_INLINE static void block(Ptr dst, uint8_t) {
     static_assert(Size == 64);
 #if __SIZEOF_POINTER__ == 4
     asm("dc zva, %w[dst]" : : [dst] "r"(dst) : "memory");
@@ -42,7 +42,7 @@ template <size_t Size> struct BzeroCacheLine {
 #endif
   }
 
-  LIBC_INLINE void loop_and_tail(Ptr dst, uint8_t value, size_t count) {
+  LIBC_INLINE static void loop_and_tail(Ptr dst, uint8_t value, size_t count) {
     static_assert(Size > 1, "a loop of size 1 does not need tail");
     size_t offset = 0;
     do {


        


More information about the libc-commits mailing list