Subversion Repositories Kolibri OS

Rev

Rev 5191 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5191 Rev 6324
1
/* SPARC ELF support for BFD.
1
/* SPARC ELF support for BFD.
2
   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2008, 2010,
-
 
3
   2011
-
 
4
   Free Software Foundation, Inc.
2
   Copyright (C) 1996-2015 Free Software Foundation, Inc.
5
   By Doug Evans, Cygnus Support, .
3
   By Doug Evans, Cygnus Support, .
6
 
4
 
7
   This file is part of BFD, the Binary File Descriptor library.
5
   This file is part of BFD, the Binary File Descriptor library.
8
 
6
 
9
   This program is free software; you can redistribute it and/or modify
7
   This program is free software; you can redistribute it and/or modify
10
   it under the terms of the GNU General Public License as published by
8
   it under the terms of the GNU General Public License as published by
11
   the Free Software Foundation; either version 3 of the License, or
9
   the Free Software Foundation; either version 3 of the License, or
12
   (at your option) any later version.
10
   (at your option) any later version.
13
 
11
 
14
   This program is distributed in the hope that it will be useful,
12
   This program is distributed in the hope that it will be useful,
15
   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
   but WITHOUT ANY WARRANTY; without even the implied warranty of
16
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
   GNU General Public License for more details.
15
   GNU General Public License for more details.
18
 
16
 
19
   You should have received a copy of the GNU General Public License
17
   You should have received a copy of the GNU General Public License
20
   along with this program; if not, write to the Free Software
18
   along with this program; if not, write to the Free Software
21
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
22
   MA 02110-1301, USA.  */
20
   MA 02110-1301, USA.  */
23
 
21
 
24
#ifndef _ELF_SPARC_H
22
#ifndef _ELF_SPARC_H
25
#define _ELF_SPARC_H
23
#define _ELF_SPARC_H
26
 
24
 
27
/* Processor specific flags for the ELF header e_flags field.  */
25
/* Processor specific flags for the ELF header e_flags field.  */
28
 
26
 
29
/* These are defined by Sun.  */
27
/* These are defined by Sun.  */
30
 
28
 
31
#define EF_SPARC_32PLUS_MASK	0xffff00	/* bits indicating V8+ type */
29
#define EF_SPARC_32PLUS_MASK	0xffff00	/* bits indicating V8+ type */
32
#define EF_SPARC_32PLUS		0x000100	/* generic V8+ features */
30
#define EF_SPARC_32PLUS		0x000100	/* generic V8+ features */
33
#define EF_SPARC_SUN_US1	0x000200	/* Sun UltraSPARC1 extensions */
31
#define EF_SPARC_SUN_US1	0x000200	/* Sun UltraSPARC1 extensions */
34
#define EF_SPARC_HAL_R1		0x000400	/* HAL R1 extensions */
32
#define EF_SPARC_HAL_R1		0x000400	/* HAL R1 extensions */
35
#define EF_SPARC_SUN_US3	0x000800	/* Sun UltraSPARCIII extensions */
33
#define EF_SPARC_SUN_US3	0x000800	/* Sun UltraSPARCIII extensions */
36
 
34
 
37
#define EF_SPARC_LEDATA         0x800000	/* little endian data */
35
#define EF_SPARC_LEDATA         0x800000	/* little endian data */
38
 
36
 
39
/* This name is used in the V9 ABI.  */
37
/* This name is used in the V9 ABI.  */
40
#define EF_SPARC_EXT_MASK	0xffff00	/* reserved for vendor extensions */
38
#define EF_SPARC_EXT_MASK	0xffff00	/* reserved for vendor extensions */
41
 
39
 
42
/* V9 memory models */
40
/* V9 memory models */
43
#define EF_SPARCV9_MM		0x3		/* memory model mask */
41
#define EF_SPARCV9_MM		0x3		/* memory model mask */
44
#define EF_SPARCV9_TSO		0x0		/* total store ordering */
42
#define EF_SPARCV9_TSO		0x0		/* total store ordering */
45
#define EF_SPARCV9_PSO		0x1		/* partial store ordering */
43
#define EF_SPARCV9_PSO		0x1		/* partial store ordering */
46
#define EF_SPARCV9_RMO		0x2		/* relaxed store ordering */
44
#define EF_SPARCV9_RMO		0x2		/* relaxed store ordering */
47
 
45
 
48
/* Section indices.  */
46
/* Section indices.  */
49
 
47
 
50
#define SHN_BEFORE	SHN_LORESERVE		/* Used with SHF_ORDERED and...  */
48
#define SHN_BEFORE	SHN_LORESERVE		/* Used with SHF_ORDERED and...  */
51
#define SHN_AFTER	(SHN_LORESERVE + 1)	/* SHF_LINK_ORDER section flags. */
49
#define SHN_AFTER	(SHN_LORESERVE + 1)	/* SHF_LINK_ORDER section flags. */
52
 
50
 
53
/* Section flags.  */
51
/* Section flags.  */
54
 
52
 
55
#define SHF_ORDERED		0x40000000	/* treat sh_link,sh_info specially */
53
#define SHF_ORDERED		0x40000000	/* treat sh_link,sh_info specially */
56
 
54
 
57
/* Symbol types.  */
55
/* Symbol types.  */
58
 
56
 
59
#define STT_REGISTER		13		/* global reg reserved to app. */
57
#define STT_REGISTER		13		/* global reg reserved to app. */
60
 
58
 
61
#include "elf/reloc-macros.h"
59
#include "elf/reloc-macros.h"
62
 
60
 
63
/* Relocation types.  */
61
/* Relocation types.  */
64
START_RELOC_NUMBERS (elf_sparc_reloc_type)
62
START_RELOC_NUMBERS (elf_sparc_reloc_type)
65
  RELOC_NUMBER (R_SPARC_NONE, 0)
63
  RELOC_NUMBER (R_SPARC_NONE, 0)
66
  RELOC_NUMBER (R_SPARC_8, 1)
64
  RELOC_NUMBER (R_SPARC_8, 1)
67
  RELOC_NUMBER (R_SPARC_16, 2)
65
  RELOC_NUMBER (R_SPARC_16, 2)
68
  RELOC_NUMBER (R_SPARC_32, 3)
66
  RELOC_NUMBER (R_SPARC_32, 3)
69
  RELOC_NUMBER (R_SPARC_DISP8, 4)
67
  RELOC_NUMBER (R_SPARC_DISP8, 4)
70
  RELOC_NUMBER (R_SPARC_DISP16, 5)
68
  RELOC_NUMBER (R_SPARC_DISP16, 5)
71
  RELOC_NUMBER (R_SPARC_DISP32, 6)
69
  RELOC_NUMBER (R_SPARC_DISP32, 6)
72
  RELOC_NUMBER (R_SPARC_WDISP30, 7)
70
  RELOC_NUMBER (R_SPARC_WDISP30, 7)
73
  RELOC_NUMBER (R_SPARC_WDISP22, 8)
71
  RELOC_NUMBER (R_SPARC_WDISP22, 8)
74
  RELOC_NUMBER (R_SPARC_HI22, 9)
72
  RELOC_NUMBER (R_SPARC_HI22, 9)
75
  RELOC_NUMBER (R_SPARC_22, 10)
73
  RELOC_NUMBER (R_SPARC_22, 10)
76
  RELOC_NUMBER (R_SPARC_13, 11)
74
  RELOC_NUMBER (R_SPARC_13, 11)
77
  RELOC_NUMBER (R_SPARC_LO10, 12)
75
  RELOC_NUMBER (R_SPARC_LO10, 12)
78
  RELOC_NUMBER (R_SPARC_GOT10, 13)
76
  RELOC_NUMBER (R_SPARC_GOT10, 13)
79
  RELOC_NUMBER (R_SPARC_GOT13, 14)
77
  RELOC_NUMBER (R_SPARC_GOT13, 14)
80
  RELOC_NUMBER (R_SPARC_GOT22, 15)
78
  RELOC_NUMBER (R_SPARC_GOT22, 15)
81
  RELOC_NUMBER (R_SPARC_PC10, 16)
79
  RELOC_NUMBER (R_SPARC_PC10, 16)
82
  RELOC_NUMBER (R_SPARC_PC22, 17)
80
  RELOC_NUMBER (R_SPARC_PC22, 17)
83
  RELOC_NUMBER (R_SPARC_WPLT30, 18)
81
  RELOC_NUMBER (R_SPARC_WPLT30, 18)
84
  RELOC_NUMBER (R_SPARC_COPY, 19)
82
  RELOC_NUMBER (R_SPARC_COPY, 19)
85
  RELOC_NUMBER (R_SPARC_GLOB_DAT, 20)
83
  RELOC_NUMBER (R_SPARC_GLOB_DAT, 20)
86
  RELOC_NUMBER (R_SPARC_JMP_SLOT, 21)
84
  RELOC_NUMBER (R_SPARC_JMP_SLOT, 21)
87
  RELOC_NUMBER (R_SPARC_RELATIVE, 22)
85
  RELOC_NUMBER (R_SPARC_RELATIVE, 22)
88
  RELOC_NUMBER (R_SPARC_UA32, 23)
86
  RELOC_NUMBER (R_SPARC_UA32, 23)
89
 
87
 
90
  /* ??? These 6 relocs are new but not currently used.  For binary
88
  /* ??? These 6 relocs are new but not currently used.  For binary
91
     compatibility in the sparc64-elf toolchain, we leave them out.
89
     compatibility in the sparc64-elf toolchain, we leave them out.
92
     A non-binary upward compatible change is expected for sparc64-elf.  */
90
     A non-binary upward compatible change is expected for sparc64-elf.  */
93
#ifndef SPARC64_OLD_RELOCS
91
#ifndef SPARC64_OLD_RELOCS
94
  /* ??? New relocs on the UltraSPARC.  Not sure what they're for yet.  */
92
  /* ??? New relocs on the UltraSPARC.  Not sure what they're for yet.  */
95
  RELOC_NUMBER (R_SPARC_PLT32, 24)
93
  RELOC_NUMBER (R_SPARC_PLT32, 24)
96
  RELOC_NUMBER (R_SPARC_HIPLT22, 25)
94
  RELOC_NUMBER (R_SPARC_HIPLT22, 25)
97
  RELOC_NUMBER (R_SPARC_LOPLT10, 26)
95
  RELOC_NUMBER (R_SPARC_LOPLT10, 26)
98
  RELOC_NUMBER (R_SPARC_PCPLT32, 27)
96
  RELOC_NUMBER (R_SPARC_PCPLT32, 27)
99
  RELOC_NUMBER (R_SPARC_PCPLT22, 28)
97
  RELOC_NUMBER (R_SPARC_PCPLT22, 28)
100
  RELOC_NUMBER (R_SPARC_PCPLT10, 29)
98
  RELOC_NUMBER (R_SPARC_PCPLT10, 29)
101
#endif
99
#endif
102
 
100
 
103
  /* v9 relocs */
101
  /* v9 relocs */
104
  RELOC_NUMBER (R_SPARC_10, 30)
102
  RELOC_NUMBER (R_SPARC_10, 30)
105
  RELOC_NUMBER (R_SPARC_11, 31)
103
  RELOC_NUMBER (R_SPARC_11, 31)
106
  RELOC_NUMBER (R_SPARC_64, 32)
104
  RELOC_NUMBER (R_SPARC_64, 32)
107
  RELOC_NUMBER (R_SPARC_OLO10, 33)
105
  RELOC_NUMBER (R_SPARC_OLO10, 33)
108
  RELOC_NUMBER (R_SPARC_HH22, 34)
106
  RELOC_NUMBER (R_SPARC_HH22, 34)
109
  RELOC_NUMBER (R_SPARC_HM10, 35)
107
  RELOC_NUMBER (R_SPARC_HM10, 35)
110
  RELOC_NUMBER (R_SPARC_LM22, 36)
108
  RELOC_NUMBER (R_SPARC_LM22, 36)
111
  RELOC_NUMBER (R_SPARC_PC_HH22, 37)
109
  RELOC_NUMBER (R_SPARC_PC_HH22, 37)
112
  RELOC_NUMBER (R_SPARC_PC_HM10, 38)
110
  RELOC_NUMBER (R_SPARC_PC_HM10, 38)
113
  RELOC_NUMBER (R_SPARC_PC_LM22, 39)
111
  RELOC_NUMBER (R_SPARC_PC_LM22, 39)
114
  RELOC_NUMBER (R_SPARC_WDISP16, 40)
112
  RELOC_NUMBER (R_SPARC_WDISP16, 40)
115
  RELOC_NUMBER (R_SPARC_WDISP19, 41)
113
  RELOC_NUMBER (R_SPARC_WDISP19, 41)
116
  RELOC_NUMBER (R_SPARC_UNUSED_42, 42)
114
  RELOC_NUMBER (R_SPARC_UNUSED_42, 42)
117
  RELOC_NUMBER (R_SPARC_7, 43)
115
  RELOC_NUMBER (R_SPARC_7, 43)
118
  RELOC_NUMBER (R_SPARC_5, 44)
116
  RELOC_NUMBER (R_SPARC_5, 44)
119
  RELOC_NUMBER (R_SPARC_6, 45)
117
  RELOC_NUMBER (R_SPARC_6, 45)
120
  RELOC_NUMBER (R_SPARC_DISP64, 46)
118
  RELOC_NUMBER (R_SPARC_DISP64, 46)
121
  RELOC_NUMBER (R_SPARC_PLT64, 47)
119
  RELOC_NUMBER (R_SPARC_PLT64, 47)
122
  RELOC_NUMBER (R_SPARC_HIX22, 48)
120
  RELOC_NUMBER (R_SPARC_HIX22, 48)
123
  RELOC_NUMBER (R_SPARC_LOX10, 49)
121
  RELOC_NUMBER (R_SPARC_LOX10, 49)
124
  RELOC_NUMBER (R_SPARC_H44, 50)
122
  RELOC_NUMBER (R_SPARC_H44, 50)
125
  RELOC_NUMBER (R_SPARC_M44, 51)
123
  RELOC_NUMBER (R_SPARC_M44, 51)
126
  RELOC_NUMBER (R_SPARC_L44, 52)
124
  RELOC_NUMBER (R_SPARC_L44, 52)
127
  RELOC_NUMBER (R_SPARC_REGISTER, 53)
125
  RELOC_NUMBER (R_SPARC_REGISTER, 53)
128
  RELOC_NUMBER (R_SPARC_UA64, 54)
126
  RELOC_NUMBER (R_SPARC_UA64, 54)
129
  RELOC_NUMBER (R_SPARC_UA16, 55)
127
  RELOC_NUMBER (R_SPARC_UA16, 55)
130
 
128
 
131
  RELOC_NUMBER (R_SPARC_TLS_GD_HI22, 56)
129
  RELOC_NUMBER (R_SPARC_TLS_GD_HI22, 56)
132
  RELOC_NUMBER (R_SPARC_TLS_GD_LO10, 57)
130
  RELOC_NUMBER (R_SPARC_TLS_GD_LO10, 57)
133
  RELOC_NUMBER (R_SPARC_TLS_GD_ADD, 58)
131
  RELOC_NUMBER (R_SPARC_TLS_GD_ADD, 58)
134
  RELOC_NUMBER (R_SPARC_TLS_GD_CALL, 59)
132
  RELOC_NUMBER (R_SPARC_TLS_GD_CALL, 59)
135
  RELOC_NUMBER (R_SPARC_TLS_LDM_HI22, 60)
133
  RELOC_NUMBER (R_SPARC_TLS_LDM_HI22, 60)
136
  RELOC_NUMBER (R_SPARC_TLS_LDM_LO10, 61)
134
  RELOC_NUMBER (R_SPARC_TLS_LDM_LO10, 61)
137
  RELOC_NUMBER (R_SPARC_TLS_LDM_ADD, 62)
135
  RELOC_NUMBER (R_SPARC_TLS_LDM_ADD, 62)
138
  RELOC_NUMBER (R_SPARC_TLS_LDM_CALL, 63)
136
  RELOC_NUMBER (R_SPARC_TLS_LDM_CALL, 63)
139
  RELOC_NUMBER (R_SPARC_TLS_LDO_HIX22, 64)
137
  RELOC_NUMBER (R_SPARC_TLS_LDO_HIX22, 64)
140
  RELOC_NUMBER (R_SPARC_TLS_LDO_LOX10, 65)
138
  RELOC_NUMBER (R_SPARC_TLS_LDO_LOX10, 65)
141
  RELOC_NUMBER (R_SPARC_TLS_LDO_ADD, 66)
139
  RELOC_NUMBER (R_SPARC_TLS_LDO_ADD, 66)
142
  RELOC_NUMBER (R_SPARC_TLS_IE_HI22, 67)
140
  RELOC_NUMBER (R_SPARC_TLS_IE_HI22, 67)
143
  RELOC_NUMBER (R_SPARC_TLS_IE_LO10, 68)
141
  RELOC_NUMBER (R_SPARC_TLS_IE_LO10, 68)
144
  RELOC_NUMBER (R_SPARC_TLS_IE_LD, 69)
142
  RELOC_NUMBER (R_SPARC_TLS_IE_LD, 69)
145
  RELOC_NUMBER (R_SPARC_TLS_IE_LDX, 70)
143
  RELOC_NUMBER (R_SPARC_TLS_IE_LDX, 70)
146
  RELOC_NUMBER (R_SPARC_TLS_IE_ADD, 71)
144
  RELOC_NUMBER (R_SPARC_TLS_IE_ADD, 71)
147
  RELOC_NUMBER (R_SPARC_TLS_LE_HIX22, 72)
145
  RELOC_NUMBER (R_SPARC_TLS_LE_HIX22, 72)
148
  RELOC_NUMBER (R_SPARC_TLS_LE_LOX10, 73)
146
  RELOC_NUMBER (R_SPARC_TLS_LE_LOX10, 73)
149
  RELOC_NUMBER (R_SPARC_TLS_DTPMOD32, 74)
147
  RELOC_NUMBER (R_SPARC_TLS_DTPMOD32, 74)
150
  RELOC_NUMBER (R_SPARC_TLS_DTPMOD64, 75)
148
  RELOC_NUMBER (R_SPARC_TLS_DTPMOD64, 75)
151
  RELOC_NUMBER (R_SPARC_TLS_DTPOFF32, 76)
149
  RELOC_NUMBER (R_SPARC_TLS_DTPOFF32, 76)
152
  RELOC_NUMBER (R_SPARC_TLS_DTPOFF64, 77)
150
  RELOC_NUMBER (R_SPARC_TLS_DTPOFF64, 77)
153
  RELOC_NUMBER (R_SPARC_TLS_TPOFF32, 78)
151
  RELOC_NUMBER (R_SPARC_TLS_TPOFF32, 78)
154
  RELOC_NUMBER (R_SPARC_TLS_TPOFF64, 79)
152
  RELOC_NUMBER (R_SPARC_TLS_TPOFF64, 79)
155
 
153
 
156
  RELOC_NUMBER (R_SPARC_GOTDATA_HIX22, 80)
154
  RELOC_NUMBER (R_SPARC_GOTDATA_HIX22, 80)
157
  RELOC_NUMBER (R_SPARC_GOTDATA_LOX10, 81)
155
  RELOC_NUMBER (R_SPARC_GOTDATA_LOX10, 81)
158
  RELOC_NUMBER (R_SPARC_GOTDATA_OP_HIX22, 82)
156
  RELOC_NUMBER (R_SPARC_GOTDATA_OP_HIX22, 82)
159
  RELOC_NUMBER (R_SPARC_GOTDATA_OP_LOX10, 83)
157
  RELOC_NUMBER (R_SPARC_GOTDATA_OP_LOX10, 83)
160
  RELOC_NUMBER (R_SPARC_GOTDATA_OP, 84)
158
  RELOC_NUMBER (R_SPARC_GOTDATA_OP, 84)
161
 
159
 
162
  RELOC_NUMBER (R_SPARC_H34, 85)
160
  RELOC_NUMBER (R_SPARC_H34, 85)
163
  RELOC_NUMBER (R_SPARC_SIZE32, 86)
161
  RELOC_NUMBER (R_SPARC_SIZE32, 86)
164
  RELOC_NUMBER (R_SPARC_SIZE64, 87)
162
  RELOC_NUMBER (R_SPARC_SIZE64, 87)
165
  RELOC_NUMBER (R_SPARC_WDISP10, 88)
163
  RELOC_NUMBER (R_SPARC_WDISP10, 88)
166
  
164
  
167
  EMPTY_RELOC  (R_SPARC_max_std)
165
  EMPTY_RELOC  (R_SPARC_max_std)
168
 
166
 
169
  RELOC_NUMBER (R_SPARC_JMP_IREL, 248)
167
  RELOC_NUMBER (R_SPARC_JMP_IREL, 248)
170
  RELOC_NUMBER (R_SPARC_IRELATIVE, 249)
168
  RELOC_NUMBER (R_SPARC_IRELATIVE, 249)
171
  RELOC_NUMBER (R_SPARC_GNU_VTINHERIT, 250)
169
  RELOC_NUMBER (R_SPARC_GNU_VTINHERIT, 250)
172
  RELOC_NUMBER (R_SPARC_GNU_VTENTRY, 251)
170
  RELOC_NUMBER (R_SPARC_GNU_VTENTRY, 251)
173
  RELOC_NUMBER (R_SPARC_REV32, 252)
171
  RELOC_NUMBER (R_SPARC_REV32, 252)
174
 
172
 
175
END_RELOC_NUMBERS (R_SPARC_max)
173
END_RELOC_NUMBERS (R_SPARC_max)
176
 
174
 
177
/* Relocation macros.  */
175
/* Relocation macros.  */
178
 
176
 
179
#define ELF64_R_TYPE_DATA(info) \
177
#define ELF64_R_TYPE_DATA(info) \
180
  (((bfd_signed_vma)(ELF64_R_TYPE(info) >> 8) ^ 0x800000) - 0x800000)
178
  (((bfd_signed_vma)(ELF64_R_TYPE(info) >> 8) ^ 0x800000) - 0x800000)
181
#define ELF64_R_TYPE_ID(info) \
179
#define ELF64_R_TYPE_ID(info) \
182
  ((info) & 0xff)
180
  ((info) & 0xff)
183
#define ELF64_R_TYPE_INFO(data, type) \
181
#define ELF64_R_TYPE_INFO(data, type) \
184
  (((bfd_vma) ((data) & 0xffffff) << 8) | (bfd_vma) (type))
182
  (((bfd_vma) ((data) & 0xffffff) << 8) | (bfd_vma) (type))
185
 
183
 
186
/* Values for Elf64_Dyn.d_tag.  */
184
/* Values for Elf64_Dyn.d_tag.  */
187
 
185
 
188
#define DT_SPARC_REGISTER	0x70000001
186
#define DT_SPARC_REGISTER	0x70000001
189
 
187
 
190
/* Object attribute tags.  */
188
/* Object attribute tags.  */
191
enum
189
enum
192
{
190
{
193
  /* 0-3 are generic.  */
191
  /* 0-3 are generic.  */
194
  Tag_GNU_Sparc_HWCAPS = 4,
192
  Tag_GNU_Sparc_HWCAPS = 4,
-
 
193
  Tag_GNU_Sparc_HWCAPS2 = 8
195
};
194
};
-
 
195
 
196
 
196
/* Generally speaking the ELF_SPARC_HWCAP_* and ELF_SPARC_HWCAP2_*
-
 
197
   values match the AV_SPARC_* and AV2_SPARC_* bits respectively.
-
 
198
 
-
 
199
   However Solaris 11 introduced a backwards-incompatible change
-
 
200
   deprecating the RANDOM, TRANS and ASI_CACHE_SPARING bits in the
-
 
201
   AT_SUNW_CAP_HW1 flags, reusing the bits for the unrelated hwcaps
-
 
202
   FJATHHPC, FJDES and FJAES respectively.  In GNU/Linux we opted to
-
 
203
   keep the old hwcaps in Tag_GNU_Sparc_HWCAPS and allocate bits for
-
 
204
   FJATHHPC, FJDES and JFAES in Tag_GNU_Sparc_HWCAPS2.  */
197
/* These values match the AV_SPARC_* hwcap bits defined under Solaris.  */
205
 
198
#define ELF_SPARC_HWCAP_MUL32	0x00000001 /* umul/umulcc/smul/smulcc insns */
206
#define ELF_SPARC_HWCAP_MUL32	0x00000001 /* umul/umulcc/smul/smulcc insns */
199
#define ELF_SPARC_HWCAP_DIV32	0x00000002 /* udiv/udivcc/sdiv/sdivcc insns */
207
#define ELF_SPARC_HWCAP_DIV32	0x00000002 /* udiv/udivcc/sdiv/sdivcc insns */
200
#define ELF_SPARC_HWCAP_FSMULD	0x00000004 /* 'fsmuld' insn */
208
#define ELF_SPARC_HWCAP_FSMULD	0x00000004 /* 'fsmuld' insn */
201
#define ELF_SPARC_HWCAP_V8PLUS	0x00000008 /* v9 insns available to 32bit */
209
#define ELF_SPARC_HWCAP_V8PLUS	0x00000008 /* v9 insns available to 32bit */
202
#define ELF_SPARC_HWCAP_POPC	0x00000010 /* 'popc' insn */
210
#define ELF_SPARC_HWCAP_POPC	0x00000010 /* 'popc' insn */
203
#define ELF_SPARC_HWCAP_VIS	0x00000020 /* VIS insns */
211
#define ELF_SPARC_HWCAP_VIS	0x00000020 /* VIS insns */
204
#define ELF_SPARC_HWCAP_VIS2	0x00000040 /* VIS2 insns */
212
#define ELF_SPARC_HWCAP_VIS2	0x00000040 /* VIS2 insns */
205
#define ELF_SPARC_HWCAP_ASI_BLK_INIT	\
213
#define ELF_SPARC_HWCAP_ASI_BLK_INIT	\
206
				0x00000080 /* block init ASIs */
214
				0x00000080 /* block init ASIs */
207
#define ELF_SPARC_HWCAP_FMAF	0x00000100 /* fused multiply-add */
215
#define ELF_SPARC_HWCAP_FMAF	0x00000100 /* fused multiply-add */
208
#define ELF_SPARC_HWCAP_VIS3	0x00000400 /* VIS3 insns */
216
#define ELF_SPARC_HWCAP_VIS3	0x00000400 /* VIS3 insns */
209
#define ELF_SPARC_HWCAP_HPC	0x00000800 /* HPC insns */
217
#define ELF_SPARC_HWCAP_HPC	0x00000800 /* HPC insns */
210
#define ELF_SPARC_HWCAP_RANDOM	0x00001000 /* 'random' insn */
218
#define ELF_SPARC_HWCAP_RANDOM	0x00001000 /* 'random' insn */
211
#define ELF_SPARC_HWCAP_TRANS	0x00002000 /* transaction insns */
219
#define ELF_SPARC_HWCAP_TRANS	0x00002000 /* transaction insns */
212
#define ELF_SPARC_HWCAP_FJFMAU	0x00004000 /* unfused multiply-add */
220
#define ELF_SPARC_HWCAP_FJFMAU	0x00004000 /* unfused multiply-add */
213
#define ELF_SPARC_HWCAP_IMA	0x00008000 /* integer multiply-add */
221
#define ELF_SPARC_HWCAP_IMA	0x00008000 /* integer multiply-add */
214
#define ELF_SPARC_HWCAP_ASI_CACHE_SPARING \
222
#define ELF_SPARC_HWCAP_ASI_CACHE_SPARING \
215
				0x00010000 /* cache sparing ASIs */
223
				0x00010000 /* cache sparing ASIs */
216
#define ELF_SPARC_HWCAP_AES	0x00020000 /* AES crypto insns */
224
#define ELF_SPARC_HWCAP_AES	0x00020000 /* AES crypto insns */
217
#define ELF_SPARC_HWCAP_DES	0x00040000 /* DES crypto insns */
225
#define ELF_SPARC_HWCAP_DES	0x00040000 /* DES crypto insns */
218
#define ELF_SPARC_HWCAP_KASUMI	0x00080000 /* KASUMI crypto insns */
226
#define ELF_SPARC_HWCAP_KASUMI	0x00080000 /* KASUMI crypto insns */
219
#define ELF_SPARC_HWCAP_CAMELLIA \
227
#define ELF_SPARC_HWCAP_CAMELLIA \
220
				0x00100000 /* CAMELLIA crypto insns */
228
				0x00100000 /* CAMELLIA crypto insns */
221
#define ELF_SPARC_HWCAP_MD5	0x00200000 /* MD5 hashing insns */
229
#define ELF_SPARC_HWCAP_MD5	0x00200000 /* MD5 hashing insns */
222
#define ELF_SPARC_HWCAP_SHA1	0x00400000 /* SHA1 hashing insns */
230
#define ELF_SPARC_HWCAP_SHA1	0x00400000 /* SHA1 hashing insns */
223
#define ELF_SPARC_HWCAP_SHA256	0x00800000 /* SHA256 hashing insns */
231
#define ELF_SPARC_HWCAP_SHA256	0x00800000 /* SHA256 hashing insns */
224
#define ELF_SPARC_HWCAP_SHA512	0x01000000 /* SHA512 hashing insns */
232
#define ELF_SPARC_HWCAP_SHA512	0x01000000 /* SHA512 hashing insns */
225
#define ELF_SPARC_HWCAP_MPMUL	0x02000000 /* Multiple Precision Multiply */
233
#define ELF_SPARC_HWCAP_MPMUL	0x02000000 /* Multiple Precision Multiply */
226
#define ELF_SPARC_HWCAP_MONT	0x04000000 /* Montgomery Mult/Sqrt */
234
#define ELF_SPARC_HWCAP_MONT	0x04000000 /* Montgomery Mult/Sqrt */
227
#define ELF_SPARC_HWCAP_PAUSE	0x08000000 /* Pause insn */
235
#define ELF_SPARC_HWCAP_PAUSE	0x08000000 /* Pause insn */
228
#define ELF_SPARC_HWCAP_CBCOND	0x10000000 /* Compare and Branch insns */
236
#define ELF_SPARC_HWCAP_CBCOND	0x10000000 /* Compare and Branch insns */
229
#define ELF_SPARC_HWCAP_CRC32C	0x20000000 /* CRC32C insn */
237
#define ELF_SPARC_HWCAP_CRC32C	0x20000000 /* CRC32C insn */
-
 
238
 
-
 
239
#define ELF_SPARC_HWCAP2_FJATHPLUS 0x00000001 /* Fujitsu Athena+ */
-
 
240
#define ELF_SPARC_HWCAP2_VIS3B     0x00000002 /* Subset of VIS3 present on sparc64 X+ */
-
 
241
#define ELF_SPARC_HWCAP2_ADP       0x00000004 /* Application Data Protection */
-
 
242
#define ELF_SPARC_HWCAP2_SPARC5    0x00000008 /* The 29 new fp and sub instructions */
-
 
243
#define ELF_SPARC_HWCAP2_MWAIT     0x00000010 /* mwait instruction and load/monitor ASIs */
-
 
244
#define ELF_SPARC_HWCAP2_XMPMUL    0x00000020 /* XOR multiple precision multiply */
-
 
245
#define ELF_SPARC_HWCAP2_XMONT     0x00000040 /* XOR Montgomery mult/sqr instructions */
-
 
246
#define ELF_SPARC_HWCAP2_NSEC      \
-
 
247
                                   0x00000080 /* pause insn with support for nsec timings */
-
 
248
#define ELF_SPARC_HWCAP2_FJATHHPC  0x00001000 /* Fujitsu HPC instrs */
-
 
249
#define ELF_SPARC_HWCAP2_FJDES     0x00002000 /* Fujitsu DES instrs */
-
 
250
#define ELF_SPARC_HWCAP2_FJAES     0x00010000 /* Fujitsu AES instrs */
230
 
251
 
231
#endif /* _ELF_SPARC_H */
252
#endif /* _ELF_SPARC_H */