commit | f7706942b562116187015399980561e909ee4913 | [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 22:14:53 2018 +0800 |
tree | d4469eecd7bfad0e7de0a184f1b19a6a5b125b60 | |
parent | dc59d17b9194bbce8f57661f2f41cfa926c46d35 [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 53ad486..304a259 100644 --- a/arch/X86/X86DisassemblerDecoder.c +++ b/arch/X86/X86DisassemblerDecoder.c
@@ -542,9 +542,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: