Commit graph

116313 commits

Author SHA1 Message Date
Simon Marchi
539223dec9 gdb: make get_cbfd_soname_build_id static
It is only used in solib.c.

Change-Id: I43461d13d84d65c4f6913d4033678d8983b9910b
Approved-By: Pedro Alves <pedro@palves.net>
Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
2023-10-19 10:57:51 -04:00
Simon Marchi
1f08aca9d0 gdbsupport: use "reference" and "pointer" type aliases in intrusive_list
It seems to me like the code should used the defined type aliases, for
consistency.

Change-Id: Ib52493ff18ad29464405275bc10a0c6704ed39e9
Approved-By: Pedro Alves <pedro@palves.net>
Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
2023-10-19 10:57:51 -04:00
Simon Marchi
bb86ab837e gdb: replace some so_list parameters to use references
A subsequent patch changes so_list to be linked using
intrusive_list.  Iterating an intrusive_list yields some references to
the list elements.  Convert some functions accepting so_list objects to
take references, to make things easier and more natural.  Add const
where possible and convenient.

Change-Id: Id5ab5339c3eb6432e809ad14782952d6a45806f3
Approved-By: Pedro Alves <pedro@palves.net>
Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
2023-10-19 10:57:51 -04:00
Simon Marchi
c1d21880e9 gdb: make interps_notify work with references
A subsequent patch changes the interp::on_solib_loaded and
interp::on_solib_unloaded methods to take references.  This highlighted
that interps_notify did not work with reference parameters.

Fix that by changing interps_notify's `args` arg to be a universal
reference (&&).  Change the type of the method to be auto-deduced as an
additional template parameter, otherwise the signature of the callback
function would never match:

      CXX    interps.o
    /home/simark/src/binutils-gdb/gdb/interps.c: In function ‘void interps_notify_signal_received(gdb_signal)’:
    /home/simark/src/binutils-gdb/gdb/interps.c:378:18: error: no matching function for call to ‘interps_notify(void (interp::*)(gdb_signal), gdb_signal&)’
      378 |   interps_notify (&interp::on_signal_received, sig);
          |   ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/simark/src/binutils-gdb/gdb/interps.c:363:1: note: candidate: ‘template<class ... Args> void interps_notify(void (interp::*)(Args ...), Args&& ...)’
      363 | interps_notify (void (interp::*method) (Args...), Args&&... args)
          | ^~~~~~~~~~~~~~
    /home/simark/src/binutils-gdb/gdb/interps.c:363:1: note:   template argument deduction/substitution failed:
    /home/simark/src/binutils-gdb/gdb/interps.c:378:18: note:   inconsistent parameter pack deduction with ‘gdb_signal’ and ‘gdb_signal&’
      378 |   interps_notify (&interp::on_signal_received, sig);
          |   ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I0cd9378e24ef039f30f8e14f054f8d7fb539c838
Approved-By: Pedro Alves <pedro@palves.net>
Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
2023-10-19 10:57:51 -04:00
Simon Marchi
581b34c2a1 gdb: add program_space parameter to target_so_ops::clear_solib
The clear_solib is implicitly meant to clear the resources associated to
the current program space (that's what the solib implementations that
actually support multi-program-space / multi-inferior do).  Make that
explicit by adding a program_space parameter and pass down
current_program_space in call sites.  The implementation of the
clear_solib callbacks is fairly simple, I don't think any of them rely
on global state other than accessing current_program_space.

Change-Id: I8d0cc4db7b4f8db8d7452879c0c62db03269bf46
Approved-By: Pedro Alves <pedro@palves.net>
Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
2023-10-19 10:57:51 -04:00
Simon Marchi
6fe4d5bf18 gdb: remove empty clear_solib functions
Make the target_so_ops::clear_solib method optional, remove two empty
implementations.

Change-Id: Ifda297d50c74327d337091c58cdb5b3b60382591
Approved-By: Pedro Alves <pedro@palves.net>
Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
2023-10-19 10:57:51 -04:00
Nelson Chu
d08515a68e RISC-V: Don't do undefweak relaxations for the linker_def symbols.
I get the following truncated errors recently when running riscv-gnu-toolchain
regressions,

/scratch/riscv-gnu-toolchain/regression/build/linux-rv32imafdc-ilp32d-medlow/build-glibc-linux-rv32imafdc-ilp32d/libc.a(libc-start.o): in function `elf_irela':
/scratch/riscv-gnu-toolchain/glibc/csu/../sysdeps/riscv/dl-irel.h:47:(.text+0x88): relocation truncated to fit: R_RISCV_GPREL_I against symbol `__ehdr_start' defined in .note.ABI-tag section in /scratch/riscv-gnu-toolchain/regression/build/linux-rv32imafdc-ilp32d-medlow/build-glibc-linux-rv32imafdc-ilp32d/elf/sln

The linker_def symbols like __ehdr_start that may be undefweak in early stages
of linking, including relax stage, but are guaranteed to be defined later.
Therefore, it seems like we shouldn't do the undefweak relaxations for these
kinds of symbols since they may be defined after relaxations.

bfd/
	* elfnn-riscv.c (_bfd_riscv_relax_section): Don't do undefweak
	relaxations for the linker_def symbols.
2023-10-19 12:19:53 +08:00
Tsukasa OI
6f85247eec RISC-V: Remove semicolons from DECLARE_INSN
This is for consistency and to prevent possible unnecessary errors due
to this inconsistency.

include/ChangeLog:

	* opcode/riscv-opc.h (DECLARE_INSN): Remove semicolons from the
	end of each entry.
2023-10-19 01:06:34 +00:00
GDB Administrator
e734b3e980 Automatic date update in version.in 2023-10-19 00:00:24 +00:00
Lancelot Six
99d603ec89 gdb/testsuite/gdb.rocm: Fix incorrect use of continue N in multi-inferior-gpu.exp
The gdb.rocm/multi-inferior-gpu.exp testcase uses a "continue $thread"
command, but this is incorrect.  If "continue" is given an argument, it
sets the ignore count of the breakpoint the thread stopped at.

For this testcase it does not really matter since the breakpoint is not
meant to be hit anymore, so whatever the ignore count is won't influence
the outcome of the test.  It is worth fixing nevertheless.

Change-Id: I0eb674d5529cdeb9e808b74870a29b6077265737
Approved-By: Simon Marchi <simon.marchi@efficios.com>
2023-10-18 20:31:04 +00:00
Jaydeep Patil
1c37b30945 sim/riscv: fix JALR instruction simulation
Fix 32bit 'jalr rd,ra,imm' integer instruction, where RD was written
before using it to calculate destination address.

This commit also improves testutils.inc for riscv; make use of
pushsection and popsection when adding things to .data, and setup the
%gp global pointer register within the 'start' macro.

Approved-By: Andrew Burgess <aburgess@redhat.com>
2023-10-18 17:55:31 +01:00
Nick Alcock
29736fc507 libctf: check for problems with error returns
We do this as a writable test because the only known-affected platforms
(with ssize_t longer than unsigned long) use PE, and we do not have support
for CTF linkage in the PE linker yet.

	PR libctf/30836
	* libctf/testsuite/libctf-writable/libctf-errors.*: New test.
2023-10-18 12:41:00 +01:00
Lancelot Six
fded0fb898 gdb/testsuite/gdb.rocm: Check value returned by hipDeviceSynchronize
Functions of the hip runtime returning a hipError_t can be marked
nodiscard depending on the configuration[1] (when compiled with C++17).

This patch makes sure that we always check the value returned by
hipDeviceSynchronize and friends, and print an error message when
appropriate.  This avoid a wall of warnings when running the testsuite
if the compiler defaults to using C++17.

It is always a good practice to check the return values anyway.

[1] https://github.com/ROCm-Developer-Tools/HIP/blob/docs/5.7.1/include/hip/hip_runtime_api.h#L203-L218

Change-Id: I2a819a8ac45f4bcf814efe9a2ff12c6a7ad22f97
Approved-By: Simon Marchi <simon.marchi@efficios.com>
2023-10-18 08:26:23 +00:00
Torbjörn SVENSSON
0f79aa900f libctf: Return CTF_ERR in ctf_type_resolve_unsliced PR 30836
In commit 998a4f589d, all but one return
statement was updated to return the error proper value. This commit
rectifies that missed return statement.

libctf/
	ctf-types.c (ctf_type_resolve_unsliced): Return CTF_ERR on error.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2023-10-18 09:39:59 +02:00
Tom de Vries
b6d3616fb3 [gdb/testsuite] Fix gdb.base/jit-bfd-name.exp
When running test-case gdb.base/jit-bfd-name.exp, I run into:
...
ERROR: tcl error sourcing gdb/testsuite/gdb.base/jit-bfd-name.exp.
ERROR: can't read "start": no such variable
...

The problem is that commit c96ceed9dc ("gdb: include the end address in
in-memory bfd filenames") introduced a use of variable start, but not a
definition.

Fix this by adding the missing definition.

Tested on x86_64-linux.
2023-10-18 08:26:20 +02:00
Tom de Vries
8bb3d8b1f9 [gdb/symtab] Fix two style issues in gdb/dwarf2/index-write.c
While reviewing gdb/dwarf2/index-write.c I noticed two style issues.

Fix these.

Tested on x86_64-linux.

Approved-By: Tom Tromey <tom@tromey.com>
2023-10-18 07:45:39 +02:00
Tom de Vries
729d066794 [gdb/symtab] Fix style issues in v9 .gdb_index section support
Post-commit review pointed out a few style issues in commit 8b9c08edda
("[gdb/symtab] Add name_of_main and language_of_main to the DWARF index").

Fix these.

Tested on x86_64-linux.

Reported-By: Tom Tromey <tom@tromey.com>
Approved-By: Tom Tromey <tom@tromey.com>
2023-10-18 07:45:39 +02:00
Nelson Chu
4352c0ac04 RISC-V: Make sure rv32q conflict won't affect the zfa gas testcases.
According to the commit 51498ab9ab, the q extension was no longer allowed
for rv32 since version 2.2.  Therefore, make sure the version of q is larger
than 2.2, in case the new extension conflict breaks the toolchain regressions,
which built with the old -misa-spec.

gas/
	* testsuite/gas/riscv/zfa-zvfh.d: Set q to v2.2.
	* testsuite/gas/riscv/zfa.d: Likewise.
2023-10-18 09:48:35 +08:00
caiyinyu
85ad846e72 LoongArch: Correct comments. 2023-10-18 08:58:05 +08:00
GDB Administrator
cc45b28991 Automatic date update in version.in 2023-10-18 00:00:14 +00:00
Neal Frager
1a5e256f20 gas: testsuite: microblaze: Add new bit-field tests
This patch adds new gas tests for the
microblaze bsefi and bsifi instructions.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Michael J. Eager <eager@eagercon.com>
2023-10-17 15:57:24 -07:00
Markus Metzger
c96ceed9dc gdb: include the end address in in-memory bfd filenames
Commit

    66984afd29 gdb: include the base address in in-memory bfd filenames

added the base address to in-memory bfd filenames.  Also add the end
address to allow dumping the in-memory bfd using the 'dump memory'
command.
2023-10-17 15:46:05 +00:00
Torbjörn SVENSSON
998a4f589d libctf: Sanitize error types for PR 30836
Made sure there is no implicit conversion between signed and unsigned
return value for functions setting the ctf_errno value.
An example of the problem is that in ctf_member_next, the "offset" value
is either 0L or (ctf_id_t)-1L, but it should have been 0L or -1L.
The issue was discovered while building a 64 bit ld binary to be
executed on the Windows platform.
Example object file that demonstrates the issue is attached in the PR.

libctf/
	Affected functions adjusted.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Co-Authored-By: Yvan ROUX <yvan.roux@foss.st.com>
2023-10-17 17:31:20 +02:00
Nick Clifton
22bfda88f8 Update the documentation of the LINKER_VERSIOn script command to actually mention the name of the command. 2023-10-17 10:42:44 +01:00
Tom de Vries
dcbdb080ed [gdb/cli] Keep track of styling failures in source_cache
In source_cache::ensure, keep track of which files failed to be styled, and
don't attempt to style them again in case the file dropped out of the cache.

Tested on x86_64-linux.

Reviewed-By: Lancelot Six <lancelot.six@amd.com>
2023-10-17 11:38:06 +02:00
Tom de Vries
62dfd02e30 [gdb/cli] Factor out try_source_highlight
Function source_cache::ensure contains some code using the GNU
source-highlight library.

The code is a sizable part of the function, and contains conditional
compilation in a slightly convoluted way:
...
       if (!already_styled)
 #endif /* HAVE_SOURCE_HIGHLIGHT */
       {
...

Fix this by factoring out the code into new function try_source_highlight,
such that:
- source_cache::ensure is easier to read, and
- the conditional compilation is at the level of the function body.

Tested on x86_64-linux.

Reviewed-By: Lancelot Six <lancelot.six@amd.com>
2023-10-17 11:38:06 +02:00
Tom de Vries
7e56491567 [gdb/cli] Skip string copy in source_cache::ensure
In function source_cache::ensure we have:
...
 	      std::ostringstream output;
	      ...
	      contents = output.str ();
...
The last line causes an unnecessary string copy.

C++20 allows us to skip it, like this:
...
	      contents = std::move (output).str ();
...

Use the more efficient solution.

Tested on x86_64-linux.

Reviewed-By: Lancelot Six <lancelot.six@amd.com>
2023-10-17 11:38:06 +02:00
mengqinggang
3233ad1e4e LoongArch: readelf -d RELASZ excludes .rela.plt size
Before, readelf -d RELASZ is the sum of .rela.dyn size and .rela.plt size.
To consistent with LoongArch lld, RELASZ chang to only the size of .rela.dyn.
2023-10-17 14:57:04 +08:00
Alan Modra
84f24adc5b asan: Invalid free in alpha_ecoff_get_relocated_section_contents
This fixes an ancient bug in commit a3a33af390 (which makes me think
this code has never been used).

	* coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Iterate
	through reloc_vector using a temp.
2023-10-17 15:17:25 +10:30
Tsukasa OI
f46ff02f18 RISC-V: Fix typo
include/ChangeLog:

	* opcode/riscv-opc.h: Fix typo.
2023-10-17 02:09:44 +00:00
John Baldwin
2b6cdc46a2 nat/x86-cpuid.h: Remove non-x86 fallbacks
This header is only suitable for use on x86 hosts and is only included
there, so these fallbacks should not be needed.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
2023-10-16 17:36:58 -07:00
GDB Administrator
43b1a3cb34 Automatic date update in version.in 2023-10-17 00:00:45 +00:00
Simon Marchi
8375fdfe4c gdb: remove unnecessary declarations in target.c
I found that these local declarations were not needed, remove them.
Tested by rebuilding.

Change-Id: I8d4fd0839ee1063b91dc002216d683aee0d4be22
2023-10-16 15:49:56 -04:00
Tom Tromey
41ab08f84b Have DAP handle non-Value results from 'children'
A pretty-printer's 'children' method may return values other than a
gdb.Value -- it may return any value that can be converted to a
gdb.Value.

I noticed that this case did not work for DAP.  This patch fixes the
problem.
2023-10-16 09:40:11 -06:00
Tom Tromey
ee81567c7c Handle gdb.LazyString in DAP
Andry pointed out that the DAP code did not properly handle
gdb.LazyString results from a pretty-printer, yielding:

    TypeError: Object of type LazyString is not JSON serializable

This patch fixes the problem, partly with a small patch in varref.py,
but mainly by implementing tp_str for LazyString.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2023-10-16 09:27:28 -06:00
Tom Tromey
138c7d2661 Fix register-setting response from DAP
Andry noticed that given a DAP setExpression request, where the
expression to set is a register, DAP will return the wrong value -- it
will return the old value, not the updated one.

This happens because gdb.Value.assign (which was recently added for
DAP) does not update the value.

In this patch, I chose to have the assign method update the Value
in-place.  It's also possible to have it return a new value, but this
didn't seem very useful to me.
2023-10-16 09:27:28 -06:00
Nick Clifton
fd00374fc7 Fix: GNU-ld: ARM: Issues when trying to set target output architecture
PR 28910
  * elf32-arm.c (elf32_arm_merge_private_bfd_data): Do not set output flags if the input flags have not been set.
2023-10-16 16:11:49 +01:00
Nick Clifton
a79e9a07a0 Fix: GNU-ld: ARM: Issues when trying to set target output architecture
PR 28910
  * lexsup.c (ld_options): Require that the --architecture option is given exactly two dashes, so that it does not become confused with the -a option.
2023-10-16 15:48:26 +01:00
Tom Tromey
ed5504c7b6 Add DAP scope cache
Andry Ogorodnik, a co-worker, noticed that multiple "scopes" requests
with the same frame would yield different variableReference values in
the response.

This patch adds a regression test for this, and adds a scope cache in
scopes.py, ensuring that multiple identical requests will get the same
response.

Tested-By: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
2023-10-16 08:40:18 -06:00
Tom de Vries
1d45d90934 [gdb/symtab] Work around PR gas/29517
When using glibc debuginfo generated with gas 2.39, we run into PR gas/29517:
...
$ gdb -q -batch a.out -ex start -ex "p (char *)strstr (\"haha\", \"ah\")"
Temporary breakpoint 1 at 0x40051b: file hello.c, line 6.

Temporary breakpoint 1, main () at hello.c:6
6	  printf ("hello\n");
Invalid cast.
...
while without glibc debuginfo installed we get the expected result:
...
$n = 0x7ffff7daa1b1 "aha"
...
and likewise with glibc debuginfo generated with gas 2.40.

The strstr ifunc resolves to __strstr_sse2_unaligned.  The problem is that gas
generates dwarf that states that the return type is void:
...
<1><3e1e58>: Abbrev Number: 2 (DW_TAG_subprogram)
    <3e1e59>   DW_AT_name        : __strstr_sse2_unaligned
    <3e1e5d>   DW_AT_external    : 1
    <3e1e5e>   DW_AT_low_pc      : 0xbbd2e
    <3e1e66>   DW_AT_high_pc     : 0xbc1c3
...
while the return type should be a DW_TAG_unspecified_type, as is the case
with gas 2.40.

We can still use the workaround of casting to another function type for both
__strstr_sse2_unaligned:
...
(gdb) p ((char * (*) (const char *, const char *))__strstr_sse2_unaligned) \
  ("haha", "ah")
$n = 0x7ffff7daa211 "aha"
...
and strstr (which requires using *strstr to dereference the ifunc before we
cast):
...
gdb) p ((char * (*) (const char *, const char *))*strstr) ("haha", "ah")
$n = 0x7ffff7daa251 "aha"
...
but that's a bit cumbersome to use.

Work around this in the dwarf reader, such that we have instead:
...
(gdb) p (char *)strstr ("haha", "ah")
$n = 0x7ffff7daa1b1 "aha"
...

This also requires fixing producer_is_gcc to stop returning true for
producer "GNU AS 2.39.0".

Tested on x86_64-linux.

Approved-By: Andrew Burgess <aburgess@redhat.com>

PR symtab/30911
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30911
2023-10-16 16:32:28 +02:00
Luis Machado
5d4a870e05 Only allow closure lookup by address if there are threads displaced-stepping
Since commit 1e5ccb9c5f, we have an assertion in
displaced_step_buffers::copy_insn_closure_by_addr that makes sure a closure
is available whenever we have a match between the provided address argument and
the buffer address.

That is fine, but the report in PR30872 shows this assertion triggering when
it really shouldn't. After some investigation, here's what I found out.

The 32-bit Arm architecture is the only one that calls
gdbarch_displaced_step_copy_insn_closure_by_addr directly, and that's because
32-bit Arm needs to figure out the thumb state of the original instruction
that we displaced-stepped through the displaced-step buffer.

Before the assertion was put in place by commit
1e5ccb9c5f, there was the possibility of
getting nullptr back, which meant we were not doing a displaced-stepping
operation.

Now, with the assertion in place, this is running into issues.

It looks like displaced_step_buffers::copy_insn_closure_by_addr is
being used to return a couple different answers depending on the
state we're in:

1 - If we are actively displaced-stepping, then copy_insn_closure_by_addr
is supposed to return a valid closure for us, so we can determine the
thumb mode.

2 - If we are not actively displaced-stepping, then copy_insn_closure_by_addr
should return nullptr to signal that there isn't any displaced-step buffers
in use, because we don't have a valid closure (but we should always have
this).

Since the displaced-step buffers are always allocated, but not always used,
that means the buffers will always contain data. In particular, the buffer
addr field cannot be used to determine if the buffer is active or not.

For instance, we cannot set the buffer addr field to 0x0, as that can be a
valid PC in some cases.

My understanding is that the current_thread field should be a good candidate
to signal that a particular displaced-step buffer is active or not. If it is
nullptr, we have no threads using that buffer to displaced-step.  Otherwise,
it is an active buffer in use by a particular thread.

The following fix modifies the displaced_step_buffers::copy_insn_closure_by_addr
function so we only attempt to return a closure if the buffer has an assigned
current_thread and if the buffer address matches the address argument.

Alternatively, I think we could use a function to answer the question of
whether we're actively displaced-stepping (so we have an active buffer) or
not.

I've also added a testcase that exercises the problem. It should reproduce
reliably on Arm, as that is the only architecture that faces this problem
at the moment.

Regression-tested on Ubuntu 20.04. OK?

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30872
Approved-By: Simon Marchi <simon.marchi@efficios.com>
2023-10-16 11:56:26 +01:00
Andrew Burgess
4b2f71e6c6 gdb: replace architecture_changed with new_architecture observer
This commit replaces the architecture_changed observer with a
new_architecture observer.

Currently the only user of the architecture_changed observer is the
Python code, which uses this observer to register the Python unwinder
with the architecture.

The problem is that the architecture_changed observer is triggered
from inferior::set_arch(), which only sees the inferior-wide gdbarch
value.  For targets that use thread-specific architectures, these
never trigger the architecture_changed observer, and so never have the
Python unwinder registered with them.

When it comes to unwinding GDB makes use of the frame's gdbarch, which
is based on the thread's regcache gdbarch, which is set in
get_thread_regcache to the value returned from
target_thread_architecture, which is not always the inferiors gdbarch
value, it might be a thread-specific gdbarch which has not passed
through inferior::set_arch().

The new_architecture observer will be triggered from
gdbarch_find_by_info, whenever a new gdbarch is created and
initialised.  As GDB caches and reuses gdbarch values, we should
expect to see each new architecture trigger the new_architecture
observer just once.

After this commit, targets that make use of thread-specific
architectures should be able to make use of Python unwinders.

As I don't have access to a machine that makes use of thread-specific
architectures right now, I asked Luis to confirm that an AArch64
target that uses SVE/SME can't use the Python unwinders in threads
that are using a thread-specific architectures, and he confirmed that
this is indeed the case, see this discussion:

  https://inbox.sourceware.org/gdb/87wmvsat8i.fsf@redhat.com

Tested-By: Lancelot Six <lancelot.six@amd.com>
Tested-By: Luis Machado <luis.machado@arm.com>
Reviewed-By: Luis Machado <luis.machado@arm.com>
Approved-By: Simon Marchi <simon.marchi@efficios.com>
2023-10-16 10:01:22 +01:00
Clément Chigot
9f9073e5b8 objcopy: Fix name of the field modified by pe_stack_reserve. 2023-10-16 10:37:23 +02:00
Tsukasa OI
6674b23fe6 RISC-V: Add "lp64e" ABI support
Since RV32E and RV64E are now ratified, this commit prepares the ABI
support for LP64E (LP64 with reduced GPRs).

gas/ChangeLog:

	* config/tc-riscv.c (riscv_set_abi_by_arch): Update the error
	message.  (md_parse_option): Accept "lp64e".
	* doc/c-riscv.texi: Update the documentation to allow "lp64e".
	* testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l:
	Change error message.
	* testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l: Likewise.
	* testsuite/gas/riscv/mabi-fail-rv32e-lp64q.l: Likewise.
2023-10-16 04:11:07 +00:00
Tsukasa OI
f1a0961ee0 RISC-V: Remove RV64E conflict
Since RV32E *and* RV64E are ratified, RV64E is no longer invalid.

This commit removes a restriction that prevents making base ISA with
reduced GPRs with XLEN > 32.

bfd/ChangeLog:

	* elfxx-riscv.c (riscv_parse_check_conflicts): Remove RV64E
	conflict since the ratified 'E' base ISAs include RV64E.

gas/ChangeLog:

	* testsuite/gas/riscv/march-fail-base-02.d: Removed.
	* testsuite/gas/riscv/march-fail-base-02.l: Removed.
2023-10-16 04:11:07 +00:00
GDB Administrator
de59d50076 Automatic date update in version.in 2023-10-16 00:00:38 +00:00
Mike Frysinger
edabd37834 sim: add distclean dep for gnulib 2023-10-15 23:00:33 +05:45
Neal Frager
bb0d05ff74 opcodes: microblaze: Add new bit-field instructions
This patches adds new bsefi and bsifi instructions.
BSEFI- The instruction shall extract a bit field from a
register and place it right-adjusted in the destination register.
The other bits in the destination register shall be set to zero.
BSIFI- The instruction shall insert a right-adjusted bit field
from a register at another position in the destination register.
The rest of the bits in the destination register shall be unchanged.

Further documentation of these instructions can be found here:
https://docs.xilinx.com/v/u/en-US/ug984-vivado-microblaze-ref

With version 6 of the patch, no new relocation types are added as
this was unnecessary for adding the bsefi and bsifi instructions.

FIXED: Segfault caused by incorrect termination of microblaze_opcodes.

Signed-off-by: nagaraju <nagaraju.mekala@amd.com>
Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@amd.com>
Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Michael J. Eager <eager@eagercon.com>
2023-10-15 09:28:10 -07:00
Mike Frysinger
30ebc4310b sim: mips: fix printf string 2023-10-15 16:25:13 +05:45
GDB Administrator
cd09b5ddef Automatic date update in version.in 2023-10-15 00:00:40 +00:00