18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 38c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 48c2ecf20Sopenharmony_ci * for more details. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Copyright (C) 1985 MIPS Computer Systems, Inc. 78c2ecf20Sopenharmony_ci * Copyright (C) 1994, 95, 99, 2003 by Ralf Baechle 88c2ecf20Sopenharmony_ci * Copyright (C) 1990 - 1992, 1999 Silicon Graphics, Inc. 98c2ecf20Sopenharmony_ci * Copyright (C) 2011 Wind River Systems, 108c2ecf20Sopenharmony_ci * written by Ralf Baechle <ralf@linux-mips.org> 118c2ecf20Sopenharmony_ci */ 128c2ecf20Sopenharmony_ci#ifndef _ASM_REGDEF_H 138c2ecf20Sopenharmony_ci#define _ASM_REGDEF_H 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include <asm/sgidefs.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#if _MIPS_SIM == _MIPS_SIM_ABI32 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci/* 208c2ecf20Sopenharmony_ci * Symbolic register names for 32 bit ABI 218c2ecf20Sopenharmony_ci */ 228c2ecf20Sopenharmony_ci#define zero $0 /* wired zero */ 238c2ecf20Sopenharmony_ci#define AT $1 /* assembler temp - uppercase because of ".set at" */ 248c2ecf20Sopenharmony_ci#define v0 $2 /* return value */ 258c2ecf20Sopenharmony_ci#define v1 $3 268c2ecf20Sopenharmony_ci#define a0 $4 /* argument registers */ 278c2ecf20Sopenharmony_ci#define a1 $5 288c2ecf20Sopenharmony_ci#define a2 $6 298c2ecf20Sopenharmony_ci#define a3 $7 308c2ecf20Sopenharmony_ci#define t0 $8 /* caller saved */ 318c2ecf20Sopenharmony_ci#define t1 $9 328c2ecf20Sopenharmony_ci#define t2 $10 338c2ecf20Sopenharmony_ci#define t3 $11 348c2ecf20Sopenharmony_ci#define t4 $12 358c2ecf20Sopenharmony_ci#define ta0 $12 368c2ecf20Sopenharmony_ci#define t5 $13 378c2ecf20Sopenharmony_ci#define ta1 $13 388c2ecf20Sopenharmony_ci#define t6 $14 398c2ecf20Sopenharmony_ci#define ta2 $14 408c2ecf20Sopenharmony_ci#define t7 $15 418c2ecf20Sopenharmony_ci#define ta3 $15 428c2ecf20Sopenharmony_ci#define s0 $16 /* callee saved */ 438c2ecf20Sopenharmony_ci#define s1 $17 448c2ecf20Sopenharmony_ci#define s2 $18 458c2ecf20Sopenharmony_ci#define s3 $19 468c2ecf20Sopenharmony_ci#define s4 $20 478c2ecf20Sopenharmony_ci#define s5 $21 488c2ecf20Sopenharmony_ci#define s6 $22 498c2ecf20Sopenharmony_ci#define s7 $23 508c2ecf20Sopenharmony_ci#define t8 $24 /* caller saved */ 518c2ecf20Sopenharmony_ci#define t9 $25 528c2ecf20Sopenharmony_ci#define jp $25 /* PIC jump register */ 538c2ecf20Sopenharmony_ci#define k0 $26 /* kernel scratch */ 548c2ecf20Sopenharmony_ci#define k1 $27 558c2ecf20Sopenharmony_ci#define gp $28 /* global pointer */ 568c2ecf20Sopenharmony_ci#define sp $29 /* stack pointer */ 578c2ecf20Sopenharmony_ci#define fp $30 /* frame pointer */ 588c2ecf20Sopenharmony_ci#define s8 $30 /* same like fp! */ 598c2ecf20Sopenharmony_ci#define ra $31 /* return address */ 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci#define zero $0 /* wired zero */ 668c2ecf20Sopenharmony_ci#define AT $at /* assembler temp - uppercase because of ".set at" */ 678c2ecf20Sopenharmony_ci#define v0 $2 /* return value - caller saved */ 688c2ecf20Sopenharmony_ci#define v1 $3 698c2ecf20Sopenharmony_ci#define a0 $4 /* argument registers */ 708c2ecf20Sopenharmony_ci#define a1 $5 718c2ecf20Sopenharmony_ci#define a2 $6 728c2ecf20Sopenharmony_ci#define a3 $7 738c2ecf20Sopenharmony_ci#define a4 $8 /* arg reg 64 bit; caller saved in 32 bit */ 748c2ecf20Sopenharmony_ci#define ta0 $8 758c2ecf20Sopenharmony_ci#define a5 $9 768c2ecf20Sopenharmony_ci#define ta1 $9 778c2ecf20Sopenharmony_ci#define a6 $10 788c2ecf20Sopenharmony_ci#define ta2 $10 798c2ecf20Sopenharmony_ci#define a7 $11 808c2ecf20Sopenharmony_ci#define ta3 $11 818c2ecf20Sopenharmony_ci#define t0 $12 /* caller saved */ 828c2ecf20Sopenharmony_ci#define t1 $13 838c2ecf20Sopenharmony_ci#define t2 $14 848c2ecf20Sopenharmony_ci#define t3 $15 858c2ecf20Sopenharmony_ci#define s0 $16 /* callee saved */ 868c2ecf20Sopenharmony_ci#define s1 $17 878c2ecf20Sopenharmony_ci#define s2 $18 888c2ecf20Sopenharmony_ci#define s3 $19 898c2ecf20Sopenharmony_ci#define s4 $20 908c2ecf20Sopenharmony_ci#define s5 $21 918c2ecf20Sopenharmony_ci#define s6 $22 928c2ecf20Sopenharmony_ci#define s7 $23 938c2ecf20Sopenharmony_ci#define t8 $24 /* caller saved */ 948c2ecf20Sopenharmony_ci#define t9 $25 /* callee address for PIC/temp */ 958c2ecf20Sopenharmony_ci#define jp $25 /* PIC jump register */ 968c2ecf20Sopenharmony_ci#define k0 $26 /* kernel temporary */ 978c2ecf20Sopenharmony_ci#define k1 $27 988c2ecf20Sopenharmony_ci#define gp $28 /* global pointer - caller saved for PIC */ 998c2ecf20Sopenharmony_ci#define sp $29 /* stack pointer */ 1008c2ecf20Sopenharmony_ci#define fp $30 /* frame pointer */ 1018c2ecf20Sopenharmony_ci#define s8 $30 /* callee saved */ 1028c2ecf20Sopenharmony_ci#define ra $31 /* return address */ 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ci#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */ 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci#endif /* _ASM_REGDEF_H */ 107