Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc/arch Remove unused argument in macro.



details:   https://anonhg.NetBSD.org/src/rev/a61b9fa1cef7
branches:  trunk
changeset: 931319:a61b9fa1cef7
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Apr 26 13:59:44 2020 +0000

description:
Remove unused argument in macro.

diffstat:

 common/lib/libc/arch/i386/atomic/atomic.S   |  34 +++++++++---------
 common/lib/libc/arch/x86_64/atomic/atomic.S |  54 ++++++++++++++--------------
 2 files changed, 44 insertions(+), 44 deletions(-)

diffs (truncated from 374 to 300 lines):

diff -r 340207f1a58c -r a61b9fa1cef7 common/lib/libc/arch/i386/atomic/atomic.S
--- a/common/lib/libc/arch/i386/atomic/atomic.S Sun Apr 26 13:54:02 2020 +0000
+++ b/common/lib/libc/arch/i386/atomic/atomic.S Sun Apr 26 13:59:44 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic.S,v 1.26 2020/04/26 13:54:02 maxv Exp $ */
+/*     $NetBSD: atomic.S,v 1.27 2020/04/26 13:59:44 maxv Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -45,10 +45,10 @@
 #ifdef _HARDKERNEL
 #include "opt_xen.h"
 #include <machine/frameasm.h>
-#define        LOCK(n)         HOTPATCH(HP_NAME_NOLOCK, 1); lock
+#define        LOCK            HOTPATCH(HP_NAME_NOLOCK, 1); lock
 #define        ENDLABEL(a)     _ALIGN_TEXT; LABEL(a)
 #else
-#define        LOCK(n)         lock
+#define        LOCK            lock
 #define        ENDLABEL(a)     /* nothing */
 #endif
 
@@ -57,7 +57,7 @@
 ENTRY(_atomic_add_32)
        movl    4(%esp), %edx
        movl    8(%esp), %eax
-       LOCK(1)
+       LOCK
        addl    %eax, (%edx)
        ret
 END(_atomic_add_32)
@@ -66,7 +66,7 @@
        movl    4(%esp), %edx
        movl    8(%esp), %eax
        movl    %eax, %ecx
-       LOCK(2)
+       LOCK
        xaddl   %eax, (%edx)
        addl    %ecx, %eax
        ret
@@ -75,7 +75,7 @@
 ENTRY(_atomic_and_32)
        movl    4(%esp), %edx
        movl    8(%esp), %eax
-       LOCK(3)
+       LOCK
        andl    %eax, (%edx)
        ret
 END(_atomic_and_32)
@@ -86,7 +86,7 @@
 0:
        movl    %eax, %ecx
        andl    8(%esp), %ecx
-       LOCK(4)
+       LOCK
        cmpxchgl %ecx, (%edx)
        jnz     1f
        movl    %ecx, %eax
@@ -97,7 +97,7 @@
 
 ENTRY(_atomic_dec_32)
        movl    4(%esp), %edx
-       LOCK(5)
+       LOCK
        decl    (%edx)
        ret
 END(_atomic_dec_32)
@@ -105,7 +105,7 @@
 ENTRY(_atomic_dec_32_nv)
        movl    4(%esp), %edx
        movl    $-1, %eax
-       LOCK(6)
+       LOCK
        xaddl   %eax, (%edx)
        decl    %eax
        ret
@@ -113,7 +113,7 @@
 
 ENTRY(_atomic_inc_32)
        movl    4(%esp), %edx
-       LOCK(7)
+       LOCK
        incl    (%edx)
        ret
 END(_atomic_inc_32)
@@ -121,7 +121,7 @@
 ENTRY(_atomic_inc_32_nv)
        movl    4(%esp), %edx
        movl    $1, %eax
-       LOCK(8)
+       LOCK
        xaddl   %eax, (%edx)
        incl    %eax
        ret
@@ -130,7 +130,7 @@
 ENTRY(_atomic_or_32)
        movl    4(%esp), %edx
        movl    8(%esp), %eax
-       LOCK(9)
+       LOCK
        orl     %eax, (%edx)
        ret
 END(_atomic_or_32)
@@ -141,7 +141,7 @@
 0:
        movl    %eax, %ecx
        orl     8(%esp), %ecx
-       LOCK(10)
+       LOCK
        cmpxchgl %ecx, (%edx)
        jnz     1f
        movl    %ecx, %eax
@@ -161,7 +161,7 @@
        movl    4(%esp), %edx
        movl    8(%esp), %eax
        movl    12(%esp), %ecx
-       LOCK(12)
+       LOCK
        cmpxchgl %ecx, (%edx)
        /* %eax now contains the old value */
        ret
@@ -177,7 +177,7 @@
 END(_atomic_cas_32_ni)
 
 ENTRY(_membar_consumer)
-       LOCK(13)
+       LOCK
        addl    $0, -4(%esp)
        ret
 END(_membar_consumer)
@@ -190,7 +190,7 @@
 END(_membar_producer)
 
 ENTRY(_membar_sync)
-       LOCK(14)
+       LOCK
        addl    $0, -4(%esp)
        ret
 END(_membar_sync)
@@ -241,7 +241,7 @@
        movl    20(%esp), %edx
        movl    24(%esp), %ebx
        movl    28(%esp), %ecx
-       LOCK(15)
+       LOCK
        cmpxchg8b (%edi)
        popl    %ebx
        popl    %edi
diff -r 340207f1a58c -r a61b9fa1cef7 common/lib/libc/arch/x86_64/atomic/atomic.S
--- a/common/lib/libc/arch/x86_64/atomic/atomic.S       Sun Apr 26 13:54:02 2020 +0000
+++ b/common/lib/libc/arch/x86_64/atomic/atomic.S       Sun Apr 26 13:59:44 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic.S,v 1.20 2020/04/26 13:54:03 maxv Exp $ */
+/*     $NetBSD: atomic.S,v 1.21 2020/04/26 13:59:44 maxv Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -40,10 +40,10 @@
 
 #ifdef _HARDKERNEL
 #include <machine/frameasm.h>
-#define        LOCK(n)         HOTPATCH(HP_NAME_NOLOCK, 1); lock
+#define        LOCK            HOTPATCH(HP_NAME_NOLOCK, 1); lock
 #define        ENDLABEL(a)     _ALIGN_TEXT; LABEL(a)
 #else
-#define        LOCK(n)         lock
+#define        LOCK            lock
 #define        ENDLABEL(a)     /* nothing */
 #endif
 
@@ -52,21 +52,21 @@
 /* 32-bit */
 
 ENTRY(_atomic_add_32)
-       LOCK(1)
+       LOCK
        addl    %esi, (%rdi)
        ret
 END(_atomic_add_32)
 
 ENTRY(_atomic_add_32_nv)
        movl    %esi, %eax
-       LOCK(2)
+       LOCK
        xaddl   %eax, (%rdi)
        addl    %esi, %eax
        ret
 END(_atomic_add_32_nv)
 
 ENTRY(_atomic_and_32)
-       LOCK(3)
+       LOCK
        andl    %esi, (%rdi)
        ret
 END(_atomic_and_32)
@@ -76,7 +76,7 @@
 1:
        movl    %eax, %ecx
        andl    %esi, %ecx
-       LOCK(4)
+       LOCK
        cmpxchgl %ecx, (%rdi)
        jnz     1b
        movl    %ecx, %eax
@@ -84,35 +84,35 @@
 END(_atomic_and_32_nv)
 
 ENTRY(_atomic_dec_32)
-       LOCK(5)
+       LOCK
        decl    (%rdi)
        ret
 END(_atomic_dec_32)
 
 ENTRY(_atomic_dec_32_nv)
        movl    $-1, %eax
-       LOCK(6)
+       LOCK
        xaddl   %eax, (%rdi)
        decl    %eax
        ret
 END(_atomic_dec_32_nv)
 
 ENTRY(_atomic_inc_32)
-       LOCK(7)
+       LOCK
        incl    (%rdi)
        ret
 END(_atomic_inc_32)
 
 ENTRY(_atomic_inc_32_nv)
        movl    $1, %eax
-       LOCK(8)
+       LOCK
        xaddl   %eax, (%rdi)
        incl    %eax
        ret
 END(_atomic_inc_32_nv)
 
 ENTRY(_atomic_or_32)
-       LOCK(9)
+       LOCK
        orl     %esi, (%rdi)
        ret
 END(_atomic_or_32)
@@ -122,7 +122,7 @@
 1:
        movl    %eax, %ecx
        orl     %esi, %ecx
-       LOCK(10)
+       LOCK
        cmpxchgl %ecx, (%rdi)
        jnz     1b
        movl    %ecx, %eax
@@ -137,7 +137,7 @@
 
 ENTRY(_atomic_cas_32)
        movl    %esi, %eax
-       LOCK(12)
+       LOCK
        cmpxchgl %edx, (%rdi)
        /* %eax now contains the old value */
        ret
@@ -153,21 +153,21 @@
 /* 64-bit */
 
 ENTRY(_atomic_add_64)
-       LOCK(13)
+       LOCK
        addq    %rsi, (%rdi)
        ret
 END(_atomic_add_64)
 
 ENTRY(_atomic_add_64_nv)
        movq    %rsi, %rax
-       LOCK(14)
+       LOCK
        xaddq   %rax, (%rdi)
        addq    %rsi, %rax
        ret
 END(_atomic_add_64_nv)
 
 ENTRY(_atomic_and_64)
-       LOCK(15)
+       LOCK
        andq    %rsi, (%rdi)
        ret
 END(_atomic_and_64)
@@ -177,7 +177,7 @@
 1:
        movq    %rax, %rcx
        andq    %rsi, %rcx
-       LOCK(16)
+       LOCK
        cmpxchgq %rcx, (%rdi)
        jnz     1b
        movq    %rcx, %rax
@@ -185,35 +185,35 @@
 END(_atomic_and_64_nv)
 



Home | Main Index | Thread Index | Old Index