OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [score/] [cpu/] [a29k/] [asm.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*  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
 *  !!! THIS FILE DOES NOT APPEAR TO HAVE BEEN USED IN THE 29K PORT !!!
14
 *
15
 *  COPYRIGHT:
16
 *
17
 *  This file is based on similar code found in newlib available
18
 *  from ftp.cygnus.com.  The file which was used had no copyright
19
 *  notice.  This file is freely distributable as long as the source
20
 *  of the file is noted.  This file is:
21
 *
22
 *  COPYRIGHT (c) 1989-1997
23
 *  On-Line Applications Research Corporation (OAR).
24
 *
25
 *  asm.h,v 1.5 2002/04/19 13:25:19 joel Exp
26
 */
27
 
28
#ifndef __A29K_ASM_h
29
#define __A29K_ASM_h
30
 
31
/*
32
 *  Indicate we are in an assembly file and get the basic CPU definitions.
33
 */
34
 
35
#ifndef ASM
36
#define ASM
37
#endif
38
#include <rtems/score/cpuopts.h>
39
#include <rtems/score/asm.h>
40
 
41
/*
42
 *  Recent versions of GNU cpp define variables which indicate the
43
 *  need for underscores and percents.  If not using GNU cpp or
44
 *  the version does not support this, then you will obviously
45
 *  have to define these as appropriate.
46
 */
47
 
48
#ifndef __USER_LABEL_PREFIX__
49
#define __USER_LABEL_PREFIX__ _
50
#endif
51
 
52
#ifndef __REGISTER_PREFIX__
53
#define __REGISTER_PREFIX__
54
#endif
55
 
56
/* ANSI concatenation macros.  */
57
 
58
#define CONCAT1(a, b) CONCAT2(a, b)
59
#define CONCAT2(a, b) a ## b
60
 
61
/* Use the right prefix for global labels.  */
62
 
63
#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
64
 
65
/* Use the right prefix for registers.  */
66
 
67
#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
68
 
69
/*
70
 *  define macros for all of the registers on this CPU
71
 *
72
 *  EXAMPLE:     #define d0 REG (d0)
73
 */
74
 
75
/*
76
 *  Define macros to handle section beginning and ends.
77
 */
78
 
79
 
80
#define BEGIN_CODE_DCL .text
81
#define END_CODE_DCL
82
#define BEGIN_DATA_DCL .data
83
#define END_DATA_DCL
84
#define BEGIN_CODE .text
85
#define END_CODE
86
#define BEGIN_DATA
87
#define END_DATA
88
#define BEGIN_BSS
89
#define END_BSS
90
#define END
91
 
92
/*
93
 *  Following must be tailor for a particular flavor of the C compiler.
94
 *  They may need to put underscores in front of the symbols.
95
 */
96
 
97
#define PUBLIC(sym) .globl SYM (sym)
98
#define EXTERN(sym) .globl SYM (sym)
99
 
100
#endif
101
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.