[Nasm-bugs] [Bug 3392553] Write source for AND but NASM produces ADD

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Tue Feb 5 02:51:57 PST 2019


https://bugzilla.nasm.us/show_bug.cgi?id=3392553

--- Comment #5 from C. Masloch <pushbx at 38.de> ---
> NASM correctly says "no instruction for this cpu level", because that's a 386 instruction. So I know it's checking instructions for the processor level.

It's a 186+ instruction actually.

> with optimization turned off (-O0) it gives the expected 8086 instruction, but with optimization turned on (-Ox) it gives the 386 instruction. So the assembler honors the CPU 8086 directive, but the optimizer does not.

As hpa wrote, and as specified in the NASM instruction reference, the word form
(16-bit destination) of the byte-immediate AND is an 8086 instruction:

 AND r/m16,imm8                ; o16 83 /4 ib         [8086]

-- 
You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.


More information about the Nasm-bugs mailing list