itbl-mips.h revision 218822
1179404Sobrien 2179404Sobrien/* itbl-mips.h 3179404Sobrien 4179404Sobrien Copyright 1997 Free Software Foundation, Inc. 5179404Sobrien 6179404Sobrien This file is part of GAS, the GNU Assembler. 7179404Sobrien 8179404Sobrien GAS is free software; you can redistribute it and/or modify 9179404Sobrien it under the terms of the GNU General Public License as published by 10179404Sobrien the Free Software Foundation; either version 2, or (at your option) 11179404Sobrien any later version. 12179404Sobrien 13179404Sobrien GAS is distributed in the hope that it will be useful, 14179404Sobrien but WITHOUT ANY WARRANTY; without even the implied warranty of 15179404Sobrien MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16179404Sobrien GNU General Public License for more details. 17179404Sobrien 18179404Sobrien You should have received a copy of the GNU General Public License 19179404Sobrien along with GAS; see the file COPYING. If not, write to the Free 20218822Sdim Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 21218822Sdim 02110-1301, USA. */ 22179404Sobrien 23179404Sobrien/* Defines for Mips itbl cop support */ 24179404Sobrien 25179404Sobrien#include "opcode/mips.h" 26179404Sobrien 27179404Sobrien/* Values for processors will be from 0 to NUMBER_OF_PROCESSORS-1 */ 28179404Sobrien#define NUMBER_OF_PROCESSORS 4 29179404Sobrien#define MAX_BITPOS 31 30179404Sobrien 31179404Sobrien/* Mips specifics */ 32179404Sobrien#define MIPS_OPCODE_COP0 (0x21) /* COPz+CO, bits 31-25: 0100zz1 */ 33179404Sobrien#define MIPS_ENCODE_COP_NUM(z) ((MIPS_OPCODE_COP0|z<<1)<<25) 34179404Sobrien#define MIPS_IS_COP_INSN(insn) ((MIPS_OPCODE_COP0&(insn>>25)) \ 35179404Sobrien == MIPS_OPCODE_COP0) 36179404Sobrien#define MIPS_DECODE_COP_NUM(insn) ((~MIPS_OPCODE_COP0&(insn>>25))>>1) 37179404Sobrien#define MIPS_DECODE_COP_COFUN(insn) ((~MIPS_ENCODE_COP_NUM(3))&(insn)) 38179404Sobrien 39179404Sobrien/* definitions required by generic code */ 40179404Sobrien#define ITBL_IS_INSN(insn) MIPS_IS_COP_INSN(insn) 41179404Sobrien#define ITBL_DECODE_PNUM(insn) MIPS_DECODE_COP_NUM(insn) 42179404Sobrien#define ITBL_ENCODE_PNUM(pnum) MIPS_ENCODE_COP_NUM(pnum) 43179404Sobrien 44179404Sobrien#define ITBL_OPCODE_STRUCT mips_opcode 45179404Sobrien#define ITBL_OPCODES mips_opcodes 46179404Sobrien#define ITBL_NUM_OPCODES NUMOPCODES 47179404Sobrien#define ITBL_NUM_MACROS M_NUM_MACROS 48