00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include "proc_properties_gen_new.h"
00043
00044 static const char * const description[]= {"\
00045 /* ====================================================================\n\
00046 * ====================================================================\n\
00047 *\n\
00048 * Description:\n\
00049 *\n\
00050 * A description of the properties (attributes) for the processors\n\
00051 * in the PROC. The description exports the following:\n\
00052 *\n\
00053 * BOOL PROC_xxx(void)\n\
00054 * Return true/false if PROCESSOR_Value has/does-not-have the\n\
00055 * property 'xxx'.\n\
00056 *\n\
00057 * ====================================================================\n\
00058 * ====================================================================\n\
00059 */", NULL};
00060
00061 void Proc_Properties_Generator(void *pknobs, GEN_MODE mode)
00062 {
00063 FILE *c_file, *h_file, *export_file;
00064 int op_index;
00065
00066 Init_Module_Files(mode, "targ_proc_properties", &c_file, &h_file, &export_file);
00067 Emit_Header(h_file, "targ_proc_properties", description);
00068 fprintf(c_file, "#include \"targ_proc_properties.h\"\n\n");
00069
00070 fprintf(h_file, "#include \"targ_proc.h\"\n\n");
00071 fprintf(c_file, "const mUINT8 PROC_PROPERTIES_flags[] = {\n");
00072 char * buf = EKAPI_ProcessName(pknobs);
00073 fprintf(c_file, " 0x%02x, /* %s: */\n", 0, buf);
00074 fprintf(c_file, " 0x00 /* UNDEFINED */\n};\n");
00075 fprintf(h_file,
00076 "extern const mUINT8 PROC_PROPERTIES_flags[];\n\n\n"
00077 "#define PROC_has_branch_delay_slot() (0)\n"
00078 "#define PROC_has_same_cycle_branch_shadow() (0)\n"
00079 "#define PROC_is_out_of_order() (0)\n"
00080 "#define PROC_is_superscalar() (1)\n"
00081 "#define PROC_has_bundles() (1)\n"
00082 "#define PROC_has_delayed_exception() (1)\n"
00083 "#define PROC_has_fast_recip() (0)\n");
00084 fprintf(export_file, "PROC_PROPERTIES_flags\n");
00085
00086 Emit_Tailer(h_file);
00087 Close_Module_Files(mode, &c_file, &h_file, &export_file);
00088 }
00089