Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Debugger/CPU    [ Add a report in this area ]  
Report #:  80157   Status: Open
Order of registers switched in disassembly of POPCNT instruction
Project:  Delphi Build #:  14.0.3593.25826
Version:    14.0 Submitted By:   Philipp S
Report Type:  Basic functionality failure Date Reported:  12/8/2009 10:22:28 AM
Severity:    Infrequently encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   273962
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
The order of register operands of POPCNT instructions is displayed wrongly in CPU view/disassembly.

For example,

popcnt eax, ecx
is shown as "popcnt ecx, eax" in disassembly

Reference:
Intel? 64 and IA-32 Architectures
Software Developer? Manual
Volume 2B:
Instruction Set Reference, N-Z

Steps to Reproduce:
Place the following code in a project, put a breakpoint on "ret" and compare disassembly with the actual instructions.

procedure POPCNT_DebuggerBugs;
asm
      ret //popcnt is not present on all CPUs so better not execute the following code
      POPCNT eax, ecx
      //Disassembly: F30FB8C1 popcnt ecx, eax
      //Disassembly of corresponding instruction in Visual Studio 2008:  F3 0F B8 C1      popcnt      eax,ecx
      popcnt edx, ecx
      //Disassembly: F30FB8D1 popcnt ecx, edx
      popcnt edx, eax
      //Disassembly: F30FB8D0 popcnt eax, edx
      popcnt ecx, eax
      //Disassembly: F30FB8C8 popcnt eax,ecx
end;
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01