fadec: Store broadcast size in segment
This is a preparation for AVX512-FP16, where the broadcast size is not just 32/64 bit depending solely on EVEX.W, but can also be 16 bit (with EVEX.W=0). The broadcast size therefore needs two bits, but the evex field only had one free bit left. Store broadcast size with the segment for now. (This is not a good fit and is likely to change at some point.)
This commit is contained in:
5
decode.c
5
decode.c
@@ -366,9 +366,7 @@ prefix_end:
|
||||
} else {
|
||||
if (UNLIKELY(vexl == 3)) // EVEX.L'L == 11b is UD
|
||||
return FD_ERR_UD;
|
||||
// Update V' to REX.W, s.t. broadcast size is exposed
|
||||
unsigned rexw = prefix_rex & PREFIX_REXW ? 0x08 : 0x00;
|
||||
instr->evex = (prefix_evex & 0x87) | rexw;
|
||||
instr->evex = prefix_evex & 0x87; // clear RC, clear B
|
||||
}
|
||||
} else {
|
||||
instr->evex = 0;
|
||||
@@ -498,6 +496,7 @@ prefix_end:
|
||||
if (UNLIKELY(!DESC_EVEX_BCST(desc)))
|
||||
return FD_ERR_UD;
|
||||
scale = prefix_rex & PREFIX_REXW ? 3 : 2;
|
||||
instr->segment |= scale << 6; // Store broadcast size
|
||||
op_modrm->type = FD_OT_MEMBCST;
|
||||
} else {
|
||||
op_modrm->type = FD_OT_MEM;
|
||||
|
||||
Reference in New Issue
Block a user