nios2.h (SMALL_INT12): New macro.
authorSandra Loosemore <sandra@codesourcery.com>
Tue, 14 Jul 2015 22:34:23 +0000 (18:34 -0400)
committerSandra Loosemore <sandra@gcc.gnu.org>
Tue, 14 Jul 2015 22:34:23 +0000 (18:34 -0400)
commit42e6ab74b67a18019e35e2f84f62a3b4747160c9
treebf04fdbea43651a05a4d5427cd7eeafe6ceca391
parent77c50d73f614a99388b94e0b5a9c393723c06f8c
nios2.h (SMALL_INT12): New macro.

2015-07-14  Sandra Loosemore  <sandra@codesourcery.com>
    Cesar Philippidis  <cesar@codesourcery.com>
    Chung-Lin Tang  <cltang@codesourcery.com>

gcc/
* config/nios2/nios2.h (SMALL_INT12): New macro.
* config/nios2/nios2.c (nios2_valid_addr_offset_p): New function.
(nios2_valid_addr_expr_p): Use it.
(nios2_symbol_ref_in_small_data_p): Disallow GP-relative addressing
with implicit "io" instructions on R2.
* config/nios2/constraints.md (w): New constraint.
* config/nios2/predicates.md (ldstio_memory_operand): New.
* config/nios2/nios2.md (ld<bhw_uns>io, ld<bh>io): Update memory
operand predicate and constraint.
(ld<bh>io_signed, st<bhw>io>): Likewise.
* doc/md.texi (Machine Constraints): Document w constraint.

gcc/testsuite/
* gcc.target/nios2/r2-io-range.c: New.
* gcc.target/nios2/r2-stio-1.c: New.
* gcc.target/nios2/r2-stio-2.c: New.
* gcc.target/nios2/nios2-ldxio.c: New.
* gcc.target/nios2/nios2-stxio.c: Change to assemble test instead
of just compile.  Add more tests.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com>
From-SVN: r225792
13 files changed:
gcc/ChangeLog
gcc/config/nios2/constraints.md
gcc/config/nios2/nios2.c
gcc/config/nios2/nios2.h
gcc/config/nios2/nios2.md
gcc/config/nios2/predicates.md
gcc/doc/md.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/nios2/nios2-ldxio.c [new file with mode: 0644]
gcc/testsuite/gcc.target/nios2/nios2-stxio.c
gcc/testsuite/gcc.target/nios2/r2-io-range.c [new file with mode: 0644]
gcc/testsuite/gcc.target/nios2/r2-stio-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/nios2/r2-stio-2.c [new file with mode: 0644]