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

Subversion Repositories or1k

[/] [or1k/] [branches/] [newlib/] [newlib/] [libgloss/] [m68k/] [asm.h] - Blame information for rev 39

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

Line No. Rev Author Line
1 39 lampret
/* asm.h -- macros for m68k asm
2
 *
3
 * Copyright (c) 1995, 1996 Cygnus Support
4
 *
5
 * The authors hereby grant permission to use, copy, modify, distribute,
6
 * and license this software and its documentation for any purpose, provided
7
 * that existing copyright notices are retained in all copies and that this
8
 * notice is included verbatim in any distributions. No written agreement,
9
 * license, or royalty fee is required for any of the authorized uses.
10
 * Modifications to this software may be copyrighted by their authors
11
 * and need not follow the licensing terms described here, provided that
12
 * the new terms are clearly indicated on the first page of each file where
13
 * they apply.
14
 */
15
 
16
#if 0
17
/*
18
 * XXX __USER_LABEL_PREFIX__ and __REGISTER_PREFIX__ do not work on gcc 2.7.0-3
19
 * XXX The following ifdef magic fixes the problem but results in a warning
20
 * XXX when compiling assembly code.
21
 */
22
#ifndef __USER_LABEL_PREFIX__
23
/* #define __USER_LABEL_PREFIX__ ""     /* no underscore for coff */
24
#define __USER_LABEL_PREFIX__ _         /* leading underscore for aout */
25
#endif
26
 
27
#ifndef __REGISTER_PREFIX__
28
#define __REGISTER_PREFIX__             /* never has anything prefixed */
29
#endif
30
#endif
31
 
32
/*
33
 * some assemblers choke on '#' as an immediate value. As gcc can also
34
 * use '&', use that in those cases.
35
 */
36
#ifndef __IMMEDIATE_PREFIX__
37
#define __IMMEDIATE_PREFIX__ #
38
#endif
39
 
40
/* ANSI concatenation macros.  */
41
#define CONCAT1(a, b) CONCAT2(a, b)
42
#define CONCAT2(a, b) a ## b
43
 
44
/* use the right prefix for global labels.  */
45
#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__,x)
46
 
47
/* use the right prefix for registers.  */
48
#define REG(x) CONCAT1 (__REGISTER_PREFIX__,x)
49
 
50
/* use the right prefix for immediate values.  */
51
#define IMM(x) CONCAT1 (__IMMEDIATE_PREFIX__,x)
52
 
53
/* use the right prefix for register names */
54
#define d0 REG (d0)
55
#define d1 REG (d1)
56
#define d2 REG (d2)
57
#define d3 REG (d3)
58
#define d4 REG (d4)
59
#define d5 REG (d5)
60
#define d6 REG (d6)
61
#define d7 REG (d7)
62
#define a0 REG (a0)
63
#define a1 REG (a1)
64
#define a2 REG (a2)
65
#define a3 REG (a3)
66
#define a4 REG (a4)
67
#define a5 REG (a5)
68
#define a6 REG (a6)
69
#define a7 REG (a7)
70
#define fp REG (fp)
71
#define fp0 REG (fp0)
72
#define fp1 REG (fp1)
73
#define fp2 REG (fp2)
74
#define fp3 REG (fp3)
75
#define fp4 REG (fp4)
76
#define fp5 REG (fp5)
77
#define fp6 REG (fp6)
78
#define fp7 REG (fp7)
79
#define sp REG (sp)
80
#define usp REG (usp)
81
#define vbr REG (vbr)
82
#define sr REG (sr)
83
#define fpcr REG (fpcr)
84
#define fpsr REG (fpsr)
85
#define fpi REG (fpi)

powered by: WebSVN 2.1.0

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