Théophile Bastian
db32807dd0
Fix rbp pop heuristic
...
Add criterion to rbp pop detection:
iii) that are the last references to %rbp in a `Def` in the
subroutine's CFG (cf (ii)).
2019-06-11 18:44:05 +02:00
Théophile Bastian
4d6187ac21
Fix recursive call synthesis
2019-06-11 03:22:55 +02:00
Théophile Bastian
ec75b2fc92
Fix tail call synthesis
2019-06-11 03:22:22 +02:00
Théophile Bastian
3b2cad0dc4
Revert to bap1.5
2019-06-11 03:21:56 +02:00
Théophile Bastian
8d49af7be8
Use bap 1.6
2019-05-28 17:00:44 +02:00
Théophile Bastian
344ac84ef3
Ignore ghost subroutines for clang
...
A ghost subroutine is a subroutine having, in the IR representation, no
content. At clang -O0, some might be generated, eg.
<foo_func>:
foo_addr nop
which translates to Empty in BIL.
2019-04-05 11:23:18 +02:00
Théophile Bastian
6c18d9f537
Use rbp only on the subs where we need it
2019-04-05 11:23:13 +02:00
Théophile Bastian
29ab916c55
Fix next_instr_graph out-of-subroutine pointers
...
The disasm-based next_instr_graph would introduce next instructions out
of the current subroutine for eg. calls, jmp to plts, etc.
2019-04-04 19:47:36 +02:00
Théophile Bastian
5f7dfb6f5f
Use disasm to generate next_instr_graph
2019-04-04 13:49:39 +02:00
Théophile Bastian
3d336de196
Add flag to never go back to undefined rbp
...
Once rbp has been set in the DWARF, if this flag is set, nothing will
remove it from the table. This mimicks gcc and allows us to check easily
our tables against theirs.
2019-04-04 11:52:47 +02:00
Théophile Bastian
30fe23b541
Fix rbp to rsp switch
...
Use rsp+16, because we'll pop the saved rbp from the stack just after
2019-04-03 12:19:53 +02:00
Théophile Bastian
180e32a4b3
Generate RBP column when needed
2019-04-03 12:19:49 +02:00
Théophile Bastian
719fa27f99
Ensure a crashing FDE still generates other FDEs
2019-03-29 19:24:51 +01:00
Théophile Bastian
d7c1aaa6b5
CSmith: add script to generate tests
2019-03-18 20:50:49 +01:00
Théophile Bastian
5ecd56a134
Simplest: compute first and last address of sub
2018-11-20 16:55:56 +01:00
Théophile Bastian
e021d781f4
Use AddrMap instead of CfaChange list
2018-11-19 18:11:20 +01:00
Théophile Bastian
b395c98b78
Simplest: correctly add beg-of-block values
2018-11-19 16:09:56 +01:00
Théophile Bastian
7ffc33d7a8
Simplest: catch inconsistent subroutine in of_prog
2018-11-16 19:11:52 +01:00
Théophile Bastian
b4043249f9
Simplest: fix reverting from rbp to rsp
2018-11-16 18:25:53 +01:00
Théophile Bastian
0f181e93cd
Simplest: use rbp
2018-11-16 18:02:38 +01:00
Théophile Bastian
9f09dec677
Simplest: change workflow
2018-11-16 18:02:38 +01:00
Théophile Bastian
aec0ab59ad
Simplest: use smallest blk addr as entry point
2018-11-16 18:02:12 +01:00
Théophile Bastian
b7a5caf87f
Simplify evaluation of affine rsp setting expr
2018-11-15 17:23:20 +01:00
Théophile Bastian
745e0d96d9
Basic support for rsp tracking
2018-10-25 17:11:08 +02:00
Théophile Bastian
4096c4bf19
Generate CFA tracking with RIP
2018-10-23 19:22:19 +02:00