about summary refs log tree commit diff
path: root/sysdeps/m68k/m68020/asm-syntax.h
blob: 394b3ca73937e4a2201a05cf6ac48e50f07590d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/* asm.h -- Definitions for 68k syntax variations.

Copyright (C) 1992, 1994 Free Software Foundation, Inc.

This file is part of the GNU MP Library.

The GNU MP Library is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.

The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
License for more details.

You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */

#ifdef MIT_SYNTAX
#define MEM(base)base@
#define MEM_DISP(base,displacement)base@(displacement)
#define MEM_PREDEC(memory_base)memory_base@-
#define MEM_POSTINC(memory_base)memory_base@+
#ifdef __STDC__
#define INSN1(mnemonic,size_suffix,dst)mnemonic##size_suffix dst
#define INSN2(mnemonic,size_suffix,dst,src)mnemonic##size_suffix src,dst
#else
#define INSN1(mnemonic,size_suffix,dst)mnemonic/**/size_suffix dst
#define INSN2(mnemonic,size_suffix,dst,src)mnemonic/**/size_suffix src,dst
#endif
#define LAB(label) label:
#define TEXT .text
#define ALIGN .even
#define GLOBL .globl
#endif

#ifdef SONY_SYNTAX
#define MEM(base)(base)
#define MEM_DISP(base,displacement)(displacement,base)
#define MEM_PREDEC(memory_base)-(memory_base)
#define MEM_POSTINC(memory_base)(memory_base)+
#define INSN1(mnemonic,size_suffix,dst)mnemonic.size_suffix dst
#ifdef __STDC__
#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src##,dst
#else
#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src/**/,dst
#endif
#define LAB(label) label:
#define TEXT .text
#define ALIGN .even
#define GLOBL .globl
#endif

#ifdef MOTOROLA_SYNTAX
#define MEM(base)(base)
#define MEM_DISP(base,displacement)(displacement,base)
#define MEM_PREDEC(memory_base)-(memory_base)
#define MEM_POSTINC(memory_base)(memory_base)+
#define INSN1(mnemonic,size_suffix,dst)mnemonic.size_suffix dst
#ifdef __STDC__
#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src##,dst
#else
#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src/**/,dst
#endif
#define LAB(label) label
#define TEXT
#define ALIGN
#define GLOBL XDEF
#define l L
#define w W
#define move MOVE
#define eor EOR
#define lsr LSR
#define add ADD
#define addx ADDX
#define addq ADDQ
#define sub SUB
#define subx SUBX
#define subq SUBQ
#define neg NEG
#define bcc BCC
#define bcs BCS
#define bra BRA
#define dbf DBF
#define rts RTS
#define d0 D0
#define d1 D1
#define d2 D2
#define d3 D3
#define d4 D4
#define d5 D5
#define d6 D6
#define d7 D7
#define a0 A0
#define a1 A1
#define a2 A2
#define a3 A3
#define a4 A4
#define a5 A5
#define a6 A6
#define a7 A7
#define sp SP
#endif