1 /* Definitions for 68k syntax variations.
2 Copyright (C) 1992, 1994, 1996, 1997, 2012 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. Its master source is NOT part of
4 the C library, however. The master source lives in the GNU MP Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
20 /* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
21 #define ALIGNARG(log2) 1<<log2
22 /* For ELF we need the `.type' directive to make shared libs work right. */
23 #define PROLOG(name) .type name,@function
24 #define EPILOG(name) .size name,.-name
25 /* For ELF we need to prefix register names and local labels. */
28 #define L(label) .##label
31 #define MEM(base)R(base)@
32 #define MEM_DISP(base,displacement)R(base)@(displacement)
33 #define MEM_INDX(base,idx,size_suffix)R(base)@(R(idx):size_suffix)
34 #define MEM_INDX1(base,idx,size_suffix,scale)R(base)@(R(idx):size_suffix:scale)
35 #define MEM_PREDEC(memory_base)R(memory_base)@-
36 #define MEM_POSTINC(memory_base)R(memory_base)@+
40 /* Use variable sized opcodes. */
49 #ifdef MOTOROLA_SYNTAX
50 #define MEM(base)(R(base))
51 #define MEM_DISP(base,displacement)(displacement,R(base))
52 #define MEM_PREDEC(memory_base)-(R(memory_base))
53 #define MEM_POSTINC(memory_base)(R(memory_base))+
54 #define MEM_INDX_(base,idx,size_suffix)(R(base),R(idx##.##size_suffix))
55 #define MEM_INDX(base,idx,size_suffix)MEM_INDX_(base,idx,size_suffix)
56 #define MEM_INDX1_(base,idx,size_suffix,scale)(R(base),R(idx##.##size_suffix*scale))
57 #define MEM_INDX1(base,idx,size_suffix,scale)MEM_INDX1_(base,idx,size_suffix,scale)
59 #define ALIGN .align ALIGNARG(2)
68 #define moveml movem.l
69 #define moveql moveq.l