From f2201a0116304c8fd512ac9ef61ae842a18726be Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Sat, 8 Jun 2024 22:38:39 +0100 Subject: [PATCH] Bug fixes --- intel.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/intel.c b/intel.c index c7d153e..c62edb7 100644 --- a/intel.c +++ b/intel.c @@ -1005,6 +1005,12 @@ static void machine_dependent_set_march (const char *optarg) { } free (orig_arg); + + if ((cpu_arch_flags & CPU_386)) { + bits = 32; + } else if ((cpu_arch_flags & CPU_8086)) { + bits = 16; + } } @@ -2294,7 +2300,7 @@ static int intel_process_register_expr (struct expr *expr) { } else if (!intel_state.index_reg) { intel_state.index_reg = reg_table + reg_num; } else { - intel_state.index_reg = 0; + intel_state.index_reg = reg_esp; } return 2; @@ -2419,7 +2425,7 @@ static int intel_simplify_expr (struct expr *expr) { default: - intel_state.index_reg = 0; + intel_state.index_reg = reg_esp; break; } -- 2.34.1