D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22664 - Disassembler mistakes rdtscp for invlpg ECX
Summary: Disassembler mistakes rdtscp for invlpg ECX
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 normal
Assignee: No Owner
URL:
Keywords: disassembler, pull
Depends on:
Blocks:
 
Reported: 2022-01-11 00:11 UTC by mhh
Modified: 2022-05-21 06:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description mhh 2022-01-11 00:11:31 UTC
dmd vasm gives 

```
simpleLoop:
0000:   0F 01 F9                invlpg  ECX
```

GNU objdump gives

```
0000000000000000 <simpleLoop>:
   0:   0f 01 f9                rdtscp 
        ...
```

Note that this is the wrong type of operand for invlpg too (should be an mm64), luckily however when the instruction is decoded as a true positive (i.e. the source bytes really are a invlpg) the correct operand is given.
Comment 1 Dlang Bot 2022-05-21 00:53:55 UTC
@maxhaton created dlang/dmd pull request #14153 "Fix Issue 22664 - -vasm doesn't recognize rdtscp" fixing this issue:

- Fix Issue 22664 - -vasm doesn't recognize rdtscp

https://github.com/dlang/dmd/pull/14153
Comment 2 Dlang Bot 2022-05-21 06:50:30 UTC
dlang/dmd pull request #14153 "Fix Issue 22664 - -vasm doesn't recognize rdtscp" was merged into master:

- fa2baf85c86e02834836982d14eadf52cd4bf0b7 by mhh:
  Fix Issue 22664 - -vasm doesn't recognize rdtscp

https://github.com/dlang/dmd/pull/14153