-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before loading code into the VM, the application should use the ubpf_register API to associate C functions to integer indices. The eBPF program can then use these indicies as the immediate in the CALL to pick which function to call. The 'name' argument is currently unused, but will be used later by the ELF loader.
- Loading branch information
Showing
8 changed files
with
135 additions
and
7 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,14 @@ | ||
-- asm | ||
mov r6, r1 | ||
add r1, 2 | ||
mov r2, 4 | ||
call 1 | ||
ldxdw r0, [r6] | ||
be64 r0 | ||
exit | ||
-- mem | ||
01 02 03 04 05 06 07 08 | ||
-- result | ||
0x102292e2f2c0708 | ||
-- no jit | ||
CALL not yet implemented |
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,12 @@ | ||
-- asm | ||
mov r1, 1 | ||
mov r2, 2 | ||
mov r3, 3 | ||
mov r4, 4 | ||
mov r5, 5 | ||
call 0 | ||
exit | ||
-- result | ||
0x0102030405 | ||
-- no jit | ||
CALL not yet implemented |
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,10 @@ | ||
-- asm | ||
mov r1, 1 | ||
mov r2, 2 | ||
mov r3, 3 | ||
mov r4, 4 | ||
mov r5, 5 | ||
call 64 | ||
exit | ||
-- error | ||
Failed to load code: invalid call immediate at PC 5 |
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,10 @@ | ||
-- asm | ||
mov r1, 1 | ||
mov r2, 2 | ||
mov r3, 3 | ||
mov r4, 4 | ||
mov r5, 5 | ||
call 63 | ||
exit | ||
-- error | ||
Failed to load code: call to nonexistent function 63 at PC 5 |
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