xref: /netbsd-src/external/gpl3/binutils.old/dist/include/elf/iq2000.h (revision e992f068c547fd6e84b3f104dc2340adcc955732)
175fd0b74Schristos /* IQ2000 ELF support for BFD.
2*e992f068Schristos    Copyright (C) 2002-2022 Free Software Foundation, Inc.
375fd0b74Schristos 
475fd0b74Schristos    This file is part of BFD, the Binary File Descriptor library.
575fd0b74Schristos 
675fd0b74Schristos    This program is free software; you can redistribute it and/or modify
775fd0b74Schristos    it under the terms of the GNU General Public License as published by
875fd0b74Schristos    the Free Software Foundation; either version 3 of the License, or
975fd0b74Schristos    (at your option) any later version.
1075fd0b74Schristos 
1175fd0b74Schristos    This program is distributed in the hope that it will be useful,
1275fd0b74Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
1375fd0b74Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1475fd0b74Schristos    GNU General Public License for more details.
1575fd0b74Schristos 
1675fd0b74Schristos    You should have received a copy of the GNU General Public License
1775fd0b74Schristos    along with this program; if not, write to the Free Software Foundation,
1875fd0b74Schristos    Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
1975fd0b74Schristos 
2075fd0b74Schristos #ifndef _ELF_IQ2000_H
2175fd0b74Schristos #define _ELF_IQ2000_H
2275fd0b74Schristos 
2375fd0b74Schristos #include "elf/reloc-macros.h"
2475fd0b74Schristos 
2575fd0b74Schristos /* Relocations.  */
2675fd0b74Schristos START_RELOC_NUMBERS (elf_iq2000_reloc_type)
2775fd0b74Schristos   RELOC_NUMBER (R_IQ2000_NONE, 0)
2875fd0b74Schristos   RELOC_NUMBER (R_IQ2000_16, 1)
2975fd0b74Schristos   RELOC_NUMBER (R_IQ2000_32, 2)
3075fd0b74Schristos   RELOC_NUMBER (R_IQ2000_26, 3)
3175fd0b74Schristos   RELOC_NUMBER (R_IQ2000_PC16, 4)
3275fd0b74Schristos   RELOC_NUMBER (R_IQ2000_HI16, 5)
3375fd0b74Schristos   RELOC_NUMBER (R_IQ2000_LO16, 6)
3475fd0b74Schristos   RELOC_NUMBER (R_IQ2000_OFFSET_16, 7)
3575fd0b74Schristos   RELOC_NUMBER (R_IQ2000_OFFSET_21, 8)
3675fd0b74Schristos   RELOC_NUMBER (R_IQ2000_UHI16, 9)
3775fd0b74Schristos   RELOC_NUMBER (R_IQ2000_32_DEBUG, 10)
3875fd0b74Schristos   RELOC_NUMBER (R_IQ2000_GNU_VTINHERIT, 200)
3975fd0b74Schristos   RELOC_NUMBER (R_IQ2000_GNU_VTENTRY, 201)
4075fd0b74Schristos END_RELOC_NUMBERS(R_IQ2000_max)
4175fd0b74Schristos 
4275fd0b74Schristos #define EF_IQ2000_CPU_IQ2000	0x00000001      /* default */
4375fd0b74Schristos #define EF_IQ2000_CPU_IQ10      0x00000002      /* IQ10 */
4475fd0b74Schristos #define EF_IQ2000_CPU_MASK	0x00000003	/* specific cpu bits */
4575fd0b74Schristos #define EF_IQ2000_ALL_FLAGS	(EF_IQ2000_CPU_MASK)
4675fd0b74Schristos 
4775fd0b74Schristos /* Define the data & instruction memory discriminator.  In a linked
4875fd0b74Schristos    executable, an symbol should be deemed to point to an instruction
4975fd0b74Schristos    if ((address & IQ2000_INSN_MASK) == IQ2000_INSN_VALUE), and similarly
5075fd0b74Schristos    for the data space.  */
5175fd0b74Schristos 
5275fd0b74Schristos #define IQ2000_DATA_MASK   0x80000000
5375fd0b74Schristos #define IQ2000_DATA_VALUE  0x00000000
5475fd0b74Schristos #define IQ2000_INSN_MASK   0x80000000
5575fd0b74Schristos #define IQ2000_INSN_VALUE  0x80000000
5675fd0b74Schristos 
5775fd0b74Schristos 
5875fd0b74Schristos #endif /* _ELF_IQ2000_H */
59