From 28f463463442010dff5dce13d07962f241faf1f5 Mon Sep 17 00:00:00 2001 From: Victor van den Elzen Date: Thu, 11 Sep 2008 13:14:23 +0200 Subject: [PATCH] Remove obsolete ROL-EQU hack Now that there is proper forward reference resolution, we can get rid of this junk. Wiping the flags also removed the SBYTEnn flags, causing cmp eax, a-b a: nop b: to assemble with -Ox like cmp eax, strict dword -1 This is now fixed. --- nasm.c | 29 ----------------------------- test/_version.asm | 0 test/macro-defaults.asm | 0 3 files changed, 29 deletions(-) mode change 100755 => 100644 test/_version.asm mode change 100755 => 100644 test/macro-defaults.asm diff --git a/nasm.c b/nasm.c index 198d4bb6..8a689e45 100644 --- a/nasm.c +++ b/nasm.c @@ -1524,36 +1524,7 @@ static void assemble_file(char *fname, StrList **depend_ptr) fwinf->operand = i; } } - } else { /* passn > 1 */ - /* - * Hack to prevent phase error in the code - * rol ax,x - * x equ 1 - * - * If the second operand is a forward reference, - * the UNITY property of the number 1 in that - * operand is cancelled. Otherwise the above - * sequence will cause a phase error. - * - * This hack means that the above code will - * generate 286+ code. - * - * The forward reference will mean that the - * operand will not have the UNITY property on - * the first pass, so the pass behaviours will - * be consistent. - */ - - if (output_ins.operands >= 2 && - (output_ins.oprs[1].opflags & OPFLAG_FORWARD) && - !(IMMEDIATE & ~output_ins.oprs[1].type)) - { - /* Remove special properties bits */ - output_ins.oprs[1].type &= ~REG_SMASK; - } - } - } /* forw_ref */ diff --git a/test/_version.asm b/test/_version.asm old mode 100755 new mode 100644 diff --git a/test/macro-defaults.asm b/test/macro-defaults.asm old mode 100755 new mode 100644 -- 2.11.4.GIT