-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
The autogenerated HLIL from this plugin generates lots of spurious code for conditional jumps, to the point where it is distracting. As I understand it, this is done for correctness, since jump targets must be resolved at the end of a packet.
Example code (test_dualjump_cond_jump() in bn_llil_test_app):
00000084 014101f3 { R1 = add(R1,R1)
00000088 06d0005c if (P0) jump:t data_90 }
0000008c c03f0048 { R0 = #0x0; jumpr LR }
00000090 c03f1048 { R0 = #0x1; jumpr LR }
Resulting HLIL:
00000084 char temp211 = 0
00000084 if (arg1)
00000084 temp211 = 1
00000090 if (temp211 == 1)
00000090 return 1
0000008c return 0
I'd expect output more like
00000090 if (arg1)
00000090 return 1
0000008c return 0
I guess this lifted IL is so situational that it doesn't make sense to ask the binja devs to optimize this particular construct... However it should be straightforward to fix it up manually in simple cases using the new Workflows API.
Metadata
Metadata
Assignees
Labels
No labels