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