Browse Source

Fix ARM and AArch64 assembler tests to work in a multi-arch environment.

PR 29764
gas	* testsuite/gas/arm/cpu-cortex-a76ae.d: Add arm prefix to the -m
	option passed to objdump.
	* testsuite/gas/arm/cpu-cortex-a77.d: Likewise.
	* testsuite/gas/aarch64/cpu-cortex-a76ae.d: Add aarch64 prefix to
	the -m option passed to objdump.
	* testsuite/gas/aarch64/cpu-cortex-a77.d: Likewise.

bfd	* cpu-arm.c (scan): Accept machine names prefixed with "arm:".
	* cpu-aarch64.c (scan): Accept machine names prefixed with "aarch64:".

bin	* doc/binutils.texi (objdump): Note that the -m option supports
	the <architecture>:<machine> syntax.
gdb-13-branch
Nick Clifton 4 years ago
parent
commit
1a7e622b82
  1. 6
      bfd/ChangeLog
  2. 9
      bfd/cpu-aarch64.c
  3. 9
      bfd/cpu-arm.c
  4. 6
      binutils/ChangeLog
  5. 6
      binutils/doc/binutils.texi
  6. 10
      gas/ChangeLog
  7. 2
      gas/testsuite/gas/aarch64/cpu-cortex-a76ae.d
  8. 2
      gas/testsuite/gas/aarch64/cpu-cortex-a77.d
  9. 2
      gas/testsuite/gas/arm/cpu-cortex-a76ae.d
  10. 2
      gas/testsuite/gas/arm/cpu-cortex-a77.d

6
bfd/ChangeLog

@ -1,3 +1,9 @@
2022-11-21 Nick Clifton <nickc@redhat.com>
PR 29764
* cpu-arm.c (scan): Accept machine names prefixed with "arm:".
* cpu-aarch64.c (scan): Accept machine names prefixed with "aarch64:".
2022-10-19 Nick Clifton <nickc@redhat.com>
PR 29699

9
bfd/cpu-aarch64.c

@ -85,6 +85,15 @@ scan (const struct bfd_arch_info *info, const char *string)
if (strcasecmp (string, info->printable_name) == 0)
return true;
/* If there is a prefix of "aarch64:" then skip it. */
const char * colon;
if ((colon = strchr (string, ':')) != NULL)
{
if (strncasecmp (string, "aarch64", colon - string) != 0)
return false;
string = colon + 1;
}
/* Next check for a processor name instead of an Architecture name. */
for (i = sizeof (processors) / sizeof (processors[0]); i--;)
{

9
bfd/cpu-arm.c

@ -210,6 +210,15 @@ scan (const struct bfd_arch_info *info, const char *string)
if (strcasecmp (string, info->printable_name) == 0)
return true;
/* If there is a prefix of "arm:" then skip it. */
const char * colon;
if ((colon = strchr (string, ':')) != NULL)
{
if (strncasecmp (string, "arm", colon - string) != 0)
return false;
string = colon + 1;
}
/* Next check for a processor name instead of an Architecture name. */
for (i = sizeof (processors) / sizeof (processors[0]); i--;)
{

6
binutils/ChangeLog

@ -1,3 +1,9 @@
2022-11-21 Nick Clifton <nickc@redhat.com>
PR 29764
* doc/binutils.texi (objdump): Note that the -m option supports
the <architecture>:<machine> syntax.
2022-11-04 Nick Clifton <nickc@redhat.com>
* README-how-to-make-a-release: Add instructions for uploading the

6
binutils/doc/binutils.texi

@ -2526,6 +2526,12 @@ can be useful when disassembling object files which do not describe
architecture information, such as S-records. You can list the available
architectures with the @option{-i} option.
For most architectures it is possible to supply an architecture
name and a machine name, separated by a colon. For example
@samp{foo:bar} would refer to the @samp{bar} machine type in the
@samp{foo} architecture. This can be helpful if objdump has been
configured to support multiple architectures.
If the target is an ARM architecture then this switch has an
additional effect. It restricts the disassembly to only those
instructions supported by the architecture specified by @var{machine}.

10
gas/ChangeLog

@ -1,3 +1,13 @@
2022-11-21 Nick Clifton <nickc@redhat.com>
PR 29764
* testsuite/gas/arm/cpu-cortex-a76ae.d: Add arm prefix to the -m
option passed to objdump.
* testsuite/gas/arm/cpu-cortex-a77.d: Likewise.
* testsuite/gas/aarch64/cpu-cortex-a76ae.d: Add aarch64 prefix to
the -m option passed to objdump.
* testsuite/gas/aarch64/cpu-cortex-a77.d: Likewise.
2022-10-31 Nick Clifton <nickc@redhat.com>
* testsuite/gas/rx/mvtacgu.d: Update expected disassembly.

2
gas/testsuite/gas/aarch64/cpu-cortex-a76ae.d

@ -1,6 +1,6 @@
# name: Assemble and dump for cortex-a76ae CPU
# source: nop-asm.s
# as: -mcpu=cortex-a76ae
# objdump: -d -mcortex-a76ae
# objdump: -d -maarch64:cortex-a76ae
#...

2
gas/testsuite/gas/aarch64/cpu-cortex-a77.d

@ -1,6 +1,6 @@
# name: Assemble and dump for cortex-a77 CPU
# source: nop-asm.s
# as: -mcpu=cortex-a77
# objdump: -d -mcortex-a77
# objdump: -d -maarch64:cortex-a77
#...

2
gas/testsuite/gas/arm/cpu-cortex-a76ae.d

@ -1,6 +1,6 @@
# name: Assemble and dump for cortex-a76ae CPU
# source: nop-asm.s
# as: -mcpu=cortex-a76ae
# objdump: -d -mcortex-a76ae
# objdump: -d -marm:cortex-a76ae
#...

2
gas/testsuite/gas/arm/cpu-cortex-a77.d

@ -1,6 +1,6 @@
# name: Assemble and dump for cortex-a77 CPU
# source: nop-asm.s
# as: -mcpu=cortex-a77
# objdump: -d -mcortex-a77
# objdump: -d -marm:cortex-a77
#...

Loading…
Cancel
Save