XED
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
xed-iform-map.h
Go to the documentation of this file.
1 /*BEGIN_LEGAL
2 Intel Open Source License
3 
4 Copyright (c) 2002-2014 Intel Corporation. All rights reserved.
5 
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are
8 met:
9 
10 Redistributions of source code must retain the above copyright notice,
11 this list of conditions and the following disclaimer. Redistributions
12 in binary form must reproduce the above copyright notice, this list of
13 conditions and the following disclaimer in the documentation and/or
14 other materials provided with the distribution. Neither the name of
15 the Intel Corporation nor the names of its contributors may be used to
16 endorse or promote products derived from this software without
17 specific prior written permission.
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR
23 ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 END_LEGAL */
33 
34 #if !defined(_XED_IFORM_MAP_H_)
35 # define _XED_IFORM_MAP_H_
36 
37 #include "xed-common-hdrs.h"
38 #include "xed-types.h"
39 #include "xed-iform-enum.h" /* generated */
40 #include "xed-iclass-enum.h" /* generated */
41 #include "xed-category-enum.h" /* generated */
42 #include "xed-extension-enum.h" /* generated */
43 #include "xed-isa-set-enum.h" /* generated */
44 
48 typedef struct xed_iform_info_s {
53 
54  /* if nonzero, index in to the disassembly string table */
55  xed_uint32_t string_table_idx;
57 
58 
66 
73 xed_uint32_t xed_iform_max_per_iclass(xed_iclass_enum_t iclass);
74 
81 
86 static
88  const xed_iform_info_t* ii = xed_iform_map(iform);
89  if (ii)
90  return ii->iclass;
91  return XED_ICLASS_INVALID;
92 }
93 
100 
107 
114 
121 
122 
129 
130 #endif
xed_iform_enum_t
XED_DLL_EXPORT xed_extension_enum_t xed_iform_to_extension(xed_iform_enum_t iform)
Return the extension for a given iform.
xed_iclass_enum_t
xed_iclass_enum_t iclass
Definition: xed-iform-map.h:49
xed_uint32_t string_table_idx
Definition: xed-iform-map.h:55
XED_DLL_EXPORT char const * xed_iform_to_iclass_string_att(xed_iform_enum_t iform)
Return a pointer to a character string of the iclass.
XED_DLL_EXPORT xed_category_enum_t xed_iform_to_category(xed_iform_enum_t iform)
Return the category for a given iform.
Statically available information about iforms.
Definition: xed-iform-map.h:48
XED_DLL_EXPORT xed_uint32_t xed_iform_max_per_iclass(xed_iclass_enum_t iclass)
Return the maximum number of iforms for a particular iclass.
#define XED_INLINE
xed_isa_set_enum_t
XED_DLL_EXPORT xed_uint32_t xed_iform_first_per_iclass(xed_iclass_enum_t iclass)
Return the first of the iforms for a particular iclass.
static xed_iclass_enum_t XED_INLINE xed_iform_to_iclass(xed_iform_enum_t iform)
Return the iclass for a given iform.
Definition: xed-iform-map.h:87
xed_category_enum_t
XED_DLL_EXPORT const xed_iform_info_t * xed_iform_map(xed_iform_enum_t iform)
Map the xed_iform_enum_t to a pointer to a xed_iform_info_t which indicates the xed_iclass_enum_t, the xed_category_enum_t and the xed_extension_enum_t for the iform.
xed_category_enum_t category
Definition: xed-iform-map.h:50
struct xed_iform_info_s xed_iform_info_t
Statically available information about iforms.
xed_isa_set_enum_t isa_set
Definition: xed-iform-map.h:52
xed_extension_enum_t
XED_DLL_EXPORT xed_isa_set_enum_t xed_iform_to_isa_set(xed_iform_enum_t iform)
Return the isa_set for a given iform.
#define XED_DLL_EXPORT
XED_DLL_EXPORT char const * xed_iform_to_iclass_string_intel(xed_iform_enum_t iform)
Return a pointer to a character string of the iclass.
xed_extension_enum_t extension
Definition: xed-iform-map.h:51