source: rtems/cpukit/score/cpu/c4x/rtems/asm.h @ 7a28ac8

4.104.115
Last change on this file since 7a28ac8 was 7a28ac8, checked in by Joel Sherrill <joel.sherrill@…>, on 09/10/08 at 15:41:37

2008-09-10 Joel Sherrill <joel.sherrill@…>

  • configure.ac, aclocal/canonical-target-name.m4: Readd NIOS2 and TI C4x. Accidentally not done on 4.9 branch. :(
  • score/cpu/c4x/.cvsignore, score/cpu/c4x/ChangeLog, score/cpu/c4x/Makefile.am, score/cpu/c4x/cpu.c, score/cpu/c4x/cpu_asm.S, score/cpu/c4x/irq.c, score/cpu/c4x/preinstall.am, score/cpu/c4x/rtems/asm.h, score/cpu/c4x/rtems/score/c4x.h, score/cpu/c4x/rtems/score/cpu.h, score/cpu/c4x/rtems/score/cpu_asm.h, score/cpu/c4x/rtems/score/types.h, score/cpu/c4x/rtems/tic4x/c4xio.h, score/cpu/nios2/.cvsignore, score/cpu/nios2/ChangeLog, score/cpu/nios2/Makefile.am, score/cpu/nios2/cpu.c, score/cpu/nios2/cpu_asm.S, score/cpu/nios2/irq.c, score/cpu/nios2/preinstall.am, score/cpu/nios2/rtems/asm.h, score/cpu/nios2/rtems/score/cpu.h, score/cpu/nios2/rtems/score/cpu_asm.h, score/cpu/nios2/rtems/score/nios2.h, score/cpu/nios2/rtems/score/types.h: New files.
  • Property mode set to 100644
File size: 2.2 KB
Line 
1/**
2 * @file rtems/asm.h
3 *
4 *  This include file attempts to address the problems
5 *  caused by incompatible flavors of assemblers and
6 *  toolsets.  It primarily addresses variations in the
7 *  use of leading underscores on symbols and the requirement
8 *  that register names be preceded by a %.
9 */
10
11/*
12 *  NOTE: The spacing in the use of these macros
13 *        is critical to them working as advertised.
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) 1994-1997.
23 *  On-Line Applications Research Corporation (OAR).
24 *
25 *  $Id$
26 */
27
28#ifndef _RTEMS_ASM_H
29#define _RTEMS_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/c4x.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#include <rtems/concat.h>
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
Note: See TracBrowser for help on using the repository browser.