deliverable/binutils-gdb.git
8 years agosim: aarch64: drop syscall.h include to fix build
Tristan Gingold [Wed, 9 Dec 2015 11:34:45 +0000 (12:34 +0100)] 
sim: aarch64: drop syscall.h include to fix build

The simulator is including syscall.h which is not standard and apparently
not required (builds correctly without it on my machine).

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 5 Jan 2016 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoMIPS/LD: Convert ELF linker emulation option macros to an enum
Maciej W. Rozycki [Mon, 4 Jan 2016 23:35:03 +0000 (23:35 +0000)] 
MIPS/LD: Convert ELF linker emulation option macros to an enum

ld/
* emultempl/mipself.em (PARSE_AND_LIST_PROLOGUE): Convert
OPTION_INSN32 and OPTION_NO_INSN32 macros to an enum.

8 years agoMIPS/BFD: Factor out ABI flag merging
Maciej W. Rozycki [Mon, 4 Jan 2016 23:32:34 +0000 (23:32 +0000)] 
MIPS/BFD: Factor out ABI flag merging

Factor out the parts of `_bfd_mips_elf_merge_private_bfd_data'
responsible for ABI flag merging to `mips_elf_merge_obj_abiflags'.  No
functional change.

bfd/
* elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
factored out from...
(_bfd_mips_elf_merge_private_bfd_data): ... here.

8 years agoMIPS/BFD: Move attribute check after ELF file header flag check
Maciej W. Rozycki [Mon, 4 Jan 2016 23:30:00 +0000 (23:30 +0000)] 
MIPS/BFD: Move attribute check after ELF file header flag check

We have a problem in that in making compatibility checks while merging
private BFD data on the MIPS target we give priority to the attribute
check, which may fail and cause the function to abort early on.  The
problem with this is the ABI compatibility aspect recorded in the
attributes is relatively minor compared to aspects recorded in the ELF
file header.  However the premature exit causes any more important
compatibility aspect violated to be masked and not reported to the user
once a problem with attributes has been noticed.

So move the attribute check after the ELF file header flag check in
`_bfd_mips_elf_merge_private_bfd_data', and do not return prematurely
there.  Take advantage of the resulting grouping of ELF file header
handling together and remove the premature success return point for the
first input object being handled, letting the code later on figure out
output ABI flags even for this object.

Update LD test cases according to messages from ELF file header checks
now preceding ones from attribute checks.

bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
attribute check after ELF file header flag check.

ld/
* testsuite/ld-mips-elf/attr-gnu-4-14.d: Update the order of
messages expected according to MIPS BFD private data merge
changes.
* testsuite/ld-mips-elf/attr-gnu-4-24.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-34.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-41.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-42.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-43.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-45.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-46.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-47.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-48.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-49.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-54.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-64.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-74.d: Likewise.

8 years agoMIPS/BFD: Propagate the return status in attribute merging
Maciej W. Rozycki [Mon, 4 Jan 2016 23:16:45 +0000 (23:16 +0000)] 
MIPS/BFD: Propagate the return status in attribute merging

Fix the issue of any failure from `_bfd_elf_merge_object_attributes' not
being propagated by `mips_elf_merge_obj_attributes'.

bfd/
* elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
return status from `_bfd_elf_merge_object_attributes'.

8 years agoMIPS/BFD: Factor out ELF file header flag checks
Maciej W. Rozycki [Mon, 4 Jan 2016 23:15:03 +0000 (23:15 +0000)] 
MIPS/BFD: Factor out ELF file header flag checks

Factor out the parts of `_bfd_mips_elf_merge_private_bfd_data'
responsible for ELF file header flag compatibility checks to
`mips_elf_merge_obj_e_flags'.  As a side effect remove a premature
return point from `_bfd_mips_elf_merge_private_bfd_data'.  No functional
change otherwise.

bfd/
* elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
factored out from...
(_bfd_mips_elf_merge_private_bfd_data): ... here.

8 years agoMIPS/BFD: Fold the handling of input MIPS ABI flags together
Maciej W. Rozycki [Mon, 4 Jan 2016 23:13:10 +0000 (23:13 +0000)] 
MIPS/BFD: Fold the handling of input MIPS ABI flags together

Fold the handling of input MIPS ABI flags in private BFD data merging
together, moving the attribute check afterwards, and consequently making
input vs output compatibility checks only start once all input ABI flag
data has been gathered, checked for inconsistencies and put in order.

Consequently also address the issue of input ABI flag inconsistencies
being masked by a failing attribute check, which currently makes
`_bfd_mips_elf_merge_private_bfd_data' exit prematurely and therefore
prevent input ABI flag inconsistencies from being reported.  Such
inconsistencies need to be reported as they may be the very cause of an
attribute check failure.

bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
handling of input MIPS ABI flags together.

8 years agoMIPS/BFD: Suppress attribute checks for null input
Maciej W. Rozycki [Mon, 4 Jan 2016 23:00:24 +0000 (23:00 +0000)] 
MIPS/BFD: Suppress attribute checks for null input

We currently special-case the handling of attribute checks on input
objects and make them even before we check a given input object actually
contains any sections.  This does not add value as empty objects do not
cause a compatibility concern and we already make this observation for
other properties such as ELF file header flags.  Moreover the attributes
themselves are stored in a `.gnu.attributes' section so the absence of
any section (except from a few special cases) implies there have been no
attributes provided either.  Therefore it is safe to move the attribute
checks later on, after the null-section check has been made.

bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
attribute checks for null input.

8 years agoMIPS/BFD: Use local pointers to target data in private data merge
Maciej W. Rozycki [Mon, 4 Jan 2016 22:49:59 +0000 (22:49 +0000)] 
MIPS/BFD: Use local pointers to target data in private data merge

Use local pointers to target data to reduce the amount of indirection
and improve the readability of `_bfd_mips_elf_merge_private_bfd_data'.

bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
pointers to target data.

8 years agoMIPS/BFD: Correct an FP ABI warning
Maciej W. Rozycki [Mon, 4 Jan 2016 22:46:40 +0000 (22:46 +0000)] 
MIPS/BFD: Correct an FP ABI warning

Correct a warning produced on any FP ABI mismatch observed.  Unlike the
other settings, which in the presence of `.MIPS.abiflags' are duplicated
in the `e_flags' member of the ELF file header, information on the FP
ABI in use is duplicated in `.gnu.attributes' rather than in the former
place.  Update the warning message accordingly.

bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
an FP ABI warning.

8 years agosim: parse_args: polish getopt error message
Mike Frysinger [Mon, 4 Jan 2016 10:08:26 +0000 (05:08 -0500)] 
sim: parse_args: polish getopt error message

The cris sim hit a few failures after the recent getopt logic, and the
expected output showed a few ways we can improve things to better match
other utils.

8 years agosim: punt x86-specific bswap logic
Mike Frysinger [Mon, 4 Jan 2016 09:06:01 +0000 (04:06 -0500)] 
sim: punt x86-specific bswap logic

The compiler/C library should produce reasonable code for htonl/ntohl,
and at least glibc tries pretty hard to always produce good code for
them.  This logic only had support for 32-bit x86 systems anymore, and
it's unlikely people were even opting into this, so drop it all.

8 years agosim: d10v: gut endian logic
Mike Frysinger [Mon, 4 Jan 2016 08:58:09 +0000 (03:58 -0500)] 
sim: d10v: gut endian logic

The compiler should produce reasonable code here in general, so punt the
various arch checks and bswap defines.  This code will eventually go away
entirely when we convert it to the common memory code.

8 years agobtrace: do not return out of TRY/CATCH
Markus Metzger [Wed, 23 Dec 2015 12:53:53 +0000 (13:53 +0100)] 
btrace: do not return out of TRY/CATCH

In btrace_pt_readmem_callback, we read memory inside TRY/CATCH and return in
case of an error return value.  This corrupts the cleanup chain, which
eventually results in a SEGV when doing or discarding cleanups later on.

gdb/
* btrace.c (btrace_pt_readmem_callback): Do not return in TRY/CATCH.

testsuite/
* gdb.btrace/dlopen.exp: New.
* gdb.btrace/dlopen.c: New.
* gdb.btrace/dlopen-dso.c: New.

8 years agosim: parse_args: display getopt error ourselves
Mike Frysinger [Mon, 4 Jan 2016 02:40:34 +0000 (21:40 -0500)] 
sim: parse_args: display getopt error ourselves

Fix a long standing todo where we let getopt write directly to stderr
when an invalid option is passed.  Use the sim io funcs instead as they
go through the filtered callbacks that gdb wants.

8 years agosim: TODO: move to wiki
Mike Frysinger [Mon, 4 Jan 2016 00:54:25 +0000 (19:54 -0500)] 
sim: TODO: move to wiki

We're maintaining development docs in the wiki now:
https://sourceware.org/gdb/wiki/Sim/TODO

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 4 Jan 2016 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agosim: clean up some more device detritus
Mike Frysinger [Sun, 3 Jan 2016 08:44:02 +0000 (03:44 -0500)] 
sim: clean up some more device detritus

Clean up some more remains of WITH_DEVICES that escaped notice.

We also clean up GETTWI/SETTWI defines in a few ports where they
were copied & pasted and are unused as they happen to be near the
device code.

8 years agosim: use libiberty countargv in more places
Mike Frysinger [Sun, 3 Jan 2016 06:40:46 +0000 (01:40 -0500)] 
sim: use libiberty countargv in more places

A bunch of places open code the countargv implementation, or outright
duplicate it (as count_argc).  Replace all of those w/countargv.

8 years agosim: nrun: use lbasename
Mike Frysinger [Sun, 3 Jan 2016 06:44:44 +0000 (01:44 -0500)] 
sim: nrun: use lbasename

8 years agosim: drop host endian configure option
Mike Frysinger [Sun, 3 Jan 2016 05:36:13 +0000 (00:36 -0500)] 
sim: drop host endian configure option

The --enable-sim-hostendian flag was purely so people had an escape route
for when cross-compiling.  This is because historically, AC_C_BIGENDIAN
did not work in those cases.  That was fixed a while ago though, so we can
require that macro everywhere now and simplify a good bit of code.

8 years agosim: convert to bfd_endian
Mike Frysinger [Sat, 2 Jan 2016 22:46:16 +0000 (17:46 -0500)] 
sim: convert to bfd_endian

Rather than re-invent endian defines, as well as maintain our own list
of OS & arch-specific includes, punt all that logic in favor of the bfd
ones already set up and maintained elsewhere.  We already rely on the
bfd library, so leveraging the endian aspect should be fine.

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 3 Jan 2016 00:00:15 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agosim: cris: use standard output helpers
Mike Frysinger [Sat, 2 Jan 2016 16:11:09 +0000 (11:11 -0500)] 
sim: cris: use standard output helpers

The sim-io module provides output helpers, so no need to define local
ones anymore.

8 years agosim: iq2000/m32r/lm32/sh64: delete dead option code
Mike Frysinger [Sat, 2 Jan 2016 15:29:51 +0000 (10:29 -0500)] 
sim: iq2000/m32r/lm32/sh64: delete dead option code

The iq2000/m32r/sh64 option parsing logic appears to have always been
dead.  At least iq2000/sh64 are simply copy & paste rot from m32r.

The lm32 option parsing hack here hasn't been needed for a while -- this
was fixed back in commit 11409fac6b95d71a92848a4499b02d60a4f4c5bb in the
common code.

8 years agosim: delete dead current_state globals
Mike Frysinger [Sat, 2 Jan 2016 14:23:06 +0000 (09:23 -0500)] 
sim: delete dead current_state globals

The global current_state handle to the current simulator state is a
design idea that was half implemented, but never really cleaned up.
The point was to have a global variable pointing to the state so that
funcs could more quickly & easily access the state anywhere.  We've
instead moved in the direction of passing state around everywhere and
don't have any intention of moving back.

I also can't find any references to gdb using this variable, or to
cgen related "dump_regs" functions, both of which were used in the
comments related to this code.

8 years agogdb: ppc: drop unnecessary sim file check
Mike Frysinger [Sat, 2 Jan 2016 08:10:57 +0000 (03:10 -0500)] 
gdb: ppc: drop unnecessary sim file check

We don't do this for other ppc targets in this file (we assume the sim
subdir exists), and it has existed for over a decade at this point.

8 years agosim: ppc: do not exit when parsing args w/gdb
Mike Frysinger [Sat, 2 Jan 2016 07:34:05 +0000 (02:34 -0500)] 
sim: ppc: do not exit when parsing args w/gdb

When connecting to the simulator in gdb, we don't want it to exit on
us when we pass down unknown/invalid/help/etc... options.  Plumb down
the kind argument so we can handle both gdb & psim interfaces.

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 2 Jan 2016 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoCopyright update for binutils
Alan Modra [Fri, 1 Jan 2016 11:25:12 +0000 (21:55 +1030)] 
Copyright update for binutils

8 years agoNew 2016 binutils ChangeLog files
Alan Modra [Fri, 1 Jan 2016 10:44:31 +0000 (21:14 +1030)] 
New 2016 binutils ChangeLog files

Note that this does not create bfd/doc/ChangeLog, */testsuite/ChangeLog
and include/*/ChangeLog files.

8 years agobinutils ChangeLog rotation
Alan Modra [Fri, 1 Jan 2016 10:42:53 +0000 (21:12 +1030)] 
binutils ChangeLog rotation

8 years agoGDB copyright headers update after running GDB's copyright.py script.
Joel Brobecker [Fri, 1 Jan 2016 04:33:14 +0000 (08:33 +0400)] 
GDB copyright headers update after running GDB's copyright.py script.

gdb/ChangeLog:

        Update year range in copyright notice of all files.

8 years agoupdate copyright year printed by GDB, GDBserver and gdbreplay.
Joel Brobecker [Fri, 1 Jan 2016 04:22:36 +0000 (08:22 +0400)] 
update copyright year printed by GDB, GDBserver and gdbreplay.

gdb/ChangeLog:

        * top.c (print_gdb_version): Change copyright year in version
        message.

gdb/gdbserver/ChangeLog:

        * gdbreplay.c (gdbreplay_version): Change copyright year in
        version message.
        * server.c (gdbserver_version): Likewise.

8 years agoRotate the GDB ChangeLog
Joel Brobecker [Fri, 1 Jan 2016 04:19:16 +0000 (08:19 +0400)] 
Rotate the GDB ChangeLog

Per GDB the "Start of New Year Procedure", this patch
  - renames the current ChangeLog into ChangeLog-2015;
  - starts a new ChangeLog file.

gdb/ChangeLog:

        * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2015.

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 1 Jan 2016 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoopcodes/arc: Support dmb instruction with no operands
Andrew Burgess [Wed, 16 Dec 2015 13:57:44 +0000 (13:57 +0000)] 
opcodes/arc: Support dmb instruction with no operands

In this GCC commit:
  https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00735.html
GCC started emitting dmb instructions with no operands.  The intention
was that dmb with no operands should be an alias for 'dmb 0'.

The following patch extends the arc opcodes library to support dmb with
no operands.

opcodes/ChangeLog:

* arc-tbl.h (dmb): Add a no operand version of dmb.

8 years agosim: m68hc11: fix default endian
Mike Frysinger [Thu, 31 Dec 2015 04:47:35 +0000 (23:47 -0500)] 
sim: m68hc11: fix default endian

The previous commit here set the default to little instead of big.
A typo lost when reviewing the different targets in parallel.

8 years agosim: cris/m68hc11: move default endian/alignment to configure
Mike Frysinger [Thu, 31 Dec 2015 02:01:58 +0000 (21:01 -0500)] 
sim: cris/m68hc11: move default endian/alignment to configure

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 31 Dec 2015 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agosim: h8300: inline sim_state_initialize
Mike Frysinger [Wed, 30 Dec 2015 11:03:31 +0000 (06:03 -0500)] 
sim: h8300: inline sim_state_initialize

All the state is handled already by the common cpu allocation which
zeros out the entire state.

8 years agosim: h8300: simplify h8300_reg_{fetch,store} funcs
Mike Frysinger [Wed, 30 Dec 2015 10:58:12 +0000 (05:58 -0500)] 
sim: h8300: simplify h8300_reg_{fetch,store} funcs

We can leverage the cpu->regs array rather than going through the
function helpers to get nice compact code.

Further, fix up the return values: return -1 when we can't find a
register (and let the caller write out warnings), return 2/4 when
we actually write out that amount, and handle the zero reg.

8 years agosim: h8300: switch to common sim-resume
Mike Frysinger [Wed, 30 Dec 2015 09:28:10 +0000 (04:28 -0500)] 
sim: h8300: switch to common sim-resume

8 years agosim: h8300: move default endian/alignment to configure
Mike Frysinger [Wed, 30 Dec 2015 10:19:40 +0000 (05:19 -0500)] 
sim: h8300: move default endian/alignment to configure

8 years agosim: simplify STATE_MY_NAME setup
Mike Frysinger [Wed, 30 Dec 2015 04:54:12 +0000 (23:54 -0500)] 
sim: simplify STATE_MY_NAME setup

No point in writing basename ourselves when libiberty provides one.

8 years agosim: arm/d10v/h8300/m68hc11/microblaze/mips/mn10300/moxie/sh/v850: convert to common...
Mike Frysinger [Wed, 30 Dec 2015 08:28:45 +0000 (03:28 -0500)] 
sim: arm/d10v/h8300/m68hc11/microblaze/mips/mn10300/moxie/sh/v850: convert to common sim_{fetch,store}_register

8 years agosim: h8300: move unused/buggy lregs array
Mike Frysinger [Wed, 30 Dec 2015 06:49:53 +0000 (01:49 -0500)] 
sim: h8300: move unused/buggy lregs array

This array isn't used anywhere, and the init phase actually corrupts
some memory because the array has 18 elements but tries to set the
19th (ZERO) position.

8 years agosim: h8300: drop unused inst.h
Mike Frysinger [Wed, 30 Dec 2015 06:26:08 +0000 (01:26 -0500)] 
sim: h8300: drop unused inst.h

We can also drop the compile.o rule since the common dep generation
logic takes care of this for us.

8 years agoFix assorted ChangeLog errors
Alan Modra [Tue, 29 Dec 2015 22:50:20 +0000 (09:20 +1030)] 
Fix assorted ChangeLog errors

8 years agosim: ppc: track closed state of file descriptors 0, 1, and 2.
Kevin Buettner [Mon, 16 Nov 2015 21:58:07 +0000 (14:58 -0700)] 
sim: ppc: track closed state of file descriptors 0, 1, and 2.

This change tracks the "closed" state of file descriptors 0, 1, and 2,
introducing the function fdbad() to emul_netbsd.c and emul_unix.c.
Note that a function of the same name and purpose exists in
sim/common/callback.c.

This patch eliminates all of the "unresolved testcases" when testing
GDB against the powerpc simulator.

This occurs because the powerpc simulator closes, on behalf of the
testcase, the file descriptors associated with stdin, stdout, and
stderr.  GDB still needs these descriptors to communicate with the
user or, in this case, with the testing framework.

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 30 Dec 2015 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 29 Dec 2015 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoUse libiberty's crc32 implementation in gdbserver
Patrick Palka [Mon, 2 Nov 2015 18:21:44 +0000 (13:21 -0500)] 
Use libiberty's crc32 implementation in gdbserver

Tested on x86_64-pc-linux-gnu native-gdbserver, no new regressions.

gdb/gdbserver/ChangeLog:

* server.c (crc32_table): Delete.
(crc32): Use libiberty's xcrc32 function.

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 28 Dec 2015 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoCorrect nios2 _gp address computation.
Sandra Loosemore [Sun, 27 Dec 2015 20:30:26 +0000 (12:30 -0800)] 
Correct nios2 _gp address computation.

2015-12-27  Sandra Loosemore  <sandra@codesourcery.com>

bfd/
* elf32-nios2.c (nios2_elf_assign_gp): Correct computation of _gp
address.
(nios2_elf32_relocate_section): Tidy code for R_NIOS2_GPREL error
messages.

8 years agosim: aarch64/msp430: fix disassembler usage
Mike Frysinger [Sun, 27 Dec 2015 06:41:27 +0000 (01:41 -0500)] 
sim: aarch64/msp430: fix disassembler usage

The disasm framework reserves the private_data field for the disassemblers
themselves, not for people who use the disassembler.  Instead, there is an
application_data field for callers such as the sim.  Switch to it to avoid
random corruption/crashes when the disassemblers use private_data.

8 years agosim: unify sim-hload
Mike Frysinger [Fri, 10 Apr 2015 23:40:34 +0000 (19:40 -0400)] 
sim: unify sim-hload

Pretty much all targets are using this module already, so add it to the
common list of objects.  The only oddball out here is cris and that's
because it supports loading via an offset for all the phdrs.  We drop
support for that.

8 years agosim: punt WITH_DEVICES & tconfig.h support
Mike Frysinger [Sun, 27 Dec 2015 01:20:23 +0000 (20:20 -0500)] 
sim: punt WITH_DEVICES & tconfig.h support

No arch is using this anymore, and we want all new ports using the
hardware framework instead.  Punt WITH_DEVICES and the two callbacks
device_io_{read,write}_buffer.

We can also punt the tconfig.h file as no port is using it anymore.
This fixes in-tree builds that get confused by picking up the wrong
one (common/ vs <port>/) caused by commit ae7d0cac8ce971f7108d270c.

Any port that needs to set up a global define can use their own
sim-main.h file that they must provide regardless.

8 years agosim: bfin: push down mmr address/size checks
Mike Frysinger [Sun, 27 Dec 2015 00:02:07 +0000 (19:02 -0500)] 
sim: bfin: push down mmr address/size checks

The bfin port is using the WITH_DEVICES framework for two reasons:
- get access to the cpu making the request (if available)
- check the alignment & size for core & system MMRs

We addressed the first part with commit dea10706e9159ba6e94eab4c25010f3,
and we handle the second part with this commit.  Arguably this is more
correct too because trying to do bad reads/writes directly (when devices
support is disabled) often results in bad memory accesses.

As part of this clean up, we also adjust all of the existing logic that
would reject invalid accesses: the code was relying on the checks never
returning, but that's not the case when things like gdb (via the user's
commands) are making the requests.  Thus we'd still end up with bad mem
accesses, or sometimes gdb being hung due to while(1) loops.

Now we can connect (most of) these models into any address and have them
work correctly.

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 27 Dec 2015 00:00:15 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agosim: bfin: avoid stack error under asan
Mike Frysinger [Sat, 26 Dec 2015 23:22:37 +0000 (18:22 -0500)] 
sim: bfin: avoid stack error under asan

We set up an array of 3 elements and then index into it with a 2bit
value.  We check the range before we actually use the pointer, but
the indexing is enough to make asan upset, so just stuff a fourth
value in there to keep things simple.

8 years agosim: sim-core: pass down cpu to hw accesses when available
Mike Frysinger [Sat, 26 Dec 2015 19:16:51 +0000 (14:16 -0500)] 
sim: sim-core: pass down cpu to hw accesses when available

The bfin port has been using the device callback largely so it could be
passed the cpu when available.  Add this logic to the common core code
so all ports get access to the active cpu.

The semantics of these buffer functions are changed slightly in that
errors halt the engine synchronously rather than returning the length
to the caller.  We'll probably adjust this in a follow up commit.

The bfin code isn't updated just yet as it has a bit more logic in the
device layer that needs to be unwound at which point we can delete it
entirely.

8 years agosim: mips: delete mmu stubs to move to common sim_{read,write}
Mike Frysinger [Sat, 26 Dec 2015 16:35:03 +0000 (11:35 -0500)] 
sim: mips: delete mmu stubs to move to common sim_{read,write}

The only unique thing about mip's sim_{read,write} helpers is the call to
address_translation on the incoming address.  When we look closer at that
function though, we see it's just a stub that maps physical to virtual,
and the cache/return values are hardcoded.  If we delete this function,
we can then collapse all the callers and drop the custom sim_{read,write}
logic entirely.

Some day we might want to add MMU support, but when we do, we'll want to
have the common layers handle things so all targets benefit.

8 years agosim: cris: do not pass cpu when writing memory during init
Mike Frysinger [Sat, 26 Dec 2015 13:13:38 +0000 (08:13 -0500)] 
sim: cris: do not pass cpu when writing memory during init

The point of passing down the cpu to core reads/writes is to signal which
cpu is making the access.  For system accesses (such as internal memory
initialization), passing the cpu down doesn't make sense, and in the case
of early init like cris, can cause crashes.  Since the cpu isn't fully set
up at this point, if the core code tries to access some fields (like the
PC reg), it'll crash.  While cris shouldn't be doing this setup here (it
should be in the inferior stage), we'll deal with that later.

8 years agosim: standardize sim_create_inferior handling of argv a bit more
Mike Frysinger [Sat, 26 Dec 2015 12:05:41 +0000 (07:05 -0500)] 
sim: standardize sim_create_inferior handling of argv a bit more

For targets that process argv in sim_create_inferior, improve the code:
- provide more details in the comment
- make the check for when to re-init more robust
- clean out legacy sim_copy_argv code

This will be cleaned up more in the future when we have a common inferior
creation function, but at least help new ports get it right until then.

8 years agosim: aarch64: move ChangeLog content
Mike Frysinger [Sat, 26 Dec 2015 12:12:13 +0000 (07:12 -0500)] 
sim: aarch64: move ChangeLog content

8 years agoAdd test for ARMv6-M farcall with no profile info
Thomas Preud'homme [Sat, 26 Dec 2015 02:24:58 +0000 (10:24 +0800)] 
Add test for ARMv6-M farcall with no profile info

2015-12-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>

ld/testsuite/
    * ld-arm/arm-elf.exp: Run new test "Thumb-Thumb farcall v6-M (no
    profile)".
    * ld-arm/farcall-thumb-thumb-m-no-profile-a.s: New file.
    * ld-arm/farcall-thumb-thumb-m-no-profile-b.s: Likewise.
    * ld-arm/farcall-thumb-thumb-m-no-profile.d: Likewise.

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 26 Dec 2015 00:00:17 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoDocument that the PATTERN argument to gdb_test is optional.
Sandra Loosemore [Fri, 25 Dec 2015 19:36:52 +0000 (11:36 -0800)] 
Document that the PATTERN argument to gdb_test is optional.

2015-12-25  Sandra Loosemore  <sandra@codesourcery.com>

gdb/testsuite/
* lib/gdb.exp (gdb_test): Update comments to clarify that the
PATTERN argument is optional.

8 years agosim: frv: punt WITH_DEVICE support
Mike Frysinger [Fri, 25 Dec 2015 18:19:07 +0000 (13:19 -0500)] 
sim: frv: punt WITH_DEVICE support

The frv port used the device logic to support a single cache address,
and the comments around that are "these were merely copied from a diff
port and are unused", plus the code to attach the memory is "#if 0".
Just punt it all.

8 years agosim: m32r: migrate from WITH_DEVICES to WITH_HW
Mike Frysinger [Fri, 25 Dec 2015 18:04:26 +0000 (13:04 -0500)] 
sim: m32r: migrate from WITH_DEVICES to WITH_HW

The m32r port was using the device framework to handle two devices: the
cache and uart registers.  Both can be implemented in the newer hardware
framework instead which allows us to drop the device logic entirely, as
well as delete the tconfig.h file.

While creating the new uart device model, I also added support for using
stdin to read/write data rather than only supporting sockets.

This has been lightly tested as there doesn't appear to be test coverage
for the code already.  If anyone still cares about this port, then they
should (hopefully) file bug reports.

8 years agosim: cris: migrate from WITH_DEVICES to WITH_HW
Mike Frysinger [Fri, 25 Dec 2015 11:03:22 +0000 (06:03 -0500)] 
sim: cris: migrate from WITH_DEVICES to WITH_HW

The cris port was using the device framework to handle two addresses when
the --cris-900000xx flag was specified.  That can be implemented using the
newer hardware framework instead which allows us to drop the device logic
entirely, as well as delete the tconfig.h file.  Basically we create a new
cris_900000xx device model and move the read logic out of devices.c and
into that.  The rest of the devices logic was callback to the hardware
framework already.

8 years agosim: cris: clean up rvdummy a bit
Mike Frysinger [Fri, 25 Dec 2015 10:54:12 +0000 (05:54 -0500)] 
sim: cris: clean up rvdummy a bit

This fixes a few warnings when compiling the rvdummy tool.

8 years agosim: cris: set up sane default path to rvdummy
Mike Frysinger [Fri, 25 Dec 2015 10:51:46 +0000 (05:51 -0500)] 
sim: cris: set up sane default path to rvdummy

Much like we autodetect the path to the run program when there is none
set explicitly, do the same for the rvdummy program.  Otherwise the
default make check fails to execute the helper properly.

8 years agosim: hw-properties: delete trace calls
Mike Frysinger [Fri, 25 Dec 2015 10:45:47 +0000 (05:45 -0500)] 
sim: hw-properties: delete trace calls

These trace calls don't seem to add anything useful and break the cris
hw tests, so punt them.  They were disabled before commit 6d519a4606b9
but were re-enabled as part of TRACE macro cleanups.

8 years agosim: drop WITH_ENGINE define
Mike Frysinger [Fri, 25 Dec 2015 09:45:57 +0000 (04:45 -0500)] 
sim: drop WITH_ENGINE define

We enable this everywhere already, and all new ports should use the
engine logic, so no point in making it an option to disable.

8 years agosim: sim-model: build for everyone
Mike Frysinger [Fri, 25 Dec 2015 09:27:27 +0000 (04:27 -0500)] 
sim: sim-model: build for everyone

Rather than include this for some targets, set it up so we can build it
all the time via the common code.  This makes it easier for targets to
opt into it when they're ready, increases build coverage, and allows us
to centralize much of the logic.

We also get to delete tconfig.h from two more targets -- they were
setting WITH_DEVICES to 0 which has the same behavior as not defining
it at all.

While the SIM_HAVE_MODEL knob is gone, we now have WITH_MODEL_P, but it
is only used by the common sim-model code.  We use it to declare dummy
model lists when the arch hasn't created its own.

8 years agosim: move MACH/MODEL types into SIM_xxx namespace
Mike Frysinger [Fri, 25 Dec 2015 09:12:55 +0000 (04:12 -0500)] 
sim: move MACH/MODEL types into SIM_xxx namespace

The "MACH" and "MODEL" names are a bit generic and collide with symbols
used by other sections of code (like h8300's opcodes).  Since these are
sim-specific types, they really should have a "SIM_" prefix.

8 years agosim: arm: delete unused code
Mike Frysinger [Mon, 16 Nov 2015 03:45:36 +0000 (19:45 -0800)] 
sim: arm: delete unused code

These vestiges of the 20 year old emulator are just getting in the way.
Punt all the dead code we either don't compile or don't use.

8 years agosim: move WITH_SCACHE_PBB to sim-main.h
Mike Frysinger [Fri, 25 Dec 2015 07:34:40 +0000 (02:34 -0500)] 
sim: move WITH_SCACHE_PBB to sim-main.h

This helps us break up tconfig.h more.  Any file using this define should
be pulling in sim-main.h already, so things should continue working.

8 years agosim: device_error: punt
Mike Frysinger [Fri, 25 Dec 2015 07:13:18 +0000 (02:13 -0500)] 
sim: device_error: punt

Only four targets implement this function, and three of them do nothing.
The 4th merely calls abort.  Since calls to this function are followed
by calls to sim_hw_abort or sim_io_error, this is largely useless.  In
the two places where we don't, replace the call with sim_engine_abort.
We want to kill off the WITH_DEVICES logic in favor of WITH_HW, so this
is a good first step.

8 years agosim: always enable callback memory
Mike Frysinger [Fri, 25 Dec 2015 05:23:50 +0000 (00:23 -0500)] 
sim: always enable callback memory

We enable WITH_CALLBACK_MEMORY everywhere and don't provide a way to
turn it off, and no target does so.  Make it unconditional for all
to keep things simple.

8 years agosim: dv-pal: always use CPU_INDEX
Mike Frysinger [Fri, 25 Dec 2015 05:09:48 +0000 (00:09 -0500)] 
sim: dv-pal: always use CPU_INDEX

Since the core always provides CPU_INDEX, use it.  The current code
doesn't actually use it even though it should since it doesn't include
the right headers.

8 years agosim: mips: delete TARGET_TX3904 define
Mike Frysinger [Fri, 25 Dec 2015 03:37:11 +0000 (22:37 -0500)] 
sim: mips: delete TARGET_TX3904 define

With the LMA cleanup, we no longer need this define.

8 years agosim: mips: move SIM_QUIET_NAN_NEGATED to sim-main.h
Mike Frysinger [Fri, 25 Dec 2015 03:27:04 +0000 (22:27 -0500)] 
sim: mips: move SIM_QUIET_NAN_NEGATED to sim-main.h

We want to kill off tconfig.h, so move the one define mips still uses
to sim-main.h.

8 years agosim: make LMA loading the default for all targets
Mike Frysinger [Fri, 25 Dec 2015 02:36:09 +0000 (21:36 -0500)] 
sim: make LMA loading the default for all targets

Most targets already default to loading code via their LMA, but for
a few, this means the default changes from loading VMA to LMA.  It's
better to have the different targets be consistent, and allows some
code clean up.

8 years agosim: cris: move option install to sim_open
Mike Frysinger [Thu, 24 Dec 2015 20:49:31 +0000 (15:49 -0500)] 
sim: cris: move option install to sim_open

We've moved custom option install for other targets to sim_open, so update
cris too.  It's the last one using MODULE_LIST, so we can drop that from
the common code too.

8 years agosim: delete old breakpoint code
Mike Frysinger [Thu, 24 Dec 2015 22:37:01 +0000 (17:37 -0500)] 
sim: delete old breakpoint code

This code relies on the old sim-break module, but that was deleted in 2003.
The module only existed for gdb to tell the sim to set breakpoints on its
behalf, but then that logic was abandoned in favor of gdb knowing all about
proper breakpoints (since it does already for non-sim targets).  Some dead
code lived on in the older ports though -- clean it up now.

8 years agosim: h8300: move h8300-specific options out of common code
Mike Frysinger [Thu, 24 Dec 2015 22:26:54 +0000 (17:26 -0500)] 
sim: h8300: move h8300-specific options out of common code

Register the options in sim_open like other arches to avoid having to hack
up the common modules.

8 years agosim: enable watchpoint module everywhere
Mike Frysinger [Thu, 24 Dec 2015 22:01:21 +0000 (17:01 -0500)] 
sim: enable watchpoint module everywhere

We build & bundle the watchpoint module everywhere, but we don't make
the command line flags available by default.  A few targets opted in,
but most did not.  Just enable the flag for everyone.  Not all targets
will respect the flags (making them nops), but shouldn't be a big deal.
This is how we handle other common modules already.

8 years agosim: delete SIM_HAVE_FLATMEM support
Mike Frysinger [Thu, 24 Dec 2015 21:41:55 +0000 (16:41 -0500)] 
sim: delete SIM_HAVE_FLATMEM support

No target has used this, and it's a cheap hack in place in using the
common memory module.  We want everyone using that though, so drop
support for flatmem entirely.

8 years agosim: delete SIM_HAVE_MEM_SIZE
Mike Frysinger [Thu, 24 Dec 2015 21:38:37 +0000 (16:38 -0500)] 
sim: delete SIM_HAVE_MEM_SIZE

This define isn't used anywhere (doesn't seem to ever have been used by
versions committed), so delete the commented out code as it's dead.

8 years agosim: delete SIM_HAVE_SIMCACHE
Mike Frysinger [Thu, 24 Dec 2015 21:04:26 +0000 (16:04 -0500)] 
sim: delete SIM_HAVE_SIMCACHE

This was used by the old run interface, but we punted that awhile ago,
so drop this define too.

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 25 Dec 2015 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoAdd support for linking ARMv8-M object files
Thomas Preud'homme [Thu, 24 Dec 2015 09:33:17 +0000 (17:33 +0800)] 
Add support for linking ARMv8-M object files

2015-12-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
    * elf32-arm.c (using_thumb_only): Check that profile is 'M' and update
    logic around Tag_CPU_arch values to return TRUE for ARMv8-M
    architectures.
    (tag_cpu_arch_combine): Define v8m_baseline and v8m_mainline and update
    v4t_plus_v6_m and comb to deal with ARMv8-M Tag_CPU_arch merging logic.
    (elf32_arm_merge_eabi_attributes): Add Tag_CPU_name values for
    ARMv8-M.

bfd/testsuite/
    * ld-arm/arm-elf.exp (armeabitests_common): Run new tests
    "Thumb-Thumb farcall v8-M", "EABI attribute merging 8",
    "EABI attribute merging 9" and "EABI attribute merging 10".
    (Thumb-Thumb farcall v8-M): Renamed to ...
    (Thumb-Thumb farcall v8-M Mainline): This.
    (Thumb-Thumb farcall v8-M Baseline): New test.
    * ld-arm/attr-merge-8a.s: New file.
    * ld-arm/attr-merge-8b.s: Likewise.
    * ld-arm/attr-merge-8.attr: Likewise.
    * ld-arm/attr-merge-9a.s: Likewise.
    * ld-arm/attr-merge-9b.s: Likewise.
    * ld-arm/attr-merge-9.out: Likewise.
    * ld-arm/attr-merge-10a.s: Likewise.
    * ld-arm/attr-merge-10b.s: Likewise.
    * ld-arm/attr-merge-10.attr: Likewise.

8 years agoAdd assembler support for ARMv8-M Baseline
Thomas Preud'homme [Thu, 24 Dec 2015 09:26:08 +0000 (17:26 +0800)] 
Add assembler support for ARMv8-M Baseline

2015-12-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
    (tag_cpu_arch_combine): Adjust comment in v4t_plus_v6_m with regards
    to merging with ARMv8-M Baseline.

binutils/
    * readelf.c (arm_attr_tag_CPU_arch): Add ARMv8-M Baseline Tag_CPU_arch
    value.

gas/
    * config/tc-arm.c (arm_ext_v6t2_v8m): New feature for instructions
    shared between ARMv6T2 and ARMv8-M.
    (move_or_literal_pool): Check mov.w/mvn and movw availability against
    arm_ext_v6t2 and arm_ext_v6t2_v8m respectively instead of checking
    arm_arch_t2.
    (do_t_branch): Error out for wide conditional branch instructions if
    targetting ARMv8-M Baseline.
    (non_v6t2_wide_only_insn): Add the logic for new wide-only instructions
    in ARMv8-M Baseline.
    (wide_insn_ok): New function.
    (md_assemble): Use wide_insn_ok instead of non_v6t2_wide_only_insn and
    adapt error message for unsupported wide instruction to ARMv8-M
    Baseline.
    (insns): Reorganize instructions shared by ARMv8-M Baseline and
    ARMv6t2 architecture.
    (arm_cpus): Set feature bit ARM_EXT2_V6T2_V8M for marvell-pj4 and
    marvell-whitney cores.
    (arm_archs): Define armv8-m.base architecture.
    (cpu_arch_ver): Define ARM_ARCH_V8M_BASE architecture version.
    (aeabi_set_public_attributes): Add logic to set Tag_CPU_arch to 17 for
    ARMv8-M Mainline.  Set Tag_DIV_use for ARMv8-M Baseline as well.

gas/testsuite/
    * gas/arm/archv8m-base.d: New file.
    * gas/arm/attr-march-armv8m.base.d: Likewise.
    * gas/arm/armv8m.base-idiv.d: Likewise.
    * gas/arm/any-armv8m.d: Adapt to deal with ARMv8-M Baseline.

include/elf/
    * arm.h (TAG_CPU_ARCH_V8M_BASE): Declare.

include/opcode/
    * arm.h (ARM_EXT2_V6T2_V8M): New extension bit.
    (ARM_AEXT2_V8A): New architecture extension bitfield.
    (ARM_AEXT2_V8_1A): Use ARM_AEXT2_V8A instead of ARM_EXT2_ATOMICS.
    (ARM_AEXT_V8M_BASE): New architecture extension bitfield.
    (ARM_AEXT2_V8M): Add extension bit ARM_EXT2_V6T2_V8M.
    (ARM_ARCH_V6T2): Use ARM_EXT2_V6T2_V8M for the second extension
    bitfield.
    (ARM_ARCH_V6KT2): Likewise.
    (ARM_ARCH_V6ZT2): Likewise.
    (ARM_ARCH_V6KZT2): Likewise.
    (ARM_ARCH_V7): Likewise.
    (ARM_ARCH_V7A): Likewise.
    (ARM_ARCH_V7VE): Likewise.
    (ARM_ARCH_V7R): Likewise.
    (ARM_ARCH_V7M): Likewise.
    (ARM_ARCH_V7EM): Likewise.
    (ARM_ARCH_V8A): Likewise.
    (ARM_ARCH_V8M_BASE): New architecture bitfield.
    (ARM_ARCH_THUMB2): Include instructions shared by ARMv6t2 and ARMv8-M.
    (ARM_ARCH_V7A_SEC): Use ARM_EXT2_V6T2_V8M for the second extension
    bitfield and reindent.
    (ARM_ARCH_V7A_MP_SEC): Likewise.
    (ARM_ARCH_V7R_IDIV): Likewise.
    (ARM_ARCH_V8A_FP): Use ARM_AEXT2_V8A instead of ARM_EXT2_ATOMICS.
    (ARM_ARCH_V8A_SIMD): Likewise.
    (ARM_ARCH_V8A_CRYPTOV1): Likewise.

opcodes/
    * arm-dis.c (arm_opcodes): Guard movw, movt cbz, cbnz, clrex, ldrex,
    ldrexb, ldrexh, strex, strexb, strexh shared by ARMv6T2 and ARMv8-M by
    ARM_EXT2_V6T2_V8M instead of ARM_EXT_V6T2.

8 years agoAdd assembler support for ARMv8-M Mainline
Thomas Preud'homme [Thu, 24 Dec 2015 09:16:19 +0000 (17:16 +0800)] 
Add assembler support for ARMv8-M Mainline

2015-12-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
    (tag_cpu_arch_combine): Adjust v4t_plus_v6_m and comb array to account
    for new TAG_CPU_ARCH_V4T_PLUS_V6_M value.  Deal with NULL values in
    comb array.

binutils/
    * readelf.c (arm_attr_tag_CPU_arch): Add ARMv8-M Mainline Tag_CPU_arch
    value.
    (arm_attr_tag_THUMB_ISA_use): Add ARMv8-M Mainline Tag_THUMB_ISA_use
    value.

gas/
    * config/tc-arm.c (arm_ext_m): Include ARMv8-M.
    (arm_ext_v8m): New feature for ARMv8-M.
    (arm_ext_atomics): New feature for ARMv8 atomics.
    (do_tt): New encoding function for TT* instructions.
    (insns): Add new entries for ARMv8-M specific instructions and
    reorganize the ones shared by ARMv8-M Mainline and ARMv8-A.
    (arm_archs): Define armv8-m.main architecture.
    (cpu_arch_ver): Define ARM_ARCH_V8M_MAIN architecture version and
    clarify the ordering rule.
    (aeabi_set_public_attributes): Use TAG_CPU_ARCH_* macro to refer to
    Tag_CPU_arch values for ARMv7e-M detection.  Add logic to keep setting
    Tag_CPU_arch to ARMv8-A for -march=all.  Also set Tag_CPU_arch_profile
    to 'A' if extension bit for atomic instructions is set, unless it is
    ARMv8-M.  Set Tag_THUMB_ISA_use to 3 for ARMv8-M.  Set Tag_DIV_use to 0
    for ARMv8-M Mainline.

gas/testsuite/
    * gas/arm/archv8m.s: New file.
    * gas/arm/archv8m-main.d: Likewise.
    * gas/arm/attr-march-armv8m.main.d: Likewise.
    * gas/arm/any-armv8m.s: Likewise.
    * gas/arm/any-armv8m.d: Likewise.

include/elf/
    * arm.h (TAG_CPU_ARCH_V8M_MAIN): Declare.
    (MAX_TAG_CPU_ARCH): Define to TAG_CPU_ARCH_V8M_MAIN.
    (TAG_CPU_ARCH_V4T_PLUS_V6_M): Define to unused value 15.

include/opcode/
    * arm.h (ARM_EXT2_ATOMICS): New extension bit.
    (ARM_EXT2_V8M): Likewise.
    (ARM_EXT_V8): Adjust comment with regards to atomics and remove
    mention of legacy use for that bit.
    (ARM_AEXT2_V8_1A): New architecture extension bitfield.
    (ARM_AEXT2_V8_2A): Likewise.
    (ARM_AEXT_V8M_MAIN): Likewise.
    (ARM_AEXT2_V8M): Likewise.
    (ARM_ARCH_V8A): Use ARM_EXT2_ATOMICS for features in second bitfield.
    (ARM_ARCH_V8_1A): Likewise with ARM_AEXT2_V8_1A.
    (ARM_ARCH_V8_2A): Likewise with ARM_AEXT2_V8_2A.
    (ARM_ARCH_V8M_MAIN): New architecture feature bitfield.
    (ARM_ARCH_V8A_FP): Use ARM_EXT2_ATOMICS for features in second bitfield
    and reindent.
    (ARM_ARCH_V8A_SIMD): Likewise.
    (ARM_ARCH_V8A_CRYPTOV1): Likewise.
    (ARM_ARCH_V8_1A_FP): Use ARM_AEXT2_V8_1A to set second bitfield of
    feature bits.
    (ARM_ARCH_V8_1A_SIMD): Likewise.
    (ARM_ARCH_V8_1A_CRYPTOV1): Likewise.

opcodes/
    * arm-dis.c (arm_opcodes): Guard lda, ldab, ldaex, ldaexb, ldaexh, stl,
    stlb, stlh, stlex, stlexb and stlexh by ARM_EXT2_ATOMICS instead of
    ARM_EXT_V8.
    (thumb32_opcodes): Add entries for wide ARMv8-M instructions.

8 years agoConsolidate Thumb-1/Thumb-2 ISA detection
Thomas Preud'homme [Thu, 24 Dec 2015 09:01:42 +0000 (17:01 +0800)] 
Consolidate Thumb-1/Thumb-2 ISA detection

2015-12-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>

gas/
    * config/tc-arm.c (move_or_literal_pool): Check mov.w, mvm and movw
    availability against arm_ext_v6t2 instead of checking arm_arch_t2,
    fixing comments along the way.
    (handle_it_state): Check arm_ext_v6t2 instead of arm_arch_t2 to
    generate IT instruction.
    (t1_isa_t32_only_insn): New function.
    (md_assemble): Use above new function to check for invalid wide
    instruction for CPU Thumb ISA and to determine what Thumb extension
    bit is necessary for that instruction.
    (md_apply_fix): Use arm_ext_v6t2 instead of arm_arch_t2 to decide if
    branch is out of range.

include/opcode/
    * arm.h (ARM_ARCH_THUMB2): Add comment explaining its meaning and
    remove extension bit not including any Thumb-2 instruction.

8 years agoAdd tests for gas arch autodetection on ARM
Thomas Preud'homme [Thu, 24 Dec 2015 08:50:26 +0000 (16:50 +0800)] 
Add tests for gas arch autodetection on ARM

2015-12-09  Andre Vieira  <andre.simoesdiasvieira@arm.com>

gas/testsuite/
    * gas/arm/automatic-bw.d: New.
    * gas/arm/automatic-bw.s: New.
    * gas/arm/automatic-cbz.d: New.
    * gas/arm/automatic-cbz.s: New.
    * gas/arm/automatic-clrex.d: New.
    * gas/arm/automatic-clrex.s: New.
    * gas/arm/automatic-lda.d: New.
    * gas/arm/automatic-lda.s: New.
    * gas/arm/automatic-ldaex.d: New.
    * gas/arm/automatic-ldaex.s: New.
    * gas/arm/automatic-ldaexb.d: New.
    * gas/arm/automatic-ldaexb.s: New.
    * gas/arm/automatic-ldrex.d: New.
    * gas/arm/automatic-ldrex.s: New.
    * gas/arm/automatic-ldrexd.d: New.
    * gas/arm/automatic-ldrexd.s: New.
    * gas/arm/automatic-movw.d: New.
    * gas/arm/automatic-movw.s: New.
    * gas/arm/automatic-sdiv.d: New.
    * gas/arm/automatic-sdiv.s: New.
    * gas/arm/automatic-strexb.d: New.
    * gas/arm/automatic-strexb.s: New.

This page took 0.043455 seconds and 4 git commands to generate.