Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | # -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | # |
michael@0 | 3 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 6 | |
michael@0 | 7 | # |
michael@0 | 8 | # Based on the programming examples in The PowerPC Architecture: |
michael@0 | 9 | # A Specification for A New Family of RISC Processors, 2nd Ed., |
michael@0 | 10 | # Book I, Section E.1, "Synchronization," pp. 249-256, May 1994. |
michael@0 | 11 | # |
michael@0 | 12 | |
michael@0 | 13 | .section ".text" |
michael@0 | 14 | |
michael@0 | 15 | # |
michael@0 | 16 | # PRInt32 _PR_ppc_AtomicIncrement(PRInt32 *val); |
michael@0 | 17 | # |
michael@0 | 18 | .align 2 |
michael@0 | 19 | .globl _PR_ppc_AtomicIncrement |
michael@0 | 20 | .type _PR_ppc_AtomicIncrement,@function |
michael@0 | 21 | _PR_ppc_AtomicIncrement: |
michael@0 | 22 | .Lfd1: lwarx 4,0,3 |
michael@0 | 23 | addi 0,4,1 |
michael@0 | 24 | stwcx. 0,0,3 |
michael@0 | 25 | bne- .Lfd1 |
michael@0 | 26 | mr 3,0 |
michael@0 | 27 | blr |
michael@0 | 28 | .Lfe1: .size _PR_ppc_AtomicIncrement,.Lfe1-_PR_ppc_AtomicIncrement |
michael@0 | 29 | |
michael@0 | 30 | # |
michael@0 | 31 | # PRInt32 _PR_ppc_AtomicDecrement(PRInt32 *val); |
michael@0 | 32 | # |
michael@0 | 33 | .align 2 |
michael@0 | 34 | .globl _PR_ppc_AtomicDecrement |
michael@0 | 35 | .type _PR_ppc_AtomicDecrement,@function |
michael@0 | 36 | _PR_ppc_AtomicDecrement: |
michael@0 | 37 | .Lfd2: lwarx 4,0,3 |
michael@0 | 38 | addi 0,4,-1 |
michael@0 | 39 | stwcx. 0,0,3 |
michael@0 | 40 | bne- .Lfd2 |
michael@0 | 41 | mr 3,0 |
michael@0 | 42 | blr |
michael@0 | 43 | .Lfe2: .size _PR_ppc_AtomicDecrement,.Lfe2-_PR_ppc_AtomicDecrement |
michael@0 | 44 | |
michael@0 | 45 | # |
michael@0 | 46 | # PRInt32 _PR_ppc_AtomicSet(PRInt32 *val, PRInt32 newval); |
michael@0 | 47 | # |
michael@0 | 48 | .align 2 |
michael@0 | 49 | .globl _PR_ppc_AtomicSet |
michael@0 | 50 | .type _PR_ppc_AtomicSet,@function |
michael@0 | 51 | _PR_ppc_AtomicSet: |
michael@0 | 52 | .Lfd3: lwarx 5,0,3 |
michael@0 | 53 | stwcx. 4,0,3 |
michael@0 | 54 | bne- .Lfd3 |
michael@0 | 55 | mr 3,5 |
michael@0 | 56 | blr |
michael@0 | 57 | .Lfe3: .size _PR_ppc_AtomicSet,.Lfe3-_PR_ppc_AtomicSet |
michael@0 | 58 | |
michael@0 | 59 | # |
michael@0 | 60 | # PRInt32 _PR_ppc_AtomicAdd(PRInt32 *ptr, PRInt32 val); |
michael@0 | 61 | # |
michael@0 | 62 | .align 2 |
michael@0 | 63 | .globl _PR_ppc_AtomicAdd |
michael@0 | 64 | .type _PR_ppc_AtomicAdd,@function |
michael@0 | 65 | _PR_ppc_AtomicAdd: |
michael@0 | 66 | .Lfd4: lwarx 5,0,3 |
michael@0 | 67 | add 0,4,5 |
michael@0 | 68 | stwcx. 0,0,3 |
michael@0 | 69 | bne- .Lfd4 |
michael@0 | 70 | mr 3,0 |
michael@0 | 71 | blr |
michael@0 | 72 | .Lfe4: .size _PR_ppc_AtomicAdd,.Lfe4-_PR_ppc_AtomicAdd |
michael@0 | 73 | |
michael@0 | 74 | # Magic indicating no need for an executable stack |
michael@0 | 75 | .section .note.GNU-stack, "", @progbits ; .previous |