1 /* 2 * Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef HEXAGON_ICLASS_H 19 #define HEXAGON_ICLASS_H 20 21 #include "attribs.h" 22 23 #define ICLASS_FROM_TYPE(TYPE) ICLASS_##TYPE 24 25 enum { 26 27 #define DEF_PP_ICLASS32(TYPE, SLOTS, UNITS) ICLASS_FROM_TYPE(TYPE), 28 #define DEF_EE_ICLASS32(TYPE, SLOTS, UNITS) ICLASS_FROM_TYPE(TYPE), 29 #include "imported/iclass.def" 30 #undef DEF_PP_ICLASS32 31 #undef DEF_EE_ICLASS32 32 33 ICLASS_FROM_TYPE(COPROC_VX), 34 ICLASS_FROM_TYPE(COPROC_VMEM), 35 NUM_ICLASSES 36 }; 37 38 typedef enum { 39 SLOTS_0 = (1 << 0), 40 SLOTS_1 = (1 << 1), 41 SLOTS_2 = (1 << 2), 42 SLOTS_3 = (1 << 3), 43 SLOTS_01 = SLOTS_0 | SLOTS_1, 44 SLOTS_23 = SLOTS_2 | SLOTS_3, 45 SLOTS_0123 = SLOTS_0 | SLOTS_1 | SLOTS_2 | SLOTS_3, 46 } SlotMask; 47 48 SlotMask find_iclass_slots(Opcode opcode, int itype); 49 50 #endif 51