(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[glibc.git] / sysdeps / m68k / asm-syntax.h
blob8e2a4ca2ca682d45113751bfc6a244dd8dc18c1a
1 /* Definitions for 68k syntax variations.
2 Copyright (C) 1992, 1994, 1996, 1997 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, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA. */
21 #ifdef HAVE_ELF
23 /* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
24 #define ALIGNARG(log2) 1<<log2
25 /* For ELF we need the `.type' directive to make shared libs work right. */
26 #define PROLOG(name) .type name,@function
27 #define EPILOG(name) .size name,.-name
28 /* For ELF we need to prefix register names and local labels. */
29 #ifdef __STDC__
30 #define R_(r) %##r
31 #define R(r) R_(r)
32 #define L(label) .##label
33 #else
34 #define R(r) %/**/r
35 #define L(label) ./**/label
36 #endif
38 #else
40 #define ALIGNARG(log2) log2
41 #define PROLOG(name) /* Nothing. */
42 #define EPILOG(name) /* Nothing. */
43 #define R(r) r
44 #define L(label) label
46 #endif
48 #ifdef MIT_SYNTAX
49 #define MEM(base)R(base)@
50 #define MEM_DISP(base,displacement)R(base)@(displacement)
51 #define MEM_INDX(base,idx,size_suffix)R(base)@(R(idx):size_suffix)
52 #define MEM_INDX1(base,idx,size_suffix,scale)R(base)@(R(idx):size_suffix:scale)
53 #define MEM_PREDEC(memory_base)R(memory_base)@-
54 #define MEM_POSTINC(memory_base)R(memory_base)@+
55 #define TEXT .text
56 #define ALIGN .even
57 #define GLOBL .globl
58 /* Use variable sized opcodes. */
59 #define bcc jcc
60 #define bcs jcs
61 #define bls jls
62 #define beq jeq
63 #define bne jne
64 #define bra jra
65 #endif
67 #ifdef MOTOROLA_SYNTAX
68 #define MEM(base)(R(base))
69 #define MEM_DISP(base,displacement)(displacement,R(base))
70 #define MEM_PREDEC(memory_base)-(R(memory_base))
71 #define MEM_POSTINC(memory_base)(R(memory_base))+
72 #ifdef __STDC__
73 #define MEM_INDX_(base,idx,size_suffix)(R(base),R(idx##.##size_suffix))
74 #define MEM_INDX(base,idx,size_suffix)MEM_INDX_(base,idx,size_suffix)
75 #define MEM_INDX1_(base,idx,size_suffix,scale)(R(base),R(idx##.##size_suffix*scale))
76 #define MEM_INDX1(base,idx,size_suffix,scale)MEM_INDX1_(base,idx,size_suffix,scale)
77 #else
78 #define MEM_INDX(base,idx,size_suffix)(R(base),R(idx).size_suffix)
79 #define MEM_INDX1(base,idx,size_suffix,scale)(R(base),R(idx).size_suffix*scale)
80 #endif
81 #define TEXT .text
82 #define ALIGN .align ALIGNARG(2)
83 #define GLOBL .globl
84 #define bcc jbcc
85 #define bcs jbcs
86 #define bls jbls
87 #define beq jbeq
88 #define bne jbne
89 #define bra jbra
90 #define movel move.l
91 #define moveml movem.l
92 #define moveql moveq.l
93 #define cmpl cmp.l
94 #define orl or.l
95 #define clrl clr.l
96 #define eorw eor.w
97 #define lsrl lsr.l
98 #define lsll lsl.l
99 #define roxrl roxr.l
100 #define roxll roxl.l
101 #define addl add.l
102 #define addxl addx.l
103 #define addql addq.l
104 #define subl sub.l
105 #define subxl subx.l
106 #define subql subq.l
107 #define negl neg.l
108 #define mulul mulu.l
109 #endif