1 /* Object attribute tags for ARM.
2 Copyright (C) 2009 Red Hat, Inc.
3 This file is part of elfutils.
5 This file is free software; you can redistribute it and/or modify
6 it under the terms of either
8 * the GNU Lesser General Public License as published by the Free
9 Software Foundation; either version 3 of the License, or (at
10 your option) any later version
14 * the GNU General Public License as published by the Free
15 Software Foundation; either version 2 of the License, or (at
16 your option) any later version
18 or both in parallel, as here.
20 elfutils is distributed in the hope that it will be useful, but
21 WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 General Public License for more details.
25 You should have received copies of the GNU General Public License and
26 the GNU Lesser General Public License along with this program. If
27 not, see <http://www.gnu.org/licenses/>. */
37 #include "libebl_CPU.h"
39 #define KNOWN_VALUES(...) do \
41 static const char *table[] = { __VA_ARGS__ }; \
42 if (value < sizeof table / sizeof table[0]) \
43 *value_name = table[value]; \
47 arm_check_object_attribute (ebl, vendor, tag, value, tag_name, value_name)
48 Ebl *ebl __attribute__ ((unused));
51 uint64_t value __attribute__ ((unused));
52 const char **tag_name;
53 const char **value_name;
55 if (!strcmp (vendor, "aeabi"))
59 *tag_name = "CPU_raw_name";
62 *tag_name = "CPU_name";
65 *tag_name = "CPU_arch";
66 KNOWN_VALUES ("Pre-v4",
81 *tag_name = "CPU_arch_profile";
85 *value_name = "Application";
88 *value_name = "Realtime";
91 *value_name = "Microcontroller";
96 *tag_name = "ARM_ISA_use";
97 KNOWN_VALUES ("No", "Yes");
100 *tag_name = "THUMB_ISA_use";
101 KNOWN_VALUES ("No", "Thumb-1", "Thumb-2");
104 *tag_name = "VFP_arch";
105 KNOWN_VALUES ("No", "VFPv1", "VFPv2", "VFPv3", "VFPv3-D16");
108 *tag_name = "WMMX_arch";
109 KNOWN_VALUES ("No", "WMMXv1", "WMMXv2");
112 *tag_name = "Advanced_SIMD_arch";
113 KNOWN_VALUES ("No", "NEONv1");
116 *tag_name = "PCS_config";
117 KNOWN_VALUES ("None",
124 "SymbianOS (reserved)");
127 *tag_name = "ABI_PCS_R9_use";
128 KNOWN_VALUES ("V6", "SB", "TLS", "Unused");
131 *tag_name = "ABI_PCS_RW_data";
132 KNOWN_VALUES ("Absolute", "PC-relative", "SB-relative", "None");
135 *tag_name = "ABI_PCS_RO_data";
136 KNOWN_VALUES ("Absolute", "PC-relative", "None");
139 *tag_name = "ABI_PCS_GOT_use";
140 KNOWN_VALUES ("None", "direct", "GOT-indirect");
143 *tag_name = "ABI_PCS_wchar_t";
146 *tag_name = "ABI_FP_rounding";
147 KNOWN_VALUES ("Unused", "Needed");
150 *tag_name = "ABI_FP_denormal";
151 KNOWN_VALUES ("Unused", "Needed", "Sign only");
154 *tag_name = "ABI_FP_exceptions";
155 KNOWN_VALUES ("Unused", "Needed");
158 *tag_name = "ABI_FP_user_exceptions";
159 KNOWN_VALUES ("Unused", "Needed");
162 *tag_name = "ABI_FP_number_model";
163 KNOWN_VALUES ("Unused", "Finite", "RTABI", "IEEE 754");
166 *tag_name = "ABI_align8_needed";
167 KNOWN_VALUES ("No", "Yes", "4-byte");
170 *tag_name = "ABI_align8_preserved";
171 KNOWN_VALUES ("No", "Yes, except leaf SP", "Yes");
174 *tag_name = "ABI_enum_size";
175 KNOWN_VALUES ("Unused", "small", "int", "forced to int");
178 *tag_name = "ABI_HardFP_use";
179 KNOWN_VALUES ("as VFP_arch", "SP only", "DP only", "SP and DP");
182 *tag_name = "ABI_VFP_args";
183 KNOWN_VALUES ("AAPCS", "VFP registers", "custom");
186 *tag_name = "ABI_WMMX_args";
187 KNOWN_VALUES ("AAPCS", "WMMX registers", "custom");
190 *tag_name = "ABI_optimization_goals";
191 KNOWN_VALUES ("None",
200 *tag_name = "ABI_FP_optimization_goals";
201 KNOWN_VALUES ("None",
207 "Aggressive Accuracy");
210 *tag_name = "CPU_unaligned_access";
211 KNOWN_VALUES ("None", "v6");
214 *tag_name = "VFP_HP_extension";
215 KNOWN_VALUES ("Not Allowed", "Allowed");
218 *tag_name = "ABI_FP_16bit_format";
219 KNOWN_VALUES ("None", "IEEE 754", "Alternative Format");
222 *tag_name = "nodefaults";
225 *tag_name = "also_compatible_with";
228 *tag_name = "T2EE_use";
229 KNOWN_VALUES ("Not Allowed", "Allowed");
232 *tag_name = "conformance";
235 *tag_name = "Virtualization_use";
236 KNOWN_VALUES ("Not Allowed", "Allowed");
239 *tag_name = "MPextension_use";
240 KNOWN_VALUES ("Not Allowed", "Allowed");