bpf: Add helper macro bpf_cast_as()

Introduce helper macro bpf_cast_as() that emits:
rX = rX
instruction and encodes address_space into imm32.

It's useful with older LLVM that doesn't emit this insn automatically.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
1 file changed