summaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-02-01 22:18:51 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-02-01 22:18:51 +0000
commitbce61846b1626cfe74f8b27d83dbc962dbe0de2e (patch)
tree9fc9f6df243249b53acb4601097d98f6f97c636a /cpu-exec.c
parent127fc407be0544a473a3a57c19adecdd6304b747 (diff)
downloadqemu-bce61846b1626cfe74f8b27d83dbc962dbe0de2e.tar.gz
qemu-bce61846b1626cfe74f8b27d83dbc962dbe0de2e.tar.bz2
qemu-bce61846b1626cfe74f8b27d83dbc962dbe0de2e.zip
reverted -translation option support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3947 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c63
1 files changed, 1 insertions, 62 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index 003d6e2545..66faf05a78 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -20,7 +20,6 @@
#include "config.h"
#include "exec.h"
#include "disas.h"
-#include <string.h>
#if !defined(CONFIG_SOFTMMU)
#undef EAX
@@ -41,9 +40,6 @@ int tb_invalidated_flag;
//#define DEBUG_EXEC
//#define DEBUG_SIGNAL
-/* translation settings */
-int translation_settings = 0;
-
#define SAVE_GLOBALS()
#define RESTORE_GLOBALS()
@@ -124,57 +120,6 @@ void cpu_resume_from_signal(CPUState *env1, void *puc)
longjmp(env->jmp_env, 1);
}
-CPUTranslationSetting cpu_translation_settings[] = {
- { CPU_SETTING_NO_CACHE, "no-cache",
- "Do not use translation blocks cache (very slow!)" },
- { 0, NULL, NULL },
-};
-
-void cpu_set_translation_settings(int translation_flags)
-{
- translation_settings = translation_flags;
-}
-
-static int cmp1(const char *s1, int n, const char *s2)
-{
- if (strlen(s2) != n)
- return 0;
- return memcmp(s1, s2, n) == 0;
-}
-
-/* takes a comma separated list of translation settings. Return 0 if error. */
-int cpu_str_to_translation_mask(const char *str)
-{
- CPUTranslationSetting *setting;
- int mask;
- const char *p, *p1;
-
- p = str;
- mask = 0;
- for(;;) {
- p1 = strchr(p, ',');
- if (!p1)
- p1 = p + strlen(p);
- if(cmp1(p,p1-p,"all")) {
- for(setting = cpu_translation_settings; setting->mask != 0; setting++) {
- mask |= setting->mask;
- }
- } else {
- for(setting = cpu_translation_settings; setting->mask != 0; setting++) {
- if (cmp1(p, p1 - p, setting->name))
- goto found;
- }
- return 0;
- }
- found:
- mask |= setting->mask;
- if (*p1 != ',')
- break;
- p = p1 + 1;
- }
- return mask;
-}
-
static TranslationBlock *tb_find_slow(target_ulong pc,
target_ulong cs_base,
uint64_t flags)
@@ -195,9 +140,6 @@ static TranslationBlock *tb_find_slow(target_ulong pc,
phys_pc = get_phys_addr_code(env, pc);
phys_page1 = phys_pc & TARGET_PAGE_MASK;
phys_page2 = -1;
- if (translation_settings & CPU_SETTING_NO_CACHE)
- goto not_found;
-
h = tb_phys_hash_func(phys_pc);
ptb1 = &tb_phys_hash[h];
for(;;) {
@@ -321,10 +263,7 @@ static inline TranslationBlock *tb_find_fast(void)
#else
#error unsupported CPU
#endif
- if (translation_settings & CPU_SETTING_NO_CACHE)
- tb = NULL;
- else
- tb = env->tb_jmp_cache[tb_jmp_cache_hash_func(pc)];
+ tb = env->tb_jmp_cache[tb_jmp_cache_hash_func(pc)];
if (__builtin_expect(!tb || tb->pc != pc || tb->cs_base != cs_base ||
tb->flags != flags, 0)) {
tb = tb_find_slow(pc, cs_base, flags);