summaryrefslogtreecommitdiff
path: root/toolchain/binutils/2.15
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/binutils/2.15')
-rw-r--r--toolchain/binutils/2.15/700-nios2-2.15.patch3217
-rw-r--r--toolchain/binutils/2.15/701-nios2-gcc4-buildfix.patch20
2 files changed, 1909 insertions, 1328 deletions
diff --git a/toolchain/binutils/2.15/700-nios2-2.15.patch b/toolchain/binutils/2.15/700-nios2-2.15.patch
index 42655f306..50f0caff6 100644
--- a/toolchain/binutils/2.15/700-nios2-2.15.patch
+++ b/toolchain/binutils/2.15/700-nios2-2.15.patch
@@ -1,5 +1,7 @@
---- binutils-2.15/bfd/Makefile.am 2004-05-17 21:35:56.000000000 +0200
-+++ binutils-2.15-nios2/bfd/Makefile.am 2005-05-17 12:20:13.000000000 +0200
+diff --git a/bfd/Makefile.am b/bfd/Makefile.am
+index de811af..d55e681 100644
+--- a/bfd/Makefile.am
++++ b/bfd/Makefile.am
@@ -82,6 +82,7 @@ ALL_MACHINES = \
cpu-mips.lo \
cpu-mmix.lo \
@@ -32,7 +34,7 @@
elf32-openrisc.c \
elf32-or32.c \
elf32-pj.c \
-@@ -943,6 +947,7 @@ cpu-mcore.lo: cpu-mcore.c $(INCDIR)/file
+@@ -943,6 +947,7 @@ cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h
cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h
@@ -40,7 +42,7 @@
cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h
cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
-@@ -1250,6 +1255,10 @@ elf32-msp430.lo: elf32-msp430.c $(INCDIR
+@@ -1250,6 +1255,10 @@ elf32-msp430.lo: elf32-msp430.c $(INCDIR)/filenames.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
@@ -51,8 +53,10 @@
elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \
---- binutils-2.15/bfd/Makefile.in 2004-05-17 21:35:56.000000000 +0200
-+++ binutils-2.15-nios2/bfd/Makefile.in 2005-05-17 12:20:13.000000000 +0200
+diff --git a/bfd/Makefile.in b/bfd/Makefile.in
+index a6685f2..1ea97fe 100644
+--- a/bfd/Makefile.in
++++ b/bfd/Makefile.in
@@ -210,6 +210,7 @@ ALL_MACHINES = \
cpu-mips.lo \
cpu-mmix.lo \
@@ -85,7 +89,7 @@
elf32-openrisc.c \
elf32-or32.c \
elf32-pj.c \
-@@ -1482,6 +1486,7 @@ cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filena
+@@ -1482,6 +1486,7 @@ cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h
cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h
cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h
cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
@@ -93,7 +97,7 @@
cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h
cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h
-@@ -1787,6 +1792,10 @@ elf32-msp430.lo: elf32-msp430.c $(INCDIR
+@@ -1787,6 +1792,10 @@ elf32-msp430.lo: elf32-msp430.c $(INCDIR)/filenames.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
@@ -104,8 +108,10 @@
elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \
---- binutils-2.15/bfd/archures.c 2003-12-03 18:38:48.000000000 +0100
-+++ binutils-2.15-nios2/bfd/archures.c 2005-05-17 12:20:13.000000000 +0200
+diff --git a/bfd/archures.c b/bfd/archures.c
+index f8aeeef..82fe291 100644
+--- a/bfd/archures.c
++++ b/bfd/archures.c
@@ -330,6 +330,8 @@ DESCRIPTION
.#define bfd_mach_msp44 44
. bfd_arch_xtensa, {* Tensilica's Xtensa cores. *}
@@ -115,7 +121,7 @@
. bfd_arch_last
. };
*/
-@@ -422,6 +424,7 @@ extern const bfd_arch_info_type bfd_w65_
+@@ -422,6 +424,7 @@ extern const bfd_arch_info_type bfd_w65_arch;
extern const bfd_arch_info_type bfd_xstormy16_arch;
extern const bfd_arch_info_type bfd_xtensa_arch;
extern const bfd_arch_info_type bfd_z8k_arch;
@@ -123,7 +129,7 @@
static const bfd_arch_info_type * const bfd_archures_list[] =
{
-@@ -460,6 +463,7 @@ static const bfd_arch_info_type * const
+@@ -460,6 +463,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_mn10200_arch,
&bfd_mn10300_arch,
&bfd_msp430_arch,
@@ -131,291 +137,20 @@
&bfd_ns32k_arch,
&bfd_openrisc_arch,
&bfd_or32_arch,
---- binutils-2.15/bfd/bfd-in2.h 2004-05-17 21:35:56.000000000 +0200
-+++ binutils-2.15-nios2/bfd/bfd-in2.h 2005-05-17 12:20:13.000000000 +0200
-@@ -830,37 +830,48 @@ extern void bfd_elf64_ia64_after_parse
- (int);
-
- /* Extracted from init.c. */
--void bfd_init (void);
-+void
-+bfd_init PARAMS ((void));
-
- /* Extracted from opncls.c. */
--bfd *bfd_openr (const char *filename, const char *target);
-+bfd *
-+bfd_openr PARAMS ((const char *filename, const char *target));
-
--bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
-+bfd *
-+bfd_fdopenr PARAMS ((const char *filename, const char *target, int fd));
-
--bfd *bfd_openstreamr (const char *, const char *, void *);
-+bfd *
-+bfd_openstreamr PARAMS ((const char *, const char *, void *));
-
--bfd *bfd_openw (const char *filename, const char *target);
-+bfd *
-+bfd_openw PARAMS ((const char *filename, const char *target));
-
--bfd_boolean bfd_close (bfd *abfd);
-+bfd_boolean
-+bfd_close PARAMS ((bfd *abfd));
-
--bfd_boolean bfd_close_all_done (bfd *);
-+bfd_boolean
-+bfd_close_all_done PARAMS ((bfd *));
-
--bfd *bfd_create (const char *filename, bfd *templ);
-+bfd *
-+bfd_create PARAMS ((const char *filename, bfd *templ));
-
--bfd_boolean bfd_make_writable (bfd *abfd);
-+bfd_boolean
-+bfd_make_writable PARAMS ((bfd *abfd));
-
--bfd_boolean bfd_make_readable (bfd *abfd);
-+bfd_boolean
-+bfd_make_readable PARAMS ((bfd *abfd));
-
--unsigned long bfd_calc_gnu_debuglink_crc32
-- (unsigned long crc, const unsigned char *buf, bfd_size_type len);
-+unsigned long
-+bfd_calc_gnu_debuglink_crc32 PARAMS ((unsigned long crc, const unsigned char *buf, bfd_size_type len));
-
--char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
-+char *
-+bfd_follow_gnu_debuglink PARAMS ((bfd *abfd, const char *dir));
-
--struct bfd_section *bfd_create_gnu_debuglink_section
-- (bfd *abfd, const char *filename);
-+struct bfd_section *
-+bfd_create_gnu_debuglink_section PARAMS ((bfd *abfd, const char *filename));
-
--bfd_boolean bfd_fill_in_gnu_debuglink_section
-- (bfd *abfd, struct bfd_section *sect, const char *filename);
-+bfd_boolean
-+bfd_fill_in_gnu_debuglink_section PARAMS ((bfd *abfd, struct bfd_section *sect, const char *filename));
-
- /* Extracted from libbfd.c. */
-
-@@ -976,9 +987,11 @@ bfd_boolean bfd_fill_in_gnu_debuglink_se
-
-
- /* Extracted from bfdio.c. */
--long bfd_get_mtime (bfd *abfd);
-+long
-+bfd_get_mtime PARAMS ((bfd *abfd));
-
--long bfd_get_size (bfd *abfd);
-+long
-+bfd_get_size PARAMS ((bfd *abfd));
-
- /* Extracted from bfdwin.c. */
- /* Extracted from section.c. */
-@@ -1421,48 +1434,54 @@ extern const struct bfd_symbol * const b
- } \
- while (0)
-
--void bfd_section_list_clear (bfd *);
-+void
-+bfd_section_list_clear PARAMS ((bfd *));
-
--asection *bfd_get_section_by_name (bfd *abfd, const char *name);
-+asection *
-+bfd_get_section_by_name PARAMS ((bfd *abfd, const char *name));
-
--char *bfd_get_unique_section_name
-- (bfd *abfd, const char *templat, int *count);
-+char *
-+bfd_get_unique_section_name PARAMS ((bfd *abfd, const char *templat, int *count));
-
--asection *bfd_make_section_old_way (bfd *abfd, const char *name);
-+asection *
-+bfd_make_section_old_way PARAMS ((bfd *abfd, const char *name));
-
--asection *bfd_make_section_anyway (bfd *abfd, const char *name);
-+asection *
-+bfd_make_section_anyway PARAMS ((bfd *abfd, const char *name));
-
--asection *bfd_make_section (bfd *, const char *name);
-+asection *
-+bfd_make_section PARAMS ((bfd *, const char *name));
-
--bfd_boolean bfd_set_section_flags
-- (bfd *abfd, asection *sec, flagword flags);
-+bfd_boolean
-+bfd_set_section_flags PARAMS ((bfd *abfd, asection *sec, flagword flags));
-
--void bfd_map_over_sections
-- (bfd *abfd,
-+void
-+bfd_map_over_sections PARAMS ((bfd *abfd,
- void (*func) (bfd *abfd, asection *sect, void *obj),
-- void *obj);
-+ void *obj));
-
--bfd_boolean bfd_set_section_size
-- (bfd *abfd, asection *sec, bfd_size_type val);
-+bfd_boolean
-+bfd_set_section_size PARAMS ((bfd *abfd, asection *sec, bfd_size_type val));
-
--bfd_boolean bfd_set_section_contents
-- (bfd *abfd, asection *section, const void *data,
-- file_ptr offset, bfd_size_type count);
-+bfd_boolean
-+bfd_set_section_contents PARAMS ((bfd *abfd, asection *section, const void *data,
-+ file_ptr offset, bfd_size_type count));
-
--bfd_boolean bfd_get_section_contents
-- (bfd *abfd, asection *section, void *location, file_ptr offset,
-- bfd_size_type count);
-+bfd_boolean
-+bfd_get_section_contents PARAMS ((bfd *abfd, asection *section, void *location, file_ptr offset,
-+ bfd_size_type count));
-
--bfd_boolean bfd_copy_private_section_data
-- (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
-+bfd_boolean
-+bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, bfd *obfd, asection *osec));
-
- #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
- BFD_SEND (obfd, _bfd_copy_private_section_data, \
- (ibfd, isection, obfd, osection))
--void _bfd_strip_section_from_output
-- (struct bfd_link_info *info, asection *section);
-+void
-+_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section));
-
--bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
-+bfd_boolean
-+bfd_generic_discard_group PARAMS ((bfd *abfd, asection *group));
-
- /* Extracted from archures.c. */
- enum bfd_architecture
-@@ -1728,6 +1747,8 @@ enum bfd_architecture
+diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
+index 2464d27..1938170 100644
+--- a/bfd/bfd-in2.h
++++ b/bfd/bfd-in2.h
+@@ -1728,6 +1728,8 @@ enum bfd_architecture
#define bfd_mach_msp44 44
bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
#define bfd_mach_xtensa 1
+ bfd_arch_nios2,
-+#define bfd_mach_nios2 1
++#define bfd_mach_nios2 1
bfd_arch_last
};
-@@ -1754,37 +1775,47 @@ typedef struct bfd_arch_info
- }
- bfd_arch_info_type;
-
--const char *bfd_printable_name (bfd *abfd);
-+const char *
-+bfd_printable_name PARAMS ((bfd *abfd));
-
--const bfd_arch_info_type *bfd_scan_arch (const char *string);
-+const bfd_arch_info_type *
-+bfd_scan_arch PARAMS ((const char *string));
-
--const char **bfd_arch_list (void);
-+const char **
-+bfd_arch_list PARAMS ((void));
-
--const bfd_arch_info_type *bfd_arch_get_compatible
-- (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
-+const bfd_arch_info_type *
-+bfd_arch_get_compatible PARAMS ((const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns));
-
--void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
-+void
-+bfd_set_arch_info PARAMS ((bfd *abfd, const bfd_arch_info_type *arg));
-
--enum bfd_architecture bfd_get_arch (bfd *abfd);
-+enum bfd_architecture
-+bfd_get_arch PARAMS ((bfd *abfd));
-
--unsigned long bfd_get_mach (bfd *abfd);
-+unsigned long
-+bfd_get_mach PARAMS ((bfd *abfd));
-
--unsigned int bfd_arch_bits_per_byte (bfd *abfd);
-+unsigned int
-+bfd_arch_bits_per_byte PARAMS ((bfd *abfd));
-
--unsigned int bfd_arch_bits_per_address (bfd *abfd);
-+unsigned int
-+bfd_arch_bits_per_address PARAMS ((bfd *abfd));
-
--const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
-+const bfd_arch_info_type *
-+bfd_get_arch_info PARAMS ((bfd *abfd));
-
--const bfd_arch_info_type *bfd_lookup_arch
-- (enum bfd_architecture arch, unsigned long machine);
-+const bfd_arch_info_type *
-+bfd_lookup_arch PARAMS ((enum bfd_architecture arch, unsigned long machine));
-
--const char *bfd_printable_arch_mach
-- (enum bfd_architecture arch, unsigned long machine);
-+const char *
-+bfd_printable_arch_mach PARAMS ((enum bfd_architecture arch, unsigned long machine));
-
--unsigned int bfd_octets_per_byte (bfd *abfd);
-+unsigned int
-+bfd_octets_per_byte PARAMS ((bfd *abfd));
-
--unsigned int bfd_arch_mach_octets_per_byte
-- (enum bfd_architecture arch, unsigned long machine);
-+unsigned int
-+bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch, unsigned long machine));
-
- /* Extracted from reloc.c. */
- typedef enum bfd_reloc_status
-@@ -1967,7 +1998,8 @@ struct reloc_howto_struct
- } \
- }
-
--unsigned int bfd_get_reloc_size (reloc_howto_type *);
-+unsigned int
-+bfd_get_reloc_size PARAMS ((reloc_howto_type *));
-
- typedef struct relent_chain
- {
-@@ -1976,27 +2008,27 @@ typedef struct relent_chain
- }
- arelent_chain;
-
--bfd_reloc_status_type bfd_check_overflow
-- (enum complain_overflow how,
-+bfd_reloc_status_type
-+bfd_check_overflow PARAMS ((enum complain_overflow how,
- unsigned int bitsize,
- unsigned int rightshift,
- unsigned int addrsize,
-- bfd_vma relocation);
-+ bfd_vma relocation));
-
--bfd_reloc_status_type bfd_perform_relocation
-- (bfd *abfd,
-+bfd_reloc_status_type
-+bfd_perform_relocation PARAMS ((bfd *abfd,
- arelent *reloc_entry,
- void *data,
- asection *input_section,
- bfd *output_bfd,
-- char **error_message);
-+ char **error_message));
-
--bfd_reloc_status_type bfd_install_relocation
-- (bfd *abfd,
-+bfd_reloc_status_type
-+bfd_install_relocation PARAMS ((bfd *abfd,
- arelent *reloc_entry,
- void *data, bfd_vma data_start,
- asection *input_section,
-- char **error_message);
-+ char **error_message));
-
- enum bfd_reloc_code_real {
- _dummy_first_bfd_reloc_code_real,
-@@ -3439,6 +3471,23 @@ This is the 5 bits of a value. */
+@@ -3439,6 +3441,23 @@ This is the 5 bits of a value. */
BFD_RELOC_MSP430_16_PCREL_BYTE,
BFD_RELOC_MSP430_16_BYTE,
@@ -439,293 +174,11 @@
/* IQ2000 Relocations. */
BFD_RELOC_IQ2000_OFFSET_16,
BFD_RELOC_IQ2000_OFFSET_21,
-@@ -3477,10 +3526,11 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */
- BFD_RELOC_XTENSA_ASM_SIMPLIFY,
- BFD_RELOC_UNUSED };
- typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
--reloc_howto_type *bfd_reloc_type_lookup
-- (bfd *abfd, bfd_reloc_code_real_type code);
-+reloc_howto_type *
-+bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
-
--const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
-+const char *
-+bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code));
-
- /* Extracted from syms.c. */
-
-@@ -3611,9 +3661,11 @@ asymbol;
- #define bfd_get_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
-
--bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
-+bfd_boolean
-+bfd_is_local_label PARAMS ((bfd *abfd, asymbol *sym));
-
--bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
-+bfd_boolean
-+bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name));
-
- #define bfd_is_local_label_name(abfd, name) \
- BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
-@@ -3621,27 +3673,32 @@ bfd_boolean bfd_is_local_label_name (bfd
- #define bfd_canonicalize_symtab(abfd, location) \
- BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
-
--bfd_boolean bfd_set_symtab
-- (bfd *abfd, asymbol **location, unsigned int count);
-+bfd_boolean
-+bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count));
-
--void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
-+void
-+bfd_print_symbol_vandf PARAMS ((bfd *abfd, void *file, asymbol *symbol));
-
- #define bfd_make_empty_symbol(abfd) \
- BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
-
--asymbol *_bfd_generic_make_empty_symbol (bfd *);
-+asymbol *
-+_bfd_generic_make_empty_symbol PARAMS ((bfd *));
-
- #define bfd_make_debug_symbol(abfd,ptr,size) \
- BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
-
--int bfd_decode_symclass (asymbol *symbol);
-+int
-+bfd_decode_symclass PARAMS ((asymbol *symbol));
-
--bfd_boolean bfd_is_undefined_symclass (int symclass);
-+bfd_boolean
-+bfd_is_undefined_symclass PARAMS ((int symclass));
-
--void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
-+void
-+bfd_symbol_info PARAMS ((asymbol *symbol, symbol_info *ret));
-
--bfd_boolean bfd_copy_private_symbol_data
-- (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
-+bfd_boolean
-+bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym));
-
- #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
- BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
-@@ -3840,57 +3897,76 @@ typedef enum bfd_error
- }
- bfd_error_type;
-
--bfd_error_type bfd_get_error (void);
-+bfd_error_type
-+bfd_get_error PARAMS ((void));
-
--void bfd_set_error (bfd_error_type error_tag);
-+void
-+bfd_set_error PARAMS ((bfd_error_type error_tag));
-
--const char *bfd_errmsg (bfd_error_type error_tag);
-+const char *
-+bfd_errmsg PARAMS ((bfd_error_type error_tag));
-
--void bfd_perror (const char *message);
-+void
-+bfd_perror PARAMS ((const char *message));
-
- typedef void (*bfd_error_handler_type) (const char *, ...);
-
--bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
-+bfd_error_handler_type
-+bfd_set_error_handler PARAMS ((bfd_error_handler_type));
-
--void bfd_set_error_program_name (const char *);
-+void
-+bfd_set_error_program_name PARAMS ((const char *));
-
--bfd_error_handler_type bfd_get_error_handler (void);
-+bfd_error_handler_type
-+bfd_get_error_handler PARAMS ((void));
-
--const char *bfd_archive_filename (bfd *);
-+const char *
-+bfd_archive_filename PARAMS ((bfd *));
-
--long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
-+long
-+bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect));
-
--long bfd_canonicalize_reloc
-- (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
-+long
-+bfd_canonicalize_reloc PARAMS ((bfd *abfd, asection *sec, arelent **loc, asymbol **syms));
-
--void bfd_set_reloc
-- (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
-+void
-+bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count));
-
--bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
-+bfd_boolean
-+bfd_set_file_flags PARAMS ((bfd *abfd, flagword flags));
-
--int bfd_get_arch_size (bfd *abfd);
-+int
-+bfd_get_arch_size PARAMS ((bfd *abfd));
-
--int bfd_get_sign_extend_vma (bfd *abfd);
-+int
-+bfd_get_sign_extend_vma PARAMS ((bfd *abfd));
-
--bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
-+bfd_boolean
-+bfd_set_start_address PARAMS ((bfd *abfd, bfd_vma vma));
-
--unsigned int bfd_get_gp_size (bfd *abfd);
-+unsigned int
-+bfd_get_gp_size PARAMS ((bfd *abfd));
-
--void bfd_set_gp_size (bfd *abfd, unsigned int i);
-+void
-+bfd_set_gp_size PARAMS ((bfd *abfd, unsigned int i));
-
--bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
-+bfd_vma
-+bfd_scan_vma PARAMS ((const char *string, const char **end, int base));
-
--bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
-+bfd_boolean
-+bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
-
- #define bfd_copy_private_bfd_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
- (ibfd, obfd))
--bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
-+bfd_boolean
-+bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
-
- #define bfd_merge_private_bfd_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
- (ibfd, obfd))
--bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
-+bfd_boolean
-+bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
-
- #define bfd_set_private_flags(abfd, flags) \
- BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
-@@ -3968,7 +4044,8 @@ extern bfd_byte *bfd_get_relocated_secti
- (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
- bfd_boolean, asymbol **);
-
--bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
-+bfd_boolean
-+bfd_alt_mach_code PARAMS ((bfd *abfd, int alternative));
-
- struct bfd_preserve
- {
-@@ -3982,27 +4059,34 @@ struct bfd_preserve
- struct bfd_hash_table section_htab;
- };
-
--bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
-+bfd_boolean
-+bfd_preserve_save PARAMS ((bfd *, struct bfd_preserve *));
-
--void bfd_preserve_restore (bfd *, struct bfd_preserve *);
-+void
-+bfd_preserve_restore PARAMS ((bfd *, struct bfd_preserve *));
-
--void bfd_preserve_finish (bfd *, struct bfd_preserve *);
-+void
-+bfd_preserve_finish PARAMS ((bfd *, struct bfd_preserve *));
-
- /* Extracted from archive.c. */
--symindex bfd_get_next_mapent
-- (bfd *abfd, symindex previous, carsym **sym);
-+symindex
-+bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
-
--bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
-+bfd_boolean
-+bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head));
-
--bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
-+bfd *
-+bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
-
- /* Extracted from corefile.c. */
--const char *bfd_core_file_failing_command (bfd *abfd);
-+const char *
-+bfd_core_file_failing_command PARAMS ((bfd *abfd));
-
--int bfd_core_file_failing_signal (bfd *abfd);
-+int
-+bfd_core_file_failing_signal PARAMS ((bfd *abfd));
-
--bfd_boolean core_file_matches_executable_p
-- (bfd *core_bfd, bfd *exec_bfd);
-+bfd_boolean
-+core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
-
- /* Extracted from targets.c. */
- #define BFD_SEND(bfd, message, arglist) \
-@@ -4362,35 +4446,42 @@ typedef struct bfd_target
-
- } bfd_target;
-
--bfd_boolean bfd_set_default_target (const char *name);
-+bfd_boolean
-+bfd_set_default_target PARAMS ((const char *name));
-
--const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
-+const bfd_target *
-+bfd_find_target PARAMS ((const char *target_name, bfd *abfd));
-
--const char ** bfd_target_list (void);
-+const char **
-+bfd_target_list PARAMS ((void));
-
--const bfd_target *bfd_search_for_target
-- (int (*search_func) (const bfd_target *, void *),
-- void *);
-+const bfd_target *
-+bfd_search_for_target PARAMS ((int (*search_func) (const bfd_target *, void *),
-+ void *));
-
- /* Extracted from format.c. */
--bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
-+bfd_boolean
-+bfd_check_format PARAMS ((bfd *abfd, bfd_format format));
-
--bfd_boolean bfd_check_format_matches
-- (bfd *abfd, bfd_format format, char ***matching);
-+bfd_boolean
-+bfd_check_format_matches PARAMS ((bfd *abfd, bfd_format format, char ***matching));
-
--bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
-+bfd_boolean
-+bfd_set_format PARAMS ((bfd *abfd, bfd_format format));
-
--const char *bfd_format_string (bfd_format format);
-+const char *
-+bfd_format_string PARAMS ((bfd_format format));
-
- /* Extracted from linker.c. */
--bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
-+bfd_boolean
-+bfd_link_split_section PARAMS ((bfd *abfd, asection *sec));
-
- #define bfd_link_split_section(abfd, sec) \
- BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
-
- /* Extracted from simple.c. */
--bfd_byte *bfd_simple_get_relocated_section_contents
-- (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
-+bfd_byte *
-+bfd_simple_get_relocated_section_contents PARAMS ((bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table));
-
- #ifdef __cplusplus
- }
---- binutils-2.15/bfd/config.bfd 2004-05-17 21:35:56.000000000 +0200
-+++ binutils-2.15-nios2/bfd/config.bfd 2005-05-17 12:20:13.000000000 +0200
-@@ -59,6 +59,7 @@ m6812*|m68hc12*) targ_archs="bfd_m68hc12
+diff --git a/bfd/config.bfd b/bfd/config.bfd
+index 1428831..caf64b5 100755
+--- a/bfd/config.bfd
++++ b/bfd/config.bfd
+@@ -59,6 +59,7 @@ m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch" ;;
m68*) targ_archs=bfd_m68k_arch ;;
m88*) targ_archs=bfd_m88k_arch ;;
mips*) targ_archs=bfd_mips_arch ;;
@@ -733,39 +186,59 @@
or32*) targ_archs=bfd_or32_arch ;;
pdp11*) targ_archs=bfd_pdp11_arch ;;
pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
-@@ -874,6 +875,10 @@ case "${targ}" in
+@@ -874,6 +875,21 @@ case "${targ}" in
targ_underscore=yes
;;
++ nios2eb-*-*)
++ targ_defvec=bfd_elf32_bignios2_vec
++ targ_selvecs=bfd_elf32_littlenios2_vec
++ ;;
++
++ nios2el-*-*)
++ targ_defvec=bfd_elf32_littlenios2_vec
++ targ_selvecs=bfd_elf32_bignios2_vec
++ ;;
++
+ nios2-*-*)
+ targ_defvec=bfd_elf32_littlenios2_vec
++ targ_selvecs=bfd_elf32_bignios2_vec
+ ;;
+
openrisc-*-elf)
targ_defvec=bfd_elf32_openrisc_vec
;;
---- binutils-2.15/bfd/configure 2004-05-17 21:35:57.000000000 +0200
-+++ binutils-2.15-nios2/bfd/configure 2005-05-17 12:20:13.000000000 +0200
-@@ -6322,6 +6322,7 @@ do
+diff --git a/bfd/configure b/bfd/configure
+index 46c8170..8c35166 100755
+--- a/bfd/configure
++++ b/bfd/configure
+@@ -6322,6 +6322,8 @@ do
bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_littlenios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
++ bfd_elf32_bignios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
---- binutils-2.15/bfd/configure.in 2004-05-17 21:35:57.000000000 +0200
-+++ binutils-2.15-nios2/bfd/configure.in 2005-05-17 12:20:13.000000000 +0200
-@@ -631,6 +631,7 @@ do
+diff --git a/bfd/configure.in b/bfd/configure.in
+index 71f41f4..eed3fa0 100644
+--- a/bfd/configure.in
++++ b/bfd/configure.in
+@@ -631,6 +631,8 @@ do
bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_littlenios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
++ bfd_elf32_bignios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
---- binutils-2.15/bfd/cpu-nios2.c 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/bfd/cpu-nios2.c 2005-05-17 12:20:13.000000000 +0200
+diff --git a/bfd/cpu-nios2.c b/bfd/cpu-nios2.c
+new file mode 100644
+index 0000000..c8f39c9
+--- /dev/null
++++ b/bfd/cpu-nios2.c
@@ -0,0 +1,70 @@
+/* bfd back-end for Altera Nios II support
+
@@ -837,8 +310,10 @@
+ so the linker can distinguish it */
+const bfd_arch_info_type bfd_nios2_arch =
+N (32, 32, 0, "nios2", TRUE, &arch_info_struct[0]);
---- binutils-2.15/bfd/elf.c 2004-05-17 21:35:57.000000000 +0200
-+++ binutils-2.15-nios2/bfd/elf.c 2005-05-17 12:20:13.000000000 +0200
+diff --git a/bfd/elf.c b/bfd/elf.c
+index a14fd35..3a061ec 100644
+--- a/bfd/elf.c
++++ b/bfd/elf.c
@@ -3286,9 +3286,14 @@ map_sections_to_segments (bfd *abfd)
phdr_size = elf_tdata (abfd)->program_header_size;
if (phdr_size == 0)
@@ -855,12 +330,15 @@
phdr_in_segment = FALSE;
}
---- binutils-2.15/bfd/elf32-nios2.c 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/bfd/elf32-nios2.c 2005-05-17 12:20:13.000000000 +0200
-@@ -0,0 +1,2188 @@
+diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
+new file mode 100644
+index 0000000..045b3a9
+--- /dev/null
++++ b/bfd/elf32-nios2.c
+@@ -0,0 +1,2191 @@
+/* New Jersey-specific support for 32-bit ELF
+
-+ Copyright (C) 2003
++ Copyright (C) 2005
+ by Nigel Gray (ngray@altera.com).
+
+
@@ -1028,6 +506,7 @@
+
+/* target vector */
+extern const bfd_target bfd_elf32_littlenios2_vec;
++extern const bfd_target bfd_elf32_bignios2_vec;
+
+/* The relocation table used for SHT_REL sections. */
+
@@ -2681,13 +2160,15 @@
+ }
+ else
+ {
++ bfd_vma symbol_address = rel->r_addend + relocation;
+ relocation = relocation + rel->r_addend - gp;
+ rel->r_addend = 0;
+ if ((signed) relocation < -32768
+ || (signed) relocation > 32767)
+ {
-+ format = _("global pointer relative offset %d at address 0x%08x out of range -32678 to 32767\n");
-+ sprintf(msgbuf, format, (signed)relocation, reloc_address);
++ format = _("Unable to reach %s (at 0x%08x) from the global pointer (at 0x%08x) "
++ "because the offset (%d) is out of the allowed range, -32678 to 32767.\n" );
++ sprintf(msgbuf, format, name, symbol_address, gp, (signed)relocation);
+ msg = msgbuf;
+ r = bfd_reloc_outofrange;
+ }
@@ -3042,49 +2523,15 @@
+/* Support for SGI-ish mips targets. */
+#define TARGET_LITTLE_SYM bfd_elf32_littlenios2_vec
+#define TARGET_LITTLE_NAME "elf32-littlenios2"
-+//#define TARGET_BIG_SYM bfd_elf32_bignios2_vec
-+//#define TARGET_BIG_NAME "elf32-bignios2"
++#define TARGET_BIG_SYM bfd_elf32_bignios2_vec
++#define TARGET_BIG_NAME "elf32-bignios2"
+
+#include "elf32-target.h"
---- binutils-2.15/bfd/libbfd.h 2004-02-12 00:23:20.000000000 +0100
-+++ binutils-2.15-nios2/bfd/libbfd.h 2005-05-17 12:20:13.000000000 +0200
-@@ -652,9 +652,11 @@ extern bfd_boolean _bfd_sh_align_load_sp
- #endif
- /* Extracted from init.c. */
- /* Extracted from libbfd.c. */
--bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
-+bfd_boolean
-+bfd_write_bigendian_4byte_int PARAMS ((bfd *, unsigned int));
-
--unsigned int bfd_log2 (bfd_vma x);
-+unsigned int
-+bfd_log2 PARAMS ((bfd_vma x));
-
- /* Extracted from bfdio.c. */
- /* Extracted from bfdwin.c. */
-@@ -673,13 +675,17 @@ extern bfd *bfd_last_cache;
- ((x)==bfd_last_cache? \
- (FILE*) (bfd_last_cache->iostream): \
- bfd_cache_lookup_worker(x))
--bfd_boolean bfd_cache_init (bfd *abfd);
-+bfd_boolean
-+bfd_cache_init PARAMS ((bfd *abfd));
-
--bfd_boolean bfd_cache_close (bfd *abfd);
-+bfd_boolean
-+bfd_cache_close PARAMS ((bfd *abfd));
-
--FILE* bfd_open_file (bfd *abfd);
-+FILE*
-+bfd_open_file PARAMS ((bfd *abfd));
-
--FILE *bfd_cache_lookup_worker (bfd *abfd);
-+FILE *
-+bfd_cache_lookup_worker PARAMS ((bfd *abfd));
-
- /* Extracted from reloc.c. */
- #ifdef _BFD_MAKE_TABLE_bfd_reloc_code_real
-@@ -1504,6 +1510,21 @@ static const char *const bfd_reloc_code_
+diff --git a/bfd/libbfd.h b/bfd/libbfd.h
+index 62043f3..3335b04 100644
+--- a/bfd/libbfd.h
++++ b/bfd/libbfd.h
+@@ -1504,6 +1504,21 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MSP430_16",
"BFD_RELOC_MSP430_16_PCREL_BYTE",
"BFD_RELOC_MSP430_16_BYTE",
@@ -3106,69 +2553,10 @@
"BFD_RELOC_IQ2000_OFFSET_16",
"BFD_RELOC_IQ2000_OFFSET_21",
"BFD_RELOC_IQ2000_UHI16",
-@@ -1521,40 +1542,41 @@ static const char *const bfd_reloc_code_
- };
- #endif
-
--reloc_howto_type *bfd_default_reloc_type_lookup
-- (bfd *abfd, bfd_reloc_code_real_type code);
-+reloc_howto_type *
-+bfd_default_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
-
--bfd_boolean bfd_generic_relax_section
-- (bfd *abfd,
-+bfd_boolean
-+bfd_generic_relax_section PARAMS ((bfd *abfd,
- asection *section,
- struct bfd_link_info *,
-- bfd_boolean *);
-+ bfd_boolean *));
-
--bfd_boolean bfd_generic_gc_sections
-- (bfd *, struct bfd_link_info *);
-+bfd_boolean
-+bfd_generic_gc_sections PARAMS ((bfd *, struct bfd_link_info *));
-
--bfd_boolean bfd_generic_merge_sections
-- (bfd *, struct bfd_link_info *);
-+bfd_boolean
-+bfd_generic_merge_sections PARAMS ((bfd *, struct bfd_link_info *));
-
--bfd_byte *bfd_generic_get_relocated_section_contents
-- (bfd *abfd,
-+bfd_byte *
-+bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd,
- struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
- bfd_byte *data,
- bfd_boolean relocatable,
-- asymbol **symbols);
-+ asymbol **symbols));
-
- /* Extracted from archures.c. */
- extern const bfd_arch_info_type bfd_default_arch_struct;
--bfd_boolean bfd_default_set_arch_mach
-- (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
-+bfd_boolean
-+bfd_default_set_arch_mach PARAMS ((bfd *abfd, enum bfd_architecture arch, unsigned long mach));
-
--const bfd_arch_info_type *bfd_default_compatible
-- (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
-+const bfd_arch_info_type *
-+bfd_default_compatible PARAMS ((const bfd_arch_info_type *a, const bfd_arch_info_type *b));
-
--bfd_boolean bfd_default_scan
-- (const struct bfd_arch_info *info, const char *string);
-+bfd_boolean
-+bfd_default_scan PARAMS ((const struct bfd_arch_info *info, const char *string));
-
- /* Extracted from elf.c. */
--struct elf_internal_shdr *bfd_elf_find_section (bfd *abfd, char *name);
-+struct elf_internal_shdr *
-+bfd_elf_find_section PARAMS ((bfd *abfd, char *name));
-
---- binutils-2.15/bfd/reloc.c 2004-01-21 12:17:53.000000000 +0100
-+++ binutils-2.15-nios2/bfd/reloc.c 2005-05-17 12:20:13.000000000 +0200
+diff --git a/bfd/reloc.c b/bfd/reloc.c
+index 9bffaa3..8807b30 100644
+--- a/bfd/reloc.c
++++ b/bfd/reloc.c
@@ -3943,6 +3943,39 @@ ENUMDOC
msp430 specific relocation codes
@@ -3209,8 +2597,10 @@
BFD_RELOC_IQ2000_OFFSET_16
ENUMX
BFD_RELOC_IQ2000_OFFSET_21
---- binutils-2.15/bfd/srec.c 2003-11-30 19:40:41.000000000 +0100
-+++ binutils-2.15-nios2/bfd/srec.c 2005-05-17 12:20:13.000000000 +0200
+diff --git a/bfd/srec.c b/bfd/srec.c
+index c0a3d58..1a1d0ce 100644
+--- a/bfd/srec.c
++++ b/bfd/srec.c
@@ -1009,9 +1009,14 @@ srec_write_header (abfd)
{
unsigned int len = strlen (abfd->filename);
@@ -3229,38 +2619,106 @@
return srec_write_record (abfd, 0, (bfd_vma) 0,
abfd->filename, abfd->filename + len);
---- binutils-2.15/bfd/targets.c 2004-05-17 21:36:04.000000000 +0200
-+++ binutils-2.15-nios2/bfd/targets.c 2005-05-17 12:20:13.000000000 +0200
-@@ -559,6 +559,7 @@ extern const bfd_target bfd_elf32_nbigmi
+diff --git a/bfd/targets.c b/bfd/targets.c
+index cec339c..1833c94 100644
+--- a/bfd/targets.c
++++ b/bfd/targets.c
+@@ -559,6 +559,8 @@ extern const bfd_target bfd_elf32_nbigmips_vec;
extern const bfd_target bfd_elf32_nlittlemips_vec;
extern const bfd_target bfd_elf32_ntradbigmips_vec;
extern const bfd_target bfd_elf32_ntradlittlemips_vec;
+extern const bfd_target bfd_elf32_littlenios2_vec;
++extern const bfd_target bfd_elf32_bignios2_vec;
extern const bfd_target bfd_elf32_openrisc_vec;
extern const bfd_target bfd_elf32_or32_big_vec;
extern const bfd_target bfd_elf32_pj_vec;
-@@ -746,6 +747,7 @@ extern const bfd_target sco5_core_vec;
+@@ -746,6 +748,8 @@ extern const bfd_target sco5_core_vec;
extern const bfd_target trad_core_vec;
extern const bfd_target bfd_elf32_am33lin_vec;
+extern const bfd_target bfd_elf32_littlenios2_vec;
++extern const bfd_target bfd_elf32_bignios2_vec;
static const bfd_target * const _bfd_target_vector[] = {
#ifdef SELECT_VECS
-@@ -854,6 +856,7 @@ static const bfd_target * const _bfd_tar
+@@ -854,6 +858,8 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_ntradbigmips_vec,
&bfd_elf32_ntradlittlemips_vec,
#endif
+ &bfd_elf32_littlenios2_vec,
++ &bfd_elf32_bignios2_vec,
&bfd_elf32_openrisc_vec,
&bfd_elf32_or32_big_vec,
&bfd_elf32_pj_vec,
---- binutils-2.15/binutils/nios2_binutils_xfail.lst 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/binutils/nios2_binutils_xfail.lst 2005-05-17 12:20:13.000000000 +0200
+diff --git a/binutils/nios2_binutils_xfail.lst b/binutils/nios2_binutils_xfail.lst
+new file mode 100644
+index 0000000..3219223
+--- /dev/null
++++ b/binutils/nios2_binutils_xfail.lst
@@ -0,0 +1 @@
+No xfails
---- binutils-2.15/binutils/readelf.c 2004-05-17 21:35:52.000000000 +0200
-+++ binutils-2.15-nios2/binutils/readelf.c 2005-05-17 12:20:13.000000000 +0200
+diff --git a/binutils/objcopy.c b/binutils/objcopy.c
+index 9623398..a1b7a05 100644
+--- a/binutils/objcopy.c
++++ b/binutils/objcopy.c
+@@ -1705,8 +1705,53 @@ copy_file (const char *input_filename, const char *output_filename,
+
+ delete = ! copy_object (ibfd, obfd);
+
++ if (!strcmp (obfd->xvec->name, "srec")
++ && (!strcmp (ibfd->xvec->name, "elf32-bignios2")
++ || !strcmp (ibfd->xvec->name, "elf32-littlenios2")))
++ {
++ /*
++ * We're copying a big-endian or little-endian elf to an srec.
++ * Tag the elf with a hardcoded S0 record so other tools know
++ * which endianness was in the original elf file.
++ *
++ * This is a hack, as srec files don't really have an
++ * endianness. We just need a way to tell tools like
++ * flash2dat.pl which endianness was originally present.
++ *
++ * At some point in the future, we should stop using srec files
++ * entirely: flash2dat and friends should just read the elf file
++ * directly.
++ */
++ char *new_filename = NULL;
++ const char *orig_filename = obfd->filename;
++ int result;
++
++ if (!strcmp (ibfd->xvec->name, "elf32-bignios2"))
++ {
++ new_filename = strdup("-EB");
++ }
++ else
++ {
++ new_filename = strdup("-EL");
++ }
++ obfd->filename = new_filename;
++
++ result = bfd_close (obfd);
++
++ if ( obfd != NULL && new_filename == obfd->filename )
++ {
++ free(new_filename);
++ obfd->filename = orig_filename;
++ }
++
++ if (!result)
++ RETURN_NONFATAL (output_filename);
++ }
++ else
++ {
+ if (!bfd_close (obfd))
+ RETURN_NONFATAL (output_filename);
++ }
+
+ if (!bfd_close (ibfd))
+ RETURN_NONFATAL (input_filename);
+diff --git a/binutils/readelf.c b/binutils/readelf.c
+index e95a501..a436778 100644
+--- a/binutils/readelf.c
++++ b/binutils/readelf.c
@@ -110,6 +110,8 @@
#include "aout/ar.h"
@@ -3297,8 +2755,10 @@
default:
sprintf (buff, _("<unknown>: %x"), e_machine);
return buff;
---- binutils-2.15/binutils/testsuite/binutils-all/bintest.s 1999-05-03 09:29:11.000000000 +0200
-+++ binutils-2.15-nios2/binutils/testsuite/binutils-all/bintest.s 2005-05-17 12:20:13.000000000 +0200
+diff --git a/binutils/testsuite/binutils-all/bintest.s b/binutils/testsuite/binutils-all/bintest.s
+index 9e00650..177b08c 100644
+--- a/binutils/testsuite/binutils-all/bintest.s
++++ b/binutils/testsuite/binutils-all/bintest.s
@@ -1,5 +1,8 @@
.globl text_symbol
.text
@@ -3308,50 +2768,40 @@
text_symbol:
static_text_symbol:
.long 1
---- binutils-2.15/binutils-2.15_copied 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/binutils-2.15_copied 2005-05-17 12:20:13.000000000 +0200
-@@ -0,0 +1 @@
-+timestamp
---- binutils-2.15/binutils-2.15_untarred 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/binutils-2.15_untarred 2005-05-17 12:20:13.000000000 +0200
-@@ -0,0 +1 @@
-+timestamp
---- binutils-2.15/configure 2004-05-17 21:36:20.000000000 +0200
-+++ binutils-2.15-nios2/configure 2005-05-17 12:20:13.000000000 +0200
+diff --git a/configure b/configure
+index d11c49b..41c0c64 100755
+--- a/configure
++++ b/configure
@@ -1434,6 +1434,10 @@ case "${target}" in
mips*-*-*)
noconfigdirs="$noconfigdirs gprof ${libgcj}"
;;
-+ nios2-*-*)
++ nios2*-*-*)
+ skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'`
+ noconfigdirs="$noconfigdirs"
+ ;;
romp-*-*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
;;
---- binutils-2.15/configure.in 2004-05-17 21:40:54.000000000 +0200
-+++ binutils-2.15-nios2/configure.in 2005-05-17 12:20:13.000000000 +0200
-@@ -18,6 +18,7 @@
- ##############################################################################
- ### WARNING: this file contains embedded tabs. Do not run untabify on this file.
-
-+
- AC_INIT(move-if-change)
- AC_PREREQ(2.13)
- AC_CANONICAL_SYSTEM
-@@ -667,6 +668,10 @@ case "${target}" in
+diff --git a/configure.in b/configure.in
+index 6c0c465..c770956 100644
+--- a/configure.in
++++ b/configure.in
+@@ -667,6 +667,10 @@ case "${target}" in
mips*-*-*)
noconfigdirs="$noconfigdirs gprof ${libgcj}"
;;
-+ nios2-*-*)
++ nios2*-*-*)
+ skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'`
+ noconfigdirs="$noconfigdirs"
+ ;;
romp-*-*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
;;
---- binutils-2.15/gas/Makefile.in 2004-05-17 21:36:07.000000000 +0200
-+++ binutils-2.15-nios2/gas/Makefile.in 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/Makefile.in b/gas/Makefile.in
+index 67ed432..7870a9e 100644
+--- a/gas/Makefile.in
++++ b/gas/Makefile.in
@@ -299,6 +299,7 @@ CPU_TYPES = \
mn10200 \
mn10300 \
@@ -3376,7 +2826,7 @@
config/tc-ns32k.h \
config/tc-openrisc.h \
config/tc-or32.h \
-@@ -1171,6 +1174,13 @@ DEPTC_msp430_elf = $(INCDIR)/symcat.h $(
+@@ -1171,6 +1174,13 @@ DEPTC_msp430_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/msp430.h \
$(INCDIR)/safe-ctype.h
@@ -3390,7 +2840,7 @@
DEPTC_ns32k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
$(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h
-@@ -1824,6 +1834,12 @@ DEPOBJ_msp430_elf = $(INCDIR)/symcat.h $
+@@ -1824,6 +1834,12 @@ DEPOBJ_msp430_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
@@ -3403,7 +2853,7 @@
DEPOBJ_ns32k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
$(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-@@ -2349,6 +2365,10 @@ DEP_msp430_elf = $(srcdir)/config/obj-el
+@@ -2349,6 +2365,10 @@ DEP_msp430_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-msp430.h
@@ -3414,8 +2864,10 @@
DEP_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
---- binutils-2.15/gas/config/obj-elf.c 2004-05-17 21:36:08.000000000 +0200
-+++ binutils-2.15-nios2/gas/config/obj-elf.c 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
+index 14d48f2..6d9639f 100644
+--- a/gas/config/obj-elf.c
++++ b/gas/config/obj-elf.c
@@ -53,6 +53,10 @@
#include "elf/i370.h"
#endif
@@ -3427,9 +2879,12 @@
static void obj_elf_line (int);
static void obj_elf_size (int);
static void obj_elf_type (int);
---- binutils-2.15/gas/config/tc-nios2.c 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/config/tc-nios2.c 2005-05-17 12:20:13.000000000 +0200
-@@ -0,0 +1,2996 @@
+diff --git a/gas/config/tc-nios2.c b/gas/config/tc-nios2.c
+new file mode 100644
+index 0000000..21f994e
+--- /dev/null
++++ b/gas/config/tc-nios2.c
+@@ -0,0 +1,3197 @@
+/* tc-nios2.c -- assemble code for a New Jersey processor.
+
+ Copyright (C) 2003
@@ -3467,6 +2922,9 @@
+#include "subsegs.h"
+#include "safe-ctype.h"
+
++/* We can choose our endianness at run-time, regardless of configuration */
++extern int target_big_endian;
++
+#ifndef OBJ_ELF
+ /* we are not supporting any other target
+ so we throw a compile time error */
@@ -3649,6 +3107,12 @@
+static void output_cbranch (void);
+static void output_call (void);
+static void output_movia (void);
++static void output_andi (void);
++static void output_addi (void);
++static void output_ori (void);
++static void output_xori (void);
++static int can_evaluate_expr (void);
++static int get_expr_value (void);
+
+
+bfd_boolean nios2_check_overflow (valueT fixup, reloc_howto_type * howto);
@@ -3745,7 +3209,11 @@
+#define OPTION_NORELAX (OPTION_MD_BASE + 1)
+ {"no-relax", no_argument, NULL, OPTION_NORELAX},
+#define OPTION_RELAX_SECTION (OPTION_MD_BASE + 2)
-+ {"relax-section", no_argument, NULL, OPTION_RELAX_SECTION}
++ {"relax-section", no_argument, NULL, OPTION_RELAX_SECTION},
++#define OPTION_EB (OPTION_MD_BASE + 3)
++ {"EB", no_argument, NULL, OPTION_EB},
++#define OPTION_EL (OPTION_MD_BASE + 4)
++ {"EL", no_argument, NULL, OPTION_EL}
+};
+
+size_t md_longopts_size = sizeof (md_longopts);
@@ -4193,6 +3661,12 @@
+ case OPTION_RELAX_SECTION:
+ nios2_as_options.relax = relax_section;
+ break;
++ case OPTION_EB:
++ target_big_endian = 1;
++ break;
++ case OPTION_EL:
++ target_big_endian = 0;
++ break;
+ default:
+ return 0;
+ break;
@@ -4202,6 +3676,16 @@
+}
+
+/*
++ * We can choose to be big-endian or little-endian at runtime based
++ * on a switch.
++ */
++const char *
++nios2_target_format (void)
++{
++ return target_big_endian ? "elf32-bignios2" : "elf32-littlenios2";
++}
++
++/*
+ Function : md_show_usage(FILE* stream)
+
+ Description : machine-dependent usage message
@@ -4213,7 +3697,9 @@
+ NIOS2 options:\n\
+ -relax-all replace all branch and call instructions with jmp and callr sequences\n\
+ -relax-section replace identified out of range branches with jmp sequences (default)\n\
-+ -no-relax do not replace any branches or calls\n");
++ -no-relax do not replace any branches or calls\n\
++ -EB force big-endian byte ordering\n\
++ -EL force little-endian byte ordering\n");
+}
+
+/*
@@ -4397,6 +3883,14 @@
+ else if (nios2_as_options.relax == relax_all
+ && insn.insn_nios2_opcode->pinfo & NIOS2_INSN_CALL)
+ output_call ();
++ else if (insn.insn_nios2_opcode->pinfo & NIOS2_INSN_ANDI)
++ output_andi ();
++ else if (insn.insn_nios2_opcode->pinfo & NIOS2_INSN_ORI)
++ output_ori ();
++ else if (insn.insn_nios2_opcode->pinfo & NIOS2_INSN_XORI)
++ output_xori ();
++ else if (insn.insn_nios2_opcode->pinfo & NIOS2_INSN_ADDI)
++ output_addi ();
+ else if (saved_pinfo == NIOS2_INSN_MACRO_MOVIA)
+ output_movia ();
+ else
@@ -4551,6 +4045,123 @@
+ }
+}
+
++
++static int
++can_evaluate_expr ()
++{
++ /* remove this check for null and the invalid insn "ori r9, 1234" seg faults */
++ if (!insn.insn_reloc)
++ {
++ /* ??? Ideally we should do something other than as_fatal here as we can continue to assemble.
++ However this function (actually the output_* functions) should not have been called
++ in the first place once an illegal instruction had been encountered */
++ as_fatal (_("Invalid instruction encountered, cannot recover. No assembly attempted."));
++ }
++
++ if (insn.insn_reloc->reloc_expression.X_op == O_constant)
++ return 1;
++
++ return 0;
++}
++
++static int
++get_expr_value ()
++{
++ int value = 0;
++ if (insn.insn_reloc->reloc_expression.X_op == O_constant)
++ value = insn.insn_reloc->reloc_expression.X_add_number;
++ return value;
++}
++
++/* output an addi - will silently convert to
++ * orhi if rA = r0 and (expr & 0xffff0000) == 0 */
++static void
++output_addi ()
++{
++ int expr_val = 0;
++ if (can_evaluate_expr ())
++ {
++ expr_val = get_expr_value ();
++ if (GET_INSN_FIELD (RRS, insn.insn_code) == 0 &&
++ (expr_val & 0xffff) == 0 && expr_val != 0)
++ {
++
++ /* we really want a movhi (orhi) here */
++ insn.insn_code = (insn.insn_code & ~OP_MATCH_ADDI) | OP_MATCH_ORHI;
++ insn.insn_reloc->reloc_expression.X_add_number =
++ (insn.insn_reloc->reloc_expression.X_add_number >> 16) & 0xffff;
++ insn.insn_reloc->reloc_type = BFD_RELOC_NIOS2_U16;
++ }
++ }
++
++ /* output an instruction */
++ output_insn ();
++}
++
++static void
++output_andi ()
++{
++ int expr_val = 0;
++ if (can_evaluate_expr ())
++ {
++ expr_val = get_expr_value ();
++ if (expr_val != 0 && (expr_val & 0xffff) == 0)
++ {
++ /* we really want a movhi (orhi) here */
++ insn.insn_code = (insn.insn_code & ~OP_MATCH_ANDI) | OP_MATCH_ANDHI;
++ insn.insn_reloc->reloc_expression.X_add_number =
++ (insn.insn_reloc->reloc_expression.X_add_number >> 16) & 0xffff;
++ insn.insn_reloc->reloc_type = BFD_RELOC_NIOS2_U16;
++ }
++ }
++
++ /* output an instruction */
++ output_insn ();
++}
++
++static void
++output_ori ()
++{
++ int expr_val = 0;
++ if (can_evaluate_expr ())
++ {
++ expr_val = get_expr_value ();
++ if (expr_val != 0 && (expr_val & 0xffff) == 0)
++ {
++ /* we really want a movhi (orhi) here */
++ insn.insn_code = (insn.insn_code & ~OP_MATCH_ORI) | OP_MATCH_ORHI;
++ insn.insn_reloc->reloc_expression.X_add_number =
++ (insn.insn_reloc->reloc_expression.X_add_number >> 16) & 0xffff;
++ insn.insn_reloc->reloc_type = BFD_RELOC_NIOS2_U16;
++ }
++ }
++
++ /* output an instruction */
++ output_insn ();
++}
++
++static void
++output_xori ()
++{
++ int expr_val = 0;
++ if (can_evaluate_expr ())
++ {
++ expr_val = get_expr_value ();
++ if (expr_val != 0 && (expr_val & 0xffff) == 0)
++ {
++ /* we really want a movhi (orhi) here */
++ insn.insn_code = (insn.insn_code & ~OP_MATCH_XORI) | OP_MATCH_XORHI;
++ insn.insn_reloc->reloc_expression.X_add_number =
++ (insn.insn_reloc->reloc_expression.X_add_number >> 16) & 0xffff;
++ insn.insn_reloc->reloc_type = BFD_RELOC_NIOS2_U16;
++ }
++ }
++
++ /* output an instruction */
++ output_insn ();
++}
++
++
+/* output a movhi/addi pair for the movia pseudo-op */
+static void
+output_movia ()
@@ -4586,23 +4197,32 @@
+
+/*
+ Function md_chars_to_number takes the sequence of
-+ bytes in bug and returns the corresponding value
++ bytes in buf and returns the corresponding value
+ in an int. n must be 1, 2 or 4.
+ */
+valueT
+md_chars_to_number (char *buf, int n)
+{
-+ // this assumes little endian format
+ int i;
+ valueT val;
+
+ assert (n == 1 || n == 2 || n == 4);
+
+ val = 0;
++ if (target_big_endian)
++ {
++ for (i = 0; i < n; ++i)
++ {
++ val = val | ((buf[i] & 0xff) << 8 * (n - (i + 1)));
++ }
++ }
++ else
++ {
+ for (i = 0; i < n; ++i)
+ {
+ val = val | ((buf[i] & 0xff) << 8 * i);
+ }
++ }
+ return val;
+}
+
@@ -4617,13 +4237,14 @@
+void
+md_number_to_chars (char *buf, valueT val, int n)
+{
-+ /* this assumes little endian format */
-+ int i;
+ assert (n == 1 || n == 2 || n == 4);
-+ for (i = 0; i < n; ++i)
++ if (target_big_endian)
+ {
-+ buf[i] = val & 0xFF;
-+ val >>= 8;
++ number_to_chars_bigendian (buf, val, n);
++ }
++ else
++ {
++ number_to_chars_littleendian (buf, val, n);
+ }
+}
+
@@ -4699,12 +4320,22 @@
+
+ *sizeP = prec * 2;
+
-+ /* little endian target */
++ if (! target_big_endian)
++ {
+ for (i = prec - 1; i >= 0; i--)
+ {
+ md_number_to_chars (litP, (valueT) words[i], 2);
+ litP += 2;
+ }
++ }
++ else
++ {
++ for (i = 0; i < prec; i++)
++ {
++ md_number_to_chars (litP, (valueT) words[i], 2);
++ litP += 2;
++ }
++ }
+
+ return NULL;
+}
@@ -5093,7 +4724,7 @@
+
+
+ /* apply the rightshift */
-+ (signed) fixup >>= howto->rightshift;
++ fixup >>= howto->rightshift;
+
+ /* truncate the fixup to right size */
+ switch (fixP->fx_r_type)
@@ -5138,7 +4769,7 @@
+nios2_check_overflow (valueT fixup, reloc_howto_type * howto)
+{
+ /* apply the rightshift before checking for overflow */
-+ (signed) fixup >>= howto->rightshift;
++ fixup >>= howto->rightshift;
+
+ /* check for overflow - return TRUE if overflow, FALSE if not */
+ switch (howto->complain_on_overflow)
@@ -5331,11 +4962,16 @@
+ {
+ case 'c':
+ if (strncmp (argStr, "ctl", strlen ("ctl")) != 0
++ && strncmp (argStr, "cpuid", strlen ("cpuid")) != 0
+ && strncmp (argStr, "status", strlen ("status")) != 0
+ && strncmp (argStr, "estatus", strlen ("estatus")) != 0
+ && strncmp (argStr, "bstatus", strlen ("bstatus")) != 0
+ && strncmp (argStr, "ienable", strlen ("ienable")) != 0
-+ && strncmp (argStr, "ipending", strlen ("ipending")) != 0)
++ && strncmp (argStr, "ipending", strlen ("ipending")) != 0
++ && strncmp (argStr, "pteaddr", strlen ("pteaddr")) != 0
++ && strncmp (argStr, "tlbacc", strlen ("tlbacc")) != 0
++ && strncmp (argStr, "tlbmisc", strlen ("tlbmisc")) != 0
++ && strncmp (argStr, "fstatus", strlen ("fstatus")) != 0)
+ {
+ as_bad (_("expecting control register"));
+ }
@@ -5346,11 +4982,16 @@
+
+ /* we check to make sure we don't have a control register */
+ if (strncmp (argStr, "ctl", strlen ("ctl")) == 0
++ || strncmp (argStr, "cpuid", strlen ("cpuid")) == 0
+ || strncmp (argStr, "status", strlen ("status")) == 0
+ || strncmp (argStr, "estatus", strlen ("estatus")) == 0
+ || strncmp (argStr, "bstatus", strlen ("bstatus")) == 0
+ || strncmp (argStr, "ienable", strlen ("ienable")) == 0
-+ || strncmp (argStr, "ipending", strlen ("ipending")) == 0)
++ || strncmp (argStr, "ipending", strlen ("ipending")) == 0
++ || strncmp (argStr, "pteaddr", strlen ("pteaddr")) == 0
++ || strncmp (argStr, "tlbacc", strlen ("tlbacc")) == 0
++ || strncmp (argStr, "tlbmisc", strlen ("tlbmisc")) == 0
++ || strncmp (argStr, "fstatus", strlen ("fstatus")) == 0)
+ {
+ as_bad (_("illegal use of control register"));
+ }
@@ -5444,6 +5085,21 @@
+ default:
+ break;
+ }
++
++#if 0
++/* ??? SPR:173865 This is actually supported by the HW but the documentation is a bit funny.
++ The compiler really want the extra register, so let it have it! */
++ /* checks for jmp 31 */
++ /* TODO: move test that insn is jmp to somewhere better.*/
++ if ((strncmp (insn.insn_nios2_opcode->name, "jmp", strlen ("jmp")) == 0)
++ && (regno == 31
++ || strncmp (argStr, "ra", strlen ("ra")) == 0))
++ {
++ as_bad (_("It is illegal to jump to the address contained in register ra (r31). "
++ "To return from subroutines called by call or callr, use ret instead of jmp."));
++ }
++#endif
++
+ return argStr;
+}
+
@@ -6426,9 +6082,12 @@
+ nios2_current_align = 0;
+ nios2_current_align_seg = now_seg;
+}
---- binutils-2.15/gas/config/tc-nios2.h 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/config/tc-nios2.h 2005-05-17 12:20:13.000000000 +0200
-@@ -0,0 +1,98 @@
+diff --git a/gas/config/tc-nios2.h b/gas/config/tc-nios2.h
+new file mode 100644
+index 0000000..660aaa3
+--- /dev/null
++++ b/gas/config/tc-nios2.h
+@@ -0,0 +1,105 @@
+/* tc-nios2.h -- header file for tc-nios2.c.
+
+ Copyright (C) 2003
@@ -6454,11 +6113,18 @@
+#ifndef TC_NIOS2
+#define TC_NIOS2
+
-+
++/*
++ * If unspecified, default to little endian. We can explicitly specify
++ * a big-endian default by configuring with --target=nios2eb-elf. We
++ * can override the default with the -EB and -EL options.
++ */
++#ifndef TARGET_BYTES_BIG_ENDIAN
+#define TARGET_BYTES_BIG_ENDIAN 0
++#endif
+
+#ifdef OBJ_ELF
-+#define TARGET_FORMAT "elf32-littlenios2"
++extern const char *nios2_target_format (void);
++#define TARGET_FORMAT nios2_target_format ()
+#define TARGET_ARCH bfd_arch_nios2
+#endif
+
@@ -6527,62 +6193,70 @@
+
+
+#endif // TC_NIOS2
---- binutils-2.15/gas/configure 2004-05-17 21:36:07.000000000 +0200
-+++ binutils-2.15-nios2/gas/configure 2005-05-17 12:20:13.000000000 +0200
-@@ -4173,6 +4173,7 @@ for this_target in $target $canon_target
+diff --git a/gas/configure b/gas/configure
+index e66abca..cbb3889 100755
+--- a/gas/configure
++++ b/gas/configure
+@@ -4173,6 +4173,8 @@ for this_target in $target $canon_targets ; do
m8*) cpu_type=m88k ;;
mips*el) cpu_type=mips endian=little ;;
mips*) cpu_type=mips endian=big ;;
-+ nios2*|nios2*) cpu_type=nios2 ;;
++ nios2eb) cpu_type=nios2 endian=big ;;
++ nios2el|nios2) cpu_type=nios2 endian=little ;;
or32*) cpu_type=or32 endian=big ;;
pjl*) cpu_type=pj endian=little ;;
pj*) cpu_type=pj endian=big ;;
-@@ -4439,6 +4440,7 @@ echo "$as_me: error: Unknown vendor for
+@@ -4439,6 +4441,7 @@ echo "$as_me: error: Unknown vendor for mips-bsd configuration." >&2;}
mn10200-*-*) fmt=elf ;;
mn10300-*-*) fmt=elf ;;
msp430-*-*) fmt=elf ;;
-+ nios2-*-*) fmt=elf ;;
++ nios2*-*-*) fmt=elf ;;
openrisc-*-*) fmt=elf ;;
or32-*-rtems*) fmt=elf ;;
or32-*-coff) fmt=coff ;;
-@@ -4589,7 +4591,7 @@ _ACEOF
+@@ -4589,7 +4592,7 @@ _ACEOF
fi
case ${cpu_type}-${fmt} in
- alpha*-* | arm-* | i386-* | ia64*-* | mips-* | ns32k-* \
-+ alpha*-* | arm-* | i386-* | ia64*-* | mips-* | nios2-* | ns32k-* \
++ alpha*-* | arm-* | i386-* | ia64*-* | mips-* | nios2*-* | ns32k-* \
| pdp11-* | ppc-* | sparc-* | strongarm-* | xscale-* \
| *-elf | *-ecoff | *-som)
bfd_gas=yes ;;
---- binutils-2.15/gas/configure.in 2004-05-17 21:36:07.000000000 +0200
-+++ binutils-2.15-nios2/gas/configure.in 2005-05-17 12:20:13.000000000 +0200
-@@ -143,6 +143,7 @@ changequote([,])dnl
+diff --git a/gas/configure.in b/gas/configure.in
+index f7d0acb..e20754e 100644
+--- a/gas/configure.in
++++ b/gas/configure.in
+@@ -143,6 +143,8 @@ changequote([,])dnl
m8*) cpu_type=m88k ;;
mips*el) cpu_type=mips endian=little ;;
mips*) cpu_type=mips endian=big ;;
-+ nios2*|nios2*) cpu_type=nios2 ;;
++ nios2eb) cpu_type=nios2 endian=big ;;
++ nios2el|nios2) cpu_type=nios2 endian=little ;;
or32*) cpu_type=or32 endian=big ;;
pjl*) cpu_type=pj endian=little ;;
pj*) cpu_type=pj endian=big ;;
-@@ -400,6 +401,7 @@ changequote([,])dnl
+@@ -400,6 +402,7 @@ changequote([,])dnl
mn10200-*-*) fmt=elf ;;
mn10300-*-*) fmt=elf ;;
msp430-*-*) fmt=elf ;;
-+ nios2-*-*) fmt=elf ;;
++ nios2*-*-*) fmt=elf ;;
openrisc-*-*) fmt=elf ;;
or32-*-rtems*) fmt=elf ;;
or32-*-coff) fmt=coff ;;
-@@ -539,7 +541,7 @@ changequote([,])dnl
+@@ -539,7 +542,7 @@ changequote([,])dnl
fi
case ${cpu_type}-${fmt} in
- alpha*-* | arm-* | i386-* | ia64*-* | mips-* | ns32k-* \
-+ alpha*-* | arm-* | i386-* | ia64*-* | mips-* | nios2-* | ns32k-* \
++ alpha*-* | arm-* | i386-* | ia64*-* | mips-* | nios2*-* | ns32k-* \
| pdp11-* | ppc-* | sparc-* | strongarm-* | xscale-* \
| *-elf | *-ecoff | *-som)
bfd_gas=yes ;;
---- binutils-2.15/gas/doc/Makefile.am 2004-01-05 23:16:05.000000000 +0100
-+++ binutils-2.15-nios2/gas/doc/Makefile.am 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/doc/Makefile.am b/gas/doc/Makefile.am
+index 7f0f805..3e6af57 100644
+--- a/gas/doc/Makefile.am
++++ b/gas/doc/Makefile.am
@@ -24,6 +24,7 @@ asconfig.texi: $(CONFIG).texi
|| cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
@@ -6591,9 +6265,11 @@
c-a29k.texi \
c-alpha.texi \
c-arc.texi \
---- binutils-2.15/gas/doc/Makefile.in 2004-05-17 21:36:11.000000000 +0200
-+++ binutils-2.15-nios2/gas/doc/Makefile.in 2005-05-17 12:20:13.000000000 +0200
-@@ -213,6 +213,7 @@ POD2MAN = pod2man --center="GNU Developm
+diff --git a/gas/doc/Makefile.in b/gas/doc/Makefile.in
+index 0c6a1b0..c7472d0 100644
+--- a/gas/doc/Makefile.in
++++ b/gas/doc/Makefile.in
+@@ -213,6 +213,7 @@ POD2MAN = pod2man --center="GNU Development Tools" \
man_MANS = as.1
info_TEXINFOS = as.texinfo
CPU_DOCS = \
@@ -6601,8 +6277,10 @@
c-a29k.texi \
c-alpha.texi \
c-arc.texi \
---- binutils-2.15/gas/doc/all.texi 2003-04-01 17:50:30.000000000 +0200
-+++ binutils-2.15-nios2/gas/doc/all.texi 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/doc/all.texi b/gas/doc/all.texi
+index 4e302ce..3094553 100644
+--- a/gas/doc/all.texi
++++ b/gas/doc/all.texi
@@ -26,6 +26,7 @@
@c CPUs of interest
@@ -6611,9 +6289,11 @@
@set A29K
@set ALPHA
@set ARC
---- binutils-2.15/gas/doc/as.texinfo 2004-01-09 03:34:04.000000000 +0100
-+++ binutils-2.15-nios2/gas/doc/as.texinfo 2005-05-17 12:20:13.000000000 +0200
-@@ -238,6 +238,15 @@ gcc(1), ld(1), and the Info entries for
+diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
+index d9d23df..ab2affa 100644
+--- a/gas/doc/as.texinfo
++++ b/gas/doc/as.texinfo
+@@ -238,6 +238,15 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
@c
@c Target dependent options are listed below. Keep the list sorted.
@c Add an empty line for separation.
@@ -6629,7 +6309,7 @@
@ifset A29K
@c am29k has no machine-dependent assembler options
@end ifset
-@@ -577,6 +586,21 @@ Standard input, or source files to assem
+@@ -577,6 +586,21 @@ Standard input, or source files to assemble.
@end table
@@ -6651,7 +6331,7 @@
@ifset ARC
The following options are available when @value{AS} is configured for
an ARC processor.
-@@ -2035,6 +2059,9 @@ This means you may not nest these commen
+@@ -2035,6 +2059,9 @@ This means you may not nest these comments.
@cindex line comment character
Anything from the @dfn{line comment} character to the next newline
is considered a comment and is ignored. The line comment character is
@@ -6661,7 +6341,7 @@
@ifset A29K
@samp{;} for the AMD 29K family;
@end ifset
-@@ -3876,7 +3903,7 @@ is already a multiple of 8, no change is
+@@ -3876,7 +3903,7 @@ is already a multiple of 8, no change is needed. For the tic54x, the
first expression is the alignment request in words.
For other systems, including the i386 using a.out format, and the arm and
@@ -6670,7 +6350,7 @@
number of low-order zero bits the location counter must have after
advancement. For example @samp{.align 3} advances the location
counter until it a multiple of 8. If the location counter is already a
-@@ -5864,6 +5891,9 @@ include details on any machine's instruc
+@@ -5864,6 +5891,9 @@ include details on any machine's instruction set. For details on that
subject, see the hardware manufacturer's manual.
@menu
@@ -6680,7 +6360,7 @@
@ifset A29K
* AMD29K-Dependent:: AMD 29K Dependent Features
@end ifset
-@@ -5974,6 +6004,11 @@ subject, see the hardware manufacturer's
+@@ -5974,6 +6004,11 @@ subject, see the hardware manufacturer's manual.
@c node and sectioning commands; hence the repetition of @chapter BLAH
@c in both conditional blocks.
@@ -6692,9 +6372,12 @@
@ifset A29K
@include c-a29k.texi
@end ifset
---- binutils-2.15/gas/doc/c-nios2.texi 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/doc/c-nios2.texi 2005-05-17 12:20:13.000000000 +0200
-@@ -0,0 +1,214 @@
+diff --git a/gas/doc/c-nios2.texi b/gas/doc/c-nios2.texi
+new file mode 100644
+index 0000000..b2d5d61
+--- /dev/null
++++ b/gas/doc/c-nios2.texi
+@@ -0,0 +1,222 @@
+@c Copyright 2004
+@c This is part of the GAS manual.
+@c For copying conditions, see the file as.texinfo.
@@ -6738,6 +6421,14 @@
+@item -no-relax
+Do not replace any branches or calls
+
++@cindex @code{EB} command line option, Nios II
++@item -EB
++Generate big-endian output
++
++@cindex @code{EL} command line option, Nios II
++@item -EL
++Generate little-endian output
++
+@end table
+
+
@@ -6909,36 +6600,47 @@
+For information on the Nios II machine instruction set, see the @cite{Nios II
+User's Manual}
+
---- binutils-2.15/gas/testsuite/gas/macros/irp.s 1999-06-10 15:48:35.000000000 +0200
-+++ binutils-2.15-nios2/gas/testsuite/gas/macros/irp.s 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/macros/irp.s b/gas/testsuite/gas/macros/irp.s
+index f37dd54..95a91e3 100644
+--- a/gas/testsuite/gas/macros/irp.s
++++ b/gas/testsuite/gas/macros/irp.s
@@ -1,3 +1,4 @@
+ .set norelax
.irp param,1,2,3
.long foo\param
.endr
---- binutils-2.15/gas/testsuite/gas/macros/rept.s 1999-06-10 15:48:39.000000000 +0200
-+++ binutils-2.15-nios2/gas/testsuite/gas/macros/rept.s 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/macros/rept.s b/gas/testsuite/gas/macros/rept.s
+index 571b6f8..d6f86c1 100644
+--- a/gas/testsuite/gas/macros/rept.s
++++ b/gas/testsuite/gas/macros/rept.s
@@ -1,3 +1,4 @@
+ .set norelax
.rept 3
.long foo1
.endr
---- binutils-2.15/gas/testsuite/gas/macros/test2.s 2004-02-06 17:00:21.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/macros/test2.s 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/macros/test2.s b/gas/testsuite/gas/macros/test2.s
+index 0cfca29..ad62adc 100644
+--- a/gas/testsuite/gas/macros/test2.s
++++ b/gas/testsuite/gas/macros/test2.s
@@ -1,3 +1,4 @@
+ .set norelax
.macro m arg1 arg2 arg3
.long \arg1
.ifc ,\arg2\arg3
---- binutils-2.15/gas/testsuite/gas/macros/test3.s 1999-06-10 15:48:44.000000000 +0200
-+++ binutils-2.15-nios2/gas/testsuite/gas/macros/test3.s 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/macros/test3.s b/gas/testsuite/gas/macros/test3.s
+index e80aa20..0070527 100644
+--- a/gas/testsuite/gas/macros/test3.s
++++ b/gas/testsuite/gas/macros/test3.s
@@ -1,3 +1,4 @@
+ .set norelax
.macro m arg1 arg2
\arg1
.exitm
---- binutils-2.15/gas/testsuite/gas/nios2/add.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/add.d 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/add.d b/gas/testsuite/gas/nios2/add.d
+new file mode 100644
+index 0000000..ba3d27f
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/add.d
@@ -0,0 +1,16 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 add
@@ -6956,8 +6658,11 @@
+0+0014 <[^>]*> addi r4,r4,-1
+0+0018 <[^>]*> addi r4,r4,13398
+0+001c <[^>]*> nop
---- binutils-2.15/gas/testsuite/gas/nios2/add.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/add.s 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/add.s b/gas/testsuite/gas/nios2/add.s
+new file mode 100644
+index 0000000..5b72a82
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/add.s
@@ -0,0 +1,13 @@
+# Source file used to test the add and addi instructions.
+
@@ -6972,8 +6677,11 @@
+
+# should disassemble to add r0,0,r0
+ nop
---- binutils-2.15/gas/testsuite/gas/nios2/align_fill.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/align_fill.d 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/align_fill.d b/gas/testsuite/gas/nios2/align_fill.d
+new file mode 100644
+index 0000000..90a9e5f
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/align_fill.d
@@ -0,0 +1,23 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 align_fill
@@ -6998,8 +6706,11 @@
+0+0030 <[^>]*> addi sp,sp,8
+0+0034 <[^>]*> ret
+ ...
---- binutils-2.15/gas/testsuite/gas/nios2/align_fill.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/align_fill.s 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/align_fill.s b/gas/testsuite/gas/nios2/align_fill.s
+new file mode 100644
+index 0000000..5683839
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/align_fill.s
@@ -0,0 +1,20 @@
+ .file "a.c"
+ .section .text
@@ -7021,8 +6732,11 @@
+ ret
+ .size x, .-x
+ .ident "GCC: (GNU) 3.3.3 (Altera Nios II 1.0 b302)"
---- binutils-2.15/gas/testsuite/gas/nios2/align_text.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/align_text.d 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/align_text.d b/gas/testsuite/gas/nios2/align_text.d
+new file mode 100644
+index 0000000..d11e7fc
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/align_text.d
@@ -0,0 +1,22 @@
+#objdump: -dr
+#name: NIOS2 align_test
@@ -7047,8 +6761,11 @@
+00000024 <label2>:
+ ...
\ No newline at end of file
---- binutils-2.15/gas/testsuite/gas/nios2/align_text.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/align_text.s 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/align_text.s b/gas/testsuite/gas/nios2/align_text.s
+new file mode 100644
+index 0000000..d073b6f
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/align_text.s
@@ -0,0 +1,15 @@
+ .asciz "" # empty string
+ .align 2
@@ -7065,8 +6782,11 @@
+
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/and.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/and.d 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/and.d b/gas/testsuite/gas/nios2/and.d
+new file mode 100644
+index 0000000..350ca69
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/and.d
@@ -0,0 +1,17 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 and
@@ -7085,8 +6805,11 @@
+0+0018 <[^>]*> andhi r4,r4,32768
+0+001c <[^>]*> andhi r4,r4,65535
+0+0020 <[^>]*> andhi r4,r4,0
---- binutils-2.15/gas/testsuite/gas/nios2/and.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/and.s 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/and.s b/gas/testsuite/gas/nios2/and.s
+new file mode 100644
+index 0000000..a7de05f
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/and.s
@@ -0,0 +1,13 @@
+# Source file used to test the and, andhi and andi instructions
+
@@ -7102,18 +6825,27 @@
+ andhi r4,r4,0x0
+
\ No newline at end of file
---- binutils-2.15/gas/testsuite/gas/nios2/blt.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/blt.d 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/blt.d b/gas/testsuite/gas/nios2/blt.d
+new file mode 100644
+index 0000000..aed1b26
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/blt.d
@@ -0,0 +1 @@
+This file is obsolete
\ No newline at end of file
---- binutils-2.15/gas/testsuite/gas/nios2/blt.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/blt.s 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/blt.s b/gas/testsuite/gas/nios2/blt.s
+new file mode 100644
+index 0000000..aed1b26
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/blt.s
@@ -0,0 +1 @@
+This file is obsolete
\ No newline at end of file
---- binutils-2.15/gas/testsuite/gas/nios2/branch.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/branch.d 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/branch.d b/gas/testsuite/gas/nios2/branch.d
+new file mode 100644
+index 0000000..b689dee
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/branch.d
@@ -0,0 +1,16 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 branch
@@ -7131,8 +6863,11 @@
+0+0018 <[^>]*> br 0000001c <text_label\+0x1c>
+[ ]*18: R_NIOS2_PCREL16 external_label
+
---- binutils-2.15/gas/testsuite/gas/nios2/branch.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/branch.s 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/branch.s b/gas/testsuite/gas/nios2/branch.s
+new file mode 100644
+index 0000000..0853167
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/branch.s
@@ -0,0 +1,15 @@
+# Source file used to test the beq macro.
+ .globl text_label
@@ -7149,8 +6884,11 @@
+# Branch to an external label.
+ br external_label
+
---- binutils-2.15/gas/testsuite/gas/nios2/break.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/break.d 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/break.d b/gas/testsuite/gas/nios2/break.d
+new file mode 100644
+index 0000000..be487bb
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/break.d
@@ -0,0 +1,12 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 break
@@ -7164,8 +6902,11 @@
+0+000c <[^>]*> break 14
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/break.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/break.s 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/break.s b/gas/testsuite/gas/nios2/break.s
+new file mode 100644
+index 0000000..88d3422
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/break.s
@@ -0,0 +1,8 @@
+# Source file used to test the 20-bit break instructions
+foo:
@@ -7175,8 +6916,11 @@
+ break 14
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/bret.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/bret.d 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/bret.d b/gas/testsuite/gas/nios2/bret.d
+new file mode 100644
+index 0000000..a12530b
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/bret.d
@@ -0,0 +1,8 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 bret
@@ -7186,16 +6930,22 @@
+Disassembly of section .text:
+0+0000 <[^>]*> bret
+
---- binutils-2.15/gas/testsuite/gas/nios2/bret.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/bret.s 2005-05-17 12:20:13.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/bret.s b/gas/testsuite/gas/nios2/bret.s
+new file mode 100644
+index 0000000..d368e64
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/bret.s
@@ -0,0 +1,5 @@
+# Source file used to test the bret instructions
+foo:
+ bret
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/cache.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/cache.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/cache.d b/gas/testsuite/gas/nios2/cache.d
+new file mode 100644
+index 0000000..7c278d8
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/cache.d
@@ -0,0 +1,17 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 cache
@@ -7214,8 +6964,11 @@
+0+0018 <[^>]*> flushi r2
+0+001c <[^>]*> flushp
+
---- binutils-2.15/gas/testsuite/gas/nios2/cache.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/cache.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/cache.s b/gas/testsuite/gas/nios2/cache.s
+new file mode 100644
+index 0000000..1701c19
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/cache.s
@@ -0,0 +1,21 @@
+# Source file used to test the cache instruction
+foo:
@@ -7238,8 +6991,11 @@
+ flushp
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/call.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/call.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/call.d b/gas/testsuite/gas/nios2/call.d
+new file mode 100644
+index 0000000..cfa6aec
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/call.d
@@ -0,0 +1,11 @@
+# objdump: -dr --prefix-addresses
+#name: NIOS2 call
@@ -7252,8 +7008,11 @@
+0+0004 <[^>]*> callr r10
+0+0008 <[^>]*> call 00000000 <foo>
+[ ]*8: R_NIOS2_CALL26 external
---- binutils-2.15/gas/testsuite/gas/nios2/call.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/call.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/call.s b/gas/testsuite/gas/nios2/call.s
+new file mode 100644
+index 0000000..39409b7
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/call.s
@@ -0,0 +1,13 @@
+# Source file used to test the call and callr instructions
+.text
@@ -7268,8 +7027,11 @@
+
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/cmp.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/cmp.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/cmp.d b/gas/testsuite/gas/nios2/cmp.d
+new file mode 100644
+index 0000000..07bf9f5
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/cmp.d
@@ -0,0 +1,24 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 cmp
@@ -7296,8 +7058,11 @@
+0+0030 <[^>]*> cmplti r11,r2,-32768
+0+0034 <[^>]*> cmpltui r11,r2,65535
\ No newline at end of file
---- binutils-2.15/gas/testsuite/gas/nios2/cmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/cmp.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/cmp.s b/gas/testsuite/gas/nios2/cmp.s
+new file mode 100644
+index 0000000..6f7c15b
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/cmp.s
@@ -0,0 +1,22 @@
+# Source file used to test the compare instructions
+foo:
@@ -7321,8 +7086,11 @@
+
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/comments.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/comments.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/comments.d b/gas/testsuite/gas/nios2/comments.d
+new file mode 100644
+index 0000000..890dcc2
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/comments.d
@@ -0,0 +1,26 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 comments
@@ -7350,8 +7118,11 @@
+0+003c <[^>]*> ldw r21,0\(r2\)
+0+0040 <[^>]*> br 00000010 <end>
+0+0044 <[^>]*> br 00000044 <exit>
---- binutils-2.15/gas/testsuite/gas/nios2/comments.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/comments.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/comments.s b/gas/testsuite/gas/nios2/comments.s
+new file mode 100644
+index 0000000..7ab2027
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/comments.s
@@ -0,0 +1,28 @@
+.set norelax
+_main: br start
@@ -7381,8 +7152,11 @@
+
+
+exit: br exit
---- binutils-2.15/gas/testsuite/gas/nios2/complex.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/complex.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/complex.d b/gas/testsuite/gas/nios2/complex.d
+new file mode 100644
+index 0000000..d2af6ae
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/complex.d
@@ -0,0 +1,12 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 complex
@@ -7396,16 +7170,22 @@
+0+0004 <[^>]*> ldw r2,1\(r3\)
+0+0008 <[^>]*> ldw r2,0\(r3\)
+ 8: R_NIOS2_S16 stack_top\+0xffffffff
---- binutils-2.15/gas/testsuite/gas/nios2/complex.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/complex.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/complex.s b/gas/testsuite/gas/nios2/complex.s
+new file mode 100644
+index 0000000..65141f9
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/complex.s
@@ -0,0 +1,5 @@
+foo:
+ ldw r2, (2-3)(r3)
+ ldw r2, 2 + (2-3)(r3)
+ ldw r2, 2 + (stack_top-3)(r3)
+
---- binutils-2.15/gas/testsuite/gas/nios2/ctl.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ctl.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/ctl.d b/gas/testsuite/gas/nios2/ctl.d
+new file mode 100644
+index 0000000..f698ce6
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/ctl.d
@@ -0,0 +1,20 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 ctl
@@ -7427,8 +7207,11 @@
+0+0024 <[^>]*> wrctl status,r8
+0+0028 <[^>]*> wrctl bstatus,r8
+0+002c <[^>]*> wrctl estatus,r8
---- binutils-2.15/gas/testsuite/gas/nios2/ctl.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ctl.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/ctl.s b/gas/testsuite/gas/nios2/ctl.s
+new file mode 100644
+index 0000000..dc6c983
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/ctl.s
@@ -0,0 +1,18 @@
+# Source file used to test the nor instruction
+
@@ -7448,8 +7231,11 @@
+
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/custom.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/custom.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/custom.d b/gas/testsuite/gas/nios2/custom.d
+new file mode 100644
+index 0000000..c1e17be
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/custom.d
@@ -0,0 +1,13 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 custom
@@ -7464,8 +7250,11 @@
+0+0008 <[^>]*> custom 150,c1,r2,r3
+0+000c <[^>]*> custom 24,c1,c2,r3
+0+0010 <[^>]*> custom 56,c1,c2,c3
---- binutils-2.15/gas/testsuite/gas/nios2/custom.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/custom.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/custom.s b/gas/testsuite/gas/nios2/custom.s
+new file mode 100644
+index 0000000..903122a
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/custom.s
@@ -0,0 +1,8 @@
+# test progam for assembling user instructions
+
@@ -7475,8 +7264,11 @@
+ custom 150, c1, r2, r3
+ custom 0x18, c1, c2, r3
+ custom 070, c1, c2, c3
---- binutils-2.15/gas/testsuite/gas/nios2/etbt.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/etbt.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/etbt.d b/gas/testsuite/gas/nios2/etbt.d
+new file mode 100644
+index 0000000..58b8e32
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/etbt.d
@@ -0,0 +1,10 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 etbt
@@ -7488,21 +7280,58 @@
+Disassembly of section .text:
+0+0000 <[^>]*> add et,bt,r6
+0+0004 <[^>]*> add et,bt,r6
---- binutils-2.15/gas/testsuite/gas/nios2/etbt.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/etbt.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/etbt.s b/gas/testsuite/gas/nios2/etbt.s
+new file mode 100644
+index 0000000..3e5fc24
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/etbt.s
@@ -0,0 +1,4 @@
+.set nobreak
+foo:
+ add r24, r25, r6
+ add et, bt, r6
---- binutils-2.15/gas/testsuite/gas/nios2/hilo_symbol.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/hilo_symbol.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/flushda.d b/gas/testsuite/gas/nios2/flushda.d
+new file mode 100644
+index 0000000..f3b5e3e
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/flushda.d
+@@ -0,0 +1,10 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 flushda
++
++# Test the jmp instruction.
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> flushda 12\(r2\)
++
+diff --git a/gas/testsuite/gas/nios2/flushda.s b/gas/testsuite/gas/nios2/flushda.s
+new file mode 100644
+index 0000000..3a32474
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/flushda.s
+@@ -0,0 +1,6 @@
++# Source file used to test the flushda instruction.
++.text
++.set nobreak
++foo:
++ flushda 12(r2)
++
+diff --git a/gas/testsuite/gas/nios2/hilo_symbol.s b/gas/testsuite/gas/nios2/hilo_symbol.s
+new file mode 100644
+index 0000000..88fdddc
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/hilo_symbol.s
@@ -0,0 +1,3 @@
+.global long_symbol
+.set long_symbol, 0xDEADBEEF
+
---- binutils-2.15/gas/testsuite/gas/nios2/illegal.l 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/illegal.l 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/illegal.l b/gas/testsuite/gas/nios2/illegal.l
+new file mode 100644
+index 0000000..6248567
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/illegal.l
@@ -0,0 +1,14 @@
+.*illegal.s: Assembler messages:
+.*illegal.s:5: Error: unknown register r56
@@ -7518,8 +7347,11 @@
+.*illegal.s:16: Error: too many arguments
+.*illegal.s:17: Error: too many arguments
+.*illegal.s:17: Error: unknown register r2,r4
---- binutils-2.15/gas/testsuite/gas/nios2/illegal.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/illegal.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/illegal.s b/gas/testsuite/gas/nios2/illegal.s
+new file mode 100644
+index 0000000..75b6d89
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/illegal.s
@@ -0,0 +1,17 @@
+# Source file used to test illegal operands.
+
@@ -7538,15 +7370,21 @@
+# Extra operands
+ nop Crapola
+ add r2, r2, r2, r4
---- binutils-2.15/gas/testsuite/gas/nios2/imm5_symbol.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/imm5_symbol.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/imm5_symbol.s b/gas/testsuite/gas/nios2/imm5_symbol.s
+new file mode 100644
+index 0000000..d988951
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/imm5_symbol.s
@@ -0,0 +1,4 @@
+.global imm5
+.text
+.byte imm5
+.set imm5, 31
---- binutils-2.15/gas/testsuite/gas/nios2/jmp.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/jmp.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/jmp.d b/gas/testsuite/gas/nios2/jmp.d
+new file mode 100644
+index 0000000..b8727b3
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/jmp.d
@@ -0,0 +1,10 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 jmp
@@ -7558,8 +7396,11 @@
+Disassembly of section .text:
+0+0000 <[^>]*> jmp bt
+
---- binutils-2.15/gas/testsuite/gas/nios2/jmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/jmp.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/jmp.s b/gas/testsuite/gas/nios2/jmp.s
+new file mode 100644
+index 0000000..8d859f2
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/jmp.s
@@ -0,0 +1,6 @@
+# Source file used to test the jmp instruction.
+.text
@@ -7567,8 +7408,11 @@
+foo:
+ jmp r25
+
---- binutils-2.15/gas/testsuite/gas/nios2/ldb.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ldb.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/ldb.d b/gas/testsuite/gas/nios2/ldb.d
+new file mode 100644
+index 0000000..10ad705
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/ldb.d
@@ -0,0 +1,196 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 ldb
@@ -7766,8 +7610,11 @@
+[ ]*190: R_NIOS2_S16 .bss\+0xffff8000
+0+0194 <[^>]*> ldbio r4,0\(r5\)
+[ ]*194: R_NIOS2_S16 .bss\+0xffffc000
---- binutils-2.15/gas/testsuite/gas/nios2/ldb.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ldb.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/ldb.s b/gas/testsuite/gas/nios2/ldb.s
+new file mode 100644
+index 0000000..71c51f1
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/ldb.s
@@ -0,0 +1,117 @@
+ .data
+data_label:
@@ -7886,8 +7733,11 @@
+ ldbio r4,small_external_common-0x8000(r5)
+ ldbio r4,big_local_common-0x8000(r5)
+ ldbio r4,small_local_common-0x8000(r5)
---- binutils-2.15/gas/testsuite/gas/nios2/ldh.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ldh.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/ldh.d b/gas/testsuite/gas/nios2/ldh.d
+new file mode 100644
+index 0000000..54c2f7e
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/ldh.d
@@ -0,0 +1,196 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 ldh
@@ -8085,8 +7935,11 @@
+[ ]*190: R_NIOS2_S16 .bss\+0xffff8000
+0+0194 <[^>]*> ldhio r4,0\(r5\)
+[ ]*194: R_NIOS2_S16 .bss\+0xffffc000
---- binutils-2.15/gas/testsuite/gas/nios2/ldh.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ldh.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/ldh.s b/gas/testsuite/gas/nios2/ldh.s
+new file mode 100644
+index 0000000..87040ee
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/ldh.s
@@ -0,0 +1,117 @@
+ .data
+data_label:
@@ -8205,8 +8058,11 @@
+ ldhio r4,small_external_common-0x8000(r5)
+ ldhio r4,big_local_common-0x8000(r5)
+ ldhio r4,small_local_common-0x8000(r5)
---- binutils-2.15/gas/testsuite/gas/nios2/ldw.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ldw.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/ldw.d b/gas/testsuite/gas/nios2/ldw.d
+new file mode 100644
+index 0000000..a9a6905
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/ldw.d
@@ -0,0 +1,196 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 ldw
@@ -8404,8 +8260,11 @@
+[ ]*190: R_NIOS2_S16 .bss\+0xffff8000
+0+0194 <[^>]*> ldwio r4,0\(r5\)
+[ ]*194: R_NIOS2_S16 .bss\+0xffffc000
---- binutils-2.15/gas/testsuite/gas/nios2/ldw.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ldw.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/ldw.s b/gas/testsuite/gas/nios2/ldw.s
+new file mode 100644
+index 0000000..cf6de19
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/ldw.s
@@ -0,0 +1,117 @@
+ .data
+data_label:
@@ -8524,8 +8383,11 @@
+ ldwio r4,small_external_common-0x8000(r5)
+ ldwio r4,big_local_common-0x8000(r5)
+ ldwio r4,small_local_common-0x8000(r5)
---- binutils-2.15/gas/testsuite/gas/nios2/lineseparator.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/lineseparator.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/lineseparator.d b/gas/testsuite/gas/nios2/lineseparator.d
+new file mode 100644
+index 0000000..09c66ea
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/lineseparator.d
@@ -0,0 +1,10 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 lineseparator
@@ -8537,15 +8399,21 @@
+Disassembly of section .text:
+0x0+0000 mov r5,r4
+0x0+0004 mov r4,r5
---- binutils-2.15/gas/testsuite/gas/nios2/lineseparator.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/lineseparator.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/lineseparator.s b/gas/testsuite/gas/nios2/lineseparator.s
+new file mode 100644
+index 0000000..d16efc3
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/lineseparator.s
@@ -0,0 +1,4 @@
+mov r5, r4 ; mov r4, r5
+
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/link1.lds 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/link1.lds 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/link1.lds b/gas/testsuite/gas/nios2/link1.lds
+new file mode 100644
+index 0000000..df6c220
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/link1.lds
@@ -0,0 +1,11 @@
+/* Simple script for testing relaxation */
+
@@ -8558,8 +8426,11 @@
+ text2 0 : { *(text2) }
+ text1 0x8000 : { *(text1) }
+}
---- binutils-2.15/gas/testsuite/gas/nios2/link2.lds 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/link2.lds 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/link2.lds b/gas/testsuite/gas/nios2/link2.lds
+new file mode 100644
+index 0000000..ee46354
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/link2.lds
@@ -0,0 +1,11 @@
+/* Simple script for testing relaxation */
+
@@ -8572,8 +8443,11 @@
+ text1 0 : { *(text1) }
+ text2 0x80000000 : { *(text2) }
+}
---- binutils-2.15/gas/testsuite/gas/nios2/link3.lds 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/link3.lds 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/link3.lds b/gas/testsuite/gas/nios2/link3.lds
+new file mode 100644
+index 0000000..bc02d40
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/link3.lds
@@ -0,0 +1,11 @@
+/* Simple script for testing relaxation */
+
@@ -8586,8 +8460,11 @@
+ text1 0 : { *(text1) }
+ text2 0x08000000 : { *(text2) }
+}
---- binutils-2.15/gas/testsuite/gas/nios2/mov.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/mov.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/mov.d b/gas/testsuite/gas/nios2/mov.d
+new file mode 100644
+index 0000000..13bf6db
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/mov.d
@@ -0,0 +1,11 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 mov
@@ -8600,16 +8477,22 @@
+0+0000 <[^>]*> movz \$4,\$5,\$6
+0+0004 <[^>]*> movnz \$4,\$5,\$6
+
---- binutils-2.15/gas/testsuite/gas/nios2/mov.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/mov.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/mov.s b/gas/testsuite/gas/nios2/mov.s
+new file mode 100644
+index 0000000..a66aaeb
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/mov.s
@@ -0,0 +1,5 @@
+# Source file used to test the movz and movnz instructions
+
+foo:
+ movz $4,$5,$6
+ movnz $4,$5,$6
---- binutils-2.15/gas/testsuite/gas/nios2/movi.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/movi.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/movi.d b/gas/testsuite/gas/nios2/movi.d
+new file mode 100644
+index 0000000..9e35c7b
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/movi.d
@@ -0,0 +1,13 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 movi
@@ -8624,8 +8507,11 @@
+0+000c <[^>]*> orhi r2,r5,65535
+0+0010 <[^>]*> xorhi r2,r10,65535
+0+0014 <[^>]*> andhi r2,r15,65535
---- binutils-2.15/gas/testsuite/gas/nios2/movi.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/movi.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/movi.s b/gas/testsuite/gas/nios2/movi.s
+new file mode 100644
+index 0000000..07d9fed
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/movi.s
@@ -0,0 +1,21 @@
+# Source file used to test silent conversion of
+# movi to orhi etc
@@ -8648,8 +8534,11 @@
+andi r2, r15, 0xffff0000
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/movia.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/movia.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/movia.d b/gas/testsuite/gas/nios2/movia.d
+new file mode 100644
+index 0000000..78a2559
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/movia.d
@@ -0,0 +1,18 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 movia
@@ -8669,8 +8558,11 @@
+ 10: R_NIOS2_HIADJ16 sym\+0x80000001
+0+0014 <[^>]*> addi r4,r4,0
+ 14: R_NIOS2_LO16 sym\+0x80000001
---- binutils-2.15/gas/testsuite/gas/nios2/movia.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/movia.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/movia.s b/gas/testsuite/gas/nios2/movia.s
+new file mode 100644
+index 0000000..fe1d56c
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/movia.s
@@ -0,0 +1,6 @@
+# Test program for movia reg, immed32 macro
+
@@ -8678,8 +8570,11 @@
+ movia r2, 0x80808080
+ movia r3, sym + 0x80000000
+ movia r4, sym - 0x7fffffff
---- binutils-2.15/gas/testsuite/gas/nios2/mul.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/mul.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/mul.d b/gas/testsuite/gas/nios2/mul.d
+new file mode 100644
+index 0000000..79e86d1
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/mul.d
@@ -0,0 +1,19 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 mul
@@ -8700,8 +8595,11 @@
+0+001c <[^>]*> mulxss r4,r5,r6
+0+0020 <[^>]*> mulxsu r4,r5,r6
+0+0024 <[^>]*> mulxuu r4,r5,r6
---- binutils-2.15/gas/testsuite/gas/nios2/mul.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/mul.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/mul.s b/gas/testsuite/gas/nios2/mul.s
+new file mode 100644
+index 0000000..3e47bc7
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/mul.s
@@ -0,0 +1,15 @@
+# Source file used to test the mul macro.
+
@@ -8718,8 +8616,11 @@
+ mulxuu r4,r5,r6
+.data
+.set defined_symbol, 0x4040
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.d b/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.d
+new file mode 100644
+index 0000000..21c69e3
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.d
@@ -0,0 +1,17 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 reloc against merged strings
@@ -8738,8 +8639,11 @@
+0+0018 <[^>]*> addi r4,r4,132
+0+001c <[^>]*> call 00000000 <func1>
+
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.s b/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.s
+new file mode 100644
+index 0000000..1e14fdc
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.s
@@ -0,0 +1,21 @@
+ .section .rodata.str1.1,"aMS",@progbits,1
+.LC0:
@@ -8762,8 +8666,11 @@
+ addi r4, r4, .LC2
+ .size func1, .-func1
+
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.d b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.d
+new file mode 100644
+index 0000000..047745b
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.d
@@ -0,0 +1,8 @@
+#objdump: -s
+#name: NIOS2 R_NIOS2_BFD_RELOC_XX
@@ -8773,8 +8680,11 @@
+
+Contents of section .text:
+ 0000 fa00cefa efbeadde facefaef beadde00 ................
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.s b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.s
+new file mode 100644
+index 0000000..fff5ace
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.s
@@ -0,0 +1,9 @@
+# Test for New Jersey 32-bit, 16 and 8-bit relocations
+
@@ -8785,8 +8695,11 @@
+.set byte_sym, 0xFA
+.set short_sym, 0xFACE
+.set long_sym, 0xDEADBEEF
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.d b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.d
+new file mode 100644
+index 0000000..2ee02e8
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.d
@@ -0,0 +1,10 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 R_NIOS2_CACHE_OPX
@@ -8798,8 +8711,11 @@
+0+0000 <[^>]*> cache 0x1f,0x1000\(\$1\)
+0+0004 <[^>]*> Address 0x4 is out of bounds.
+
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.s b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.s
+new file mode 100644
+index 0000000..2c59174
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.s
@@ -0,0 +1,6 @@
+# Test the imm5 relocation
+
@@ -8807,8 +8723,11 @@
+ cache imm5, 0x1000($1)
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.d b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.d
+new file mode 100644
+index 0000000..63364ef
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.d
@@ -0,0 +1,76 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 nios2-reloc-r-nios2-call26
@@ -8886,8 +8805,11 @@
+ ...
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.s b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.s
+new file mode 100644
+index 0000000..b81896d
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.s
@@ -0,0 +1,12 @@
+# Test for New Jersey 32-bit relocations
+
@@ -8901,8 +8823,11 @@
+.align 8
+localfunc:
+ nop
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.d b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.d
+new file mode 100644
+index 0000000..00c0023
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.d
@@ -0,0 +1,15 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 gp-relative relocations
@@ -8919,8 +8844,11 @@
+0+0010 <[^>]*> ldw at,-32744\(gp\)
+0+0014 <[^>]*> ldw r2,-32740\(gp\)
+0+0018 <[^>]*> ldb r3,-32736\(gp\)
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.s b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.s
+new file mode 100644
+index 0000000..5bdcc46
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.s
@@ -0,0 +1,24 @@
+.sdata
+sym1:
@@ -8946,8 +8874,11 @@
+ ldw r1, %gprel(sym4)(gp)
+ ldw r2, %gprel(sym5)(gp)
+ ldb r3, %gprel(sym6)(gp)
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.d b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.d
+new file mode 100644
+index 0000000..7a9e707
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.d
@@ -0,0 +1,10 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 R_NIOS2_HI16,LO16,HIADJ16
@@ -8959,8 +8890,11 @@
+0+0000 <[^>]*> addi at,at,-8531
+0+0004 <[^>]*> addi at,at,-16657
+0+0008 <[^>]*> addi at,at,-8530
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.s b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.s
+new file mode 100644
+index 0000000..266f2c7
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.s
@@ -0,0 +1,6 @@
+# Test the %hi, lo and %hiadj relocations
+
@@ -8968,8 +8902,11 @@
+ addi r1, r1, %hi(long_symbol)
+ addi r1, r1, %lo(long_symbol)
+ addi r1, r1, %hiadj(long_symbol)
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.d b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.d
+new file mode 100644
+index 0000000..8457747
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.d
@@ -0,0 +1,10 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 R_NIOS2_IMM5
@@ -8981,8 +8918,11 @@
+0+0000 <[^>]*> roli at,at,31
+0+0004 <.[^>]*> Address 0x4 is out of bounds.
+
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.s b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.s
+new file mode 100644
+index 0000000..fdec546
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.s
@@ -0,0 +1,6 @@
+# Test the imm5 relocation
+
@@ -8990,8 +8930,11 @@
+ roli r1, r1, imm5
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.d b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.d
+new file mode 100644
+index 0000000..b9f9ae5
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.d
@@ -0,0 +1,12 @@
+#objdump: -s
+#name: NIOS2 R_NIOS2_PCREL16
@@ -9005,8 +8948,11 @@
+0+0004 <[^>]*> br 00000018 <__bss_start\+0x8>
+0+0008 <[^>]*> nop
+0+000c <[^>]*> nop
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.s b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.s
+new file mode 100644
+index 0000000..72970cc
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.s
@@ -0,0 +1,6 @@
+# Test for pc-relative relocations
+.set norelax
@@ -9014,8 +8960,11 @@
+ br ext_label
+ br ext_label + 16
+
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s.d b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s.d
+new file mode 100644
+index 0000000..0230d0e
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s.d
@@ -0,0 +1,8 @@
+
+a.exe: file format elf32-littlenios2
@@ -9025,8 +8974,11 @@
+ 0010 44004008 D.@.
+Contents of section .data:
+Contents of section .sbss:
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.d b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.d
+new file mode 100644
+index 0000000..0d0f535
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.d
@@ -0,0 +1,9 @@
+#objdump: -s
+#name: NIOS2 R_NIOS2_S16
@@ -9037,8 +8989,11 @@
+Contents of section .text:
+ 0000 04004408 04006008 c4ff5f08 44004808 ..D...`..._.D.H.
+ 0010 44004008 D.@.
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.s b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.s
+new file mode 100644
+index 0000000..11986d1
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.s
@@ -0,0 +1,13 @@
+# Test for New Jersey 32-bit, 16 and 8-bit relocations
+
@@ -9053,8 +9008,11 @@
+
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.d b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.d
+new file mode 100644
+index 0000000..160dba2
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.d
@@ -0,0 +1,9 @@
+#objdump: -s
+#name: NIOS2 R_NIOS2_U16
@@ -9065,8 +9023,11 @@
+Contents of section .text:
+ 0000 0c004408 0c004008 ccff7f08 4c004808 ..D...@.....L.H.
+ 0010 4c004008 L.@.
---- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.s b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.s
+new file mode 100644
+index 0000000..0d78368
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.s
@@ -0,0 +1,13 @@
+# Test for New Jersey 32-bit, 16 and 8-bit relocations
+
@@ -9081,9 +9042,12 @@
+
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/nios2.exp 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2.exp 2005-05-17 12:20:14.000000000 +0200
-@@ -0,0 +1,200 @@
+diff --git a/gas/testsuite/gas/nios2/nios2.exp b/gas/testsuite/gas/nios2/nios2.exp
+new file mode 100644
+index 0000000..475e5e5
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nios2.exp
+@@ -0,0 +1,201 @@
+#
+# Some generic New Jersey tests
+#
@@ -9230,7 +9194,8 @@
+ run_dump_test "ldw"
+ run_dump_test "ldh"
+ run_dump_test "ldb"
-+
++
++ run_dump_test "flushda"
+
+ run_dump_test "mul"
+
@@ -9284,8 +9249,11 @@
+ run_relax_test "relax_callr" "-relax-all" "link3.lds" "-dr --prefix-addresses"
+ run_relax_section_test "relax_section" "-relax-section" "-dr --prefix-addresses"
+}
---- binutils-2.15/gas/testsuite/gas/nios2/nor.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nor.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nor.d b/gas/testsuite/gas/nios2/nor.d
+new file mode 100644
+index 0000000..fab8e69
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nor.d
@@ -0,0 +1,9 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 nor
@@ -9296,16 +9264,22 @@
+
+Disassembly of section .text:
+0+0000 <[^>]*> nor r6,r8,r10
---- binutils-2.15/gas/testsuite/gas/nios2/nor.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nor.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/nor.s b/gas/testsuite/gas/nios2/nor.s
+new file mode 100644
+index 0000000..da78254
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/nor.s
@@ -0,0 +1,5 @@
+# Source file used to test the nor instruction
+
+foo:
+ nor r6,r8,r10
+
---- binutils-2.15/gas/testsuite/gas/nios2/or.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/or.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/or.d b/gas/testsuite/gas/nios2/or.d
+new file mode 100644
+index 0000000..e5035bc
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/or.d
@@ -0,0 +1,11 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 or
@@ -9318,8 +9292,11 @@
+0+0000 <[^>]*> or r6,r8,r10
+0+0004 <[^>]*> orhi r6,r7,65535
+0+0008 <[^>]*> ori r6,r7,65535
---- binutils-2.15/gas/testsuite/gas/nios2/or.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/or.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/or.s b/gas/testsuite/gas/nios2/or.s
+new file mode 100644
+index 0000000..675df17
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/or.s
@@ -0,0 +1,7 @@
+# Source file used to test the nor instruction
+
@@ -9328,16 +9305,22 @@
+ orhi r6,r7,0xffff
+ ori r6,r7,0xffff
+
---- binutils-2.15/gas/testsuite/gas/nios2/pcrel_label.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/pcrel_label.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/pcrel_label.s b/gas/testsuite/gas/nios2/pcrel_label.s
+new file mode 100644
+index 0000000..3a76612
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/pcrel_label.s
@@ -0,0 +1,5 @@
+.text
+ext_label:
+ nop
+ nop
+.global ext_label
---- binutils-2.15/gas/testsuite/gas/nios2/relax_callr.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_callr.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/relax_callr.d b/gas/testsuite/gas/nios2/relax_callr.d
+new file mode 100644
+index 0000000..6218c6d
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/relax_callr.d
@@ -0,0 +1,22 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 relax_callr
@@ -9361,8 +9344,11 @@
+08000014 <[^>]*> nop
+08000018 <[^>]*> nop
+0800001c <[^>]*> nop
---- binutils-2.15/gas/testsuite/gas/nios2/relax_callr.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_callr.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/relax_callr.s b/gas/testsuite/gas/nios2/relax_callr.s
+new file mode 100644
+index 0000000..b4cc2c4
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/relax_callr.s
@@ -0,0 +1,17 @@
+# relaxation test for callr
+
@@ -9381,8 +9367,11 @@
+ nop
+func1:
+ nop
---- binutils-2.15/gas/testsuite/gas/nios2/relax_cjmp.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_cjmp.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/relax_cjmp.d b/gas/testsuite/gas/nios2/relax_cjmp.d
+new file mode 100644
+index 0000000..2b6d907
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/relax_cjmp.d
@@ -0,0 +1,8227 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 relax_cjmp
@@ -17611,8 +17600,11 @@
+00010020 <[^>]*> nop
+00010024 <[^>]*> nop
+ ...
---- binutils-2.15/gas/testsuite/gas/nios2/relax_cjmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_cjmp.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/relax_cjmp.s b/gas/testsuite/gas/nios2/relax_cjmp.s
+new file mode 100644
+index 0000000..4cd24a4
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/relax_cjmp.s
@@ -0,0 +1,37 @@
+# relaxing unconditional jumps
+
@@ -17651,8 +17643,11 @@
+sym:
+ nop
+
---- binutils-2.15/gas/testsuite/gas/nios2/relax_section.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_section.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/relax_section.d b/gas/testsuite/gas/nios2/relax_section.d
+new file mode 100644
+index 0000000..31cfe42
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/relax_section.d
@@ -0,0 +1,8206 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 relax_section
@@ -25860,8 +25855,11 @@
+0+800c <out_of_range> nop
+ ...
+
---- binutils-2.15/gas/testsuite/gas/nios2/relax_section.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_section.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/relax_section.s b/gas/testsuite/gas/nios2/relax_section.s
+new file mode 100644
+index 0000000..85c8e1d
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/relax_section.s
@@ -0,0 +1,10 @@
+ beq r2, r3, out_of_range
+ bne r2, r3, in_range
@@ -25873,8 +25871,11 @@
+ br 0
+out_of_range:
+ nop
---- binutils-2.15/gas/testsuite/gas/nios2/relax_ujmp.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_ujmp.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/relax_ujmp.d b/gas/testsuite/gas/nios2/relax_ujmp.d
+new file mode 100644
+index 0000000..6c9269e
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/relax_ujmp.d
@@ -0,0 +1,8221 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 relax_ujmp
@@ -34097,8 +34098,11 @@
+00010014 <[^>]*> nop
+00010018 <[^>]*> nop
+ ...
---- binutils-2.15/gas/testsuite/gas/nios2/relax_ujmp.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_ujmp.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/relax_ujmp.s b/gas/testsuite/gas/nios2/relax_ujmp.s
+new file mode 100644
+index 0000000..8982d73
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/relax_ujmp.s
@@ -0,0 +1,37 @@
+# relaxing unconditional jumps
+
@@ -34137,8 +34141,11 @@
+
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/reloc_symbols.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/reloc_symbols.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/reloc_symbols.s b/gas/testsuite/gas/nios2/reloc_symbols.s
+new file mode 100644
+index 0000000..532acf3
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/reloc_symbols.s
@@ -0,0 +1,21 @@
+.text
+# byte aligned
@@ -34161,8 +34168,11 @@
+#.align 2
+#nop
+
---- binutils-2.15/gas/testsuite/gas/nios2/ret.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ret.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/ret.d b/gas/testsuite/gas/nios2/ret.d
+new file mode 100644
+index 0000000..b071931
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/ret.d
@@ -0,0 +1,8 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 ret
@@ -34172,16 +34182,22 @@
+Disassembly of section .text:
+0+0000 <[^>]*> ret
+
---- binutils-2.15/gas/testsuite/gas/nios2/ret.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ret.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/ret.s b/gas/testsuite/gas/nios2/ret.s
+new file mode 100644
+index 0000000..69b76bc
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/ret.s
@@ -0,0 +1,5 @@
+# Source file used to test the ret instructions
+foo:
+ ret
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/rol.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/rol.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/rol.d b/gas/testsuite/gas/nios2/rol.d
+new file mode 100644
+index 0000000..2128dd5
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/rol.d
@@ -0,0 +1,40 @@
+#objdump: -dr --prefix-addresses -mmips:3000
+#as: -march=r3000 -mtune=r3000
@@ -34223,8 +34239,11 @@
+0+0070 <[^>]*> or a0,a0,at
+0+0074 <[^>]*> srl a0,a1,0x0
+ ...
---- binutils-2.15/gas/testsuite/gas/nios2/rol.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/rol.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/rol.s b/gas/testsuite/gas/nios2/rol.s
+new file mode 100644
+index 0000000..988d702
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/rol.s
@@ -0,0 +1,15 @@
+# Source file used to test the rol and ror macros.
+
@@ -34241,8 +34260,11 @@
+ ror $4,$5,1
+ ror $4,$5,0
+ .space 8
---- binutils-2.15/gas/testsuite/gas/nios2/rotate.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/rotate.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/rotate.d b/gas/testsuite/gas/nios2/rotate.d
+new file mode 100644
+index 0000000..0f54f43
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/rotate.d
@@ -0,0 +1,17 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 rotate
@@ -34261,8 +34283,11 @@
+0+0018 <[^>]*> srai r4,r4,10
+0+001c <[^>]*> srl r4,r4,r4
+0+0020 <[^>]*> srli r4,r4,5
---- binutils-2.15/gas/testsuite/gas/nios2/rotate.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/rotate.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/rotate.s b/gas/testsuite/gas/nios2/rotate.s
+new file mode 100644
+index 0000000..81c4ee1
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/rotate.s
@@ -0,0 +1,13 @@
+# test New Jersey rotate instructions
+
@@ -34277,8 +34302,11 @@
+ srai r4,r4,10
+ srl r4,r4,r4
+ srli r4,r4,5
---- binutils-2.15/gas/testsuite/gas/nios2/s16_symbol.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/s16_symbol.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/s16_symbol.s b/gas/testsuite/gas/nios2/s16_symbol.s
+new file mode 100644
+index 0000000..3902177
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/s16_symbol.s
@@ -0,0 +1,10 @@
+.global some_sym
+.global some_other_sym
@@ -34290,8 +34318,11 @@
+.set some_sym, 0x1000
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/stb.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/stb.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/stb.d b/gas/testsuite/gas/nios2/stb.d
+new file mode 100644
+index 0000000..82f04ca
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/stb.d
@@ -0,0 +1,196 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 stb
@@ -34489,8 +34520,11 @@
+[ ]*190: R_NIOS2_S16 .bss\+0xffff8000
+0+0194 <[^>]*> stbio r4,0\(r5\)
+[ ]*194: R_NIOS2_S16 .bss\+0xffffc000
---- binutils-2.15/gas/testsuite/gas/nios2/stb.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/stb.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/stb.s b/gas/testsuite/gas/nios2/stb.s
+new file mode 100644
+index 0000000..8078e94
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/stb.s
@@ -0,0 +1,117 @@
+ .data
+data_label:
@@ -34609,8 +34643,11 @@
+ stbio r4,small_external_common-0x8000(r5)
+ stbio r4,big_local_common-0x8000(r5)
+ stbio r4,small_local_common-0x8000(r5)
---- binutils-2.15/gas/testsuite/gas/nios2/sth.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/sth.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/sth.d b/gas/testsuite/gas/nios2/sth.d
+new file mode 100644
+index 0000000..dd9ec69
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/sth.d
@@ -0,0 +1,196 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 sth
@@ -34808,8 +34845,11 @@
+[ ]*190: R_NIOS2_S16 .bss\+0xffff8000
+0+0194 <[^>]*> sthio r4,0\(r5\)
+[ ]*194: R_NIOS2_S16 .bss\+0xffffc000
---- binutils-2.15/gas/testsuite/gas/nios2/sth.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/sth.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/sth.s b/gas/testsuite/gas/nios2/sth.s
+new file mode 100644
+index 0000000..4b9390b
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/sth.s
@@ -0,0 +1,117 @@
+ .data
+data_label:
@@ -34928,8 +34968,11 @@
+ sthio r4,small_external_common-0x8000(r5)
+ sthio r4,big_local_common-0x8000(r5)
+ sthio r4,small_local_common-0x8000(r5)
---- binutils-2.15/gas/testsuite/gas/nios2/str2.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/str2.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/str2.s b/gas/testsuite/gas/nios2/str2.s
+new file mode 100644
+index 0000000..5310d4e
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/str2.s
@@ -0,0 +1,21 @@
+ .section .rodata.str1.1,"aMS",@progbits,1
+.LC0:
@@ -34952,8 +34995,11 @@
+ addi r4, r4, .LC2
+ .size func2, .-func2
+
---- binutils-2.15/gas/testsuite/gas/nios2/stw.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/stw.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/stw.d b/gas/testsuite/gas/nios2/stw.d
+new file mode 100644
+index 0000000..e291bda
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/stw.d
@@ -0,0 +1,196 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 stw
@@ -35151,8 +35197,11 @@
+[ ]*190: R_NIOS2_S16 .bss\+0xffff8000
+0+0194 <[^>]*> stwio r4,0\(r5\)
+[ ]*194: R_NIOS2_S16 .bss\+0xffffc000
---- binutils-2.15/gas/testsuite/gas/nios2/stw.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/stw.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/stw.s b/gas/testsuite/gas/nios2/stw.s
+new file mode 100644
+index 0000000..fa5c72f
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/stw.s
@@ -0,0 +1,117 @@
+ .data
+data_label:
@@ -35271,8 +35320,11 @@
+ stwio r4,small_external_common-0x8000(r5)
+ stwio r4,big_local_common-0x8000(r5)
+ stwio r4,small_local_common-0x8000(r5)
---- binutils-2.15/gas/testsuite/gas/nios2/sub.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/sub.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/sub.d b/gas/testsuite/gas/nios2/sub.d
+new file mode 100644
+index 0000000..69b0285
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/sub.d
@@ -0,0 +1,10 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 sub
@@ -35284,15 +35336,21 @@
+Disassembly of section .text:
+0+0000 <[^>]*> sub r4,r4,r4
+
---- binutils-2.15/gas/testsuite/gas/nios2/sub.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/sub.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/sub.s b/gas/testsuite/gas/nios2/sub.s
+new file mode 100644
+index 0000000..34f00da
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/sub.s
@@ -0,0 +1,4 @@
+# Source file used to test the add and addi instructions.
+
+foo:
+ sub r4,r4,r4
---- binutils-2.15/gas/testsuite/gas/nios2/sync.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/sync.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/sync.d b/gas/testsuite/gas/nios2/sync.d
+new file mode 100644
+index 0000000..f0949e2
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/sync.d
@@ -0,0 +1,8 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 sync
@@ -35302,16 +35360,22 @@
+Disassembly of section \.text:
+0+0000 <foo> sync
+
---- binutils-2.15/gas/testsuite/gas/nios2/sync.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/sync.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/sync.s b/gas/testsuite/gas/nios2/sync.s
+new file mode 100644
+index 0000000..fe05d47
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/sync.s
@@ -0,0 +1,5 @@
+# Source file used to test the sync instructions
+foo:
+ sync
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/trap.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/trap.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/trap.d b/gas/testsuite/gas/nios2/trap.d
+new file mode 100644
+index 0000000..003ff69
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/trap.d
@@ -0,0 +1,7 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 trap
@@ -35320,14 +35384,20 @@
+
+Disassembly of section .text:
+0+0000 <[^>]*> trap
---- binutils-2.15/gas/testsuite/gas/nios2/trap.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/trap.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/trap.s b/gas/testsuite/gas/nios2/trap.s
+new file mode 100644
+index 0000000..1eb3c7e
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/trap.s
@@ -0,0 +1,3 @@
+# Source file used to test the ret instructions
+foo:
+ trap
---- binutils-2.15/gas/testsuite/gas/nios2/tret.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/tret.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/tret.d b/gas/testsuite/gas/nios2/tret.d
+new file mode 100644
+index 0000000..48e2b51
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/tret.d
@@ -0,0 +1,8 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 tret
@@ -35337,16 +35407,22 @@
+Disassembly of section .text:
+0+0000 <[^>]*> eret
+
---- binutils-2.15/gas/testsuite/gas/nios2/tret.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/tret.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/tret.s b/gas/testsuite/gas/nios2/tret.s
+new file mode 100644
+index 0000000..42179f1
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/tret.s
@@ -0,0 +1,5 @@
+# Source file used to test the ret instructions
+foo:
+ eret
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/u16_symbol.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/u16_symbol.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/u16_symbol.s b/gas/testsuite/gas/nios2/u16_symbol.s
+new file mode 100644
+index 0000000..518b4de
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/u16_symbol.s
@@ -0,0 +1,9 @@
+.global some_sym
+.global min
@@ -35357,16 +35433,22 @@
+.set some_sym, 0x1000
+
+
---- binutils-2.15/gas/testsuite/gas/nios2/warn_noat.l 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/warn_noat.l 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/warn_noat.l b/gas/testsuite/gas/nios2/warn_noat.l
+new file mode 100644
+index 0000000..6bc5150
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/warn_noat.l
@@ -0,0 +1,5 @@
+.*warn_noat.s: Assembler messages:
+.*warn_noat.s:2: Warning: Register at \(r1\) can sometimes be corrupted by assembler optimizations.
+Use .set noat to turn off those optimizations \(and this warning\).
+.*warn_noat.s:8: Warning: Register at \(r1\) can sometimes be corrupted by assembler optimizations.
+Use .set noat to turn off those optimizations \(and this warning\).
---- binutils-2.15/gas/testsuite/gas/nios2/warn_noat.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/warn_noat.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/warn_noat.s b/gas/testsuite/gas/nios2/warn_noat.s
+new file mode 100644
+index 0000000..e99126e
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/warn_noat.s
@@ -0,0 +1,8 @@
+.set noat, 2 # This should not cause warning for at to be turned off
+add at, r2, r2
@@ -35376,8 +35458,11 @@
+add at, r2, r2
+.set at # this should turn the warnings on
+add at, r2, r2
---- binutils-2.15/gas/testsuite/gas/nios2/warn_nobreak.l 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/warn_nobreak.l 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/warn_nobreak.l b/gas/testsuite/gas/nios2/warn_nobreak.l
+new file mode 100644
+index 0000000..539813d
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/warn_nobreak.l
@@ -0,0 +1,9 @@
+.*warn_nobreak.s: Assembler messages:
+.*warn_nobreak.s:2: Warning: The debugger will corrupt ba \(r30\). If you don't need to debug this
@@ -35388,8 +35473,11 @@
+code then use .set nobreak to turn off this warning.
+.*warn_nobreak.s:12: Warning: The debugger will corrupt bt \(r25\). If you don't need to debug this
+code then use .set nobreak to turn off this warning.
---- binutils-2.15/gas/testsuite/gas/nios2/warn_nobreak.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/warn_nobreak.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/warn_nobreak.s b/gas/testsuite/gas/nios2/warn_nobreak.s
+new file mode 100644
+index 0000000..8e495c0
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/warn_nobreak.s
@@ -0,0 +1,12 @@
+.set nobreak , 2 # This should not cause warning for ba, bt to be turned off
+add ba, r2, r2
@@ -35403,8 +35491,11 @@
+.set break # this should turn the warnings on
+add ba, r3, r4
+add bt, r3, r4
---- binutils-2.15/gas/testsuite/gas/nios2/xor.d 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/xor.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/xor.d b/gas/testsuite/gas/nios2/xor.d
+new file mode 100644
+index 0000000..de137dc
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/xor.d
@@ -0,0 +1,11 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 xor
@@ -35417,8 +35508,11 @@
+0+0000 <[^>]*> xor r6,r8,r10
+0+0004 <[^>]*> xorhi r6,r7,65535
+0+0008 <[^>]*> xori r6,r7,65535
---- binutils-2.15/gas/testsuite/gas/nios2/xor.s 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/gas/nios2/xor.s 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/gas/nios2/xor.s b/gas/testsuite/gas/nios2/xor.s
+new file mode 100644
+index 0000000..2c558f7
+--- /dev/null
++++ b/gas/testsuite/gas/nios2/xor.s
@@ -0,0 +1,7 @@
+# Source file used to test the nor instruction
+
@@ -35427,15 +35521,20 @@
+ xorhi r6,r7,0xffff
+ xori r6,r7,0xffff
+
---- binutils-2.15/gas/testsuite/nios2_as_xfail.lst 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/gas/testsuite/nios2_as_xfail.lst 2005-05-17 12:20:14.000000000 +0200
+diff --git a/gas/testsuite/nios2_as_xfail.lst b/gas/testsuite/nios2_as_xfail.lst
+new file mode 100644
+index 0000000..27a4cd5
+--- /dev/null
++++ b/gas/testsuite/nios2_as_xfail.lst
@@ -0,0 +1,4 @@
+FAIL: vtable inherit0
+FAIL: vtable entry1
+
+
---- binutils-2.15/include/bfdlink.h 2004-05-17 21:36:06.000000000 +0200
-+++ binutils-2.15-nios2/include/bfdlink.h 2005-05-17 12:20:14.000000000 +0200
+diff --git a/include/bfdlink.h b/include/bfdlink.h
+index cc2043e..ee821bf 100644
+--- a/include/bfdlink.h
++++ b/include/bfdlink.h
@@ -688,4 +688,14 @@ struct bfd_elf_version_tree
struct bfd_elf_version_expr *prev, const char *sym);
};
@@ -35451,18 +35550,23 @@
+extern void _bfd_set_force_make_executable (bfd_boolean force);
+
#endif
---- binutils-2.15/include/dis-asm.h 2003-11-14 16:12:43.000000000 +0100
-+++ binutils-2.15-nios2/include/dis-asm.h 2005-05-17 12:20:14.000000000 +0200
-@@ -247,6 +247,7 @@ extern int print_insn_sh64 (bfd_vma, di
+diff --git a/include/dis-asm.h b/include/dis-asm.h
+index 3670c51..202c511 100644
+--- a/include/dis-asm.h
++++ b/include/dis-asm.h
+@@ -247,6 +247,8 @@ extern int print_insn_sh64 (bfd_vma, disassemble_info *);
extern int print_insn_sh64x_media (bfd_vma, disassemble_info *);
extern int print_insn_frv (bfd_vma, disassemble_info *);
extern int print_insn_iq2000 (bfd_vma, disassemble_info *);
-+extern int print_insn_nios2 (bfd_vma, disassemble_info *);
++extern int print_insn_big_nios2 (bfd_vma, disassemble_info *);
++extern int print_insn_little_nios2 (bfd_vma, disassemble_info *);
extern disassembler_ftype arc_get_disassembler (void *);
extern disassembler_ftype cris_get_disassembler (bfd *);
---- binutils-2.15/include/elf/common.h 2004-01-29 03:41:18.000000000 +0100
-+++ binutils-2.15-nios2/include/elf/common.h 2005-05-17 12:20:14.000000000 +0200
+diff --git a/include/elf/common.h b/include/elf/common.h
+index bf233f6..8c758ca 100644
+--- a/include/elf/common.h
++++ b/include/elf/common.h
@@ -182,6 +182,8 @@
#define EM_IP2K 101 /* Ubicom IP2022 micro controller */
#define EM_MSP430 105 /* TI msp430 micro controller */
@@ -35472,8 +35576,11 @@
/* If it is necessary to assign new unofficial EM_* values, please pick large
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
with official or non-GNU unofficial values.
---- binutils-2.15/include/elf/nios2.h 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/include/elf/nios2.h 2005-05-17 12:20:14.000000000 +0200
+diff --git a/include/elf/nios2.h b/include/elf/nios2.h
+new file mode 100644
+index 0000000..ef810c5
+--- /dev/null
++++ b/include/elf/nios2.h
@@ -0,0 +1,65 @@
+/* Altera New Jersey ELF support for BFD
+
@@ -35540,23 +35647,58 @@
+#define SHF_NIOS2_GPREL 0x10000000
+
+#endif //_ELF_NIOS2_H
---- binutils-2.15/include/opcode/nios2-isa.h 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/include/opcode/nios2-isa.h 2005-05-17 12:20:14.000000000 +0200
-@@ -0,0 +1,1453 @@
-+/* This file is automatically generated by gen_isa.pl - do not edit */
+diff --git a/include/opcode/nios2-isa.h b/include/opcode/nios2-isa.h
+new file mode 100644
+index 0000000..0023880
+--- /dev/null
++++ b/include/opcode/nios2-isa.h
+@@ -0,0 +1,1860 @@
++/*
++ * This file defines Nios II instruction set constants.
++ * To include it in assembly code (.S file), define ALT_ASM_SRC
++ * before including this file.
++ *
++ * This file is automatically generated by gen_isa.pl - do not edit
++ */
+
+#ifndef _NIOS2_ISA_H_
+#define _NIOS2_ISA_H_
+
+/* OP instruction opcode values (index is OP field) */
+#define NUM_OP_INSTS 64
++
++#ifndef ALT_ASM_SRC
+extern const char* op_names[NUM_OP_INSTS];
++#endif /* ALT_ASM_SRC */
+
+/* OPX instruction opcode values (index is OPX field) */
+#define NUM_OPX_INSTS 64
++
++#ifndef ALT_ASM_SRC
+extern const char* opx_names[NUM_OPX_INSTS];
++#endif /* ALT_ASM_SRC */
+
+/* Constants for instruction fields and ISA */
++#define CPU_RESET_EXC_ID 1
++#define DIV_ERROR_EXC_ID 9
++#define DTLB_MISS_EXC_ID 15
++#define DTLB_PERM_EXC_ID 16
++#define FAST_INTR_EXC_ID 3
++#define HBREAK_EXC_ID 0
++#define ITLB_MISS_EXC_ID 13
++#define ITLB_PERM_EXC_ID 14
++#define MISALIGNED_DATA_ADDR_EXC_ID 7
++#define MISALIGNED_TARGET_PC_EXC_ID 8
++#define NMI_EXC_ID 2
++#define NORM_INTR_EXC_ID 4
++#define SBREAK_EXC_ID 6
++#define SLAVE_DATA_ACCESS_ERROR_EXC_ID 18
++#define SLAVE_INST_ACCESS_ERROR_EXC_ID 17
++#define SUPERVISOR_DATA_ADDR_EXC_ID 12
++#define SUPERVISOR_INST_ADDR_EXC_ID 10
++#define SUPERVISOR_INST_EXC_ID 11
++#define TRAP_EXC_ID 5
++#define AT_REGNUM 1
+#define BRETADDR_REGNUM 30
+#define BSTATUS_REG_LSB 2
+#define BSTATUS_REG_MMU_LSB 0
@@ -35570,6 +35712,10 @@
+#define BSTATUS_REG_REGNUM 2
+#define BSTATUS_REG_SZ 3
+#define BSTATUS_REG_MASK 0x7
++#define BT_REGNUM 25
++#define CACHE_MAX_BYTES 65536
++#define CACHE_MAX_LINE_BYTES 32
++#define CACHE_MIN_LINE_BYTES 4
+#define COMPARE_OP_EQ 0x0
+#define COMPARE_OP_GE 0x1
+#define COMPARE_OP_LSB 3
@@ -35589,6 +35735,7 @@
+#define DATAPATH_MSB 31
+#define DATAPATH_SZ 32
+#define DATAPATH_MASK 0xffffffff
++#define EMPTY_CRST_IW 127034
+#define EMPTY_HBREAK_IW 4040762
+#define EMPTY_INTR_IW 3926074
+#define EMPTY_NOP_IW 100410
@@ -35607,7 +35754,22 @@
+#define ESTATUS_REG_REGNUM 1
+#define ESTATUS_REG_SZ 3
+#define ESTATUS_REG_MASK 0x7
++#define ET_REGNUM 24
++#define EXCEPTION_REG_LSB 0
++#define EXCEPTION_REG_MEA_LSB 0
++#define EXCEPTION_REG_MEA_MSB 0
++#define EXCEPTION_REG_MEA_SZ 1
++#define EXCEPTION_REG_MEA_MASK 0x1
++#define EXCEPTION_REG_MEE_LSB 1
++#define EXCEPTION_REG_MEE_MSB 1
++#define EXCEPTION_REG_MEE_SZ 1
++#define EXCEPTION_REG_MEE_MASK 0x1
++#define EXCEPTION_REG_MSB 1
++#define EXCEPTION_REG_REGNUM 7
++#define EXCEPTION_REG_SZ 2
++#define EXCEPTION_REG_MASK 0x3
+#define FP_REGNUM 28
++#define FSTATUS_REG_REGNUM 11
+#define GP_REGNUM 26
+#define IENABLE_REG_LSB 0
+#define IENABLE_REG_MSB 31
@@ -35715,12 +35877,14 @@
+#define MMU_ADDR_IO_REGION_MSB 31
+#define MMU_ADDR_IO_REGION_SZ 3
+#define MMU_ADDR_IO_REGION_MASK 0x7
++#define MMU_ADDR_IO_REGION_VPN 0xe0000
+#define MMU_ADDR_KERNEL_MMU_REGION 0x2
+#define MMU_ADDR_KERNEL_MMU_REGION_LSB 30
+#define MMU_ADDR_KERNEL_MMU_REGION_MSB 31
+#define MMU_ADDR_KERNEL_MMU_REGION_SZ 2
+#define MMU_ADDR_KERNEL_MMU_REGION_MASK 0x3
+#define MMU_ADDR_KERNEL_REGION 0x6
++#define MMU_ADDR_KERNEL_REGION_INT 6
+#define MMU_ADDR_KERNEL_REGION_LSB 29
+#define MMU_ADDR_KERNEL_REGION_MSB 31
+#define MMU_ADDR_KERNEL_REGION_SZ 3
@@ -35742,19 +35906,6 @@
+#define MMU_ADDR_VPN_MSB 31
+#define MMU_ADDR_VPN_SZ 20
+#define MMU_ADDR_VPN_MASK 0xfffff
-+#define PERF_CNT_REG_CLR_LSB 1
-+#define PERF_CNT_REG_CLR_MSB 1
-+#define PERF_CNT_REG_CLR_SZ 1
-+#define PERF_CNT_REG_CLR_MASK 0x1
-+#define PERF_CNT_REG_EN_LSB 0
-+#define PERF_CNT_REG_EN_MSB 0
-+#define PERF_CNT_REG_EN_SZ 1
-+#define PERF_CNT_REG_EN_MASK 0x1
-+#define PERF_CNT_REG_LSB 0
-+#define PERF_CNT_REG_MSB 1
-+#define PERF_CNT_REG_REGNUM 7
-+#define PERF_CNT_REG_SZ 2
-+#define PERF_CNT_REG_MASK 0x3
+#define PTEADDR_REG_LSB 0
+#define PTEADDR_REG_MSB 31
+#define PTEADDR_REG_PTBASE_LSB 22
@@ -35780,17 +35931,25 @@
+#define RF_NUM_REG 32
+#define SIM_REG_LSB 0
+#define SIM_REG_MSB 3
++#define SIM_REG_PERF_CNT_CLR_LSB 2
++#define SIM_REG_PERF_CNT_CLR_MSB 2
++#define SIM_REG_PERF_CNT_CLR_SZ 1
++#define SIM_REG_PERF_CNT_CLR_MASK 0x1
++#define SIM_REG_PERF_CNT_EN_LSB 1
++#define SIM_REG_PERF_CNT_EN_MSB 1
++#define SIM_REG_PERF_CNT_EN_SZ 1
++#define SIM_REG_PERF_CNT_EN_MASK 0x1
+#define SIM_REG_REGNUM 6
-+#define SIM_REG_SHOW_DTLB_LSB 2
-+#define SIM_REG_SHOW_DTLB_MSB 2
++#define SIM_REG_SHOW_DTLB_LSB 4
++#define SIM_REG_SHOW_DTLB_MSB 4
+#define SIM_REG_SHOW_DTLB_SZ 1
+#define SIM_REG_SHOW_DTLB_MASK 0x1
-+#define SIM_REG_SHOW_ITLB_LSB 1
-+#define SIM_REG_SHOW_ITLB_MSB 1
++#define SIM_REG_SHOW_ITLB_LSB 3
++#define SIM_REG_SHOW_ITLB_MSB 3
+#define SIM_REG_SHOW_ITLB_SZ 1
+#define SIM_REG_SHOW_ITLB_MASK 0x1
-+#define SIM_REG_SHOW_MMU_REGS_LSB 3
-+#define SIM_REG_SHOW_MMU_REGS_MSB 3
++#define SIM_REG_SHOW_MMU_REGS_LSB 5
++#define SIM_REG_SHOW_MMU_REGS_MSB 5
+#define SIM_REG_SHOW_MMU_REGS_SZ 1
+#define SIM_REG_SHOW_MMU_REGS_MASK 0x1
+#define SIM_REG_STOP_LSB 0
@@ -35807,11 +35966,19 @@
+#define STATUS_REG_LSB 0
+#define STATUS_REG_MMU_LSB 0
+#define STATUS_REG_MMU_MSB 2
++#define STATUS_REG_MMU_RSV_LSB 3
++#define STATUS_REG_MMU_RSV_MSB 31
++#define STATUS_REG_MMU_RSV_SZ 29
++#define STATUS_REG_MMU_RSV_MASK 0x1fffffff
+#define STATUS_REG_MMU_SZ 3
+#define STATUS_REG_MMU_MASK 0x7
+#define STATUS_REG_MSB 2
+#define STATUS_REG_NO_MMU_LSB 0
+#define STATUS_REG_NO_MMU_MSB 0
++#define STATUS_REG_NO_MMU_RSV_LSB 1
++#define STATUS_REG_NO_MMU_RSV_MSB 31
++#define STATUS_REG_NO_MMU_RSV_SZ 31
++#define STATUS_REG_NO_MMU_RSV_MASK 0x7fffffff
+#define STATUS_REG_NO_MMU_SZ 1
+#define STATUS_REG_NO_MMU_MASK 0x1
+#define STATUS_REG_PIE_LSB 0
@@ -35845,6 +36012,10 @@
+#define TLBACC_REG_G_MSB 20
+#define TLBACC_REG_G_SZ 1
+#define TLBACC_REG_G_MASK 0x1
++#define TLBACC_REG_IG_LSB 25
++#define TLBACC_REG_IG_MSB 31
++#define TLBACC_REG_IG_SZ 7
++#define TLBACC_REG_IG_MASK 0x7f
+#define TLBACC_REG_LSB 0
+#define TLBACC_REG_MSB 24
+#define TLBACC_REG_PFN_LSB 0
@@ -35879,7 +36050,7 @@
+#define TLBMISC_REG_DBL_SZ 1
+#define TLBMISC_REG_DBL_MASK 0x1
+#define TLBMISC_REG_LSB 0
-+#define TLBMISC_REG_MSB 22
++#define TLBMISC_REG_MSB 23
+#define TLBMISC_REG_PERM_LSB 1
+#define TLBMISC_REG_PERM_MSB 1
+#define TLBMISC_REG_PERM_SZ 1
@@ -35888,21 +36059,29 @@
+#define TLBMISC_REG_PID_MSB 17
+#define TLBMISC_REG_PID_SZ 14
+#define TLBMISC_REG_PID_MASK 0x3fff
-+#define TLBMISC_REG_RD_LSB 23
-+#define TLBMISC_REG_RD_MSB 23
++#define TLBMISC_REG_RD_LSB 24
++#define TLBMISC_REG_RD_MSB 24
+#define TLBMISC_REG_RD_SZ 1
+#define TLBMISC_REG_RD_MASK 0x1
+#define TLBMISC_REG_REGNUM 10
-+#define TLBMISC_REG_RSV_LSB 18
-+#define TLBMISC_REG_RSV_MSB 19
-+#define TLBMISC_REG_RSV_SZ 2
-+#define TLBMISC_REG_RSV_MASK 0x3
-+#define TLBMISC_REG_SZ 23
-+#define TLBMISC_REG_MASK 0x7fffff
++#define TLBMISC_REG_RSV0_LSB 18
++#define TLBMISC_REG_RSV0_MSB 19
++#define TLBMISC_REG_RSV0_SZ 2
++#define TLBMISC_REG_RSV0_MASK 0x3
++#define TLBMISC_REG_RSV1_LSB 25
++#define TLBMISC_REG_RSV1_MSB 31
++#define TLBMISC_REG_RSV1_SZ 7
++#define TLBMISC_REG_RSV1_MASK 0x7f
++#define TLBMISC_REG_SZ 24
++#define TLBMISC_REG_MASK 0xffffff
+#define TLBMISC_REG_WAY_LSB 20
+#define TLBMISC_REG_WAY_MSB 22
+#define TLBMISC_REG_WAY_SZ 3
+#define TLBMISC_REG_WAY_MASK 0x7
++#define TLBMISC_REG_WE_LSB 23
++#define TLBMISC_REG_WE_MSB 23
++#define TLBMISC_REG_WE_SZ 1
++#define TLBMISC_REG_WE_MASK 0x1
+
+/* Macros to extract instruction fields */
+#define GET_IW_A(Iw) \
@@ -36002,16 +36181,16 @@
+#define SET_ESTATUS_REG_NO_MMU(Reg, Val) \
+ Reg = (((Reg) & (~(ESTATUS_REG_NO_MMU_MASK << ESTATUS_REG_NO_MMU_LSB))) | \
+ (((Val) & ESTATUS_REG_NO_MMU_MASK) << ESTATUS_REG_NO_MMU_LSB))
-+#define GET_PERF_CNT_REG_CLR(Reg) \
-+ (((Reg) >> PERF_CNT_REG_CLR_LSB) & PERF_CNT_REG_CLR_MASK)
-+#define SET_PERF_CNT_REG_CLR(Reg, Val) \
-+ Reg = (((Reg) & (~(PERF_CNT_REG_CLR_MASK << PERF_CNT_REG_CLR_LSB))) | \
-+ (((Val) & PERF_CNT_REG_CLR_MASK) << PERF_CNT_REG_CLR_LSB))
-+#define GET_PERF_CNT_REG_EN(Reg) \
-+ (((Reg) >> PERF_CNT_REG_EN_LSB) & PERF_CNT_REG_EN_MASK)
-+#define SET_PERF_CNT_REG_EN(Reg, Val) \
-+ Reg = (((Reg) & (~(PERF_CNT_REG_EN_MASK << PERF_CNT_REG_EN_LSB))) | \
-+ (((Val) & PERF_CNT_REG_EN_MASK) << PERF_CNT_REG_EN_LSB))
++#define GET_EXCEPTION_REG_MEA(Reg) \
++ (((Reg) >> EXCEPTION_REG_MEA_LSB) & EXCEPTION_REG_MEA_MASK)
++#define SET_EXCEPTION_REG_MEA(Reg, Val) \
++ Reg = (((Reg) & (~(EXCEPTION_REG_MEA_MASK << EXCEPTION_REG_MEA_LSB))) | \
++ (((Val) & EXCEPTION_REG_MEA_MASK) << EXCEPTION_REG_MEA_LSB))
++#define GET_EXCEPTION_REG_MEE(Reg) \
++ (((Reg) >> EXCEPTION_REG_MEE_LSB) & EXCEPTION_REG_MEE_MASK)
++#define SET_EXCEPTION_REG_MEE(Reg, Val) \
++ Reg = (((Reg) & (~(EXCEPTION_REG_MEE_MASK << EXCEPTION_REG_MEE_LSB))) | \
++ (((Val) & EXCEPTION_REG_MEE_MASK) << EXCEPTION_REG_MEE_LSB))
+#define GET_PTEADDR_REG_PTBASE(Reg) \
+ (((Reg) >> PTEADDR_REG_PTBASE_LSB) & PTEADDR_REG_PTBASE_MASK)
+#define SET_PTEADDR_REG_PTBASE(Reg, Val) \
@@ -36027,6 +36206,16 @@
+#define SET_PTEADDR_REG_VPN(Reg, Val) \
+ Reg = (((Reg) & (~(PTEADDR_REG_VPN_MASK << PTEADDR_REG_VPN_LSB))) | \
+ (((Val) & PTEADDR_REG_VPN_MASK) << PTEADDR_REG_VPN_LSB))
++#define GET_SIM_REG_PERF_CNT_CLR(Reg) \
++ (((Reg) >> SIM_REG_PERF_CNT_CLR_LSB) & SIM_REG_PERF_CNT_CLR_MASK)
++#define SET_SIM_REG_PERF_CNT_CLR(Reg, Val) \
++ Reg = (((Reg) & (~(SIM_REG_PERF_CNT_CLR_MASK << SIM_REG_PERF_CNT_CLR_LSB))) | \
++ (((Val) & SIM_REG_PERF_CNT_CLR_MASK) << SIM_REG_PERF_CNT_CLR_LSB))
++#define GET_SIM_REG_PERF_CNT_EN(Reg) \
++ (((Reg) >> SIM_REG_PERF_CNT_EN_LSB) & SIM_REG_PERF_CNT_EN_MASK)
++#define SET_SIM_REG_PERF_CNT_EN(Reg, Val) \
++ Reg = (((Reg) & (~(SIM_REG_PERF_CNT_EN_MASK << SIM_REG_PERF_CNT_EN_LSB))) | \
++ (((Val) & SIM_REG_PERF_CNT_EN_MASK) << SIM_REG_PERF_CNT_EN_LSB))
+#define GET_SIM_REG_SHOW_DTLB(Reg) \
+ (((Reg) >> SIM_REG_SHOW_DTLB_LSB) & SIM_REG_SHOW_DTLB_MASK)
+#define SET_SIM_REG_SHOW_DTLB(Reg, Val) \
@@ -36057,11 +36246,21 @@
+#define SET_STATUS_REG_MMU(Reg, Val) \
+ Reg = (((Reg) & (~(STATUS_REG_MMU_MASK << STATUS_REG_MMU_LSB))) | \
+ (((Val) & STATUS_REG_MMU_MASK) << STATUS_REG_MMU_LSB))
++#define GET_STATUS_REG_MMU_RSV(Reg) \
++ (((Reg) >> STATUS_REG_MMU_RSV_LSB) & STATUS_REG_MMU_RSV_MASK)
++#define SET_STATUS_REG_MMU_RSV(Reg, Val) \
++ Reg = (((Reg) & (~(STATUS_REG_MMU_RSV_MASK << STATUS_REG_MMU_RSV_LSB))) | \
++ (((Val) & STATUS_REG_MMU_RSV_MASK) << STATUS_REG_MMU_RSV_LSB))
+#define GET_STATUS_REG_NO_MMU(Reg) \
+ (((Reg) >> STATUS_REG_NO_MMU_LSB) & STATUS_REG_NO_MMU_MASK)
+#define SET_STATUS_REG_NO_MMU(Reg, Val) \
+ Reg = (((Reg) & (~(STATUS_REG_NO_MMU_MASK << STATUS_REG_NO_MMU_LSB))) | \
+ (((Val) & STATUS_REG_NO_MMU_MASK) << STATUS_REG_NO_MMU_LSB))
++#define GET_STATUS_REG_NO_MMU_RSV(Reg) \
++ (((Reg) >> STATUS_REG_NO_MMU_RSV_LSB) & STATUS_REG_NO_MMU_RSV_MASK)
++#define SET_STATUS_REG_NO_MMU_RSV(Reg, Val) \
++ Reg = (((Reg) & (~(STATUS_REG_NO_MMU_RSV_MASK << STATUS_REG_NO_MMU_RSV_LSB))) | \
++ (((Val) & STATUS_REG_NO_MMU_RSV_MASK) << STATUS_REG_NO_MMU_RSV_LSB))
+#define GET_STATUS_REG_PIE(Reg) \
+ (((Reg) >> STATUS_REG_PIE_LSB) & STATUS_REG_PIE_MASK)
+#define SET_STATUS_REG_PIE(Reg, Val) \
@@ -36082,6 +36281,11 @@
+#define SET_TLBACC_REG_G(Reg, Val) \
+ Reg = (((Reg) & (~(TLBACC_REG_G_MASK << TLBACC_REG_G_LSB))) | \
+ (((Val) & TLBACC_REG_G_MASK) << TLBACC_REG_G_LSB))
++#define GET_TLBACC_REG_IG(Reg) \
++ (((Reg) >> TLBACC_REG_IG_LSB) & TLBACC_REG_IG_MASK)
++#define SET_TLBACC_REG_IG(Reg, Val) \
++ Reg = (((Reg) & (~(TLBACC_REG_IG_MASK << TLBACC_REG_IG_LSB))) | \
++ (((Val) & TLBACC_REG_IG_MASK) << TLBACC_REG_IG_LSB))
+#define GET_TLBACC_REG_PFN(Reg) \
+ (((Reg) >> TLBACC_REG_PFN_LSB) & TLBACC_REG_PFN_MASK)
+#define SET_TLBACC_REG_PFN(Reg, Val) \
@@ -36132,16 +36336,26 @@
+#define SET_TLBMISC_REG_RD(Reg, Val) \
+ Reg = (((Reg) & (~(TLBMISC_REG_RD_MASK << TLBMISC_REG_RD_LSB))) | \
+ (((Val) & TLBMISC_REG_RD_MASK) << TLBMISC_REG_RD_LSB))
-+#define GET_TLBMISC_REG_RSV(Reg) \
-+ (((Reg) >> TLBMISC_REG_RSV_LSB) & TLBMISC_REG_RSV_MASK)
-+#define SET_TLBMISC_REG_RSV(Reg, Val) \
-+ Reg = (((Reg) & (~(TLBMISC_REG_RSV_MASK << TLBMISC_REG_RSV_LSB))) | \
-+ (((Val) & TLBMISC_REG_RSV_MASK) << TLBMISC_REG_RSV_LSB))
++#define GET_TLBMISC_REG_RSV0(Reg) \
++ (((Reg) >> TLBMISC_REG_RSV0_LSB) & TLBMISC_REG_RSV0_MASK)
++#define SET_TLBMISC_REG_RSV0(Reg, Val) \
++ Reg = (((Reg) & (~(TLBMISC_REG_RSV0_MASK << TLBMISC_REG_RSV0_LSB))) | \
++ (((Val) & TLBMISC_REG_RSV0_MASK) << TLBMISC_REG_RSV0_LSB))
++#define GET_TLBMISC_REG_RSV1(Reg) \
++ (((Reg) >> TLBMISC_REG_RSV1_LSB) & TLBMISC_REG_RSV1_MASK)
++#define SET_TLBMISC_REG_RSV1(Reg, Val) \
++ Reg = (((Reg) & (~(TLBMISC_REG_RSV1_MASK << TLBMISC_REG_RSV1_LSB))) | \
++ (((Val) & TLBMISC_REG_RSV1_MASK) << TLBMISC_REG_RSV1_LSB))
+#define GET_TLBMISC_REG_WAY(Reg) \
+ (((Reg) >> TLBMISC_REG_WAY_LSB) & TLBMISC_REG_WAY_MASK)
+#define SET_TLBMISC_REG_WAY(Reg, Val) \
+ Reg = (((Reg) & (~(TLBMISC_REG_WAY_MASK << TLBMISC_REG_WAY_LSB))) | \
+ (((Val) & TLBMISC_REG_WAY_MASK) << TLBMISC_REG_WAY_LSB))
++#define GET_TLBMISC_REG_WE(Reg) \
++ (((Reg) >> TLBMISC_REG_WE_LSB) & TLBMISC_REG_WE_MASK)
++#define SET_TLBMISC_REG_WE(Reg, Val) \
++ Reg = (((Reg) & (~(TLBMISC_REG_WE_MASK << TLBMISC_REG_WE_LSB))) | \
++ (((Val) & TLBMISC_REG_WE_MASK) << TLBMISC_REG_WE_LSB))
+
+/* Macros to extract MMU fields */
+#define GET_MMU_ADDR_BYPASS_TLB_CACHEABLE(Addr) \
@@ -36215,7 +36429,9 @@
+#define OP_CMPNEI 24
+#define OP_CUSTOM 50
+#define OP_FLUSHD 59
++#define OP_FLUSHDA 27
+#define OP_INITD 51
++#define OP_JMPI 1
+#define OP_LDB 7
+#define OP_LDBIO 39
+#define OP_LDBU 3
@@ -36251,6 +36467,7 @@
+#define OPX_CMPLT 16
+#define OPX_CMPLTU 48
+#define OPX_CMPNE 24
++#define OPX_CRST 62
+#define OPX_DIV 37
+#define OPX_DIVU 36
+#define OPX_ERET 1
@@ -36295,25 +36512,51 @@
+
+#define IW_PROP_RESERVED(Iw) (0)
+
-+#define IW_PROP_FLUSH_PIPE(Iw) ( \
++#define IW_PROP_SUPERVISOR_ONLY(Iw) ( \
++ (op_prop_supervisor_only[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_supervisor_only[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
++extern unsigned char op_prop_supervisor_only[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
++extern unsigned char opx_prop_supervisor_only[64];
++#endif /* ALT_ASM_SRC */
++
++#define IW_PROP_INITI_FLUSHI(Iw) ( \
+ ( \
-+ ((GET_IW_OPX((Iw)) == OPX_FLUSHP) && IS_OPX_INST(Iw)) || \
-+ ((GET_IW_OPX((Iw)) == OPX_BRET) && IS_OPX_INST(Iw)) \
++ ((GET_IW_OPX((Iw)) == OPX_INITI) && IS_OPX_INST(Iw)) || \
++ ((GET_IW_OPX((Iw)) == OPX_FLUSHI) && IS_OPX_INST(Iw)) \
+ ) \
+ \
+)
+
++#define IW_PROP_FLUSH_PIPE(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_flush_pipe[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
++extern unsigned char opx_prop_flush_pipe[64];
++#endif /* ALT_ASM_SRC */
++
+#define IW_PROP_JMP_INDIRECT_NON_TRAP(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_jmp_indirect_non_trap[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_jmp_indirect_non_trap[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_JMP_INDIRECT(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_jmp_indirect[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_jmp_indirect[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_JMP_DIRECT(Iw) ( \
+ ( \
-+ ((GET_IW_OP((Iw)) == OP_CALL)) \
++ ((GET_IW_OP((Iw)) == OP_CALL)) || \
++ ((GET_IW_OP((Iw)) == OP_JMPI)) \
+ ) \
+ \
+)
@@ -36328,13 +36571,22 @@
+
+#define IW_PROP_MULX(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_mulx[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_mulx[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_MUL(Iw) ( \
+ (op_prop_mul[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_mul[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_mul[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_mul[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_DIV_UNSIGNED(Iw) ( \
+ ( \
@@ -36385,21 +36637,43 @@
+ \
+)
+
++#define IW_PROP_CRST(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_CRST) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
+#define IW_PROP_WR_CTL_REG(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_wr_ctl_reg[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_wr_ctl_reg[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_UNCOND_CTI_NON_BR(Iw) ( \
+ (op_prop_uncond_cti_non_br[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_uncond_cti_non_br[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_uncond_cti_non_br[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_uncond_cti_non_br[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_RETADDR(Iw) ( \
+ (op_prop_retaddr[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_retaddr[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_retaddr[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_retaddr[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_SHIFT_LEFT(Iw) ( \
+ ( \
@@ -36411,7 +36685,10 @@
+
+#define IW_PROP_SHIFT_LOGICAL(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_shift_logical[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_shift_logical[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_ROT_LEFT(Iw) ( \
+ ( \
@@ -36423,7 +36700,10 @@
+
+#define IW_PROP_SHIFT_ROT_LEFT(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_shift_rot_left[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_shift_rot_left[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_SHIFT_RIGHT_LOGICAL(Iw) ( \
+ ( \
@@ -36443,7 +36723,10 @@
+
+#define IW_PROP_SHIFT_RIGHT(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_shift_right[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_shift_right[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_ROT_RIGHT(Iw) ( \
+ ( \
@@ -36454,47 +36737,83 @@
+
+#define IW_PROP_SHIFT_ROT_RIGHT(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_shift_rot_right[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_shift_rot_right[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_SHIFT_ROT(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_shift_rot[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_shift_rot[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_SHIFT_ROT_IMM(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_shift_rot_imm[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_shift_rot_imm[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_ROTATE(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_rotate[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_rotate[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_LOGIC_REG(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_logic_reg[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_logic_reg[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_LOGIC_HI_IMM16(Iw) ( \
+ (op_prop_logic_hi_imm16[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_logic_hi_imm16[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_LOGIC_LO_IMM16(Iw) ( \
+ (op_prop_logic_lo_imm16[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_logic_lo_imm16[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_LOGIC_IMM16(Iw) ( \
+ (op_prop_logic_imm16[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_logic_imm16[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_LOGIC(Iw) ( \
+ (op_prop_logic[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_logic[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_logic[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_logic[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_UNSIGNED_LO_IMM16(Iw) ( \
+ (op_prop_unsigned_lo_imm16[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_unsigned_lo_imm16[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_unsigned_lo_imm16[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_unsigned_lo_imm16[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_ARITH_IMM16(Iw) ( \
+ ( \
@@ -36504,43 +36823,76 @@
+ \
+)
+
-+#define IW_PROP_CMP_IMM16_NO_CALL(Iw) ( \
-+ (op_prop_cmp_imm16_no_call[GET_IW_OP(Iw)]))
-+extern unsigned char op_prop_cmp_imm16_no_call[64];
++#define IW_PROP_CMP_IMM16(Iw) ( \
++ (op_prop_cmp_imm16[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
++extern unsigned char op_prop_cmp_imm16[64];
++#endif /* ALT_ASM_SRC */
++
++#define IW_PROP_JMPI(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_JMPI)) \
++ ) \
++ \
++)
++
++#define IW_PROP_CMP_IMM16_WITH_CALL_JMPI(Iw) ( \
++ (op_prop_cmp_imm16_with_call_jmpi[GET_IW_OP(Iw)]))
+
-+#define IW_PROP_CMP_IMM16_WITH_CALL(Iw) ( \
-+ (op_prop_cmp_imm16_with_call[GET_IW_OP(Iw)]))
-+extern unsigned char op_prop_cmp_imm16_with_call[64];
++#ifndef ALT_ASM_SRC
++extern unsigned char op_prop_cmp_imm16_with_call_jmpi[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_CMP_REG(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_cmp_reg[GET_IW_OPX(Iw)]))
-+extern unsigned char opx_prop_cmp_reg[64];
+
-+#define IW_PROP_SRC_IMM16(Iw) ( \
-+ (op_prop_src_imm16[GET_IW_OP(Iw)]))
-+extern unsigned char op_prop_src_imm16[64];
++#ifndef ALT_ASM_SRC
++extern unsigned char opx_prop_cmp_reg[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_SRC_IMM5(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_src_imm5[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_src_imm5[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_CMP_WITH_LT(Iw) ( \
+ (op_prop_cmp_with_lt[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_cmp_with_lt[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_cmp_with_lt[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_cmp_with_lt[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_CMP_WITH_EQ(Iw) ( \
+ (op_prop_cmp_with_eq[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_cmp_with_eq[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_cmp_with_eq[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_cmp_with_eq[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_CMP_WITH_GE(Iw) ( \
+ (op_prop_cmp_with_ge[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_cmp_with_ge[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_cmp_with_ge[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_cmp_with_ge[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_CMP_WITH_NE(Iw) ( \
+ ( \
@@ -36553,14 +36905,26 @@
+#define IW_PROP_CMP_ALU_SIGNED(Iw) ( \
+ (op_prop_cmp_alu_signed[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_cmp_alu_signed[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_cmp_alu_signed[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_cmp_alu_signed[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_CMP(Iw) ( \
+ (op_prop_cmp[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_cmp[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_cmp[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_cmp[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_BR_WITH_LT(Iw) ( \
+ ( \
@@ -36580,7 +36944,10 @@
+
+#define IW_PROP_BR_WITH_EQ(Iw) ( \
+ (op_prop_br_with_eq[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_br_with_eq[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_BR_WITH_NE(Iw) ( \
+ ( \
@@ -36599,7 +36966,10 @@
+
+#define IW_PROP_BR_COND(Iw) ( \
+ (op_prop_br_cond[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_br_cond[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_BR_UNCOND(Iw) ( \
+ ( \
@@ -36610,27 +36980,48 @@
+
+#define IW_PROP_BR(Iw) ( \
+ (op_prop_br[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_br[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_ALU_SUB(Iw) ( \
+ (op_prop_alu_sub[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_alu_sub[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_alu_sub[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_alu_sub[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_FORCE_XOR(Iw) ( \
+ (op_prop_force_xor[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_force_xor[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_force_xor[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_force_xor[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_LOAD8(Iw) ( \
+ (op_prop_load8[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_load8[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_LOAD16(Iw) ( \
+ (op_prop_load16[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_load16[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_LOAD32(Iw) ( \
+ ( \
@@ -36642,23 +37033,38 @@
+
+#define IW_PROP_LOAD_SIGNED(Iw) ( \
+ (op_prop_load_signed[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_load_signed[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_LOAD_UNSIGNED(Iw) ( \
+ (op_prop_load_unsigned[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_load_unsigned[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_LOAD(Iw) ( \
+ (op_prop_load[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_load[64];
++#endif /* ALT_ASM_SRC */
+
-+#define IW_PROP_LOAD_INITD_FLUSHD(Iw) ( \
-+ (op_prop_load_initd_flushd[GET_IW_OP(Iw)]))
-+extern unsigned char op_prop_load_initd_flushd[64];
++#define IW_PROP_LOAD_INITD_FLUSHD_FLUSHDA(Iw) ( \
++ (op_prop_load_initd_flushd_flushda[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
++extern unsigned char op_prop_load_initd_flushd_flushda[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_LOAD_NON_IO(Iw) ( \
+ (op_prop_load_non_io[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_load_non_io[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_STORE8(Iw) ( \
+ ( \
@@ -36686,15 +37092,24 @@
+
+#define IW_PROP_STORE(Iw) ( \
+ (op_prop_store[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_store[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_STORE_NON_IO(Iw) ( \
+ (op_prop_store_non_io[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_store_non_io[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_MEM(Iw) ( \
+ (op_prop_mem[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_mem[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_INITD(Iw) ( \
+ ( \
@@ -36718,35 +37133,65 @@
+ \
+)
+
-+#define IW_PROP_INITI_FLUSHI(Iw) ( \
++#define IW_PROP_FLUSHDA(Iw) ( \
+ ( \
-+ ((GET_IW_OPX((Iw)) == OPX_INITI) && IS_OPX_INST(Iw)) || \
-+ ((GET_IW_OPX((Iw)) == OPX_FLUSHI) && IS_OPX_INST(Iw)) \
++ ((GET_IW_OP((Iw)) == OP_FLUSHDA)) \
+ ) \
+ \
+)
+
++#define IW_PROP_FLUSHD_FLUSHDA(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_FLUSHD)) || \
++ ((GET_IW_OP((Iw)) == OP_FLUSHDA)) \
++ ) \
++ \
++)
++
++#define IW_PROP_INITD_FLUSHD_FLUSHDA(Iw) ( \
++ (op_prop_initd_flushd_flushda[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
++extern unsigned char op_prop_initd_flushd_flushda[64];
++#endif /* ALT_ASM_SRC */
++
+#define IW_PROP_LOAD_IO(Iw) ( \
+ (op_prop_load_io[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_load_io[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_STORE_IO(Iw) ( \
+ (op_prop_store_io[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_store_io[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_MEM_IO(Iw) ( \
+ (op_prop_mem_io[GET_IW_OP(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_mem_io[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_ARITH(Iw) ( \
+ (op_prop_arith[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_arith[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_arith[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_arith[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_A_NOT_SRC(Iw) ( \
+ ( \
-+ ((GET_IW_OP((Iw)) == OP_CALL)) \
++ ((GET_IW_OP((Iw)) == OP_CALL)) || \
++ ((GET_IW_OP((Iw)) == OP_JMPI)) \
+ ) \
+ || (IS_CUSTOM_INST(Iw) && !GET_IW_CUSTOM_READRA(Iw)) \
+)
@@ -36754,18 +37199,30 @@
+#define IW_PROP_B_NOT_SRC(Iw) ( \
+ (op_prop_b_not_src[GET_IW_OP(Iw)]) \
+ || (IS_CUSTOM_INST(Iw) && !GET_IW_CUSTOM_READRB(Iw)))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_b_not_src[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_IGNORE_DST(Iw) ( \
+ (op_prop_ignore_dst[GET_IW_OP(Iw)]) \
+ || (IS_CUSTOM_INST(Iw) && !GET_IW_CUSTOM_WRITERC(Iw)))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_ignore_dst[64];
++#endif /* ALT_ASM_SRC */
+
-+#define IW_PROP_SRC2_IS_IMM(Iw) ( \
-+ (op_prop_src2_is_imm[GET_IW_OP(Iw)] || \
-+ (IS_OPX_INST(Iw) && opx_prop_src2_is_imm[GET_IW_OPX(Iw)])))
-+extern unsigned char op_prop_src2_is_imm[64];
-+extern unsigned char opx_prop_src2_is_imm[64];
++#define IW_PROP_SRC2_CHOOSE_IMM(Iw) ( \
++ (op_prop_src2_choose_imm[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_src2_choose_imm[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
++extern unsigned char op_prop_src2_choose_imm[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
++extern unsigned char opx_prop_src2_choose_imm[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_WRCTL_INST(Iw) ( \
+ ( \
@@ -36798,7 +37255,10 @@
+
+#define IW_PROP_MUL_SHIFT_SRC1_SIGNED(Iw) ( \
+ (IS_OPX_INST(Iw) && opx_prop_mul_shift_src1_signed[GET_IW_OPX(Iw)]))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_mul_shift_src1_signed[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_MUL_SHIFT_SRC2_SIGNED(Iw) ( \
+ ( \
@@ -36810,39 +37270,62 @@
+#define IW_PROP_DONT_DISPLAY_DST_REG(Iw) ( \
+ (op_prop_dont_display_dst_reg[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_dont_display_dst_reg[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_dont_display_dst_reg[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_dont_display_dst_reg[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_DONT_DISPLAY_SRC1_REG(Iw) ( \
+ (op_prop_dont_display_src1_reg[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_dont_display_src1_reg[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_dont_display_src1_reg[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_dont_display_src1_reg[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_DONT_DISPLAY_SRC2_REG(Iw) ( \
+ (op_prop_dont_display_src2_reg[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_dont_display_src2_reg[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_dont_display_src2_reg[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_dont_display_src2_reg[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_SRC1_NO_X(Iw) ( \
+ (op_prop_src1_no_x[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_src1_no_x[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_src1_no_x[64];
++#endif /* ALT_ASM_SRC */
++
++#ifndef ALT_ASM_SRC
+extern unsigned char opx_prop_src1_no_x[64];
++#endif /* ALT_ASM_SRC */
+
+#define IW_PROP_SRC2_NO_X(Iw) ( \
+ (op_prop_src2_no_x[GET_IW_OP(Iw)] || \
+ (IS_OPX_INST(Iw) && opx_prop_src2_no_x[GET_IW_OPX(Iw)])))
++
++#ifndef ALT_ASM_SRC
+extern unsigned char op_prop_src2_no_x[64];
-+extern unsigned char opx_prop_src2_no_x[64];
++#endif /* ALT_ASM_SRC */
+
-+/* Instruction information entry */
-+typedef struct {
-+ const char* name; /* Assembly-language instruction name */
-+ int instType; /* INST_TYPE_OP or INST_TYPE_OPX */
-+ unsigned opcode; /* Value of instruction word OP/OPX field */
-+} Nios2InstInfo;
++#ifndef ALT_ASM_SRC
++extern unsigned char opx_prop_src2_no_x[64];
++#endif /* ALT_ASM_SRC */
+
+/* Instruction types */
+#define INST_TYPE_OP 0
@@ -36850,103 +37333,129 @@
+
+/* Canonical instruction codes independent of encoding */
+#define CALL_INST_CODE 0
-+#define LDBU_INST_CODE 1
-+#define ADDI_INST_CODE 2
-+#define STB_INST_CODE 3
-+#define BR_INST_CODE 4
-+#define LDB_INST_CODE 5
-+#define CMPGEI_INST_CODE 6
-+#define LDHU_INST_CODE 7
-+#define ANDI_INST_CODE 8
-+#define STH_INST_CODE 9
-+#define BGE_INST_CODE 10
-+#define LDH_INST_CODE 11
-+#define CMPLTI_INST_CODE 12
-+#define ORI_INST_CODE 13
-+#define STW_INST_CODE 14
-+#define BLT_INST_CODE 15
-+#define LDW_INST_CODE 16
-+#define CMPNEI_INST_CODE 17
-+#define XORI_INST_CODE 18
-+#define BNE_INST_CODE 19
-+#define CMPEQI_INST_CODE 20
-+#define LDBUIO_INST_CODE 21
-+#define MULI_INST_CODE 22
-+#define STBIO_INST_CODE 23
-+#define BEQ_INST_CODE 24
-+#define LDBIO_INST_CODE 25
-+#define CMPGEUI_INST_CODE 26
-+#define LDHUIO_INST_CODE 27
-+#define ANDHI_INST_CODE 28
-+#define STHIO_INST_CODE 29
-+#define BGEU_INST_CODE 30
-+#define LDHIO_INST_CODE 31
-+#define CMPLTUI_INST_CODE 32
-+#define CUSTOM_INST_CODE 33
-+#define INITD_INST_CODE 34
-+#define ORHI_INST_CODE 35
-+#define STWIO_INST_CODE 36
-+#define BLTU_INST_CODE 37
-+#define LDWIO_INST_CODE 38
-+#define FLUSHD_INST_CODE 39
-+#define XORHI_INST_CODE 40
-+#define ERET_INST_CODE 41
-+#define ROLI_INST_CODE 42
-+#define ROL_INST_CODE 43
-+#define FLUSHP_INST_CODE 44
-+#define RET_INST_CODE 45
-+#define NOR_INST_CODE 46
-+#define MULXUU_INST_CODE 47
-+#define CMPGE_INST_CODE 48
-+#define BRET_INST_CODE 49
-+#define ROR_INST_CODE 50
-+#define FLUSHI_INST_CODE 51
-+#define JMP_INST_CODE 52
-+#define AND_INST_CODE 53
-+#define CMPLT_INST_CODE 54
-+#define SLLI_INST_CODE 55
-+#define SLL_INST_CODE 56
-+#define OR_INST_CODE 57
-+#define MULXSU_INST_CODE 58
-+#define CMPNE_INST_CODE 59
-+#define SRLI_INST_CODE 60
-+#define SRL_INST_CODE 61
-+#define NEXTPC_INST_CODE 62
-+#define CALLR_INST_CODE 63
-+#define XOR_INST_CODE 64
-+#define MULXSS_INST_CODE 65
-+#define CMPEQ_INST_CODE 66
-+#define DIVU_INST_CODE 67
-+#define DIV_INST_CODE 68
-+#define RDCTL_INST_CODE 69
-+#define MUL_INST_CODE 70
-+#define CMPGEU_INST_CODE 71
-+#define INITI_INST_CODE 72
-+#define TRAP_INST_CODE 73
-+#define WRCTL_INST_CODE 74
-+#define CMPLTU_INST_CODE 75
-+#define ADD_INST_CODE 76
-+#define BREAK_INST_CODE 77
-+#define HBREAK_INST_CODE 78
-+#define SYNC_INST_CODE 79
-+#define SUB_INST_CODE 80
-+#define SRAI_INST_CODE 81
-+#define SRA_INST_CODE 82
-+#define INTR_INST_CODE 83
-+#define RSV_INST_CODE 84
-+#define NUM_NIOS2_INST_CODES 85
++#define JMPI_INST_CODE 1
++#define LDBU_INST_CODE 2
++#define ADDI_INST_CODE 3
++#define STB_INST_CODE 4
++#define BR_INST_CODE 5
++#define LDB_INST_CODE 6
++#define CMPGEI_INST_CODE 7
++#define LDHU_INST_CODE 8
++#define ANDI_INST_CODE 9
++#define STH_INST_CODE 10
++#define BGE_INST_CODE 11
++#define LDH_INST_CODE 12
++#define CMPLTI_INST_CODE 13
++#define ORI_INST_CODE 14
++#define STW_INST_CODE 15
++#define BLT_INST_CODE 16
++#define LDW_INST_CODE 17
++#define CMPNEI_INST_CODE 18
++#define FLUSHDA_INST_CODE 19
++#define XORI_INST_CODE 20
++#define BNE_INST_CODE 21
++#define CMPEQI_INST_CODE 22
++#define LDBUIO_INST_CODE 23
++#define MULI_INST_CODE 24
++#define STBIO_INST_CODE 25
++#define BEQ_INST_CODE 26
++#define LDBIO_INST_CODE 27
++#define CMPGEUI_INST_CODE 28
++#define LDHUIO_INST_CODE 29
++#define ANDHI_INST_CODE 30
++#define STHIO_INST_CODE 31
++#define BGEU_INST_CODE 32
++#define LDHIO_INST_CODE 33
++#define CMPLTUI_INST_CODE 34
++#define CUSTOM_INST_CODE 35
++#define INITD_INST_CODE 36
++#define ORHI_INST_CODE 37
++#define STWIO_INST_CODE 38
++#define BLTU_INST_CODE 39
++#define LDWIO_INST_CODE 40
++#define FLUSHD_INST_CODE 41
++#define XORHI_INST_CODE 42
++#define ERET_INST_CODE 43
++#define ROLI_INST_CODE 44
++#define ROL_INST_CODE 45
++#define FLUSHP_INST_CODE 46
++#define RET_INST_CODE 47
++#define NOR_INST_CODE 48
++#define MULXUU_INST_CODE 49
++#define CMPGE_INST_CODE 50
++#define BRET_INST_CODE 51
++#define ROR_INST_CODE 52
++#define FLUSHI_INST_CODE 53
++#define JMP_INST_CODE 54
++#define AND_INST_CODE 55
++#define CMPLT_INST_CODE 56
++#define SLLI_INST_CODE 57
++#define SLL_INST_CODE 58
++#define OR_INST_CODE 59
++#define MULXSU_INST_CODE 60
++#define CMPNE_INST_CODE 61
++#define SRLI_INST_CODE 62
++#define SRL_INST_CODE 63
++#define NEXTPC_INST_CODE 64
++#define CALLR_INST_CODE 65
++#define XOR_INST_CODE 66
++#define MULXSS_INST_CODE 67
++#define CMPEQ_INST_CODE 68
++#define DIVU_INST_CODE 69
++#define DIV_INST_CODE 70
++#define RDCTL_INST_CODE 71
++#define MUL_INST_CODE 72
++#define CMPGEU_INST_CODE 73
++#define INITI_INST_CODE 74
++#define TRAP_INST_CODE 75
++#define WRCTL_INST_CODE 76
++#define CMPLTU_INST_CODE 77
++#define ADD_INST_CODE 78
++#define BREAK_INST_CODE 79
++#define HBREAK_INST_CODE 80
++#define SYNC_INST_CODE 81
++#define SUB_INST_CODE 82
++#define SRAI_INST_CODE 83
++#define SRA_INST_CODE 84
++#define INTR_INST_CODE 85
++#define CRST_INST_CODE 86
++#define RSV_INST_CODE 87
++#define NUM_NIOS2_INST_CODES 88
++
++#ifndef ALT_ASM_SRC
++/* Instruction information entry */
++typedef struct {
++ const char* name; /* Assembly-language instruction name */
++ int instType; /* INST_TYPE_OP or INST_TYPE_OPX */
++ unsigned opcode; /* Value of instruction word OP/OPX field */
++} Nios2InstInfo;
+
+extern Nios2InstInfo nios2InstInfo[NUM_NIOS2_INST_CODES];
++#endif /* ALT_ASM_SRC */
+
+/* Returns the instruction code given the 32-bit instruction word */
+#define GET_INST_CODE(Iw) \
+ (IS_OPX_INST(Iw) ? opxToInstCode[GET_IW_OPX(Iw)] : opToInstCode[GET_IW_OP(Iw)])
++
++#ifndef ALT_ASM_SRC
+extern int opToInstCode[64];
+extern int opxToInstCode[64];
++#endif /* ALT_ASM_SRC */
++
++/*
++ * MMU Memory Region Macros
++ */
++#define USER_REGION_MIN_VADDR 0x00000000
++#define USER_REGION_MAX_VADDR 0x7fffffff
++#define KERNEL_MMU_REGION_MIN_VADDR 0x80000000
++#define KERNEL_MMU_REGION_MAX_VADDR 0xbfffffff
++#define KERNEL_REGION_MIN_VADDR 0xc0000000
++#define KERNEL_REGION_MAX_VADDR 0xdfffffff
++#define IO_REGION_MIN_VADDR 0xe0000000
++#define IO_REGION_MAX_VADDR 0xffffffff
++
++#define MMU_PAGE_SIZE (0x1 << (MMU_ADDR_PAGE_OFFSET_SZ))
+
-+//
-+// MMU Memory Region Macros
-+//
+#define isMmuUserRegion(Vaddr) \
+ (GET_MMU_ADDR_USER_REGION(Vaddr) == MMU_ADDR_USER_REGION)
+#define isMmuKernelMmuRegion(Vaddr) \
@@ -36956,49 +37465,60 @@
+#define isMmuIORegion(Vaddr) \
+ (GET_MMU_ADDR_IO_REGION(Vaddr) == MMU_ADDR_IO_REGION)
+
-+// Does this virtual address bypass the TLB?
++/* Does this virtual address bypass the TLB? */
+#define vaddrBypassTlb(Vaddr) \
+ (GET_MMU_ADDR_BYPASS_TLB(Vaddr) == MMU_ADDR_BYPASS_TLB)
+
-+// If TLB is bypassed, is the address cacheable or uncachable.
++/* If TLB is bypassed, is the address cacheable or uncachable. */
+#define vaddrBypassTlbCacheable(Vaddr) \
+ (GET_MMU_ADDR_BYPASS_TLB_CACHEABLE(Vaddr) == MMU_ADDR_BYPASS_TLB_CACHEABLE)
+
-+// Compute physical address for regions that bypass the TLB.
-+// Just need to clear some top bits.
++/*
++ * Compute physical address for regions that bypass the TLB.
++ * Just need to clear some top bits.
++ */
+#define bypassTlbVaddrToPaddr(Vaddr) \
+ ((Vaddr) & (MMU_ADDR_BYPASS_TLB_PADDR_MASK << MMU_ADDR_BYPASS_TLB_PADDR_LSB))
+
-+// Will the physical address fit in the Kernel/IO region virtual address space?
++/*
++ * Will the physical address fit in the Kernel/IO region virtual address space?
++ */
+#define fitsInKernelRegion(Paddr) \
+ (GET_MMU_ADDR_KERNEL_REGION(Paddr) == 0)
+#define fitsInIORegion(Paddr) \
+ (GET_MMU_ADDR_IO_REGION(Paddr) == 0)
+
-+// Convert a physical address to a Kernel/IO region virtual address.
++/* Convert a physical address to a Kernel/IO region virtual address. */
+#define paddrToKernelRegionVaddr(Paddr) \
+ ((Paddr) | (MMU_ADDR_KERNEL_REGION << MMU_ADDR_KERNEL_REGION_LSB))
+#define paddrToIORegionVaddr(Paddr) \
+ ((Paddr) | (MMU_ADDR_IO_REGION << MMU_ADDR_IO_REGION_LSB))
+
-+// Convert a virtual address to a Kernel/IO region virtual address.
-+// Uses bypassTlbVaddrToPaddr to clear top bits.
++/*
++ * Convert a virtual address to a Kernel/IO region virtual address.
++ * Uses bypassTlbVaddrToPaddr to clear top bits.
++ */
+#define vaddrToKernelRegionVaddr(Vaddr) \
+ paddrToKernelRegionVaddr(bypassTlbVaddrToPaddr(Vaddr))
+#define vaddrToIORegionVaddr(Vaddr) \
+ paddrToIORegionVaddr(bypassTlbVaddrToPaddr(Vaddr))
+
-+// Convert between VPN/PFN and virtual/physical addresses.
++/* Convert between VPN/PFN and virtual/physical addresses. */
+#define vpnToVaddr(Vpn) ((Vpn) << MMU_ADDR_VPN_LSB)
+#define pfnToPaddr(Pfn) ((Pfn) << MMU_ADDR_PFN_LSB)
+#define vaddrToVpn(Vaddr) GET_MMU_ADDR_VPN(Vaddr)
+#define paddrToPfn(Paddr) GET_MMU_ADDR_PFN(Paddr)
+
++/* Bitwise OR with a KERNEL region address to make it an IO region address */
++#define KERNEL_TO_IO_REGION 0x20000000
+
+#endif /* _NIOS2_ISA_H_ */
---- binutils-2.15/include/opcode/nios2.h 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/include/opcode/nios2.h 2005-05-17 12:20:14.000000000 +0200
-@@ -0,0 +1,357 @@
+diff --git a/include/opcode/nios2.h b/include/opcode/nios2.h
+new file mode 100644
+index 0000000..992bb80
+--- /dev/null
++++ b/include/opcode/nios2.h
+@@ -0,0 +1,361 @@
+/* nios2.h. Altera New Jersey opcode list for GAS, the GNU assembler.
+
+ Copyright (C) 2003
@@ -37217,6 +37737,7 @@
+#define OP_MATCH_BNE OP_BNE
+#define OP_MATCH_BR OP_BR
+#define OP_MATCH_FLUSHD OP_FLUSHD
++#define OP_MATCH_FLUSHDA OP_FLUSHDA
+#define OP_MATCH_INITD OP_INITD
+#define OP_MATCH_CALL OP_CALL
+#define OP_MATCH_CMPEQI OP_CMPEQI
@@ -37225,6 +37746,7 @@
+#define OP_MATCH_CMPLTI OP_CMPLTI
+#define OP_MATCH_CMPLTUI OP_CMPLTUI
+#define OP_MATCH_CMPNEI OP_CMPNEI
++#define OP_MATCH_JMPI OP_JMPI
+#define OP_MATCH_LDB OP_LDB
+#define OP_MATCH_LDBIO OP_LDBIO
+#define OP_MATCH_LDBU OP_LDBU
@@ -37250,6 +37772,8 @@
+#define OP_MATCH_XORI OP_XORI
+#define OP_MATCH_OPX OP_OPX
+
++
++
+/* OPX instruction values */
+#define OP_MATCH_ADD ((OPX_ADD << IW_OPX_LSB) | (OP_OPX))
+#define OP_MATCH_AND ((OPX_AND << IW_OPX_LSB) | (OP_OPX))
@@ -37356,13 +37880,18 @@
+extern char *overflow_msgs[];
+
+#endif // _NIOS2_H
---- binutils-2.15/include/opcode/s-nios2-isa 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/include/opcode/s-nios2-isa 2005-05-17 12:20:14.000000000 +0200
+diff --git a/include/opcode/s-nios2-isa b/include/opcode/s-nios2-isa
+new file mode 100644
+index 0000000..9788f70
+--- /dev/null
++++ b/include/opcode/s-nios2-isa
@@ -0,0 +1 @@
+timestamp
---- binutils-2.15/ld/Makefile.am 2004-05-17 21:36:15.000000000 +0200
-+++ binutils-2.15-nios2/ld/Makefile.am 2005-05-17 12:20:14.000000000 +0200
-@@ -1440,6 +1440,9 @@ eelf32frvfd.c: $(srcdir)/emulparams/elf3
+diff --git a/ld/Makefile.am b/ld/Makefile.am
+index a2f1ac1..665db8b 100644
+--- a/ld/Makefile.am
++++ b/ld/Makefile.am
+@@ -1440,6 +1440,9 @@ eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
$(srcdir)/emulparams/elf32frv.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
@@ -37372,9 +37901,11 @@
# We need this for automake to use YLWRAP.
EXTRA_ld_new_SOURCES = deffilep.y
---- binutils-2.15/ld/Makefile.in 2004-05-17 21:36:15.000000000 +0200
-+++ binutils-2.15-nios2/ld/Makefile.in 2005-05-17 12:20:14.000000000 +0200
-@@ -2166,6 +2166,9 @@ eelf32frvfd.c: $(srcdir)/emulparams/elf3
+diff --git a/ld/Makefile.in b/ld/Makefile.in
+index 976d5db..1be09a3 100644
+--- a/ld/Makefile.in
++++ b/ld/Makefile.in
+@@ -2166,6 +2166,9 @@ eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
$(srcdir)/emulparams/elf32frv.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
@@ -37384,21 +37915,28 @@
# The generated emulation files mostly have the same dependencies.
$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
---- binutils-2.15/ld/configure.tgt 2004-05-17 21:36:15.000000000 +0200
-+++ binutils-2.15-nios2/ld/configure.tgt 2005-05-17 12:20:14.000000000 +0200
+diff --git a/ld/configure.tgt b/ld/configure.tgt
+index 9b29291..3064c1d 100644
+--- a/ld/configure.tgt
++++ b/ld/configure.tgt
@@ -450,6 +450,7 @@ mn10200-*-*) targ_emul=mn10200 ;;
mn10300-*-*) targ_emul=mn10300 ;;
msp430-*-*) targ_emul=msp430x110
targ_extra_emuls="msp430x112 msp430x1101 msp430x1111 msp430x1121 msp430x1122 msp430x1132 msp430x122 msp430x123 msp430x1222 msp430x1232 msp430x133 msp430x135 msp430x1331 msp430x1351 msp430x147 msp430x148 msp430x149 msp430x155 msp430x156 msp430x157 msp430x167 msp430x168 msp430x169 msp430x311 msp430x312 msp430x313 msp430x314 msp430x315 msp430x323 msp430x325 msp430x336 msp430x337 msp430x412 msp430x413 msp430xE423 msp430xE425 msp430xE427 msp430xW423 msp430xW425 msp430xW427 msp430x435 msp430x436 msp430x437 msp430x447 msp430x448 msp430x449" ;;
-+nios2-*-*|nios2-*-*) targ_emul=nios2elf ;;
++nios2*-*-*) targ_emul=nios2elf ;;
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
targ_emul=elf64alpha_fbsd
targ_extra_emuls="elf64alpha alpha"
---- binutils-2.15/ld/emulparams/nios2elf.sh 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/ld/emulparams/nios2elf.sh 2005-05-17 12:20:14.000000000 +0200
-@@ -0,0 +1,15 @@
+diff --git a/ld/emulparams/nios2elf.sh b/ld/emulparams/nios2elf.sh
+new file mode 100644
+index 0000000..9c9e588
+--- /dev/null
++++ b/ld/emulparams/nios2elf.sh
+@@ -0,0 +1,17 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-littlenios2"
++LITTLE_OUTPUT_FORMAT="elf32-littlenios2"
++BIG_OUTPUT_FORMAT="elf32-bignios2"
+TEXT_START_ADDR=0x0
+OTHER_GOT_SYMBOLS='
+ _gp = ALIGN(16) + 0x7ff0;
@@ -37412,8 +37950,28 @@
+DATA_ADDR=.
+NOP=0x0001883a
+
---- binutils-2.15/ld/ldmain.c 2004-05-17 21:36:16.000000000 +0200
-+++ binutils-2.15-nios2/ld/ldmain.c 2005-05-17 12:20:14.000000000 +0200
+diff --git a/ld/ldlang.c b/ld/ldlang.c
+index 0c08601..78a2dfe 100644
+--- a/ld/ldlang.c
++++ b/ld/ldlang.c
+@@ -2855,10 +2855,11 @@ os_region_check (lang_output_section_statement_type *os,
+ }
+ else
+ {
+- einfo (_("%X%P: region %s is full (%B section %s)\n"),
++ einfo (_("%X%P: region %s is full (%B section %s). Region needs to be %d bytes larger.\n"),
+ region->name,
+ os->bfd_section->owner,
+- os->bfd_section->name);
++ os->bfd_section->name,
++ region->current - (region->origin + region->length));
+ }
+ /* Reset the region pointer. */
+ region->current = region->origin;
+diff --git a/ld/ldmain.c b/ld/ldmain.c
+index d0e0b12..fe24494 100644
+--- a/ld/ldmain.c
++++ b/ld/ldmain.c
@@ -397,6 +397,14 @@ main (int argc, char **argv)
yyparse ();
lex_string = NULL;
@@ -37429,14 +37987,19 @@
if (trace_file_tries)
{
---- binutils-2.15/ld/nios2_ld_xfail.lst 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/ld/nios2_ld_xfail.lst 2005-05-17 12:20:14.000000000 +0200
+diff --git a/ld/nios2_ld_xfail.lst b/ld/nios2_ld_xfail.lst
+new file mode 100644
+index 0000000..b28b04f
+--- /dev/null
++++ b/ld/nios2_ld_xfail.lst
@@ -0,0 +1,3 @@
+
+
+
---- binutils-2.15/ld/testsuite/ld-elf/merge.d 2003-05-07 07:08:02.000000000 +0200
-+++ binutils-2.15-nios2/ld/testsuite/ld-elf/merge.d 2005-05-17 12:20:14.000000000 +0200
+diff --git a/ld/testsuite/ld-elf/merge.d b/ld/testsuite/ld-elf/merge.d
+index 4038cc8..13c9e00 100644
+--- a/ld/testsuite/ld-elf/merge.d
++++ b/ld/testsuite/ld-elf/merge.d
@@ -5,6 +5,7 @@
#xfail: "hppa*-*-*" "h8300-*-*" "i960-*-*" "ip2k-*-*" "m32r-*-*" "mcore-*-*"
#xfail: "mn10*-*-*" "mips64*-*-linux*" "openrisc-*-*" "pj-*-*" "sparc*-*-*"
@@ -37445,21 +38008,25 @@
.*: file format .*elf.*
---- binutils-2.15/ld/testsuite/ld-elfcomm/elfcomm.exp 2003-06-18 05:38:05.000000000 +0200
-+++ binutils-2.15-nios2/ld/testsuite/ld-elfcomm/elfcomm.exp 2005-05-17 12:20:14.000000000 +0200
+diff --git a/ld/testsuite/ld-elfcomm/elfcomm.exp b/ld/testsuite/ld-elfcomm/elfcomm.exp
+index e5bd29b..cbeb00e 100644
+--- a/ld/testsuite/ld-elfcomm/elfcomm.exp
++++ b/ld/testsuite/ld-elfcomm/elfcomm.exp
@@ -56,6 +56,10 @@ proc dump_common1 { testname } {
return 1
}
-+if [istarget nios2-*-*] {
++if [istarget nios2*-*-*] {
+ set CFLAGS "$CFLAGS -G0"
+}
+
if { ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/common1a.c tmpdir/common1a.o]
|| ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/common1b.c tmpdir/common1b.o] } {
unresolved $test1
---- binutils-2.15/ld/testsuite/ld-scripts/cross2.t 2001-08-27 12:49:55.000000000 +0200
-+++ binutils-2.15-nios2/ld/testsuite/ld-scripts/cross2.t 2005-05-17 12:20:14.000000000 +0200
+diff --git a/ld/testsuite/ld-scripts/cross2.t b/ld/testsuite/ld-scripts/cross2.t
+index a0cdcbb..7cb7d6b 100644
+--- a/ld/testsuite/ld-scripts/cross2.t
++++ b/ld/testsuite/ld-scripts/cross2.t
@@ -2,5 +2,9 @@ NOCROSSREFS ( .text .data )
SECTIONS
{
@@ -37471,8 +38038,10 @@
+ *(.sdata) *(.rw) *(.tc0) *(.tc) *(.toc)
+ }
}
---- binutils-2.15/opcodes/Makefile.am 2004-01-07 19:39:40.000000000 +0100
-+++ binutils-2.15-nios2/opcodes/Makefile.am 2005-05-17 12:20:14.000000000 +0200
+diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
+index ea621f2..1fe2456 100644
+--- a/opcodes/Makefile.am
++++ b/opcodes/Makefile.am
@@ -125,6 +125,8 @@ CFILES = \
mmix-dis.c \
mmix-opc.c \
@@ -37491,7 +38060,7 @@
openrisc-asm.lo \
openrisc-desc.lo \
openrisc-dis.lo \
-@@ -739,6 +743,13 @@ mmix-opc.lo: mmix-opc.c $(INCDIR)/opcode
+@@ -739,6 +743,13 @@ mmix-opc.lo: mmix-opc.c $(INCDIR)/opcode/mmix.h $(INCDIR)/symcat.h
ns32k-dis.lo: ns32k-dis.c $(BFD_H) $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/dis-asm.h \
$(INCDIR)/opcode/ns32k.h opintl.h
@@ -37505,8 +38074,10 @@
openrisc-asm.lo: openrisc-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen.h \
openrisc-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
---- binutils-2.15/opcodes/Makefile.in 2004-01-07 19:39:40.000000000 +0100
-+++ binutils-2.15-nios2/opcodes/Makefile.in 2005-05-17 12:20:14.000000000 +0200
+diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
+index 559194d..dc31a88 100644
+--- a/opcodes/Makefile.in
++++ b/opcodes/Makefile.in
@@ -236,6 +236,8 @@ CFILES = \
mmix-dis.c \
mmix-opc.c \
@@ -37525,7 +38096,7 @@
ns32k-dis.lo \
openrisc-asm.lo \
openrisc-desc.lo \
-@@ -1232,6 +1236,13 @@ mmix-dis.lo: mmix-dis.c $(INCDIR)/opcode
+@@ -1232,6 +1236,13 @@ mmix-dis.lo: mmix-dis.c $(INCDIR)/opcode/mmix.h $(INCDIR)/dis-asm.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
opintl.h
mmix-opc.lo: mmix-opc.c $(INCDIR)/opcode/mmix.h $(INCDIR)/symcat.h
@@ -37539,8 +38110,10 @@
ns32k-dis.lo: ns32k-dis.c $(BFD_H) $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/dis-asm.h \
$(INCDIR)/opcode/ns32k.h opintl.h
---- binutils-2.15/opcodes/configure 2003-08-05 11:39:31.000000000 +0200
-+++ binutils-2.15-nios2/opcodes/configure 2005-05-17 12:20:14.000000000 +0200
+diff --git a/opcodes/configure b/opcodes/configure
+index 4a95a9a..561f1e0 100755
+--- a/opcodes/configure
++++ b/opcodes/configure
@@ -4661,6 +4661,7 @@ if test x${all_targets} = xfalse ; then
bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
@@ -37549,8 +38122,10 @@
bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
bfd_openrisc_arch) ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;;
bfd_or32_arch) ta="$ta or32-dis.lo or32-opc.lo" using_cgen=yes ;;
---- binutils-2.15/opcodes/configure.in 2003-08-05 11:39:31.000000000 +0200
-+++ binutils-2.15-nios2/opcodes/configure.in 2005-05-17 12:20:14.000000000 +0200
+diff --git a/opcodes/configure.in b/opcodes/configure.in
+index 8919924..bfdcabc 100644
+--- a/opcodes/configure.in
++++ b/opcodes/configure.in
@@ -202,6 +202,7 @@ if test x${all_targets} = xfalse ; then
bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
@@ -37559,16 +38134,11 @@
bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
bfd_openrisc_arch) ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;;
bfd_or32_arch) ta="$ta or32-dis.lo or32-opc.lo" using_cgen=yes ;;
---- binutils-2.15/opcodes/disassemble.c 2003-11-14 16:12:44.000000000 +0100
-+++ binutils-2.15-nios2/opcodes/disassemble.c 2005-05-17 12:20:14.000000000 +0200
-@@ -1,5 +1,5 @@
- /* Select disassembly routine for specified architecture.
-- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
-@@ -72,6 +72,7 @@ Foundation, Inc., 59 Temple Place - Suit
+diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c
+index d5b17be..877e582 100644
+--- a/opcodes/disassemble.c
++++ b/opcodes/disassemble.c
+@@ -72,6 +72,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_z8k
#define ARCH_frv
#define ARCH_iq2000
@@ -37576,21 +38146,27 @@
#define INCLUDE_SHMEDIA
#endif
-@@ -375,6 +376,11 @@ disassembler (abfd)
+@@ -375,6 +376,14 @@ disassembler (abfd)
disassemble = print_insn_iq2000;
break;
#endif
+#ifdef ARCH_nios2
+ case bfd_arch_nios2:
-+ disassemble = print_insn_nios2;
++ if (bfd_big_endian (abfd))
++ disassemble = print_insn_big_nios2;
++ else
++ disassemble = print_insn_little_nios2;
+ break;
+#endif
default:
return 0;
}
---- binutils-2.15/opcodes/nios2-dis.c 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/opcodes/nios2-dis.c 2005-05-17 12:20:14.000000000 +0200
-@@ -0,0 +1,445 @@
+diff --git a/opcodes/nios2-dis.c b/opcodes/nios2-dis.c
+new file mode 100644
+index 0000000..c164436
+--- /dev/null
++++ b/opcodes/nios2-dis.c
+@@ -0,0 +1,462 @@
+/* nios2-dis.c -- Altera New Jersey disassemble routines.
+
+ Copyright (C) 2003
@@ -37640,14 +38216,16 @@
+
+
+/* print_insn_nios2 is the main disassemble function for New Jersey.
-+ The function diassembler(abfd) (source in disassemble.c)
-+ returns a pointer to this function when the bfd machine type is
-+ New Jersey. print_insn_nios2 reads the instruction word at the
-+ address given, and prints the disassembled instruction on the
-+ stream info->stream using info->fprintf_func. */
-+
-+int
-+print_insn_nios2 (bfd_vma address, disassemble_info * info)
++ The function diassembler(abfd) (source in disassemble.c) returns a
++ pointer to this either print_insn_big_nios2 or
++ print_insn_little_nios2, which in turn call this function, when the
++ bfd machine type is New Jersey. print_insn_nios2 reads the
++ instruction word at the address given, and prints the disassembled
++ instruction on the stream info->stream using info->fprintf_func. */
++
++static int
++print_insn_nios2 (bfd_vma address, disassemble_info * info,
++ enum bfd_endian endianness)
+{
+ /* buffer into which the instruction bytes are written */
+ bfd_byte buffer[INSNLEN];
@@ -37659,9 +38237,12 @@
+ status = (*info->read_memory_func) (address, buffer, INSNLEN, info);
+ if (status == 0)
+ {
-+ status =
-+ nios2_disassemble (address, (unsigned long) bfd_getl32 (buffer),
-+ info);
++ unsigned long insn;
++ if (endianness == BFD_ENDIAN_BIG)
++ insn = (unsigned long) bfd_getb32 (buffer);
++ else
++ insn = (unsigned long) bfd_getl32 (buffer);
++ status = nios2_disassemble (address, insn, info);
+ }
+ else
+ {
@@ -37671,6 +38252,18 @@
+ return status;
+}
+
++int
++print_insn_big_nios2 (bfd_vma address, disassemble_info * info)
++{
++ return print_insn_nios2 (address, info, BFD_ENDIAN_BIG);
++}
++
++int
++print_insn_little_nios2 (bfd_vma address, disassemble_info * info)
++{
++ return print_insn_nios2 (address, info, BFD_ENDIAN_LITTLE);
++}
++
+/* Data structures used by the opcode hash table */
+
+typedef struct _nios2_opcode_hash
@@ -38036,9 +38629,12 @@
+ }
+ return 0;
+}
---- binutils-2.15/opcodes/nios2-opc.c 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-2.15-nios2/opcodes/nios2-opc.c 2005-05-17 12:20:14.000000000 +0200
-@@ -0,0 +1,315 @@
+diff --git a/opcodes/nios2-opc.c b/opcodes/nios2-opc.c
+new file mode 100644
+index 0000000..c860207
+--- /dev/null
++++ b/opcodes/nios2-opc.c
+@@ -0,0 +1,320 @@
+/* nios2-opc.c -- Altera New Jersey opcode list.
+
+ Copyright (C) 2003
@@ -38123,7 +38719,7 @@
+ {"pteaddr", 8},
+ {"tlbacc", 9},
+ {"tlbmisc", 10},
-+ {"ctl11", 11},
++ {"fstatus", 11},
+ {"ctl12", 12},
+ {"ctl13", 13},
+ {"ctl14", 14},
@@ -38144,6 +38740,8 @@
+ {"ctl29", 29},
+ {"ctl30", 30},
+ {"ctl31", 31},
++
++ /* alternative names for special control registers */
+ {"ctl0", 0},
+ {"ctl1", 1},
+ {"ctl2", 2},
@@ -38153,6 +38751,7 @@
+ {"ctl8", 8},
+ {"ctl9", 9},
+ {"ctl10", 10},
++ {"ctl11", 11},
+
+ /* coprocessor register names */
+ {"c0", 0},
@@ -38259,6 +38858,7 @@
+ {"break", "b", "b,E", 1, OP_MATCH_BREAK, OP_MASK_BREAK, 0, no_overflow },
+ {"bret", "", "E", 0, OP_MATCH_BRET, OP_MASK, 0, no_overflow },
+ {"flushd", "i(s)", "i(s)E", 2, OP_MATCH_FLUSHD, OP_MASK_IOP, 0, signed_immed16_overflow },
++ {"flushda", "i(s)", "i(s)E", 2, OP_MATCH_FLUSHDA, OP_MASK_IOP, 0, signed_immed16_overflow },
+ {"flushi", "s", "s,E", 1, OP_MATCH_FLUSHI, OP_MASK_FLUSHI, 0, no_overflow },
+ {"flushp", "", "E", 0, OP_MATCH_FLUSHP, OP_MASK, 0, no_overflow },
+ {"initd", "i(s)", "i(s)E", 2, OP_MATCH_INITD, OP_MASK_IOP, 0, signed_immed16_overflow },
@@ -38288,6 +38888,7 @@
+ {"div", "d,s,t", "d,s,t,E", 3, OP_MATCH_DIV, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
+ {"divu", "d,s,t", "d,s,t,E", 3, OP_MATCH_DIVU, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
+ {"jmp", "s", "s,E", 1, OP_MATCH_JMP, OP_MASK_JMP, 0, no_overflow },
++ {"jmpi", "m", "m,E", 1, OP_MATCH_JMPI, OP_MASK_IOP, 0, no_overflow },
+ {"ldb", "t,i(s)", "t,i(s)E", 3, OP_MATCH_LDB, OP_MASK_IOP, 0, address_offset_overflow },
+ {"ldbio", "t,i(s)", "t,i(s)E", 3, OP_MATCH_LDBIO, OP_MASK_IOP, 0, address_offset_overflow },
+ {"ldbu", "t,i(s)", "t,i(s)E", 3, OP_MATCH_LDBU, OP_MASK_IOP, 0, address_offset_overflow },
diff --git a/toolchain/binutils/2.15/701-nios2-gcc4-buildfix.patch b/toolchain/binutils/2.15/701-nios2-gcc4-buildfix.patch
index bfc8015b8..e69de29bb 100644
--- a/toolchain/binutils/2.15/701-nios2-gcc4-buildfix.patch
+++ b/toolchain/binutils/2.15/701-nios2-gcc4-buildfix.patch
@@ -1,20 +0,0 @@
---- binutils/gas/config/tc-nios2.c 2007/01/04 16:54:43 194
-+++ binutils/gas/config/tc-nios2.c 2007/01/04 16:58:16 195
-@@ -1661,7 +1661,7 @@
-
-
- /* apply the rightshift */
-- (signed) fixup >>= howto->rightshift;
-+ fixup >>= howto->rightshift;
-
- /* truncate the fixup to right size */
- switch (fixP->fx_r_type)
-@@ -1706,7 +1706,7 @@
- nios2_check_overflow (valueT fixup, reloc_howto_type * howto)
- {
- /* apply the rightshift before checking for overflow */
-- (signed) fixup >>= howto->rightshift;
-+ fixup >>= howto->rightshift;
-
- /* check for overflow - return TRUE if overflow, FALSE if not */
- switch (howto->complain_on_overflow)