commit | 856b2070105edddb74548a109655d66447179024 | [log] [tgz] |
---|---|---|
author | vit9696 <4348897+vit9696@users.noreply.github.com> | Thu Jun 14 01:04:20 2018 +0300 |
committer | Nguyen Anh Quynh <aquynh@gmail.com> | Wed Jun 13 23:04:20 2018 +0100 |
tree | 4e339cc9584f6bfad484b787982fe4041d16de1e | |
parent | 946fe471707e5a500d68fcba108cb9082b5b21df [diff] |
Refactor confusing if for xacquire/xrelease (#1173) Sync with https://github.com/llvm-mirror/llvm/blob/7cdce81/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp#L362
diff --git a/arch/X86/X86DisassemblerDecoder.c b/arch/X86/X86DisassemblerDecoder.c index 5c60aac..f9403a4 100644 --- a/arch/X86/X86DisassemblerDecoder.c +++ b/arch/X86/X86DisassemblerDecoder.c
@@ -543,9 +543,8 @@ * - 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: