107163879Schristos /* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */ 2c5dff60aSchristos /* CPU data header for fr30. 3c5dff60aSchristos 4c5dff60aSchristos THIS FILE IS MACHINE GENERATED WITH CGEN. 5c5dff60aSchristos 6*1424dfb3Schristos Copyright (C) 1996-2020 Free Software Foundation, Inc. 7c5dff60aSchristos 8c5dff60aSchristos This file is part of the GNU Binutils and/or GDB, the GNU debugger. 9c5dff60aSchristos 10c5dff60aSchristos This file is free software; you can redistribute it and/or modify 11c5dff60aSchristos it under the terms of the GNU General Public License as published by 12c5dff60aSchristos the Free Software Foundation; either version 3, or (at your option) 13c5dff60aSchristos any later version. 14c5dff60aSchristos 15c5dff60aSchristos It is distributed in the hope that it will be useful, but WITHOUT 16c5dff60aSchristos ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 17c5dff60aSchristos or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 18c5dff60aSchristos License for more details. 19c5dff60aSchristos 20c5dff60aSchristos You should have received a copy of the GNU General Public License along 21c5dff60aSchristos with this program; if not, write to the Free Software Foundation, Inc., 22c5dff60aSchristos 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. 23c5dff60aSchristos 24c5dff60aSchristos */ 25c5dff60aSchristos 26c5dff60aSchristos #ifndef FR30_CPU_H 27c5dff60aSchristos #define FR30_CPU_H 28c5dff60aSchristos 291c468f90Schristos #ifdef __cplusplus 301c468f90Schristos extern "C" { 311c468f90Schristos #endif 321c468f90Schristos 33c5dff60aSchristos #define CGEN_ARCH fr30 34c5dff60aSchristos 35c5dff60aSchristos /* Given symbol S, return fr30_cgen_<S>. */ 36c5dff60aSchristos #define CGEN_SYM(s) fr30##_cgen_##s 37c5dff60aSchristos 38c5dff60aSchristos 39c5dff60aSchristos /* Selected cpu families. */ 40c5dff60aSchristos #define HAVE_CPU_FR30BF 41c5dff60aSchristos 42c5dff60aSchristos #define CGEN_INSN_LSB0_P 0 43c5dff60aSchristos 44c5dff60aSchristos /* Minimum size of any insn (in bytes). */ 45c5dff60aSchristos #define CGEN_MIN_INSN_SIZE 2 46c5dff60aSchristos 47c5dff60aSchristos /* Maximum size of any insn (in bytes). */ 48c5dff60aSchristos #define CGEN_MAX_INSN_SIZE 6 49c5dff60aSchristos 50c5dff60aSchristos #define CGEN_INT_INSN_P 0 51c5dff60aSchristos 52c5dff60aSchristos /* Maximum number of syntax elements in an instruction. */ 53c5dff60aSchristos #define CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS 15 54c5dff60aSchristos 55c5dff60aSchristos /* CGEN_MNEMONIC_OPERANDS is defined if mnemonics have operands. 56c5dff60aSchristos e.g. In "b,a foo" the ",a" is an operand. If mnemonics have operands 57c5dff60aSchristos we can't hash on everything up to the space. */ 58c5dff60aSchristos #define CGEN_MNEMONIC_OPERANDS 59c5dff60aSchristos 60c5dff60aSchristos /* Maximum number of fields in an instruction. */ 61c5dff60aSchristos #define CGEN_ACTUAL_MAX_IFMT_OPERANDS 7 62c5dff60aSchristos 63c5dff60aSchristos /* Enums. */ 64c5dff60aSchristos 65c5dff60aSchristos /* Enum declaration for insn op1 enums. */ 66c5dff60aSchristos typedef enum insn_op1 { 67c5dff60aSchristos OP1_0, OP1_1, OP1_2, OP1_3 68c5dff60aSchristos , OP1_4, OP1_5, OP1_6, OP1_7 69c5dff60aSchristos , OP1_8, OP1_9, OP1_A, OP1_B 70c5dff60aSchristos , OP1_C, OP1_D, OP1_E, OP1_F 71c5dff60aSchristos } INSN_OP1; 72c5dff60aSchristos 73c5dff60aSchristos /* Enum declaration for insn op2 enums. */ 74c5dff60aSchristos typedef enum insn_op2 { 75c5dff60aSchristos OP2_0, OP2_1, OP2_2, OP2_3 76c5dff60aSchristos , OP2_4, OP2_5, OP2_6, OP2_7 77c5dff60aSchristos , OP2_8, OP2_9, OP2_A, OP2_B 78c5dff60aSchristos , OP2_C, OP2_D, OP2_E, OP2_F 79c5dff60aSchristos } INSN_OP2; 80c5dff60aSchristos 81c5dff60aSchristos /* Enum declaration for insn op3 enums. */ 82c5dff60aSchristos typedef enum insn_op3 { 83c5dff60aSchristos OP3_0, OP3_1, OP3_2, OP3_3 84c5dff60aSchristos , OP3_4, OP3_5, OP3_6, OP3_7 85c5dff60aSchristos , OP3_8, OP3_9, OP3_A, OP3_B 86c5dff60aSchristos , OP3_C, OP3_D, OP3_E, OP3_F 87c5dff60aSchristos } INSN_OP3; 88c5dff60aSchristos 89c5dff60aSchristos /* Enum declaration for insn op4 enums. */ 90c5dff60aSchristos typedef enum insn_op4 { 91c5dff60aSchristos OP4_0 92c5dff60aSchristos } INSN_OP4; 93c5dff60aSchristos 94c5dff60aSchristos /* Enum declaration for insn op5 enums. */ 95c5dff60aSchristos typedef enum insn_op5 { 96c5dff60aSchristos OP5_0, OP5_1 97c5dff60aSchristos } INSN_OP5; 98c5dff60aSchristos 99c5dff60aSchristos /* Enum declaration for insn cc enums. */ 100c5dff60aSchristos typedef enum insn_cc { 101c5dff60aSchristos CC_RA, CC_NO, CC_EQ, CC_NE 102c5dff60aSchristos , CC_C, CC_NC, CC_N, CC_P 103c5dff60aSchristos , CC_V, CC_NV, CC_LT, CC_GE 104c5dff60aSchristos , CC_LE, CC_GT, CC_LS, CC_HI 105c5dff60aSchristos } INSN_CC; 106c5dff60aSchristos 107c5dff60aSchristos /* Enum declaration for . */ 108c5dff60aSchristos typedef enum gr_names { 109c5dff60aSchristos H_GR_R0 = 0, H_GR_R1 = 1, H_GR_R2 = 2, H_GR_R3 = 3 110c5dff60aSchristos , H_GR_R4 = 4, H_GR_R5 = 5, H_GR_R6 = 6, H_GR_R7 = 7 111c5dff60aSchristos , H_GR_R8 = 8, H_GR_R9 = 9, H_GR_R10 = 10, H_GR_R11 = 11 112c5dff60aSchristos , H_GR_R12 = 12, H_GR_R13 = 13, H_GR_R14 = 14, H_GR_R15 = 15 113c5dff60aSchristos , H_GR_AC = 13, H_GR_FP = 14, H_GR_SP = 15 114c5dff60aSchristos } GR_NAMES; 115c5dff60aSchristos 116c5dff60aSchristos /* Enum declaration for . */ 117c5dff60aSchristos typedef enum cr_names { 118c5dff60aSchristos H_CR_CR0, H_CR_CR1, H_CR_CR2, H_CR_CR3 119c5dff60aSchristos , H_CR_CR4, H_CR_CR5, H_CR_CR6, H_CR_CR7 120c5dff60aSchristos , H_CR_CR8, H_CR_CR9, H_CR_CR10, H_CR_CR11 121c5dff60aSchristos , H_CR_CR12, H_CR_CR13, H_CR_CR14, H_CR_CR15 122c5dff60aSchristos } CR_NAMES; 123c5dff60aSchristos 124c5dff60aSchristos /* Enum declaration for . */ 125c5dff60aSchristos typedef enum dr_names { 126c5dff60aSchristos H_DR_TBR, H_DR_RP, H_DR_SSP, H_DR_USP 127c5dff60aSchristos , H_DR_MDH, H_DR_MDL 128c5dff60aSchristos } DR_NAMES; 129c5dff60aSchristos 130c5dff60aSchristos /* Attributes. */ 131c5dff60aSchristos 132c5dff60aSchristos /* Enum declaration for machine type selection. */ 133c5dff60aSchristos typedef enum mach_attr { 134c5dff60aSchristos MACH_BASE, MACH_FR30, MACH_MAX 135c5dff60aSchristos } MACH_ATTR; 136c5dff60aSchristos 137c5dff60aSchristos /* Enum declaration for instruction set selection. */ 138c5dff60aSchristos typedef enum isa_attr { 139c5dff60aSchristos ISA_FR30, ISA_MAX 140c5dff60aSchristos } ISA_ATTR; 141c5dff60aSchristos 142c5dff60aSchristos /* Number of architecture variants. */ 143c5dff60aSchristos #define MAX_ISAS 1 144c5dff60aSchristos #define MAX_MACHS ((int) MACH_MAX) 145c5dff60aSchristos 146c5dff60aSchristos /* Ifield support. */ 147c5dff60aSchristos 148c5dff60aSchristos /* Ifield attribute indices. */ 149c5dff60aSchristos 150c5dff60aSchristos /* Enum declaration for cgen_ifld attrs. */ 151c5dff60aSchristos typedef enum cgen_ifld_attr { 152c5dff60aSchristos CGEN_IFLD_VIRTUAL, CGEN_IFLD_PCREL_ADDR, CGEN_IFLD_ABS_ADDR, CGEN_IFLD_RESERVED 153c5dff60aSchristos , CGEN_IFLD_SIGN_OPT, CGEN_IFLD_SIGNED, CGEN_IFLD_END_BOOLS, CGEN_IFLD_START_NBOOLS = 31 154c5dff60aSchristos , CGEN_IFLD_MACH, CGEN_IFLD_END_NBOOLS 155c5dff60aSchristos } CGEN_IFLD_ATTR; 156c5dff60aSchristos 157c5dff60aSchristos /* Number of non-boolean elements in cgen_ifld_attr. */ 158c5dff60aSchristos #define CGEN_IFLD_NBOOL_ATTRS (CGEN_IFLD_END_NBOOLS - CGEN_IFLD_START_NBOOLS - 1) 159c5dff60aSchristos 160c5dff60aSchristos /* cgen_ifld attribute accessor macros. */ 161c5dff60aSchristos #define CGEN_ATTR_CGEN_IFLD_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_IFLD_MACH-CGEN_IFLD_START_NBOOLS-1].nonbitset) 162c5dff60aSchristos #define CGEN_ATTR_CGEN_IFLD_VIRTUAL_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_VIRTUAL)) != 0) 163c5dff60aSchristos #define CGEN_ATTR_CGEN_IFLD_PCREL_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_PCREL_ADDR)) != 0) 164c5dff60aSchristos #define CGEN_ATTR_CGEN_IFLD_ABS_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_ABS_ADDR)) != 0) 165c5dff60aSchristos #define CGEN_ATTR_CGEN_IFLD_RESERVED_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_RESERVED)) != 0) 166c5dff60aSchristos #define CGEN_ATTR_CGEN_IFLD_SIGN_OPT_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_SIGN_OPT)) != 0) 167c5dff60aSchristos #define CGEN_ATTR_CGEN_IFLD_SIGNED_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_SIGNED)) != 0) 168c5dff60aSchristos 169c5dff60aSchristos /* Enum declaration for fr30 ifield types. */ 170c5dff60aSchristos typedef enum ifield_type { 171c5dff60aSchristos FR30_F_NIL, FR30_F_ANYOF, FR30_F_OP1, FR30_F_OP2 172c5dff60aSchristos , FR30_F_OP3, FR30_F_OP4, FR30_F_OP5, FR30_F_CC 173c5dff60aSchristos , FR30_F_CCC, FR30_F_RJ, FR30_F_RI, FR30_F_RS1 174c5dff60aSchristos , FR30_F_RS2, FR30_F_RJC, FR30_F_RIC, FR30_F_CRJ 175c5dff60aSchristos , FR30_F_CRI, FR30_F_U4, FR30_F_U4C, FR30_F_I4 176c5dff60aSchristos , FR30_F_M4, FR30_F_U8, FR30_F_I8, FR30_F_I20_4 177c5dff60aSchristos , FR30_F_I20_16, FR30_F_I20, FR30_F_I32, FR30_F_UDISP6 178c5dff60aSchristos , FR30_F_DISP8, FR30_F_DISP9, FR30_F_DISP10, FR30_F_S10 179c5dff60aSchristos , FR30_F_U10, FR30_F_REL9, FR30_F_DIR8, FR30_F_DIR9 180c5dff60aSchristos , FR30_F_DIR10, FR30_F_REL12, FR30_F_REGLIST_HI_ST, FR30_F_REGLIST_LOW_ST 181c5dff60aSchristos , FR30_F_REGLIST_HI_LD, FR30_F_REGLIST_LOW_LD, FR30_F_MAX 182c5dff60aSchristos } IFIELD_TYPE; 183c5dff60aSchristos 184c5dff60aSchristos #define MAX_IFLD ((int) FR30_F_MAX) 185c5dff60aSchristos 186c5dff60aSchristos /* Hardware attribute indices. */ 187c5dff60aSchristos 188c5dff60aSchristos /* Enum declaration for cgen_hw attrs. */ 189c5dff60aSchristos typedef enum cgen_hw_attr { 190c5dff60aSchristos CGEN_HW_VIRTUAL, CGEN_HW_CACHE_ADDR, CGEN_HW_PC, CGEN_HW_PROFILE 191c5dff60aSchristos , CGEN_HW_END_BOOLS, CGEN_HW_START_NBOOLS = 31, CGEN_HW_MACH, CGEN_HW_END_NBOOLS 192c5dff60aSchristos } CGEN_HW_ATTR; 193c5dff60aSchristos 194c5dff60aSchristos /* Number of non-boolean elements in cgen_hw_attr. */ 195c5dff60aSchristos #define CGEN_HW_NBOOL_ATTRS (CGEN_HW_END_NBOOLS - CGEN_HW_START_NBOOLS - 1) 196c5dff60aSchristos 197c5dff60aSchristos /* cgen_hw attribute accessor macros. */ 198c5dff60aSchristos #define CGEN_ATTR_CGEN_HW_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_HW_MACH-CGEN_HW_START_NBOOLS-1].nonbitset) 199c5dff60aSchristos #define CGEN_ATTR_CGEN_HW_VIRTUAL_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_HW_VIRTUAL)) != 0) 200c5dff60aSchristos #define CGEN_ATTR_CGEN_HW_CACHE_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_HW_CACHE_ADDR)) != 0) 201c5dff60aSchristos #define CGEN_ATTR_CGEN_HW_PC_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_HW_PC)) != 0) 202c5dff60aSchristos #define CGEN_ATTR_CGEN_HW_PROFILE_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_HW_PROFILE)) != 0) 203c5dff60aSchristos 204c5dff60aSchristos /* Enum declaration for fr30 hardware types. */ 205c5dff60aSchristos typedef enum cgen_hw_type { 206c5dff60aSchristos HW_H_MEMORY, HW_H_SINT, HW_H_UINT, HW_H_ADDR 207c5dff60aSchristos , HW_H_IADDR, HW_H_PC, HW_H_GR, HW_H_CR 208c5dff60aSchristos , HW_H_DR, HW_H_PS, HW_H_R13, HW_H_R14 209c5dff60aSchristos , HW_H_R15, HW_H_NBIT, HW_H_ZBIT, HW_H_VBIT 210c5dff60aSchristos , HW_H_CBIT, HW_H_IBIT, HW_H_SBIT, HW_H_TBIT 211c5dff60aSchristos , HW_H_D0BIT, HW_H_D1BIT, HW_H_CCR, HW_H_SCR 212c5dff60aSchristos , HW_H_ILM, HW_MAX 213c5dff60aSchristos } CGEN_HW_TYPE; 214c5dff60aSchristos 215c5dff60aSchristos #define MAX_HW ((int) HW_MAX) 216c5dff60aSchristos 217c5dff60aSchristos /* Operand attribute indices. */ 218c5dff60aSchristos 219c5dff60aSchristos /* Enum declaration for cgen_operand attrs. */ 220c5dff60aSchristos typedef enum cgen_operand_attr { 221c5dff60aSchristos CGEN_OPERAND_VIRTUAL, CGEN_OPERAND_PCREL_ADDR, CGEN_OPERAND_ABS_ADDR, CGEN_OPERAND_SIGN_OPT 222c5dff60aSchristos , CGEN_OPERAND_SIGNED, CGEN_OPERAND_NEGATIVE, CGEN_OPERAND_RELAX, CGEN_OPERAND_SEM_ONLY 223c5dff60aSchristos , CGEN_OPERAND_HASH_PREFIX, CGEN_OPERAND_END_BOOLS, CGEN_OPERAND_START_NBOOLS = 31, CGEN_OPERAND_MACH 224c5dff60aSchristos , CGEN_OPERAND_END_NBOOLS 225c5dff60aSchristos } CGEN_OPERAND_ATTR; 226c5dff60aSchristos 227c5dff60aSchristos /* Number of non-boolean elements in cgen_operand_attr. */ 228c5dff60aSchristos #define CGEN_OPERAND_NBOOL_ATTRS (CGEN_OPERAND_END_NBOOLS - CGEN_OPERAND_START_NBOOLS - 1) 229c5dff60aSchristos 230c5dff60aSchristos /* cgen_operand attribute accessor macros. */ 231c5dff60aSchristos #define CGEN_ATTR_CGEN_OPERAND_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_OPERAND_MACH-CGEN_OPERAND_START_NBOOLS-1].nonbitset) 232c5dff60aSchristos #define CGEN_ATTR_CGEN_OPERAND_VIRTUAL_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_VIRTUAL)) != 0) 233c5dff60aSchristos #define CGEN_ATTR_CGEN_OPERAND_PCREL_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_PCREL_ADDR)) != 0) 234c5dff60aSchristos #define CGEN_ATTR_CGEN_OPERAND_ABS_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_ABS_ADDR)) != 0) 235c5dff60aSchristos #define CGEN_ATTR_CGEN_OPERAND_SIGN_OPT_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_SIGN_OPT)) != 0) 236c5dff60aSchristos #define CGEN_ATTR_CGEN_OPERAND_SIGNED_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_SIGNED)) != 0) 237c5dff60aSchristos #define CGEN_ATTR_CGEN_OPERAND_NEGATIVE_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_NEGATIVE)) != 0) 238c5dff60aSchristos #define CGEN_ATTR_CGEN_OPERAND_RELAX_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_RELAX)) != 0) 239c5dff60aSchristos #define CGEN_ATTR_CGEN_OPERAND_SEM_ONLY_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_SEM_ONLY)) != 0) 240c5dff60aSchristos #define CGEN_ATTR_CGEN_OPERAND_HASH_PREFIX_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_HASH_PREFIX)) != 0) 241c5dff60aSchristos 242c5dff60aSchristos /* Enum declaration for fr30 operand types. */ 243c5dff60aSchristos typedef enum cgen_operand_type { 244c5dff60aSchristos FR30_OPERAND_PC, FR30_OPERAND_RI, FR30_OPERAND_RJ, FR30_OPERAND_RIC 245c5dff60aSchristos , FR30_OPERAND_RJC, FR30_OPERAND_CRI, FR30_OPERAND_CRJ, FR30_OPERAND_RS1 246c5dff60aSchristos , FR30_OPERAND_RS2, FR30_OPERAND_R13, FR30_OPERAND_R14, FR30_OPERAND_R15 247c5dff60aSchristos , FR30_OPERAND_PS, FR30_OPERAND_U4, FR30_OPERAND_U4C, FR30_OPERAND_U8 248c5dff60aSchristos , FR30_OPERAND_I8, FR30_OPERAND_UDISP6, FR30_OPERAND_DISP8, FR30_OPERAND_DISP9 249c5dff60aSchristos , FR30_OPERAND_DISP10, FR30_OPERAND_S10, FR30_OPERAND_U10, FR30_OPERAND_I32 250c5dff60aSchristos , FR30_OPERAND_M4, FR30_OPERAND_I20, FR30_OPERAND_DIR8, FR30_OPERAND_DIR9 251c5dff60aSchristos , FR30_OPERAND_DIR10, FR30_OPERAND_LABEL9, FR30_OPERAND_LABEL12, FR30_OPERAND_REGLIST_LOW_LD 252c5dff60aSchristos , FR30_OPERAND_REGLIST_HI_LD, FR30_OPERAND_REGLIST_LOW_ST, FR30_OPERAND_REGLIST_HI_ST, FR30_OPERAND_CC 253c5dff60aSchristos , FR30_OPERAND_CCC, FR30_OPERAND_NBIT, FR30_OPERAND_VBIT, FR30_OPERAND_ZBIT 254c5dff60aSchristos , FR30_OPERAND_CBIT, FR30_OPERAND_IBIT, FR30_OPERAND_SBIT, FR30_OPERAND_TBIT 255c5dff60aSchristos , FR30_OPERAND_D0BIT, FR30_OPERAND_D1BIT, FR30_OPERAND_CCR, FR30_OPERAND_SCR 256c5dff60aSchristos , FR30_OPERAND_ILM, FR30_OPERAND_MAX 257c5dff60aSchristos } CGEN_OPERAND_TYPE; 258c5dff60aSchristos 259c5dff60aSchristos /* Number of operands types. */ 260c5dff60aSchristos #define MAX_OPERANDS 49 261c5dff60aSchristos 262c5dff60aSchristos /* Maximum number of operands referenced by any insn. */ 263c5dff60aSchristos #define MAX_OPERAND_INSTANCES 8 264c5dff60aSchristos 265c5dff60aSchristos /* Insn attribute indices. */ 266c5dff60aSchristos 267c5dff60aSchristos /* Enum declaration for cgen_insn attrs. */ 268c5dff60aSchristos typedef enum cgen_insn_attr { 269c5dff60aSchristos CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI 270c5dff60aSchristos , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED 271c5dff60aSchristos , CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_NOT_IN_DELAY_SLOT, CGEN_INSN_END_BOOLS 272c5dff60aSchristos , CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_END_NBOOLS 273c5dff60aSchristos } CGEN_INSN_ATTR; 274c5dff60aSchristos 275c5dff60aSchristos /* Number of non-boolean elements in cgen_insn_attr. */ 276c5dff60aSchristos #define CGEN_INSN_NBOOL_ATTRS (CGEN_INSN_END_NBOOLS - CGEN_INSN_START_NBOOLS - 1) 277c5dff60aSchristos 278c5dff60aSchristos /* cgen_insn attribute accessor macros. */ 279c5dff60aSchristos #define CGEN_ATTR_CGEN_INSN_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_INSN_MACH-CGEN_INSN_START_NBOOLS-1].nonbitset) 280c5dff60aSchristos #define CGEN_ATTR_CGEN_INSN_ALIAS_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_ALIAS)) != 0) 281c5dff60aSchristos #define CGEN_ATTR_CGEN_INSN_VIRTUAL_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_VIRTUAL)) != 0) 282c5dff60aSchristos #define CGEN_ATTR_CGEN_INSN_UNCOND_CTI_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_UNCOND_CTI)) != 0) 283c5dff60aSchristos #define CGEN_ATTR_CGEN_INSN_COND_CTI_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_COND_CTI)) != 0) 284c5dff60aSchristos #define CGEN_ATTR_CGEN_INSN_SKIP_CTI_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_SKIP_CTI)) != 0) 285c5dff60aSchristos #define CGEN_ATTR_CGEN_INSN_DELAY_SLOT_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_DELAY_SLOT)) != 0) 286c5dff60aSchristos #define CGEN_ATTR_CGEN_INSN_RELAXABLE_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_RELAXABLE)) != 0) 287c5dff60aSchristos #define CGEN_ATTR_CGEN_INSN_RELAXED_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_RELAXED)) != 0) 288c5dff60aSchristos #define CGEN_ATTR_CGEN_INSN_NO_DIS_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_NO_DIS)) != 0) 289c5dff60aSchristos #define CGEN_ATTR_CGEN_INSN_PBB_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_PBB)) != 0) 290c5dff60aSchristos #define CGEN_ATTR_CGEN_INSN_NOT_IN_DELAY_SLOT_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_NOT_IN_DELAY_SLOT)) != 0) 291c5dff60aSchristos 292c5dff60aSchristos /* cgen.h uses things we just defined. */ 293c5dff60aSchristos #include "opcode/cgen.h" 294c5dff60aSchristos 295c5dff60aSchristos extern const struct cgen_ifld fr30_cgen_ifld_table[]; 296c5dff60aSchristos 297c5dff60aSchristos /* Attributes. */ 298c5dff60aSchristos extern const CGEN_ATTR_TABLE fr30_cgen_hardware_attr_table[]; 299c5dff60aSchristos extern const CGEN_ATTR_TABLE fr30_cgen_ifield_attr_table[]; 300c5dff60aSchristos extern const CGEN_ATTR_TABLE fr30_cgen_operand_attr_table[]; 301c5dff60aSchristos extern const CGEN_ATTR_TABLE fr30_cgen_insn_attr_table[]; 302c5dff60aSchristos 303c5dff60aSchristos /* Hardware decls. */ 304c5dff60aSchristos 305c5dff60aSchristos extern CGEN_KEYWORD fr30_cgen_opval_gr_names; 306c5dff60aSchristos extern CGEN_KEYWORD fr30_cgen_opval_cr_names; 307c5dff60aSchristos extern CGEN_KEYWORD fr30_cgen_opval_dr_names; 308c5dff60aSchristos extern CGEN_KEYWORD fr30_cgen_opval_h_ps; 309c5dff60aSchristos extern CGEN_KEYWORD fr30_cgen_opval_h_r13; 310c5dff60aSchristos extern CGEN_KEYWORD fr30_cgen_opval_h_r14; 311c5dff60aSchristos extern CGEN_KEYWORD fr30_cgen_opval_h_r15; 312c5dff60aSchristos 313c5dff60aSchristos extern const CGEN_HW_ENTRY fr30_cgen_hw_table[]; 314c5dff60aSchristos 315c5dff60aSchristos 316c5dff60aSchristos 3171c468f90Schristos #ifdef __cplusplus 3181c468f90Schristos } 3191c468f90Schristos #endif 3201c468f90Schristos 321c5dff60aSchristos #endif /* FR30_CPU_H */ 322