Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set more RzAnalysisOp members #14

Open
Rot127 opened this issue Aug 13, 2021 · 0 comments
Open

Set more RzAnalysisOp members #14

Rot127 opened this issue Aug 13, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Rot127
Copy link
Member

Rot127 commented Aug 13, 2021

The RzAnalysisOp struct has many useful members which we do not set at the moment. Although we have most of the information from the LLVM definitions.

Members to consider

Done RzAnalysisOp member Note
RzAnalysisOpPrefix prefix; conditional, likely, unlikely
RzAnalysisStackOp stackop; operation on stack? Does LLVM has this information?
RzTypeCond cond; condition type
int size; always 4 bytes
int nopcode; number of bytes representing the opcode (not the arguments). Useful?
int cycles; Seems to be stored somewhere in a LLVM instr. But in some anonymous objects
RzAnalysisOpFamily family; At least distinguish between float and non float (there is a LLVM flag for that.)
int id; = HexInsn.instruction
bool eob; end of block - Only set for non conditional jump instructions.
bool sign; operates on signed values, false by default
RzAnalysisOpDirection direction; rwx flags and reference flag. Could determine that by checking whether in or out operands are present.
st64 ptr; reference to memory - Set at least for all jmp/call instructions
ut64 val; reference to value - see: #13
int ptrsize; pointers are always 32bit in Hexagon
st64 stackptr; ?
int refptr; ?
RzAnalysisValue *src[3]; Definitely set that. Although the src array needs to be extended to 5 or 6 (Hexagon has up to 6 operands per instruction)
RzAnalysisValue *dst; As above
RzList *access; RzAnalysisValue access information
RzStrBuf esil; see: #12
RzStrBuf opex; ? What is this doing?
const char *reg; /* destination register */
const char *ireg; /* register used for indirect memory computation*/
int scale; ? What is this doing?
ut64 disp; ? What is this doing?
RzAnalysisSwitchOp *switch_op; ? What is this doing ?
RzAnalysisHint hint; Seems useful
RzAnalysisDataType datatype; Int32, float, string, array (HVX!) etc.
@Rot127 Rot127 added enhancement New feature or request good first issue Good for newcomers labels Aug 13, 2021
@Rot127 Rot127 changed the title Set more RzAnalysisOp memebers Set more RzAnalysisOp members Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant