Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | /* itbl-mips.h |
2 | ||
b3adc24a | 3 | Copyright (C) 1997-2020 Free Software Foundation, Inc. |
252b5132 RH |
4 | |
5 | This file is part of GAS, the GNU Assembler. | |
6 | ||
7 | GAS is free software; you can redistribute it and/or modify | |
8 | it under the terms of the GNU General Public License as published by | |
ec2655a6 | 9 | the Free Software Foundation; either version 3, or (at your option) |
252b5132 RH |
10 | any later version. |
11 | ||
12 | GAS is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
18 | along with GAS; see the file COPYING. If not, write to the Free | |
4b4da160 NC |
19 | Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA |
20 | 02110-1301, USA. */ | |
252b5132 | 21 | |
ec2655a6 | 22 | /* Defines for Mips itbl cop support. */ |
252b5132 RH |
23 | |
24 | #include "opcode/mips.h" | |
25 | ||
26 | /* Values for processors will be from 0 to NUMBER_OF_PROCESSORS-1 */ | |
27 | #define NUMBER_OF_PROCESSORS 4 | |
28 | #define MAX_BITPOS 31 | |
29 | ||
30 | /* Mips specifics */ | |
31 | #define MIPS_OPCODE_COP0 (0x21) /* COPz+CO, bits 31-25: 0100zz1 */ | |
32 | #define MIPS_ENCODE_COP_NUM(z) ((MIPS_OPCODE_COP0|z<<1)<<25) | |
33 | #define MIPS_IS_COP_INSN(insn) ((MIPS_OPCODE_COP0&(insn>>25)) \ | |
34 | == MIPS_OPCODE_COP0) | |
35 | #define MIPS_DECODE_COP_NUM(insn) ((~MIPS_OPCODE_COP0&(insn>>25))>>1) | |
36 | #define MIPS_DECODE_COP_COFUN(insn) ((~MIPS_ENCODE_COP_NUM(3))&(insn)) | |
37 | ||
38 | /* definitions required by generic code */ | |
39 | #define ITBL_IS_INSN(insn) MIPS_IS_COP_INSN(insn) | |
40 | #define ITBL_DECODE_PNUM(insn) MIPS_DECODE_COP_NUM(insn) | |
41 | #define ITBL_ENCODE_PNUM(pnum) MIPS_ENCODE_COP_NUM(pnum) | |
42 | ||
43 | #define ITBL_OPCODE_STRUCT mips_opcode | |
44 | #define ITBL_OPCODES mips_opcodes | |
45 | #define ITBL_NUM_OPCODES NUMOPCODES | |
46 | #define ITBL_NUM_MACROS M_NUM_MACROS |