RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
asm.h
Go to the documentation of this file.
1
17/*
18 * COPYRIGHT:
19 *
20 * This file is based on similar code found in newlib available
21 * from ftp.cygnus.com. The file which was used had no copyright
22 * notice. This file is freely distributable as long as the source
23 * of the file is noted. This file is:
24 *
25 * COPYRIGHT (c) 1994-1997.
26 * On-Line Applications Research Corporation (OAR).
27 */
28
29#ifndef _RTEMS_ASM_H
30#define _RTEMS_ASM_H
31
32/*
33 * Indicate we are in an assembly file and get the basic CPU definitions.
34 */
35
36#ifndef ASM
37#define ASM
38#endif
39#include <rtems/score/cpuopts.h>
40#include <rtems/score/nios2.h>
41
52/*
53 * Recent versions of GNU cpp define variables which indicate the
54 * need for underscores and percents. If not using GNU cpp or
55 * the version does not support this, then you will obviously
56 * have to define these as appropriate.
57 */
58
59#ifndef __USER_LABEL_PREFIX__
60#define __USER_LABEL_PREFIX__ _
61#endif
62
63#ifndef __REGISTER_PREFIX__
64#define __REGISTER_PREFIX__
65#endif
66
67#include <rtems/concat.h>
68
69/* Use the right prefix for global labels. */
70
71#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
72
73/* Use the right prefix for registers. */
74
75#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
76
77/*
78 * define macros for all of the registers on this CPU
79 *
80 * EXAMPLE: #define d0 REG (d0)
81 */
82
83/*
84 * Define macros to handle section beginning and ends.
85 */
86
87
88#define BEGIN_CODE_DCL .text
89#define END_CODE_DCL
90#define BEGIN_DATA_DCL .data
91#define END_DATA_DCL
92#define BEGIN_CODE .text
93#define END_CODE
94#define BEGIN_DATA
95#define END_DATA
96#define BEGIN_BSS
97#define END_BSS
98#define END
99
100/*
101 * Following must be tailor for a particular flavor of the C compiler.
102 * They may need to put underscores in front of the symbols.
103 */
104
105#define PUBLIC(sym) .globl SYM (sym)
106#define EXTERN(sym) .globl SYM (sym)
107
110#endif
NIOS II Set up Basic CPU Dependency Settings Based on Compiler Settings.