Bug fix
authorRobert Pengelly <robertapengelly@hotmail.com>
Sun, 11 May 2025 16:05:49 +0000 (17:05 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Sun, 11 May 2025 16:05:49 +0000 (17:05 +0100)
intel.c
lib.c

diff --git a/intel.c b/intel.c
index c4c7c5aa1a5f3dac49e5bf909586e40a842227b6..432792d3667116d71fc0cf08ad01d340334a5443 100644 (file)
--- a/intel.c
+++ b/intel.c
@@ -4303,9 +4303,12 @@ static int match_template (char mnemonic_suffix) {
             suffix_check.no_qsuf = 1;
             break;
         
-        case INTEL_SUFFIX:
+        default:
         
-            suffix_check.no_intelsuf = 1;
+            if (instruction.suffix == INTEL_SUFFIX) {
+                suffix_check.no_intelsuf = 1;
+            }
+            
             break;
     
     }
@@ -6214,14 +6217,14 @@ void machine_dependent_assemble_line (char *start, char *line) {
     
     operand_exprs_count = 0;
     
-    if (!(line = parse_instruction (line)) || parse_operands (start, &line)) {
+    if (!(line = parse_instruction (line))) {
         return;
     }
     
     mnemonic_suffix = instruction.suffix;
     
-    if (mnemonic_suffix != INTEL_SUFFIX) {
-        mnemonic_suffix = 0;
+    if (parse_operands (start, &line)) {
+        return;
     }
     
     /**
diff --git a/lib.c b/lib.c
index dd87125a5df8a7b04e2a730f2a035a0c503e8097..c0025ba6ac7a64f7cc33a65a1d941f97cfe5dad1 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -86,7 +86,7 @@ static void _print_usage (void) {
         fprintf (stderr, "\n");
         fprintf (stderr, "    -f FORMAT             Specify the format of object file (default elks-ia16)\n");
         fprintf (stderr, "                              Supported formats are:\n");
-        fprintf (stderr, "                                  elks-ia16, elks-i386, binary,\n");
+        fprintf (stderr, "                                  elks-ia16, elks-i386,\n");
         fprintf (stderr, "                                  win32, win64\n");
         fprintf (stderr, "    -l FILE               Print listings to file FILE.\n");
         fprintf (stderr, "    -o OBJFILE            Name the object-file output OBJFILE (default a.out).\n");