Currently kinst checks if only the first instruction is 'push %rbp',
essentially excluding functions that do push RBP, but not in the first
instruction.
Details
- Reviewers
markj - Commits
- rGea89133dbc5f: kinst: check for 'push %rbp' anywhere in the function
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 51708 Build 48599: arc lint + arc unit
Event Timeline
sys/cddl/dev/kinst/amd64/kinst_isa.c | ||
---|---|---|
515–516 | The first sentence isn't really accurate anymore. I'd just replace the comment with something like, "refuse to instrument functions lacking the usual frame pointer manipulations since they might correspond to exception handlers." |
Please note in the commit message that this behaviour matches that of FBT. That is, FBT will put an entry probe on any function that contains a push %rbp.
You can just use #ifdef __SSE4_2__. -msse42 (or -msse4) will define that via the compiler driver. That is what controls 'popcnt' (in the case of popcnt we use it if you set CPUTYPE in your make.conf to specify a CPU that includes popcnt).