Files
archived-xed/datafiles/avx512f/avx512-reg-table-mask.txt
Mark Charney ef83ba6cb1 improve EVEX & VEX handling of mask register specifier bits
* Outside of 64b mode, EVEX.R', EVEX.R, EVEX.X and EVEX.B are
    ignored.  (handled in ILD C code). If not set, those fields are
    zero.

  * MASK_B ignores REXB (EVEX.B and VEX.B). It is used in EVEX and VEX
    mask encodings. SDM(062) states EVEX.B is ignored but omits
    mention of VEX.B.

  * In 64b mode, VEX.vvvv[3] must be 1 for mask registers; EVEX.vvvv
    is not used for mask registers. In non-64b mode VEX.vvvv[3] is
    ignored for mask regs.

  * VEX.R must be 1 for mask registers.

Change-Id: I209a62c7e27778ca0981e342cb3143f367409abf
(cherry picked from commit c41fb5e8f6b77524b94ee2e5860dd6c91a45b628)
2017-07-06 09:06:26 -04:00

79 lines
2.5 KiB
Plaintext

#BEGIN_LEGAL
#
#Copyright (c) 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#END_LEGAL
# FIXME: the rest of this file is common w/KNC. Split it out to avoid
# duplication
xed_reg_enum_t MASK1()::
MASK=0x0 | OUTREG=XED_REG_K0
MASK=0x1 | OUTREG=XED_REG_K1
MASK=0x2 | OUTREG=XED_REG_K2
MASK=0x3 | OUTREG=XED_REG_K3
MASK=0x4 | OUTREG=XED_REG_K4
MASK=0x5 | OUTREG=XED_REG_K5
MASK=0x6 | OUTREG=XED_REG_K6
MASK=0x7 | OUTREG=XED_REG_K7
xed_reg_enum_t MASKNOT0()::
MASK=0x0 | OUTREG=XED_REG_ERROR
MASK=0x1 | OUTREG=XED_REG_K1
MASK=0x2 | OUTREG=XED_REG_K2
MASK=0x3 | OUTREG=XED_REG_K3
MASK=0x4 | OUTREG=XED_REG_K4
MASK=0x5 | OUTREG=XED_REG_K5
MASK=0x6 | OUTREG=XED_REG_K6
MASK=0x7 | OUTREG=XED_REG_K7
# used for compares in EVEX
xed_reg_enum_t MASK_R()::
REXRR=0 REXR=0 REG=0x0 | OUTREG=XED_REG_K0
REXRR=0 REXR=0 REG=0x1 | OUTREG=XED_REG_K1
REXRR=0 REXR=0 REG=0x2 | OUTREG=XED_REG_K2
REXRR=0 REXR=0 REG=0x3 | OUTREG=XED_REG_K3
REXRR=0 REXR=0 REG=0x4 | OUTREG=XED_REG_K4
REXRR=0 REXR=0 REG=0x5 | OUTREG=XED_REG_K5
REXRR=0 REXR=0 REG=0x6 | OUTREG=XED_REG_K6
REXRR=0 REXR=0 REG=0x7 | OUTREG=XED_REG_K7
# MASK_B is used by VEX and EVEX encodings. SDM (rev 062) states in
# EVEX, EVEX.B (REXB) is ignored. SDM does not (yet) say what happens
# on VEX.B but assuming it is similar.
xed_reg_enum_t MASK_B()::
RM=0x0 | OUTREG=XED_REG_K0
RM=0x1 | OUTREG=XED_REG_K1
RM=0x2 | OUTREG=XED_REG_K2
RM=0x3 | OUTREG=XED_REG_K3
RM=0x4 | OUTREG=XED_REG_K4
RM=0x5 | OUTREG=XED_REG_K5
RM=0x6 | OUTREG=XED_REG_K6
RM=0x7 | OUTREG=XED_REG_K7
# only used in VEX space for K-mask ops
# stored inverted
xed_reg_enum_t MASK_N()::
VEXDEST3=1 VEXDEST210=0x0 | OUTREG=XED_REG_K7
VEXDEST3=1 VEXDEST210=0x1 | OUTREG=XED_REG_K6
VEXDEST3=1 VEXDEST210=0x2 | OUTREG=XED_REG_K5
VEXDEST3=1 VEXDEST210=0x3 | OUTREG=XED_REG_K4
VEXDEST3=1 VEXDEST210=0x4 | OUTREG=XED_REG_K3
VEXDEST3=1 VEXDEST210=0x5 | OUTREG=XED_REG_K2
VEXDEST3=1 VEXDEST210=0x6 | OUTREG=XED_REG_K1
VEXDEST3=1 VEXDEST210=0x7 | OUTREG=XED_REG_K0