nsprpub/pr/src/md/unix/os_Irix.s

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

michael@0 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 /*
michael@0 7 * Atomically add a new element to the top of the stack
michael@0 8 *
michael@0 9 * usage : PR_StackPush(listp, elementp);
michael@0 10 * -----------------------
michael@0 11 */
michael@0 12
michael@0 13 #include "md/_irix.h"
michael@0 14 #ifdef _PR_HAVE_ATOMIC_CAS
michael@0 15
michael@0 16 #include <sys/asm.h>
michael@0 17 #include <sys/regdef.h>
michael@0 18
michael@0 19 LEAF(PR_StackPush)
michael@0 20
michael@0 21 retry_push:
michael@0 22 .set noreorder
michael@0 23 lw v0,0(a0)
michael@0 24 li t1,1
michael@0 25 beq v0,t1,retry_push
michael@0 26 move t0,a1
michael@0 27
michael@0 28 ll v0,0(a0)
michael@0 29 beq v0,t1,retry_push
michael@0 30 nop
michael@0 31 sc t1,0(a0)
michael@0 32 beq t1,0,retry_push
michael@0 33 nop
michael@0 34 sw v0,0(a1)
michael@0 35 sync
michael@0 36 sw t0,0(a0)
michael@0 37 nop
michael@0 38 nop
michael@0 39 nop
michael@0 40 nop
michael@0 41 nop
michael@0 42 nop
michael@0 43 nop
michael@0 44 nop
michael@0 45 nop
michael@0 46 nop
michael@0 47 nop
michael@0 48 nop
michael@0 49 nop
michael@0 50 nop
michael@0 51 nop
michael@0 52 nop
michael@0 53 nop
michael@0 54 nop
michael@0 55 nop
michael@0 56 nop
michael@0 57 nop
michael@0 58 nop
michael@0 59 nop
michael@0 60 nop
michael@0 61 nop
michael@0 62 nop
michael@0 63 nop
michael@0 64 nop
michael@0 65 jr ra
michael@0 66 nop
michael@0 67
michael@0 68 END(PR_StackPush)
michael@0 69
michael@0 70 /*
michael@0 71 *
michael@0 72 * Atomically remove the element at the top of the stack
michael@0 73 *
michael@0 74 * usage : elemep = PR_StackPop(listp);
michael@0 75 *
michael@0 76 */
michael@0 77
michael@0 78 LEAF(PR_StackPop)
michael@0 79 retry_pop:
michael@0 80 .set noreorder
michael@0 81
michael@0 82
michael@0 83 lw v0,0(a0)
michael@0 84 li t1,1
michael@0 85 beq v0,0,done
michael@0 86 nop
michael@0 87 beq v0,t1,retry_pop
michael@0 88 nop
michael@0 89
michael@0 90 ll v0,0(a0)
michael@0 91 beq v0,0,done
michael@0 92 nop
michael@0 93 beq v0,t1,retry_pop
michael@0 94 nop
michael@0 95 sc t1,0(a0)
michael@0 96 beq t1,0,retry_pop
michael@0 97 nop
michael@0 98 lw t0,0(v0)
michael@0 99 sw t0,0(a0)
michael@0 100 done:
michael@0 101 nop
michael@0 102 nop
michael@0 103 nop
michael@0 104 nop
michael@0 105 nop
michael@0 106 nop
michael@0 107 nop
michael@0 108 nop
michael@0 109 nop
michael@0 110 nop
michael@0 111 nop
michael@0 112 nop
michael@0 113 nop
michael@0 114 nop
michael@0 115 nop
michael@0 116 nop
michael@0 117 nop
michael@0 118 nop
michael@0 119 nop
michael@0 120 nop
michael@0 121 nop
michael@0 122 nop
michael@0 123 nop
michael@0 124 nop
michael@0 125 nop
michael@0 126 nop
michael@0 127 nop
michael@0 128 nop
michael@0 129 jr ra
michael@0 130 nop
michael@0 131
michael@0 132 END(PR_StackPop)
michael@0 133
michael@0 134 #endif /* _PR_HAVE_ATOMIC_CAS */

mercurial