25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: generate_tail.c,v 1.5 2005/09/18 19:54:14 debug Exp $ |
* $Id: generate_tail.c,v 1.9 2006/02/21 18:10:42 debug Exp $ |
29 |
*/ |
*/ |
30 |
|
|
31 |
#include <stdio.h> |
#include <stdio.h> |
35 |
char *uppercase(char *l) |
char *uppercase(char *l) |
36 |
{ |
{ |
37 |
static char staticbuf[1000]; |
static char staticbuf[1000]; |
38 |
int i = 0; |
size_t i = 0; |
39 |
|
|
40 |
while (*l && i < sizeof(staticbuf)) { |
while (*l && i < sizeof(staticbuf)) { |
41 |
char u = *l++; |
char u = *l++; |
75 |
printf("#include \"cpu_dyntrans.c\"\n"); |
printf("#include \"cpu_dyntrans.c\"\n"); |
76 |
printf("#undef DYNTRANS_FUNCTION_TRACE\n\n"); |
printf("#undef DYNTRANS_FUNCTION_TRACE\n\n"); |
77 |
|
|
78 |
|
printf("#ifndef MODE32\n"); |
79 |
|
printf("#define DYNTRANS_INIT_64BIT_DUMMY_TABLES " |
80 |
|
"%s_init_64bit_dummy_tables\n", a); |
81 |
|
printf("#include \"cpu_dyntrans.c\"\n"); |
82 |
|
printf("#undef DYNTRANS_INIT_64BIT_DUMMY_TABLES\n\n"); |
83 |
|
printf("#endif\n"); |
84 |
|
|
85 |
printf("#define DYNTRANS_TC_ALLOCATE_DEFAULT_PAGE " |
printf("#define DYNTRANS_TC_ALLOCATE_DEFAULT_PAGE " |
86 |
"%s_tc_allocate_default_page\n", a); |
"%s_tc_allocate_default_page\n", a); |
87 |
printf("#include \"cpu_dyntrans.c\"\n"); |
printf("#include \"cpu_dyntrans.c\"\n"); |
91 |
printf("#include \"cpu_dyntrans.c\"\n"); |
printf("#include \"cpu_dyntrans.c\"\n"); |
92 |
printf("#undef DYNTRANS_INVAL_ENTRY\n\n"); |
printf("#undef DYNTRANS_INVAL_ENTRY\n\n"); |
93 |
|
|
94 |
printf("#define DYNTRANS_INVALIDATE_TC_PADDR " |
printf("#define DYNTRANS_INVALIDATE_TC " |
95 |
"%s_invalidate_translation_caches_paddr\n", a); |
"%s_invalidate_translation_caches\n", a); |
96 |
printf("#include \"cpu_dyntrans.c\"\n"); |
printf("#include \"cpu_dyntrans.c\"\n"); |
97 |
printf("#undef DYNTRANS_INVALIDATE_TC_PADDR\n\n"); |
printf("#undef DYNTRANS_INVALIDATE_TC\n\n"); |
98 |
|
|
99 |
printf("#define DYNTRANS_INVALIDATE_TC_CODE " |
printf("#define DYNTRANS_INVALIDATE_TC_CODE " |
100 |
"%s_invalidate_code_translation\n", a); |
"%s_invalidate_code_translation\n", a); |
130 |
printf("#define MODE_uint_t uint32_t\n"); |
printf("#define MODE_uint_t uint32_t\n"); |
131 |
printf("#define MODE_int_t int32_t\n"); |
printf("#define MODE_int_t int32_t\n"); |
132 |
printf("#endif\n"); |
printf("#endif\n"); |
133 |
|
printf("#define COMBINE(n) %s_combine_ ## n\n", a); |
134 |
|
printf("#include \"quick_pc_to_pointers.h\"\n"); |
135 |
printf("#include \"cpu_%s_instr.c\"\n\n", a); |
printf("#include \"cpu_%s_instr.c\"\n\n", a); |
136 |
|
|
137 |
|
|
158 |
"%s32_invalidate_tlb_entry\n", a); |
"%s32_invalidate_tlb_entry\n", a); |
159 |
printf("#include \"cpu_dyntrans.c\"\n"); |
printf("#include \"cpu_dyntrans.c\"\n"); |
160 |
printf("#undef DYNTRANS_INVAL_ENTRY\n\n"); |
printf("#undef DYNTRANS_INVAL_ENTRY\n\n"); |
161 |
printf("#define DYNTRANS_INVALIDATE_TC_PADDR " |
printf("#define DYNTRANS_INVALIDATE_TC " |
162 |
"%s32_invalidate_translation_caches_paddr\n", a); |
"%s32_invalidate_translation_caches\n", a); |
163 |
printf("#include \"cpu_dyntrans.c\"\n"); |
printf("#include \"cpu_dyntrans.c\"\n"); |
164 |
printf("#undef DYNTRANS_INVALIDATE_TC_PADDR\n\n"); |
printf("#undef DYNTRANS_INVALIDATE_TC\n\n"); |
165 |
printf("#define DYNTRANS_INVALIDATE_TC_CODE " |
printf("#define DYNTRANS_INVALIDATE_TC_CODE " |
166 |
"%s32_invalidate_code_translation\n", a); |
"%s32_invalidate_code_translation\n", a); |
167 |
printf("#include \"cpu_dyntrans.c\"\n"); |
printf("#include \"cpu_dyntrans.c\"\n"); |
178 |
printf("#include \"cpu_dyntrans.c\"\n"); |
printf("#include \"cpu_dyntrans.c\"\n"); |
179 |
printf("#undef DYNTRANS_PC_TO_POINTERS_FUNC\n\n"); |
printf("#undef DYNTRANS_PC_TO_POINTERS_FUNC\n\n"); |
180 |
printf("#undef DYNTRANS_PC_TO_POINTERS_GENERIC\n\n"); |
printf("#undef DYNTRANS_PC_TO_POINTERS_GENERIC\n\n"); |
181 |
|
printf("#undef COMBINE\n"); |
182 |
|
printf("#define COMBINE(n) %s32_combine_ ## n\n", a); |
183 |
|
printf("#include \"quick_pc_to_pointers.h\"\n"); |
184 |
printf("#include \"cpu_%s_instr.c\"\n", a); |
printf("#include \"cpu_%s_instr.c\"\n", a); |
185 |
|
|
186 |
printf("\n#undef DYNTRANS_PC_TO_POINTERS\n" |
printf("\n#undef DYNTRANS_PC_TO_POINTERS\n" |