Skip to content

Commit 1bdc793

Browse files
sdeadminmarjevan
andauthored
External Release v2025.03.02
The release updates XED according to Intel's latest ISA publications, including AVX10.2 (Revision 3.0) and APX (Revision 6.0) architecture specifications. This release also introduces major enhancements to the decoder control APIs. ISA Updates - Added new APX instructions that promote the Diamond Rapids ISA. - Added support for AVX10.2 mnemonic renames. - Improved definitions for Intel SDM-recommended multi-byte NOPs (See #340). - Fixed ISA-SET discrepancy for FISTTP. - Corrected element types for VCVTQQ2PD and VGET{MANT,EXP}PBF16 instructions. - Refined TSX ISA definition for accurate disassembly representation. - Dropped compatibility mode SYSCALL per Intel's latest FRED specification. - Added missing `PROTECTED_MODE` and `NOP` XED attributes for existing ISA. ----- General - Python APIs: The `_py` binding APIs are now autogenerated during the build for an accurate representation of the chosen build kit. For more information, check the `xed\pyext\examples\README.md` file. - Python APIs example: Enhancements for the CFFI example and XedPy class. - Updated the XED build to support Clang versions 17 and 18. - Improved XED examples documentation and source-code comments. - Simplified the encode request for AVX10/256VL Embedded Rounding Control instructions by setting only the `ROUNDC` XED operand. ----- Fixes - Fixed UBSan errors (closes #339). - Fixed Sierra-Forest and other chip-excluded builds using the `--no-{chip}` build knobs (fixes #343). - Corrected SIB segment mapping for the R21 register (fixes #340). - Internal improvements and code cleanup (fixes #340). ----- Decoder - Added REAL-mode legality checks (`INVALID_MODE` error for illegal instructions). - Disassembler: Added support for Intel's recommended APX assembly syntax for NF (No Flags) and DFV (Default Flags Values) instructions. - Enhanced APIs for APX/DFV instructions to ensure simplicity and efficiency. See the API reference page and the `xed-ex1.c` example for more details. ----- API Improvements for Decoder ISA Control The XED decoder control APIs now fully support the `xed_chip_features_t` structure, offering greater flexibility and control compared to the `xed_chip_enum_t` concept, enabling users to customize feature sets with precision. - Improved the `xed_chip_features_t` APIs to provide fine-grained control over ISA initialization. This approach is now recommended over the raw `xed3_operand_set_*` APIs. - Introduced a new API, `xed_set_decoder_modes()`, which allows explicit initialization of decoder modes with improved performance through one-time decoder ISA initialization. Backward Compatibility - Backward compatibility for existing APIs is maintained. - Backward compatibility for decoder initialization of several ISA features has been deprecated. Previously default-on features like `P4` (PAUSE), `LZCNT` (replacing BSR), and `TZCNT` (replacing BSF) are now disabled by default unless explicitly enabled by users through the raw XED setter APIs or the chip/chip-features APIs. Decoder PREFETCH as NOP - New Capability - Based on decoder ISA initialization, the XED decoder now returns NOPs instead of PREFETCH instructions when PREFETCH is not supported by the chip/features. Previously, PREFETCH instructions were returned as illegal if they were unsupported by the XED chip Usage Example - For detailed usage guidance, refer to the XED `xed-ex4.c` example tool, which includes decoder initialization recommendations for dual-encoding ISA. Co-authored-by: marjevan <marjevan@users.noreply.github.com>
1 parent d4d5020 commit 1bdc793

File tree

184 files changed

+7457
-9805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+7457
-9805
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2024.11.04
1+
v2025.03.02

datafiles/amd/xed-amd-base.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#BEGIN_LEGAL
22
#
3-
#Copyright (c) 2023 Intel Corporation
3+
#Copyright (c) 2024 Intel Corporation
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -18,10 +18,10 @@
1818
# file: xed-amd-base.txt
1919

2020
INSTRUCTIONS()::
21-
# SYSRET is supported in 32b mode only on AMD chips
21+
# SYSCALL and SYSRET are supported in 32b mode only on AMD chips
22+
2223
{
2324
ICLASS : SYSCALL_AMD
24-
UNAME : AMDSYSCALL32
2525
DISASM : syscall
2626
CPL : 3
2727
CATEGORY : SYSCALL

datafiles/amx-dmr/amx-dmr-isa.xed.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ IFORM: TCVTROWD2PS_ZMMf32_TMMu32_IMM8
5757
}
5858

5959

60-
# EMITTING TCVTROWPS2PBF16H (TCVTROWPS2PBF16H-512-1)
60+
# EMITTING TCVTROWPS2BF16H (TCVTROWPS2BF16H-512-1)
6161
{
62-
ICLASS: TCVTROWPS2PBF16H
62+
ICLASS: TCVTROWPS2BF16H
6363
CPL: 3
6464
CATEGORY: AMX_TILE
6565
EXTENSION: AMX_TILE
@@ -69,13 +69,13 @@ REAL_OPCODE: Y
6969
ATTRIBUTES: NOTSX
7070
PATTERN: EVV 0x6D VF2 V0F38 MOD[0b11] MOD=3 BCRC=0 UBIT=1 REG[rrr] RM[nnn] W0 VL512 mode64 ZEROING=0 MASK=0
7171
OPERANDS: REG0=ZMM_R3():w:zbf16 REG1=TMM_B3():r:tv:f32 REG2=GPR32_N():r:d:u32
72-
IFORM: TCVTROWPS2PBF16H_ZMMbf16_TMMf32_GPR32u32
72+
IFORM: TCVTROWPS2BF16H_ZMMbf16_TMMf32_GPR32u32
7373
}
7474

7575

76-
# EMITTING TCVTROWPS2PBF16H (TCVTROWPS2PBF16H-512-2)
76+
# EMITTING TCVTROWPS2BF16H (TCVTROWPS2BF16H-512-2)
7777
{
78-
ICLASS: TCVTROWPS2PBF16H
78+
ICLASS: TCVTROWPS2BF16H
7979
CPL: 3
8080
CATEGORY: AMX_TILE
8181
EXTENSION: AMX_TILE
@@ -85,13 +85,13 @@ REAL_OPCODE: Y
8585
ATTRIBUTES: NOTSX
8686
PATTERN: EVV 0x07 VF2 V0F3A MOD[0b11] MOD=3 BCRC=0 UBIT=1 REG[rrr] RM[nnn] W0 VL512 mode64 NOEVSR ZEROING=0 MASK=0 UIMM8()
8787
OPERANDS: REG0=ZMM_R3():w:zbf16 REG1=TMM_B3():r:tv:f32 IMM0:r:b
88-
IFORM: TCVTROWPS2PBF16H_ZMMbf16_TMMf32_IMM8
88+
IFORM: TCVTROWPS2BF16H_ZMMbf16_TMMf32_IMM8
8989
}
9090

9191

92-
# EMITTING TCVTROWPS2PBF16L (TCVTROWPS2PBF16L-512-1)
92+
# EMITTING TCVTROWPS2BF16L (TCVTROWPS2BF16L-512-1)
9393
{
94-
ICLASS: TCVTROWPS2PBF16L
94+
ICLASS: TCVTROWPS2BF16L
9595
CPL: 3
9696
CATEGORY: AMX_TILE
9797
EXTENSION: AMX_TILE
@@ -101,13 +101,13 @@ REAL_OPCODE: Y
101101
ATTRIBUTES: NOTSX
102102
PATTERN: EVV 0x6D VF3 V0F38 MOD[0b11] MOD=3 BCRC=0 UBIT=1 REG[rrr] RM[nnn] W0 VL512 mode64 ZEROING=0 MASK=0
103103
OPERANDS: REG0=ZMM_R3():w:zbf16 REG1=TMM_B3():r:tv:f32 REG2=GPR32_N():r:d:u32
104-
IFORM: TCVTROWPS2PBF16L_ZMMbf16_TMMf32_GPR32u32
104+
IFORM: TCVTROWPS2BF16L_ZMMbf16_TMMf32_GPR32u32
105105
}
106106

107107

108-
# EMITTING TCVTROWPS2PBF16L (TCVTROWPS2PBF16L-512-2)
108+
# EMITTING TCVTROWPS2BF16L (TCVTROWPS2BF16L-512-2)
109109
{
110-
ICLASS: TCVTROWPS2PBF16L
110+
ICLASS: TCVTROWPS2BF16L
111111
CPL: 3
112112
CATEGORY: AMX_TILE
113113
EXTENSION: AMX_TILE
@@ -117,7 +117,7 @@ REAL_OPCODE: Y
117117
ATTRIBUTES: NOTSX
118118
PATTERN: EVV 0x77 VF3 V0F3A MOD[0b11] MOD=3 BCRC=0 UBIT=1 REG[rrr] RM[nnn] W0 VL512 mode64 NOEVSR ZEROING=0 MASK=0 UIMM8()
119119
OPERANDS: REG0=ZMM_R3():w:zbf16 REG1=TMM_B3():r:tv:f32 IMM0:r:b
120-
IFORM: TCVTROWPS2PBF16L_ZMMbf16_TMMf32_IMM8
120+
IFORM: TCVTROWPS2BF16L_ZMMbf16_TMMf32_IMM8
121121
}
122122

123123

datafiles/apx-f/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ Encode request for promoted No-Flags instruction should be built with the `NF` o
2121
$ xed.exe -set NF 1 ....
2222
```
2323

24-
## CCMPcc/CTESTcc (Encode/Decode)
25-
The official Intel&reg; APX assembly syntax is not supported yet.
26-
Current syntax is: `<MNEMONIC> <reg/mem>, <reg/mem/imm>, <dfv>`
24+
## CCMPcc/CTESTcc (XED CLI Encoder)
25+
Intel&reg; XED CLI encode request syntax: `xed -64 -set DFV <int> -e <MNEMONIC> <reg/mem>, <reg/mem/imm>`
2726

2827
## IMUL/SETcc Zero-Upper variants (Encoder)
2928
No encoder support for zero-upper selection

datafiles/apx-f/apx-evex-dec.txt

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#BEGIN_LEGAL
22
#
3-
#Copyright (c) 2023 Intel Corporation
3+
#Copyright (c) 2025 Intel Corporation
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -43,6 +43,28 @@ EVAPX()::
4343
NO_APX=0 NF=1 MASK=4 | EVEX_APX MASK=0 SCC=0 BCRC=0
4444
# Default: otherwise | error
4545

46+
DFV_PARSER()::
47+
# The DFV xed-operand is an integer representation for default flags values - (OF, SF, ZF, CF).
48+
# For example: DFV=10 == 0b1010 -> OF=1, SF=0, ZF=1, CF=0
49+
VEXDEST3=0 VEXDEST210=0 | DFV=0
50+
VEXDEST3=0 VEXDEST210=1 | DFV=1
51+
VEXDEST3=0 VEXDEST210=2 | DFV=2
52+
VEXDEST3=0 VEXDEST210=3 | DFV=3
53+
VEXDEST3=0 VEXDEST210=4 | DFV=4
54+
VEXDEST3=0 VEXDEST210=5 | DFV=5
55+
VEXDEST3=0 VEXDEST210=6 | DFV=6
56+
VEXDEST3=0 VEXDEST210=7 | DFV=7
57+
58+
VEXDEST3=1 VEXDEST210=0 | DFV=8
59+
VEXDEST3=1 VEXDEST210=1 | DFV=9
60+
VEXDEST3=1 VEXDEST210=2 | DFV=10
61+
VEXDEST3=1 VEXDEST210=3 | DFV=11
62+
VEXDEST3=1 VEXDEST210=4 | DFV=12
63+
VEXDEST3=1 VEXDEST210=5 | DFV=13
64+
VEXDEST3=1 VEXDEST210=6 | DFV=14
65+
VEXDEST3=1 VEXDEST210=7 | DFV=15
66+
4667
EVAPX_SCC()::
47-
# Clear Legacy reinterpreted bits by the SCC field and set EVEX sub-encoding space
48-
true | EVEX_APX_SCC MASK=0 VEXDEST4=0 NF=0 BCRC=0
68+
# - Clear Legacy reinterpreted bits by the SCC field and set EVEX sub-encoding space
69+
# - Set the DFV operand value
70+
true DFV_PARSER() | EVEX_APX_SCC MASK=0 VEXDEST4=0 NF=0 BCRC=0

datafiles/apx-f/apx-evex-enc.txt

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#BEGIN_LEGAL
22
#
3-
#Copyright (c) 2023 Intel Corporation
3+
#Copyright (c) 2025 Intel Corporation
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -97,23 +97,22 @@ EVAPX()::
9797
true -> EVEX_APX
9898

9999
EVAPX_SCC()::
100-
# SSC reinterprets the original EVEX encoding bits (VEXDEST4(V4) and MASK(aaaa)).
101-
# Note the ILD store the inverted VEXDEST4 value, just like the encoded bit.
102-
# -> SCC EVEX encoding sub-space Clear original interpretation
103-
VEXDEST4=1 MASK=0 -> SCC=0 EVEX_APX_SCC VEXDEST4=0
104-
VEXDEST4=1 MASK=1 -> SCC=1 EVEX_APX_SCC MASK=0 VEXDEST4=0
105-
VEXDEST4=1 MASK=2 -> SCC=2 EVEX_APX_SCC MASK=0 VEXDEST4=0
106-
VEXDEST4=1 MASK=3 -> SCC=3 EVEX_APX_SCC MASK=0 VEXDEST4=0
107-
VEXDEST4=1 MASK=4 -> SCC=4 EVEX_APX_SCC MASK=0 VEXDEST4=0
108-
VEXDEST4=1 MASK=5 -> SCC=5 EVEX_APX_SCC MASK=0 VEXDEST4=0
109-
VEXDEST4=1 MASK=6 -> SCC=6 EVEX_APX_SCC MASK=0 VEXDEST4=0
110-
VEXDEST4=1 MASK=7 -> SCC=7 EVEX_APX_SCC MASK=0 VEXDEST4=0
111-
VEXDEST4=0 MASK=0 -> SCC=8 EVEX_APX_SCC
112-
VEXDEST4=0 MASK=1 -> SCC=9 EVEX_APX_SCC MASK=0
113-
VEXDEST4=0 MASK=2 -> SCC=10 EVEX_APX_SCC MASK=0
114-
VEXDEST4=0 MASK=3 -> SCC=11 EVEX_APX_SCC MASK=0
115-
VEXDEST4=0 MASK=4 -> SCC=12 EVEX_APX_SCC MASK=0
116-
VEXDEST4=0 MASK=5 -> SCC=13 EVEX_APX_SCC MASK=0
117-
VEXDEST4=0 MASK=6 -> SCC=14 EVEX_APX_SCC MASK=0
118-
VEXDEST4=0 MASK=7 -> SCC=15 EVEX_APX_SCC MASK=0
100+
# The APX DFV (Defaults Flags Values) data is encoded in EVEX.vvvv
101+
DFV=0 -> VEXDEST3=0 VEXDEST210=0 EVEX_APX_SCC
102+
DFV=1 -> VEXDEST3=0 VEXDEST210=1 EVEX_APX_SCC
103+
DFV=2 -> VEXDEST3=0 VEXDEST210=2 EVEX_APX_SCC
104+
DFV=3 -> VEXDEST3=0 VEXDEST210=3 EVEX_APX_SCC
105+
DFV=4 -> VEXDEST3=0 VEXDEST210=4 EVEX_APX_SCC
106+
DFV=5 -> VEXDEST3=0 VEXDEST210=5 EVEX_APX_SCC
107+
DFV=6 -> VEXDEST3=0 VEXDEST210=6 EVEX_APX_SCC
108+
DFV=7 -> VEXDEST3=0 VEXDEST210=7 EVEX_APX_SCC
109+
DFV=8 -> VEXDEST3=1 VEXDEST210=0 EVEX_APX_SCC
110+
DFV=9 -> VEXDEST3=1 VEXDEST210=1 EVEX_APX_SCC
111+
DFV=10 -> VEXDEST3=1 VEXDEST210=2 EVEX_APX_SCC
112+
DFV=11 -> VEXDEST3=1 VEXDEST210=3 EVEX_APX_SCC
113+
DFV=12 -> VEXDEST3=1 VEXDEST210=4 EVEX_APX_SCC
114+
DFV=13 -> VEXDEST3=1 VEXDEST210=5 EVEX_APX_SCC
115+
DFV=14 -> VEXDEST3=1 VEXDEST210=6 EVEX_APX_SCC
116+
DFV=15 -> VEXDEST3=1 VEXDEST210=7 EVEX_APX_SCC
117+
119118
######################################################

datafiles/apx-f/apx-evgpr-reg-tables.txt

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#BEGIN_LEGAL
22
#
3-
#Copyright (c) 2023 Intel Corporation
3+
#Copyright (c) 2025 Intel Corporation
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -247,29 +247,3 @@ REXB4=1 REXB=1 RM=0x5 | OUTREG=XED_REG_R29 HAS_EGPR=1
247247
REXB4=1 REXB=1 RM=0x6 | OUTREG=XED_REG_R30 HAS_EGPR=1
248248
REXB4=1 REXB=1 RM=0x7 | OUTREG=XED_REG_R31 HAS_EGPR=1
249249

250-
251-
252-
########################################################
253-
254-
xed_reg_enum_t DFV()::
255-
# Enumeration for EVEX.[OF, SF, ZF, CF] default flags.
256-
# The register index represents the default flags values. For example:
257-
# DFV10.index == 10 == 0b1010 -> OF=1, SF=0, ZF=1, CF=0
258-
VEXDEST3=0 VEXDEST210=0 | OUTREG=XED_REG_DFV0
259-
VEXDEST3=0 VEXDEST210=1 | OUTREG=XED_REG_DFV1
260-
VEXDEST3=0 VEXDEST210=2 | OUTREG=XED_REG_DFV2
261-
VEXDEST3=0 VEXDEST210=3 | OUTREG=XED_REG_DFV3
262-
VEXDEST3=0 VEXDEST210=4 | OUTREG=XED_REG_DFV4
263-
VEXDEST3=0 VEXDEST210=5 | OUTREG=XED_REG_DFV5
264-
VEXDEST3=0 VEXDEST210=6 | OUTREG=XED_REG_DFV6
265-
VEXDEST3=0 VEXDEST210=7 | OUTREG=XED_REG_DFV7
266-
267-
VEXDEST3=1 VEXDEST210=0 | OUTREG=XED_REG_DFV8
268-
VEXDEST3=1 VEXDEST210=1 | OUTREG=XED_REG_DFV9
269-
VEXDEST3=1 VEXDEST210=2 | OUTREG=XED_REG_DFV10
270-
VEXDEST3=1 VEXDEST210=3 | OUTREG=XED_REG_DFV11
271-
VEXDEST3=1 VEXDEST210=4 | OUTREG=XED_REG_DFV12
272-
VEXDEST3=1 VEXDEST210=5 | OUTREG=XED_REG_DFV13
273-
VEXDEST3=1 VEXDEST210=6 | OUTREG=XED_REG_DFV14
274-
VEXDEST3=1 VEXDEST210=7 | OUTREG=XED_REG_DFV15
275-

0 commit comments

Comments
 (0)