aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-06-10 10:46:21 +0200
committerJan Beulich <jbeulich@suse.com>2024-06-10 10:46:21 +0200
commitd1c2dd6f4de7ec0761fcf89c95342da72826329b (patch)
treee96860ab0e66182d64ae8a69d1723c4912d18728 /gas/config/tc-i386.c
parentcf037c0de24990ed2a0d9fabe8994dbd3c0e303e (diff)
downloadbinutils-d1c2dd6f4de7ec0761fcf89c95342da72826329b.zip
binutils-d1c2dd6f4de7ec0761fcf89c95342da72826329b.tar.gz
binutils-d1c2dd6f4de7ec0761fcf89c95342da72826329b.tar.bz2
x86/APX: convert ZU to operand constraint
Extremely rarely used attributes are inefficient when represented by a separate attribute. Convert it to an operand constraint, as already suggested during review. The collision with RegKludge is pretty simple to resolve.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r--gas/config/tc-i386.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 95f5810..e0c6964 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -4287,7 +4287,7 @@ build_apx_evex_prefix (void)
/* Encode the NDD bit of the instruction promoted from the legacy
space. ZU shares the same bit with NDD. */
if ((i.vex.register_specifier && i.tm.opcode_space == SPACE_EVEXMAP4)
- || i.tm.opcode_modifier.zu)
+ || i.tm.opcode_modifier.operandconstraint == ZERO_UPPER)
i.vex.bytes[3] |= 0x10;
/* Encode the NF bit. */
@@ -10301,6 +10301,10 @@ process_operands (void)
i.types[first_reg_op + 1] = i.types[first_reg_op];
i.operands++;
i.reg_operands++;
+
+ /* For IMULZU switch around the constraint. */
+ if (i.tm.mnem_off == MN_imulzu)
+ i.tm.opcode_modifier.operandconstraint = ZERO_UPPER;
}
if (i.tm.opcode_modifier.modrm)