Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add APX ISA extension #450

Open
wants to merge 58 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
1ff1048
Add `AMX` ISA extension
flobernd Sep 12, 2023
e53326b
Decoding WiP
flobernd Sep 12, 2023
154b8da
rex2 progress
athre0z Sep 12, 2023
58ea163
APX progress
flobernd Sep 12, 2023
21726c2
APX progress
flobernd Sep 12, 2023
aef8cdf
Fix `movabs`/`jmpabs` instruction
flobernd Sep 13, 2023
2580411
APX progress
flobernd Sep 13, 2023
5c58f02
APX progress
flobernd Sep 13, 2023
e895846
APX progress
flobernd Sep 14, 2023
47d51b6
APX progress
flobernd Sep 14, 2023
0f21bbf
APX progress
flobernd Sep 28, 2023
a8c754f
Add `UD0_COMPAT` decoder mode
flobernd Jan 22, 2024
c422232
Merge remote-tracking branch 'remotes/origin/ud0-compat' into apx
flobernd Jan 22, 2024
b46eaa3
APX progress
flobernd Jan 23, 2024
d5c64bf
APX progress
flobernd Jan 23, 2024
09592fa
APX progress
flobernd Jan 25, 2024
b9e33d7
APX progress
flobernd Jan 25, 2024
0f1ad8b
APX progress
flobernd May 6, 2024
219e984
Allow 32 GPR registers with `rm` encoding
flobernd Sep 18, 2024
a272cd9
Fixed `scc` handling (#528)
mappzor Oct 16, 2024
09f2394
Temp
flobernd Oct 29, 2024
a5c5c33
Merge remote-tracking branch 'remotes/origin/master' into apx
flobernd Oct 29, 2024
7e0ec6f
Update instruction definitions
flobernd Oct 29, 2024
c105172
Add `ZYDIS_ATTRIB_HAS_EEVEX`
flobernd Oct 29, 2024
fa4db5c
Fixed MVEX tests (#529)
mappzor Oct 30, 2024
4db1608
Replace incorrect assertion
flobernd Oct 30, 2024
2031c37
Change operand size map to `force64` for `push2`/`pop2`
flobernd Oct 30, 2024
fa5240c
APX progress
flobernd Oct 30, 2024
fbf7c5c
Fix `EVEX.U` filters
flobernd Oct 30, 2024
46e87b9
Fix `EVEX.U` filters (take 2)
flobernd Oct 30, 2024
a80aa46
Move apx info
flobernd Oct 30, 2024
dce4de0
Add `uses_egpr` APX info
flobernd Oct 31, 2024
92bc5f5
Expose `dfv` in `apx` struct instead of operand
flobernd Oct 31, 2024
a89733e
Ignore `EVEX.U` filter for EVEX "legacy" instructions if APX mode is …
flobernd Oct 31, 2024
b279618
Do not trigger assertion for 0 byte (variable) memory operands
flobernd Nov 1, 2024
a5e1ccb
Mark APX AMX_TILE instructions as EEVEX
flobernd Nov 1, 2024
9ae3bfa
Minor fix
flobernd Nov 1, 2024
87c68a4
Fixed EGPR SIB.base handling (#532)
mappzor Nov 2, 2024
a13c171
Cleanup
flobernd Nov 2, 2024
7c1a34b
Wire `has_ppx` flag
flobernd Nov 2, 2024
6481300
Fix inverted condition
flobernd Nov 3, 2024
a5a6f61
APX formatter support
flobernd Nov 3, 2024
282bb95
Add missing push/pop variants
flobernd Nov 3, 2024
d8aee19
Second attempt
flobernd Nov 3, 2024
10cf4b3
Minor bugfixes
flobernd Nov 4, 2024
49a1ef4
Fix `jmpabs` prefix flags
flobernd Nov 4, 2024
21614ce
Remove hardcoded `no_rex2` condition
flobernd Nov 4, 2024
9ff14fa
Add TODO
flobernd Nov 4, 2024
544de93
Fix `rex2` filters
flobernd Nov 4, 2024
00383e0
Remove scaling of `xcrypt*` memory operands
flobernd Nov 5, 2024
0361fc0
Encoder: APX support (#533)
mappzor Nov 5, 2024
0e4a87e
Fix `vpcmp?str?` definitions
flobernd Nov 5, 2024
0848597
Regenerate encoder tables
flobernd Nov 5, 2024
58acf3c
Fix `has_egpr` flag
flobernd Nov 5, 2024
b8149e3
Fix `xsha1` and `xsha256` memory operand scaling
flobernd Nov 6, 2024
35509e1
Fixed `movdiri` (APX) and compressed disp8 handling (#536)
mappzor Nov 6, 2024
25eb33c
Fix `montmul` operand scaling
flobernd Nov 6, 2024
147a375
Removed `xsha1`/`xsha256` workaround (#537)
mappzor Nov 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
*.c eof=lf encoding=utf-8
*.py eof=lf encoding=utf-8
*.md eof=lf encoding=utf-8

*.json eof=lf encoding=utf-8
3 changes: 2 additions & 1 deletion examples/ZydisPerfTest.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ static void GenerateTestData(FILE* file, ZyanU8 encoding)
switch (encoding)
{
case 0:
b = (instruction.encoding == ZYDIS_INSTRUCTION_ENCODING_LEGACY);
b = (instruction.encoding == ZYDIS_INSTRUCTION_ENCODING_LEGACY) ||
(instruction.encoding == ZYDIS_INSTRUCTION_ENCODING_REX2);
break;
case 1:
b = (instruction.encoding == ZYDIS_INSTRUCTION_ENCODING_3DNOW);
Expand Down
17 changes: 15 additions & 2 deletions include/Zydis/Decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ typedef enum ZydisDecoderMode_
* Enables `KNC` compatibility-mode.
*
* `KNC` and `KNL+` chips are sharing opcodes and encodings for some mask-related instructions.
* Enable this mode to use the old `KNC` specifications (different mnemonics, operands, ..).
* With the EVEX extensions introduced with APX, it's impossible to distinguish between EVEX
* and MVEX at runtime.
*
* Enable this mode to enable KNC support.
*
* WARNING: This will disable decoding of all AVX-512 (EVEX) instructions.
*
* This mode is NOT enabled by default.
*/
Expand Down Expand Up @@ -153,11 +158,19 @@ typedef enum ZydisDecoderMode_
* This mode is disabled by default.
*/
ZYDIS_DECODER_MODE_UD0_COMPAT,
/**
* Enables the `APX` mode.
*
* APX introduces the `REX2` prefix, new EVEX spaces and access to additional GPRs.
*
* This mode is enabled by default.
*/
ZYDIS_DECODER_MODE_APX,

/**
* Maximum value of this enum.
*/
ZYDIS_DECODER_MODE_MAX_VALUE = ZYDIS_DECODER_MODE_UD0_COMPAT,
ZYDIS_DECODER_MODE_MAX_VALUE = ZYDIS_DECODER_MODE_APX,
/**
* The minimum number of bits required to represent all values of this enum.
*/
Expand Down
Loading
Loading