bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/26305] New: {disp32} doesn't work with (%ebp) nor 16-bit mode


From: hjl.tools at gmail dot com
Subject: [Bug gas/26305] New: {disp32} doesn't work with (%ebp) nor 16-bit mode
Date: Mon, 27 Jul 2020 21:57:21 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=26305

            Bug ID: 26305
           Summary: {disp32} doesn't work with (%ebp) nor 16-bit mode
           Product: binutils
           Version: 2.35
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---
            Target: i386,x86-64

[hjl@gnu-cfl-2 testsuite]$ cat x.s 
addl $1, (%ebp)
{disp32} addl $1, (%ebp)
[hjl@gnu-cfl-2 testsuite]$ gcc -c -m32 x.s
[hjl@gnu-cfl-2 testsuite]$ objdump -dw x.o

x.o:     file format elf32-i386


Disassembly of section .text:

00000000 <.text>:
   0:   83 45 00 01             addl   $0x1,0x0(%ebp)
   4:   83 45 00 01             addl   $0x1,0x0(%ebp)
[hjl@gnu-cfl-2 testsuite]$ cat z.s 
        .code32
addb $1, (%bx)
{disp32} addb $1, (%bx)
addb $1, (%bp)
{disp32} addb $1, (%bp)
[hjl@gnu-cfl-2 testsuite]$ gcc -c -m32 z.s
[hjl@gnu-cfl-2 testsuite]$ objdump -dw z.o

z.o:     file format elf32-i386


Disassembly of section .text:

00000000 <.text>:
   0:   67 80 07 01             addb   $0x1,(%bx)
   4:   67 80 07 01             addb   $0x1,(%bx)
   8:   67 80 46 00 01          addb   $0x1,0x0(%bp)
   d:   67 80 46 00 01          addb   $0x1,0x0(%bp)
[hjl@gnu-cfl-2 testsuite]$ 

The problem are

1. (%ebp) is encoded as 0(%ebp) and 0 is always encoded with disp8.
2. {%disp32} is ignored in 16-bit mode.

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]