source: rtems/cpukit/score/cpu/powerpc/rtems/score/powerpc.h @ 2067679

4.104.115
Last change on this file since 2067679 was 2067679, checked in by Thomas Doerfler <Thomas.Doerfler@…>, on 10/21/09 at 13:19:09
  • rtems/powerpc/registers.h: Added defines DEAR_BOOKE and DEAR_405.
  • rtems/score/cpu.h: Changed fpscr field to an integer type in Context_Control_fp. Fixed warnings in PPC_Set_timebase_register(). Changed _CPU_Context_Initialize_fp() to initialize all fields and avoid floating-point instructions.
  • rtems/score/powerpc.h: Removed PPC_INIT_FPSCR define.
  • Property mode set to 100644
File size: 3.8 KB
Line 
1/**
2 * @file rtems/score/powerpc.h
3 */
4
5/*
6 *  This file contains definitions for the IBM/Motorola PowerPC
7 *  family members.
8 *
9 *  Author:     Andrew Bray <andy@i-cubed.co.uk>
10 *
11 *  COPYRIGHT (c) 1995 by i-cubed ltd.
12 *
13 *  MPC860 support code was added by Jay Monkman <jmonkman@frasca.com>
14 *  MPC8260 support added by Andy Dachs <a.dachs@sstl.co.uk>
15 *  Surrey Satellite Technology Limited
16 *
17 *  To anyone who acknowledges that this file is provided "AS IS"
18 *  without any express or implied warranty:
19 *      permission to use, copy, modify, and distribute this file
20 *      for any purpose is hereby granted without fee, provided that
21 *      the above copyright notice and this notice appears in all
22 *      copies, and that the name of i-cubed limited not be used in
23 *      advertising or publicity pertaining to distribution of the
24 *      software without specific, written prior permission.
25 *      i-cubed limited makes no representations about the suitability
26 *      of this software for any purpose.
27 *
28 *  Derived from c/src/exec/cpu/no_cpu/no_cpu.h:
29 *
30 *  COPYRIGHT (c) 1989-1997.
31 *  On-Line Applications Research Corporation (OAR).
32 *
33 *  The license and distribution terms for this file may in
34 *  the file LICENSE in this distribution or at
35 *  http://www.rtems.com/license/LICENSE.
36 *
37 *
38 * Note:
39 *      This file is included by both C and assembler code ( -DASM )
40 *
41 *  $Id$
42 */
43
44
45#ifndef _RTEMS_SCORE_POWERPC_H
46#define _RTEMS_SCORE_POWERPC_H
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52#include <rtems/score/types.h>
53
54/*
55 *  Define the name of the CPU family.
56 */
57
58#define CPU_NAME "PowerPC"
59
60/*
61 *  This file contains the information required to build
62 *  RTEMS for the PowerPC family.
63 */
64 
65/* Generic ppc */
66
67#ifdef _SOFT_FLOAT
68#define CPU_MODEL_NAME "Generic (no FPU)"
69#elif defined(__NO_FPRS__) || defined(__SPE__)
70#define CPU_MODEL_NAME "Generic (E500/float-gprs/SPE)"
71#else
72#define CPU_MODEL_NAME "Generic (classic FPU)"
73#endif
74
75#define PPC_ALIGNMENT                   8 
76#define PPC_STRUCTURE_ALIGNMENT 32
77
78/*
79 *  Application binary interfaces.
80 *
81 *  PPC_ABI MUST be defined as one of these.
82 *  Only big endian is currently supported.
83 */
84
85/*
86 *  SVR4 ABI
87 */
88#define PPC_ABI_SVR4            2
89/*
90 *  Embedded ABI
91 */
92#define PPC_ABI_EABI            3
93
94/*
95 *  Default to the EABI used by current GNU tools
96 */
97
98#ifndef PPC_ABI
99#define PPC_ABI PPC_ABI_EABI
100#endif
101
102#if (PPC_ABI == PPC_ABI_SVR4) || defined(__ALTIVEC__)
103#define PPC_STACK_ALIGNMENT     16
104#elif (PPC_ABI == PPC_ABI_EABI)
105#if 1
106/* Till.S: 2008/07/10; AFAIK, the CPU_STACK_ALIGNMENT is only
107 * used to align the top of the stack. We don't lose much
108 * if we always align TOS to 16-bytes but we then are always
109 * OK, even if the user tells the compiler to generate 16-byte
110 * alignment.
111 */
112#define PPC_STACK_ALIGNMENT     16
113#else
114#define PPC_STACK_ALIGNMENT     8
115#endif
116#else
117#error  "PPC_ABI is not properly defined"
118#endif
119
120/*
121 *  Assume PPC_HAS_FPU to be a synonym for _SOFT_FLOAT.
122 */
123
124#if defined(_SOFT_FLOAT) || defined(__NO_FPRS__) /* e500 has unified integer/FP registers */
125#define PPC_HAS_FPU 0
126#else
127#define PPC_HAS_FPU 1
128#endif
129
130/*
131 *  Unless specified above, If the model has FP support, it is assumed to
132 *  support doubles (8-byte floating point numbers).
133 *
134 *  If the model does NOT have FP support, then the model does
135 *  NOT have double length FP registers.
136 */
137
138#if (PPC_HAS_FPU)
139#define PPC_HAS_DOUBLE 1
140#else
141#define PPC_HAS_DOUBLE 0
142#endif
143
144/*
145 *  Assemblers.
146 *  PPC_ASM MUST be defined as one of these.
147 *
148 *  PPC_ASM_ELF:   ELF assembler. Currently used for all ABIs.
149 *
150 *  NOTE: Only PPC_ABI_ELF is currently fully supported.
151 *
152 *  Also NOTE: cpukit doesn't need this but asm.h which is defined
153 *             in cpukit for consistency with other ports does.
154 */
155
156#define PPC_ASM_ELF   0
157
158/*
159 *  Default to the assembler format used by the current GNU tools.
160 */
161#define PPC_ASM PPC_ASM_ELF
162
163
164#ifdef __cplusplus
165}
166#endif
167
168#endif /* _RTEMS_SCORE_POWERPC_H */
Note: See TracBrowser for help on using the repository browser.