-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[X86][3DNOW] Teach decoder about AMD 3DNow! instrs
Summary: This patch makes the decoder understand old AMD 3DNow! instructions that have never been properly supported in the X86 disassembler, despite being supported in other subsystems. Hopefully this should make the X86 decoder more complete with respect to binaries containing legacy code. Reviewers: craig.topper Reviewed By: craig.topper Subscribers: llvm-commits, maksfb, bruno Differential Revision: https://reviews.llvm.org/D43311 llvm-svn: 325295
- Loading branch information
1 parent
775c7af
commit de9ad4b
Showing
8 changed files
with
156 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| # RUN: llvm-mc --disassemble %s -triple=x86_64-unknown-linux-gnu | FileCheck %s | ||
|
|
||
| # Reference: AMD64 Architecture Programmer's Manual Vol.3 | ||
| # Pub no. 24594 - Rev. 3.25 - Dec 2017 - pgs.468-469 | ||
|
|
||
| # CHECK: pfcmpge %mm0, %mm1 | ||
| 0x0f 0x0f 0xc8 0x90 | ||
|
|
||
| # CHECK: pfcmpgt %mm2, %mm0 | ||
| 0x0f 0x0f 0xc2 0xa0 | ||
|
|
||
| # CHECK: pfcmpeq %mm5, %mm2 | ||
| 0x0f 0x0f 0xd5 0xb0 | ||
|
|
||
| # CHECK: pfmin %mm1, %mm0 | ||
| 0x0f 0x0f 0xc1 0x94 | ||
|
|
||
| # CHECK: pfmax (%rax), %mm0 | ||
| 0x0f 0x0f 0x00 0xa4 | ||
|
|
||
| # CHECK: pfmul %mm6, %mm0 | ||
| 0x0f 0x0f 0xc6 0xb4 | ||
|
|
||
| # CHECK: pfrcp (%rbx), %mm1 | ||
| 0x0f 0x0f 0x0b 0x96 | ||
|
|
||
| # CHECK: pfrcpit1 %mm0, %mm2 | ||
| 0x0f 0x0f 0xd0 0xa6 | ||
|
|
||
| # CHECK: pfrcpit2 %mm0, %mm1 | ||
| 0x0f 0x0f 0xc8 0xb6 | ||
|
|
||
| # CHECK: pfrsqrt (%eax), %mm1 | ||
| 0x67 0x0f 0x0f 0x08 0x97 | ||
|
|
||
| # CHECK: pfrsqit1 (%ebx), %mm4 | ||
| 0x67 0x0f 0x0f 0x23 0xa7 | ||
|
|
||
| # CHECK: pmulhrw %mm3, %mm0 | ||
| 0x0f 0x0f 0xc3 0xb7 | ||
|
|
||
| # CHECK: pi2fw %mm1, %mm3 | ||
| 0x0f 0x0f 0xd9 0x0c | ||
|
|
||
| # CHECK: pf2iw %mm2, %mm4 | ||
| 0x0f 0x0f 0xe2 0x1c | ||
|
|
||
| # CHECK: pi2fd %mm3, %mm1 | ||
| 0x0f 0x0f 0xcb 0x0d | ||
|
|
||
| # CHECK: pf2id (%rdi,%r8), %mm1 | ||
| 0x42 0x0f 0x0f 0x0c 0x07 0x1d | ||
|
|
||
| # CHECK: pfnacc 16(%eax,%ebx,4), %mm0 | ||
| 0x67 0x0f 0x0f 0x44 0x98 0x10 0x8a | ||
|
|
||
| # CHECK: pfsub %mm1, %mm0 | ||
| 0x0f 0x0f 0xc1 0x9a | ||
|
|
||
| # CHECK: pfsubr %mm2, %mm1 | ||
| 0x0f 0x0f 0xca 0xaa | ||
|
|
||
| # CHECK: pswapd %mm1, %mm3 | ||
| 0x0f 0x0f 0xd9 0xbb | ||
|
|
||
| # CHECK: pfpnacc %mm0, %mm2 | ||
| 0x0f 0x0f 0xd0 0x8e | ||
|
|
||
| # CHECK: pfadd %mm4, %mm3 | ||
| 0x0f 0x0f 0xdc 0x9e | ||
|
|
||
| # CHECK: pfacc %mm1, %mm2 | ||
| 0x0f 0x0f 0xd1 0xae | ||
|
|
||
| # CHECK: pavgusb %mm1, %mm3 | ||
| 0x0f 0x0f 0xd9 0xbf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters