From fd0933cbebb3147c8aca2c4ee7422e3276d4bda6 Mon Sep 17 00:00:00 2001 From: pancake Date: Wed, 13 Sep 2023 16:45:51 +0200 Subject: [PATCH] Plant the seed for the tlocal bool in RAnalOp ##analysis --- libr/core/cmd_anal.inc.c | 6 ++++++ libr/include/r_anal/op.h | 1 + 2 files changed, 7 insertions(+) diff --git a/libr/core/cmd_anal.inc.c b/libr/core/cmd_anal.inc.c index 4c5ba7085b..bf1bd051f6 100644 --- a/libr/core/cmd_anal.inc.c +++ b/libr/core/cmd_anal.inc.c @@ -2548,6 +2548,9 @@ static void core_anal_bytes(RCore *core, const ut8 *buf, int len, int nops, int if (op.refptr != -1 && op.refptr > 0) { pj_ki (pj, "refptr", op.refptr); } + if (op.tlocal) { + pj_kb (pj, "tlocal", true); + } pj_ki (pj, "cycles", op.cycles); pj_ki (pj, "failcycles", op.failcycles); pj_ki (pj, "delay", op.delay); @@ -2699,6 +2702,9 @@ static void core_anal_bytes(RCore *core, const ut8 *buf, int len, int nops, int if (op.refptr != -1 && op.refptr > 0) { printline ("refptr", "%d\n", op.refptr); } + if (op.tlocal) { + printline ("tlocal", "%s\n", r_str_bool (op.tlocal)); + } printline ("size", "%d\n", size); printline ("sign", "%s\n", r_str_bool (op.sign)); printline ("type", "%s\n", r_anal_optype_tostring (op.type)); diff --git a/libr/include/r_anal/op.h b/libr/include/r_anal/op.h index 948cc60d6b..088a3aff79 100644 --- a/libr/include/r_anal/op.h +++ b/libr/include/r_anal/op.h @@ -235,6 +235,7 @@ typedef struct r_anal_op_t { bool weakbytes; ut8 *bytes; /* can be null, but is used for encoding and decoding, malloc of `size` */ int size; /* size in bytes of opcode */ + bool tlocal; // uses the thread local storage int nopcode; /* number of bytes representing the opcode (not the arguments) TODO: find better name */ int cycles; /* cpu-cycles taken by instruction */ int failcycles; /* conditional cpu-cycles */