GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / tile / include / arch / abi.h
blob4a989de1d7d29d37d6772547e8d2e0020901dec0
1 /*
2 * Copyright 2010 Tilera Corporation. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
12 * more details.
15 /**
16 * @file
18 * ABI-related register definitions helpful when writing assembly code.
21 #ifndef __ARCH_ABI_H__
22 #define __ARCH_ABI_H__
24 #include <arch/chip.h>
26 /* Registers 0 - 55 are "normal", but some perform special roles. */
28 #define TREG_FP 52 /**< Frame pointer. */
29 #define TREG_TP 53 /**< Thread pointer. */
30 #define TREG_SP 54 /**< Stack pointer. */
31 #define TREG_LR 55 /**< Link to calling function PC. */
33 /** Index of last normal general-purpose register. */
34 #define TREG_LAST_GPR 55
36 /* Registers 56 - 62 are "special" network registers. */
38 #define TREG_SN 56 /**< Static network access. */
39 #define TREG_IDN0 57 /**< IDN demux 0 access. */
40 #define TREG_IDN1 58 /**< IDN demux 1 access. */
41 #define TREG_UDN0 59 /**< UDN demux 0 access. */
42 #define TREG_UDN1 60 /**< UDN demux 1 access. */
43 #define TREG_UDN2 61 /**< UDN demux 2 access. */
44 #define TREG_UDN3 62 /**< UDN demux 3 access. */
46 /* Register 63 is the "special" zero register. */
48 #define TREG_ZERO 63 /**< "Zero" register; always reads as "0". */
51 /** By convention, this register is used to hold the syscall number. */
52 #define TREG_SYSCALL_NR 10
54 /** Name of register that holds the syscall number, for use in assembly. */
55 #define TREG_SYSCALL_NR_NAME r10
58 /**
59 * The ABI requires callers to allocate a caller state save area of
60 * this many bytes at the bottom of each stack frame.
62 #define C_ABI_SAVE_AREA_SIZE (2 * (CHIP_WORD_SIZE() / 8))
64 /**
65 * The operand to an 'info' opcode directing the backtracer to not
66 * try to find the calling frame.
68 #define INFO_OP_CANNOT_BACKTRACE 2
70 #ifndef __ASSEMBLER__
71 #if CHIP_WORD_SIZE() > 32
73 /** Unsigned type that can hold a register. */
74 typedef unsigned long long uint_reg_t;
76 /** Signed type that can hold a register. */
77 typedef long long int_reg_t;
79 /** String prefix to use for printf(). */
80 #define INT_REG_FMT "ll"
82 #elif !defined(__LP64__) /* avoid confusion with LP64 cross-build tools */
84 /** Unsigned type that can hold a register. */
85 typedef unsigned long uint_reg_t;
87 /** Signed type that can hold a register. */
88 typedef long int_reg_t;
90 /** String prefix to use for printf(). */
91 #define INT_REG_FMT "l"
93 #endif
94 #endif /* __ASSEMBLER__ */
96 #endif /* !__ARCH_ABI_H__ */