diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2020-05-28 16:53:54 +0200 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2020-05-28 21:52:31 +0200 |
commit | 78c1c35437a013c63acbff6926ff8d254e283d69 (patch) | |
tree | 96a630975112891435c7b7dc926c75d1204ccbc0 /cpu/bpf.opc | |
parent | 989ade05525047fc6b94f24ece5fc09e076027b0 (diff) | |
download | gdb-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 'cpu/bpf.opc')
-rw-r--r-- | cpu/bpf.opc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cpu/bpf.opc b/cpu/bpf.opc index e70ee04..e2acaa4 100644 --- a/cpu/bpf.opc +++ b/cpu/bpf.opc @@ -129,6 +129,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; |