-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standardize use of %r7, %r8, and %r9 in trampoline generation
In libdtrace/dt_cg.c, a number of functions generate the trampoline. After a call to dt_cg_tramp_prologue[_act](), we can expect: %r7 contains a pointer to dctx->mst %r8 contains a pointer to dctx->ctx %r9 contains a pointer to dctx Most other calls to dt_cg_tramp_*() functions rely on these values. However, dt_cg_tramp_copy_args_from_regs() dt_cg_tramp_copy_regs() dt_cg_tramp_copy_rval_from_regs() all pass BPF_REG_8 in via an argument rp. This is unnecessary. In fact, the last two functions don't even use the passed-in argument, already using the known, hard-wired value BPF_REG_8 instead. Do not pass BPF_REG_8 in to these functions. Clean up the comments and interfaces and switch dt_cg_tramp_copy_args_from_regs() to use BPF_REG_8 explicitly, as the other functions already do. Signed-off-by: Eugene Loh <eugene.loh@oracle.com> Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
- Loading branch information
Showing
6 changed files
with
36 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters