Back to index

cell-binutils  2.17cvs20070401
ia64-opc-x.c
Go to the documentation of this file.
00001 /* ia64-opc-x.c -- IA-64 `X' opcode table.
00002    Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
00003    Contributed by Timothy Wall <twall@cygnus.com>
00004 
00005    This file is part of GDB, GAS, and the GNU binutils.
00006 
00007    GDB, GAS, and the GNU binutils are free software; you can redistribute
00008    them and/or modify them under the terms of the GNU General Public
00009    License as published by the Free Software Foundation; either version
00010    2, or (at your option) any later version.
00011 
00012    GDB, GAS, and the GNU binutils are distributed in the hope that they
00013    will be useful, but WITHOUT ANY WARRANTY; without even the implied
00014    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
00015    the GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this file; see the file COPYING.  If not, write to the
00019    Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00020    02110-1301, USA.  */
00021 
00022 #include "ia64-opc.h"
00023 
00024 /* Identify the specific X-unit type.  */
00025 #define X0      IA64_TYPE_X, 0
00026 #define X     IA64_TYPE_X, 1
00027 
00028 /* Instruction bit fields:  */
00029 #define bBtype(x)    (((ia64_insn) ((x) & 0x7)) << 6)
00030 #define bD(x)        (((ia64_insn) ((x) & 0x1)) << 35)
00031 #define bPa(x)              (((ia64_insn) ((x) & 0x1)) << 12)
00032 #define bPr(x)              (((ia64_insn) ((x) & 0x3f)) << 0)
00033 #define bVc(x)              (((ia64_insn) ((x) & 0x1)) << 20)
00034 #define bWha(x)             (((ia64_insn) ((x) & 0x3)) << 33)
00035 #define bX3(x)              (((ia64_insn) ((x) & 0x7)) << 33)
00036 #define bX6(x)              (((ia64_insn) ((x) & 0x3f)) << 27)
00037 #define bY(x)        (((ia64_insn) ((x) & 0x1)) << 26)
00038 
00039 #define mBtype              bBtype (-1)
00040 #define mD           bD (-1)
00041 #define mPa          bPa (-1)
00042 #define mPr          bPr (-1)
00043 #define mVc             bVc (-1)
00044 #define mWha         bWha (-1)
00045 #define mX3             bX3 (-1)
00046 #define mX6          bX6 (-1)
00047 #define mY           bY (-1)
00048 
00049 #define OpX3X6(a,b,c)              (bOp (a) | bX3 (b) | bX6(c)), \
00050                             (mOp | mX3 | mX6)
00051 #define OpX3X6Y(a,b,c,d)    (bOp (a) | bX3 (b) | bX6(c) | bY(d)), \
00052                             (mOp | mX3 | mX6 | mY)
00053 #define OpVc(a,b)           (bOp (a) | bVc (b)), (mOp | mVc)
00054 #define OpPaWhaD(a,b,c,d) \
00055        (bOp (a) | bPa (b) | bWha (c) | bD (d)), (mOp | mPa | mWha | mD)
00056 #define OpBtypePaWhaD(a,b,c,d,e) \
00057        (bOp (a) | bBtype (b) | bPa (c) | bWha (d) | bD (e)), \
00058        (mOp | mBtype | mPa | mWha | mD)
00059 #define OpBtypePaWhaDPr(a,b,c,d,e,f) \
00060        (bOp (a) | bBtype (b) | bPa (c) | bWha (d) | bD (e) | bPr (f)), \
00061        (mOp | mBtype | mPa | mWha | mD | mPr)
00062 
00063 struct ia64_opcode ia64_opcodes_x[] =
00064   {
00065     {"break.x",      X0, OpX3X6 (0, 0, 0x00), {IMMU62}, 0, 0, NULL},
00066     {"nop.x", X0, OpX3X6Y (0, 0, 0x01, 0), {IMMU62}, 0, 0, NULL},
00067     {"hint.x",       X0, OpX3X6Y (0, 0, 0x01, 1), {IMMU62}, 0, 0, NULL},
00068     {"movl",  X,  OpVc (6, 0), {R1, IMMU64}, 0, 0, NULL},
00069 #define BRL(a,b) \
00070       X0, OpBtypePaWhaDPr (0xC, 0, a, 0, b, 0), {TGT64}, PSEUDO, 0, NULL
00071     {"brl.few",         BRL (0, 0)},
00072     {"brl",             BRL (0, 0)},
00073     {"brl.few.clr",  BRL (0, 1)},
00074     {"brl.clr",             BRL (0, 1)},
00075     {"brl.many",     BRL (1, 0)},
00076     {"brl.many.clr", BRL (1, 1)},
00077 #undef BRL
00078 #define BRL(a,b,c) \
00079       X0, OpBtypePaWhaD (0xC, 0, a, b, c), {TGT64}, 0, 0, NULL
00080 #define BRLP(a,b,c) \
00081       X0, OpBtypePaWhaD (0xC, 0, a, b, c), {TGT64}, PSEUDO, 0, NULL
00082     {"brl.cond.sptk.few",   BRL (0, 0, 0)},
00083     {"brl.cond.sptk",              BRLP (0, 0, 0)},
00084     {"brl.cond.sptk.few.clr",      BRL (0, 0, 1)},
00085     {"brl.cond.sptk.clr",   BRLP (0, 0, 1)},
00086     {"brl.cond.spnt.few",   BRL (0, 1, 0)},
00087     {"brl.cond.spnt",              BRLP (0, 1, 0)},
00088     {"brl.cond.spnt.few.clr",      BRL (0, 1, 1)},
00089     {"brl.cond.spnt.clr",   BRLP (0, 1, 1)},
00090     {"brl.cond.dptk.few",   BRL (0, 2, 0)},
00091     {"brl.cond.dptk",              BRLP (0, 2, 0)},
00092     {"brl.cond.dptk.few.clr",      BRL (0, 2, 1)},
00093     {"brl.cond.dptk.clr",   BRLP (0, 2, 1)},
00094     {"brl.cond.dpnt.few",   BRL (0, 3, 0)},
00095     {"brl.cond.dpnt",              BRLP (0, 3, 0)},
00096     {"brl.cond.dpnt.few.clr",      BRL (0, 3, 1)},
00097     {"brl.cond.dpnt.clr",   BRLP (0, 3, 1)},
00098     {"brl.cond.sptk.many",  BRL (1, 0, 0)},
00099     {"brl.cond.sptk.many.clr",     BRL (1, 0, 1)},
00100     {"brl.cond.spnt.many",  BRL (1, 1, 0)},
00101     {"brl.cond.spnt.many.clr",     BRL (1, 1, 1)},
00102     {"brl.cond.dptk.many",  BRL (1, 2, 0)},
00103     {"brl.cond.dptk.many.clr",     BRL (1, 2, 1)},
00104     {"brl.cond.dpnt.many",  BRL (1, 3, 0)},
00105     {"brl.cond.dpnt.many.clr",     BRL (1, 3, 1)},
00106     {"brl.sptk.few",        BRL (0, 0, 0)},
00107     {"brl.sptk",            BRLP (0, 0, 0)},
00108     {"brl.sptk.few.clr",    BRL (0, 0, 1)},
00109     {"brl.sptk.clr",        BRLP (0, 0, 1)},
00110     {"brl.spnt.few",        BRL (0, 1, 0)},
00111     {"brl.spnt",            BRLP (0, 1, 0)},
00112     {"brl.spnt.few.clr",    BRL (0, 1, 1)},
00113     {"brl.spnt.clr",        BRLP (0, 1, 1)},
00114     {"brl.dptk.few",        BRL (0, 2, 0)},
00115     {"brl.dptk",            BRLP (0, 2, 0)},
00116     {"brl.dptk.few.clr",    BRL (0, 2, 1)},
00117     {"brl.dptk.clr",        BRLP (0, 2, 1)},
00118     {"brl.dpnt.few",        BRL (0, 3, 0)},
00119     {"brl.dpnt",            BRLP (0, 3, 0)},
00120     {"brl.dpnt.few.clr",    BRL (0, 3, 1)},
00121     {"brl.dpnt.clr",        BRLP (0, 3, 1)},
00122     {"brl.sptk.many",              BRL (1, 0, 0)},
00123     {"brl.sptk.many.clr",   BRL (1, 0, 1)},
00124     {"brl.spnt.many",              BRL (1, 1, 0)},
00125     {"brl.spnt.many.clr",   BRL (1, 1, 1)},
00126     {"brl.dptk.many",              BRL (1, 2, 0)},
00127     {"brl.dptk.many.clr",   BRL (1, 2, 1)},
00128     {"brl.dpnt.many",              BRL (1, 3, 0)},
00129     {"brl.dpnt.many.clr",   BRL (1, 3, 1)},
00130 #undef BRL
00131 #undef BRLP
00132 #define BRL(a,b,c) X, OpPaWhaD (0xD, a, b, c), {B1, TGT64}, 0, 0, NULL
00133 #define BRLP(a,b,c) X, OpPaWhaD (0xD, a, b, c), {B1, TGT64}, PSEUDO, 0, NULL
00134     {"brl.call.sptk.few",   BRL (0, 0, 0)},
00135     {"brl.call.sptk",              BRLP (0, 0, 0)},
00136     {"brl.call.sptk.few.clr",      BRL (0, 0, 1)},
00137     {"brl.call.sptk.clr",   BRLP (0, 0, 1)},
00138     {"brl.call.spnt.few",   BRL (0, 1, 0)},
00139     {"brl.call.spnt",              BRLP (0, 1, 0)},
00140     {"brl.call.spnt.few.clr",      BRL (0, 1, 1)},
00141     {"brl.call.spnt.clr",   BRLP (0, 1, 1)},
00142     {"brl.call.dptk.few",   BRL (0, 2, 0)},
00143     {"brl.call.dptk",              BRLP (0, 2, 0)},
00144     {"brl.call.dptk.few.clr",      BRL (0, 2, 1)},
00145     {"brl.call.dptk.clr",   BRLP (0, 2, 1)},
00146     {"brl.call.dpnt.few",   BRL (0, 3, 0)},
00147     {"brl.call.dpnt",              BRLP (0, 3, 0)},
00148     {"brl.call.dpnt.few.clr",      BRL (0, 3, 1)},
00149     {"brl.call.dpnt.clr",   BRLP (0, 3, 1)},
00150     {"brl.call.sptk.many",  BRL (1, 0, 0)},
00151     {"brl.call.sptk.many.clr",     BRL (1, 0, 1)},
00152     {"brl.call.spnt.many",  BRL (1, 1, 0)},
00153     {"brl.call.spnt.many.clr",     BRL (1, 1, 1)},
00154     {"brl.call.dptk.many",  BRL (1, 2, 0)},
00155     {"brl.call.dptk.many.clr",     BRL (1, 2, 1)},
00156     {"brl.call.dpnt.many",  BRL (1, 3, 0)},
00157     {"brl.call.dpnt.many.clr",     BRL (1, 3, 1)},
00158 #undef BRL
00159 #undef BRLP
00160     {NULL, 0, 0, 0, 0, {0}, 0, 0, NULL}
00161   };
00162 
00163 #undef X0
00164 #undef X
00165 
00166 #undef bBtype
00167 #undef bD
00168 #undef bPa
00169 #undef bPr
00170 #undef bVc
00171 #undef bWha
00172 #undef bX3
00173 #undef bX6
00174 
00175 #undef mBtype
00176 #undef mD
00177 #undef mPa
00178 #undef mPr
00179 #undef mVc
00180 #undef mWha
00181 #undef mX3
00182 #undef mX6
00183 
00184 #undef OpX3X6
00185 #undef OpVc
00186 #undef OpPaWhaD
00187 #undef OpBtypePaWhaD
00188 #undef OpBtypePaWhaDPr