aboutsummaryrefslogtreecommitdiff
path: root/opcodes/i386-opc.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-07-25 15:28:07 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-07-25 15:28:24 -0700
commit4a1b91eabbe77f4d906a0895121d76a0653c3cf3 (patch)
tree675d4da6c17c95157f9a312626af39ac098b27d6 /opcodes/i386-opc.h
parent506f5c41cab71dbc3e562ba367d2dc6b355b64a6 (diff)
downloadgdb-4a1b91eabbe77f4d906a0895121d76a0653c3cf3.zip
gdb-4a1b91eabbe77f4d906a0895121d76a0653c3cf3.tar.gz
gdb-4a1b91eabbe77f4d906a0895121d76a0653c3cf3.tar.bz2
x86: Expand Broadcast to 3 bits
Expand Broadcast to 3 bits so that the number of bytes to broadcast can be computed as 1 << (Broadcast - 1). Use it to simplify x86 assembler. gas/ * config/tc-i386.c (Broadcast_Operation): Add bytes. (build_evex_prefix): Use i.broadcast->bytes. (match_broadcast_size): New function. (check_VecOperands): Use the broadcast field to compute the number of bytes to broadcast directly. Set i.broadcast->bytes. Use match_broadcast_size. opcodes/ * i386-gen.c (adjust_broadcast_modifier): New function. (process_i386_opcode_modifier): Add an argument for operands. Adjust the Broadcast value based on operands. (output_i386_opcode): Pass operand_types to process_i386_opcode_modifier. (process_i386_opcodes): Pass NULL as operands to process_i386_opcode_modifier. * i386-opc.h (BYTE_BROADCAST): New. (WORD_BROADCAST): Likewise. (DWORD_BROADCAST): Likewise. (QWORD_BROADCAST): Likewise. (i386_opcode_modifier): Expand broadcast to 3 bits. * i386-tbl.h: Regenerated.
Diffstat (limited to 'opcodes/i386-opc.h')
-rw-r--r--opcodes/i386-opc.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h
index cb7875d..25d8d27 100644
--- a/opcodes/i386-opc.h
+++ b/opcodes/i386-opc.h
@@ -561,6 +561,17 @@ enum
#define BOTH_MASKING 3
Masking,
+ /* AVX512 broadcast support. The number of bytes to broadcast is
+ 1 << (Broadcast - 1):
+ 1: Byte broadcast.
+ 2: Word broadcast.
+ 3: Dword broadcast.
+ 4: Qword broadcast.
+ */
+#define BYTE_BROADCAST 1
+#define WORD_BROADCAST 2
+#define DWORD_BROADCAST 3
+#define QWORD_BROADCAST 4
Broadcast,
/* Static rounding control is supported. */
@@ -650,7 +661,7 @@ typedef struct i386_opcode_modifier
unsigned int noavx:1;
unsigned int evex:3;
unsigned int masking:2;
- unsigned int broadcast:1;
+ unsigned int broadcast:3;
unsigned int staticrounding:1;
unsigned int sae:1;
unsigned int disp8memshift:3;