I am writing code to trace all the branches in ARM, i would like to confirm with people whether I am doing this correctly.
I put in code in gen_jmp to trace all the branches that are taken, afaik, the gen_jmp gets called when an unconditional branch is JITed or in the s->condlabel of conditional branch. so it is correct to generate code to set the branch as taken and use the dest argument as the targte of the branch. I also need to track whether a branch is conditional or not, i do this when i know the current instruction is a branch and the op ( op = (insn >> 22) & 0xf; ) is used to test the target of the branch, i.e. gen_test_cc(op ^ 1, s->condlabel); In this case, I generate code to set the branch as conditional. Did i miss anything ? Xin