@@ -20,65 +20,61 @@ pub enum SBPFVersion {
20
20
}
21
21
22
22
impl SBPFVersion {
23
- /// Explicitly perform sign extension of results
24
- pub fn explicit_sign_extension_of_results ( & self ) -> bool {
23
+ /// Enable SIMD-0166: SBPF dynamic stack frames
24
+ pub fn dynamic_stack_frames ( & self ) -> bool {
25
25
self != & SBPFVersion :: V1
26
26
}
27
27
28
- /// Enable the little-endian byte swap instructions
29
- pub fn disable_le ( & self ) -> bool {
28
+ /// Enable SIMD-0173: SBPF instruction encoding improvements
29
+ pub fn callx_uses_src_reg ( & self ) -> bool {
30
30
self != & SBPFVersion :: V1
31
31
}
32
-
33
- /// Enable the negation instruction
34
- pub fn disable_neg ( & self ) -> bool {
32
+ /// ... SIMD-0173
33
+ pub fn disable_lddw ( & self ) -> bool {
35
34
self != & SBPFVersion :: V1
36
35
}
37
-
38
- /// Swaps the reg and imm operands of the subtraction instruction
39
- pub fn swap_sub_reg_imm_operands ( & self ) -> bool {
36
+ /// ... SIMD-0173
37
+ pub fn disable_le ( & self ) -> bool {
40
38
self != & SBPFVersion :: V1
41
39
}
42
-
43
- /// Enable the only two slots long instruction: LD_DW_IMM
44
- pub fn disable_lddw ( & self ) -> bool {
40
+ /// ... SIMD-0173
41
+ pub fn move_memory_instruction_classes ( & self ) -> bool {
45
42
self != & SBPFVersion :: V1
46
43
}
47
44
48
- /// Enable the BPF_PQR instruction class
45
+ /// Enable SIMD-0174: SBPF arithmetics improvements
49
46
pub fn enable_pqr ( & self ) -> bool {
50
47
self != & SBPFVersion :: V1
51
48
}
52
-
53
- /// Use src reg instead of imm in callx
54
- pub fn callx_uses_src_reg ( & self ) -> bool {
49
+ /// ... SIMD-0174
50
+ pub fn disable_neg ( & self ) -> bool {
55
51
self != & SBPFVersion :: V1
56
52
}
57
-
58
- /// Ensure that rodata sections don't exceed their maximum allowed size and
59
- /// overlap with the stack
60
- pub fn reject_rodata_stack_overlap ( & self ) -> bool {
53
+ /// ... SIMD-0174
54
+ pub fn swap_sub_reg_imm_operands ( & self ) -> bool {
61
55
self != & SBPFVersion :: V1
62
56
}
63
-
64
- /// Allow sh_addr != sh_offset in elf sections. Used in V2 to align
65
- /// section vaddrs to MM_PROGRAM_START.
66
- pub fn enable_elf_vaddr ( & self ) -> bool {
57
+ /// ... SIMD-0174
58
+ pub fn explicit_sign_extension_of_results ( & self ) -> bool {
67
59
self != & SBPFVersion :: V1
68
60
}
69
61
70
- /// Use dynamic stack frame sizes
71
- pub fn dynamic_stack_frames ( & self ) -> bool {
62
+ /// Enable SIMD-0176: SBPF static syscalls
63
+ pub fn static_syscalls ( & self ) -> bool {
72
64
self != & SBPFVersion :: V1
73
65
}
74
66
75
- /// Support syscalls via pseudo calls (insn.src = 0)
76
- pub fn static_syscalls ( & self ) -> bool {
67
+ /// Enable SIMD-XXXX: SBPF stricter controlflow
68
+ pub fn stricter_controlflow ( & self ) -> bool {
77
69
self != & SBPFVersion :: V1
78
70
}
79
71
80
- /// Restricts jump and call targets to function boundaries
81
- pub fn stricter_controlflow ( & self ) -> bool {
72
+ /// Enable SIMD-XXXX: Stricter ELF header
73
+ pub fn reject_rodata_stack_overlap ( & self ) -> bool {
74
+ self != & SBPFVersion :: V1
75
+ }
76
+ /// ... SIMD-XXXX
77
+ pub fn enable_elf_vaddr ( & self ) -> bool {
82
78
self != & SBPFVersion :: V1
83
79
}
84
80
}
0 commit comments