From: Henrik G. <he...@gr...> - 2017-04-20 14:36:12
|
It was incorrectly set to 01b in some cases when where it should be 10b. Fixes BR 3392402. Signed-off-by: Henrik Gramner <he...@gr...> --- This fixes things for my use case, but it'd be great if someone more familiar with the codebase could verify that this is correct. --- asm/assemble.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/asm/assemble.c b/asm/assemble.c index 9c76b0ea..31db516a 100644 --- a/asm/assemble.c +++ b/asm/assemble.c @@ -2426,13 +2426,11 @@ static enum match_result matches(const struct itemplate *itemp, * - offset can fit in a byte when EVEX is not used * - offset can be compressed when EVEX is used */ -#define IS_MOD_01() (input->eaflags & EAF_BYTEOFFS || \ - (o >= -128 && o <= 127 && \ - seg == NO_SEG && !forw_ref && \ - !(input->eaflags & EAF_WORDOFFS) && \ - !(ins->rex & REX_EV)) || \ - (ins->rex & REX_EV && \ - is_disp8n(input, ins, &output->disp8))) +#define IS_MOD_01() (!(input->eaflags & EAF_WORDOFFS) && \ + (ins->rex & REX_EV ? seg == NO_SEG && !forw_ref && \ + is_disp8n(input, ins, &output->disp8) : \ + input->eaflags & EAF_BYTEOFFS || (o >= -128 && \ + o <= 127 && seg == NO_SEG && !forw_ref))) static enum ea_type process_ea(operand *input, ea *output, int bits, int rfield, opflags_t rflags, insn *ins, -- 2.11.0 |