WARNS=6 safeness:
[dragonfly.git] / contrib / binutils-2.14 / include / elf / frv.h
1 /* FRV ELF support for BFD.
2    Copyright (C) 2002 Free Software Foundation, Inc.
3
4 This file is part of BFD, the Binary File Descriptor library.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software Foundation, Inc.,
18 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
19
20 #ifndef _ELF_FRV_H
21 #define _ELF_FRV_H
22
23 #include "elf/reloc-macros.h"
24
25 /* Relocations.  */
26 START_RELOC_NUMBERS (elf_frv_reloc_type)
27   RELOC_NUMBER (R_FRV_NONE, 0)
28   RELOC_NUMBER (R_FRV_32, 1)
29   RELOC_NUMBER (R_FRV_LABEL16, 2)
30   RELOC_NUMBER (R_FRV_LABEL24, 3)
31   RELOC_NUMBER (R_FRV_LO16, 4)
32   RELOC_NUMBER (R_FRV_HI16, 5)
33   RELOC_NUMBER (R_FRV_GPREL12, 6)
34   RELOC_NUMBER (R_FRV_GPRELU12, 7)
35   RELOC_NUMBER (R_FRV_GPREL32, 8)
36   RELOC_NUMBER (R_FRV_GPRELHI, 9)
37   RELOC_NUMBER (R_FRV_GPRELLO, 10)
38   RELOC_NUMBER (R_FRV_GNU_VTINHERIT, 200)
39   RELOC_NUMBER (R_FRV_GNU_VTENTRY, 201)
40 END_RELOC_NUMBERS(R_FRV_max)
41
42 /* Processor specific flags for the ELF header e_flags field.  */
43                                                 /* gpr support */
44 #define EF_FRV_GPR_MASK         0x00000003      /* mask for # of gprs */
45 #define EF_FRV_GPR_32           0x00000001      /* -mgpr-32 */
46 #define EF_FRV_GPR_64           0x00000002      /* -mgpr-64 */
47
48                                                 /* fpr support */
49 #define EF_FRV_FPR_MASK         0x0000000c      /* mask for # of fprs */
50 #define EF_FRV_FPR_32           0x00000004      /* -mfpr-32 */
51 #define EF_FRV_FPR_64           0x00000008      /* -mfpr-64 */
52 #define EF_FRV_FPR_NONE         0x0000000c      /* -msoft-float */
53
54                                                 /* double word support */
55 #define EF_FRV_DWORD_MASK       0x00000030      /* mask for dword support */
56 #define EF_FRV_DWORD_YES        0x00000010      /* use double word insns */
57 #define EF_FRV_DWORD_NO         0x00000020      /* don't use double word insn*/
58
59 #define EF_FRV_DOUBLE           0x00000040      /* -mdouble */
60 #define EF_FRV_MEDIA            0x00000080      /* -mmedia */
61
62 #define EF_FRV_PIC              0x00000100      /* -fpic */
63 #define EF_FRV_NON_PIC_RELOCS   0x00000200      /* used non pic safe relocs */
64
65 #define EF_FRV_MULADD           0x00000400      /* -mmuladd */
66 #define EF_FRV_BIGPIC           0x00000800      /* -fPIC */
67 #define EF_FRV_LIBPIC           0x00001000      /* -mlibrary-pic */
68 #define EF_FRV_G0               0x00002000      /* -G 0, no small data ptr */
69 #define EF_FRV_NOPACK           0x00004000      /* -mnopack */
70
71 #define EF_FRV_CPU_MASK         0xff000000      /* specific cpu bits */
72 #define EF_FRV_CPU_GENERIC      0x00000000      /* generic FRV */
73 #define EF_FRV_CPU_FR500        0x01000000      /* FRV500 */
74 #define EF_FRV_CPU_FR300        0x02000000      /* FRV300 */
75 #define EF_FRV_CPU_SIMPLE       0x03000000      /* SIMPLE */
76 #define EF_FRV_CPU_TOMCAT       0x04000000      /* Tomcat, FR500 prototype */
77 #define EF_FRV_CPU_FR400        0x05000000      /* FRV400 */
78
79                                                 /* Mask of PIC related bits */
80 #define EF_FRV_PIC_FLAGS        (EF_FRV_PIC | EF_FRV_LIBPIC | EF_FRV_BIGPIC)
81
82                                                 /* Mask of all flags */
83 #define EF_FRV_ALL_FLAGS        (EF_FRV_GPR_MASK | \
84                                  EF_FRV_FPR_MASK | \
85                                  EF_FRV_DWORD_MASK | \
86                                  EF_FRV_DOUBLE | \
87                                  EF_FRV_MEDIA | \
88                                  EF_FRV_PIC_FLAGS | \
89                                  EF_FRV_NON_PIC_RELOCS | \
90                                  EF_FRV_MULADD | \
91                                  EF_FRV_G0 | \
92                                  EF_FRV_NOPACK | \
93                                  EF_FRV_CPU_MASK)
94
95 #endif /* _ELF_FRV_H */