[Nasm-bugs] [Bug 3392674] New: ud1 and ud2b with reg, rm operands can't be assembled because `reg` has no size

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Mon Jun 1 12:35:11 PDT 2020


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

            Bug ID: 3392674
           Summary: ud1 and ud2b with reg,rm operands can't be assembled
                    because `reg` has no size
           Product: NASM
           Version: 2.15 (development)
          Hardware: All
                OS: All
            Status: OPEN
          Severity: normal
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: fasdfqwer at mail.com
                CC: chang.seok.bae at intel.com, gorcunov at gmail.com,
                    hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: Build from source archive using configure

It's not possible to assemble the following instructions

```asm
ud1 cx,dx
ud1 ecx,edx
ud1 rcx,rdx

ud2b cx,dx
ud2b ecx,edx
ud2b rcx,rdx
```

The error is `error: mismatch in operand sizes`

Defs in `x86/insns.dat`. Note the differences between ud0 and ud1. ud0's first
operand is eg. `reg16` but ud1's first operand is just `reg`:

```
UD0             void                            [       0f ff]                 
                186,OBSOLETE
UD0             reg16,rm16                      [rm:    o16 0f ff /r]          
                186
UD0             reg32,rm32                      [rm:    o32 0f ff /r]          
                186
UD0             reg64,rm64                      [rm:    o64 0f ff /r]          
                186
UD1             reg,rm16                        [rm:    o16 0f b9 /r]          
                186
UD1             reg,rm32                        [rm:    o32 0f b9 /r]          
                186
UD1             reg,rm64                        [rm:    o64 0f b9 /r]          
                186
UD1             void                            [       0f b9]                 
                186,ND
UD2B            void                            [       0f b9]                 
                186,ND
UD2B            reg,rm16                        [rm:    o16 0f b9 /r]          
                186,ND
UD2B            reg,rm32                        [rm:    o32 0f b9 /r]          
                186,ND
UD2B            reg,rm64                        [rm:    o64 0f b9 /r]          
                186,ND
UD2             void                            [       0f 0b]                 
                186
UD2A            void                            [       0f 0b]                 
                186,ND
```

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


More information about the Nasm-bugs mailing list