Skip to content
Snippets Groups Projects
  1. Mar 15, 2023
  2. Feb 03, 2023
    • Guillermo E. Martinez's avatar
      bpf: fix error conversion from long unsigned int to unsigned int [-Werror=overflow] · 7f6ebecd
      Guillermo E. Martinez authored
      Regenerating BPF target using the maintainer mode emits:
      .../opcodes/bpf-opc.c:57:11: error: conversion from ‘long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709486335’ to ‘4294902015’ [-Werror=overflow]
        57 |   64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
      
      The use of a narrow size to handle the mask CGEN in instruction format
      is causing this error.  Additionally eBPF `call' instructions
      constructed by expressions using symbols (BPF_PSEUDO_CALL) emits
      annotations in `src' field of the instruction, used to identify BPF
      target endianness.
      
      cpu/
      	* bpf.cpu (define-call-insn): Remove `src' field from
      	instruction mask.
      
      include/
      	*opcode/cge.h (CGEN_IFMT): Adjust mask bit width.
      
      opcodes/
      	* bpf-opc.c: Regenerate.
      7f6ebecd
  3. Dec 31, 2022
  4. Jul 08, 2022
  5. Jun 27, 2022
    • Jan Beulich's avatar
      drop XC16x bits · ddd7bf3e
      Jan Beulich authored
      Commit 04f096fb ("Move the xc16x target to the obsolete list") moved
      the architecture from the "obsolete but still available" to the
      "obsolete / support removed" list in config.bfd, making the architecture
      impossible to enable (except maybe via "enable everything" options").
      
      Note that I didn't touch */po/*.po{,t} on the assumption that these
      would be updated by some (half)automatic means.
      ddd7bf3e
  6. May 11, 2022
    • Alan Modra's avatar
      opcodes cgen: remove use of PTR · 0dfdb523
      Alan Modra authored
      Note that opcodes is regenerated with cgen commit d1dd5fcc38e reverted,
      due to failure of bpf to compile with that patch applied.
      
      .../opcodes/bpf-opc.c:57:11: error: conversion from ‘long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709486335’ to ‘4294902015’ [-Werror=overflow]
         57 |   64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
      plus other similar errors.
      
      cpu/
      	* mep.opc (print_tpreg, print_spreg): Delete unnecessary
      	forward declarations.  Replace PTR with void *.
      	* mt.opc (print_dollarhex, print_pcrel): Delete forward decls.
      opcodes/
      	* bpf-desc.c, * bpf-dis.c, * cris-desc.c,
      	* epiphany-desc.c, * epiphany-dis.c,
      	* fr30-desc.c, * fr30-dis.c, * frv-desc.c, * frv-dis.c,
      	* ip2k-desc.c, * ip2k-dis.c, * iq2000-desc.c, * iq2000-dis.c,
      	* lm32-desc.c, * lm32-dis.c, * m32c-desc.c, * m32c-dis.c,
      	* m32r-desc.c, * m32r-dis.c, * mep-desc.c, * mep-dis.c,
      	* mt-desc.c, * mt-dis.c, * or1k-desc.c, * or1k-dis.c,
      	* xc16x-desc.c, * xc16x-dis.c,
      	* xstormy16-desc.c, * xstormy16-dis.c: Regenerate.
      0dfdb523
  7. Apr 30, 2022
    • Thomas Hebb's avatar
      opcodes: don't assume ELF in riscv, csky, rl78, mep disassemblers · 16089f32
      Thomas Hebb authored
      Currently, the get_disassembler() implementations for riscv, csky, and
      rl78--and mep_print_insn() for mep--access ELF variants of union fields
      without first checking that the bfd actually represents an ELF.  This
      causes undefined behavior and crashes when disassembling non-ELF files
      (the "binary" BFD, for example).  Fix that.
      16089f32
  8. Jan 22, 2022
  9. Jul 05, 2021
    • Alan Modra's avatar
      Re: opcodes: constify & local meps macros · 4dcdbbd1
      Alan Modra authored
      Commit f375d32b changed a generated file.  Edit the source instead.
      
      	* mep.opc (macros): Make static and const.
      	(lookup_macro): Return and use const pointer.
      	(expand_macro): Make mac param const.
      	(expand_string): Make pmacro const.
      4dcdbbd1
  10. Jul 03, 2021
  11. May 06, 2021
    • Stafford Horne's avatar
      or1k: Implement relocation R_OR1K_GOT_AHI16 for gotha() · 0b3e14c9
      Stafford Horne authored
      The gotha() relocation mnemonic will be outputted by OpenRISC GCC when
      using the -mcmodel=large option.  This relocation is used along with
      got() to generate 32-bit GOT offsets.  This increases the previous GOT
      offset limit from the previous 16-bit (64K) limit.
      
      This is needed on large binaries where the GOT grows larger than 64k.
      
      bfd/ChangeLog:
      
      	PR 21464
      	* bfd-in2.h: Add BFD_RELOC_OR1K_GOT_AHI16 relocation.
      	* elf32-or1k.c (or1k_elf_howto_table, or1k_reloc_map): Likewise.
      	(or1k_final_link_relocate, or1k_elf_relocate_section,
      	or1k_elf_check_relocs): Likewise.
      	* libbfd.h (bfd_reloc_code_real_names): Likewise.
      	* reloc.c: Likewise.
      
      cpu/ChangeLog:
      
      	PR 21464
      	* or1k.opc (or1k_imm16_relocs, parse_reloc): Define parse logic
      	for gotha() relocation.
      
      include/ChangeLog:
      
      	PR 21464
      	* elf/or1k.h (elf_or1k_reloc_type): Define R_OR1K_GOT_AHI16 number.
      
      opcodes/ChangeLog:
      
      	PR 21464
      	* or1k-asm.c: Regenerate.
      
      gas/ChangeLog:
      
      	PR 21464
      	* testsuite/gas/or1k/reloc-1.s: Add test for new relocation.
      	* testsuite/gas/or1k/reloc-1.d: Add test result for new
      	relocation.
      
      Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
      
      fixup reloc, add tests
      0b3e14c9
  12. Mar 31, 2021
    • Alan Modra's avatar
      Use bool in opcodes · 78933a4a
      Alan Modra authored
      cpu/
      	* frv.opc: Replace bfd_boolean with bool, FALSE with false, and
      	TRUE with true throughout.
      opcodes/
      	* sysdep.h (POISON_BFD_BOOLEAN): Define.
      	* aarch64-asm-2.c, * aarch64-asm.c, * aarch64-asm.h,
      	* aarch64-dis-2.c, * aarch64-dis.c, * aarch64-dis.h,
      	* aarch64-gen.c, * aarch64-opc.c, * aarch64-opc.h, * arc-dis.c,
      	* arc-dis.h, * arc-fxi.h, * arc-opc.c, * arm-dis.c, * bfin-dis.c,
      	* cris-dis.c, * csky-dis.c, * csky-opc.h, * dis-buf.c,
      	* disassemble.c, * frv-opc.c, * frv-opc.h, * h8300-dis.c,
      	* i386-dis.c, * m68k-dis.c, * metag-dis.c, * microblaze-dis.c,
      	* microblaze-dis.h, * micromips-opc.c, * mips-dis.c,
      	* mips-formats.h, * mips-opc.c, * mips16-opc.c, * mmix-dis.c,
      	* msp430-dis.c, * nds32-dis.c, * nfp-dis.c, * nios2-dis.c,
      	* ppc-dis.c, * riscv-dis.c, * score-dis.c, * score7-dis.c,
      	* tic6x-dis.c, * v850-dis.c, * vax-dis.c, * wasm32-dis.c,
      	* xtensa-dis.c: Replace bfd_boolean with bool, FALSE with false,
      	and TRUE with true throughout.
      78933a4a
  13. Mar 29, 2021
    • Alan Modra's avatar
      opcodes int vs bfd_boolean fixes · 3d7d6c1b
      Alan Modra authored
      cpu/
      	* frv.opc (frv_is_branch_major, frv_is_float_major),
      	(frv_is_media_major, frv_is_branch_insn, frv_is_float_insn),
      	(frv_is_media_insn, spr_valid): Correct prototypes.
      include/
      	* opcode/aarch64.h (aarch64_opcode_encode): Correct prototype.
      opcodes/
      	* arc-dis.c (extract_operand_value): Correct NULL cast.
      	* frv-opc.h: Regenerate.
      3d7d6c1b
  14. Jan 09, 2021
  15. Oct 05, 2020
  16. Sep 18, 2020
    • David Faust's avatar
      bpf: xBPF SDIV, SMOD instructions · 6e25f888
      David Faust authored
      Add gas and opcodes support for two xBPF-exclusive ALU operations:
      SDIV (signed division) and SMOD (signed modulo), and add tests for
      them in gas.
      
      cpu/
      	* bpf.cpu (insn-op-code-alu): Add SDIV and SMOD.
      	(define-alu-insn-bin, daib): Take ISAs as an argument.
      	(define-alu-instructions): Update calls to daib pmacro with
      	ISAs; add sdiv and smod.
      
      gas/
      	* testsuite/gas/bpf/alu-xbpf.d: New file.
      	* testsuite/gas/bpf/alu-xbpf.s: Likewise.
      	* testsuite/gas/bpf/alu32-xbpf.d: Likewise.
      	* testsuite/gas/bpf/alu32-xbpf.d: Likewise.
      	* testuiste/gas/bpf/bpf.exp: Run new tests.
      
      opcodes/
      	* bpf-desc.c: Regenerate.
      	* bpf-desc.h: Likewise.
      	* bpf-opc.c: Likewise.
      	* bpf-opc.h: Likewise.
      6e25f888
  17. Sep 08, 2020
    • David Faust's avatar
      bpf: simulator: correct div, mod insn semantics · 3ad6c194
      David Faust authored
      The div and mod eBPF instructions are unsigned, but the semantic
      specification for the simulator incorrectly used signed operators.
      Correct them to unsigned versions, and correct the ALU tests in
      the simulator (which incorrectly assumed signed semantics).
      
      Tested in bpf-unknown-none.
      
      cpu/ChangeLog:
      2020-09-08  David Faust  <david.faust@oracle.com>
      
      	* bpf.cpu (define-alu-instructions): Correct semantic operators
      	for div, mod to unsigned versions.
      
      sim/ChangeLog:
      2020-09-08  David Faust  <david.faust@oracle.com>
      
      	* bpf/sem-be.c: Regenerate.
      	* bpf/sem-le.c: Likewise.
      
      sim/testsuite/ChangeLog:
      2020-09-08  David Faust  <david.faust@oracle.com>
      
      	* sim/bpf/alu.s: Correct div and mod tests.
      	* sim/bpf/alu32.s: Likewise.
      3ad6c194
  18. Sep 01, 2020
  19. Aug 26, 2020
    • David Faust's avatar
      bpf: add xBPF ISA · 4449c81a
      David Faust authored
      This patch adds support for xBPF, another ISA targetting the BPF
      virtual architecture. For now, the primary difference between eBPF
      and xBPF is that xBPF supports indirect calls through the
      'call %reg' form of the call instruction.
      
      bfd/
      	* archures.c (bfd_mach_xbpf): Define.
      	* bfd-in2.h: Regenerate.
      	* cpu-bpf.c (bfd_xbpf_arch) New.
      	(bfd_bpf_arch) Update next in list field to point to xbpf arch.
      
      cpu/
      	* bpf.cpu (arch bpf): Add xbpf mach and isas.
      	(define-xbpf-isa) New pmacro.
      	(all-isas) Add xbpfle,xbpfbe.
      	(endian-isas): New pmacro.
      	(mach xbpf): New.
      	(model xbpf-def): Likewise.
      	(h-gpr): Add xbpf mach.
      	(f-dstle, f-srcle, dstle, srcle): Add xbpfle isa.
      	(f-dstbe, f-srcbe, dstbe, srcbe): Add xbpfbe isa.
      	(define-alu-insn-un): Use new endian-isas pmacro.
      	(define-alu-insn-bin, define-alu-insn-mov): Likewise.
      	(define-endian-insn, define-lddw): Likewise.
      	(dlind, dxli, dxsi, dsti): Likewise.
      	(define-cond-jump-insn, define-call-insn): Likewise.
      	(define-atomic-insns): Likewise.
      
      gas/
      	* config/tc-bpf.c: Add option -mxbpf to select xbpf isa.
      	* testsuite/gas/bpf/indcall-1.d: New file.
      	* testsuite/gas/bpf/indcall-1.s: Likewise.
      	* testsuite/gas/bpf/indcall-bad-1.l: Likewise.
      	* testsuite/gas/bpf/indcall-bad-1.s: Likewise.
      	* testsuite/gas/bpf/bpf.exp: Run new tests.
      
      opcodes/
      	* bpf-desc.c: Regenerate.
      	* bpf-desc.h: Likewise.
      	* bpf-opc.c: Likewise.
      	* bpf-opc.h: Likewise.
      	* disassemble.c (disassemble_init_for_target): Set bits for xBPF
      	ISA when appropriate.
      4449c81a
  20. Jul 04, 2020
  21. Jun 25, 2020
    • David Faust's avatar
      cpu: fix offset16 type, update c-calls in bpf.cpu · d73be611
      David Faust authored
      Correct the type of the offset16 field to HI, and simplify memory
      accesses which use it. Also update c-calls in semantics for a
      few instructions.
      
      cpu/ChangeLog:
      
      2020-06-25 David Faust  <david.faust@oracle.com>
      
      	* bpf.cpu (f-offset16): Change type from INT to HI.
      	(dxli): Simplify memory access.
      	(dxsi): Likewise.
      	(define-endian-insn): Update c-call in semantics.
      	(dlabs) Likewise.
      	(dlind) Likewise.
      d73be611
  22. Jun 04, 2020
    • Jose E. Marchesi's avatar
      cpu,gas,opcodes: remove no longer needed workaround from the BPF port · d8740be1
      Jose E. Marchesi authored
      cpu/ChangeLog:
      
      2020-06-02  Jose E. Marchesi  <jose.marchesi@oracle.com>
      
      	* bpf.cpu (define-bpf-isa): Set base-insn-bitsize to 64.
      	* bpf.opc (bpf_print_insn): Do not set endian_code here.
      
      gas/ChangeLog:
      
      2020-06-04  Jose E. Marchesi  <jose.marchesi@oracle.com>
      
      	* config/tc-bpf.c (md_begin): Pass CGEN_CPU_OPEN_INSN_ENDIAN to
      	bpf_cgen_cpu_open.
      	(md_assemble): Remove no longer needed hack.
      
      opcodes/ChangeLog:
      
      2020-06-04  Jose E. Marchesi  <jose.marchesi@oracle.com>
      
      	* disassemble.c (disassemble_init_for_target): Set endian_code for
      	bpf targets.
      	* bpf-desc.c: Regenerate.
      	* bpf-opc.c: Likewise.
      	* bpf-dis.c: Likewise.
      d8740be1
    • Jose E. Marchesi's avatar
      opcodes: discriminate endianness and insn-endianness in CGEN ports · e9bffec9
      Jose E. Marchesi authored
      The CGEN support code in opcodes accesses instruction contents using a
      couple of functions defined in cgen-opc.c: cgen_get_insn_value and
      cgen_put_insn_value.  These functions use the "instruction endianness"
      in the CPU description to order the read/written bytes.
      
      The process of writing an instruction to the object file is:
      
        a) cgen_put_insn_value        ;; Writes out the opcodes.
        b) ARCH_cgen_insert_operand
             insert_normal
               insert_1
                 cgen_put_insn_value  ;; Writes out the bytes of the
                                      ;; operand.
      
      Likewise, the process of reading an instruction from the object file
      is:
      
        a) cgen_get_insn_value        ;; Reads the opcodes.
        b) ARCH_cgen_extract_operand
             extract_normal
               extract_1
                 cgen_get_insn_value  ;; Reads in the bytes of the
                                      ;; operand.
      
      As can be seen above, cgen_{get,put}_insn_value are used to both
      process the instruction opcodes (the constant fields conforming the
      base instruction) and also the values of the instruction operands,
      such as immediates.
      
      This is problematic for architectures in which the endianness of
      instructions is different to the endianness of data.  An example is
      BPF, where instructions are always encoded big-endian but the data may
      be either big or little.
      
      This patch changes the cgen_{get,put}_insn_value functions in order to
      get an extra argument with the endianness to use, and adapts the
      existin callers to these functions in order to provide cd->endian or
      cd->insn_endian, whatever appropriate.  Callers like extract_1 and
      insert_1 pass cd->endian (since they are reading/writing operand
      values) while callers reading/writing the base instruction pass
      cd->insn_endian instead.
      
      A few little adjustments have been needed in some existing CGEN based
      ports:
      * The BPF assembler uses cgen_put_insn_value.  It has been adapted to
        pass the new endian argument.
      * The mep port has code in mep.opc that uses cgen_{get,put}_insn_value.
        It has been adapted to pass the new endianargument.  Ditto for a
        call in the assembler.
      
      Tested with --enable-targets=all.
      Regested in all supported targets.
      No regressions.
      
      include/ChangeLog:
      
      2020-06-04  Jose E. Marchesi  <jose.marchesi@oracle.com>
      
      	* opcode/cgen.h: Get an `endian' argument in both
      	cgen_get_insn_value and cgen_put_insn_value.
      
      opcodes/ChangeLog:
      
      2020-06-04  Jose E. Marchesi  <jose.marchesi@oracle.com>
      
      	* cgen-opc.c (cgen_get_insn_value): Get an `endian' argument.
      	(cgen_put_insn_value): Likewise.
      	(cgen_lookup_insn): Pass endianness to cgen_{get,put}_insn_value.
      	* cgen-dis.in (print_insn): Likewise.
      	* cgen-ibld.in (insert_1): Likewise.
      	(insert_1): Likewise.
      	(insert_insn_normal): Likewise.
      	(extract_1): Likewise.
      	* bpf-dis.c: Regenerate.
      	* bpf-ibld.c: Likewise.
      	* bpf-ibld.c: Likewise.
      	* cgen-dis.in: Likewise.
      	* cgen-ibld.in: Likewise.
      	* cgen-opc.c: Likewise.
      	* epiphany-dis.c: Likewise.
      	* epiphany-ibld.c: Likewise.
      	* fr30-dis.c: Likewise.
      	* fr30-ibld.c: Likewise.
      	* frv-dis.c: Likewise.
      	* frv-ibld.c: Likewise.
      	* ip2k-dis.c: Likewise.
      	* ip2k-ibld.c: Likewise.
      	* iq2000-dis.c: Likewise.
      	* iq2000-ibld.c: Likewise.
      	* lm32-dis.c: Likewise.
      	* lm32-ibld.c: Likewise.
      	* m32c-dis.c: Likewise.
      	* m32c-ibld.c: Likewise.
      	* m32r-dis.c: Likewise.
      	* m32r-ibld.c: Likewise.
      	* mep-dis.c: Likewise.
      	* mep-ibld.c: Likewise.
      	* mt-dis.c: Likewise.
      	* mt-ibld.c: Likewise.
      	* or1k-dis.c: Likewise.
      	* or1k-ibld.c: Likewise.
      	* xc16x-dis.c: Likewise.
      	* xc16x-ibld.c: Likewise.
      	* xstormy16-dis.c: Likewise.
      	* xstormy16-ibld.c: Likewise.
      
      gas/ChangeLog:
      
      2020-06-04  Jose E. Marchesi  <jose.marchesi@oracle.com>
      
      	* cgen.c (gas_cgen_finish_insn): Pass the endianness to
      	cgen_put_insn_value.
      	(gas_cgen_md_apply_fix): Likewise.
      	(gas_cgen_md_apply_fix): Likewise.
      	* config/tc-bpf.c (md_apply_fix): Pass data endianness to
      	cgen_put_insn_value.
      	* config/tc-mep.c (mep_check_ivc2_scheduling): Pass endianness to
      	cgen_put_insn_value.
      
      cpu/ChangeLog:
      
      2020-06-02  Jose E. Marchesi  <jose.marchesi@oracle.com>
      
      	* mep.opc (print_slot_insn): Pass the insn endianness to
      	cgen_get_insn_value.
      e9bffec9
  23. May 28, 2020
    • Jose E. Marchesi's avatar
      cpu,opcodes: add instruction semantics to bpf.cpu and minor fixes · 78c1c354
      Jose E. Marchesi authored
      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.
      78c1c354
  24. May 21, 2020
    • Alan Modra's avatar
      Replace "if (x) free (x)" with "free (x)", opcodes · d96bf37b
      Alan Modra authored
      cpu/
      	* mep.opc (mep_cgen_expand_macros_and_parse_operand): Replace
      	"if (x) free (x)" with "free (x)".
      opcodes/
      	* arc-ext.c: Replace "if (x) free (x)" with "free (x)" throughout.
      	* sparc-dis.c: Likewise.
      	* tic4x-dis.c: Likewise.
      	* xtensa-dis.c: Likewise.
      	* bpf-desc.c: Regenerate.
      	* epiphany-desc.c: Regenerate.
      	* fr30-desc.c: Regenerate.
      	* frv-desc.c: Regenerate.
      	* ip2k-desc.c: Regenerate.
      	* iq2000-desc.c: Regenerate.
      	* lm32-desc.c: Regenerate.
      	* m32c-desc.c: Regenerate.
      	* m32r-desc.c: Regenerate.
      	* mep-asm.c: Regenerate.
      	* mep-desc.c: Regenerate.
      	* mt-desc.c: Regenerate.
      	* or1k-desc.c: Regenerate.
      	* xc16x-desc.c: Regenerate.
      	* xstormy16-desc.c: Regenerate.
      d96bf37b
  25. May 19, 2020
    • Stafford Horne's avatar
      or1k: Remove 64-bit support, it's not used and it breaks 32-bit hosts · ae440402
      Stafford Horne authored
      Reported by Rich Felker when building on 32-bit hosts.  Backwards jump
      negative offsets were not calculated correctly due to improper 32-bit
      to 64-bit zero-extension.  The 64-bit fields are present because we
      are mixing 32-bit and 64-bit architectures in our cpu descriptions.
      
      Removing 64-bit fixes the issue.  We don't use 64-bit, there is an architecture
      spec for 64-bit but no implementations or simulators.  My thought is if
      we need them in the future we should do the proper work to support both
      32-bit and 64-bit implementations co-existing then.
      
      cpu/ChangeLog:
      
      yyyy-mm-dd  Stafford Horne  <shorne@gmail.com>
      
      	PR 25184
      	* or1k.cpu (arch or1k): Remove or64 and or64nd machs.
      	(ORBIS-MACHS, ORFPX32-MACHS): Remove pmacros.
      	(cpu or1k64bf, mach or64, mach or64nd): Remove definitions.
      	* or1kcommon.cpu (h-fdr): Remove hardware.
      	* or1korfpx.cpu (rDDF, rADF, rBDF): Remove operand definitions.
      	(float-regreg-insn): Remove lf- mnemonic -d instruction pattern.
      	(float-setflag-insn-base): Remove lf-sf mnemonic -d pattern.
      	(float-cust-insn): Remove "lf-cust" cust-num "-d" pattern.
      	(lf-rem-d, lf-itof-d, lf-ftoi-d, lf-madd-d): Remove.
      ae440402
  26. Apr 16, 2020
    • David Faust's avatar
      cpu,gas,opcodes: support for eBPF JMP32 instruction class · c54a9b56
      David Faust authored
      Add support for the JMP32 class of eBPF instructions.
      
      cpu/ChangeLog
      
      	* bpf.cpu (define-cond-jump-insn): Renamed from djci.
      	(dcji) New version with support for JMP32
      
      gas/ChangeLog
      
      	* testsuite/gas/bpf/bpf.exp: Run jump32 tests.
      	* testsuite/gas/bpf/jump32.s: New file.
      	* testsuite/gas/bpf/jump32.d: Likewise.
      
      opcodes/ChangeLog
      
      	* bpf-desc.c: Regenerate.
      	* bpf-desc.h: Likewise.
      	* bpf-opc.c: Regenerate.
      	* bpf-opc.h: Likewise.
      c54a9b56
  27. Feb 03, 2020
  28. Feb 01, 2020
    • Alan Modra's avatar
      ubsan: frv: left shift of negative value · b2b1453a
      Alan Modra authored
      More non-bugs flagged by ubsan, unless you happen to be compiling for
      a 1's complement host.
      
      cpu/
      	* frv.cpu (f-u12): Multiply rather than left shift signed values.
      	(f-label16, f-label24): Likewise.
      opcodes/
      	* frv-ibld.c: Regenerate.
      b2b1453a
  29. Jan 30, 2020
    • Alan Modra's avatar
      ubsan: m32c: left shift of negative value · 0c115f84
      Alan Modra authored
      More nonsense fixing "bugs" with left shifts of signed values.  Yes,
      the C standard does say this is undefined (and right shifts of signed
      values are implementation defined BTW) but in practice there is no
      problem with current machines.  1's complement is a thing of the past.
      
      cpu/
      	* m32c.cpu (f-src32-rn-unprefixed-QI): Shift before inverting.
      	(f-src32-rn-prefixed-QI, f-dst32-rn-unprefixed-QI): Likewise.
      	(f-dst32-rn-prefixed-QI): Likewise.
      	(f-dsp-32-s32): Mask before shifting left.
      	(f-dsp-48-u32, f-dsp-48-s32): Likewise.
      	(f-bitbase32-16-s11-unprefixed): Multiply signed field rather than
      	shifting left.
      	(f-bitbase32-24-s11-prefixed, f-bitbase32-24-s19-prefixed): Likewise.
      	(h-gr-SI): Mask before shifting.
      opcodes/
      	* m32c-ibld.c: Regenerate.
      0c115f84
    • Jose E. Marchesi's avatar
      cpu,opcodes,gas: fix neg and neg32 instructions in BPF · bd434cc4
      Jose E. Marchesi authored
      This patch fixes the neg/neg32 BPF instructions, which have K (=0)
      instead of X (=1) in their header source bit, despite operating on
      registes.
      
      cpu/ChangeLog:
      
      2020-01-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
      
      	* bpf.cpu (define-alu-insn-un): The unary BPF instructions
      	(neg and neg32) use OP_SRC_K even if they operate only in
      	registers.
      
      opcodes/ChangeLog:
      
      2020-01-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
      
      	* bpf-opc.c: Regenerate.
      
      gas/ChangeLog:
      
      2020-01-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
      
      	* testsuite/gas/bpf/alu.d: Update expected opcode for `neg'.
      	* testsuite/gas/bpf/alu-be.d: Likewise.
      	* testsuite/gas/bpf/alu32.d: Likewise for `neg32'.
      	* testsuite/gas/bpf/alu32-be.d: Likewise.
      bd434cc4
  30. Jan 18, 2020
  31. Jan 13, 2020
  32. Jan 06, 2020
    • Alan Modra's avatar
      ubsan: m32c: left shift of negative value · cc6aa1a6
      Alan Modra authored
      There are probably a lot more of these still here.
      
      cpu/
      	* m32c.cpu (f-dsp-8-u16, f-dsp-8-s16): Rearrange to mask any sign
      	bits before shifting rather than masking after shifting.
      	(f-dsp-16-u16, f-dsp-16-s16, f-dsp-32-u16, f-dsp-32-s16): Likewise.
      	(f-dsp-40-u16, f-dsp-40-s16, f-dsp-48-u16, f-dsp-48-s16): Likewise.
      	(f-dsp-64-u16, f-dsp-8-s24): Likewise.
      	(f-bitbase32-16-s19-unprefixed): Avoid signed left shift.
      opcodes/
      	* m32c-ibld.c: Regenerate.
      cc6aa1a6
  33. Jan 04, 2020
  34. Dec 23, 2019
  35. Dec 20, 2019
  36. Dec 17, 2019
  37. Dec 16, 2019
  38. Dec 11, 2019
    • Alan Modra's avatar
      Remove more shifts for sign/zero extension · 1d61b032
      Alan Modra authored
      cpu/
      	* epiphany.cpu (f-sdisp11): Don't sign extend with shifts.
      	* lm32.cpu (f-branch, f-vall): Likewise.
      	* m32.cpu (f-lab-8-16): Likewise.
      opcodes/
      	* arc-dis.c (BITS): Don't truncate high bits with shifts.
      	* nios2-dis.c (nios2_print_insn_arg): Don't sign extend with shifts.
      	* tic54x-dis.c (print_instruction): Likewise.
      	* tilegx-opc.c (parse_insn_tilegx): Likewise.
      	* tilepro-opc.c (parse_insn_tilepro): Likewise.
      	* visium-dis.c (disassem_class0): Likewise.
      	* pdp11-dis.c (sign_extend): Likewise.
      	(SIGN_BITS): Delete.
      	* epiphany-ibld.c: Regenerate.
      	* lm32-ibld.c: Regenerate.
      	* m32c-ibld.c: Regenerate.
      1d61b032
Loading