Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bpf: highlight signed type keywords Signed type keywords such as s16 have always been supported by BPF but recently became more frequent. They were missing in the original lexer so this commit adds them, with an example. Signed-off-by: Paul Chaignon <[email protected]> * bpf: highlight simpler call syntax The lexer already supports the following syntax for call instructions: call bpf_skb_load_bytes#1234 but a simpler syntax without the number at the end is now also possible. This commit adds support for it, with an example. Signed-off-by: Paul Chaignon <[email protected]> * bpf: highlight all byte-swapping instructions The original lexer was missing support for the little-endian byte-swapping instructions le{16,32,64}. This commit adds them, together with the new bswap{16,32,64} instructions. The later are unconditional byte-swapping instructions, meaning they don't depend on the architecture. Signed-off-by: Paul Chaignon <[email protected]> * bpf: fix highlight of negative hexadecimal numbers Hexadecimal literals can also have a sign in BPF. This commit fixes this error in the lexer and adds a corresponding example. Signed-off-by: Paul Chaignon <[email protected]> * bpf: highlight hexadecimal jump offsets The offset of BPF jump instructions is now sometimes displayed in hexadecimal format. This commit adds support for that, together with an example. It also adds an example to cover the syntax where the jump has both an offset literal and an offset label (ex. "+1 <LBB0_2>"). Signed-off-by: Paul Chaignon <[email protected]> * bpf: highlight long jumps Jump instructions with a 32-bit offset are displayed as "gotol" instead of "goto". Signed-off-by: Paul Chaignon <[email protected]> --------- Signed-off-by: Paul Chaignon <[email protected]>
- Loading branch information