Jose E. Marchesi <jose.marchesi@xxxxxxxxxx> writes: > > +BPF_CALL 0x8 0x1 call PC += reg_val(imm) BPF_JMP | BPF_X only, > see `Program-local functions`_ > > If the instruction requires a register operand, why not using one of the > register fields? Is there any reason for not doing that? Yeah, the reason is because this is document what clang has done by default for a long time now. The IETF WG charter says: > The BPF working group is initially tasked with documenting the existing > state of the BPF ecosystem So extensions can always add new instructions and deprecate old ones but the initial version of the ISA needs to document "the existing state of the BPF ecosystem". I know gcc used a different field but one has to go out of your way to specify a command line option to get that to happen, whereas clang uses callx as documented when you don't do -O2, without requiring any extra command line options. I agree with you that it would have been better to use the src register since the BPF_X bit is supposed to mean that, but that ship apparently sailed long ago with clang. Dave