1 /* asm.h -- Definitions for 68k syntax variations.
3 Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
5 This file is part of the GNU MP Library.
7 The GNU MP Library is free software; you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published by
9 the Free Software Foundation; either version 2.1 of the License, or (at your
10 option) any later version.
12 The GNU MP Library is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 License for more details.
17 You should have received a copy of the GNU Lesser General Public License
18 along with the GNU MP Library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
20 MA 02111-1307, USA. */
28 #define MEM(base)base@
29 #define MEM_DISP(base,displacement)base@(displacement)
30 #define MEM_INDX(base,idx,size_suffix)base@(idx:size_suffix)
31 #define MEM_INDX1(base,idx,size_suffix,scale)base@(idx:size_suffix:scale)
32 #define MEM_PREDEC(memory_base)memory_base@-
33 #define MEM_POSTINC(memory_base)memory_base@+
34 #define L(label) label
39 /* Use variable sized opcodes. */
52 #define MEM(base)(base)
53 #define MEM_DISP(base,displacement)(displacement,base)
54 #define MEM_INDX(base,idx,size_suffix)(base,idx.size_suffix)
55 #define MEM_INDX1(base,idx,size_suffix,scale)(base,idx.size_suffix*scale)
56 #define MEM_PREDEC(memory_base)-(memory_base)
57 #define MEM_POSTINC(memory_base)(memory_base)+
58 #define L(label) label
64 #ifdef MOTOROLA_SYNTAX
68 #define MEM(base)(base)
69 #define MEM_DISP(base,displacement)(displacement,base)
70 #define MEM_INDX(base,idx,size_suffix)(base,idx.size_suffix)
71 #define MEM_INDX1(base,idx,size_suffix,scale)(base,idx.size_suffix*scale)
72 #define MEM_PREDEC(memory_base)-(memory_base)
73 #define MEM_POSTINC(memory_base)(memory_base)+
74 #define L(label) label
80 #define moveml MOVEM.L
81 #define moveql MOVEQ.L
126 #define PROLOG(name) .type name,@function
127 #define EPILOG(name) .size name,.-name
128 #define MEM(base)(R(base))
129 #define MEM_DISP(base,displacement)(displacement,R(base))
130 #define MEM_PREDEC(memory_base)-(R(memory_base))
131 #define MEM_POSTINC(memory_base)(R(memory_base))+
135 #define MEM_INDX_(base,idx,size_suffix)(R(base),R(idx##.##size_suffix))
136 #define MEM_INDX(base,idx,size_suffix)MEM_INDX_(base,idx,size_suffix)
137 #define MEM_INDX1_(base,idx,size_suffix,scale)(R(base),R(idx##.##size_suffix*scale))
138 #define MEM_INDX1(base,idx,size_suffix,scale)MEM_INDX1_(base,idx,size_suffix,scale)
139 #define L(label) .##label
142 #define MEM_INDX(base,idx,size_suffix)(R(base),R(idx).size_suffix)
143 #define MEM_INDX1(base,idx,size_suffix,scale)(R(base),R(idx).size_suffix*scale)
144 #define L(label) ./**/label
147 #define ALIGN .align 2
157 #if defined (SONY_SYNTAX) || defined (ELF_SYNTAX)
159 #define moveml movem.l
160 #define moveql moveq.l