aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/lib/milli/milli.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/lib/milli/milli.h')
-rw-r--r--arch/parisc/lib/milli/milli.h165
1 files changed, 165 insertions, 0 deletions
diff --git a/arch/parisc/lib/milli/milli.h b/arch/parisc/lib/milli/milli.h
new file mode 100644
index 000000000000..19ac79f336de
--- /dev/null
+++ b/arch/parisc/lib/milli/milli.h
@@ -0,0 +1,165 @@
1/* 32 and 64-bit millicode, original author Hewlett-Packard
2 adapted for gcc by Paul Bame <bame@debian.org>
3 and Alan Modra <alan@linuxcare.com.au>.
4
5 Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
6
7 This file is part of GCC and is released under the terms of
8 of the GNU General Public License as published by the Free Software
9 Foundation; either version 2, or (at your option) any later version.
10 See the file COPYING in the top-level GCC source directory for a copy
11 of the license. */
12
13#ifndef _PA_MILLI_H_
14#define _PA_MILLI_H_
15
16#define L_dyncall
17#define L_divI
18#define L_divU
19#define L_remI
20#define L_remU
21#define L_div_const
22#define L_mulI
23
24#ifdef CONFIG_64BIT
25 .level 2.0w
26#endif
27
28/* Hardware General Registers. */
29r0: .reg %r0
30r1: .reg %r1
31r2: .reg %r2
32r3: .reg %r3
33r4: .reg %r4
34r5: .reg %r5
35r6: .reg %r6
36r7: .reg %r7
37r8: .reg %r8
38r9: .reg %r9
39r10: .reg %r10
40r11: .reg %r11
41r12: .reg %r12
42r13: .reg %r13
43r14: .reg %r14
44r15: .reg %r15
45r16: .reg %r16
46r17: .reg %r17
47r18: .reg %r18
48r19: .reg %r19
49r20: .reg %r20
50r21: .reg %r21
51r22: .reg %r22
52r23: .reg %r23
53r24: .reg %r24
54r25: .reg %r25
55r26: .reg %r26
56r27: .reg %r27
57r28: .reg %r28
58r29: .reg %r29
59r30: .reg %r30
60r31: .reg %r31
61
62/* Hardware Space Registers. */
63sr0: .reg %sr0
64sr1: .reg %sr1
65sr2: .reg %sr2
66sr3: .reg %sr3
67sr4: .reg %sr4
68sr5: .reg %sr5
69sr6: .reg %sr6
70sr7: .reg %sr7
71
72/* Hardware Floating Point Registers. */
73fr0: .reg %fr0
74fr1: .reg %fr1
75fr2: .reg %fr2
76fr3: .reg %fr3
77fr4: .reg %fr4
78fr5: .reg %fr5
79fr6: .reg %fr6
80fr7: .reg %fr7
81fr8: .reg %fr8
82fr9: .reg %fr9
83fr10: .reg %fr10
84fr11: .reg %fr11
85fr12: .reg %fr12
86fr13: .reg %fr13
87fr14: .reg %fr14
88fr15: .reg %fr15
89
90/* Hardware Control Registers. */
91cr11: .reg %cr11
92sar: .reg %cr11 /* Shift Amount Register */
93
94/* Software Architecture General Registers. */
95rp: .reg r2 /* return pointer */
96#ifdef CONFIG_64BIT
97mrp: .reg r2 /* millicode return pointer */
98#else
99mrp: .reg r31 /* millicode return pointer */
100#endif
101ret0: .reg r28 /* return value */
102ret1: .reg r29 /* return value (high part of double) */
103sp: .reg r30 /* stack pointer */
104dp: .reg r27 /* data pointer */
105arg0: .reg r26 /* argument */
106arg1: .reg r25 /* argument or high part of double argument */
107arg2: .reg r24 /* argument */
108arg3: .reg r23 /* argument or high part of double argument */
109
110/* Software Architecture Space Registers. */
111/* sr0 ; return link from BLE */
112sret: .reg sr1 /* return value */
113sarg: .reg sr1 /* argument */
114/* sr4 ; PC SPACE tracker */
115/* sr5 ; process private data */
116
117/* Frame Offsets (millicode convention!) Used when calling other
118 millicode routines. Stack unwinding is dependent upon these
119 definitions. */
120r31_slot: .equ -20 /* "current RP" slot */
121sr0_slot: .equ -16 /* "static link" slot */
122#if defined(CONFIG_64BIT)
123mrp_slot: .equ -16 /* "current RP" slot */
124psp_slot: .equ -8 /* "previous SP" slot */
125#else
126mrp_slot: .equ -20 /* "current RP" slot (replacing "r31_slot") */
127#endif
128
129
130#define DEFINE(name,value)name: .EQU value
131#define RDEFINE(name,value)name: .REG value
132#ifdef milliext
133#define MILLI_BE(lbl) BE lbl(sr7,r0)
134#define MILLI_BEN(lbl) BE,n lbl(sr7,r0)
135#define MILLI_BLE(lbl) BLE lbl(sr7,r0)
136#define MILLI_BLEN(lbl) BLE,n lbl(sr7,r0)
137#define MILLIRETN BE,n 0(sr0,mrp)
138#define MILLIRET BE 0(sr0,mrp)
139#define MILLI_RETN BE,n 0(sr0,mrp)
140#define MILLI_RET BE 0(sr0,mrp)
141#else
142#define MILLI_BE(lbl) B lbl
143#define MILLI_BEN(lbl) B,n lbl
144#define MILLI_BLE(lbl) BL lbl,mrp
145#define MILLI_BLEN(lbl) BL,n lbl,mrp
146#define MILLIRETN BV,n 0(mrp)
147#define MILLIRET BV 0(mrp)
148#define MILLI_RETN BV,n 0(mrp)
149#define MILLI_RET BV 0(mrp)
150#endif
151
152#define CAT(a,b) a##b
153
154#define SUBSPA_MILLI .section .text
155#define SUBSPA_MILLI_DIV .section .text.div,"ax",@progbits! .align 16
156#define SUBSPA_MILLI_MUL .section .text.mul,"ax",@progbits! .align 16
157#define ATTR_MILLI
158#define SUBSPA_DATA .section .data
159#define ATTR_DATA
160#define GLOBAL $global$
161#define GSYM(sym) !sym:
162#define LSYM(sym) !CAT(.L,sym:)
163#define LREF(sym) CAT(.L,sym)
164
165#endif /*_PA_MILLI_H_*/