We are migrating the bug tracker to github Issues. This is now the preferred way to report NASM bugs.

Self-registration is disabled due to spam issue (mail gorcunov@gmail.com or hpa@zytor.com to create an account)

Bug 3392664 - "mov al, byte [edx]" does not cause error when "cpu 8086" is in effect
Summary: "mov al, byte [edx]" does not cause error when "cpu 8086" is in effect
Status: OPEN
Alias: None
Product: NASM
Classification: Unclassified
Component: Assembler (show other bugs)
Version: 2.15.xx
Hardware: All All
: Low normal
Assignee: nobody
URL:
Depends on:
Blocks:
 
Reported: 2020-05-20 04:56 PDT by E. C. Masloch
Modified: 2020-05-24 17:06 PDT (History)
4 users (show)

Obtained from: Built from git using configure
Generated by: ---
Bug category:
Observed for: ---
Regression: ---
Regression since:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description E. C. Masloch 2020-05-20 04:56:27 PDT
$ cat test2.asm
cpu 8086
mov al, byte [edx]
$ nasm -v
NASM version 2.15rc0 compiled on Nov 22 2019
$ nasm test2.asm -l /dev/stderr -o test2.bin
     1                                  cpu 8086
     2 00000000 678A02                  mov al, byte [edx]
$
Comment 1 H. Peter Anvin 2020-05-24 17:06:39 PDT
Unfortunately, the CPU directives are not well implemented in NASM and need a lot more work. At this point, their main purpose is to handle the cases where it has to generate different code for different CPUs, e.g. jump-overs for long conditional jumps. It is not at all ideal, but unless someone steps up to enhance it, it is unlikely to change.