Resort bug numbers in NEWS into ascending order.
[glibc.git] / sysdeps / m68k / asm-syntax.h
blobd10adde2ec5d50b2f2f263a91245eae87cdfa339
1 /* Definitions for 68k syntax variations.
2 Copyright (C) 1992-2015 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 /* For ELF we need to prefix register names and local labels. */
21 #define R_(r) %##r
22 #define R(r) R_(r)
23 #define L(label) .##label
25 #ifdef MIT_SYNTAX
26 #define MEM(base)R(base)@
27 #define MEM_DISP(base,displacement)R(base)@(displacement)
28 #define MEM_INDX(base,idx,size_suffix)R(base)@(R(idx):size_suffix)
29 #define MEM_INDX1(base,idx,size_suffix,scale)R(base)@(R(idx):size_suffix:scale)
30 #define MEM_PREDEC(memory_base)R(memory_base)@-
31 #define MEM_POSTINC(memory_base)R(memory_base)@+
32 #define TEXT .text
33 /* Use variable sized opcodes. */
34 #define bcc jcc
35 #define bcs jcs
36 #define bls jls
37 #define beq jeq
38 #define bne jne
39 #define bra jra
40 #endif
42 #ifdef MOTOROLA_SYNTAX
43 #define MEM(base)(R(base))
44 #define MEM_DISP(base,displacement)(displacement,R(base))
45 #define MEM_PREDEC(memory_base)-(R(memory_base))
46 #define MEM_POSTINC(memory_base)(R(memory_base))+
47 #define MEM_INDX_(base,idx,size_suffix)(R(base),R(idx##.##size_suffix))
48 #define MEM_INDX(base,idx,size_suffix)MEM_INDX_(base,idx,size_suffix)
49 #define MEM_INDX1_(base,idx,size_suffix,scale)(R(base),R(idx##.##size_suffix*scale))
50 #define MEM_INDX1(base,idx,size_suffix,scale)MEM_INDX1_(base,idx,size_suffix,scale)
51 #define TEXT .text
52 #define bcc jbcc
53 #define bcs jbcs
54 #define bls jbls
55 #define beq jbeq
56 #define bne jbne
57 #define bra jbra
58 #define movel move.l
59 #define moveml movem.l
60 #define moveql moveq.l
61 #define cmpl cmp.l
62 #define orl or.l
63 #define clrl clr.l
64 #define andw and.w
65 #define eorw eor.w
66 #define andl and.l
67 #define lsrl lsr.l
68 #define lsll lsl.l
69 #define roxrl roxr.l
70 #define roxll roxl.l
71 #define addl add.l
72 #define addxl addx.l
73 #define addql addq.l
74 #define subl sub.l
75 #define subxl subx.l
76 #define subqw subq.w
77 #define subql subq.l
78 #define negl neg.l
79 #define mulul mulu.l
80 #define tstw tst.w
81 #define tstl tst.l
82 #endif