-
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.
cg: rework data size to BPF size conversion and improve error reporting
The code generator contains multiple places with an assertion to ensure that the size of scalar loads and stores is 1, 2, 4, or 8 bytes. Two places issued an internal compiler error instead of using an assertion. All instances of verifying scalar size are now consolidated into a function that returns the BPF size for the given size if it is valid, and reports an internal error if not. New macros (BPF_STOREX, BPF_LOADX, and BPF_STOREX_IMM) are introduced to allow the passing of a data size rather than a BPF size. Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
- Loading branch information
Showing
1 changed file
with
103 additions
and
106 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