Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: nspr/pr/src/md/unix/os_Linux_x86.s

Issue 2078763002: Delete bundled copy of NSS and replace with README. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss@master
Patch Set: Delete bundled copy of NSS and replace with README. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « nspr/pr/src/md/unix/os_Darwin_x86_64.s ('k') | nspr/pr/src/md/unix/os_Linux_x86_64.s » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7 // PRInt32 _PR_x86_AtomicIncrement(PRInt32 *val)
8 //
9 // Atomically increment the integer pointed to by 'val' and return
10 // the result of the increment.
11 //
12 .text
13 .globl _PR_x86_AtomicIncrement
14 .align 4
15 _PR_x86_AtomicIncrement:
16 movl 4(%esp), %ecx
17 movl $1, %eax
18 lock
19 xaddl %eax, (%ecx)
20 incl %eax
21 ret
22
23 // PRInt32 _PR_x86_AtomicDecrement(PRInt32 *val)
24 //
25 // Atomically decrement the integer pointed to by 'val' and return
26 // the result of the decrement.
27 //
28 .text
29 .globl _PR_x86_AtomicDecrement
30 .align 4
31 _PR_x86_AtomicDecrement:
32 movl 4(%esp), %ecx
33 movl $-1, %eax
34 lock
35 xaddl %eax, (%ecx)
36 decl %eax
37 ret
38
39 // PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval)
40 //
41 // Atomically set the integer pointed to by 'val' to the new
42 // value 'newval' and return the old value.
43 //
44 // An alternative implementation:
45 // .text
46 // .globl _PR_x86_AtomicSet
47 // .align 4
48 //_PR_x86_AtomicSet:
49 // movl 4(%esp), %ecx
50 // movl 8(%esp), %edx
51 // movl (%ecx), %eax
52 //retry:
53 // lock
54 // cmpxchgl %edx, (%ecx)
55 // jne retry
56 // ret
57 //
58 .text
59 .globl _PR_x86_AtomicSet
60 .align 4
61 _PR_x86_AtomicSet:
62 movl 4(%esp), %ecx
63 movl 8(%esp), %eax
64 xchgl %eax, (%ecx)
65 ret
66
67 // PRInt32 _PR_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val)
68 //
69 // Atomically add 'val' to the integer pointed to by 'ptr'
70 // and return the result of the addition.
71 //
72 .text
73 .globl _PR_x86_AtomicAdd
74 .align 4
75 _PR_x86_AtomicAdd:
76 movl 4(%esp), %ecx
77 movl 8(%esp), %eax
78 movl %eax, %edx
79 lock
80 xaddl %eax, (%ecx)
81 addl %edx, %eax
82 ret
83
84 // Magic indicating no need for an executable stack
85 .section .note.GNU-stack, "", @progbits ; .previous
OLDNEW
« no previous file with comments | « nspr/pr/src/md/unix/os_Darwin_x86_64.s ('k') | nspr/pr/src/md/unix/os_Linux_x86_64.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698