• Adrian Hunter's avatar
    x86/insn: Add support for APX EVEX to the instruction decoder logic · 87bbaf1a
    Adrian Hunter authored
    Intel Advanced Performance Extensions (APX) extends the EVEX prefix to
    support:
    
     - extended general purpose registers (EGPRs) i.e. r16 to r31
     - Push-Pop Acceleration (PPX) hints
     - new data destination (NDD) register
     - suppress status flags writes (NF) of common instructions
     - new instructions
    
    Refer to the Intel Advanced Performance Extensions (Intel APX) Architecture
    Specification for details.
    
    The extended EVEX prefix does not need amended instruction decoder logic,
    except in one area. Some instructions are defined as SCALABLE which means
    the EVEX.W bit and EVEX.pp bits are used to determine operand size.
    Specifically, if an instruction is SCALABLE and EVEX.W is zero, then
    EVEX.pp value 0 (representing no prefix NP) means default operand size,
    whereas EVEX.pp value 1 (representing 66 prefix) means operand size
    override i.e. 16 bits
    
    Add an attribute (INAT_EVEX_SCALABLE) to identify such instructions, and
    amend the logic appropriately.
    
    Amend the awk script that generates the attribute tables from the opcode
    map, to recognise "(es)" as attribute INAT_EVEX_SCALABLE.
    Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    Link: https://lore.kernel.org/r/20240502105853.5338-8-adrian.hunter@intel.com
    87bbaf1a
insn.c 18.1 KB