/* ----------------------------------------------------------------------- *1*2* Copyright 2008 rPath, Inc. - All Rights Reserved3*4* This file is part of the Linux kernel, and is made available under5* the terms of the GNU General Public License version 2 or (at your6* option) any later version; incorporated herein by reference.7*8* ----------------------------------------------------------------------- */910/*11* This is a host program to preprocess the CPU strings into a12* compact format suitable for the setup code.13*/1415#include <stdio.h>1617#include "../kernel/cpu/capflags.c"1819int main(void)20{21int i, j;22const char *str;2324printf("static const char x86_cap_strs[] =\n");2526for (i = 0; i < NCAPINTS; i++) {27for (j = 0; j < 32; j++) {28str = x86_cap_flags[i*32+j];2930if (i == NCAPINTS-1 && j == 31) {31/* The last entry must be unconditional; this32also consumes the compiler-added null33character */34if (!str)35str = "";36printf("\t\"\\x%02x\\x%02x\"\"%s\"\n",37i, j, str);38} else if (str) {39printf("#if REQUIRED_MASK%d & (1 << %d)\n"40"\t\"\\x%02x\\x%02x\"\"%s\\0\"\n"41"#endif\n",42i, j, i, j, str);43}44}45}46printf("\t;\n");47return 0;48}495051