Back to index

cell-binutils  2.17cvs20070401
itbl-mips.h
Go to the documentation of this file.
00001 
00002 /* itbl-mips.h
00003 
00004    Copyright 1997 Free Software Foundation, Inc.
00005 
00006    This file is part of GAS, the GNU Assembler.
00007 
00008    GAS is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation; either version 2, or (at your option)
00011    any later version.
00012 
00013    GAS is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with GAS; see the file COPYING.  If not, write to the Free
00020    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00021    02110-1301, USA.  */
00022 
00023 /* Defines for Mips itbl cop support */
00024 
00025 #include "opcode/mips.h"
00026 
00027 /* Values for processors will be from 0 to NUMBER_OF_PROCESSORS-1 */
00028 #define NUMBER_OF_PROCESSORS 4
00029 #define MAX_BITPOS 31
00030 
00031 /* Mips specifics */
00032 #define MIPS_OPCODE_COP0 (0x21)    /* COPz+CO, bits 31-25: 0100zz1 */
00033 #define MIPS_ENCODE_COP_NUM(z) ((MIPS_OPCODE_COP0|z<<1)<<25)
00034 #define MIPS_IS_COP_INSN(insn) ((MIPS_OPCODE_COP0&(insn>>25)) \
00035        == MIPS_OPCODE_COP0)
00036 #define MIPS_DECODE_COP_NUM(insn) ((~MIPS_OPCODE_COP0&(insn>>25))>>1)
00037 #define MIPS_DECODE_COP_COFUN(insn) ((~MIPS_ENCODE_COP_NUM(3))&(insn))
00038 
00039 /* definitions required by generic code */
00040 #define ITBL_IS_INSN(insn) MIPS_IS_COP_INSN(insn)
00041 #define ITBL_DECODE_PNUM(insn) MIPS_DECODE_COP_NUM(insn)
00042 #define ITBL_ENCODE_PNUM(pnum) MIPS_ENCODE_COP_NUM(pnum)
00043 
00044 #define ITBL_OPCODE_STRUCT mips_opcode
00045 #define ITBL_OPCODES mips_opcodes
00046 #define ITBL_NUM_OPCODES NUMOPCODES
00047 #define ITBL_NUM_MACROS M_NUM_MACROS