Upload Tizen:Base source
[toolchains/nspr.git] / mozilla / nsprpub / pr / src / md / unix / os_AIX.s
1 # -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 #
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
10 #
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
14 # License.
15 #
16 # The Original Code is the Netscape Portable Runtime (NSPR).
17 #
18 # The Initial Developer of the Original Code is
19 # Netscape Communications Corporation.
20 # Portions created by the Initial Developer are Copyright (C) 1998-2000
21 # the Initial Developer. All Rights Reserved.
22 #
23 # Contributor(s):
24 #
25 # Alternatively, the contents of this file may be used under the terms of
26 # either the GNU General Public License Version 2 or later (the "GPL"), or
27 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 # in which case the provisions of the GPL or the LGPL are applicable instead
29 # of those above. If you wish to allow use of your version of this file only
30 # under the terms of either the GPL or the LGPL, and not to allow others to
31 # use your version of this file under the terms of the MPL, indicate your
32 # decision by deleting the provisions above and replace them with the notice
33 # and other provisions required by the GPL or the LGPL. If you do not delete
34 # the provisions above, a recipient may use your version of this file under
35 # the terms of any one of the MPL, the GPL or the LGPL.
36 #
37 # ***** END LICENSE BLOCK *****
38
39 .set r0,0; .set SP,1; .set RTOC,2; .set r3,3; .set r4,4
40 .set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
41 .set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
42 .set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
43 .set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
44 .set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
45 .set r30,30; .set r31,31
46
47
48         .rename H.10.NO_SYMBOL{PR},""
49         .rename H.18.longjmp{TC},"longjmp"
50
51         .lglobl H.10.NO_SYMBOL{PR}
52         .globl  .longjmp
53         .globl  longjmp{DS}
54         .extern .sigcleanup
55         .extern .jmprestfpr
56
57 # .text section
58
59         .csect  H.10.NO_SYMBOL{PR}
60 .longjmp:
61          mr   r13,r3
62          mr   r14,r4
63         stu   SP,-56(SP)
64          bl   .sigcleanup
65           l   RTOC,0x14(SP)
66         cal   SP,0x38(SP)
67          mr   r3,r13
68          mr   r4,r14
69           l   r5,0x8(r3)
70           l   SP,0xc(r3)
71           l   r7,0xf8(r3)
72          st   r7,0x0(SP)
73           l   RTOC,0x10(r3)
74          bl   .jmprestfpr
75 # 1 == cr0 in disassembly
76        cmpi   1,r4,0x0  
77        mtlr   r5
78          lm   r13,0x14(r3)
79           l   r5,0x60(r3)
80       mtcrf   0x38,r5
81          mr   r3,r4
82         bne   __L1
83         lil   r3,0x1
84 __L1:
85          br
86
87 # traceback table
88         .long   0x00000000
89         .byte   0x00                    # VERSION=0
90         .byte   0x00                    # LANG=TB_C
91         .byte   0x20                    # IS_GL=0,IS_EPROL=0,HAS_TBOFF=1
92                                         # INT_PROC=0,HAS_CTL=0,TOCLESS=0
93                                         # FP_PRESENT=0,LOG_ABORT=0
94         .byte   0x40                    # INT_HNDL=0,NAME_PRESENT=1
95                                         # USES_ALLOCA=0,CL_DIS_INV=WALK_ONCOND
96                                         # SAVES_CR=0,SAVES_LR=0
97         .byte   0x80                    # STORES_BC=1,FPR_SAVED=0
98         .byte   0x00                    # GPR_SAVED=0
99         .byte   0x02                    # FIXEDPARMS=2
100         .byte   0x01                    # FLOATPARMS=0,PARMSONSTK=1
101         .long   0x00000000              #
102         .long   0x00000014              # TB_OFFSET
103         .short  7                       # NAME_LEN
104         .byte   "longjmp"
105         .byte   0                       # padding
106         .byte   0                       # padding
107         .byte   0                       # padding
108 # End of traceback table
109         .long   0x00000000              # "\0\0\0\0"
110
111 # .data section
112
113         .toc                            # 0x00000038
114 T.18.longjmp:
115         .tc     H.18.longjmp{TC},longjmp{DS}
116
117         .csect  longjmp{DS}
118         .long   .longjmp                # "\0\0\0\0"
119         .long   TOC{TC0}                # "\0\0\0008"
120         .long   0x00000000              # "\0\0\0\0"
121 # End   csect   longjmp{DS}
122
123 # .bss section