You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs are a little unclear to me what the intent behind SequenceNumber.getTime() vs .getOrder() is. IIUC, .getOrder() gives the intra-address execution order of PCodeOps (when one instruction lifts to more than one P-Code op), whereas .getTime() gives a unique ID for every PCodeOp within a (instruction? basic block? function? Not sure which), but its value is not significant.
The reason I'm asking is because I'm confused by this following output of HighFunction.getPcodeOps(). I'm getting this with
Due to the way that SequenceNumber.compareTo(SequenceNumber) compares SequenceNumbers (lexicographically by PC, then by "time"), and because PcodeSyntaxTree.getPcodeOps() returns ops sorted by SequenceNumber, the first three P-Code Ops above are, IMO, in the wrong order. The unique COPY register ops should be before the BRANCH, otherwise the MULTIEQUAL that is immediately jumped to doesn't make sense (neither unique...10 nor unique 0xc180 are assigned to at that point.
Any insight into this? Are consumers of getPcodeOps() meant to re-sort ops by PC and .getOrder()? Or should they already come back in that order? Or am I looking at this all wrong?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The docs are a little unclear to me what the intent behind
SequenceNumber.getTime()
vs.getOrder()
is. IIUC,.getOrder()
gives the intra-address execution order of PCodeOps (when one instruction lifts to more than one P-Code op), whereas.getTime()
gives a unique ID for every PCodeOp within a (instruction? basic block? function? Not sure which), but its value is not significant.The reason I'm asking is because I'm confused by this following output of
HighFunction.getPcodeOps()
. I'm getting this withwhere
f
is theHighFunction
:The output of the above snippet is:
Due to the way that
SequenceNumber.compareTo(SequenceNumber)
compares SequenceNumbers (lexicographically by PC, then by "time"), and becausePcodeSyntaxTree.getPcodeOps()
returns ops sorted by SequenceNumber, the first three P-Code Ops above are, IMO, in the wrong order. Theunique COPY register
ops should be before theBRANCH
, otherwise theMULTIEQUAL
that is immediately jumped to doesn't make sense (neitherunique...10
norunique 0xc180
are assigned to at that point.Any insight into this? Are consumers of
getPcodeOps()
meant to re-sort ops by PC and.getOrder()
? Or should they already come back in that order? Or am I looking at this all wrong?Beta Was this translation helpful? Give feedback.
All reactions