diff options
author | Luke Nelson <lukenels@cs.washington.edu> | 2020-07-20 19:52:39 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-07-21 13:26:25 -0700 |
commit | 804ec72c68c8477b8713a1e8f8eda120d3471031 (patch) | |
tree | 840d9967eae77dca98a37655859a18c040d30069 /arch/microblaze | |
parent | bfabff3cb0fef366086c64f24be8ab316a355b99 (diff) |
bpf, riscv: Add encodings for compressed instructions
This patch adds functions for encoding and emitting compressed riscv
(RVC) instructions to the BPF JIT.
Some regular riscv instructions can be compressed into an RVC instruction
if the instruction fields meet some requirements. For example, "add rd,
rs1, rs2" can be compressed into "c.add rd, rs2" when rd == rs1.
To make using RVC encodings simpler, this patch also adds helper
functions that selectively emit either a regular instruction or a
compressed instruction if possible.
For example, emit_add will produce a "c.add" if possible and regular
"add" otherwise.
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-3-luke.r.nels@gmail.com
Diffstat (limited to 'arch/microblaze')
0 files changed, 0 insertions, 0 deletions