source: mainline/arch/ppc/include/asm/macro.h@ a9387ea

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since a9387ea was a9387ea, checked in by Martin Decky <martin@…>, 20 years ago

PPC assembler register names

  • Property mode set to 100644
File size: 3.9 KB
Line 
1/*
2 * Copyright (C) 2005 Martin Decky
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/*
30 * PPC assembler macros
31 */
32
33/* Condition Register Bit Fields */
34#define cr0 0
35#define cr1 1
36#define cr2 2
37#define cr3 3
38#define cr4 4
39#define cr5 5
40#define cr6 6
41#define cr7 7
42
43/* General Purpose Registers (GPRs) */
44#define r0 0
45#define r1 1
46#define r2 2
47#define r3 3
48#define r4 4
49#define r5 5
50#define r6 6
51#define r7 7
52#define r8 8
53#define r9 9
54#define r10 10
55#define r11 11
56#define r12 12
57#define r13 13
58#define r14 14
59#define r15 15
60#define r16 16
61#define r17 17
62#define r18 18
63#define r19 19
64#define r20 20
65#define r21 21
66#define r22 22
67#define r23 23
68#define r24 24
69#define r25 25
70#define r26 26
71#define r27 27
72#define r28 28
73#define r29 29
74#define r30 30
75#define r31 31
76
77/* Floating Point Registers (FPRs) */
78#define fr0 0
79#define fr1 1
80#define fr2 2
81#define fr3 3
82#define fr4 4
83#define fr5 5
84#define fr6 6
85#define fr7 7
86#define fr8 8
87#define fr9 9
88#define fr10 10
89#define fr11 11
90#define fr12 12
91#define fr13 13
92#define fr14 14
93#define fr15 15
94#define fr16 16
95#define fr17 17
96#define fr18 18
97#define fr19 19
98#define fr20 20
99#define fr21 21
100#define fr22 22
101#define fr23 23
102#define fr24 24
103#define fr25 25
104#define fr26 26
105#define fr27 27
106#define fr28 28
107#define fr29 29
108#define fr30 30
109#define fr31 31
110
111#define vr0 0
112#define vr1 1
113#define vr2 2
114#define vr3 3
115#define vr4 4
116#define vr5 5
117#define vr6 6
118#define vr7 7
119#define vr8 8
120#define vr9 9
121#define vr10 10
122#define vr11 11
123#define vr12 12
124#define vr13 13
125#define vr14 14
126#define vr15 15
127#define vr16 16
128#define vr17 17
129#define vr18 18
130#define vr19 19
131#define vr20 20
132#define vr21 21
133#define vr22 22
134#define vr23 23
135#define vr24 24
136#define vr25 25
137#define vr26 26
138#define vr27 27
139#define vr28 28
140#define vr29 29
141#define vr30 30
142#define vr31 31
143
144#define evr0 0
145#define evr1 1
146#define evr2 2
147#define evr3 3
148#define evr4 4
149#define evr5 5
150#define evr6 6
151#define evr7 7
152#define evr8 8
153#define evr9 9
154#define evr10 10
155#define evr11 11
156#define evr12 12
157#define evr13 13
158#define evr14 14
159#define evr15 15
160#define evr16 16
161#define evr17 17
162#define evr18 18
163#define evr19 19
164#define evr20 20
165#define evr21 21
166#define evr22 22
167#define evr23 23
168#define evr24 24
169#define evr25 25
170#define evr26 26
171#define evr27 27
172#define evr28 28
173#define evr29 29
174#define evr30 30
175#define evr31 31
176
177/* Special Purpose Registers (SPRs) */
178#define xer 1
179#define lr 8
180#define ctr 9
181#define dec 22
182#define srr0 26
183#define srr1 27
184#define sprg0 272
185#define sprg1 273
186#define sprg2 274
187#define sprg3 275
188#define prv 287
189
190.macro REGISTERS_STORE r
191.endm
192
193.macro REGISTERS_LOAD r
194.endm
Note: See TracBrowser for help on using the repository browser.