Annotation of /trunk/mkinitrd-magellan/klibc/usr/include/arch/mips/machine/asm.h
Parent Directory | Revision Log
Revision 815 -
(hide annotations)
(download)
Fri Apr 24 18:32:46 2009 UTC (15 years ago) by niro
File MIME type: text/plain
File size: 2018 byte(s)
Fri Apr 24 18:32:46 2009 UTC (15 years ago) by niro
File MIME type: text/plain
File size: 2018 byte(s)
-updated to klibc-1.5.15
1 | niro | 532 | /* |
2 | * arch/mips/include/machine/asm.h | ||
3 | */ | ||
4 | |||
5 | #ifndef _MACHINE_ASM_H | ||
6 | #define _MACHINE_ASM_H | ||
7 | |||
8 | niro | 815 | /* |
9 | * Symbolic register names for 32 bit ABI | ||
10 | */ | ||
11 | niro | 532 | |
12 | niro | 815 | #define zero $0 /* wired zero */ |
13 | #define AT $1 /* assembler temp - uppercase because of ".set at" */ | ||
14 | #define v0 $2 /* return value */ | ||
15 | #define v1 $3 | ||
16 | #define a0 $4 /* argument registers */ | ||
17 | #define a1 $5 | ||
18 | #define a2 $6 | ||
19 | #define a3 $7 | ||
20 | #define t0 $8 /* caller saved */ | ||
21 | #define t1 $9 | ||
22 | #define t2 $10 | ||
23 | #define t3 $11 | ||
24 | #define t4 $12 | ||
25 | #define t5 $13 | ||
26 | #define t6 $14 | ||
27 | #define t7 $15 | ||
28 | #define s0 $16 /* callee saved */ | ||
29 | #define s1 $17 | ||
30 | #define s2 $18 | ||
31 | #define s3 $19 | ||
32 | #define s4 $20 | ||
33 | #define s5 $21 | ||
34 | #define s6 $22 | ||
35 | #define s7 $23 | ||
36 | #define t8 $24 /* caller saved */ | ||
37 | #define t9 $25 | ||
38 | #define jp $25 /* PIC jump register */ | ||
39 | #define k0 $26 /* kernel scratch */ | ||
40 | #define k1 $27 | ||
41 | #define gp $28 /* global pointer */ | ||
42 | #define sp $29 /* stack pointer */ | ||
43 | #define fp $30 /* frame pointer */ | ||
44 | #define s8 $30 /* same like fp! */ | ||
45 | #define ra $31 /* return address */ | ||
46 | |||
47 | /* | ||
48 | * LEAF - declare leaf routine | ||
49 | */ | ||
50 | #define LEAF(symbol) \ | ||
51 | .globl symbol; \ | ||
52 | .align 2; \ | ||
53 | .type symbol,@function; \ | ||
54 | .ent symbol,0; \ | ||
55 | symbol: .frame sp,0,ra | ||
56 | |||
57 | |||
58 | /* | ||
59 | * NESTED - declare nested routine entry point | ||
60 | */ | ||
61 | #define NESTED(symbol, framesize, rpc) \ | ||
62 | .globl symbol; \ | ||
63 | .align 2; \ | ||
64 | .type symbol,@function; \ | ||
65 | .ent symbol,0; \ | ||
66 | symbol: .frame sp, framesize, rpc | ||
67 | |||
68 | /* | ||
69 | * END - mark end of function | ||
70 | */ | ||
71 | #define END(function) \ | ||
72 | .end function; \ | ||
73 | .size function,.-function | ||
74 | |||
75 | |||
76 | niro | 532 | #endif /* _MACHINE_ASM_H */ |