(_ISwbit): Protext use of parameter with parentheses.
[glibc.git] / sysdeps / i386 / asm-syntax.h
blob68c7b0e584852a6eb6cdd9906e6949601d361780
1 /* Definitions for x86 syntax variations.
2 Copyright (C) 1992, 1994, 1995, 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. */
22 #undef ALIGN
24 #ifdef GAS_SYNTAX
25 #define R(r) %r
26 #define MEM(base)(base)
27 #define MEM_DISP(base,displacement)displacement(R(base))
28 #define MEM_INDEX(base,index,size)(R(base),R(index),size)
29 #ifdef __STDC__
30 #define INSN1(mnemonic,size_suffix,dst)mnemonic##size_suffix dst
31 #define INSN2(mnemonic,size_suffix,dst,src)mnemonic##size_suffix src,dst
32 #else
33 #define INSN1(mnemonic,size_suffix,dst)mnemonic/**/size_suffix dst
34 #define INSN2(mnemonic,size_suffix,dst,src)mnemonic/**/size_suffix src,dst
35 #endif
36 #define TEXT .text
37 #define ALIGN(log) .align log
38 #define GLOBL .globl
39 #endif
41 #ifdef INTEL_SYNTAX
42 #define R(r) r
43 #define MEM(base)[base]
44 #define MEM_DISP(base,displacement)[base+(displacement)]
45 #define MEM_INDEX(base,index,size)[base+index*size]
46 #define INSN1(mnemonic,size_suffix,dst)mnemonic dst
47 #define INSN2(mnemonic,size_suffix,dst,src)mnemonic dst,src
48 #define TEXT .text
49 #define ALIGN(log) .align log
50 #define GLOBL .globl
51 #endif
53 #ifdef BROKEN_ALIGN
54 #undef ALIGN
55 #define ALIGN(log) .align log,0x90
56 #endif
58 #if !defined (NOLOG_ALIGN) && defined (HAVE_ELF)
59 #define NOLOG_ALIGN
60 #endif
62 #ifdef NOLOG_ALIGN
63 #undef ALIGN
64 #define ALIGN(log) .align 1<<log
65 #endif
67 #undef L
68 #ifdef __ELF__
69 #ifdef __STDC__
70 #define L(body) .L##body
71 #else
72 #define L(body) .L/**/body
73 #endif
74 #else
75 #ifdef __STDC__
76 #define L(body) L##body
77 #else
78 #define L(body) L/**/body
79 #endif
80 #endif