1105760Srwatson/* ia64-opc-x.c -- IA-64 `X' opcode table. 2105760Srwatson Copyright (C) 1998-2020 Free Software Foundation, Inc. 3105760Srwatson Contributed by Timothy Wall <twall@cygnus.com> 4105760Srwatson 5105760Srwatson This file is part of the GNU opcodes library. 6105760Srwatson 7105760Srwatson This library is free software; you can redistribute it and/or modify 8105760Srwatson it under the terms of the GNU General Public License as published by 9105760Srwatson the Free Software Foundation; either version 3, or (at your option) 10105760Srwatson any later version. 11105760Srwatson 12105760Srwatson It is distributed in the hope that it will be useful, but WITHOUT 13105760Srwatson ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14105760Srwatson or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 15105760Srwatson License for more details. 16105760Srwatson 17105760Srwatson You should have received a copy of the GNU General Public License 18105760Srwatson along with this file; see the file COPYING. If not, write to the 19105760Srwatson Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, 20105760Srwatson MA 02110-1301, USA. */ 21105760Srwatson 22105760Srwatson#include "ia64-opc.h" 23105760Srwatson 24105760Srwatson/* Identify the specific X-unit type. */ 25105760Srwatson#define X0 IA64_TYPE_X, 0 26105760Srwatson#define X IA64_TYPE_X, 1 27105760Srwatson 28105760Srwatson/* Instruction bit fields: */ 29105760Srwatson#define bBtype(x) (((ia64_insn) ((x) & 0x7)) << 6) 30105760Srwatson#define bD(x) (((ia64_insn) ((x) & 0x1)) << 35) 31105760Srwatson#define bPa(x) (((ia64_insn) ((x) & 0x1)) << 12) 32105760Srwatson#define bPr(x) (((ia64_insn) ((x) & 0x3f)) << 0) 33105760Srwatson#define bVc(x) (((ia64_insn) ((x) & 0x1)) << 20) 34105760Srwatson#define bWha(x) (((ia64_insn) ((x) & 0x3)) << 33) 35105760Srwatson#define bX3(x) (((ia64_insn) ((x) & 0x7)) << 33) 36105760Srwatson#define bX6(x) (((ia64_insn) ((x) & 0x3f)) << 27) 37105760Srwatson#define bY(x) (((ia64_insn) ((x) & 0x1)) << 26) 38105760Srwatson 39105760Srwatson#define mBtype bBtype (-1) 40105760Srwatson#define mD bD (-1) 41105760Srwatson#define mPa bPa (-1) 42105760Srwatson#define mPr bPr (-1) 43105760Srwatson#define mVc bVc (-1) 44105760Srwatson#define mWha bWha (-1) 45105760Srwatson#define mX3 bX3 (-1) 46105760Srwatson#define mX6 bX6 (-1) 47105760Srwatson#define mY bY (-1) 48105760Srwatson 49105760Srwatson#define OpX3X6(a,b,c) (bOp (a) | bX3 (b) | bX6(c)), \ 50105760Srwatson (mOp | mX3 | mX6) 51105760Srwatson#define OpX3X6Y(a,b,c,d) (bOp (a) | bX3 (b) | bX6(c) | bY(d)), \ 52138593Ssam (mOp | mX3 | mX6 | mY) 53139494Ssam#define OpVc(a,b) (bOp (a) | bVc (b)), (mOp | mVc) 54105760Srwatson#define OpPaWhaD(a,b,c,d) \ 55105760Srwatson (bOp (a) | bPa (b) | bWha (c) | bD (d)), (mOp | mPa | mWha | mD) 56105760Srwatson#define OpBtypePaWhaD(a,b,c,d,e) \ 57105760Srwatson (bOp (a) | bBtype (b) | bPa (c) | bWha (d) | bD (e)), \ 58105760Srwatson (mOp | mBtype | mPa | mWha | mD) 59105760Srwatson#define OpBtypePaWhaDPr(a,b,c,d,e,f) \ 60105760Srwatson (bOp (a) | bBtype (b) | bPa (c) | bWha (d) | bD (e) | bPr (f)), \ 61105760Srwatson (mOp | mBtype | mPa | mWha | mD | mPr) 62105760Srwatson 63105760Srwatsonstruct ia64_opcode ia64_opcodes_x[] = 64105760Srwatson { 65105760Srwatson {"break.x", X0, OpX3X6 (0, 0, 0x00), {IMMU62}, 0, 0, NULL}, 66105760Srwatson {"nop.x", X0, OpX3X6Y (0, 0, 0x01, 0), {IMMU62}, 0, 0, NULL}, 67105760Srwatson {"hint.x", X0, OpX3X6Y (0, 0, 0x01, 1), {IMMU62}, 0, 0, NULL}, 68105760Srwatson {"movl", X, OpVc (6, 0), {R1, IMMU64}, 0, 0, NULL}, 69105760Srwatson#define BRL(a,b) \ 70105760Srwatson X0, OpBtypePaWhaDPr (0xC, 0, a, 0, b, 0), {TGT64}, PSEUDO, 0, NULL 71105760Srwatson {"brl.few", BRL (0, 0)}, 72105760Srwatson {"brl", BRL (0, 0)}, 73105825Srwatson {"brl.few.clr", BRL (0, 1)}, 74105760Srwatson {"brl.clr", BRL (0, 1)}, 75105760Srwatson {"brl.many", BRL (1, 0)}, 76105760Srwatson {"brl.many.clr", BRL (1, 1)}, 77105760Srwatson#undef BRL 78105760Srwatson#define BRL(a,b,c) \ 79105760Srwatson X0, OpBtypePaWhaD (0xC, 0, a, b, c), {TGT64}, 0, 0, NULL 80138593Ssam#define BRLP(a,b,c) \ 81105825Srwatson X0, OpBtypePaWhaD (0xC, 0, a, b, c), {TGT64}, PSEUDO, 0, NULL 82105760Srwatson {"brl.cond.sptk.few", BRL (0, 0, 0)}, 83105760Srwatson {"brl.cond.sptk", BRLP (0, 0, 0)}, 84105760Srwatson {"brl.cond.sptk.few.clr", BRL (0, 0, 1)}, 85105760Srwatson {"brl.cond.sptk.clr", BRLP (0, 0, 1)}, 86105760Srwatson {"brl.cond.spnt.few", BRL (0, 1, 0)}, 87105760Srwatson {"brl.cond.spnt", BRLP (0, 1, 0)}, 88105760Srwatson {"brl.cond.spnt.few.clr", BRL (0, 1, 1)}, 89105760Srwatson {"brl.cond.spnt.clr", BRLP (0, 1, 1)}, 90105760Srwatson {"brl.cond.dptk.few", BRL (0, 2, 0)}, 91105760Srwatson {"brl.cond.dptk", BRLP (0, 2, 0)}, 92105760Srwatson {"brl.cond.dptk.few.clr", BRL (0, 2, 1)}, 93105760Srwatson {"brl.cond.dptk.clr", BRLP (0, 2, 1)}, 94105760Srwatson {"brl.cond.dpnt.few", BRL (0, 3, 0)}, 95105760Srwatson {"brl.cond.dpnt", BRLP (0, 3, 0)}, 96105760Srwatson {"brl.cond.dpnt.few.clr", BRL (0, 3, 1)}, 97105760Srwatson {"brl.cond.dpnt.clr", BRLP (0, 3, 1)}, 98105760Srwatson {"brl.cond.sptk.many", BRL (1, 0, 0)}, 99105760Srwatson {"brl.cond.sptk.many.clr", BRL (1, 0, 1)}, 100105760Srwatson {"brl.cond.spnt.many", BRL (1, 1, 0)}, 101138593Ssam {"brl.cond.spnt.many.clr", BRL (1, 1, 1)}, 102138593Ssam {"brl.cond.dptk.many", BRL (1, 2, 0)}, 103138593Ssam {"brl.cond.dptk.many.clr", BRL (1, 2, 1)}, 104138593Ssam {"brl.cond.dpnt.many", BRL (1, 3, 0)}, 105138593Ssam {"brl.cond.dpnt.many.clr", BRL (1, 3, 1)}, 106138593Ssam {"brl.sptk.few", BRL (0, 0, 0)}, 107138593Ssam {"brl.sptk", BRLP (0, 0, 0)}, 108139494Ssam {"brl.sptk.few.clr", BRL (0, 0, 1)}, 109138593Ssam {"brl.sptk.clr", BRLP (0, 0, 1)}, 110138593Ssam {"brl.spnt.few", BRL (0, 1, 0)}, 111138593Ssam {"brl.spnt", BRLP (0, 1, 0)}, 112138593Ssam {"brl.spnt.few.clr", BRL (0, 1, 1)}, 113138593Ssam {"brl.spnt.clr", BRLP (0, 1, 1)}, 114138593Ssam {"brl.dptk.few", BRL (0, 2, 0)}, 115138593Ssam {"brl.dptk", BRLP (0, 2, 0)}, 116138593Ssam {"brl.dptk.few.clr", BRL (0, 2, 1)}, 117138593Ssam {"brl.dptk.clr", BRLP (0, 2, 1)}, 118138593Ssam {"brl.dpnt.few", BRL (0, 3, 0)}, 119138593Ssam {"brl.dpnt", BRLP (0, 3, 0)}, 120138593Ssam {"brl.dpnt.few.clr", BRL (0, 3, 1)}, 121138593Ssam {"brl.dpnt.clr", BRLP (0, 3, 1)}, 122 {"brl.sptk.many", BRL (1, 0, 0)}, 123 {"brl.sptk.many.clr", BRL (1, 0, 1)}, 124 {"brl.spnt.many", BRL (1, 1, 0)}, 125 {"brl.spnt.many.clr", BRL (1, 1, 1)}, 126 {"brl.dptk.many", BRL (1, 2, 0)}, 127 {"brl.dptk.many.clr", BRL (1, 2, 1)}, 128 {"brl.dpnt.many", BRL (1, 3, 0)}, 129 {"brl.dpnt.many.clr", BRL (1, 3, 1)}, 130#undef BRL 131#undef BRLP 132#define BRL(a,b,c) X, OpPaWhaD (0xD, a, b, c), {B1, TGT64}, 0, 0, NULL 133#define BRLP(a,b,c) X, OpPaWhaD (0xD, a, b, c), {B1, TGT64}, PSEUDO, 0, NULL 134 {"brl.call.sptk.few", BRL (0, 0, 0)}, 135 {"brl.call.sptk", BRLP (0, 0, 0)}, 136 {"brl.call.sptk.few.clr", BRL (0, 0, 1)}, 137 {"brl.call.sptk.clr", BRLP (0, 0, 1)}, 138 {"brl.call.spnt.few", BRL (0, 1, 0)}, 139 {"brl.call.spnt", BRLP (0, 1, 0)}, 140 {"brl.call.spnt.few.clr", BRL (0, 1, 1)}, 141 {"brl.call.spnt.clr", BRLP (0, 1, 1)}, 142 {"brl.call.dptk.few", BRL (0, 2, 0)}, 143 {"brl.call.dptk", BRLP (0, 2, 0)}, 144 {"brl.call.dptk.few.clr", BRL (0, 2, 1)}, 145 {"brl.call.dptk.clr", BRLP (0, 2, 1)}, 146 {"brl.call.dpnt.few", BRL (0, 3, 0)}, 147 {"brl.call.dpnt", BRLP (0, 3, 0)}, 148 {"brl.call.dpnt.few.clr", BRL (0, 3, 1)}, 149 {"brl.call.dpnt.clr", BRLP (0, 3, 1)}, 150 {"brl.call.sptk.many", BRL (1, 0, 0)}, 151 {"brl.call.sptk.many.clr", BRL (1, 0, 1)}, 152 {"brl.call.spnt.many", BRL (1, 1, 0)}, 153 {"brl.call.spnt.many.clr", BRL (1, 1, 1)}, 154 {"brl.call.dptk.many", BRL (1, 2, 0)}, 155 {"brl.call.dptk.many.clr", BRL (1, 2, 1)}, 156 {"brl.call.dpnt.many", BRL (1, 3, 0)}, 157 {"brl.call.dpnt.many.clr", BRL (1, 3, 1)}, 158#undef BRL 159#undef BRLP 160 {NULL, 0, 0, 0, 0, {0}, 0, 0, NULL} 161 }; 162 163#undef X0 164#undef X 165 166#undef bBtype 167#undef bD 168#undef bPa 169#undef bPr 170#undef bVc 171#undef bWha 172#undef bX3 173#undef bX6 174 175#undef mBtype 176#undef mD 177#undef mPa 178#undef mPr 179#undef mVc 180#undef mWha 181#undef mX3 182#undef mX6 183 184#undef OpX3X6 185#undef OpVc 186#undef OpPaWhaD 187#undef OpBtypePaWhaD 188#undef OpBtypePaWhaDPr 189