Commit bce61846b1626cfe74f8b27d83dbc962dbe0de2e

Authored by bellard
1 parent 127fc407

reverted -translation option support


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3947 c046a42c-6fe2-441c-8c8c-71466251a162
cpu-all.h
@@ -787,20 +787,6 @@ void cpu_set_log(int log_flags); @@ -787,20 +787,6 @@ void cpu_set_log(int log_flags);
787 void cpu_set_log_filename(const char *filename); 787 void cpu_set_log_filename(const char *filename);
788 int cpu_str_to_log_mask(const char *str); 788 int cpu_str_to_log_mask(const char *str);
789 789
790 -#define CPU_SETTING_NO_CACHE (1 << 0)  
791 -  
792 -/* define translation settings */  
793 -typedef struct CPUTranslationSetting {  
794 - int mask;  
795 - const char *name;  
796 - const char *help;  
797 -} CPUTranslationSetting;  
798 -  
799 -extern CPUTranslationSetting cpu_translation_settings[];  
800 -  
801 -void cpu_set_translation_settings(int translation_flags);  
802 -int cpu_str_to_translation_mask(const char *str);  
803 -  
804 /* IO ports API */ 790 /* IO ports API */
805 791
806 /* NOTE: as these functions may be even used when there is an isa 792 /* NOTE: as these functions may be even used when there is an isa
cpu-exec.c
@@ -20,7 +20,6 @@ @@ -20,7 +20,6 @@
20 #include "config.h" 20 #include "config.h"
21 #include "exec.h" 21 #include "exec.h"
22 #include "disas.h" 22 #include "disas.h"
23 -#include <string.h>  
24 23
25 #if !defined(CONFIG_SOFTMMU) 24 #if !defined(CONFIG_SOFTMMU)
26 #undef EAX 25 #undef EAX
@@ -41,9 +40,6 @@ int tb_invalidated_flag; @@ -41,9 +40,6 @@ int tb_invalidated_flag;
41 //#define DEBUG_EXEC 40 //#define DEBUG_EXEC
42 //#define DEBUG_SIGNAL 41 //#define DEBUG_SIGNAL
43 42
44 -/* translation settings */  
45 -int translation_settings = 0;  
46 -  
47 #define SAVE_GLOBALS() 43 #define SAVE_GLOBALS()
48 #define RESTORE_GLOBALS() 44 #define RESTORE_GLOBALS()
49 45
@@ -124,57 +120,6 @@ void cpu_resume_from_signal(CPUState *env1, void *puc) @@ -124,57 +120,6 @@ void cpu_resume_from_signal(CPUState *env1, void *puc)
124 longjmp(env->jmp_env, 1); 120 longjmp(env->jmp_env, 1);
125 } 121 }
126 122
127 -CPUTranslationSetting cpu_translation_settings[] = {  
128 - { CPU_SETTING_NO_CACHE, "no-cache",  
129 - "Do not use translation blocks cache (very slow!)" },  
130 - { 0, NULL, NULL },  
131 -};  
132 -  
133 -void cpu_set_translation_settings(int translation_flags)  
134 -{  
135 - translation_settings = translation_flags;  
136 -}  
137 -  
138 -static int cmp1(const char *s1, int n, const char *s2)  
139 -{  
140 - if (strlen(s2) != n)  
141 - return 0;  
142 - return memcmp(s1, s2, n) == 0;  
143 -}  
144 -  
145 -/* takes a comma separated list of translation settings. Return 0 if error. */  
146 -int cpu_str_to_translation_mask(const char *str)  
147 -{  
148 - CPUTranslationSetting *setting;  
149 - int mask;  
150 - const char *p, *p1;  
151 -  
152 - p = str;  
153 - mask = 0;  
154 - for(;;) {  
155 - p1 = strchr(p, ',');  
156 - if (!p1)  
157 - p1 = p + strlen(p);  
158 - if(cmp1(p,p1-p,"all")) {  
159 - for(setting = cpu_translation_settings; setting->mask != 0; setting++) {  
160 - mask |= setting->mask;  
161 - }  
162 - } else {  
163 - for(setting = cpu_translation_settings; setting->mask != 0; setting++) {  
164 - if (cmp1(p, p1 - p, setting->name))  
165 - goto found;  
166 - }  
167 - return 0;  
168 - }  
169 - found:  
170 - mask |= setting->mask;  
171 - if (*p1 != ',')  
172 - break;  
173 - p = p1 + 1;  
174 - }  
175 - return mask;  
176 -}  
177 -  
178 static TranslationBlock *tb_find_slow(target_ulong pc, 123 static TranslationBlock *tb_find_slow(target_ulong pc,
179 target_ulong cs_base, 124 target_ulong cs_base,
180 uint64_t flags) 125 uint64_t flags)
@@ -195,9 +140,6 @@ static TranslationBlock *tb_find_slow(target_ulong pc, @@ -195,9 +140,6 @@ static TranslationBlock *tb_find_slow(target_ulong pc,
195 phys_pc = get_phys_addr_code(env, pc); 140 phys_pc = get_phys_addr_code(env, pc);
196 phys_page1 = phys_pc & TARGET_PAGE_MASK; 141 phys_page1 = phys_pc & TARGET_PAGE_MASK;
197 phys_page2 = -1; 142 phys_page2 = -1;
198 - if (translation_settings & CPU_SETTING_NO_CACHE)  
199 - goto not_found;  
200 -  
201 h = tb_phys_hash_func(phys_pc); 143 h = tb_phys_hash_func(phys_pc);
202 ptb1 = &tb_phys_hash[h]; 144 ptb1 = &tb_phys_hash[h];
203 for(;;) { 145 for(;;) {
@@ -321,10 +263,7 @@ static inline TranslationBlock *tb_find_fast(void) @@ -321,10 +263,7 @@ static inline TranslationBlock *tb_find_fast(void)
321 #else 263 #else
322 #error unsupported CPU 264 #error unsupported CPU
323 #endif 265 #endif
324 - if (translation_settings & CPU_SETTING_NO_CACHE)  
325 - tb = NULL;  
326 - else  
327 - tb = env->tb_jmp_cache[tb_jmp_cache_hash_func(pc)]; 266 + tb = env->tb_jmp_cache[tb_jmp_cache_hash_func(pc)];
328 if (__builtin_expect(!tb || tb->pc != pc || tb->cs_base != cs_base || 267 if (__builtin_expect(!tb || tb->pc != pc || tb->cs_base != cs_base ||
329 tb->flags != flags, 0)) { 268 tb->flags != flags, 0)) {
330 tb = tb_find_slow(pc, cs_base, flags); 269 tb = tb_find_slow(pc, cs_base, flags);
qemu-doc.texi
@@ -363,17 +363,6 @@ Set the initial date of the real time clock. Valid format for @@ -363,17 +363,6 @@ Set the initial date of the real time clock. Valid format for
363 @var{date} are: @code{now} or @code{2006-06-17T16:01:21} or 363 @var{date} are: @code{now} or @code{2006-06-17T16:01:21} or
364 @code{2006-06-17}. The default value is @code{now}. 364 @code{2006-06-17}. The default value is @code{now}.
365 365
366 -@item -translation @var{setting1[,...]}  
367 -Select dynamic translation options @var{setting}, @code{-translation ?}  
368 -shows a list of settings. Valid settings are:  
369 -  
370 -@table @code  
371 -@item @var{no-cache}  
372 -This option disables caching of translated code. Is useful for low-level  
373 -debugging of the emulated environment. This option incurs a massive  
374 -slow-down in emulation speed.  
375 -@end table  
376 -  
377 @item -pidfile @var{file} 366 @item -pidfile @var{file}
378 Store the QEMU process PID in @var{file}. It is useful if you launch QEMU 367 Store the QEMU process PID in @var{file}. It is useful if you launch QEMU
379 from a script. 368 from a script.
@@ -240,8 +240,6 @@ static CPUState *cur_cpu; @@ -240,8 +240,6 @@ static CPUState *cur_cpu;
240 static CPUState *next_cpu; 240 static CPUState *next_cpu;
241 static int event_pending = 1; 241 static int event_pending = 1;
242 242
243 -extern char *logfilename;  
244 -  
245 #define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR) 243 #define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR)
246 244
247 /***********************************************************/ 245 /***********************************************************/
@@ -7663,9 +7661,7 @@ static void help(int exitcode) @@ -7663,9 +7661,7 @@ static void help(int exitcode)
7663 #endif 7661 #endif
7664 "-clock force the use of the given methods for timer alarm.\n" 7662 "-clock force the use of the given methods for timer alarm.\n"
7665 " To see what timers are available use -clock help\n" 7663 " To see what timers are available use -clock help\n"
7666 - "-startdate select initial date of the Qemu clock\n"  
7667 - "-translation setting1,... configures code translation\n"  
7668 - " (use -translation ? for a list of settings)\n" 7664 + "-startdate select initial date of the clock\n"
7669 "\n" 7665 "\n"
7670 "During emulation, the following keys are useful:\n" 7666 "During emulation, the following keys are useful:\n"
7671 "ctrl-alt-f toggle full screen\n" 7667 "ctrl-alt-f toggle full screen\n"
@@ -7681,7 +7677,7 @@ static void help(int exitcode) @@ -7681,7 +7677,7 @@ static void help(int exitcode)
7681 DEFAULT_NETWORK_DOWN_SCRIPT, 7677 DEFAULT_NETWORK_DOWN_SCRIPT,
7682 #endif 7678 #endif
7683 DEFAULT_GDBSTUB_PORT, 7679 DEFAULT_GDBSTUB_PORT,
7684 - logfilename); 7680 + "/tmp/qemu.log");
7685 exit(exitcode); 7681 exit(exitcode);
7686 } 7682 }
7687 7683
@@ -7768,7 +7764,6 @@ enum { @@ -7768,7 +7764,6 @@ enum {
7768 QEMU_OPTION_old_param, 7764 QEMU_OPTION_old_param,
7769 QEMU_OPTION_clock, 7765 QEMU_OPTION_clock,
7770 QEMU_OPTION_startdate, 7766 QEMU_OPTION_startdate,
7771 - QEMU_OPTION_translation,  
7772 }; 7767 };
7773 7768
7774 typedef struct QEMUOption { 7769 typedef struct QEMUOption {
@@ -7877,7 +7872,6 @@ const QEMUOption qemu_options[] = { @@ -7877,7 +7872,6 @@ const QEMUOption qemu_options[] = {
7877 #endif 7872 #endif
7878 { "clock", HAS_ARG, QEMU_OPTION_clock }, 7873 { "clock", HAS_ARG, QEMU_OPTION_clock },
7879 { "startdate", HAS_ARG, QEMU_OPTION_startdate }, 7874 { "startdate", HAS_ARG, QEMU_OPTION_startdate },
7880 - { "translation", HAS_ARG, QEMU_OPTION_translation },  
7881 { NULL }, 7875 { NULL },
7882 }; 7876 };
7883 7877
@@ -8720,22 +8714,6 @@ int main(int argc, char **argv) @@ -8720,22 +8714,6 @@ int main(int argc, char **argv)
8720 } 8714 }
8721 } 8715 }
8722 break; 8716 break;
8723 - case QEMU_OPTION_translation:  
8724 - {  
8725 - int mask;  
8726 - CPUTranslationSetting *setting;  
8727 -  
8728 - mask = cpu_str_to_translation_mask(optarg);  
8729 - if (!mask) {  
8730 - printf("Translation settings (comma separated):\n");  
8731 - for(setting = cpu_translation_settings; setting->mask != 0; setting++) {  
8732 - printf("%-10s %s\n", setting->name, setting->help);  
8733 - }  
8734 - exit(1);  
8735 - }  
8736 - cpu_set_translation_settings(mask);  
8737 - }  
8738 - break;  
8739 } 8717 }
8740 } 8718 }
8741 } 8719 }