forked from rlane/ubpf
-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle call local seperately from regular jump instructions (#467)
* Handle call local seperately from regular jump instructions Signed-off-by: Alan Jowett <[email protected]> * Fix after local call prolog increased in size Signed-off-by: Alan Jowett <[email protected]> * Zero initialize jit_state Signed-off-by: Alan Jowett <[email protected]> * Increment num_jumps after inserting into table Signed-off-by: Alan Jowett <[email protected]> * Initialize bpf_function_prolog_size correctly Signed-off-by: Alan Jowett <[email protected]> * Update ubpf_jit_arm64.c Assert that prolog size matches. * Update ubpf_jit_x86_64.c Assert that the prolog size matches. --------- Signed-off-by: Alan Jowett <[email protected]> Signed-off-by: Alan Jowett <[email protected]> Co-authored-by: Alan Jowett <[email protected]>
- Loading branch information
1 parent
ff4b48a
commit 5a4f6c6
Showing
6 changed files
with
108 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-- asm | ||
mov %r1, 1 | ||
mov %r2, 20 | ||
call local exponential | ||
exit | ||
exponential: | ||
mul %r1, %r2 | ||
sub %r2, 1 | ||
jne %r2, 0, exponential | ||
mov %r0, %r1 | ||
exit | ||
-- result | ||
0x21C3677C82B40000 |
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