]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86/Intel: debug registers are named DRn
authorJan Beulich <jbeulich@suse.com>
Tue, 14 Jul 2020 08:43:38 +0000 (10:43 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 14 Jul 2020 08:43:38 +0000 (10:43 +0200)
%db<n> is an AT&T invention; the Intel documentation and MASM have only
ever specified DRn (in line with CRn and TRn). (In principle gas also
shouldn't accept the names in Intel mode, but at least for now I've kept
things as they are. Perhaps as a first step this should just be warned
about.)

gas/ChangeLog
gas/testsuite/gas/i386/intel-intel.d
gas/testsuite/gas/i386/intel.d
gas/testsuite/gas/i386/intel.s
gas/testsuite/gas/i386/opcode-intel.d
opcodes/ChangeLog
opcodes/i386-dis.c

index 1bb4605c2e3f07d481df90143fdb80d3068e610a..581e1691d291db68d120c427676a7352dfaa84fb 100644 (file)
@@ -1,3 +1,10 @@
+2020-07-14  Jan Beulich  <jbeulich@suse.com>
+
+       * testsuite/gas/i386/intel.s: Use dr<N> instead of db<N>.
+       * testsuite/gas/i386/intel-intel.d: Disambiguate name.
+       * testsuite/gas/i386/intel.d,
+       testsuite/gas/i386/opcode-intel.d: Adjust expectations.
+
 2020-07-14  Jan Beulich  <jbeulich@suse.com>
 
        * testsuite/gas/i386/prefix.d: Adjust expectations.
index d9d9b8c75210f2fb74b9070c7c21df86665fdabc..b2663dd4574b8d7ca0614a8229f293202a7c6580 100644 (file)
@@ -260,9 +260,9 @@ Disassembly of section .text:
 [      ]*[a-f0-9]+:    0f 09 + wbinvd *
 [      ]*[a-f0-9]+:    0f 0b + ud2 *
 [      ]*[a-f0-9]+:    0f 20 d0 +      mov    eax,cr2
-[      ]*[a-f0-9]+:    0f 21 d0 +      mov    eax,db2
+[      ]*[a-f0-9]+:    0f 21 d0 +      mov    eax,dr2
 [      ]*[a-f0-9]+:    0f 22 d0 +      mov    cr2,eax
-[      ]*[a-f0-9]+:    0f 23 d0 +      mov    db2,eax
+[      ]*[a-f0-9]+:    0f 23 d0 +      mov    dr2,eax
 [      ]*[a-f0-9]+:    0f 24 d0 +      mov    eax,tr2
 [      ]*[a-f0-9]+:    0f 26 d0 +      mov    tr2,eax
 [      ]*[a-f0-9]+:    0f 30 + wrmsr *
index 309d264a09240fb091e5d6ad5335f0d854fa4c4b..c2c055121c4f38f7be0765d24072816f3051dccf 100644 (file)
@@ -1,6 +1,6 @@
 #as: -J
 #objdump: -dw
-#name: i386 intel
+#name: i386 intel (AT&T disassembly)
 #warning_output: intel.e
 
 .*: +file format .*
index 19c5eeac51592177374f52f8ca737760335a0232..70fcf1c7f6fa672ffe56d729047f15cfc329321a 100644 (file)
@@ -252,9 +252,9 @@ foo:
  wbinvd
  ud2a
  mov    eax, cr2
- mov    eax, db2
+ mov    eax, dr2
  mov    cr2, eax
- mov    db2, eax
+ mov    dr2, eax
  mov    eax, tr2
  mov    tr2, eax
  wrmsr
index 434b0e39701abd8bd29dbe470c36f5a6a93a0f25..68e1e8810e6ad300d4e948d9a95e99b603d9898d 100644 (file)
@@ -257,9 +257,9 @@ Disassembly of section .text:
  *[0-9a-f]+:   0f 09[  ]+wbinvd[       ]*
  *[0-9a-f]+:   0f 0b[  ]+ud2[  ]*
  *[0-9a-f]+:   0f 20 d0[       ]+mov[  ]+eax,cr2
- *[0-9a-f]+:   0f 21 d0[       ]+mov[  ]+eax,db2
+ *[0-9a-f]+:   0f 21 d0[       ]+mov[  ]+eax,dr2
  *[0-9a-f]+:   0f 22 d0[       ]+mov[  ]+cr2,eax
- *[0-9a-f]+:   0f 23 d0[       ]+mov[  ]+db2,eax
+ *[0-9a-f]+:   0f 23 d0[       ]+mov[  ]+dr2,eax
  *[0-9a-f]+:   0f 24 d0[       ]+mov[  ]+eax,tr2
  *[0-9a-f]+:   0f 26 d0[       ]+mov[  ]+tr2,eax
  *[0-9a-f]+:   0f 30[  ]+wrmsr[        ]*
index 4cc50874ff5edecf5ef57a3242579f84aaba9b3a..3a38bb2853fb1333d90ca94c788cfcf543251b2f 100644 (file)
@@ -1,3 +1,7 @@
+2020-07-14  Jan Beulich  <jbeulich@suse.com>
+
+       * i386-dis.c (OP_D): Print dr<N> instead of db<N> in Intel mode.
+
 2020-07-14  Jan Beulich  <jbeulich@suse.com>
 
        * i386-dis.c (OP_R, Rm): Delete.
index 9c45da2c4a10e5435fa9831be7f209513c780886..a6cc01381bee65ccbee56900afddc69b2394c1ef 100644 (file)
@@ -12787,7 +12787,7 @@ OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
   else
     add = 0;
   if (intel_syntax)
-    sprintf (scratchbuf, "db%d", modrm.reg + add);
+    sprintf (scratchbuf, "dr%d", modrm.reg + add);
   else
     sprintf (scratchbuf, "%%db%d", modrm.reg + add);
   oappend (scratchbuf);