1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#include <stdio.h>
17
18#include "../include/asm/required-features.h"
19#include "../include/asm/disabled-features.h"
20#include "../include/asm/cpufeatures.h"
21#include "../kernel/cpu/capflags.c"
22
23int main(void)
24{
25 int i, j;
26 const char *str;
27
28 printf("static const char x86_cap_strs[] =\n");
29
30 for (i = 0; i < NCAPINTS; i++) {
31 for (j = 0; j < 32; j++) {
32 str = x86_cap_flags[i*32+j];
33
34 if (i == NCAPINTS-1 && j == 31) {
35
36
37
38 if (!str)
39 str = "";
40 printf("\t\"\\x%02x\\x%02x\"\"%s\"\n",
41 i, j, str);
42 } else if (str) {
43 printf("#if REQUIRED_MASK%d & (1 << %d)\n"
44 "\t\"\\x%02x\\x%02x\"\"%s\\0\"\n"
45 "#endif\n",
46 i, j, i, j, str);
47 }
48 }
49 }
50 printf("\t;\n");
51 return 0;
52}
53