Possible bug fixes
authorRobert Pengelly <robertapengelly@hotmail.com>
Sat, 26 Oct 2024 11:57:10 +0000 (12:57 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Sat, 26 Oct 2024 11:57:10 +0000 (12:57 +0100)
intel.c

diff --git a/intel.c b/intel.c
index 45b6a6e9a6f2ee1bbb055df179fb422cefa4dbca..62d4d5a5e36729ab3808a636f0c039d26346c358 100644 (file)
--- a/intel.c
+++ b/intel.c
@@ -2267,7 +2267,7 @@ static int intel_parse_operand (char *start, char *operand_string) {
                         instruction.disp_operands = 0;
                         
                         instruction.operands = 2;
-                        instruction.types[0] &= ~ANY_MEM;
+                        instruction.types[0] &= ~DISP;
                         
                         return 0;
                     
@@ -2357,9 +2357,9 @@ static int intel_parse_operand (char *start, char *operand_string) {
             }
             
             if (reg_table[expr->add_number].number == REG_FLAT_NUMBER) {
-                instruction.segments[instruction.operands] = 0;
+                instruction.segments[instruction.mem_operands] = 0;
             } else {
-                instruction.segments[instruction.operands] = &reg_table[expr->add_number];
+                instruction.segments[instruction.mem_operands] = &reg_table[expr->add_number];
             }
         
         }
@@ -4208,6 +4208,10 @@ enum expr_type machine_dependent_parse_operator (char **pp, char *name, char *or
 
     unsigned int i;
     
+    if (!intel_syntax) {
+        return EXPR_TYPE_ABSENT;
+    }
+    
     if (!name) {
     
         if (operands != 2) {
@@ -4289,6 +4293,10 @@ struct section *machine_dependent_simplified_expression_read_into (char *start,
     struct section *ret_section;
     int ret;
     
+    if (!intel_syntax) {
+        return expression_read_into (start, pp, expr);
+    }
+    
     memset (&intel_state, 0, sizeof (intel_state));
     intel_state.operand_modifier = EXPR_TYPE_ABSENT;