From f8eae0ac1544ffc6e394e6cb77af00d7824b9128 Mon Sep 17 00:00:00 2001 From: vit9696 <4348897+vit9696@users.noreply.github.com> Date: Thu, 14 Jun 2018 01:04:20 +0300 Subject: [PATCH] Refactor confusing if for xacquire/xrelease (#1173) Sync with https://github.com/llvm-mirror/llvm/blob/7cdce81/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp#L362 --- arch/X86/X86DisassemblerDecoder.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/X86/X86DisassemblerDecoder.c b/arch/X86/X86DisassemblerDecoder.c index 53ad4867..304a2592 100644 --- a/arch/X86/X86DisassemblerDecoder.c +++ b/arch/X86/X86DisassemblerDecoder.c @@ -542,9 +542,8 @@ static int readPrefixes(struct InternalInstruction *insn) * - it is followed by an xchg instruction * then it should be disassembled as a xacquire/xrelease not repne/rep. */ - if ((byte == 0xf2 || byte == 0xf3) && - ((nextByte == 0xf0) | - ((nextByte & 0xfe) == 0x86 || (nextByte & 0xf8) == 0x90))) + if (((nextByte == 0xf0) || + ((nextByte & 0xfe) == 0x86 || (nextByte & 0xf8) == 0x90))) insn->xAcquireRelease = true; /* * Also if the byte is 0xf3, and the following condition is met: