1. Sep 25, 2018
    • craigblackmore's avatar
      RISC-V: enable have_nonsteppable_watchpoint by default (#160) · 9ef556be
      craigblackmore authored
      * RISC-V: enable have_nonsteppable_watchpoint by default
      
      The RISC-V debug spec 0.13 recommends that write triggers fire before
      the write is committed. If the target follows this behaviour, then
      have_nonsteppable_watchpoint needs to be set to 1 so that GDB will step
      over the watchpoint before checking if the value has changed.
      
      This patch adds a setshow for have_nonsteppable_watchpoint which
      defaults to 1 to match the recommended behaviour. If a target does not
      follow this timing, then 'set riscv have_nonsteppable_watchpoint 0'
      will need to be issued on the command line.
      
      gdb/ChangeLog:
      
      	* riscv-tdep.c (set_have_nonsteppable_watchpoint): add
      	callback for 'set riscv have_nonsteppable_watchpoint'
      	(riscv_gdbarch_init): initialise gdbarch setting for
      	have_nonesteppable_watchpoint
      
      * Add changes following comments on upstream patch
      
      Adds a show method for 'show riscv have-nonsteppable-watchpoint'
      plus additional comment and formatting fixes.
      
      gdb/ChangeLog:
      
      	* riscv-tdep.c (show_have_nonsteppable_watchpoint): Add
      	callback for 'show riscv have-nonsteppable-watchpoint'.
      9ef556be
  2. May 18, 2018
  3. May 04, 2018
  4. Mar 29, 2018
  5. Mar 28, 2018
    • Tim Newsome's avatar
      Complete full reg list if some aren't readable · df83b475
      Tim Newsome authored
      Previously `info all-registers` and `info registers all` would terminate
      as soon as it got to a register that was not readable. Now the user gets
      a message and the register list continues.
      df83b475
  6. Jan 12, 2018
  7. Jan 10, 2018
  8. Jan 09, 2018
    • Tim Newsome's avatar
      Ignore errors when reading register to save them · 94368512
      Tim Newsome authored
      Debug servers may not be able to determine exactly which registers exist
      on a target, meaning in turn that gdb can't be sure. When gdb goes to
      save these registers before a function call, failure to read one of them
      should not be fatal.
      
      This change ignores these failures. Registers that were not read, will
      not be restored.
      
      Unfortunately for each register that can't be read there will be a
      message to the user. Getting rid of that message only for this use case
      is not trivial, so I'm punting on it for now.
      94368512
  9. Jan 06, 2018
  10. Jan 05, 2018
  11. Jan 04, 2018
  12. Dec 30, 2017
    • Jim Wilson's avatar
      RISC-V: Add missing privileged spec registers. · 248124ac
      Jim Wilson authored
      	gas/
      	* testsuite/gas/riscv/priv-reg.d, testsuite/gas/riscv/priv-reg.s: New.
      
      	include/
      	* opcode/riscv-opc.h (DECLARE_CSR): Add missing privileged registers.
      	Sort to match privileged spec documentation order.
      	(DECLARE_CSR_ALIAS): Add ubadaddr, and comments.
      248124ac
    • Jim Wilson's avatar
      RISC-V: Add compressed instruction hints, and a few misc cleanups. · bee792f8
      Jim Wilson authored
      	gas/
      	* config/tc-riscv.c (risc_ip) <o>: Add comment.
      	* testsuite/gas/riscv/c-nonzero-imm.d,
      	* testsuite/gas/riscv/c-nonzero-imm.l,
      	* testsuite/gas/riscv/c-nonzero-imm.s,
      	* testsuite/gas/riscv/c-nonzero-reg.d,
      	* testsuite/gas/riscv/c-nonzero-reg.l,
      	* testsuite/gas/riscv/c-nonzero-reg.s,
      	* testsuite/gas/riscv/c-zero-imm-64.d,
      	* testsuite/gas/riscv/c-zero-imm-64.s,
      	* testsuite/gas/riscv/c-zero-imm.d, testsuite/gas/riscv/c-zero-imm.s,
      	* testsuite/gas/riscv/c-zero-reg.d,
      	* testsuite/gas/riscv/c-zero-reg.s: New.
      
      	opcodes/
      	* riscv-opc.c (match_c_add_with_hint, match_c_lui_with_hint): New.
      	(riscv_opcodes) <li>: Delete "d,0" line.  Change Cj to Co.
      	<andi, and, add, addiw, addw, c.addi>: Change Cj to Co.
      	<add>: Add explanatory comment for 4-operand add instruction.
      	<c.nop>: Add support for immediate operand.
      	<c.mv, c.add>: Use match_c_add_with_hint instead of match_c_add.
      	<c.lui>: Use match_c_lui_with_hint instead of match_c_lui.
      	<c.li, c.slli>: Use match_opcode instead of match_rd_nonzero.
      bee792f8
    • Jim Wilson's avatar
      Add missing RISC-V fsrmi and fsflagsi instructions. · 7d895b6f
      Jim Wilson authored
      	PR 22599
      	gas/
      	* testsuite/gas/riscv/fsxxi.d, testsuite/gas/riscv/fsxxi.s: New.
      	opcodes/
      	* riscv-opc.c (riscv_opcodes) <fsrmi, fsflagsi>: New.
      7d895b6f
    • Jim Wilson's avatar
      Objcopy interleave fails if section address not multiple of interleave. · 04d33e4a
      Jim Wilson authored
      	PR 22465
      	binutils/
      	* objcopy.c (copy_section): New local extra.  If isection->lma not
      	exactly divisible by interleave, then bias from.  Also adjust
      	osection->lma if necessary.
      
      	ld/
      	* testsuite/ld-elf/interleave-0.d, testsuite/ld-elf/interleave-4.d,
      	* testsuite/ld-elf/interleave.ld, testsuite/ld-elf/interleave.s: New.
      04d33e4a
    • Jim Wilson's avatar
      Really fix riscv shared library __global_pointer$ problem. · 71a8fbb5
      Jim Wilson authored
      	ld/
      	* emulparams/elf32lriscv-defs.sh (SDATA_START_SYMBOLS): Remove HIDDEN.
      	Don't define __global_pointer$ when CREATE_SHLIB.
      	* testsuite/ld-riscv-elf/gp-hidden-64.rd,
      	* testsuite/ld-riscv-elf/gp-hidden-lib.rd,
      	* testsuite/ld-riscv-elf/gp-hidden-lib.s,
      	* testsuite/ld-riscv-elf/gp-hidden-ver-64.rd,
      	* testsuite/ld-riscv-elf/gp-hidden-ver.rd,
      	* testsuite/ld-riscv-elf/gp-hidden-ver.s,
      	* testsuite/ld-riscv-elf/gp-hidden-ver.ver,
      	* testsuite/ld-riscv-elf/gp-hidden.rd,
      	* testsuite/ld-riscv-elf/gp-hidden.s,
      	* testsuite/ld-riscv-elf/gp-hidden.sd: Delete.
      	* testsuite/ld-riscv-elf/gp-test-lib.sd,
      	* testsuite/ld-riscv-elf/gp-test.s,
      	* testsuite/ld-riscv-elf/gp-test.sd: New.
      	* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Rewrite gp tests.
      71a8fbb5
    • Jim Wilson's avatar
      Riscv shared libraries should not export __global_pointer$. · 355497b4
      Jim Wilson authored
      	ld/
      	* emulparams/elf32lriscv-defs.sh (SDATA_START_SYMBOLS): Mark
      	__global_pointer$ as HIDDEN.
      	* testsuite/ld-riscv-elf/gp-hidden-64.rd: New.
      	* testsuite/ld-riscv-elf/gp-hidden-lib.rd: New.
      	* testsuite/ld-riscv-elf/gp-hidden-lib.s: New.
      	* testsuite/ld-riscv-elf/gp-hidden-ver-64.rd: New.
      	* testsuite/ld-riscv-elf/gp-hidden-ver.rd: New.
      	* testsuite/ld-riscv-elf/gp-hidden-ver.s: New.
      	* testsuite/ld-riscv-elf/gp-hidder-ver.ver: New.
      	* testsuite/ld-riscv-elf/gp-hidden.rd: New.
      	* testsuite/ld-riscv-elf/gp-hidden.s: New.
      	* testsuite/ld-riscv-elf/gp-hidden.sd: New.
      	* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Change riscv to riscv*.
      	Run the new tests with run_ld_link_tests.
      355497b4
    • Jim Wilson's avatar
      Fix for texinfo 4.8. · bfd4dc43
      Jim Wilson authored
      	gas/
      	* doc/c-riscv.texi (RISC-V-Directives): Move @section immediately after
      	@node.
      bfd4dc43
    • Jim Wilson's avatar
      Update and clean up RISC-V gas documentation. · caf839a4
      Jim Wilson authored
      	gas/
      	* doc/as.texinfo (RISC-V): Alphabetize RISC-V entries.  Change
      	RISC-V-Opts to RISC-V-Options.  Delete redundant space.  Add -fpic
      	and related options to option list.
      	* doc/c-riscv.texi: (RISC-V-Options): Renamed from RISC-V-Opts.
      	(RISC-V Options): Renamed from Options.  Add missing period.
      	(-fpic): Also mention -fPIC.
      	(RISC-V Directives): New node.
      caf839a4
    • Jim Wilson's avatar
      Give Palmer co-credit for last patch. · df726395
      Jim Wilson authored
      df726395
    • Jim Wilson's avatar
      Fix riscv malloc error on small alignment after norvc. · 0362ab46
      Jim Wilson authored
      	gas/
      	* config/tc-riscv.c (riscv_frag_align_code): New local insn_alignment.
      	Early return if bytes less than or equal to insn_alignment.
      	* testsuite/gas/riscv/align-1.l: New.
      	* testsuite/gas/riscv/align-1.s: New.
      	* testsuite/gas/riscv/riscv.exp: Use run_dump_tests.  Use run_list_test
      	for align-1.
      0362ab46
  13. Dec 29, 2017
  14. Dec 20, 2017
  15. Dec 19, 2017
  16. Dec 13, 2017
  17. Dec 05, 2017
  18. Nov 29, 2017
    • Tim Newsome's avatar
      Merge pull request #115 from timsifive/xml_registers · cdc66828
      Tim Newsome authored
      Add support for servers that send an XML target description
      cdc66828
    • Tim Newsome's avatar
      Incorporate review feedback. · 52cca9eb
      Tim Newsome authored
      Minor debug print/assert fixes.
      52cca9eb
    • Jim Wilson's avatar
      Compress loads/stores with implicit 0 offset. · c6a5890f
      Jim Wilson authored
      Loads and stores with an explcit 0 offset were compressed, but loads and
      stores with an implicit 0 offset were not compressed.  This patch fixes this
      by handling a missing offset same as a zero offset.  This also adds tests
      to check every case.  Verified on riscv32-elf and riscv64-elf, with check-gas,
      check-binutils, and check-ld.  Committed.
      
      	gas/
      	* config/tc-riscv.c (riscv_handle_implicit_zero_offset): New.
      	(riscv_ip): Cases 'k', 'l', 'm', 'n', 'M', 'N', add call to
      	riscv_handle_implicit_zero_offset.  At label load_store, replace
      	existing code with call to riscv_handle_implicit_zero_offset.
      	* testsuite/gas/riscv/c-ld.d, testsuite/gas/riscv/c-ld.s: New.
      	* testsuite/gas/riscv/c-lw.d, testsuite/gas/riscv/c-lw.s: New.
      	* testsuite/gas/riscv/riscv.exp: Run new tests.
      c6a5890f
  19. Nov 28, 2017
    • Nick Clifton's avatar
      Add support for the new names of the RISC-V fmv.x.s and fmv.s.x instructions,... · 8481854f
      Nick Clifton authored
      Add support for the new names of the RISC-V fmv.x.s and fmv.s.x instructions, vis: fmv.x.w and fmv.w.x.
      
      	PR 22179
      opcodes	* riscv-opc.c (riscv_opcodes): Add fmv.x.w and fmv.w.x as the new
      	names for the fmv.x.s and fmv.s.x instructions respectively.
      
      gas	* testsuite/gas/riscv/fmv.x.s: New file: Tests the support for the
      	renamed fmv.x.s and fmv.s.x instructions.
      	* testsuite/gas/riscv/fmv.x.d: New file: Test driver.
      8481854f
  20. Nov 20, 2017