1
/* syntax.h -- Definitions for x86 syntax variations.
3
* Copyright (C) 1992, 1994, 1995, 1998,
4
* 2001 Free Software Foundation, Inc.
6
* GnuPG is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* GnuPG 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
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20
* Note: This code is heavily based on the GNU MP Library.
21
* Actually it's the same code with only minor changes in the
22
* way the data is stored; this is to support the abstraction
23
* of an optional secure memory allocation which may be used
24
* to avoid revealing of sensitive data due to paging etc.
25
* The GNU MP Library itself is published under the LGPL;
26
* however I decided to publish this code under the plain GPL.
31
#if defined (BSD_SYNTAX) || defined (ELF_SYNTAX)
33
#define MEM(base)(base)
34
#define MEM_DISP(base,displacement)displacement(R(base))
35
#define MEM_INDEX(base,index,size)(R(base),R(index),size)
37
#define INSN1(mnemonic,size_suffix,dst)mnemonic##size_suffix dst
38
#define INSN2(mnemonic,size_suffix,dst,src)mnemonic##size_suffix src,dst
40
#define INSN1(mnemonic,size_suffix,dst)mnemonic/**/size_suffix dst
41
#define INSN2(mnemonic,size_suffix,dst,src)mnemonic/**/size_suffix src,dst
44
#if defined (BSD_SYNTAX)
45
#define ALIGN(log) .align log
47
#if defined (ELF_SYNTAX)
48
#define ALIGN(log) .align 1<<(log)
55
#define MEM(base)[base]
56
#define MEM_DISP(base,displacement)[base+(displacement)]
57
#define MEM_INDEX(base,index,size)[base+index*size]
58
#define INSN1(mnemonic,size_suffix,dst)mnemonic dst
59
#define INSN2(mnemonic,size_suffix,dst,src)mnemonic dst,src
61
#define ALIGN(log) .align log
65
#ifdef X86_BROKEN_ALIGN
67
#define ALIGN(log) .align log,0x90