2 * Copyright (c) 2001, Juniper Networks, Inc.
4 * Truman Joe, February 2001.
6 * regdef.h -- MIPS register definitions.
8 * JNPR: regdef.h,v 1.3 2006/08/07 05:38:57 katta
12 #ifndef _MACHINE_REGDEF_H_
13 #define _MACHINE_REGDEF_H_
15 #include <machine/cdefs.h> /* For API selection */
17 #if defined(__ASSEMBLER__)
18 /* General purpose CPU register names */
19 #define zero $0 /* wired zero */
20 #define AT $at /* assembler temp */
21 #define v0 $2 /* return value */
23 #define a0 $4 /* argument registers */
27 #if defined(__mips_n32) || defined(__mips_n64)
32 #define t0 $12 /* Temp regs, not saved accross subroutine calls */
37 #define t0 $8 /* caller saved */
41 #define t4 $12 /* caller saved - 32 bit env arg reg 64 bit */
46 #define s0 $16 /* callee saved */
54 #define t8 $24 /* code generator */
56 #define k0 $26 /* kernel temporary */
58 #define gp $28 /* global pointer */
59 #define sp $29 /* stack pointer */
60 #define fp $30 /* frame pointer */
61 #define s8 $30 /* callee saved */
62 #define ra $31 /* return address */
65 * These are temp registers whose names can be used in either the old
66 * or new ABI, although they map to different physical registers. In
67 * the old ABI, they map to t4-t7, and in the new ABI, they map to a4-a7.
69 * Because they overlap with the last 4 arg regs in the new ABI, ta0-ta3
70 * should be used only when we need more than t0-t3.
72 #if defined(__mips_n32) || defined(__mips_n64)
82 #endif /* __mips_n32 || __mips_n64 */
84 #endif /* __ASSEMBLER__ */
86 #endif /* !_MACHINE_REGDEF_H_ */