source: rtems/c/src/exec/score/cpu/mips64orion/asm.h @ b9181082

4.104.114.84.9
Last change on this file since b9181082 was b9181082, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 29, 1997 at 12:13:00 AM

Added include of targopts.h.

  • Property mode set to 100644
File size: 2.3 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.
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#define ASM
35#include <rtems/score/targopts.h>
36#include <rtems/score/no_cpu.h>
37
38/*
39 *  Recent versions of GNU cpp define variables which indicate the
40 *  need for underscores and percents.  If not using GNU cpp or
41 *  the version does not support this, then you will obviously
42 *  have to define these as appropriate.
43 */
44
45#ifndef __USER_LABEL_PREFIX__
46#define __USER_LABEL_PREFIX__ _
47#endif
48
49#ifndef __REGISTER_PREFIX__
50#define __REGISTER_PREFIX__
51#endif
52
53/* ANSI concatenation macros.  */
54
55#define CONCAT1(a, b) CONCAT2(a, b)
56#define CONCAT2(a, b) a ## b
57
58/* Use the right prefix for global labels.  */
59
60#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
61
62/* Use the right prefix for registers.  */
63
64#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
65
66/*
67 *  define macros for all of the registers on this CPU
68 *
69 *  EXAMPLE:     #define d0 REG (d0)
70 */
71
72/*
73 *  Define macros to handle section beginning and ends.
74 */
75
76
77#define BEGIN_CODE_DCL .text
78#define END_CODE_DCL
79#define BEGIN_DATA_DCL .data
80#define END_DATA_DCL
81#define BEGIN_CODE .text
82#define END_CODE
83#define BEGIN_DATA
84#define END_DATA
85#define BEGIN_BSS
86#define END_BSS
87#define END
88
89/*
90 *  Following must be tailor for a particular flavor of the C compiler.
91 *  They may need to put underscores in front of the symbols.
92 */
93
94#define PUBLIC(sym) .globl SYM (sym)
95#define EXTERN(sym) .globl SYM (sym)
96
97#endif
98/* end of include file */
99
100
Note: See TracBrowser for help on using the repository browser.