Refactor confusing if for xacquire/xrelease (#1173)

Sync with https://github.com/llvm-mirror/llvm/blob/7cdce81/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp#L362
This commit is contained in:
vit9696 2018-06-14 01:04:20 +03:00 committed by Nguyen Anh Quynh
parent 6625328843
commit f8eae0ac15
1 changed files with 2 additions and 3 deletions

View File

@ -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: