1 /* Object attribute tags for ARM.
2 Copyright (C) 2009 Red Hat, Inc.
3 This file is part of Red Hat elfutils.
5 Red Hat elfutils is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by the
7 Free Software Foundation; version 2 of the License.
9 Red Hat elfutils is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public License along
15 with Red Hat elfutils; if not, write to the Free Software Foundation,
16 Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
18 Red Hat elfutils is an included package of the Open Invention Network.
19 An included package of the Open Invention Network is a package for which
20 Open Invention Network licensees cross-license their patents. No patent
21 license is granted, either expressly or impliedly, by designation as an
22 included package. Should you wish to participate in the Open Invention
23 Network licensing program, please visit www.openinventionnetwork.com
24 <http://www.openinventionnetwork.com>. */
34 #include "libebl_CPU.h"
36 #define KNOWN_VALUES(...) do \
38 static const char *table[] = { __VA_ARGS__ }; \
39 if (value < sizeof table / sizeof table[0]) \
40 *value_name = table[value]; \
44 arm_check_object_attribute (ebl, vendor, tag, value, tag_name, value_name)
45 Ebl *ebl __attribute__ ((unused));
48 uint64_t value __attribute__ ((unused));
49 const char **tag_name;
50 const char **value_name;
52 if (!strcmp (vendor, "aeabi"))
56 *tag_name = "CPU_raw_name";
59 *tag_name = "CPU_name";
62 *tag_name = "CPU_arch";
63 KNOWN_VALUES ("Pre-v4",
78 *tag_name = "CPU_arch_profile";
82 *value_name = "Application";
85 *value_name = "Realtime";
88 *value_name = "Microcontroller";
93 *tag_name = "ARM_ISA_use";
94 KNOWN_VALUES ("No", "Yes");
97 *tag_name = "THUMB_ISA_use";
98 KNOWN_VALUES ("No", "Thumb-1", "Thumb-2");
101 *tag_name = "VFP_arch";
102 KNOWN_VALUES ("No", "VFPv1", "VFPv2", "VFPv3", "VFPv3-D16");
105 *tag_name = "WMMX_arch";
106 KNOWN_VALUES ("No", "WMMXv1", "WMMXv2");
109 *tag_name = "Advanced_SIMD_arch";
110 KNOWN_VALUES ("No", "NEONv1");
113 *tag_name = "PCS_config";
114 KNOWN_VALUES ("None",
121 "SymbianOS (reserved)");
124 *tag_name = "ABI_PCS_R9_use";
125 KNOWN_VALUES ("V6", "SB", "TLS", "Unused");
128 *tag_name = "ABI_PCS_RW_data";
129 KNOWN_VALUES ("Absolute", "PC-relative", "SB-relative", "None");
132 *tag_name = "ABI_PCS_RO_data";
133 KNOWN_VALUES ("Absolute", "PC-relative", "None");
136 *tag_name = "ABI_PCS_GOT_use";
137 KNOWN_VALUES ("None", "direct", "GOT-indirect");
140 *tag_name = "ABI_PCS_wchar_t";
143 *tag_name = "ABI_FP_rounding";
144 KNOWN_VALUES ("Unused", "Needed");
147 *tag_name = "ABI_FP_denormal";
148 KNOWN_VALUES ("Unused", "Needed", "Sign only");
151 *tag_name = "ABI_FP_exceptions";
152 KNOWN_VALUES ("Unused", "Needed");
155 *tag_name = "ABI_FP_user_exceptions";
156 KNOWN_VALUES ("Unused", "Needed");
159 *tag_name = "ABI_FP_number_model";
160 KNOWN_VALUES ("Unused", "Finite", "RTABI", "IEEE 754");
163 *tag_name = "ABI_align8_needed";
164 KNOWN_VALUES ("No", "Yes", "4-byte");
167 *tag_name = "ABI_align8_preserved";
168 KNOWN_VALUES ("No", "Yes, except leaf SP", "Yes");
171 *tag_name = "ABI_enum_size";
172 KNOWN_VALUES ("Unused", "small", "int", "forced to int");
175 *tag_name = "ABI_HardFP_use";
176 KNOWN_VALUES ("as VFP_arch", "SP only", "DP only", "SP and DP");
179 *tag_name = "ABI_VFP_args";
180 KNOWN_VALUES ("AAPCS", "VFP registers", "custom");
183 *tag_name = "ABI_WMMX_args";
184 KNOWN_VALUES ("AAPCS", "WMMX registers", "custom");
187 *tag_name = "ABI_optimization_goals";
188 KNOWN_VALUES ("None",
197 *tag_name = "ABI_FP_optimization_goals";
198 KNOWN_VALUES ("None",
204 "Aggressive Accuracy");
207 *tag_name = "CPU_unaligned_access";
208 KNOWN_VALUES ("None", "v6");
211 *tag_name = "VFP_HP_extension";
212 KNOWN_VALUES ("Not Allowed", "Allowed");
215 *tag_name = "ABI_FP_16bit_format";
216 KNOWN_VALUES ("None", "IEEE 754", "Alternative Format");
219 *tag_name = "nodefaults";
222 *tag_name = "also_compatible_with";
225 *tag_name = "T2EE_use";
226 KNOWN_VALUES ("Not Allowed", "Allowed");
229 *tag_name = "conformance";
232 *tag_name = "Virtualization_use";
233 KNOWN_VALUES ("Not Allowed", "Allowed");
236 *tag_name = "MPextension_use";
237 KNOWN_VALUES ("Not Allowed", "Allowed");