diff options
author | Luke Nelson <lukenels@cs.washington.edu> | 2020-07-20 19:52:38 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-07-21 13:26:25 -0700 |
commit | bfabff3cb0fef366086c64f24be8ab316a355b99 (patch) | |
tree | 7e6e73a32c62c4ca261abbf0a570f758f3103a84 /fs/orangefs/upcall.h | |
parent | 956fcfcd359512f15b19bcd157fa8206ed26605b (diff) |
bpf, riscv: Modify JIT ctx to support compressed instructions
This patch makes the necessary changes to struct rv_jit_context and to
bpf_int_jit_compile to support compressed riscv (RVC) instructions in
the BPF JIT.
It changes the JIT image to be u16 instead of u32, since RVC instructions
are 2 bytes as opposed to 4.
It also changes ctx->offset and ctx->ninsns to refer to 2-byte
instructions rather than 4-byte ones. The riscv PC is required to be
16-bit aligned with or without RVC, so this is sufficient to refer to
any valid riscv offset.
The code for computing jump offsets in bytes is updated accordingly,
and factored into a new "ninsns_rvoff" function to simplify the code.
Signed-off-by: Luke Nelson <luke.r.nels@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200721025241.8077-2-luke.r.nels@gmail.com
Diffstat (limited to 'fs/orangefs/upcall.h')
0 files changed, 0 insertions, 0 deletions