1169689Skan 290075Sobrien/* itbl-mips.h 390075Sobrien 4169689Skan Copyright 1997 Free Software Foundation, Inc. 590075Sobrien 6169689Skan This file is part of GAS, the GNU Assembler. 7169689Skan 8169689Skan GAS is free software; you can redistribute it and/or modify 9169689Skan it under the terms of the GNU General Public License as published by 10169689Skan the Free Software Foundation; either version 2, or (at your option) 11169689Skan any later version. 1290075Sobrien 13169689Skan GAS is distributed in the hope that it will be useful, 14169689Skan but WITHOUT ANY WARRANTY; without even the implied warranty of 1590075Sobrien MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16169689Skan GNU General Public License for more details. 17169689Skan 18169689Skan You should have received a copy of the GNU General Public License 19169689Skan along with GAS; see the file COPYING. If not, write to the Free 2090075Sobrien Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 21169689Skan 02110-1301, USA. */ 22169689Skan 23169689Skan/* Defines for Mips itbl cop support */ 24169689Skan 25169689Skan#include "opcode/mips.h" 26169689Skan 27169689Skan/* Values for processors will be from 0 to NUMBER_OF_PROCESSORS-1 */ 28117395Skan#define NUMBER_OF_PROCESSORS 4 29117395Skan#define MAX_BITPOS 31 3090075Sobrien 3190075Sobrien/* Mips specifics */ 3290075Sobrien#define MIPS_OPCODE_COP0 (0x21) /* COPz+CO, bits 31-25: 0100zz1 */ 3390075Sobrien#define MIPS_ENCODE_COP_NUM(z) ((MIPS_OPCODE_COP0|z<<1)<<25) 3490075Sobrien#define MIPS_IS_COP_INSN(insn) ((MIPS_OPCODE_COP0&(insn>>25)) \ 3590075Sobrien == MIPS_OPCODE_COP0) 3690075Sobrien#define MIPS_DECODE_COP_NUM(insn) ((~MIPS_OPCODE_COP0&(insn>>25))>>1) 3790075Sobrien#define MIPS_DECODE_COP_COFUN(insn) ((~MIPS_ENCODE_COP_NUM(3))&(insn)) 3890075Sobrien 3990075Sobrien/* definitions required by generic code */ 4090075Sobrien#define ITBL_IS_INSN(insn) MIPS_IS_COP_INSN(insn) 4190075Sobrien#define ITBL_DECODE_PNUM(insn) MIPS_DECODE_COP_NUM(insn) 4290075Sobrien#define ITBL_ENCODE_PNUM(pnum) MIPS_ENCODE_COP_NUM(pnum) 4390075Sobrien 4490075Sobrien#define ITBL_OPCODE_STRUCT mips_opcode 45132718Skan#define ITBL_OPCODES mips_opcodes 46132718Skan#define ITBL_NUM_OPCODES NUMOPCODES 47132718Skan#define ITBL_NUM_MACROS M_NUM_MACROS 48132718Skan