Skip to content

Commit 98e00e5

Browse files
mjcharnemarkcharney
authored andcommitted
xed_chip_features array use XED_FEATURE_VECTOR_MAX w/value 5
(cherry picked from commit 94707c03f122af7fe1125d0cd4dc7cf00dc5229c)
1 parent c6bceae commit 98e00e5

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

include/public/xed/xed-chip-features.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ END_LEGAL */
2424
#include "xed-isa-set-enum.h" /* generated */
2525
#include "xed-chip-enum.h" /* generated */
2626

27-
#define XED_FEATURE_VECTOR_MAX 4
27+
#define XED_FEATURE_VECTOR_MAX 5
2828
/// @ingroup ISASET
2929
typedef struct
3030
{

src/dec/xed-chip-features.c

+6-8
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,15 @@ xed_get_chip_features(xed_chip_features_t* p, xed_chip_enum_t chip)
2727
{
2828
if (chip < XED_CHIP_LAST)
2929
{
30-
p->f[0] = xed_chip_features[chip][0];
31-
p->f[1] = xed_chip_features[chip][1];
32-
p->f[2] = xed_chip_features[chip][2];
33-
p->f[3] = xed_chip_features[chip][3];
30+
xed_uint_t i;
31+
for(i=0;i<XED_FEATURE_VECTOR_MAX;i++)
32+
p->f[i] = xed_chip_features[chip][i];
3433
}
3534
else
3635
{
37-
p->f[0] = 0;
38-
p->f[1] = 0;
39-
p->f[2] = 0;
40-
p->f[3] = 0;
36+
xed_uint_t i;
37+
for(i=0;i<XED_FEATURE_VECTOR_MAX;i++)
38+
p->f[i] = 0;
4139
}
4240
}
4341
}

0 commit comments

Comments
 (0)