source: rtems/cpukit/score/cpu/mips/asm.h @ 32f415d

4.104.114.84.95
Last change on this file since 32f415d was 32f415d, checked in by Joel Sherrill <joel.sherrill@…>, on 12/13/00 at 18:09:48

2000-12-13 Joel Sherrill <joel@…>

  • cpu_asm.h: Removed.
  • Makefile.am: Remove cpu_asm.h.
  • rtems/score/mips64orion.h: Renamed mips.h.
  • rtems/score/mips.h: New file, formerly mips64orion.h. Header rewritten. (mips_get_sr, mips_set_sr, mips_enable_in_interrupt_mask, mips_disable_in_interrupt_mask): New macros.
  • rtems/score/Makefile.am: Reflect renaming mips64orion.h.
  • asm.h: Include <mips.h> not <mips64orion.h>. Now includes the few defines that were in <cpu_asm.h>.
  • cpu.c (_CPU_ISR_Get_level): Added MIPS ISA I version of this routine. MIPS ISA 3 is still in assembly for now. (_CPU_Thread_Idle_body): Rewrote in C.
  • cpu_asm.S: Rewrote file header. (FRAME,ENDFRAME) now in asm.h. (_CPU_ISR_Get_level): Removed ISA I version and rewrote in C. (_CPU_ISR_Set_level): Removed ISA I version and rewrote in C. (_CPU_Context_switch): MIPS ISA I now manages preserves SR_IEC and leaves other bits in SR alone on task switch. (mips_enable_interrupts,mips_disable_interrupts, mips_enable_global_interrupts,mips_disable_global_interrupts, disable_int, enable_int): Removed. (mips_get_sr): Rewritten as C macro. (_CPU_Thread_Idle_body): Rewritten in C. (init_exc_vecs): Rewritten in C as mips_install_isr_entries() and placed in libcpu. (exc_tlb_code, exc_xtlb_code, exc_cache_code, exc_norm_code): Moved to libcpu/mips/shared/interrupts. (general): Cleaned up comment blocks and #if 0 areas.
  • idtcpu.h: Made ifdef report an error.
  • iregdef.h: Removed warning.
  • rtems/score/cpu.h (CPU_INTERRUPT_NUMBER_OF_VECTORS): Now a variable number defined by libcpu. (_CPU_ISR_Disable, _CPU_ISR_Enable): Rewritten to use new routines to access SR. (_CPU_ISR_Set_level): Rewritten as macro for ISA I. (_CPU_Context_Initialize): Honor ISR level in task initialization. (_CPU_Fatal_halt): Use new _CPU_ISR_Disable() macro.
  • Property mode set to 100644
File size: 3.5 KB
Line 
1/*  asm.h
2 *
3 *  This include file attempts to address the problems
4 *  caused by incompatible flavors of assemblers and
5 *  toolsets.  It primarily addresses variations in the
6 *  use of leading underscores on symbols and the requirement
7 *  that register names be preceded by a %.
8 *
9 *
10 *  NOTE: The spacing in the use of these macros
11 *        is critical to them working as advertised.
12 *
13 *  COPYRIGHT:
14 *
15 *  This file is based on similar code found in newlib available
16 *  from ftp.cygnus.com.  The file which was used had no copyright
17 *  notice.  This file is freely distributable as long as the source
18 *  of the file is noted.  This file is:
19 *
20 *  COPYRIGHT (c) 1994-1997.
21 *  On-Line Applications Research Corporation (OAR).
22 *
23 *  $Id$
24 */
25/* @(#)asm.h       03/15/96     1.1 */
26
27#ifndef __NO_CPU_ASM_h
28#define __NO_CPU_ASM_h
29
30/*
31 *  Indicate we are in an assembly file and get the basic CPU definitions.
32 */
33
34#ifndef ASM
35#define ASM
36#endif
37#include <rtems/score/targopts.h>
38#include <rtems/score/mips.h>
39
40/*
41 *  Recent versions of GNU cpp define variables which indicate the
42 *  need for underscores and percents.  If not using GNU cpp or
43 *  the version does not support this, then you will obviously
44 *  have to define these as appropriate.
45 */
46
47#ifndef __USER_LABEL_PREFIX__
48#define __USER_LABEL_PREFIX__ _
49#endif
50
51#ifndef __REGISTER_PREFIX__
52#define __REGISTER_PREFIX__
53#endif
54
55/* ANSI concatenation macros.  */
56
57#define CONCAT1(a, b) CONCAT2(a, b)
58#define CONCAT2(a, b) a ## b
59
60/* Use the right prefix for global labels.  */
61
62#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
63
64/* Use the right prefix for registers.  */
65
66#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
67
68/*
69 *  define macros for all of the registers on this CPU
70 *
71 *  EXAMPLE:     #define d0 REG (d0)
72 */
73
74/*
75 *  Define macros to handle section beginning and ends.
76 */
77
78
79#define BEGIN_CODE_DCL .text
80#define END_CODE_DCL
81#define BEGIN_DATA_DCL .data
82#define END_DATA_DCL
83#define BEGIN_CODE .text
84#define END_CODE
85#define BEGIN_DATA
86#define END_DATA
87#define BEGIN_BSS
88#define END_BSS
89#define END
90
91/*
92 *  Following must be tailor for a particular flavor of the C compiler.
93 *  They may need to put underscores in front of the symbols.
94 */
95
96#define PUBLIC(sym) .globl SYM (sym)
97#define EXTERN(sym) .globl SYM (sym)
98
99/*
100 *  Debugger macros for assembly language routines. Allows the
101 *  programmer to set up the necessary stack frame info
102 *  required by debuggers to do stack traces.
103 */
104
105#ifndef XDS
106#define FRAME(name,frm_reg,offset,ret_reg)      \
107        .globl  name;                           \
108        .ent    name;                           \
109name:;                                          \
110        .frame  frm_reg,offset,ret_reg
111#define ENDFRAME(name)                          \
112        .end name
113#else
114#define FRAME(name,frm_reg,offset,ret_reg)      \
115        .globl  _##name;\
116_##name:
117#define ENDFRAME(name)
118#endif  XDS
119
120/*
121 * Hardware Floating Point Registers
122 */
123
124#define R_FP0   0
125#define R_FP1   1
126#define R_FP2   2
127#define R_FP3   3
128#define R_FP4   4
129#define R_FP5   5
130#define R_FP6   6
131#define R_FP7   7
132#define R_FP8   8
133#define R_FP9   9
134#define R_FP10  10
135#define R_FP11  11
136#define R_FP12  12
137#define R_FP13  13
138#define R_FP14  14
139#define R_FP15  15
140#define R_FP16  16
141#define R_FP17  17
142#define R_FP18  18
143#define R_FP19  19
144#define R_FP20  20
145#define R_FP21  21
146#define R_FP22  22
147#define R_FP23  23
148#define R_FP24  24
149#define R_FP25  25
150#define R_FP26  26
151#define R_FP27  27
152#define R_FP28  28
153#define R_FP29  29
154#define R_FP30  30
155#define R_FP31  31
156
157#endif
158/* end of include file */
159
Note: See TracBrowser for help on using the repository browser.