mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Update the X86 disassembler to use xacquire and xrelease when appropriate.
This is a bit tricky as the xacquire and xrelease hints use the same bytes, 0xf2 and 0xf3, as the repne and rep prefixes. Fortunately llvm has different llvm MCInst Opcode enums for rep/xrelease and repne/xacquire. So to make this work a boolean was added the InternalInstruction struct as part of the Prefix state which is set with the added logic in readPrefixes() when decoding an instruction to determine if these prefix bytes are to be disassembled as xacquire or xrelease. Then we let the matcher pick the normal prefix instructionID and we change the Opcode after that when it is set into the MCInst being created. rdar://11019859 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184490 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -457,6 +457,8 @@ struct InternalInstruction {
|
||||
uint64_t necessaryPrefixLocation;
|
||||
/* The segment override type */
|
||||
SegmentOverride segmentOverride;
|
||||
/* 1 if the prefix byte, 0xf2 or 0xf3 is xacquire or xrelease */
|
||||
BOOL xAcquireRelease;
|
||||
|
||||
/* Sizes of various critical pieces of data, in bytes */
|
||||
uint8_t registerSize;
|
||||
|
Reference in New Issue
Block a user