1 /* Definitions for 68k syntax variations.
2 Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
4 This file is part of the GNU C Library. Its master source is NOT part of
5 the C library, however. The master source lives in the GNU MP Library.
7 The GNU C Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
12 The GNU C Library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
17 You should have received a copy of the GNU Library General Public
18 License along with the GNU C Library; see the file COPYING.LIB. If not,
19 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
24 /* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
25 #define ALIGNARG(log2) 1<<log2
26 /* For ELF we need the `.type' directive to make shared libs work right. */
27 #define PROLOG(name) .type name,@function
28 #define EPILOG(name) .size name,.-name
29 /* For ELF we need to prefix register names and local labels. */
33 #define L(label) .##label
36 #define L(label) ./**/label
41 #define ALIGNARG(log2) log2
42 #define PROLOG(name) /* Nothing. */
43 #define EPILOG(name) /* Nothing. */
45 #define L(label) label
50 #define MEM(base)R(base)@
51 #define MEM_DISP(base,displacement)R(base)@(displacement)
52 #define MEM_INDX(base,idx,size_suffix)R(base)@(R(idx):size_suffix)
53 #define MEM_INDX1(base,idx,size_suffix,scale)R(base)@(R(idx):size_suffix:scale)
54 #define MEM_PREDEC(memory_base)R(memory_base)@-
55 #define MEM_POSTINC(memory_base)R(memory_base)@+
59 /* Use variable sized opcodes. */
68 #ifdef MOTOROLA_SYNTAX
69 #define MEM(base)(R(base))
70 #define MEM_DISP(base,displacement)(displacement,R(base))
71 #define MEM_PREDEC(memory_base)-(R(memory_base))
72 #define MEM_POSTINC(memory_base)(R(memory_base))+
74 #define MEM_INDX_(base,idx,size_suffix)(R(base),R(idx##.##size_suffix))
75 #define MEM_INDX(base,idx,size_suffix)MEM_INDX_(base,idx,size_suffix)
76 #define MEM_INDX1_(base,idx,size_suffix,scale)(R(base),R(idx##.##size_suffix*scale))
77 #define MEM_INDX1(base,idx,size_suffix,scale)MEM_INDX1_(base,idx,size_suffix,scale)
79 #define MEM_INDX(base,idx,size_suffix)(R(base),R(idx).size_suffix)
80 #define MEM_INDX1(base,idx,size_suffix,scale)(R(base),R(idx).size_suffix*scale)
83 #define ALIGN .align ALIGNARG(2)
92 #define moveml movem.l
93 #define moveql moveq.l