aboutsummaryrefslogtreecommitdiff
path: root/opcodes/bpf-dis.c
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2020-05-28 16:53:54 +0200
committerJose E. Marchesi <jose.marchesi@oracle.com>2020-05-28 21:52:31 +0200
commit78c1c35437a013c63acbff6926ff8d254e283d69 (patch)
tree96a630975112891435c7b7dc926c75d1204ccbc0 /opcodes/bpf-dis.c
parent989ade05525047fc6b94f24ece5fc09e076027b0 (diff)
downloadgdb-78c1c35437a013c63acbff6926ff8d254e283d69.zip
gdb-78c1c35437a013c63acbff6926ff8d254e283d69.tar.gz
gdb-78c1c35437a013c63acbff6926ff8d254e283d69.tar.bz2
cpu,opcodes: add instruction semantics to bpf.cpu and minor fixes
This patch adds semantic RTL descriptions to the eBPF instructions defined in cpu/bpf.cpu. It also contains a couple of minor improvements. Tested in bpf-unknown-none targets. No regressions. cpu/ChangeLog: 2020-05-28 Jose E. Marchesi <jose.marchesi@oracle.com> David Faust <david.faust@oracle.com> * bpf.cpu (define-alu-insn-un): Add definitions of semantics. (define-alu-insn-mov): Likewise. (daib): Likewise. (define-alu-instructions): Likewise. (define-endian-insn): Likewise. (define-lddw): Likewise. (dlabs): Likewise. (dlind): Likewise. (dxli): Likewise. (dxsi): Likewise. (dsti): Likewise. (define-ldstx-insns): Likewise. (define-st-insns): Likewise. (define-cond-jump-insn): Likewise. (dcji): Likewise. (define-condjump-insns): Likewise. (define-call-insn): Likewise. (ja): Likewise. ("exit"): Likewise. (define-atomic-insns): Likewise. (sem-exchange-and-add): New macro. * bpf.cpu ("brkpt"): New instruction. (bpfbf): Set word-bitsize to 32 and insn-endian big. (h-gpr): Prefer r0 to `a' and r6 to `ctx'. (h-pc): Expand definition. * bpf.opc (bpf_print_insn): Set endian_code to BIG. opcodes/ChangeLog: 2020-05-28 Jose E. Marchesi <jose.marchesi@oracle.com> David Faust <david.faust@oracle.com> * bpf-desc.c: Regenerate. * bpf-opc.h: Likewise. * bpf-opc.c: Likewise. * bpf-dis.c: Likewise.
Diffstat (limited to 'opcodes/bpf-dis.c')
-rw-r--r--opcodes/bpf-dis.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/opcodes/bpf-dis.c b/opcodes/bpf-dis.c
index 5d0d08b..60e0d96 100644
--- a/opcodes/bpf-dis.c
+++ b/opcodes/bpf-dis.c
@@ -75,6 +75,7 @@ bpf_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
info->bytes_per_chunk = 1;
info->bytes_per_line = 8;
+ info->endian_code = BFD_ENDIAN_BIG;
/* Attempt to read the base part of the insn. */
buflen = cd->base_insn_bitsize / 8;