Permalink
Browse files

Update disOps.py

Fix warning to STFU clangs with extra parentheses for sub-structure of InstInfoEx.
  • Loading branch information...
gdabah committed Jul 10, 2017
1 parent 0d2020b commit 1f5499aa537898793f52e1e778482817332a0b27
Showing with 4 additions and 1 deletion.
  1. +4 −1 disOps/disOps.py
View
@@ -585,7 +585,8 @@ def FormatInstruction(ii):
ops = ii.operands + [OperandType.NONE, OperandType.NONE, OperandType.NONE, OperandType.NONE]
# Is it an extended structure?
if ii.flags & InstFlag.EXTENDED:
isExtended = (ii.flags & InstFlag.EXTENDED) != 0
if isExtended:
# Since there's a second and/or a third mnemonic, use the the InstInfoEx structure.
type = "_InstInfoEx"
flagsEx = 0
@@ -620,6 +621,8 @@ def FormatInstruction(ii):
raise "SharedInfoIndex exceeded its 16 bits. Change type of sharedInfoIndex in _InstInfo!"
fields = "0x%x, %d" % (sharedInfoIndex, mnems[0])
if (ii.flags & InstFlag.EXTENDED):
fields = "{%s}" % fields # Extra parentheses for sub structure in case it's InstInfoEx.
# "Structure-Name" = II_Bytes-Code {Fields + Optional-Fields}.
return ("\t/*II%s*/ {%s%s}" % (ii.tag, fields, optFields), (ii.flags & InstFlag.EXTENDED) != 0)

0 comments on commit 1f5499a

Please sign in to comment.